@substrat-run/engine-protocol 0.8.0 → 0.9.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/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
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,24 @@ export { protocolEntities, protocolInstanceRow } from './entities.js';
|
|
|
9
9
|
* enough to declare against.
|
|
10
10
|
*/
|
|
11
11
|
export { protocolTemplateRow, protocolResponseRow, protocolSignatureRow, protocolSignatureRequestRow, } from './schemas.js';
|
|
12
|
+
/**
|
|
13
|
+
* The input shapes, and the template-content vocabulary they are built from
|
|
14
|
+
* (#738). Moved out of this file so `operations.ts` can declare against the
|
|
15
|
+
* SAME Zod object the handler parses without importing the implementation —
|
|
16
|
+
* see the header of `inputs.ts` for the cycle that forced it.
|
|
17
|
+
*
|
|
18
|
+
* Re-exported here in full: the package root is the engine's surface, and a
|
|
19
|
+
* vertical that passed `defineTemplateInput` yesterday still imports it from
|
|
20
|
+
* exactly where it did.
|
|
21
|
+
*/
|
|
22
|
+
export { protocolItem, checklistContent, documentContent, contentUnion, protocolTemplateContent, signatory, defineTemplateInput, instantiateProtocolInput, fillProtocolInput, bindDocumentInput, partyContact, signatureRequestParty, requestSignaturesInput, recordSignatureInput, declineSignatureInput, cancelSignatureRequestsInput, type ProtocolItem, type ChecklistContent, type DocumentContent, type ProtocolTemplateContent, type ProtocolTemplateContentInput, type Signatory, type DefineTemplateInput, type InstantiateProtocolInput, type FillProtocolInput, type BindDocumentInput, type PartyContact, type SignatureRequestParty, type RequestSignaturesInput, type RecordSignatureInput, type DeclineSignatureInput, type CancelSignatureRequestsInput, } from './inputs.js';
|
|
23
|
+
/**
|
|
24
|
+
* The declared operation surface (#738) — what a vertical binds to its own URLs
|
|
25
|
+
* with `defineEngineRoutes`, carrying this engine's real input and output
|
|
26
|
+
* schemas rather than a restatement the vertical had to write.
|
|
27
|
+
*/
|
|
28
|
+
export { protocolOperations, PROTOCOL_PERMISSIONS } from './operations.js';
|
|
29
|
+
import { type BindDocumentInput, type CancelSignatureRequestsInput, type DeclineSignatureInput, type DefineTemplateInput, type FillProtocolInput, type InstantiateProtocolInput, type ProtocolTemplateContent, type RecordSignatureInput, type RequestSignaturesInput } from './inputs.js';
|
|
12
30
|
import { type GuardPredicate, type ModuleRegistration, type OperationContext } from '@substrat-run/kernel';
|
|
13
31
|
export declare const PROTOCOL_PERM: {
|
|
14
32
|
create: string & z.$brand<"PermissionKey">;
|
|
@@ -119,134 +137,6 @@ export declare const protocolMigrations: {
|
|
|
119
137
|
version: string;
|
|
120
138
|
sql: string;
|
|
121
139
|
}[];
|
|
122
|
-
export declare const protocolItem: z.ZodObject<{
|
|
123
|
-
key: z.ZodString;
|
|
124
|
-
label: z.ZodString;
|
|
125
|
-
type: z.ZodEnum<{
|
|
126
|
-
check: "check";
|
|
127
|
-
text: "text";
|
|
128
|
-
value: "value";
|
|
129
|
-
}>;
|
|
130
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
131
|
-
}, z.core.$strip>;
|
|
132
|
-
export type ProtocolItem = z.infer<typeof protocolItem>;
|
|
133
|
-
/** The original shape: sections of items, filled response-by-response. */
|
|
134
|
-
export declare const checklistContent: z.ZodObject<{
|
|
135
|
-
kind: z.ZodLiteral<"checklist">;
|
|
136
|
-
sections: z.ZodArray<z.ZodObject<{
|
|
137
|
-
title: z.ZodString;
|
|
138
|
-
items: z.ZodArray<z.ZodObject<{
|
|
139
|
-
key: z.ZodString;
|
|
140
|
-
label: z.ZodString;
|
|
141
|
-
type: z.ZodEnum<{
|
|
142
|
-
check: "check";
|
|
143
|
-
text: "text";
|
|
144
|
-
value: "value";
|
|
145
|
-
}>;
|
|
146
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
147
|
-
}, z.core.$strip>>;
|
|
148
|
-
}, z.core.$strip>>;
|
|
149
|
-
}, z.core.$strip>;
|
|
150
|
-
export type ChecklistContent = z.infer<typeof checklistContent>;
|
|
151
|
-
/**
|
|
152
|
-
* Content the engine never sees. The template says what KIND of document this
|
|
153
|
-
* is and how to render it; the instance carries the vertical's `EntityRef` and
|
|
154
|
-
* the hash the vertical computed over its own rows.
|
|
155
|
-
*
|
|
156
|
-
* `hashRecipe` is free text, and it is the load-bearing honesty of this kind:
|
|
157
|
-
* a document signature attests to a hash the engine did not compute, so the
|
|
158
|
-
* recipe for reproducing it must be written down where an auditor reading the
|
|
159
|
-
* template finds it. The engine cannot enforce that the text is true — but a
|
|
160
|
-
* signature over an unreproducible hash is worth nothing, and a required field
|
|
161
|
-
* is what makes the vertical say out loud how to reproduce it.
|
|
162
|
-
*/
|
|
163
|
-
export declare const documentContent: z.ZodObject<{
|
|
164
|
-
kind: z.ZodLiteral<"document">;
|
|
165
|
-
documentType: z.ZodString;
|
|
166
|
-
hashRecipe: z.ZodString;
|
|
167
|
-
description: z.ZodOptional<z.ZodString>;
|
|
168
|
-
}, z.core.$strip>;
|
|
169
|
-
export type DocumentContent = z.infer<typeof documentContent>;
|
|
170
|
-
declare const contentUnion: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
171
|
-
kind: z.ZodLiteral<"checklist">;
|
|
172
|
-
sections: z.ZodArray<z.ZodObject<{
|
|
173
|
-
title: z.ZodString;
|
|
174
|
-
items: z.ZodArray<z.ZodObject<{
|
|
175
|
-
key: z.ZodString;
|
|
176
|
-
label: z.ZodString;
|
|
177
|
-
type: z.ZodEnum<{
|
|
178
|
-
check: "check";
|
|
179
|
-
text: "text";
|
|
180
|
-
value: "value";
|
|
181
|
-
}>;
|
|
182
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
183
|
-
}, z.core.$strip>>;
|
|
184
|
-
}, z.core.$strip>>;
|
|
185
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
186
|
-
kind: z.ZodLiteral<"document">;
|
|
187
|
-
documentType: z.ZodString;
|
|
188
|
-
hashRecipe: z.ZodString;
|
|
189
|
-
description: z.ZodOptional<z.ZodString>;
|
|
190
|
-
}, z.core.$strip>], "kind">;
|
|
191
|
-
/**
|
|
192
|
-
* Parses either kind, defaulting a missing discriminant to 'checklist' so
|
|
193
|
-
* every template defined before milestone D still parses. Note this is a
|
|
194
|
-
* READ-time normalisation: `defineTemplate` stores what it is given after
|
|
195
|
-
* parsing, so new templates carry an explicit `kind`, and old rows keep their
|
|
196
|
-
* bytes (and therefore their hashes) exactly as signed.
|
|
197
|
-
*/
|
|
198
|
-
export declare const protocolTemplateContent: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
199
|
-
kind: z.ZodLiteral<"checklist">;
|
|
200
|
-
sections: z.ZodArray<z.ZodObject<{
|
|
201
|
-
title: z.ZodString;
|
|
202
|
-
items: z.ZodArray<z.ZodObject<{
|
|
203
|
-
key: z.ZodString;
|
|
204
|
-
label: z.ZodString;
|
|
205
|
-
type: z.ZodEnum<{
|
|
206
|
-
check: "check";
|
|
207
|
-
text: "text";
|
|
208
|
-
value: "value";
|
|
209
|
-
}>;
|
|
210
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
211
|
-
}, z.core.$strip>>;
|
|
212
|
-
}, z.core.$strip>>;
|
|
213
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
214
|
-
kind: z.ZodLiteral<"document">;
|
|
215
|
-
documentType: z.ZodString;
|
|
216
|
-
hashRecipe: z.ZodString;
|
|
217
|
-
description: z.ZodOptional<z.ZodString>;
|
|
218
|
-
}, z.core.$strip>], "kind">>;
|
|
219
|
-
export type ProtocolTemplateContent = z.infer<typeof contentUnion>;
|
|
220
|
-
/**
|
|
221
|
-
* Who signed. Two kinds, and the difference is the whole point of milestone D:
|
|
222
|
-
*
|
|
223
|
-
* - `principal` — an authenticated principal in this scope. `ref` is their
|
|
224
|
-
* `PrincipalId`. Every in-app signature.
|
|
225
|
-
* - `external` — a human with no account, identified by an external provider
|
|
226
|
-
* (BankID via Scrive). `ref` is an OPAQUE `DataSubjectId` the vertical minted
|
|
227
|
-
* for that person.
|
|
228
|
-
*
|
|
229
|
-
* A personnummer, an email or a name must NEVER land in `ref`. It is `direct`
|
|
230
|
-
* PII, and `subjectId` on the emitted event is what crypto-shredding keys the
|
|
231
|
-
* erasure on (§5.3) — a `DataSubjectId` is shreddable, a personnummer written
|
|
232
|
-
* into a signature row is a GDPR liability that immutability makes permanent.
|
|
233
|
-
* The provider's own party identifier belongs in `evidenceRef`, which is where
|
|
234
|
-
* the sealed PDF and the provider audit log are reachable from.
|
|
235
|
-
*
|
|
236
|
-
* This follows `engines/booking`'s `partyRef`: a participant is a person with
|
|
237
|
-
* no principal, and it names them with a `DataSubjectId` for exactly this
|
|
238
|
-
* reason.
|
|
239
|
-
*/
|
|
240
|
-
export declare const signatory: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
241
|
-
kind: z.ZodLiteral<"principal">;
|
|
242
|
-
ref: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
243
|
-
label: z.ZodOptional<z.ZodString>;
|
|
244
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
245
|
-
kind: z.ZodLiteral<"external">;
|
|
246
|
-
ref: z.core.$ZodBranded<z.ZodString, "DataSubjectId", "out">;
|
|
247
|
-
label: z.ZodOptional<z.ZodString>;
|
|
248
|
-
}, z.core.$strip>], "kind">;
|
|
249
|
-
export type Signatory = z.infer<typeof signatory>;
|
|
250
140
|
export interface ProtocolTemplateRow {
|
|
251
141
|
id: string;
|
|
252
142
|
key: string;
|
|
@@ -346,46 +236,6 @@ export declare const allSignedGuardConfig: z.ZodObject<{
|
|
|
346
236
|
export type AllSignedGuardConfig = z.input<typeof allSignedGuardConfig>;
|
|
347
237
|
/** The named predicate the kernel resolves for `predicate: 'protocol/all-signed'`. */
|
|
348
238
|
export declare const allSignedPredicate: GuardPredicate;
|
|
349
|
-
export declare const defineTemplateInput: z.ZodObject<{
|
|
350
|
-
key: z.ZodString;
|
|
351
|
-
title: z.ZodString;
|
|
352
|
-
content: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
353
|
-
kind: z.ZodLiteral<"checklist">;
|
|
354
|
-
sections: z.ZodArray<z.ZodObject<{
|
|
355
|
-
title: z.ZodString;
|
|
356
|
-
items: z.ZodArray<z.ZodObject<{
|
|
357
|
-
key: z.ZodString;
|
|
358
|
-
label: z.ZodString;
|
|
359
|
-
type: z.ZodEnum<{
|
|
360
|
-
check: "check";
|
|
361
|
-
text: "text";
|
|
362
|
-
value: "value";
|
|
363
|
-
}>;
|
|
364
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
365
|
-
}, z.core.$strip>>;
|
|
366
|
-
}, z.core.$strip>>;
|
|
367
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
368
|
-
kind: z.ZodLiteral<"document">;
|
|
369
|
-
documentType: z.ZodString;
|
|
370
|
-
hashRecipe: z.ZodString;
|
|
371
|
-
description: z.ZodOptional<z.ZodString>;
|
|
372
|
-
}, z.core.$strip>], "kind">>;
|
|
373
|
-
}, z.core.$strip>;
|
|
374
|
-
/**
|
|
375
|
-
* What a template author writes. Spelled out rather than inferred because the
|
|
376
|
-
* `kind` normalisation is a `z.preprocess`, whose inferred INPUT type is
|
|
377
|
-
* `unknown` — which would silently drop type-checking on exactly the object a
|
|
378
|
-
* vertical hand-writes most often. `kind` is optional only for checklists, so
|
|
379
|
-
* every template that predates the discriminant still compiles unchanged.
|
|
380
|
-
*/
|
|
381
|
-
export type ProtocolTemplateContentInput = (Omit<ChecklistContent, 'kind'> & {
|
|
382
|
-
kind?: 'checklist';
|
|
383
|
-
}) | DocumentContent;
|
|
384
|
-
export interface DefineTemplateInput {
|
|
385
|
-
key: string;
|
|
386
|
-
title: string;
|
|
387
|
-
content: ProtocolTemplateContentInput;
|
|
388
|
-
}
|
|
389
239
|
/**
|
|
390
240
|
* Templates version immutably: same key + new content = next version, the
|
|
391
241
|
* old row is never touched. Editing a template never rewrites what a signed
|
|
@@ -394,38 +244,13 @@ export interface DefineTemplateInput {
|
|
|
394
244
|
export declare function defineTemplate(ctx: OperationContext, rawInput: DefineTemplateInput): ProtocolTemplateRow;
|
|
395
245
|
/** Latest version per key — the instantiation picker's list. */
|
|
396
246
|
export declare function listTemplates(ctx: OperationContext): ProtocolTemplateRow[];
|
|
397
|
-
export declare const instantiateProtocolInput: z.ZodObject<{
|
|
398
|
-
templateKey: z.ZodString;
|
|
399
|
-
entity: z.ZodObject<{
|
|
400
|
-
entityType: z.ZodString;
|
|
401
|
-
entityId: z.ZodString;
|
|
402
|
-
}, z.core.$strip>;
|
|
403
|
-
}, z.core.$strip>;
|
|
404
|
-
export type InstantiateProtocolInput = z.infer<typeof instantiateProtocolInput>;
|
|
405
247
|
/**
|
|
406
248
|
* Pins the latest template version at instantiation — forever (invariant 5).
|
|
407
249
|
* One OPEN instance per (template, entity). Which entity types may carry
|
|
408
250
|
* which protocols, and when, is vertical policy — enforced by the caller.
|
|
409
251
|
*/
|
|
410
252
|
export declare function instantiateProtocol(ctx: OperationContext, rawInput: InstantiateProtocolInput): ProtocolInstanceRow;
|
|
411
|
-
export declare const fillProtocolInput: z.ZodObject<{
|
|
412
|
-
instanceId: z.ZodString;
|
|
413
|
-
itemKey: z.ZodString;
|
|
414
|
-
value: z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>;
|
|
415
|
-
note: z.ZodOptional<z.ZodString>;
|
|
416
|
-
}, z.core.$strip>;
|
|
417
|
-
export type FillProtocolInput = z.infer<typeof fillProtocolInput>;
|
|
418
253
|
export declare function fillProtocol(ctx: OperationContext, rawInput: FillProtocolInput): ProtocolResponseRow;
|
|
419
|
-
export declare const bindDocumentInput: z.ZodObject<{
|
|
420
|
-
instanceId: z.ZodString;
|
|
421
|
-
contentRef: z.ZodObject<{
|
|
422
|
-
entityType: z.ZodString;
|
|
423
|
-
entityId: z.ZodString;
|
|
424
|
-
}, z.core.$strip>;
|
|
425
|
-
contentHash: z.ZodString;
|
|
426
|
-
documentAttachmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
427
|
-
}, z.core.$strip>;
|
|
428
|
-
export type BindDocumentInput = z.infer<typeof bindDocumentInput>;
|
|
429
254
|
/**
|
|
430
255
|
* Bind (or re-bind) a document protocol's content while it is still open —
|
|
431
256
|
* the document-kind counterpart of `fillProtocol`. Re-binding is the whole
|
|
@@ -446,73 +271,6 @@ export type BindDocumentInput = z.infer<typeof bindDocumentInput>;
|
|
|
446
271
|
* never been able to run.
|
|
447
272
|
*/
|
|
448
273
|
export declare function bindDocument(ctx: OperationContext, rawInput: BindDocumentInput): ProtocolInstanceRow;
|
|
449
|
-
/**
|
|
450
|
-
* How a signing party is REACHED (#687) — a delivery address, and nothing else.
|
|
451
|
-
*
|
|
452
|
-
* Typed rather than an opaque blob the engine never interprets, and the reason is
|
|
453
|
-
* the `authLevel` argument from #620 one level down: a provider-agnostic engine
|
|
454
|
-
* that cannot say what "how to reach a party" means is an engine every vertical
|
|
455
|
-
* has to guess around, and every connector has to re-derive. The type is small,
|
|
456
|
-
* provider-agnostic, and — with no personal number in it — free of anything a
|
|
457
|
-
* provider-specific vocabulary would be needed for.
|
|
458
|
-
*
|
|
459
|
-
* **No `personalNumber`, deliberately, and not merely as an omission.** An
|
|
460
|
-
* optional PII field on an engine surface is a carrier that exists, and this one
|
|
461
|
-
* is not needed by any path in the tree: a signatory enters their personnummer
|
|
462
|
-
* into the BankID ceremony itself, and it comes back in the completion data.
|
|
463
|
-
* Adding it would recreate exactly the problem this carrier was built to avoid.
|
|
464
|
-
*/
|
|
465
|
-
export declare const partyContact: z.ZodObject<{
|
|
466
|
-
email: z.ZodOptional<z.ZodString>;
|
|
467
|
-
mobile: z.ZodOptional<z.ZodString>;
|
|
468
|
-
}, z.core.$strip>;
|
|
469
|
-
export type PartyContact = z.infer<typeof partyContact>;
|
|
470
|
-
export declare const signatureRequestParty: z.ZodObject<{
|
|
471
|
-
label: z.ZodString;
|
|
472
|
-
kind: z.ZodEnum<{
|
|
473
|
-
external: "external";
|
|
474
|
-
principal: "principal";
|
|
475
|
-
}>;
|
|
476
|
-
ref: z.ZodOptional<z.ZodString>;
|
|
477
|
-
signatureKind: z.ZodOptional<z.ZodEnum<{
|
|
478
|
-
counter: "counter";
|
|
479
|
-
primary: "primary";
|
|
480
|
-
}>>;
|
|
481
|
-
authLevel: z.ZodOptional<z.ZodEnum<{
|
|
482
|
-
basic: "basic";
|
|
483
|
-
strong: "strong";
|
|
484
|
-
}>>;
|
|
485
|
-
contact: z.ZodOptional<z.ZodObject<{
|
|
486
|
-
email: z.ZodOptional<z.ZodString>;
|
|
487
|
-
mobile: z.ZodOptional<z.ZodString>;
|
|
488
|
-
}, z.core.$strip>>;
|
|
489
|
-
}, z.core.$strip>;
|
|
490
|
-
export type SignatureRequestParty = z.input<typeof signatureRequestParty>;
|
|
491
|
-
export declare const requestSignaturesInput: z.ZodObject<{
|
|
492
|
-
instanceId: z.ZodString;
|
|
493
|
-
method: z.ZodString;
|
|
494
|
-
parties: z.ZodArray<z.ZodObject<{
|
|
495
|
-
label: z.ZodString;
|
|
496
|
-
kind: z.ZodEnum<{
|
|
497
|
-
external: "external";
|
|
498
|
-
principal: "principal";
|
|
499
|
-
}>;
|
|
500
|
-
ref: z.ZodOptional<z.ZodString>;
|
|
501
|
-
signatureKind: z.ZodOptional<z.ZodEnum<{
|
|
502
|
-
counter: "counter";
|
|
503
|
-
primary: "primary";
|
|
504
|
-
}>>;
|
|
505
|
-
authLevel: z.ZodOptional<z.ZodEnum<{
|
|
506
|
-
basic: "basic";
|
|
507
|
-
strong: "strong";
|
|
508
|
-
}>>;
|
|
509
|
-
contact: z.ZodOptional<z.ZodObject<{
|
|
510
|
-
email: z.ZodOptional<z.ZodString>;
|
|
511
|
-
mobile: z.ZodOptional<z.ZodString>;
|
|
512
|
-
}, z.core.$strip>>;
|
|
513
|
-
}, z.core.$strip>>;
|
|
514
|
-
}, z.core.$strip>;
|
|
515
|
-
export type RequestSignaturesInput = z.input<typeof requestSignaturesInput>;
|
|
516
274
|
export interface RequestSignaturesResult {
|
|
517
275
|
instance: ProtocolInstanceRow;
|
|
518
276
|
contentHash: string;
|
|
@@ -533,22 +291,6 @@ export interface RequestSignaturesResult {
|
|
|
533
291
|
* network (boundary-lint R3).
|
|
534
292
|
*/
|
|
535
293
|
export declare function requestSignatures(ctx: OperationContext, rawInput: RequestSignaturesInput): Promise<RequestSignaturesResult>;
|
|
536
|
-
export declare const recordSignatureInput: z.ZodObject<{
|
|
537
|
-
requestId: z.ZodString;
|
|
538
|
-
signatory: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
539
|
-
kind: z.ZodLiteral<"principal">;
|
|
540
|
-
ref: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
541
|
-
label: z.ZodOptional<z.ZodString>;
|
|
542
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
543
|
-
kind: z.ZodLiteral<"external">;
|
|
544
|
-
ref: z.core.$ZodBranded<z.ZodString, "DataSubjectId", "out">;
|
|
545
|
-
label: z.ZodOptional<z.ZodString>;
|
|
546
|
-
}, z.core.$strip>], "kind">;
|
|
547
|
-
signedAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
|
|
548
|
-
contentHash: z.ZodString;
|
|
549
|
-
evidenceRef: z.ZodOptional<z.ZodString>;
|
|
550
|
-
}, z.core.$strip>;
|
|
551
|
-
export type RecordSignatureInput = z.input<typeof recordSignatureInput>;
|
|
552
294
|
export interface SignResult {
|
|
553
295
|
instance: ProtocolInstanceRow;
|
|
554
296
|
signature: ProtocolSignatureRow;
|
|
@@ -573,15 +315,6 @@ export interface SignResult {
|
|
|
573
315
|
* no human role in any demo.
|
|
574
316
|
*/
|
|
575
317
|
export declare function recordSignature(ctx: OperationContext, rawInput: RecordSignatureInput): Promise<SignResult>;
|
|
576
|
-
export declare const declineSignatureInput: z.ZodObject<{
|
|
577
|
-
requestId: z.ZodString;
|
|
578
|
-
reason: z.ZodString;
|
|
579
|
-
outcome: z.ZodDefault<z.ZodEnum<{
|
|
580
|
-
declined: "declined";
|
|
581
|
-
expired: "expired";
|
|
582
|
-
}>>;
|
|
583
|
-
}, z.core.$strip>;
|
|
584
|
-
export type DeclineSignatureInput = z.input<typeof declineSignatureInput>;
|
|
585
318
|
/**
|
|
586
319
|
* A party refused, or the provider's window expired. The instance stays
|
|
587
320
|
* `pending_signature` and therefore frozen — a refusal is not permission to
|
|
@@ -589,11 +322,6 @@ export type DeclineSignatureInput = z.input<typeof declineSignatureInput>;
|
|
|
589
322
|
* separate, permissioned, audited act.
|
|
590
323
|
*/
|
|
591
324
|
export declare function declineSignature(ctx: OperationContext, rawInput: DeclineSignatureInput): ProtocolSignatureRequestRow;
|
|
592
|
-
export declare const cancelSignatureRequestsInput: z.ZodObject<{
|
|
593
|
-
instanceId: z.ZodString;
|
|
594
|
-
reason: z.ZodString;
|
|
595
|
-
}, z.core.$strip>;
|
|
596
|
-
export type CancelSignatureRequestsInput = z.infer<typeof cancelSignatureRequestsInput>;
|
|
597
325
|
/**
|
|
598
326
|
* Withdraw an outstanding request set and thaw the instance — the
|
|
599
327
|
* renegotiation path an avtal needs when a party declines or the price moves.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAQL,KAAK,SAAS,EACd,KA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