@punica/editor 1.43.0 → 1.44.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
|
@@ -78,6 +78,26 @@ declare module 'punica' {
|
|
|
78
78
|
* asks the right one. Absent means the file named none.
|
|
79
79
|
*/
|
|
80
80
|
org?: string;
|
|
81
|
+
/**
|
|
82
|
+
* How many of them must sign (`kernel.PolicyRequest.signatures`),
|
|
83
|
+
* when more than one. A card then says how many have, and offers
|
|
84
|
+
* a signature rather than a grant.
|
|
85
|
+
*/
|
|
86
|
+
signatures?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Who has signed so far, under which name — the record's own
|
|
89
|
+
* list, copied onto the question by `approvePending` when a
|
|
90
|
+
* signature lands and the chain is still short. A person on it
|
|
91
|
+
* cannot sign again.
|
|
92
|
+
*/
|
|
93
|
+
signed?: ReadonlyArray<{ by: string; role?: string; atMs: number }>;
|
|
94
|
+
/**
|
|
95
|
+
* The scope the first signature was recorded at. The next ones are
|
|
96
|
+
* recorded at the same scope, whatever the card offered: a grant
|
|
97
|
+
* is one record, and two signatures at two scopes would be two
|
|
98
|
+
* half-signed records.
|
|
99
|
+
*/
|
|
100
|
+
signedScope?: ApprovalScope;
|
|
81
101
|
/**
|
|
82
102
|
* Set by `referPending`: the question was handed to a reviewer
|
|
83
103
|
* outside this host, under this name. A run waiting on it holds
|
|
@@ -85,6 +85,13 @@ declare module 'punica' {
|
|
|
85
85
|
* role in any of the person's organisations counts.
|
|
86
86
|
*/
|
|
87
87
|
org?: string;
|
|
88
|
+
/**
|
|
89
|
+
* How many of those approvers must sign before the grant stands
|
|
90
|
+
* (the deciding rule's `signatures:`). Absent or `1` is one
|
|
91
|
+
* decision; `2` means two different people, each one an entry
|
|
92
|
+
* names, and a record with fewer is consulted as no grant at all.
|
|
93
|
+
*/
|
|
94
|
+
signatures?: number;
|
|
88
95
|
}
|
|
89
96
|
|
|
90
97
|
/**
|
|
@@ -130,6 +137,12 @@ declare module 'punica' {
|
|
|
130
137
|
timestampMs: number;
|
|
131
138
|
/** Optional reason — surfaced in audit. */
|
|
132
139
|
reason?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Under which of the rule's names this person signed (`owner`,
|
|
142
|
+
* `role:<name>`, `user:<email>`) — a `signatures` chain records it
|
|
143
|
+
* per signer, the way a single grant records `decidedRole`.
|
|
144
|
+
*/
|
|
145
|
+
role?: string;
|
|
133
146
|
}
|
|
134
147
|
|
|
135
148
|
/** Chain-level outcome of `recordChainDecision`. */
|
|
@@ -154,6 +167,19 @@ declare module 'punica' {
|
|
|
154
167
|
| {
|
|
155
168
|
type: 'single';
|
|
156
169
|
approver: ApproverSpec;
|
|
170
|
+
}
|
|
171
|
+
| {
|
|
172
|
+
/**
|
|
173
|
+
* A rule's `signatures: N` (1.44.0): `required` different
|
|
174
|
+
* people, each one of the rule's `approvers` entries, in any
|
|
175
|
+
* order; any deny ends it. The people are not known when the
|
|
176
|
+
* chain opens — a role names a set — so `approverId` is the
|
|
177
|
+
* signer's address and the spec lists the rule's entries, not
|
|
178
|
+
* ids. The policy manager is this shape's caller.
|
|
179
|
+
*/
|
|
180
|
+
type: 'signatures';
|
|
181
|
+
required: number;
|
|
182
|
+
approvers: readonly string[];
|
|
157
183
|
};
|
|
158
184
|
|
|
159
185
|
/** Snapshot of a running chain — read-only from the caller's POV. */
|
|
@@ -192,6 +218,17 @@ declare module 'punica' {
|
|
|
192
218
|
* record + chain state by this id.
|
|
193
219
|
*/
|
|
194
220
|
chainRef?: string;
|
|
221
|
+
/**
|
|
222
|
+
* The signatures a `signatures: N` rule collected on this record
|
|
223
|
+
* (1.44.0): how many it needs and who signed, under which name. A
|
|
224
|
+
* record with fewer signatures than `need` is stored — so the next
|
|
225
|
+
* signer finds it and a reader sees who is missing — and is never
|
|
226
|
+
* consulted as a grant. Absent on a single-decision grant.
|
|
227
|
+
*/
|
|
228
|
+
signatures?: {
|
|
229
|
+
need: number;
|
|
230
|
+
by: ReadonlyArray<{ by: string; role?: string; atMs: number }>;
|
|
231
|
+
};
|
|
195
232
|
/**
|
|
196
233
|
* The arguments this grant covers. See `PolicyRequest.argsBinding`.
|
|
197
234
|
* Persisted so a grant matches only the arguments it was given
|
|
@@ -232,6 +269,8 @@ declare module 'punica' {
|
|
|
232
269
|
approvers?: readonly string[];
|
|
233
270
|
/** The organisation those approvers hold their roles in (the file's `org:`). */
|
|
234
271
|
org?: string;
|
|
272
|
+
/** How many of them must sign (the rule's `signatures:`), when more than one. */
|
|
273
|
+
signatures?: number;
|
|
235
274
|
reason?: string;
|
|
236
275
|
/**
|
|
237
276
|
* Set when a rule from a policy template decided this. Absent
|
|
@@ -549,6 +588,14 @@ declare module 'punica' {
|
|
|
549
588
|
* which is what every rule written before this field meant.
|
|
550
589
|
*/
|
|
551
590
|
approvers?: string[];
|
|
591
|
+
/**
|
|
592
|
+
* How many of those approvers must sign, only with `approvers:` on
|
|
593
|
+
* `effect: 'require'`. `2` is two different people, each one an
|
|
594
|
+
* entry names, in any order; one person cannot sign twice, and a
|
|
595
|
+
* signer needs a name. Absent or `1` is one decision, which is
|
|
596
|
+
* what every rule written before this field meant.
|
|
597
|
+
*/
|
|
598
|
+
signatures?: number;
|
|
552
599
|
/** Shown to the user on a denial and written into the audit record. */
|
|
553
600
|
reason?: string;
|
|
554
601
|
}
|
|
@@ -567,6 +614,8 @@ declare module 'punica' {
|
|
|
567
614
|
approvers?: string[];
|
|
568
615
|
/** The file's `org:`, when it wrote one — where those approvers hold their roles. */
|
|
569
616
|
org?: string;
|
|
617
|
+
/** The rule's `signatures`, when more than one. */
|
|
618
|
+
signatures?: number;
|
|
570
619
|
/** Digest of the template's rules — which policy text was in force. */
|
|
571
620
|
digest?: string;
|
|
572
621
|
/**
|