@blindfold/sdk 1.0.2
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/LICENSE +21 -0
- package/README.md +427 -0
- package/dist/index-CsE6Vhax.d.mts +177 -0
- package/dist/index-CsE6Vhax.d.mts.map +1 -0
- package/dist/index-Dfv8zV_d.d.ts +177 -0
- package/dist/index-Dfv8zV_d.d.ts.map +1 -0
- package/dist/index.d.mts +450 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +450 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +575 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +568 -0
- package/dist/index.mjs.map +1 -0
- package/dist/regex/index.d.mts +2 -0
- package/dist/regex/index.d.ts +2 -0
- package/dist/regex/index.js +5 -0
- package/dist/regex/index.mjs +4 -0
- package/dist/regex-BEaK0E7Y.js +4881 -0
- package/dist/regex-BEaK0E7Y.js.map +1 -0
- package/dist/regex-ByjZg3Zy.mjs +4839 -0
- package/dist/regex-ByjZg3Zy.mjs.map +1 -0
- package/package.json +86 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
import { EntityType, PIIMatch, PIIScanner } from "./index-Dfv8zV_d.js";
|
|
2
|
+
|
|
3
|
+
//#region src/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for Blindfold client
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for Blindfold client
|
|
9
|
+
*/
|
|
10
|
+
interface BlindfoldConfig {
|
|
11
|
+
/** API key for authentication. When omitted, detect() and redact() use the local regex scanner. */
|
|
12
|
+
apiKey?: string;
|
|
13
|
+
/** Base URL for the API (default: https://api.blindfold.dev/api/public/v1) */
|
|
14
|
+
baseUrl?: string;
|
|
15
|
+
/** Region for data residency ("eu" or "us"). Overrides baseUrl if baseUrl is not set. */
|
|
16
|
+
region?: 'eu' | 'us';
|
|
17
|
+
/** Optional user ID to track who is making the request */
|
|
18
|
+
userId?: string;
|
|
19
|
+
/** Maximum number of retries on transient errors (default: 2, 0 to disable) */
|
|
20
|
+
maxRetries?: number;
|
|
21
|
+
/** Initial delay in seconds before first retry (default: 0.5) */
|
|
22
|
+
retryDelay?: number;
|
|
23
|
+
/** Set to "local" to force local regex detection even when an API key is present. */
|
|
24
|
+
mode?: 'local' | 'api';
|
|
25
|
+
/** Locale codes for the local regex scanner (default: ["us"]). Example: ["us", "eu", "cz"]. Only used in local mode. */
|
|
26
|
+
locales?: string[];
|
|
27
|
+
/** Path to a JSON file with custom policy definitions. Merged over the bundled policies. */
|
|
28
|
+
policiesFile?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Configuration options for tokenization
|
|
32
|
+
*/
|
|
33
|
+
interface TokenizeConfig {
|
|
34
|
+
/** List of entities to detect */
|
|
35
|
+
entities?: string[];
|
|
36
|
+
/** Minimum confidence score for entity detection (0.0-1.0) */
|
|
37
|
+
score_threshold?: number;
|
|
38
|
+
/** Policy name to use for detection configuration (e.g., 'gdpr_eu', 'hipaa_us', 'basic') */
|
|
39
|
+
policy?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Configuration options for detection (no text transformation)
|
|
43
|
+
*/
|
|
44
|
+
interface DetectConfig {
|
|
45
|
+
/** List of entities to detect */
|
|
46
|
+
entities?: string[];
|
|
47
|
+
/** Minimum confidence score for entity detection (0.0-1.0) */
|
|
48
|
+
score_threshold?: number;
|
|
49
|
+
/** Policy name to use for detection configuration (e.g., 'gdpr_eu', 'hipaa_us', 'basic') */
|
|
50
|
+
policy?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Response from detect endpoint
|
|
54
|
+
*/
|
|
55
|
+
interface DetectResponse {
|
|
56
|
+
/** List of detected entities */
|
|
57
|
+
detected_entities: DetectedEntity[];
|
|
58
|
+
/** Count of detected entities */
|
|
59
|
+
entities_count: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Detected entity information
|
|
63
|
+
*/
|
|
64
|
+
interface DetectedEntity {
|
|
65
|
+
/** Entity type (e.g., "person", "email address", "phone number") */
|
|
66
|
+
type: string;
|
|
67
|
+
/** Original text of the entity */
|
|
68
|
+
text: string;
|
|
69
|
+
/** Start index in text */
|
|
70
|
+
start: number;
|
|
71
|
+
/** End index in text */
|
|
72
|
+
end: number;
|
|
73
|
+
/** Confidence score (0-1) */
|
|
74
|
+
score: number;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Response from tokenize endpoint
|
|
78
|
+
*/
|
|
79
|
+
interface TokenizeResponse {
|
|
80
|
+
/** Anonymized text with placeholders */
|
|
81
|
+
text: string;
|
|
82
|
+
/** Mapping of tokens to original values */
|
|
83
|
+
mapping: Record<string, string>;
|
|
84
|
+
/** List of detected entities */
|
|
85
|
+
detected_entities: DetectedEntity[];
|
|
86
|
+
/** Count of detected entities */
|
|
87
|
+
entities_count: number;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Response from detokenize endpoint
|
|
91
|
+
*/
|
|
92
|
+
interface DetokenizeResponse {
|
|
93
|
+
/** Original text with restored values */
|
|
94
|
+
text: string;
|
|
95
|
+
/** Number of replacements made */
|
|
96
|
+
replacements_made: number;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Configuration options for redaction
|
|
100
|
+
*/
|
|
101
|
+
interface RedactConfig {
|
|
102
|
+
/** Character(s) to use for masking (default: "*") */
|
|
103
|
+
masking_char?: string;
|
|
104
|
+
/** List of entities to detect */
|
|
105
|
+
entities?: string[];
|
|
106
|
+
/** Minimum confidence score for entity detection (0.0-1.0) */
|
|
107
|
+
score_threshold?: number;
|
|
108
|
+
/** Policy name to use for detection configuration (e.g., 'gdpr_eu', 'hipaa_us', 'basic') */
|
|
109
|
+
policy?: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Response from redact endpoint
|
|
113
|
+
*/
|
|
114
|
+
interface RedactResponse {
|
|
115
|
+
/** Text with PII permanently removed */
|
|
116
|
+
text: string;
|
|
117
|
+
/** List of detected and redacted entities */
|
|
118
|
+
detected_entities: DetectedEntity[];
|
|
119
|
+
/** Number of entities redacted */
|
|
120
|
+
entities_count: number;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Configuration options for masking
|
|
124
|
+
*/
|
|
125
|
+
interface MaskConfig {
|
|
126
|
+
/** Number of characters to show (default: 3) */
|
|
127
|
+
chars_to_show?: number;
|
|
128
|
+
/** Whether to show characters from the end (default: false) */
|
|
129
|
+
from_end?: boolean;
|
|
130
|
+
/** Character to use for masking (default: "*") */
|
|
131
|
+
masking_char?: string;
|
|
132
|
+
/** List of entities to detect */
|
|
133
|
+
entities?: string[];
|
|
134
|
+
/** Minimum confidence score for entity detection (0.0-1.0) */
|
|
135
|
+
score_threshold?: number;
|
|
136
|
+
/** Policy name to use for detection configuration (e.g., 'gdpr_eu', 'hipaa_us', 'basic') */
|
|
137
|
+
policy?: string;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Response from mask endpoint
|
|
141
|
+
*/
|
|
142
|
+
interface MaskResponse {
|
|
143
|
+
/** Text with PII partially masked */
|
|
144
|
+
text: string;
|
|
145
|
+
/** List of detected and masked entities */
|
|
146
|
+
detected_entities: DetectedEntity[];
|
|
147
|
+
/** Number of entities masked */
|
|
148
|
+
entities_count: number;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Configuration options for synthesis
|
|
152
|
+
*/
|
|
153
|
+
interface SynthesizeConfig {
|
|
154
|
+
/** Language code for synthetic data generation (e.g., 'en', 'cs', 'de') */
|
|
155
|
+
language?: string;
|
|
156
|
+
/** List of entities to detect */
|
|
157
|
+
entities?: string[];
|
|
158
|
+
/** Minimum confidence score for entity detection (0.0-1.0) */
|
|
159
|
+
score_threshold?: number;
|
|
160
|
+
/** Policy name to use for detection configuration (e.g., 'gdpr_eu', 'hipaa_us', 'basic') */
|
|
161
|
+
policy?: string;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Response from synthesis endpoint
|
|
165
|
+
*/
|
|
166
|
+
interface SynthesizeResponse {
|
|
167
|
+
/** Text with synthetic fake data */
|
|
168
|
+
text: string;
|
|
169
|
+
/** List of detected and synthesized entities */
|
|
170
|
+
detected_entities: DetectedEntity[];
|
|
171
|
+
/** Number of entities synthesized */
|
|
172
|
+
entities_count: number;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Configuration options for hashing
|
|
176
|
+
*/
|
|
177
|
+
interface HashConfig {
|
|
178
|
+
/** Hash algorithm to use (e.g., 'md5', 'sha1', 'sha256', 'sha512') */
|
|
179
|
+
hash_type?: string;
|
|
180
|
+
/** Prefix to add before hash value (default: 'HASH_') */
|
|
181
|
+
hash_prefix?: string;
|
|
182
|
+
/** Length of hash to display (default: 16) */
|
|
183
|
+
hash_length?: number;
|
|
184
|
+
/** List of entities to detect */
|
|
185
|
+
entities?: string[];
|
|
186
|
+
/** Minimum confidence score for entity detection (0.0-1.0) */
|
|
187
|
+
score_threshold?: number;
|
|
188
|
+
/** Policy name to use for detection configuration (e.g., 'gdpr_eu', 'hipaa_us', 'basic') */
|
|
189
|
+
policy?: string;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Response from hash endpoint
|
|
193
|
+
*/
|
|
194
|
+
interface HashResponse {
|
|
195
|
+
/** Text with PII replaced by hash values */
|
|
196
|
+
text: string;
|
|
197
|
+
/** List of detected and hashed entities */
|
|
198
|
+
detected_entities: DetectedEntity[];
|
|
199
|
+
/** Number of entities hashed */
|
|
200
|
+
entities_count: number;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Configuration options for encryption
|
|
204
|
+
*/
|
|
205
|
+
interface EncryptConfig {
|
|
206
|
+
/** Optional encryption key (if not provided, tenant key will be used) */
|
|
207
|
+
encryption_key?: string;
|
|
208
|
+
/** List of entities to detect */
|
|
209
|
+
entities?: string[];
|
|
210
|
+
/** Minimum confidence score for entity detection (0.0-1.0) */
|
|
211
|
+
score_threshold?: number;
|
|
212
|
+
/** Policy name to use for detection configuration (e.g., 'gdpr_eu', 'hipaa_us', 'basic') */
|
|
213
|
+
policy?: string;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Response from encrypt endpoint
|
|
217
|
+
*/
|
|
218
|
+
interface EncryptResponse {
|
|
219
|
+
/** Text with PII encrypted */
|
|
220
|
+
text: string;
|
|
221
|
+
/** List of detected and encrypted entities */
|
|
222
|
+
detected_entities: DetectedEntity[];
|
|
223
|
+
/** Number of entities encrypted */
|
|
224
|
+
entities_count: number;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Response wrapper for batch processing
|
|
228
|
+
*/
|
|
229
|
+
interface BatchResponse {
|
|
230
|
+
/** Array of individual results (or { error: string } for failed items) */
|
|
231
|
+
results: Record<string, unknown>[];
|
|
232
|
+
/** Total number of texts submitted */
|
|
233
|
+
total: number;
|
|
234
|
+
/** Number of texts processed successfully */
|
|
235
|
+
succeeded: number;
|
|
236
|
+
/** Number of texts that failed processing */
|
|
237
|
+
failed: number;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Error response from API
|
|
241
|
+
*/
|
|
242
|
+
interface APIErrorResponse {
|
|
243
|
+
detail?: string;
|
|
244
|
+
message?: string;
|
|
245
|
+
} //#endregion
|
|
246
|
+
//#region src/client.d.ts
|
|
247
|
+
|
|
248
|
+
//# sourceMappingURL=types.d.ts.map
|
|
249
|
+
/**
|
|
250
|
+
* Blindfold client for tokenization and detokenization.
|
|
251
|
+
*
|
|
252
|
+
* When no `apiKey` is provided, all methods run locally using the
|
|
253
|
+
* built-in regex PII scanner. Set `mode: "local"` to force local
|
|
254
|
+
* mode even when an API key is present.
|
|
255
|
+
*/
|
|
256
|
+
declare class Blindfold {
|
|
257
|
+
private apiKey?;
|
|
258
|
+
private baseUrl;
|
|
259
|
+
private userId?;
|
|
260
|
+
private maxRetries;
|
|
261
|
+
private retryDelay;
|
|
262
|
+
private mode?;
|
|
263
|
+
private locales?;
|
|
264
|
+
private policies;
|
|
265
|
+
private _scanner?;
|
|
266
|
+
/**
|
|
267
|
+
* Create a new Blindfold client
|
|
268
|
+
* @param config - Configuration options. Can be omitted entirely for local-only mode.
|
|
269
|
+
*/
|
|
270
|
+
constructor(config?: BlindfoldConfig);
|
|
271
|
+
private get useLocal();
|
|
272
|
+
private getScanner;
|
|
273
|
+
private resolvePolicy;
|
|
274
|
+
private retryWait;
|
|
275
|
+
/**
|
|
276
|
+
* Make an authenticated request to the API
|
|
277
|
+
*/
|
|
278
|
+
private request;
|
|
279
|
+
/**
|
|
280
|
+
* Tokenize text by replacing sensitive information with tokens
|
|
281
|
+
* @param text - Text to tokenize
|
|
282
|
+
* @param config - Optional configuration
|
|
283
|
+
* @returns Promise with tokenized text and mapping
|
|
284
|
+
*/
|
|
285
|
+
tokenize(text: string, config?: TokenizeConfig): Promise<TokenizeResponse>;
|
|
286
|
+
private tokenizeLocal;
|
|
287
|
+
/**
|
|
288
|
+
* Detect PII in text without modifying it
|
|
289
|
+
*
|
|
290
|
+
* Returns only the detected entities with their types, positions,
|
|
291
|
+
* and confidence scores. The original text is not transformed.
|
|
292
|
+
*
|
|
293
|
+
* When no API key is set (or `mode: "local"`), detection runs locally
|
|
294
|
+
* using the built-in regex scanner.
|
|
295
|
+
*
|
|
296
|
+
* @param text - Text to analyze for PII
|
|
297
|
+
* @param config - Optional configuration (entities, score_threshold, policy)
|
|
298
|
+
* @returns Promise with detected entities
|
|
299
|
+
*/
|
|
300
|
+
detect(text: string, config?: DetectConfig): Promise<DetectResponse>;
|
|
301
|
+
private detectLocal;
|
|
302
|
+
/**
|
|
303
|
+
* Detokenize text by replacing tokens with original values
|
|
304
|
+
*
|
|
305
|
+
* This method performs detokenization CLIENT-SIDE for better performance,
|
|
306
|
+
* security, and to work offline. No API call is made.
|
|
307
|
+
*
|
|
308
|
+
* @param text - Tokenized text
|
|
309
|
+
* @param mapping - Token mapping from tokenize response
|
|
310
|
+
* @returns DetokenizeResponse with original text
|
|
311
|
+
*/
|
|
312
|
+
detokenize(text: string, mapping: Record<string, string>): DetokenizeResponse;
|
|
313
|
+
/**
|
|
314
|
+
* Redact (permanently remove) sensitive information from text
|
|
315
|
+
*
|
|
316
|
+
* WARNING: Redaction is irreversible - original data cannot be restored!
|
|
317
|
+
*
|
|
318
|
+
* When no API key is set (or `mode: "local"`), redaction runs locally
|
|
319
|
+
* using the built-in regex scanner, replacing PII with `<Entity Name>` placeholders.
|
|
320
|
+
*
|
|
321
|
+
* @param text - Text to redact
|
|
322
|
+
* @param config - Optional configuration (masking_char, entities)
|
|
323
|
+
* @returns Promise with redacted text and detected entities
|
|
324
|
+
*/
|
|
325
|
+
redact(text: string, config?: RedactConfig): Promise<RedactResponse>;
|
|
326
|
+
private redactLocal;
|
|
327
|
+
/**
|
|
328
|
+
* Mask (partially hide) sensitive information from text
|
|
329
|
+
*
|
|
330
|
+
* @param text - Text to mask
|
|
331
|
+
* @param config - Optional configuration (chars_to_show, from_end, masking_char, entities)
|
|
332
|
+
* @returns Promise with masked text and detected entities
|
|
333
|
+
*/
|
|
334
|
+
mask(text: string, config?: MaskConfig): Promise<MaskResponse>;
|
|
335
|
+
private maskLocal;
|
|
336
|
+
/**
|
|
337
|
+
* Synthesize (replace real data with synthetic fake data)
|
|
338
|
+
*
|
|
339
|
+
* When no API key is set (or `mode: "local"`), synthesis runs locally
|
|
340
|
+
* using format-preserving random generation.
|
|
341
|
+
*
|
|
342
|
+
* @param text - Text to synthesize
|
|
343
|
+
* @param config - Optional configuration (language, entities)
|
|
344
|
+
* @returns Promise with synthetic text and detected entities
|
|
345
|
+
*/
|
|
346
|
+
synthesize(text: string, config?: SynthesizeConfig): Promise<SynthesizeResponse>;
|
|
347
|
+
private synthesizeLocal;
|
|
348
|
+
/**
|
|
349
|
+
* Hash (replace with deterministic hash values)
|
|
350
|
+
*
|
|
351
|
+
* @param text - Text to hash
|
|
352
|
+
* @param config - Optional configuration (hash_type, hash_prefix, hash_length, entities)
|
|
353
|
+
* @returns Promise with hashed text and detected entities
|
|
354
|
+
*/
|
|
355
|
+
hash(text: string, config?: HashConfig): Promise<HashResponse>;
|
|
356
|
+
private hashLocal;
|
|
357
|
+
/**
|
|
358
|
+
* Encrypt (reversibly protect) sensitive data in text using AES encryption
|
|
359
|
+
*
|
|
360
|
+
* @param text - Text to encrypt
|
|
361
|
+
* @param config - Optional configuration (encryption_key, entities)
|
|
362
|
+
* @returns Promise with encrypted text and detected entities
|
|
363
|
+
*/
|
|
364
|
+
encrypt(text: string, config?: EncryptConfig): Promise<EncryptResponse>;
|
|
365
|
+
private encryptLocal;
|
|
366
|
+
/**
|
|
367
|
+
* Tokenize multiple texts in a single request
|
|
368
|
+
* @param texts - Array of texts to tokenize (max 100)
|
|
369
|
+
* @param config - Optional configuration
|
|
370
|
+
* @returns Promise with batch results
|
|
371
|
+
*/
|
|
372
|
+
tokenizeBatch(texts: string[], config?: TokenizeConfig): Promise<BatchResponse>;
|
|
373
|
+
/**
|
|
374
|
+
* Detect PII in multiple texts in a single request
|
|
375
|
+
* @param texts - Array of texts to analyze (max 100)
|
|
376
|
+
* @param config - Optional configuration
|
|
377
|
+
* @returns Promise with batch results
|
|
378
|
+
*/
|
|
379
|
+
detectBatch(texts: string[], config?: DetectConfig): Promise<BatchResponse>;
|
|
380
|
+
/**
|
|
381
|
+
* Redact PII from multiple texts in a single request
|
|
382
|
+
* @param texts - Array of texts to redact (max 100)
|
|
383
|
+
* @param config - Optional configuration
|
|
384
|
+
* @returns Promise with batch results
|
|
385
|
+
*/
|
|
386
|
+
redactBatch(texts: string[], config?: RedactConfig): Promise<BatchResponse>;
|
|
387
|
+
/**
|
|
388
|
+
* Mask PII in multiple texts in a single request
|
|
389
|
+
* @param texts - Array of texts to mask (max 100)
|
|
390
|
+
* @param config - Optional configuration
|
|
391
|
+
* @returns Promise with batch results
|
|
392
|
+
*/
|
|
393
|
+
maskBatch(texts: string[], config?: MaskConfig): Promise<BatchResponse>;
|
|
394
|
+
/**
|
|
395
|
+
* Synthesize multiple texts in a single request
|
|
396
|
+
* @param texts - Array of texts to synthesize (max 100)
|
|
397
|
+
* @param config - Optional configuration
|
|
398
|
+
* @returns Promise with batch results
|
|
399
|
+
*/
|
|
400
|
+
synthesizeBatch(texts: string[], config?: SynthesizeConfig): Promise<BatchResponse>;
|
|
401
|
+
/**
|
|
402
|
+
* Hash PII in multiple texts in a single request
|
|
403
|
+
* @param texts - Array of texts to hash (max 100)
|
|
404
|
+
* @param config - Optional configuration
|
|
405
|
+
* @returns Promise with batch results
|
|
406
|
+
*/
|
|
407
|
+
hashBatch(texts: string[], config?: HashConfig): Promise<BatchResponse>;
|
|
408
|
+
/**
|
|
409
|
+
* Encrypt PII in multiple texts in a single request
|
|
410
|
+
* @param texts - Array of texts to encrypt (max 100)
|
|
411
|
+
* @param config - Optional configuration
|
|
412
|
+
* @returns Promise with batch results
|
|
413
|
+
*/
|
|
414
|
+
encryptBatch(texts: string[], config?: EncryptConfig): Promise<BatchResponse>;
|
|
415
|
+
} //#endregion
|
|
416
|
+
//#region src/errors.d.ts
|
|
417
|
+
|
|
418
|
+
//# sourceMappingURL=client.d.ts.map
|
|
419
|
+
/**
|
|
420
|
+
* Base error class for Blindfold SDK
|
|
421
|
+
*/
|
|
422
|
+
declare class BlindfoldError extends Error {
|
|
423
|
+
constructor(message: string);
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Error thrown when authentication fails
|
|
427
|
+
*/
|
|
428
|
+
declare class AuthenticationError extends BlindfoldError {
|
|
429
|
+
constructor(message?: string);
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Error thrown when API request fails
|
|
433
|
+
*/
|
|
434
|
+
declare class APIError extends BlindfoldError {
|
|
435
|
+
statusCode: number;
|
|
436
|
+
responseBody?: unknown;
|
|
437
|
+
constructor(message: string, statusCode: number, responseBody?: unknown);
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Error thrown when network request fails
|
|
441
|
+
*/
|
|
442
|
+
declare class NetworkError extends BlindfoldError {
|
|
443
|
+
constructor(message?: string);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
//#endregion
|
|
447
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
448
|
+
|
|
449
|
+
export { APIError, APIErrorResponse, AuthenticationError, BatchResponse, Blindfold, BlindfoldConfig, BlindfoldError, DetectConfig, DetectResponse, DetectedEntity, DetokenizeResponse, EntityType, NetworkError, PIIMatch, PIIScanner, TokenizeConfig, TokenizeResponse };
|
|
450
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/client.ts","../src/errors.ts"],"sourcesContent":null,"mappings":";;;;;;;;;UAGiB,eAAA;;;EAAA;;;;EAwBA;;;;EAYA;;;;EAYA;;;;AAUjB;;;;AAgBiB,UAlDA,cAAA,CAkDgB;EAAA;EAAA,QAItB,CAAA,EAAA,MAAA,EAAA;EAAM;EAEkB,eAAA,CAAA,EAAA,MAAA;;;;AAQnC;;;UApDiB,YAAA;EA8DA;;;;EAcA;;;;AAYjB;;UA5EiB,cAAA;;EA8FA,iBAAY,EA5FR,cAgGA,EAAA;;;;AAQrB;;;UAhGiB,cAAA;EA8GA;;;;EAYA;;;;EAkBA;;;;AAYjB;;UAxIiB,gBAAA;;EAsJA,IAAA,EAAA,MAAA;;WAlJN;;EA8JM,iBAAa,EA5JT,cA8JJ,EAAA;;;;AAYjB;;;UAlKiB,kBAAA;;;;;;;;AC5BjB;AAAsB,UDsCL,YAAA,CCtCK;EAAA;EAeoB,YAqLF,CAAA,EAAA,MAAA;EAAc;EAA2B,QAAxB,CAAA,EAAA,MAAA,EAAA;EAAO;EAqCd,eAAW,CAAA,EAAA,MAAA;EAAc;EAAf,MAkCxB,CA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