@nodii/dsar 0.31.0 → 0.32.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/bind-pattern-a.d.ts +54 -2
- package/dist/bind-pattern-a.d.ts.map +1 -1
- package/dist/bind-pattern-a.js +502 -100
- package/dist/bind-pattern-a.js.map +1 -1
- package/dist/generated/embedded-proto-source.d.ts +1 -1
- package/dist/generated/embedded-proto-source.d.ts.map +1 -1
- package/dist/generated/embedded-proto-source.js +1 -1
- package/dist/generated/embedded-proto-source.js.map +1 -1
- package/dist/generated/package-version.d.ts +1 -1
- package/dist/generated/package-version.js +1 -1
- package/dist/grpc/dsar-service.d.ts +15 -5
- package/dist/grpc/dsar-service.d.ts.map +1 -1
- package/dist/grpc/dsar-service.js +9 -3
- package/dist/grpc/dsar-service.js.map +1 -1
- package/dist/handler-status.d.ts +24 -0
- package/dist/handler-status.d.ts.map +1 -0
- package/dist/handler-status.js +37 -0
- package/dist/handler-status.js.map +1 -0
- package/dist/hold-failure-mode.d.ts +6 -0
- package/dist/hold-failure-mode.d.ts.map +1 -1
- package/dist/hold-failure-mode.js +31 -1
- package/dist/hold-failure-mode.js.map +1 -1
- package/dist/identity.d.ts +278 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +876 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +15 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/migrations/index.d.ts +9 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +57 -0
- package/dist/migrations/index.js.map +1 -1
- package/dist/orchestrator.d.ts +11 -3
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +97 -20
- package/dist/orchestrator.js.map +1 -1
- package/dist/rectify.d.ts +87 -0
- package/dist/rectify.d.ts.map +1 -0
- package/dist/rectify.js +194 -0
- package/dist/rectify.js.map +1 -0
- package/dist/register.d.ts.map +1 -1
- package/dist/register.js +15 -2
- package/dist/register.js.map +1 -1
- package/dist/retention.d.ts.map +1 -1
- package/dist/retention.js +6 -2
- package/dist/retention.js.map +1 -1
- package/dist/s3-artifact.d.ts +30 -1
- package/dist/s3-artifact.d.ts.map +1 -1
- package/dist/s3-artifact.js +34 -0
- package/dist/s3-artifact.js.map +1 -1
- package/dist/types.d.ts +57 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +47 -1
- package/dist/types.js.map +1 -1
- package/package.json +3 -3
- package/proto/nodii/dsar/v1/dsar.proto +158 -9
- package/src/migrations/001-lifecycle-requests.sql +81 -2
- package/src/migrations/002-retention-schedules-own-table-checks.sql +56 -0
package/dist/bind-pattern-a.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { type DsarServiceImpl } from "./grpc/dsar-service.js";
|
|
2
|
+
import { type SubjectIdentityHandlers } from "./identity.js";
|
|
3
|
+
import { type SubjectEventEmitter } from "./rectify.js";
|
|
4
|
+
import { type ArtifactStore } from "./s3-artifact.js";
|
|
2
5
|
import type { DataClassRegistration } from "./register.js";
|
|
3
6
|
import type { AuditEmitter, DsarComplianceEvent, HoldKind, OutboxEmitter, PatternAHandlers, PiiAdapter, RetentionHoldHandlers, SqlTransaction } from "./types.js";
|
|
4
7
|
type SqlClient = {
|
|
@@ -44,6 +47,18 @@ type SqlClient = {
|
|
|
44
47
|
* `dsar.ComplianceStatusFor`. All three moved in the same commit.
|
|
45
48
|
*/
|
|
46
49
|
export declare function complianceStatusFor(status: string): DsarComplianceEvent["status"];
|
|
50
|
+
/** An inline access/export answer, but no `artifacts` store to stage it in. */
|
|
51
|
+
export declare const ARTIFACT_STORE_NOT_CONFIGURED_REASON = "artifact_store_not_configured";
|
|
52
|
+
/** The tenant's CMK could not be resolved for the staged artifact. */
|
|
53
|
+
export declare const CMK_UNAVAILABLE_REASON = "cmk_unavailable";
|
|
54
|
+
/** The staged artifact could not be written. */
|
|
55
|
+
export declare const ARTIFACT_WRITE_FAILED_REASON = "artifact_write_failed";
|
|
56
|
+
/** The handler returned neither an artifact locator nor any data. */
|
|
57
|
+
export declare const NO_ARTIFACT_REASON = "no_artifact";
|
|
58
|
+
/** An erase the handler reported as partial, with nothing kept under statute. */
|
|
59
|
+
export declare const ERASE_PARTIAL_REASON = "erase_partial";
|
|
60
|
+
/** A rectify the handler reported as partial. */
|
|
61
|
+
export declare const RECTIFY_PARTIAL_REASON = "rectify_partial";
|
|
47
62
|
export interface BindPatternAOpts {
|
|
48
63
|
serviceName: string;
|
|
49
64
|
/**
|
|
@@ -138,6 +153,25 @@ export interface BindPatternAOpts {
|
|
|
138
153
|
* total-erase behaviour byte for byte.
|
|
139
154
|
*/
|
|
140
155
|
retention?: RetentionBucketDeclaration;
|
|
156
|
+
/**
|
|
157
|
+
* Where an access or portability answer that a handler returned INLINE
|
|
158
|
+
* (`payload`, or the decrypted pii bundle) is staged (DSAR-FIX-2). Without
|
|
159
|
+
* it such an answer FAILS with `artifact_store_not_configured`: a request is
|
|
160
|
+
* never COMPLETED without an artifact. A handler that returns its own
|
|
161
|
+
* `result_artifact_uri` does not need it. Checked at bind.
|
|
162
|
+
*/
|
|
163
|
+
artifacts?: ArtifactStore;
|
|
164
|
+
/**
|
|
165
|
+
* REQUIRED. Receives `subject.rectified.v1` inside the lifecycle transaction
|
|
166
|
+
* of each applied correction (DSAR-FIX-5). Omitting it throws
|
|
167
|
+
* {@link MissingSubjectEventEmitterError} at bind.
|
|
168
|
+
*/
|
|
169
|
+
subjectEventEmitter: SubjectEventEmitter;
|
|
170
|
+
/**
|
|
171
|
+
* The participant's MatchSubject / VerifySubjectFactors / SendSubjectCode
|
|
172
|
+
* hooks (DSAR-FIX-4). All optional; see {@link SubjectIdentityHandlers}.
|
|
173
|
+
*/
|
|
174
|
+
identity?: SubjectIdentityHandlers;
|
|
141
175
|
}
|
|
142
176
|
/**
|
|
143
177
|
* D720 — a Pattern A participant's retention-bucket declaration.
|
|
@@ -180,6 +214,24 @@ export type RetentionScheduleLookup = (args: {
|
|
|
180
214
|
/**
|
|
181
215
|
* Bind a Pattern A service implementation.
|
|
182
216
|
*/
|
|
217
|
+
/**
|
|
218
|
+
* Whether a decrypted bundle's data carries anything. Not data: null, an
|
|
219
|
+
* empty object, map or array, an empty string. Anything else is data. The same
|
|
220
|
+
* rule in every port; an empty bundle is nothing to hand over (DSAR-FIX-2).
|
|
221
|
+
*/
|
|
222
|
+
/**
|
|
223
|
+
* A handler's inline `payload` as keys: a plain object's own keys, or a Map's
|
|
224
|
+
* string keys. An array, typed array, class instance, string or other value
|
|
225
|
+
* carries no keys, the same as in Go (string-keyed maps only) and Python
|
|
226
|
+
* (Mapping, string keys only).
|
|
227
|
+
*/
|
|
228
|
+
export declare function handlerPayload(v: unknown): Record<string, unknown>;
|
|
229
|
+
/**
|
|
230
|
+
* The `outcome` on the erase audit row of a re-key wait (ACCEPTED, retried):
|
|
231
|
+
* the row names the classes (D722) but is not the erase's final failure.
|
|
232
|
+
*/
|
|
233
|
+
export declare const REKEY_WAIT_OUTCOME = "accepted_retry";
|
|
234
|
+
export declare function holdsData(v: unknown): boolean;
|
|
183
235
|
export declare function bindPatternA(opts: BindPatternAOpts): DsarServiceImpl;
|
|
184
236
|
/**
|
|
185
237
|
* {@link bindPatternA} with the hold-gate probe AWAITED — the hard boot gate.
|
|
@@ -202,8 +254,8 @@ export declare function bindPatternAAndVerify(opts: BindPatternAOpts): Promise<D
|
|
|
202
254
|
* The hold-gate probe promise attached to a `bindPatternA` impl.
|
|
203
255
|
*
|
|
204
256
|
* Exposed as a function rather than a typed field because `DsarServiceImpl` is
|
|
205
|
-
* the WIRE descriptor — the
|
|
206
|
-
* declare a
|
|
257
|
+
* the WIRE descriptor — the 12 RPCs and nothing else — and widening it would
|
|
258
|
+
* declare a 13th method on a shape consumers hand to `server.addService`.
|
|
207
259
|
* Returns an already-resolved promise for impls that carry no probe (Pattern B /
|
|
208
260
|
* Pattern C, which have no hold gate to verify), so a caller can await it
|
|
209
261
|
* unconditionally.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bind-pattern-a.d.ts","sourceRoot":"","sources":["../src/bind-pattern-a.ts"],"names":[],"mappings":"AA0BA,OAAO,EAEL,KAAK,eAAe,EAGrB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"bind-pattern-a.d.ts","sourceRoot":"","sources":["../src/bind-pattern-a.ts"],"names":[],"mappings":"AA0BA,OAAO,EAEL,KAAK,eAAe,EAGrB,MAAM,wBAAwB,CAAC;AA0BhC,OAAO,EAAoB,KAAK,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAKL,KAAK,mBAAmB,EAEzB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,aAAa,EAInB,MAAM,kBAAkB,CAAC;AAM1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EAIR,aAAa,EAEb,gBAAgB,EAChB,UAAU,EAIV,qBAAqB,EACrB,cAAc,EAEf,MAAM,YAAY,CAAC;AA8CpB,KAAK,SAAS,GAAG;IAEf,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACxD;;;;OAIG;IACH,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,cAAc,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;CACnE,CAAC;AAKF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,GACb,mBAAmB,CAAC,QAAQ,CAAC,CAM/B;AAED,+EAA+E;AAC/E,eAAO,MAAM,oCAAoC,kCAChB,CAAC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