@voltro/plugin-governance 0.84.0 → 0.85.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/CHANGELOG.md +549 -0
- package/THIRD-PARTY-NOTICES.md +71 -525
- package/dist/index.d.ts +26 -7
- package/dist/index.js +231 -151
- package/dist/rpc.d.ts +18 -18
- package/dist/rpc.js +2 -5
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -251,7 +251,7 @@ export declare interface GovernancePluginOptions {
|
|
|
251
251
|
export declare class GovernanceService extends GovernanceService_base {
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
declare const GovernanceService_base: Context.
|
|
254
|
+
declare const GovernanceService_base: Context.ServiceClass<GovernanceService, "@voltro/plugin-governance/GovernanceService", GovernanceServiceShape>;
|
|
255
255
|
|
|
256
256
|
export declare interface GovernanceServiceShape {
|
|
257
257
|
readonly exportSubject: (subjectId: string) => Promise<Record<string, ReadonlyArray<Record<string, unknown>>>>;
|
|
@@ -268,6 +268,20 @@ export declare interface GovernanceServiceShape {
|
|
|
268
268
|
readonly subjectGraph: () => SubjectGraph;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
+
export declare interface GovScan {
|
|
272
|
+
readonly limit: number;
|
|
273
|
+
readonly after?: unknown;
|
|
274
|
+
readonly column?: string;
|
|
275
|
+
readonly values?: ReadonlyArray<unknown>;
|
|
276
|
+
readonly projection?: ReadonlyArray<string>;
|
|
277
|
+
/** Push down only for a registered timestamp column; other date formats
|
|
278
|
+
* remain candidates for the caller's Date/string/number matcher. */
|
|
279
|
+
readonly expired?: {
|
|
280
|
+
readonly column: string;
|
|
281
|
+
readonly before: Date;
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
|
|
271
285
|
export declare interface GovStore {
|
|
272
286
|
/**
|
|
273
287
|
* All rows of a table.
|
|
@@ -306,6 +320,12 @@ export declare interface GovStore {
|
|
|
306
320
|
readonly page: (table: string, limit: number, offset: number) => Promise<ReadonlyArray<Record<string, unknown>>>;
|
|
307
321
|
readonly delete: (table: string, id: string) => Promise<void>;
|
|
308
322
|
readonly update: (table: string, id: string, patch: Record<string, unknown>) => Promise<void>;
|
|
323
|
+
/** Stable keyset page, optionally subject-scoped/projected. Custom stores
|
|
324
|
+
* can provide it to avoid materializing a complete subject hop. */
|
|
325
|
+
readonly scan?: (table: string, options: GovScan) => Promise<ReadonlyArray<Record<string, unknown>>>;
|
|
326
|
+
/** Bounded physical deletes (no patch) or updates; returns actual affected
|
|
327
|
+
* rows. Implementations retain normal store events and failure behavior. */
|
|
328
|
+
readonly writeMany?: (table: string, ids: ReadonlyArray<string>, patch?: Record<string, unknown>) => Promise<number>;
|
|
309
329
|
}
|
|
310
330
|
|
|
311
331
|
export { isEncrypted }
|
|
@@ -361,12 +381,11 @@ declare interface RetentionReport {
|
|
|
361
381
|
* from growing) can't OOM the process or fire one statement per row in an
|
|
362
382
|
* unbounded burst.
|
|
363
383
|
*
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
* batch (table drained).
|
|
384
|
+
* Stores with `scan` select id/date pages after a stable id cursor, pushing
|
|
385
|
+
* expiry into SQL for timestamp fields. Deletion cannot shift that cursor.
|
|
386
|
+
* Custom page-only stores retain survivor-offset traversal: deletes advance
|
|
387
|
+
* by the survivors, anonymization by the complete page. A short page ends
|
|
388
|
+
* the sweep. Writes are bounded independently of the scan page size.
|
|
370
389
|
*/
|
|
371
390
|
export declare const runRetention: (store: GovStore, policies: ReadonlyArray<RetentionPolicy>, now?: number, batchSize?: number) => Promise<ReadonlyArray<RetentionReport>>;
|
|
372
391
|
|