@stll/anonymize-docx 2.9.1 → 3.0.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.mts +21 -21
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NativeCallerDetection, NativeOperatorConfig, NativeSessionBlockRedactionPlan, NativeSessionCallerRedactionPlanOptions } from "@stll/anonymize";
|
|
2
2
|
//#region src/types.d.ts
|
|
3
|
-
declare const DOCX_PART_TYPES: {
|
|
3
|
+
export declare const DOCX_PART_TYPES: {
|
|
4
4
|
readonly comments: "comments";
|
|
5
5
|
readonly endnotes: "endnotes";
|
|
6
6
|
readonly footer: "footer";
|
|
@@ -87,7 +87,7 @@ type DocxRewriteResult = {
|
|
|
87
87
|
rewrittenBlockCount: number;
|
|
88
88
|
appliedReplacementCount: number;
|
|
89
89
|
};
|
|
90
|
-
declare const DOCX_COVERAGE_MODES: {
|
|
90
|
+
export declare const DOCX_COVERAGE_MODES: {
|
|
91
91
|
readonly allowPartial: "allow-partial";
|
|
92
92
|
readonly requireFull: "require-full";
|
|
93
93
|
};
|
|
@@ -154,7 +154,7 @@ type DocxAnonymizationResult = {
|
|
|
154
154
|
document: Uint8Array;
|
|
155
155
|
summary: DocxAnonymizationSummary;
|
|
156
156
|
};
|
|
157
|
-
declare const DOCX_ANONYMIZATION_ERROR_CODES: {
|
|
157
|
+
export declare const DOCX_ANONYMIZATION_ERROR_CODES: {
|
|
158
158
|
readonly incompleteCoverage: "incomplete-coverage";
|
|
159
159
|
readonly invalidCallerDetections: "invalid-caller-detections";
|
|
160
160
|
readonly sessionMismatch: "session-mismatch";
|
|
@@ -177,7 +177,7 @@ type DocxRestorationResult = {
|
|
|
177
177
|
restoredPlaceholderCount: number;
|
|
178
178
|
coverage: DocxWorkflowCoverage;
|
|
179
179
|
};
|
|
180
|
-
declare const DOCX_RESTORATION_ERROR_CODES: {
|
|
180
|
+
export declare const DOCX_RESTORATION_ERROR_CODES: {
|
|
181
181
|
readonly invalidPlaceholder: "invalid-placeholder";
|
|
182
182
|
readonly invalidSession: "invalid-session";
|
|
183
183
|
readonly restorationLimitExceeded: "restoration-limit-exceeded";
|
|
@@ -185,14 +185,14 @@ declare const DOCX_RESTORATION_ERROR_CODES: {
|
|
|
185
185
|
readonly unsupportedDocument: "unsupported-document";
|
|
186
186
|
};
|
|
187
187
|
type DocxRestorationErrorCode = (typeof DOCX_RESTORATION_ERROR_CODES)[keyof typeof DOCX_RESTORATION_ERROR_CODES];
|
|
188
|
-
declare const DOCX_REWRITE_ERROR_CODES: {
|
|
188
|
+
export declare const DOCX_REWRITE_ERROR_CODES: {
|
|
189
189
|
readonly invalidReplacement: "invalid-replacement";
|
|
190
190
|
readonly rewriteLimitExceeded: "rewrite-limit-exceeded";
|
|
191
191
|
readonly staleExtraction: "stale-extraction";
|
|
192
192
|
readonly unsupportedReplacement: "unsupported-replacement";
|
|
193
193
|
};
|
|
194
194
|
type DocxRewriteErrorCode = (typeof DOCX_REWRITE_ERROR_CODES)[keyof typeof DOCX_REWRITE_ERROR_CODES];
|
|
195
|
-
declare const DOCX_EXTRACTION_ERROR_CODES: {
|
|
195
|
+
export declare const DOCX_EXTRACTION_ERROR_CODES: {
|
|
196
196
|
readonly archiveLimitExceeded: "archive-limit-exceeded";
|
|
197
197
|
readonly invalidArchive: "invalid-archive";
|
|
198
198
|
readonly invalidPackage: "invalid-package";
|
|
@@ -203,38 +203,38 @@ declare const DOCX_EXTRACTION_ERROR_CODES: {
|
|
|
203
203
|
type DocxExtractionErrorCode = (typeof DOCX_EXTRACTION_ERROR_CODES)[keyof typeof DOCX_EXTRACTION_ERROR_CODES];
|
|
204
204
|
//#endregion
|
|
205
205
|
//#region src/extract.d.ts
|
|
206
|
-
declare const DOCX_EXTRACTION_CONTRACT_VERSION: 1;
|
|
207
|
-
declare const DOCX_ARCHIVE_MAX_BYTES: number;
|
|
208
|
-
declare const DOCX_ENTRY_MAX_BYTES: number;
|
|
209
|
-
declare const DOCX_UNCOMPRESSED_MAX_BYTES: number;
|
|
210
|
-
declare const DOCX_XML_MAX_DEPTH = 256;
|
|
211
|
-
declare class DocxExtractionError extends Error {
|
|
206
|
+
export declare const DOCX_EXTRACTION_CONTRACT_VERSION: 1;
|
|
207
|
+
export declare const DOCX_ARCHIVE_MAX_BYTES: number;
|
|
208
|
+
export declare const DOCX_ENTRY_MAX_BYTES: number;
|
|
209
|
+
export declare const DOCX_UNCOMPRESSED_MAX_BYTES: number;
|
|
210
|
+
export declare const DOCX_XML_MAX_DEPTH = 256;
|
|
211
|
+
export declare class DocxExtractionError extends Error {
|
|
212
212
|
readonly code: DocxExtractionErrorCode;
|
|
213
213
|
constructor(code: DocxExtractionErrorCode, message: string);
|
|
214
214
|
}
|
|
215
|
-
declare const extractDocxText: (archive: Uint8Array) => DocxExtraction;
|
|
215
|
+
export declare const extractDocxText: (archive: Uint8Array) => DocxExtraction;
|
|
216
216
|
//#endregion
|
|
217
217
|
//#region src/rewrite.d.ts
|
|
218
|
-
declare class DocxRewriteError extends Error {
|
|
218
|
+
export declare class DocxRewriteError extends Error {
|
|
219
219
|
readonly code: DocxRewriteErrorCode;
|
|
220
220
|
constructor(code: DocxRewriteErrorCode, message: string);
|
|
221
221
|
}
|
|
222
|
-
declare const rewriteDocxText: (archive: Uint8Array, rewrites: readonly DocxBlockRewrite[]) => DocxRewriteResult;
|
|
222
|
+
export declare const rewriteDocxText: (archive: Uint8Array, rewrites: readonly DocxBlockRewrite[]) => DocxRewriteResult;
|
|
223
223
|
//#endregion
|
|
224
224
|
//#region src/restore.d.ts
|
|
225
|
-
declare class DocxRestorationError extends Error {
|
|
225
|
+
export declare class DocxRestorationError extends Error {
|
|
226
226
|
readonly code: DocxRestorationErrorCode;
|
|
227
227
|
constructor(code: DocxRestorationErrorCode, message: string);
|
|
228
228
|
}
|
|
229
|
-
declare const restoreDocxText: ({ document, session, expectedSessionId, observedAtEpochSeconds }: RestoreDocxTextOptions) => DocxRestorationResult;
|
|
229
|
+
export declare const restoreDocxText: ({ document, session, expectedSessionId, observedAtEpochSeconds }: RestoreDocxTextOptions) => DocxRestorationResult;
|
|
230
230
|
//#endregion
|
|
231
231
|
//#region src/anonymize.d.ts
|
|
232
|
-
declare const DOCX_ANONYMIZATION_MAX_CALLER_DETECTIONS = 1000000;
|
|
233
|
-
declare class DocxAnonymizationError extends Error {
|
|
232
|
+
export declare const DOCX_ANONYMIZATION_MAX_CALLER_DETECTIONS = 1000000;
|
|
233
|
+
export declare class DocxAnonymizationError extends Error {
|
|
234
234
|
readonly code: DocxAnonymizationErrorCode;
|
|
235
235
|
constructor(code: DocxAnonymizationErrorCode, message: string);
|
|
236
236
|
}
|
|
237
|
-
declare const anonymizeDocx: ({ document, session, expectedSessionId, policy, callerDetections, observedAtEpochSeconds }: AnonymizeDocxOptions) => DocxAnonymizationResult;
|
|
237
|
+
export declare const anonymizeDocx: ({ document, session, expectedSessionId, policy, callerDetections, observedAtEpochSeconds }: AnonymizeDocxOptions) => DocxAnonymizationResult;
|
|
238
238
|
//#endregion
|
|
239
|
-
export {
|
|
239
|
+
export type { AnonymizeDocxOptions, DocxAnonymizationErrorCode, DocxAnonymizationPolicy, DocxAnonymizationResult, DocxAnonymizationSession, DocxAnonymizationSummary, DocxBlockCallerDetections, DocxBlockLocation, DocxBlockRewrite, DocxCallerDetection, DocxCoverage, DocxCoverageItem, DocxCoverageMode, DocxCoveragePolicy, DocxCoverageSummary, DocxExtraction, DocxExtractionErrorCode, DocxInlineContext, DocxPart, DocxRestorationErrorCode, DocxRestorationResult, DocxRestorationSession, DocxRewriteErrorCode, DocxRewriteResult, DocxSessionRedactionPlan, DocxTextBlock, DocxTextReplacement, DocxTextSegment, DocxWorkflowCoverage, RestoreDocxTextOptions };
|
|
240
240
|
//# sourceMappingURL=index.d.mts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/anonymize-docx",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Structure-aware DOCX text extraction and rewriting for stella anonymization workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"format": "oxfmt ."
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@stll/anonymize": "^
|
|
35
|
+
"@stll/anonymize": "^3.0.1",
|
|
36
36
|
"fflate": "^0.8.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/node": "^26.
|
|
40
|
-
"bun-types": "1.4.
|
|
39
|
+
"@types/node": "^26.4.1",
|
|
40
|
+
"bun-types": "1.4.2",
|
|
41
41
|
"fflate": "^0.8.3",
|
|
42
|
-
"tsdown": "0.
|
|
42
|
+
"tsdown": "0.23.0",
|
|
43
43
|
"typescript": "7.0.2"
|
|
44
44
|
}
|
|
45
45
|
}
|