@quba/sensitive-data-protection 0.1.0 → 0.2.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/README.md +58 -6
- package/dist/index.cjs +2884 -569
- package/dist/index.d.cts +3059 -765
- package/dist/index.d.mts +3059 -765
- package/dist/index.mjs +2574 -535
- package/docs/Action.md +33 -0
- package/docs/AnonymizeFileResponseBody.md +43 -0
- package/docs/AnonymizeRequestBody.md +4 -2
- package/docs/AnonymizeResponseBody.md +3 -1
- package/docs/{AnonymizeResponseBodySpansInner.md → Applied.md} +7 -4
- package/docs/At.md +37 -0
- package/docs/AttributeSegment.md +37 -0
- package/docs/{ValidationErrorLocInner.md → CellKind.md} +5 -4
- package/docs/CellNoteSegment.md +35 -0
- package/docs/CellSegment.md +43 -0
- package/docs/CommentKind.md +33 -0
- package/docs/CommentSegment.md +39 -0
- package/docs/ComponentSegment.md +39 -0
- package/docs/DetectRule.md +3 -1
- package/docs/ElementSegment.md +39 -0
- package/docs/EncryptRule.md +3 -1
- package/docs/{DetectRuleEntitiesInner.md → EndnoteSegment.md} +7 -6
- package/docs/{EntitiesAnyOfInner.md → EntityBody.md} +5 -4
- package/docs/ErrorCode.md +33 -0
- package/docs/ErrorInfo.md +39 -0
- package/docs/FieldError.md +51 -0
- package/docs/FieldErrorCode.md +33 -0
- package/docs/{HTTPValidationError.md → FieldErrorPathInner.md} +5 -6
- package/docs/FieldSegment.md +39 -0
- package/docs/FileAttributeResult.md +47 -0
- package/docs/FileEmbeddedResult.md +43 -0
- package/docs/FileModelResult.md +49 -0
- package/docs/{AnonymizeResponseBodyResultsInner.md → FileRegexResult.md} +11 -8
- package/docs/FileResult.md +51 -0
- package/docs/FootnoteSegment.md +37 -0
- package/docs/FrameSegment.md +37 -0
- package/docs/HMACRule.md +43 -0
- package/docs/HeaderFooterSegment.md +37 -0
- package/docs/IndexSegment.md +37 -0
- package/docs/ItemSegment.md +37 -0
- package/docs/KeySegment.md +37 -0
- package/docs/Kind.md +33 -0
- package/docs/LineSegment.md +39 -0
- package/docs/MaskRule.md +3 -1
- package/docs/ModelError.md +2 -3
- package/docs/ModelResult.md +2 -0
- package/docs/ModelStatus.md +45 -0
- package/docs/{Entities.md → ModelType.md} +5 -4
- package/docs/ParagraphKind.md +33 -0
- package/docs/ParagraphSegment.md +39 -0
- package/docs/PartSegment.md +39 -0
- package/docs/PathSegment.md +79 -0
- package/docs/PolicyDocumentRulesInner.md +7 -1
- package/docs/{ValidationError.md → PropertySegment.md} +7 -12
- package/docs/PseudonymizeRule.md +41 -0
- package/docs/RangeKind.md +33 -0
- package/docs/RangeSegment.md +39 -0
- package/docs/RedactRule.md +3 -1
- package/docs/Refusal.md +36 -0
- package/docs/RegexResult.md +2 -0
- package/docs/RegionSegment.md +43 -0
- package/docs/ReplaceRule.md +3 -1
- package/docs/{AnonymizeRequestBodyRulesInner.md → RuleBody.md} +12 -5
- package/docs/SHA256Rule.md +3 -1
- package/docs/SHA512Rule.md +3 -1
- package/docs/ScanRequestBody.md +2 -0
- package/docs/ScanResponseBody.md +2 -0
- package/docs/SegmentSegment.md +39 -0
- package/docs/SensitiveDataProtectionApi.md +160 -3
- package/docs/ShapeKind.md +33 -0
- package/docs/ShapeSegment.md +41 -0
- package/docs/SheetSegment.md +39 -0
- package/docs/SlideSegment.md +41 -0
- package/docs/SpeakerNotesSegment.md +41 -0
- package/docs/TableSegment.md +37 -0
- package/docs/TagSegment.md +41 -0
- package/docs/TextSegment.md +39 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/runtime.ts
|
|
2
2
|
/**
|
|
3
3
|
* Sensitive Data Protection API
|
|
4
|
-
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, hash, or encrypt).
|
|
4
|
+
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, pseudonymize, hash, or encrypt).
|
|
5
5
|
*
|
|
6
6
|
* The version of the OpenAPI document: 0.1.0
|
|
7
7
|
*
|
|
@@ -263,392 +263,437 @@ var TextApiResponse = class {
|
|
|
263
263
|
};
|
|
264
264
|
|
|
265
265
|
//#endregion
|
|
266
|
-
//#region src/models/
|
|
266
|
+
//#region src/models/Action.ts
|
|
267
267
|
/**
|
|
268
|
-
*
|
|
268
|
+
* Sensitive Data Protection API
|
|
269
|
+
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, pseudonymize, hash, or encrypt).
|
|
270
|
+
*
|
|
271
|
+
* The version of the OpenAPI document: 0.1.0
|
|
272
|
+
*
|
|
273
|
+
*
|
|
274
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
275
|
+
* https://openapi-generator.tech
|
|
276
|
+
* Do not edit the class manually.
|
|
269
277
|
*/
|
|
270
|
-
const DetectRuleEntitiesInnerTypeEnum = {
|
|
271
|
-
model: "model",
|
|
272
|
-
regex: "regex"
|
|
273
|
-
};
|
|
274
278
|
/**
|
|
275
|
-
*
|
|
279
|
+
* What the browser extension does with a match, before the text is sent.
|
|
280
|
+
* `warn`: highlighted; the user may send it as it is. `enforce`: replaced
|
|
281
|
+
* with the rule's transformation before sending; sending is blocked when it
|
|
282
|
+
* can't be.
|
|
283
|
+
* @export
|
|
276
284
|
*/
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
285
|
+
const Action = {
|
|
286
|
+
warn: "warn",
|
|
287
|
+
enforce: "enforce"
|
|
288
|
+
};
|
|
289
|
+
function instanceOfAction(value) {
|
|
290
|
+
for (const key in Action) if (Object.prototype.hasOwnProperty.call(Action, key)) {
|
|
291
|
+
if (Action[key] === value) return true;
|
|
292
|
+
}
|
|
293
|
+
return false;
|
|
280
294
|
}
|
|
281
|
-
function
|
|
282
|
-
return
|
|
295
|
+
function ActionFromJSON(json) {
|
|
296
|
+
return ActionFromJSONTyped(json, false);
|
|
283
297
|
}
|
|
284
|
-
function
|
|
285
|
-
|
|
286
|
-
return {
|
|
287
|
-
"type": json["type"] == null ? void 0 : json["type"],
|
|
288
|
-
"value": json["value"]
|
|
289
|
-
};
|
|
298
|
+
function ActionFromJSONTyped(json, ignoreDiscriminator) {
|
|
299
|
+
return json;
|
|
290
300
|
}
|
|
291
|
-
function
|
|
292
|
-
return
|
|
301
|
+
function ActionToJSON(value) {
|
|
302
|
+
return value;
|
|
293
303
|
}
|
|
294
|
-
function
|
|
295
|
-
|
|
296
|
-
return {
|
|
297
|
-
"type": value["type"],
|
|
298
|
-
"value": value["value"]
|
|
299
|
-
};
|
|
304
|
+
function ActionToJSONTyped(value, ignoreDiscriminator) {
|
|
305
|
+
return value;
|
|
300
306
|
}
|
|
301
307
|
|
|
302
308
|
//#endregion
|
|
303
|
-
//#region src/models/
|
|
304
|
-
/**
|
|
305
|
-
* @export
|
|
306
|
-
*/
|
|
307
|
-
const AnonymizeRequestBodyRulesInnerTypeEnum = {
|
|
308
|
-
replace: "replace",
|
|
309
|
-
redact: "redact",
|
|
310
|
-
sha256: "sha256",
|
|
311
|
-
sha512: "sha512",
|
|
312
|
-
encrypt: "encrypt",
|
|
313
|
-
mask: "mask",
|
|
314
|
-
detect: "detect"
|
|
315
|
-
};
|
|
309
|
+
//#region src/models/Usage.ts
|
|
316
310
|
/**
|
|
317
|
-
* Check if a given object implements the
|
|
311
|
+
* Check if a given object implements the Usage interface.
|
|
318
312
|
*/
|
|
319
|
-
function
|
|
320
|
-
if (!("
|
|
313
|
+
function instanceOfUsage(value) {
|
|
314
|
+
if (!("input_tokens" in value) || value["input_tokens"] === void 0) return false;
|
|
315
|
+
if (!("inference_ms" in value) || value["inference_ms"] === void 0) return false;
|
|
321
316
|
return true;
|
|
322
317
|
}
|
|
323
|
-
function
|
|
324
|
-
return
|
|
318
|
+
function UsageFromJSON(json) {
|
|
319
|
+
return UsageFromJSONTyped(json, false);
|
|
325
320
|
}
|
|
326
|
-
function
|
|
321
|
+
function UsageFromJSONTyped(json, ignoreDiscriminator) {
|
|
327
322
|
if (json == null) return json;
|
|
328
323
|
return {
|
|
329
|
-
"
|
|
330
|
-
"
|
|
331
|
-
"replacement": json["replacement"] == null ? void 0 : json["replacement"],
|
|
332
|
-
"key": json["key"] == null ? void 0 : json["key"],
|
|
333
|
-
"masking_char": json["masking_char"] == null ? void 0 : json["masking_char"],
|
|
334
|
-
"chars_to_mask": json["chars_to_mask"] == null ? void 0 : json["chars_to_mask"],
|
|
335
|
-
"from_end": json["from_end"] == null ? void 0 : json["from_end"]
|
|
324
|
+
"input_tokens": json["input_tokens"],
|
|
325
|
+
"inference_ms": json["inference_ms"]
|
|
336
326
|
};
|
|
337
327
|
}
|
|
338
|
-
function
|
|
339
|
-
return
|
|
328
|
+
function UsageToJSON(json) {
|
|
329
|
+
return UsageToJSONTyped(json, false);
|
|
340
330
|
}
|
|
341
|
-
function
|
|
331
|
+
function UsageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
342
332
|
if (value == null) return value;
|
|
343
333
|
return {
|
|
344
|
-
"
|
|
345
|
-
"
|
|
346
|
-
"replacement": value["replacement"],
|
|
347
|
-
"key": value["key"],
|
|
348
|
-
"masking_char": value["masking_char"],
|
|
349
|
-
"chars_to_mask": value["chars_to_mask"],
|
|
350
|
-
"from_end": value["from_end"]
|
|
334
|
+
"input_tokens": value["input_tokens"],
|
|
335
|
+
"inference_ms": value["inference_ms"]
|
|
351
336
|
};
|
|
352
337
|
}
|
|
353
338
|
|
|
354
339
|
//#endregion
|
|
355
|
-
//#region src/models/
|
|
340
|
+
//#region src/models/FileAttributeResult.ts
|
|
356
341
|
/**
|
|
357
|
-
*
|
|
342
|
+
* @export
|
|
358
343
|
*/
|
|
359
|
-
|
|
360
|
-
|
|
344
|
+
const FileAttributeResultTypeEnum = { attribute: "attribute" };
|
|
345
|
+
/**
|
|
346
|
+
* Check if a given object implements the FileAttributeResult interface.
|
|
347
|
+
*/
|
|
348
|
+
function instanceOfFileAttributeResult(value) {
|
|
349
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
350
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
351
|
+
if (!("rule" in value) || value["rule"] === void 0) return false;
|
|
352
|
+
if (!("input" in value) || value["input"] === void 0) return false;
|
|
353
|
+
if (!("output" in value) || value["output"] === void 0) return false;
|
|
354
|
+
if (!("path" in value) || value["path"] === void 0) return false;
|
|
361
355
|
return true;
|
|
362
356
|
}
|
|
363
|
-
function
|
|
364
|
-
return
|
|
357
|
+
function FileAttributeResultFromJSON(json) {
|
|
358
|
+
return FileAttributeResultFromJSONTyped(json, false);
|
|
365
359
|
}
|
|
366
|
-
function
|
|
360
|
+
function FileAttributeResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
367
361
|
if (json == null) return json;
|
|
368
362
|
return {
|
|
369
|
-
"
|
|
370
|
-
"
|
|
371
|
-
"
|
|
363
|
+
"type": json["type"],
|
|
364
|
+
"id": json["id"],
|
|
365
|
+
"rule": json["rule"],
|
|
366
|
+
"input": json["input"],
|
|
367
|
+
"output": json["output"],
|
|
368
|
+
"content_type": json["content_type"] == null ? void 0 : json["content_type"],
|
|
369
|
+
"path": json["path"]
|
|
372
370
|
};
|
|
373
371
|
}
|
|
374
|
-
function
|
|
375
|
-
return
|
|
372
|
+
function FileAttributeResultToJSON(json) {
|
|
373
|
+
return FileAttributeResultToJSONTyped(json, false);
|
|
376
374
|
}
|
|
377
|
-
function
|
|
375
|
+
function FileAttributeResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
378
376
|
if (value == null) return value;
|
|
379
377
|
return {
|
|
380
|
-
"
|
|
381
|
-
"
|
|
382
|
-
"
|
|
378
|
+
"type": value["type"],
|
|
379
|
+
"id": value["id"],
|
|
380
|
+
"rule": value["rule"],
|
|
381
|
+
"input": value["input"],
|
|
382
|
+
"output": value["output"],
|
|
383
|
+
"content_type": value["content_type"],
|
|
384
|
+
"path": value["path"]
|
|
383
385
|
};
|
|
384
386
|
}
|
|
385
387
|
|
|
386
388
|
//#endregion
|
|
387
|
-
//#region src/models/
|
|
389
|
+
//#region src/models/FileEmbeddedResult.ts
|
|
388
390
|
/**
|
|
389
|
-
*
|
|
391
|
+
* @export
|
|
390
392
|
*/
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
393
|
+
const FileEmbeddedResultTypeEnum = { embedded: "embedded" };
|
|
394
|
+
/**
|
|
395
|
+
* Check if a given object implements the FileEmbeddedResult interface.
|
|
396
|
+
*/
|
|
397
|
+
function instanceOfFileEmbeddedResult(value) {
|
|
398
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
399
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
400
|
+
if (!("rule" in value) || value["rule"] === void 0) return false;
|
|
401
|
+
if (!("content_type" in value) || value["content_type"] === void 0) return false;
|
|
402
|
+
if (!("path" in value) || value["path"] === void 0) return false;
|
|
394
403
|
return true;
|
|
395
404
|
}
|
|
396
|
-
function
|
|
397
|
-
return
|
|
405
|
+
function FileEmbeddedResultFromJSON(json) {
|
|
406
|
+
return FileEmbeddedResultFromJSONTyped(json, false);
|
|
398
407
|
}
|
|
399
|
-
function
|
|
408
|
+
function FileEmbeddedResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
400
409
|
if (json == null) return json;
|
|
401
410
|
return {
|
|
402
|
-
"
|
|
403
|
-
"
|
|
411
|
+
"type": json["type"],
|
|
412
|
+
"id": json["id"],
|
|
413
|
+
"rule": json["rule"],
|
|
414
|
+
"content_type": json["content_type"],
|
|
415
|
+
"path": json["path"]
|
|
404
416
|
};
|
|
405
417
|
}
|
|
406
|
-
function
|
|
407
|
-
return
|
|
418
|
+
function FileEmbeddedResultToJSON(json) {
|
|
419
|
+
return FileEmbeddedResultToJSONTyped(json, false);
|
|
408
420
|
}
|
|
409
|
-
function
|
|
421
|
+
function FileEmbeddedResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
410
422
|
if (value == null) return value;
|
|
411
423
|
return {
|
|
412
|
-
"
|
|
413
|
-
"
|
|
424
|
+
"type": value["type"],
|
|
425
|
+
"id": value["id"],
|
|
426
|
+
"rule": value["rule"],
|
|
427
|
+
"content_type": value["content_type"],
|
|
428
|
+
"path": value["path"]
|
|
414
429
|
};
|
|
415
430
|
}
|
|
416
431
|
|
|
417
432
|
//#endregion
|
|
418
|
-
//#region src/models/
|
|
433
|
+
//#region src/models/FileModelResult.ts
|
|
419
434
|
/**
|
|
420
|
-
*
|
|
435
|
+
* @export
|
|
421
436
|
*/
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
437
|
+
const FileModelResultTypeEnum = { model: "model" };
|
|
438
|
+
/**
|
|
439
|
+
* Check if a given object implements the FileModelResult interface.
|
|
440
|
+
*/
|
|
441
|
+
function instanceOfFileModelResult(value) {
|
|
442
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
443
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
444
|
+
if (!("rule" in value) || value["rule"] === void 0) return false;
|
|
425
445
|
if (!("value" in value) || value["value"] === void 0) return false;
|
|
446
|
+
if (!("score" in value) || value["score"] === void 0) return false;
|
|
447
|
+
if (!("input" in value) || value["input"] === void 0) return false;
|
|
448
|
+
if (!("output" in value) || value["output"] === void 0) return false;
|
|
449
|
+
if (!("path" in value) || value["path"] === void 0) return false;
|
|
426
450
|
return true;
|
|
427
451
|
}
|
|
428
|
-
function
|
|
429
|
-
return
|
|
452
|
+
function FileModelResultFromJSON(json) {
|
|
453
|
+
return FileModelResultFromJSONTyped(json, false);
|
|
430
454
|
}
|
|
431
|
-
function
|
|
455
|
+
function FileModelResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
432
456
|
if (json == null) return json;
|
|
433
457
|
return {
|
|
434
|
-
"
|
|
435
|
-
"
|
|
436
|
-
"
|
|
458
|
+
"type": json["type"],
|
|
459
|
+
"id": json["id"],
|
|
460
|
+
"rule": json["rule"],
|
|
461
|
+
"value": json["value"],
|
|
462
|
+
"score": json["score"],
|
|
463
|
+
"input": json["input"],
|
|
464
|
+
"output": json["output"],
|
|
465
|
+
"path": json["path"]
|
|
437
466
|
};
|
|
438
467
|
}
|
|
439
|
-
function
|
|
440
|
-
return
|
|
468
|
+
function FileModelResultToJSON(json) {
|
|
469
|
+
return FileModelResultToJSONTyped(json, false);
|
|
441
470
|
}
|
|
442
|
-
function
|
|
471
|
+
function FileModelResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
443
472
|
if (value == null) return value;
|
|
444
473
|
return {
|
|
445
|
-
"
|
|
446
|
-
"
|
|
447
|
-
"
|
|
474
|
+
"type": value["type"],
|
|
475
|
+
"id": value["id"],
|
|
476
|
+
"rule": value["rule"],
|
|
477
|
+
"value": value["value"],
|
|
478
|
+
"score": value["score"],
|
|
479
|
+
"input": value["input"],
|
|
480
|
+
"output": value["output"],
|
|
481
|
+
"path": value["path"]
|
|
448
482
|
};
|
|
449
483
|
}
|
|
450
484
|
|
|
451
485
|
//#endregion
|
|
452
|
-
//#region src/models/
|
|
486
|
+
//#region src/models/FileRegexResult.ts
|
|
453
487
|
/**
|
|
454
488
|
* @export
|
|
455
489
|
*/
|
|
456
|
-
const
|
|
457
|
-
model: "model",
|
|
458
|
-
regex: "regex"
|
|
459
|
-
};
|
|
490
|
+
const FileRegexResultTypeEnum = { regex: "regex" };
|
|
460
491
|
/**
|
|
461
|
-
* Check if a given object implements the
|
|
492
|
+
* Check if a given object implements the FileRegexResult interface.
|
|
462
493
|
*/
|
|
463
|
-
function
|
|
494
|
+
function instanceOfFileRegexResult(value) {
|
|
495
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
496
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
464
497
|
if (!("rule" in value) || value["rule"] === void 0) return false;
|
|
465
498
|
if (!("value" in value) || value["value"] === void 0) return false;
|
|
466
499
|
if (!("input" in value) || value["input"] === void 0) return false;
|
|
467
500
|
if (!("output" in value) || value["output"] === void 0) return false;
|
|
501
|
+
if (!("path" in value) || value["path"] === void 0) return false;
|
|
468
502
|
return true;
|
|
469
503
|
}
|
|
470
|
-
function
|
|
471
|
-
return
|
|
504
|
+
function FileRegexResultFromJSON(json) {
|
|
505
|
+
return FileRegexResultFromJSONTyped(json, false);
|
|
472
506
|
}
|
|
473
|
-
function
|
|
507
|
+
function FileRegexResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
474
508
|
if (json == null) return json;
|
|
475
509
|
return {
|
|
476
|
-
"type": json["type"]
|
|
510
|
+
"type": json["type"],
|
|
511
|
+
"id": json["id"],
|
|
477
512
|
"rule": json["rule"],
|
|
478
513
|
"value": json["value"],
|
|
479
|
-
"input":
|
|
480
|
-
"output":
|
|
481
|
-
"
|
|
514
|
+
"input": json["input"],
|
|
515
|
+
"output": json["output"],
|
|
516
|
+
"path": json["path"]
|
|
482
517
|
};
|
|
483
518
|
}
|
|
484
|
-
function
|
|
485
|
-
return
|
|
519
|
+
function FileRegexResultToJSON(json) {
|
|
520
|
+
return FileRegexResultToJSONTyped(json, false);
|
|
486
521
|
}
|
|
487
|
-
function
|
|
522
|
+
function FileRegexResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
488
523
|
if (value == null) return value;
|
|
489
524
|
return {
|
|
490
525
|
"type": value["type"],
|
|
526
|
+
"id": value["id"],
|
|
491
527
|
"rule": value["rule"],
|
|
492
528
|
"value": value["value"],
|
|
493
|
-
"input":
|
|
494
|
-
"output":
|
|
495
|
-
"
|
|
529
|
+
"input": value["input"],
|
|
530
|
+
"output": value["output"],
|
|
531
|
+
"path": value["path"]
|
|
496
532
|
};
|
|
497
533
|
}
|
|
498
534
|
|
|
499
535
|
//#endregion
|
|
500
|
-
//#region src/models/
|
|
536
|
+
//#region src/models/FileResult.ts
|
|
537
|
+
function FileResultFromJSON(json) {
|
|
538
|
+
return FileResultFromJSONTyped(json, false);
|
|
539
|
+
}
|
|
540
|
+
function FileResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
541
|
+
if (json == null) return json;
|
|
542
|
+
switch (json["type"]) {
|
|
543
|
+
case "attribute": return Object.assign({}, FileAttributeResultFromJSONTyped(json, true), { type: "attribute" });
|
|
544
|
+
case "embedded": return Object.assign({}, FileEmbeddedResultFromJSONTyped(json, true), { type: "embedded" });
|
|
545
|
+
case "model": return Object.assign({}, FileModelResultFromJSONTyped(json, true), { type: "model" });
|
|
546
|
+
case "regex": return Object.assign({}, FileRegexResultFromJSONTyped(json, true), { type: "regex" });
|
|
547
|
+
default: return json;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
function FileResultToJSON(json) {
|
|
551
|
+
return FileResultToJSONTyped(json, false);
|
|
552
|
+
}
|
|
553
|
+
function FileResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
554
|
+
if (value == null) return value;
|
|
555
|
+
switch (value["type"]) {
|
|
556
|
+
case "attribute": return Object.assign({}, FileAttributeResultToJSON(value), { type: "attribute" });
|
|
557
|
+
case "embedded": return Object.assign({}, FileEmbeddedResultToJSON(value), { type: "embedded" });
|
|
558
|
+
case "model": return Object.assign({}, FileModelResultToJSON(value), { type: "model" });
|
|
559
|
+
case "regex": return Object.assign({}, FileRegexResultToJSON(value), { type: "regex" });
|
|
560
|
+
default: return value;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
//#endregion
|
|
565
|
+
//#region src/models/AnonymizeFileResponseBody.ts
|
|
501
566
|
/**
|
|
502
|
-
* Check if a given object implements the
|
|
567
|
+
* Check if a given object implements the AnonymizeFileResponseBody interface.
|
|
503
568
|
*/
|
|
504
|
-
function
|
|
505
|
-
if (!("text" in value) || value["text"] === void 0) return false;
|
|
569
|
+
function instanceOfAnonymizeFileResponseBody(value) {
|
|
506
570
|
if (!("usage" in value) || value["usage"] === void 0) return false;
|
|
571
|
+
if (!("models" in value) || value["models"] === void 0) return false;
|
|
572
|
+
if (!("format" in value) || value["format"] === void 0) return false;
|
|
573
|
+
if (!("results" in value) || value["results"] === void 0) return false;
|
|
574
|
+
if (!("file" in value) || value["file"] === void 0) return false;
|
|
507
575
|
return true;
|
|
508
576
|
}
|
|
509
|
-
function
|
|
510
|
-
return
|
|
577
|
+
function AnonymizeFileResponseBodyFromJSON(json) {
|
|
578
|
+
return AnonymizeFileResponseBodyFromJSONTyped(json, false);
|
|
511
579
|
}
|
|
512
|
-
function
|
|
580
|
+
function AnonymizeFileResponseBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
513
581
|
if (json == null) return json;
|
|
514
582
|
return {
|
|
515
|
-
"
|
|
516
|
-
"
|
|
517
|
-
"
|
|
583
|
+
"usage": UsageFromJSON(json["usage"]),
|
|
584
|
+
"models": json["models"],
|
|
585
|
+
"format": json["format"],
|
|
586
|
+
"results": json["results"].map(FileResultFromJSON),
|
|
587
|
+
"file": json["file"]
|
|
518
588
|
};
|
|
519
589
|
}
|
|
520
|
-
function
|
|
521
|
-
return
|
|
590
|
+
function AnonymizeFileResponseBodyToJSON(json) {
|
|
591
|
+
return AnonymizeFileResponseBodyToJSONTyped(json, false);
|
|
522
592
|
}
|
|
523
|
-
function
|
|
593
|
+
function AnonymizeFileResponseBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
524
594
|
if (value == null) return value;
|
|
525
595
|
return {
|
|
526
|
-
"
|
|
527
|
-
"
|
|
528
|
-
"
|
|
596
|
+
"usage": UsageToJSON(value["usage"]),
|
|
597
|
+
"models": value["models"],
|
|
598
|
+
"format": value["format"],
|
|
599
|
+
"results": value["results"].map(FileResultToJSON),
|
|
600
|
+
"file": value["file"]
|
|
529
601
|
};
|
|
530
602
|
}
|
|
531
603
|
|
|
532
604
|
//#endregion
|
|
533
|
-
//#region src/models/
|
|
605
|
+
//#region src/models/ModelEntity.ts
|
|
534
606
|
/**
|
|
535
607
|
* @export
|
|
536
608
|
*/
|
|
537
|
-
const
|
|
538
|
-
detect: "detect",
|
|
539
|
-
redact: "redact",
|
|
540
|
-
replace: "replace",
|
|
541
|
-
mask: "mask",
|
|
542
|
-
sha256: "sha256",
|
|
543
|
-
sha512: "sha512",
|
|
544
|
-
encrypt: "encrypt"
|
|
545
|
-
};
|
|
609
|
+
const ModelEntityTypeEnum = { model: "model" };
|
|
546
610
|
/**
|
|
547
|
-
* Check if a given object implements the
|
|
611
|
+
* Check if a given object implements the ModelEntity interface.
|
|
548
612
|
*/
|
|
549
|
-
function
|
|
550
|
-
if (!("
|
|
613
|
+
function instanceOfModelEntity(value) {
|
|
614
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
615
|
+
if (!("value" in value) || value["value"] === void 0) return false;
|
|
551
616
|
return true;
|
|
552
617
|
}
|
|
553
|
-
function
|
|
554
|
-
return
|
|
618
|
+
function ModelEntityFromJSON(json) {
|
|
619
|
+
return ModelEntityFromJSONTyped(json, false);
|
|
555
620
|
}
|
|
556
|
-
function
|
|
621
|
+
function ModelEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
557
622
|
if (json == null) return json;
|
|
558
623
|
return {
|
|
559
|
-
"type": json["type"]
|
|
560
|
-
"
|
|
561
|
-
"replacement": json["replacement"] == null ? void 0 : json["replacement"],
|
|
562
|
-
"masking_char": json["masking_char"] == null ? void 0 : json["masking_char"],
|
|
563
|
-
"chars_to_mask": json["chars_to_mask"] == null ? void 0 : json["chars_to_mask"],
|
|
564
|
-
"from_end": json["from_end"] == null ? void 0 : json["from_end"],
|
|
565
|
-
"key": json["key"] == null ? void 0 : json["key"]
|
|
624
|
+
"type": json["type"],
|
|
625
|
+
"value": json["value"]
|
|
566
626
|
};
|
|
567
627
|
}
|
|
568
|
-
function
|
|
569
|
-
return
|
|
628
|
+
function ModelEntityToJSON(json) {
|
|
629
|
+
return ModelEntityToJSONTyped(json, false);
|
|
570
630
|
}
|
|
571
|
-
function
|
|
631
|
+
function ModelEntityToJSONTyped(value, ignoreDiscriminator = false) {
|
|
572
632
|
if (value == null) return value;
|
|
573
633
|
return {
|
|
574
634
|
"type": value["type"],
|
|
575
|
-
"
|
|
576
|
-
"replacement": value["replacement"],
|
|
577
|
-
"masking_char": value["masking_char"],
|
|
578
|
-
"chars_to_mask": value["chars_to_mask"],
|
|
579
|
-
"from_end": value["from_end"],
|
|
580
|
-
"key": value["key"]
|
|
635
|
+
"value": value["value"]
|
|
581
636
|
};
|
|
582
637
|
}
|
|
583
638
|
|
|
584
639
|
//#endregion
|
|
585
|
-
//#region src/models/
|
|
640
|
+
//#region src/models/RegexEntity.ts
|
|
586
641
|
/**
|
|
587
642
|
* @export
|
|
588
643
|
*/
|
|
589
|
-
const
|
|
644
|
+
const RegexEntityTypeEnum = { regex: "regex" };
|
|
590
645
|
/**
|
|
591
|
-
* Check if a given object implements the
|
|
646
|
+
* Check if a given object implements the RegexEntity interface.
|
|
592
647
|
*/
|
|
593
|
-
function
|
|
594
|
-
if (!("
|
|
595
|
-
if (!("
|
|
648
|
+
function instanceOfRegexEntity(value) {
|
|
649
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
650
|
+
if (!("value" in value) || value["value"] === void 0) return false;
|
|
596
651
|
return true;
|
|
597
652
|
}
|
|
598
|
-
function
|
|
599
|
-
return
|
|
653
|
+
function RegexEntityFromJSON(json) {
|
|
654
|
+
return RegexEntityFromJSONTyped(json, false);
|
|
600
655
|
}
|
|
601
|
-
function
|
|
656
|
+
function RegexEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
602
657
|
if (json == null) return json;
|
|
603
658
|
return {
|
|
604
|
-
"
|
|
605
|
-
"
|
|
606
|
-
"confidence_threshold": json["confidence_threshold"] == null ? void 0 : json["confidence_threshold"],
|
|
607
|
-
"rules": json["rules"].map(PolicyDocumentRulesInnerFromJSON)
|
|
659
|
+
"type": json["type"],
|
|
660
|
+
"value": json["value"]
|
|
608
661
|
};
|
|
609
662
|
}
|
|
610
|
-
function
|
|
611
|
-
return
|
|
663
|
+
function RegexEntityToJSON(json) {
|
|
664
|
+
return RegexEntityToJSONTyped(json, false);
|
|
612
665
|
}
|
|
613
|
-
function
|
|
666
|
+
function RegexEntityToJSONTyped(value, ignoreDiscriminator = false) {
|
|
614
667
|
if (value == null) return value;
|
|
615
668
|
return {
|
|
616
|
-
"
|
|
617
|
-
"
|
|
618
|
-
"confidence_threshold": value["confidence_threshold"],
|
|
619
|
-
"rules": value["rules"].map(PolicyDocumentRulesInnerToJSON)
|
|
669
|
+
"type": value["type"],
|
|
670
|
+
"value": value["value"]
|
|
620
671
|
};
|
|
621
672
|
}
|
|
622
673
|
|
|
623
674
|
//#endregion
|
|
624
|
-
//#region src/models/
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
*/
|
|
628
|
-
function instanceOfCreatePolicyRequest(value) {
|
|
629
|
-
if (!("name" in value) || value["name"] === void 0) return false;
|
|
630
|
-
if (!("document" in value) || value["document"] === void 0) return false;
|
|
631
|
-
return true;
|
|
675
|
+
//#region src/models/EntityBody.ts
|
|
676
|
+
function EntityBodyFromJSON(json) {
|
|
677
|
+
return EntityBodyFromJSONTyped(json, false);
|
|
632
678
|
}
|
|
633
|
-
function
|
|
634
|
-
return CreatePolicyRequestFromJSONTyped(json, false);
|
|
635
|
-
}
|
|
636
|
-
function CreatePolicyRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
679
|
+
function EntityBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
637
680
|
if (json == null) return json;
|
|
638
|
-
|
|
639
|
-
"
|
|
640
|
-
"
|
|
641
|
-
|
|
681
|
+
switch (json["type"]) {
|
|
682
|
+
case "model": return Object.assign({}, ModelEntityFromJSONTyped(json, true), { type: "model" });
|
|
683
|
+
case "regex": return Object.assign({}, RegexEntityFromJSONTyped(json, true), { type: "regex" });
|
|
684
|
+
default: return json;
|
|
685
|
+
}
|
|
642
686
|
}
|
|
643
|
-
function
|
|
644
|
-
return
|
|
687
|
+
function EntityBodyToJSON(json) {
|
|
688
|
+
return EntityBodyToJSONTyped(json, false);
|
|
645
689
|
}
|
|
646
|
-
function
|
|
690
|
+
function EntityBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
647
691
|
if (value == null) return value;
|
|
648
|
-
|
|
649
|
-
"
|
|
650
|
-
"
|
|
651
|
-
|
|
692
|
+
switch (value["type"]) {
|
|
693
|
+
case "model": return Object.assign({}, ModelEntityToJSON(value), { type: "model" });
|
|
694
|
+
case "regex": return Object.assign({}, RegexEntityToJSON(value), { type: "regex" });
|
|
695
|
+
default: return value;
|
|
696
|
+
}
|
|
652
697
|
}
|
|
653
698
|
|
|
654
699
|
//#endregion
|
|
@@ -661,6 +706,7 @@ const DetectRuleTypeEnum = { detect: "detect" };
|
|
|
661
706
|
* Check if a given object implements the DetectRule interface.
|
|
662
707
|
*/
|
|
663
708
|
function instanceOfDetectRule(value) {
|
|
709
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
664
710
|
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
665
711
|
return true;
|
|
666
712
|
}
|
|
@@ -670,8 +716,9 @@ function DetectRuleFromJSON(json) {
|
|
|
670
716
|
function DetectRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
671
717
|
if (json == null) return json;
|
|
672
718
|
return {
|
|
673
|
-
"type": json["type"]
|
|
674
|
-
"entities": json["entities"].map(
|
|
719
|
+
"type": json["type"],
|
|
720
|
+
"entities": json["entities"].map(EntityBodyFromJSON),
|
|
721
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
|
|
675
722
|
};
|
|
676
723
|
}
|
|
677
724
|
function DetectRuleToJSON(json) {
|
|
@@ -681,7 +728,8 @@ function DetectRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
681
728
|
if (value == null) return value;
|
|
682
729
|
return {
|
|
683
730
|
"type": value["type"],
|
|
684
|
-
"entities": value["entities"].map(
|
|
731
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
732
|
+
"action": ActionToJSON(value["action"])
|
|
685
733
|
};
|
|
686
734
|
}
|
|
687
735
|
|
|
@@ -695,6 +743,7 @@ const EncryptRuleTypeEnum = { encrypt: "encrypt" };
|
|
|
695
743
|
* Check if a given object implements the EncryptRule interface.
|
|
696
744
|
*/
|
|
697
745
|
function instanceOfEncryptRule(value) {
|
|
746
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
698
747
|
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
699
748
|
return true;
|
|
700
749
|
}
|
|
@@ -704,8 +753,9 @@ function EncryptRuleFromJSON(json) {
|
|
|
704
753
|
function EncryptRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
705
754
|
if (json == null) return json;
|
|
706
755
|
return {
|
|
707
|
-
"type": json["type"]
|
|
708
|
-
"entities": json["entities"].map(
|
|
756
|
+
"type": json["type"],
|
|
757
|
+
"entities": json["entities"].map(EntityBodyFromJSON),
|
|
758
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
|
|
709
759
|
"key": json["key"] == null ? void 0 : json["key"]
|
|
710
760
|
};
|
|
711
761
|
}
|
|
@@ -716,561 +766,2461 @@ function EncryptRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
716
766
|
if (value == null) return value;
|
|
717
767
|
return {
|
|
718
768
|
"type": value["type"],
|
|
719
|
-
"entities": value["entities"].map(
|
|
769
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
770
|
+
"action": ActionToJSON(value["action"]),
|
|
720
771
|
"key": value["key"]
|
|
721
772
|
};
|
|
722
773
|
}
|
|
723
774
|
|
|
724
775
|
//#endregion
|
|
725
|
-
//#region src/models/
|
|
776
|
+
//#region src/models/HMACRule.ts
|
|
726
777
|
/**
|
|
727
|
-
*
|
|
778
|
+
* @export
|
|
779
|
+
*/
|
|
780
|
+
const HMACRuleTypeEnum = { hmac: "hmac" };
|
|
781
|
+
/**
|
|
782
|
+
* Check if a given object implements the HMACRule interface.
|
|
728
783
|
*/
|
|
729
|
-
function
|
|
784
|
+
function instanceOfHMACRule(value) {
|
|
785
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
786
|
+
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
787
|
+
if (!("key" in value) || value["key"] === void 0) return false;
|
|
730
788
|
return true;
|
|
731
789
|
}
|
|
732
|
-
function
|
|
733
|
-
return
|
|
790
|
+
function HMACRuleFromJSON(json) {
|
|
791
|
+
return HMACRuleFromJSONTyped(json, false);
|
|
734
792
|
}
|
|
735
|
-
function
|
|
736
|
-
return json;
|
|
793
|
+
function HMACRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
794
|
+
if (json == null) return json;
|
|
795
|
+
return {
|
|
796
|
+
"type": json["type"],
|
|
797
|
+
"entities": json["entities"].map(EntityBodyFromJSON),
|
|
798
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
|
|
799
|
+
"key": json["key"],
|
|
800
|
+
"length": json["length"] == null ? void 0 : json["length"]
|
|
801
|
+
};
|
|
737
802
|
}
|
|
738
|
-
function
|
|
739
|
-
return
|
|
803
|
+
function HMACRuleToJSON(json) {
|
|
804
|
+
return HMACRuleToJSONTyped(json, false);
|
|
740
805
|
}
|
|
741
|
-
function
|
|
742
|
-
return value;
|
|
806
|
+
function HMACRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
807
|
+
if (value == null) return value;
|
|
808
|
+
return {
|
|
809
|
+
"type": value["type"],
|
|
810
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
811
|
+
"action": ActionToJSON(value["action"]),
|
|
812
|
+
"key": value["key"],
|
|
813
|
+
"length": value["length"]
|
|
814
|
+
};
|
|
743
815
|
}
|
|
744
816
|
|
|
745
817
|
//#endregion
|
|
746
|
-
//#region src/models/
|
|
818
|
+
//#region src/models/MaskRule.ts
|
|
819
|
+
/**
|
|
820
|
+
* @export
|
|
821
|
+
*/
|
|
822
|
+
const MaskRuleTypeEnum = { mask: "mask" };
|
|
747
823
|
/**
|
|
748
|
-
* Check if a given object implements the
|
|
824
|
+
* Check if a given object implements the MaskRule interface.
|
|
749
825
|
*/
|
|
750
|
-
function
|
|
751
|
-
if (!("loc" in value) || value["loc"] === void 0) return false;
|
|
752
|
-
if (!("msg" in value) || value["msg"] === void 0) return false;
|
|
826
|
+
function instanceOfMaskRule(value) {
|
|
753
827
|
if (!("type" in value) || value["type"] === void 0) return false;
|
|
828
|
+
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
754
829
|
return true;
|
|
755
830
|
}
|
|
756
|
-
function
|
|
757
|
-
return
|
|
831
|
+
function MaskRuleFromJSON(json) {
|
|
832
|
+
return MaskRuleFromJSONTyped(json, false);
|
|
758
833
|
}
|
|
759
|
-
function
|
|
834
|
+
function MaskRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
760
835
|
if (json == null) return json;
|
|
761
836
|
return {
|
|
762
|
-
"loc": json["loc"].map(ValidationErrorLocInnerFromJSON),
|
|
763
|
-
"msg": json["msg"],
|
|
764
837
|
"type": json["type"],
|
|
765
|
-
"
|
|
766
|
-
"
|
|
838
|
+
"entities": json["entities"].map(EntityBodyFromJSON),
|
|
839
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
|
|
840
|
+
"masking_char": json["masking_char"] == null ? void 0 : json["masking_char"],
|
|
841
|
+
"chars_to_mask": json["chars_to_mask"] == null ? void 0 : json["chars_to_mask"],
|
|
842
|
+
"from_end": json["from_end"] == null ? void 0 : json["from_end"]
|
|
767
843
|
};
|
|
768
844
|
}
|
|
769
|
-
function
|
|
770
|
-
return
|
|
845
|
+
function MaskRuleToJSON(json) {
|
|
846
|
+
return MaskRuleToJSONTyped(json, false);
|
|
771
847
|
}
|
|
772
|
-
function
|
|
848
|
+
function MaskRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
773
849
|
if (value == null) return value;
|
|
774
850
|
return {
|
|
775
|
-
"loc": value["loc"].map(ValidationErrorLocInnerToJSON),
|
|
776
|
-
"msg": value["msg"],
|
|
777
851
|
"type": value["type"],
|
|
778
|
-
"
|
|
779
|
-
"
|
|
852
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
853
|
+
"action": ActionToJSON(value["action"]),
|
|
854
|
+
"masking_char": value["masking_char"],
|
|
855
|
+
"chars_to_mask": value["chars_to_mask"],
|
|
856
|
+
"from_end": value["from_end"]
|
|
780
857
|
};
|
|
781
858
|
}
|
|
782
859
|
|
|
783
860
|
//#endregion
|
|
784
|
-
//#region src/models/
|
|
861
|
+
//#region src/models/PseudonymizeRule.ts
|
|
862
|
+
/**
|
|
863
|
+
* @export
|
|
864
|
+
*/
|
|
865
|
+
const PseudonymizeRuleTypeEnum = { pseudonymize: "pseudonymize" };
|
|
785
866
|
/**
|
|
786
|
-
* Check if a given object implements the
|
|
867
|
+
* Check if a given object implements the PseudonymizeRule interface.
|
|
787
868
|
*/
|
|
788
|
-
function
|
|
869
|
+
function instanceOfPseudonymizeRule(value) {
|
|
870
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
871
|
+
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
789
872
|
return true;
|
|
790
873
|
}
|
|
791
|
-
function
|
|
792
|
-
return
|
|
874
|
+
function PseudonymizeRuleFromJSON(json) {
|
|
875
|
+
return PseudonymizeRuleFromJSONTyped(json, false);
|
|
793
876
|
}
|
|
794
|
-
function
|
|
877
|
+
function PseudonymizeRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
795
878
|
if (json == null) return json;
|
|
796
|
-
return {
|
|
879
|
+
return {
|
|
880
|
+
"type": json["type"],
|
|
881
|
+
"entities": json["entities"].map(EntityBodyFromJSON),
|
|
882
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
|
|
883
|
+
"tag": json["tag"] == null ? void 0 : json["tag"]
|
|
884
|
+
};
|
|
797
885
|
}
|
|
798
|
-
function
|
|
799
|
-
return
|
|
886
|
+
function PseudonymizeRuleToJSON(json) {
|
|
887
|
+
return PseudonymizeRuleToJSONTyped(json, false);
|
|
800
888
|
}
|
|
801
|
-
function
|
|
889
|
+
function PseudonymizeRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
802
890
|
if (value == null) return value;
|
|
803
|
-
return {
|
|
891
|
+
return {
|
|
892
|
+
"type": value["type"],
|
|
893
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
894
|
+
"action": ActionToJSON(value["action"]),
|
|
895
|
+
"tag": value["tag"]
|
|
896
|
+
};
|
|
804
897
|
}
|
|
805
898
|
|
|
806
899
|
//#endregion
|
|
807
|
-
//#region src/models/
|
|
900
|
+
//#region src/models/RedactRule.ts
|
|
808
901
|
/**
|
|
809
|
-
*
|
|
902
|
+
* @export
|
|
810
903
|
*/
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
if (!("
|
|
904
|
+
const RedactRuleTypeEnum = { redact: "redact" };
|
|
905
|
+
/**
|
|
906
|
+
* Check if a given object implements the RedactRule interface.
|
|
907
|
+
*/
|
|
908
|
+
function instanceOfRedactRule(value) {
|
|
909
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
910
|
+
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
817
911
|
return true;
|
|
818
912
|
}
|
|
819
|
-
function
|
|
820
|
-
return
|
|
913
|
+
function RedactRuleFromJSON(json) {
|
|
914
|
+
return RedactRuleFromJSONTyped(json, false);
|
|
821
915
|
}
|
|
822
|
-
function
|
|
916
|
+
function RedactRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
823
917
|
if (json == null) return json;
|
|
824
918
|
return {
|
|
825
|
-
"
|
|
826
|
-
"
|
|
827
|
-
"
|
|
828
|
-
"createdAt": json["createdAt"],
|
|
829
|
-
"updatedAt": json["updatedAt"]
|
|
919
|
+
"type": json["type"],
|
|
920
|
+
"entities": json["entities"].map(EntityBodyFromJSON),
|
|
921
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
|
|
830
922
|
};
|
|
831
923
|
}
|
|
832
|
-
function
|
|
833
|
-
return
|
|
924
|
+
function RedactRuleToJSON(json) {
|
|
925
|
+
return RedactRuleToJSONTyped(json, false);
|
|
834
926
|
}
|
|
835
|
-
function
|
|
927
|
+
function RedactRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
836
928
|
if (value == null) return value;
|
|
837
929
|
return {
|
|
838
|
-
"
|
|
839
|
-
"
|
|
840
|
-
"
|
|
841
|
-
"createdAt": value["createdAt"],
|
|
842
|
-
"updatedAt": value["updatedAt"]
|
|
930
|
+
"type": value["type"],
|
|
931
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
932
|
+
"action": ActionToJSON(value["action"])
|
|
843
933
|
};
|
|
844
934
|
}
|
|
845
935
|
|
|
846
936
|
//#endregion
|
|
847
|
-
//#region src/models/
|
|
937
|
+
//#region src/models/ReplaceRule.ts
|
|
848
938
|
/**
|
|
849
|
-
*
|
|
939
|
+
* @export
|
|
850
940
|
*/
|
|
851
|
-
|
|
852
|
-
|
|
941
|
+
const ReplaceRuleTypeEnum = { replace: "replace" };
|
|
942
|
+
/**
|
|
943
|
+
* Check if a given object implements the ReplaceRule interface.
|
|
944
|
+
*/
|
|
945
|
+
function instanceOfReplaceRule(value) {
|
|
946
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
947
|
+
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
853
948
|
return true;
|
|
854
949
|
}
|
|
855
|
-
function
|
|
856
|
-
return
|
|
950
|
+
function ReplaceRuleFromJSON(json) {
|
|
951
|
+
return ReplaceRuleFromJSONTyped(json, false);
|
|
857
952
|
}
|
|
858
|
-
function
|
|
953
|
+
function ReplaceRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
859
954
|
if (json == null) return json;
|
|
860
|
-
return {
|
|
955
|
+
return {
|
|
956
|
+
"type": json["type"],
|
|
957
|
+
"entities": json["entities"].map(EntityBodyFromJSON),
|
|
958
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
|
|
959
|
+
"replacement": json["replacement"] == null ? void 0 : json["replacement"]
|
|
960
|
+
};
|
|
861
961
|
}
|
|
862
|
-
function
|
|
863
|
-
return
|
|
962
|
+
function ReplaceRuleToJSON(json) {
|
|
963
|
+
return ReplaceRuleToJSONTyped(json, false);
|
|
864
964
|
}
|
|
865
|
-
function
|
|
965
|
+
function ReplaceRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
866
966
|
if (value == null) return value;
|
|
867
|
-
return {
|
|
967
|
+
return {
|
|
968
|
+
"type": value["type"],
|
|
969
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
970
|
+
"action": ActionToJSON(value["action"]),
|
|
971
|
+
"replacement": value["replacement"]
|
|
972
|
+
};
|
|
868
973
|
}
|
|
869
974
|
|
|
870
975
|
//#endregion
|
|
871
|
-
//#region src/models/
|
|
976
|
+
//#region src/models/SHA256Rule.ts
|
|
872
977
|
/**
|
|
873
978
|
* @export
|
|
874
979
|
*/
|
|
875
|
-
const
|
|
980
|
+
const SHA256RuleTypeEnum = { sha256: "sha256" };
|
|
876
981
|
/**
|
|
877
|
-
* Check if a given object implements the
|
|
982
|
+
* Check if a given object implements the SHA256Rule interface.
|
|
878
983
|
*/
|
|
879
|
-
function
|
|
984
|
+
function instanceOfSHA256Rule(value) {
|
|
985
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
880
986
|
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
881
987
|
return true;
|
|
882
988
|
}
|
|
883
|
-
function
|
|
884
|
-
return
|
|
989
|
+
function SHA256RuleFromJSON(json) {
|
|
990
|
+
return SHA256RuleFromJSONTyped(json, false);
|
|
885
991
|
}
|
|
886
|
-
function
|
|
992
|
+
function SHA256RuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
887
993
|
if (json == null) return json;
|
|
888
994
|
return {
|
|
889
|
-
"type": json["type"]
|
|
890
|
-
"entities": json["entities"].map(
|
|
891
|
-
"
|
|
892
|
-
"chars_to_mask": json["chars_to_mask"] == null ? void 0 : json["chars_to_mask"],
|
|
893
|
-
"from_end": json["from_end"] == null ? void 0 : json["from_end"]
|
|
995
|
+
"type": json["type"],
|
|
996
|
+
"entities": json["entities"].map(EntityBodyFromJSON),
|
|
997
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
|
|
894
998
|
};
|
|
895
999
|
}
|
|
896
|
-
function
|
|
897
|
-
return
|
|
1000
|
+
function SHA256RuleToJSON(json) {
|
|
1001
|
+
return SHA256RuleToJSONTyped(json, false);
|
|
898
1002
|
}
|
|
899
|
-
function
|
|
1003
|
+
function SHA256RuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
900
1004
|
if (value == null) return value;
|
|
901
1005
|
return {
|
|
902
1006
|
"type": value["type"],
|
|
903
|
-
"entities": value["entities"].map(
|
|
904
|
-
"
|
|
905
|
-
"chars_to_mask": value["chars_to_mask"],
|
|
906
|
-
"from_end": value["from_end"]
|
|
1007
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
1008
|
+
"action": ActionToJSON(value["action"])
|
|
907
1009
|
};
|
|
908
1010
|
}
|
|
909
1011
|
|
|
910
1012
|
//#endregion
|
|
911
|
-
//#region src/models/
|
|
1013
|
+
//#region src/models/SHA512Rule.ts
|
|
912
1014
|
/**
|
|
913
1015
|
* @export
|
|
914
1016
|
*/
|
|
915
|
-
const
|
|
1017
|
+
const SHA512RuleTypeEnum = { sha512: "sha512" };
|
|
916
1018
|
/**
|
|
917
|
-
* Check if a given object implements the
|
|
1019
|
+
* Check if a given object implements the SHA512Rule interface.
|
|
918
1020
|
*/
|
|
919
|
-
function
|
|
920
|
-
if (!("
|
|
1021
|
+
function instanceOfSHA512Rule(value) {
|
|
1022
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1023
|
+
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
921
1024
|
return true;
|
|
922
1025
|
}
|
|
923
|
-
function
|
|
924
|
-
return
|
|
1026
|
+
function SHA512RuleFromJSON(json) {
|
|
1027
|
+
return SHA512RuleFromJSONTyped(json, false);
|
|
925
1028
|
}
|
|
926
|
-
function
|
|
1029
|
+
function SHA512RuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
927
1030
|
if (json == null) return json;
|
|
928
1031
|
return {
|
|
929
|
-
"type": json["type"]
|
|
930
|
-
"
|
|
1032
|
+
"type": json["type"],
|
|
1033
|
+
"entities": json["entities"].map(EntityBodyFromJSON),
|
|
1034
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
|
|
931
1035
|
};
|
|
932
1036
|
}
|
|
933
|
-
function
|
|
934
|
-
return
|
|
1037
|
+
function SHA512RuleToJSON(json) {
|
|
1038
|
+
return SHA512RuleToJSONTyped(json, false);
|
|
935
1039
|
}
|
|
936
|
-
function
|
|
1040
|
+
function SHA512RuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
937
1041
|
if (value == null) return value;
|
|
938
1042
|
return {
|
|
939
1043
|
"type": value["type"],
|
|
940
|
-
"
|
|
1044
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
1045
|
+
"action": ActionToJSON(value["action"])
|
|
941
1046
|
};
|
|
942
1047
|
}
|
|
943
1048
|
|
|
944
1049
|
//#endregion
|
|
945
|
-
//#region src/models/
|
|
1050
|
+
//#region src/models/RuleBody.ts
|
|
1051
|
+
function RuleBodyFromJSON(json) {
|
|
1052
|
+
return RuleBodyFromJSONTyped(json, false);
|
|
1053
|
+
}
|
|
1054
|
+
function RuleBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
1055
|
+
if (json == null) return json;
|
|
1056
|
+
switch (json["type"]) {
|
|
1057
|
+
case "detect": return Object.assign({}, DetectRuleFromJSONTyped(json, true), { type: "detect" });
|
|
1058
|
+
case "encrypt": return Object.assign({}, EncryptRuleFromJSONTyped(json, true), { type: "encrypt" });
|
|
1059
|
+
case "hmac": return Object.assign({}, HMACRuleFromJSONTyped(json, true), { type: "hmac" });
|
|
1060
|
+
case "mask": return Object.assign({}, MaskRuleFromJSONTyped(json, true), { type: "mask" });
|
|
1061
|
+
case "pseudonymize": return Object.assign({}, PseudonymizeRuleFromJSONTyped(json, true), { type: "pseudonymize" });
|
|
1062
|
+
case "redact": return Object.assign({}, RedactRuleFromJSONTyped(json, true), { type: "redact" });
|
|
1063
|
+
case "replace": return Object.assign({}, ReplaceRuleFromJSONTyped(json, true), { type: "replace" });
|
|
1064
|
+
case "sha256": return Object.assign({}, SHA256RuleFromJSONTyped(json, true), { type: "sha256" });
|
|
1065
|
+
case "sha512": return Object.assign({}, SHA512RuleFromJSONTyped(json, true), { type: "sha512" });
|
|
1066
|
+
default: return json;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
function RuleBodyToJSON(json) {
|
|
1070
|
+
return RuleBodyToJSONTyped(json, false);
|
|
1071
|
+
}
|
|
1072
|
+
function RuleBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1073
|
+
if (value == null) return value;
|
|
1074
|
+
switch (value["type"]) {
|
|
1075
|
+
case "detect": return Object.assign({}, DetectRuleToJSON(value), { type: "detect" });
|
|
1076
|
+
case "encrypt": return Object.assign({}, EncryptRuleToJSON(value), { type: "encrypt" });
|
|
1077
|
+
case "hmac": return Object.assign({}, HMACRuleToJSON(value), { type: "hmac" });
|
|
1078
|
+
case "mask": return Object.assign({}, MaskRuleToJSON(value), { type: "mask" });
|
|
1079
|
+
case "pseudonymize": return Object.assign({}, PseudonymizeRuleToJSON(value), { type: "pseudonymize" });
|
|
1080
|
+
case "redact": return Object.assign({}, RedactRuleToJSON(value), { type: "redact" });
|
|
1081
|
+
case "replace": return Object.assign({}, ReplaceRuleToJSON(value), { type: "replace" });
|
|
1082
|
+
case "sha256": return Object.assign({}, SHA256RuleToJSON(value), { type: "sha256" });
|
|
1083
|
+
case "sha512": return Object.assign({}, SHA512RuleToJSON(value), { type: "sha512" });
|
|
1084
|
+
default: return value;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
//#endregion
|
|
1089
|
+
//#region src/models/AnonymizeRequestBody.ts
|
|
946
1090
|
/**
|
|
947
|
-
* Check if a given object implements the
|
|
1091
|
+
* Check if a given object implements the AnonymizeRequestBody interface.
|
|
948
1092
|
*/
|
|
949
|
-
function
|
|
950
|
-
if (!("
|
|
1093
|
+
function instanceOfAnonymizeRequestBody(value) {
|
|
1094
|
+
if (!("text" in value) || value["text"] === void 0) return false;
|
|
951
1095
|
return true;
|
|
952
1096
|
}
|
|
953
|
-
function
|
|
954
|
-
return
|
|
1097
|
+
function AnonymizeRequestBodyFromJSON(json) {
|
|
1098
|
+
return AnonymizeRequestBodyFromJSONTyped(json, false);
|
|
955
1099
|
}
|
|
956
|
-
function
|
|
1100
|
+
function AnonymizeRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
957
1101
|
if (json == null) return json;
|
|
958
1102
|
return {
|
|
959
|
-
"
|
|
960
|
-
"
|
|
1103
|
+
"text": json["text"],
|
|
1104
|
+
"rules": json["rules"] == null ? void 0 : json["rules"].map(RuleBodyFromJSON),
|
|
1105
|
+
"confidence_threshold": json["confidence_threshold"] == null ? void 0 : json["confidence_threshold"],
|
|
1106
|
+
"models": json["models"] == null ? void 0 : json["models"]
|
|
961
1107
|
};
|
|
962
1108
|
}
|
|
963
|
-
function
|
|
964
|
-
return
|
|
1109
|
+
function AnonymizeRequestBodyToJSON(json) {
|
|
1110
|
+
return AnonymizeRequestBodyToJSONTyped(json, false);
|
|
965
1111
|
}
|
|
966
|
-
function
|
|
1112
|
+
function AnonymizeRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
967
1113
|
if (value == null) return value;
|
|
968
1114
|
return {
|
|
969
|
-
"
|
|
970
|
-
"
|
|
1115
|
+
"text": value["text"],
|
|
1116
|
+
"rules": value["rules"] == null ? void 0 : value["rules"].map(RuleBodyToJSON),
|
|
1117
|
+
"confidence_threshold": value["confidence_threshold"],
|
|
1118
|
+
"models": value["models"]
|
|
971
1119
|
};
|
|
972
1120
|
}
|
|
973
1121
|
|
|
974
1122
|
//#endregion
|
|
975
|
-
//#region src/models/
|
|
1123
|
+
//#region src/models/TextRange.ts
|
|
976
1124
|
/**
|
|
977
|
-
*
|
|
1125
|
+
* Check if a given object implements the TextRange interface.
|
|
978
1126
|
*/
|
|
979
|
-
|
|
1127
|
+
function instanceOfTextRange(value) {
|
|
1128
|
+
if (!("start" in value) || value["start"] === void 0) return false;
|
|
1129
|
+
if (!("end" in value) || value["end"] === void 0) return false;
|
|
1130
|
+
if (!("value" in value) || value["value"] === void 0) return false;
|
|
1131
|
+
return true;
|
|
1132
|
+
}
|
|
1133
|
+
function TextRangeFromJSON(json) {
|
|
1134
|
+
return TextRangeFromJSONTyped(json, false);
|
|
1135
|
+
}
|
|
1136
|
+
function TextRangeFromJSONTyped(json, ignoreDiscriminator) {
|
|
1137
|
+
if (json == null) return json;
|
|
1138
|
+
return {
|
|
1139
|
+
"start": json["start"],
|
|
1140
|
+
"end": json["end"],
|
|
1141
|
+
"value": json["value"]
|
|
1142
|
+
};
|
|
1143
|
+
}
|
|
1144
|
+
function TextRangeToJSON(json) {
|
|
1145
|
+
return TextRangeToJSONTyped(json, false);
|
|
1146
|
+
}
|
|
1147
|
+
function TextRangeToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1148
|
+
if (value == null) return value;
|
|
1149
|
+
return {
|
|
1150
|
+
"start": value["start"],
|
|
1151
|
+
"end": value["end"],
|
|
1152
|
+
"value": value["value"]
|
|
1153
|
+
};
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
//#endregion
|
|
1157
|
+
//#region src/models/ModelResult.ts
|
|
1158
|
+
/**
|
|
1159
|
+
* @export
|
|
1160
|
+
*/
|
|
1161
|
+
const ModelResultTypeEnum = { model: "model" };
|
|
1162
|
+
/**
|
|
1163
|
+
* Check if a given object implements the ModelResult interface.
|
|
1164
|
+
*/
|
|
1165
|
+
function instanceOfModelResult(value) {
|
|
1166
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1167
|
+
if (!("rule" in value) || value["rule"] === void 0) return false;
|
|
1168
|
+
if (!("value" in value) || value["value"] === void 0) return false;
|
|
1169
|
+
if (!("input" in value) || value["input"] === void 0) return false;
|
|
1170
|
+
if (!("output" in value) || value["output"] === void 0) return false;
|
|
1171
|
+
return true;
|
|
1172
|
+
}
|
|
1173
|
+
function ModelResultFromJSON(json) {
|
|
1174
|
+
return ModelResultFromJSONTyped(json, false);
|
|
1175
|
+
}
|
|
1176
|
+
function ModelResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
1177
|
+
if (json == null) return json;
|
|
1178
|
+
return {
|
|
1179
|
+
"type": json["type"],
|
|
1180
|
+
"rule": json["rule"],
|
|
1181
|
+
"value": json["value"],
|
|
1182
|
+
"input": TextRangeFromJSON(json["input"]),
|
|
1183
|
+
"output": TextRangeFromJSON(json["output"]),
|
|
1184
|
+
"score": json["score"] == null ? void 0 : json["score"],
|
|
1185
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
|
|
1186
|
+
};
|
|
1187
|
+
}
|
|
1188
|
+
function ModelResultToJSON(json) {
|
|
1189
|
+
return ModelResultToJSONTyped(json, false);
|
|
1190
|
+
}
|
|
1191
|
+
function ModelResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1192
|
+
if (value == null) return value;
|
|
1193
|
+
return {
|
|
1194
|
+
"type": value["type"],
|
|
1195
|
+
"rule": value["rule"],
|
|
1196
|
+
"value": value["value"],
|
|
1197
|
+
"input": TextRangeToJSON(value["input"]),
|
|
1198
|
+
"output": TextRangeToJSON(value["output"]),
|
|
1199
|
+
"score": value["score"],
|
|
1200
|
+
"action": ActionToJSON(value["action"])
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
//#endregion
|
|
1205
|
+
//#region src/models/RegexResult.ts
|
|
1206
|
+
/**
|
|
1207
|
+
* @export
|
|
1208
|
+
*/
|
|
1209
|
+
const RegexResultTypeEnum = { regex: "regex" };
|
|
1210
|
+
/**
|
|
1211
|
+
* Check if a given object implements the RegexResult interface.
|
|
1212
|
+
*/
|
|
1213
|
+
function instanceOfRegexResult(value) {
|
|
1214
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1215
|
+
if (!("rule" in value) || value["rule"] === void 0) return false;
|
|
1216
|
+
if (!("value" in value) || value["value"] === void 0) return false;
|
|
1217
|
+
if (!("input" in value) || value["input"] === void 0) return false;
|
|
1218
|
+
if (!("output" in value) || value["output"] === void 0) return false;
|
|
1219
|
+
return true;
|
|
1220
|
+
}
|
|
1221
|
+
function RegexResultFromJSON(json) {
|
|
1222
|
+
return RegexResultFromJSONTyped(json, false);
|
|
1223
|
+
}
|
|
1224
|
+
function RegexResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
1225
|
+
if (json == null) return json;
|
|
1226
|
+
return {
|
|
1227
|
+
"type": json["type"],
|
|
1228
|
+
"rule": json["rule"],
|
|
1229
|
+
"value": json["value"],
|
|
1230
|
+
"input": TextRangeFromJSON(json["input"]),
|
|
1231
|
+
"output": TextRangeFromJSON(json["output"]),
|
|
1232
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
|
|
1233
|
+
};
|
|
1234
|
+
}
|
|
1235
|
+
function RegexResultToJSON(json) {
|
|
1236
|
+
return RegexResultToJSONTyped(json, false);
|
|
1237
|
+
}
|
|
1238
|
+
function RegexResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1239
|
+
if (value == null) return value;
|
|
1240
|
+
return {
|
|
1241
|
+
"type": value["type"],
|
|
1242
|
+
"rule": value["rule"],
|
|
1243
|
+
"value": value["value"],
|
|
1244
|
+
"input": TextRangeToJSON(value["input"]),
|
|
1245
|
+
"output": TextRangeToJSON(value["output"]),
|
|
1246
|
+
"action": ActionToJSON(value["action"])
|
|
1247
|
+
};
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
//#endregion
|
|
1251
|
+
//#region src/models/Applied.ts
|
|
1252
|
+
function AppliedFromJSON(json) {
|
|
1253
|
+
return AppliedFromJSONTyped(json, false);
|
|
1254
|
+
}
|
|
1255
|
+
function AppliedFromJSONTyped(json, ignoreDiscriminator) {
|
|
1256
|
+
if (json == null) return json;
|
|
1257
|
+
switch (json["type"]) {
|
|
1258
|
+
case "model": return Object.assign({}, ModelResultFromJSONTyped(json, true), { type: "model" });
|
|
1259
|
+
case "regex": return Object.assign({}, RegexResultFromJSONTyped(json, true), { type: "regex" });
|
|
1260
|
+
default: return json;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
function AppliedToJSON(json) {
|
|
1264
|
+
return AppliedToJSONTyped(json, false);
|
|
1265
|
+
}
|
|
1266
|
+
function AppliedToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1267
|
+
if (value == null) return value;
|
|
1268
|
+
switch (value["type"]) {
|
|
1269
|
+
case "model": return Object.assign({}, ModelResultToJSON(value), { type: "model" });
|
|
1270
|
+
case "regex": return Object.assign({}, RegexResultToJSON(value), { type: "regex" });
|
|
1271
|
+
default: return value;
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
//#endregion
|
|
1276
|
+
//#region src/models/AnonymizeResponseBody.ts
|
|
1277
|
+
/**
|
|
1278
|
+
* Check if a given object implements the AnonymizeResponseBody interface.
|
|
1279
|
+
*/
|
|
1280
|
+
function instanceOfAnonymizeResponseBody(value) {
|
|
1281
|
+
if (!("text" in value) || value["text"] === void 0) return false;
|
|
1282
|
+
if (!("usage" in value) || value["usage"] === void 0) return false;
|
|
1283
|
+
if (!("models" in value) || value["models"] === void 0) return false;
|
|
1284
|
+
return true;
|
|
1285
|
+
}
|
|
1286
|
+
function AnonymizeResponseBodyFromJSON(json) {
|
|
1287
|
+
return AnonymizeResponseBodyFromJSONTyped(json, false);
|
|
1288
|
+
}
|
|
1289
|
+
function AnonymizeResponseBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
1290
|
+
if (json == null) return json;
|
|
1291
|
+
return {
|
|
1292
|
+
"text": json["text"],
|
|
1293
|
+
"results": json["results"] == null ? void 0 : json["results"].map(AppliedFromJSON),
|
|
1294
|
+
"usage": UsageFromJSON(json["usage"]),
|
|
1295
|
+
"models": json["models"]
|
|
1296
|
+
};
|
|
1297
|
+
}
|
|
1298
|
+
function AnonymizeResponseBodyToJSON(json) {
|
|
1299
|
+
return AnonymizeResponseBodyToJSONTyped(json, false);
|
|
1300
|
+
}
|
|
1301
|
+
function AnonymizeResponseBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1302
|
+
if (value == null) return value;
|
|
1303
|
+
return {
|
|
1304
|
+
"text": value["text"],
|
|
1305
|
+
"results": value["results"] == null ? void 0 : value["results"].map(AppliedToJSON),
|
|
1306
|
+
"usage": UsageToJSON(value["usage"]),
|
|
1307
|
+
"models": value["models"]
|
|
1308
|
+
};
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
//#endregion
|
|
1312
|
+
//#region src/models/AttributeSegment.ts
|
|
1313
|
+
/**
|
|
1314
|
+
* @export
|
|
1315
|
+
*/
|
|
1316
|
+
const AttributeSegmentTypeEnum = { attribute: "attribute" };
|
|
1317
|
+
/**
|
|
1318
|
+
* Check if a given object implements the AttributeSegment interface.
|
|
1319
|
+
*/
|
|
1320
|
+
function instanceOfAttributeSegment(value) {
|
|
1321
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1322
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
1323
|
+
return true;
|
|
1324
|
+
}
|
|
1325
|
+
function AttributeSegmentFromJSON(json) {
|
|
1326
|
+
return AttributeSegmentFromJSONTyped(json, false);
|
|
1327
|
+
}
|
|
1328
|
+
function AttributeSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1329
|
+
if (json == null) return json;
|
|
1330
|
+
return {
|
|
1331
|
+
"type": json["type"],
|
|
1332
|
+
"name": json["name"]
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
function AttributeSegmentToJSON(json) {
|
|
1336
|
+
return AttributeSegmentToJSONTyped(json, false);
|
|
1337
|
+
}
|
|
1338
|
+
function AttributeSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1339
|
+
if (value == null) return value;
|
|
1340
|
+
return {
|
|
1341
|
+
"type": value["type"],
|
|
1342
|
+
"name": value["name"]
|
|
1343
|
+
};
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
//#endregion
|
|
1347
|
+
//#region src/models/CellNoteSegment.ts
|
|
1348
|
+
/**
|
|
1349
|
+
* @export
|
|
1350
|
+
*/
|
|
1351
|
+
const CellNoteSegmentTypeEnum = { cell_note: "cell_note" };
|
|
1352
|
+
/**
|
|
1353
|
+
* Check if a given object implements the CellNoteSegment interface.
|
|
1354
|
+
*/
|
|
1355
|
+
function instanceOfCellNoteSegment(value) {
|
|
1356
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1357
|
+
return true;
|
|
1358
|
+
}
|
|
1359
|
+
function CellNoteSegmentFromJSON(json) {
|
|
1360
|
+
return CellNoteSegmentFromJSONTyped(json, false);
|
|
1361
|
+
}
|
|
1362
|
+
function CellNoteSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1363
|
+
if (json == null) return json;
|
|
1364
|
+
return { "type": json["type"] };
|
|
1365
|
+
}
|
|
1366
|
+
function CellNoteSegmentToJSON(json) {
|
|
1367
|
+
return CellNoteSegmentToJSONTyped(json, false);
|
|
1368
|
+
}
|
|
1369
|
+
function CellNoteSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1370
|
+
if (value == null) return value;
|
|
1371
|
+
return { "type": value["type"] };
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
//#endregion
|
|
1375
|
+
//#region src/models/CellKind.ts
|
|
1376
|
+
function CellKindFromJSON(json) {
|
|
1377
|
+
return CellKindFromJSONTyped(json, false);
|
|
1378
|
+
}
|
|
1379
|
+
function CellKindFromJSONTyped(json, ignoreDiscriminator) {
|
|
1380
|
+
if (json == null) return json;
|
|
1381
|
+
if (typeof json === "string" && json === "formula") return json;
|
|
1382
|
+
if (typeof json === "string" && json === "hyperlink") return json;
|
|
1383
|
+
return {};
|
|
1384
|
+
}
|
|
1385
|
+
function CellKindToJSON(json) {
|
|
1386
|
+
return CellKindToJSONTyped(json, false);
|
|
1387
|
+
}
|
|
1388
|
+
function CellKindToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1389
|
+
if (value == null) return value;
|
|
1390
|
+
if (typeof value === "string" && value === "formula") return value;
|
|
1391
|
+
if (typeof value === "string" && value === "hyperlink") return value;
|
|
1392
|
+
return {};
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
//#endregion
|
|
1396
|
+
//#region src/models/CellSegment.ts
|
|
1397
|
+
/**
|
|
1398
|
+
* @export
|
|
1399
|
+
*/
|
|
1400
|
+
const CellSegmentTypeEnum = { cell: "cell" };
|
|
1401
|
+
/**
|
|
1402
|
+
* Check if a given object implements the CellSegment interface.
|
|
1403
|
+
*/
|
|
1404
|
+
function instanceOfCellSegment(value) {
|
|
1405
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1406
|
+
if (!("row" in value) || value["row"] === void 0) return false;
|
|
1407
|
+
if (!("column" in value) || value["column"] === void 0) return false;
|
|
1408
|
+
if (!("ref" in value) || value["ref"] === void 0) return false;
|
|
1409
|
+
return true;
|
|
1410
|
+
}
|
|
1411
|
+
function CellSegmentFromJSON(json) {
|
|
1412
|
+
return CellSegmentFromJSONTyped(json, false);
|
|
1413
|
+
}
|
|
1414
|
+
function CellSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1415
|
+
if (json == null) return json;
|
|
1416
|
+
return {
|
|
1417
|
+
"type": json["type"],
|
|
1418
|
+
"row": json["row"],
|
|
1419
|
+
"column": json["column"],
|
|
1420
|
+
"ref": json["ref"],
|
|
1421
|
+
"kind": json["kind"] == null ? void 0 : CellKindFromJSON(json["kind"])
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
function CellSegmentToJSON(json) {
|
|
1425
|
+
return CellSegmentToJSONTyped(json, false);
|
|
1426
|
+
}
|
|
1427
|
+
function CellSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1428
|
+
if (value == null) return value;
|
|
1429
|
+
return {
|
|
1430
|
+
"type": value["type"],
|
|
1431
|
+
"row": value["row"],
|
|
1432
|
+
"column": value["column"],
|
|
1433
|
+
"ref": value["ref"],
|
|
1434
|
+
"kind": CellKindToJSON(value["kind"])
|
|
1435
|
+
};
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
//#endregion
|
|
1439
|
+
//#region src/models/CommentKind.ts
|
|
1440
|
+
/**
|
|
1441
|
+
* Sensitive Data Protection API
|
|
1442
|
+
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, pseudonymize, hash, or encrypt).
|
|
1443
|
+
*
|
|
1444
|
+
* The version of the OpenAPI document: 0.1.0
|
|
1445
|
+
*
|
|
1446
|
+
*
|
|
1447
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1448
|
+
* https://openapi-generator.tech
|
|
1449
|
+
* Do not edit the class manually.
|
|
1450
|
+
*/
|
|
1451
|
+
/**
|
|
1452
|
+
* Its author's name or initials.
|
|
1453
|
+
* @export
|
|
1454
|
+
*/
|
|
1455
|
+
const CommentKind = { author: "author" };
|
|
1456
|
+
function instanceOfCommentKind(value) {
|
|
1457
|
+
for (const key in CommentKind) if (Object.prototype.hasOwnProperty.call(CommentKind, key)) {
|
|
1458
|
+
if (CommentKind[key] === value) return true;
|
|
1459
|
+
}
|
|
1460
|
+
return false;
|
|
1461
|
+
}
|
|
1462
|
+
function CommentKindFromJSON(json) {
|
|
1463
|
+
return CommentKindFromJSONTyped(json, false);
|
|
1464
|
+
}
|
|
1465
|
+
function CommentKindFromJSONTyped(json, ignoreDiscriminator) {
|
|
1466
|
+
return json;
|
|
1467
|
+
}
|
|
1468
|
+
function CommentKindToJSON(value) {
|
|
1469
|
+
return value;
|
|
1470
|
+
}
|
|
1471
|
+
function CommentKindToJSONTyped(value, ignoreDiscriminator) {
|
|
1472
|
+
return value;
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
//#endregion
|
|
1476
|
+
//#region src/models/CommentSegment.ts
|
|
1477
|
+
/**
|
|
1478
|
+
* @export
|
|
1479
|
+
*/
|
|
1480
|
+
const CommentSegmentTypeEnum = { comment: "comment" };
|
|
1481
|
+
/**
|
|
1482
|
+
* Check if a given object implements the CommentSegment interface.
|
|
1483
|
+
*/
|
|
1484
|
+
function instanceOfCommentSegment(value) {
|
|
1485
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1486
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
1487
|
+
return true;
|
|
1488
|
+
}
|
|
1489
|
+
function CommentSegmentFromJSON(json) {
|
|
1490
|
+
return CommentSegmentFromJSONTyped(json, false);
|
|
1491
|
+
}
|
|
1492
|
+
function CommentSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1493
|
+
if (json == null) return json;
|
|
1494
|
+
return {
|
|
1495
|
+
"type": json["type"],
|
|
1496
|
+
"id": json["id"],
|
|
1497
|
+
"kind": json["kind"] == null ? void 0 : CommentKindFromJSON(json["kind"])
|
|
1498
|
+
};
|
|
1499
|
+
}
|
|
1500
|
+
function CommentSegmentToJSON(json) {
|
|
1501
|
+
return CommentSegmentToJSONTyped(json, false);
|
|
1502
|
+
}
|
|
1503
|
+
function CommentSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1504
|
+
if (value == null) return value;
|
|
1505
|
+
return {
|
|
1506
|
+
"type": value["type"],
|
|
1507
|
+
"id": value["id"],
|
|
1508
|
+
"kind": CommentKindToJSON(value["kind"])
|
|
1509
|
+
};
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
//#endregion
|
|
1513
|
+
//#region src/models/ComponentSegment.ts
|
|
1514
|
+
/**
|
|
1515
|
+
* @export
|
|
1516
|
+
*/
|
|
1517
|
+
const ComponentSegmentTypeEnum = { component: "component" };
|
|
1518
|
+
/**
|
|
1519
|
+
* Check if a given object implements the ComponentSegment interface.
|
|
1520
|
+
*/
|
|
1521
|
+
function instanceOfComponentSegment(value) {
|
|
1522
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1523
|
+
if (!("number" in value) || value["number"] === void 0) return false;
|
|
1524
|
+
return true;
|
|
1525
|
+
}
|
|
1526
|
+
function ComponentSegmentFromJSON(json) {
|
|
1527
|
+
return ComponentSegmentFromJSONTyped(json, false);
|
|
1528
|
+
}
|
|
1529
|
+
function ComponentSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1530
|
+
if (json == null) return json;
|
|
1531
|
+
return {
|
|
1532
|
+
"type": json["type"],
|
|
1533
|
+
"number": json["number"],
|
|
1534
|
+
"subcomponent": json["subcomponent"] == null ? void 0 : json["subcomponent"]
|
|
1535
|
+
};
|
|
1536
|
+
}
|
|
1537
|
+
function ComponentSegmentToJSON(json) {
|
|
1538
|
+
return ComponentSegmentToJSONTyped(json, false);
|
|
1539
|
+
}
|
|
1540
|
+
function ComponentSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1541
|
+
if (value == null) return value;
|
|
1542
|
+
return {
|
|
1543
|
+
"type": value["type"],
|
|
1544
|
+
"number": value["number"],
|
|
1545
|
+
"subcomponent": value["subcomponent"]
|
|
1546
|
+
};
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
//#endregion
|
|
1550
|
+
//#region src/models/ElementSegment.ts
|
|
1551
|
+
/**
|
|
1552
|
+
* @export
|
|
1553
|
+
*/
|
|
1554
|
+
const ElementSegmentTypeEnum = { element: "element" };
|
|
1555
|
+
/**
|
|
1556
|
+
* Check if a given object implements the ElementSegment interface.
|
|
1557
|
+
*/
|
|
1558
|
+
function instanceOfElementSegment(value) {
|
|
1559
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1560
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
1561
|
+
if (!("index" in value) || value["index"] === void 0) return false;
|
|
1562
|
+
return true;
|
|
1563
|
+
}
|
|
1564
|
+
function ElementSegmentFromJSON(json) {
|
|
1565
|
+
return ElementSegmentFromJSONTyped(json, false);
|
|
1566
|
+
}
|
|
1567
|
+
function ElementSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1568
|
+
if (json == null) return json;
|
|
1569
|
+
return {
|
|
1570
|
+
"type": json["type"],
|
|
1571
|
+
"name": json["name"],
|
|
1572
|
+
"index": json["index"]
|
|
1573
|
+
};
|
|
1574
|
+
}
|
|
1575
|
+
function ElementSegmentToJSON(json) {
|
|
1576
|
+
return ElementSegmentToJSONTyped(json, false);
|
|
1577
|
+
}
|
|
1578
|
+
function ElementSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1579
|
+
if (value == null) return value;
|
|
1580
|
+
return {
|
|
1581
|
+
"type": value["type"],
|
|
1582
|
+
"name": value["name"],
|
|
1583
|
+
"index": value["index"]
|
|
1584
|
+
};
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
//#endregion
|
|
1588
|
+
//#region src/models/EndnoteSegment.ts
|
|
1589
|
+
/**
|
|
1590
|
+
* @export
|
|
1591
|
+
*/
|
|
1592
|
+
const EndnoteSegmentTypeEnum = { endnote: "endnote" };
|
|
1593
|
+
/**
|
|
1594
|
+
* Check if a given object implements the EndnoteSegment interface.
|
|
1595
|
+
*/
|
|
1596
|
+
function instanceOfEndnoteSegment(value) {
|
|
1597
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1598
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
1599
|
+
return true;
|
|
1600
|
+
}
|
|
1601
|
+
function EndnoteSegmentFromJSON(json) {
|
|
1602
|
+
return EndnoteSegmentFromJSONTyped(json, false);
|
|
1603
|
+
}
|
|
1604
|
+
function EndnoteSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1605
|
+
if (json == null) return json;
|
|
1606
|
+
return {
|
|
1607
|
+
"type": json["type"],
|
|
1608
|
+
"id": json["id"]
|
|
1609
|
+
};
|
|
1610
|
+
}
|
|
1611
|
+
function EndnoteSegmentToJSON(json) {
|
|
1612
|
+
return EndnoteSegmentToJSONTyped(json, false);
|
|
1613
|
+
}
|
|
1614
|
+
function EndnoteSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1615
|
+
if (value == null) return value;
|
|
1616
|
+
return {
|
|
1617
|
+
"type": value["type"],
|
|
1618
|
+
"id": value["id"]
|
|
1619
|
+
};
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
//#endregion
|
|
1623
|
+
//#region src/models/FieldSegment.ts
|
|
1624
|
+
/**
|
|
1625
|
+
* @export
|
|
1626
|
+
*/
|
|
1627
|
+
const FieldSegmentTypeEnum = { field: "field" };
|
|
1628
|
+
/**
|
|
1629
|
+
* Check if a given object implements the FieldSegment interface.
|
|
1630
|
+
*/
|
|
1631
|
+
function instanceOfFieldSegment(value) {
|
|
1632
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1633
|
+
if (!("number" in value) || value["number"] === void 0) return false;
|
|
1634
|
+
if (!("repetition" in value) || value["repetition"] === void 0) return false;
|
|
1635
|
+
return true;
|
|
1636
|
+
}
|
|
1637
|
+
function FieldSegmentFromJSON(json) {
|
|
1638
|
+
return FieldSegmentFromJSONTyped(json, false);
|
|
1639
|
+
}
|
|
1640
|
+
function FieldSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1641
|
+
if (json == null) return json;
|
|
1642
|
+
return {
|
|
1643
|
+
"type": json["type"],
|
|
1644
|
+
"number": json["number"],
|
|
1645
|
+
"repetition": json["repetition"]
|
|
1646
|
+
};
|
|
1647
|
+
}
|
|
1648
|
+
function FieldSegmentToJSON(json) {
|
|
1649
|
+
return FieldSegmentToJSONTyped(json, false);
|
|
1650
|
+
}
|
|
1651
|
+
function FieldSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1652
|
+
if (value == null) return value;
|
|
1653
|
+
return {
|
|
1654
|
+
"type": value["type"],
|
|
1655
|
+
"number": value["number"],
|
|
1656
|
+
"repetition": value["repetition"]
|
|
1657
|
+
};
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
//#endregion
|
|
1661
|
+
//#region src/models/FootnoteSegment.ts
|
|
1662
|
+
/**
|
|
1663
|
+
* @export
|
|
1664
|
+
*/
|
|
1665
|
+
const FootnoteSegmentTypeEnum = { footnote: "footnote" };
|
|
1666
|
+
/**
|
|
1667
|
+
* Check if a given object implements the FootnoteSegment interface.
|
|
1668
|
+
*/
|
|
1669
|
+
function instanceOfFootnoteSegment(value) {
|
|
1670
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1671
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
1672
|
+
return true;
|
|
1673
|
+
}
|
|
1674
|
+
function FootnoteSegmentFromJSON(json) {
|
|
1675
|
+
return FootnoteSegmentFromJSONTyped(json, false);
|
|
1676
|
+
}
|
|
1677
|
+
function FootnoteSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1678
|
+
if (json == null) return json;
|
|
1679
|
+
return {
|
|
1680
|
+
"type": json["type"],
|
|
1681
|
+
"id": json["id"]
|
|
1682
|
+
};
|
|
1683
|
+
}
|
|
1684
|
+
function FootnoteSegmentToJSON(json) {
|
|
1685
|
+
return FootnoteSegmentToJSONTyped(json, false);
|
|
1686
|
+
}
|
|
1687
|
+
function FootnoteSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1688
|
+
if (value == null) return value;
|
|
1689
|
+
return {
|
|
1690
|
+
"type": value["type"],
|
|
1691
|
+
"id": value["id"]
|
|
1692
|
+
};
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
//#endregion
|
|
1696
|
+
//#region src/models/FrameSegment.ts
|
|
1697
|
+
/**
|
|
1698
|
+
* @export
|
|
1699
|
+
*/
|
|
1700
|
+
const FrameSegmentTypeEnum = { frame: "frame" };
|
|
1701
|
+
/**
|
|
1702
|
+
* Check if a given object implements the FrameSegment interface.
|
|
1703
|
+
*/
|
|
1704
|
+
function instanceOfFrameSegment(value) {
|
|
1705
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1706
|
+
if (!("number" in value) || value["number"] === void 0) return false;
|
|
1707
|
+
return true;
|
|
1708
|
+
}
|
|
1709
|
+
function FrameSegmentFromJSON(json) {
|
|
1710
|
+
return FrameSegmentFromJSONTyped(json, false);
|
|
1711
|
+
}
|
|
1712
|
+
function FrameSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1713
|
+
if (json == null) return json;
|
|
1714
|
+
return {
|
|
1715
|
+
"type": json["type"],
|
|
1716
|
+
"number": json["number"]
|
|
1717
|
+
};
|
|
1718
|
+
}
|
|
1719
|
+
function FrameSegmentToJSON(json) {
|
|
1720
|
+
return FrameSegmentToJSONTyped(json, false);
|
|
1721
|
+
}
|
|
1722
|
+
function FrameSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1723
|
+
if (value == null) return value;
|
|
1724
|
+
return {
|
|
1725
|
+
"type": value["type"],
|
|
1726
|
+
"number": value["number"]
|
|
1727
|
+
};
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
//#endregion
|
|
1731
|
+
//#region src/models/HeaderFooterSegment.ts
|
|
1732
|
+
/**
|
|
1733
|
+
* @export
|
|
1734
|
+
*/
|
|
1735
|
+
const HeaderFooterSegmentTypeEnum = { header_footer: "header_footer" };
|
|
1736
|
+
/**
|
|
1737
|
+
* Check if a given object implements the HeaderFooterSegment interface.
|
|
1738
|
+
*/
|
|
1739
|
+
function instanceOfHeaderFooterSegment(value) {
|
|
1740
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1741
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
1742
|
+
return true;
|
|
1743
|
+
}
|
|
1744
|
+
function HeaderFooterSegmentFromJSON(json) {
|
|
1745
|
+
return HeaderFooterSegmentFromJSONTyped(json, false);
|
|
1746
|
+
}
|
|
1747
|
+
function HeaderFooterSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1748
|
+
if (json == null) return json;
|
|
1749
|
+
return {
|
|
1750
|
+
"type": json["type"],
|
|
1751
|
+
"name": json["name"]
|
|
1752
|
+
};
|
|
1753
|
+
}
|
|
1754
|
+
function HeaderFooterSegmentToJSON(json) {
|
|
1755
|
+
return HeaderFooterSegmentToJSONTyped(json, false);
|
|
1756
|
+
}
|
|
1757
|
+
function HeaderFooterSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1758
|
+
if (value == null) return value;
|
|
1759
|
+
return {
|
|
1760
|
+
"type": value["type"],
|
|
1761
|
+
"name": value["name"]
|
|
1762
|
+
};
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
//#endregion
|
|
1766
|
+
//#region src/models/IndexSegment.ts
|
|
1767
|
+
/**
|
|
1768
|
+
* @export
|
|
1769
|
+
*/
|
|
1770
|
+
const IndexSegmentTypeEnum = { index: "index" };
|
|
1771
|
+
/**
|
|
1772
|
+
* Check if a given object implements the IndexSegment interface.
|
|
1773
|
+
*/
|
|
1774
|
+
function instanceOfIndexSegment(value) {
|
|
1775
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1776
|
+
if (!("index" in value) || value["index"] === void 0) return false;
|
|
1777
|
+
return true;
|
|
1778
|
+
}
|
|
1779
|
+
function IndexSegmentFromJSON(json) {
|
|
1780
|
+
return IndexSegmentFromJSONTyped(json, false);
|
|
1781
|
+
}
|
|
1782
|
+
function IndexSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1783
|
+
if (json == null) return json;
|
|
1784
|
+
return {
|
|
1785
|
+
"type": json["type"],
|
|
1786
|
+
"index": json["index"]
|
|
1787
|
+
};
|
|
1788
|
+
}
|
|
1789
|
+
function IndexSegmentToJSON(json) {
|
|
1790
|
+
return IndexSegmentToJSONTyped(json, false);
|
|
1791
|
+
}
|
|
1792
|
+
function IndexSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1793
|
+
if (value == null) return value;
|
|
1794
|
+
return {
|
|
1795
|
+
"type": value["type"],
|
|
1796
|
+
"index": value["index"]
|
|
1797
|
+
};
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
//#endregion
|
|
1801
|
+
//#region src/models/ItemSegment.ts
|
|
1802
|
+
/**
|
|
1803
|
+
* @export
|
|
1804
|
+
*/
|
|
1805
|
+
const ItemSegmentTypeEnum = { item: "item" };
|
|
1806
|
+
/**
|
|
1807
|
+
* Check if a given object implements the ItemSegment interface.
|
|
1808
|
+
*/
|
|
1809
|
+
function instanceOfItemSegment(value) {
|
|
1810
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1811
|
+
if (!("number" in value) || value["number"] === void 0) return false;
|
|
1812
|
+
return true;
|
|
1813
|
+
}
|
|
1814
|
+
function ItemSegmentFromJSON(json) {
|
|
1815
|
+
return ItemSegmentFromJSONTyped(json, false);
|
|
1816
|
+
}
|
|
1817
|
+
function ItemSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1818
|
+
if (json == null) return json;
|
|
1819
|
+
return {
|
|
1820
|
+
"type": json["type"],
|
|
1821
|
+
"number": json["number"]
|
|
1822
|
+
};
|
|
1823
|
+
}
|
|
1824
|
+
function ItemSegmentToJSON(json) {
|
|
1825
|
+
return ItemSegmentToJSONTyped(json, false);
|
|
1826
|
+
}
|
|
1827
|
+
function ItemSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1828
|
+
if (value == null) return value;
|
|
1829
|
+
return {
|
|
1830
|
+
"type": value["type"],
|
|
1831
|
+
"number": value["number"]
|
|
1832
|
+
};
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
//#endregion
|
|
1836
|
+
//#region src/models/KeySegment.ts
|
|
1837
|
+
/**
|
|
1838
|
+
* @export
|
|
1839
|
+
*/
|
|
1840
|
+
const KeySegmentTypeEnum = { key: "key" };
|
|
1841
|
+
/**
|
|
1842
|
+
* Check if a given object implements the KeySegment interface.
|
|
1843
|
+
*/
|
|
1844
|
+
function instanceOfKeySegment(value) {
|
|
1845
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1846
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
1847
|
+
return true;
|
|
1848
|
+
}
|
|
1849
|
+
function KeySegmentFromJSON(json) {
|
|
1850
|
+
return KeySegmentFromJSONTyped(json, false);
|
|
1851
|
+
}
|
|
1852
|
+
function KeySegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1853
|
+
if (json == null) return json;
|
|
1854
|
+
return {
|
|
1855
|
+
"type": json["type"],
|
|
1856
|
+
"name": json["name"]
|
|
1857
|
+
};
|
|
1858
|
+
}
|
|
1859
|
+
function KeySegmentToJSON(json) {
|
|
1860
|
+
return KeySegmentToJSONTyped(json, false);
|
|
1861
|
+
}
|
|
1862
|
+
function KeySegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1863
|
+
if (value == null) return value;
|
|
1864
|
+
return {
|
|
1865
|
+
"type": value["type"],
|
|
1866
|
+
"name": value["name"]
|
|
1867
|
+
};
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
//#endregion
|
|
1871
|
+
//#region src/models/LineSegment.ts
|
|
1872
|
+
/**
|
|
1873
|
+
* @export
|
|
1874
|
+
*/
|
|
1875
|
+
const LineSegmentTypeEnum = { line: "line" };
|
|
1876
|
+
/**
|
|
1877
|
+
* Check if a given object implements the LineSegment interface.
|
|
1878
|
+
*/
|
|
1879
|
+
function instanceOfLineSegment(value) {
|
|
1880
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1881
|
+
if (!("line" in value) || value["line"] === void 0) return false;
|
|
1882
|
+
if (!("column" in value) || value["column"] === void 0) return false;
|
|
1883
|
+
return true;
|
|
1884
|
+
}
|
|
1885
|
+
function LineSegmentFromJSON(json) {
|
|
1886
|
+
return LineSegmentFromJSONTyped(json, false);
|
|
1887
|
+
}
|
|
1888
|
+
function LineSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1889
|
+
if (json == null) return json;
|
|
1890
|
+
return {
|
|
1891
|
+
"type": json["type"],
|
|
1892
|
+
"line": json["line"],
|
|
1893
|
+
"column": json["column"]
|
|
1894
|
+
};
|
|
1895
|
+
}
|
|
1896
|
+
function LineSegmentToJSON(json) {
|
|
1897
|
+
return LineSegmentToJSONTyped(json, false);
|
|
1898
|
+
}
|
|
1899
|
+
function LineSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1900
|
+
if (value == null) return value;
|
|
1901
|
+
return {
|
|
1902
|
+
"type": value["type"],
|
|
1903
|
+
"line": value["line"],
|
|
1904
|
+
"column": value["column"]
|
|
1905
|
+
};
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
//#endregion
|
|
1909
|
+
//#region src/models/ParagraphKind.ts
|
|
1910
|
+
function ParagraphKindFromJSON(json) {
|
|
1911
|
+
return ParagraphKindFromJSONTyped(json, false);
|
|
1912
|
+
}
|
|
1913
|
+
function ParagraphKindFromJSONTyped(json, ignoreDiscriminator) {
|
|
1914
|
+
if (json == null) return json;
|
|
1915
|
+
if (typeof json === "string" && json === "field_code") return json;
|
|
1916
|
+
if (typeof json === "string" && json === "content_control") return json;
|
|
1917
|
+
if (typeof json === "string" && json === "hyperlink") return json;
|
|
1918
|
+
if (typeof json === "string" && json === "form_field") return json;
|
|
1919
|
+
if (typeof json === "string" && json === "attribute") return json;
|
|
1920
|
+
if (typeof json === "string" && json === "deleted_text") return json;
|
|
1921
|
+
return {};
|
|
1922
|
+
}
|
|
1923
|
+
function ParagraphKindToJSON(json) {
|
|
1924
|
+
return ParagraphKindToJSONTyped(json, false);
|
|
1925
|
+
}
|
|
1926
|
+
function ParagraphKindToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1927
|
+
if (value == null) return value;
|
|
1928
|
+
if (typeof value === "string" && value === "field_code") return value;
|
|
1929
|
+
if (typeof value === "string" && value === "content_control") return value;
|
|
1930
|
+
if (typeof value === "string" && value === "hyperlink") return value;
|
|
1931
|
+
if (typeof value === "string" && value === "form_field") return value;
|
|
1932
|
+
if (typeof value === "string" && value === "attribute") return value;
|
|
1933
|
+
if (typeof value === "string" && value === "deleted_text") return value;
|
|
1934
|
+
return {};
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
//#endregion
|
|
1938
|
+
//#region src/models/ParagraphSegment.ts
|
|
1939
|
+
/**
|
|
1940
|
+
* @export
|
|
1941
|
+
*/
|
|
1942
|
+
const ParagraphSegmentTypeEnum = { paragraph: "paragraph" };
|
|
1943
|
+
/**
|
|
1944
|
+
* Check if a given object implements the ParagraphSegment interface.
|
|
1945
|
+
*/
|
|
1946
|
+
function instanceOfParagraphSegment(value) {
|
|
1947
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1948
|
+
if (!("number" in value) || value["number"] === void 0) return false;
|
|
1949
|
+
return true;
|
|
1950
|
+
}
|
|
1951
|
+
function ParagraphSegmentFromJSON(json) {
|
|
1952
|
+
return ParagraphSegmentFromJSONTyped(json, false);
|
|
1953
|
+
}
|
|
1954
|
+
function ParagraphSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
1955
|
+
if (json == null) return json;
|
|
1956
|
+
return {
|
|
1957
|
+
"type": json["type"],
|
|
1958
|
+
"number": json["number"],
|
|
1959
|
+
"kind": json["kind"] == null ? void 0 : ParagraphKindFromJSON(json["kind"])
|
|
1960
|
+
};
|
|
1961
|
+
}
|
|
1962
|
+
function ParagraphSegmentToJSON(json) {
|
|
1963
|
+
return ParagraphSegmentToJSONTyped(json, false);
|
|
1964
|
+
}
|
|
1965
|
+
function ParagraphSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1966
|
+
if (value == null) return value;
|
|
1967
|
+
return {
|
|
1968
|
+
"type": value["type"],
|
|
1969
|
+
"number": value["number"],
|
|
1970
|
+
"kind": ParagraphKindToJSON(value["kind"])
|
|
1971
|
+
};
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
//#endregion
|
|
1975
|
+
//#region src/models/Kind.ts
|
|
1976
|
+
function KindFromJSON(json) {
|
|
1977
|
+
return KindFromJSONTyped(json, false);
|
|
1978
|
+
}
|
|
1979
|
+
function KindFromJSONTyped(json, ignoreDiscriminator) {
|
|
1980
|
+
if (json == null) return json;
|
|
1981
|
+
if (typeof json === "string" && json === "custom_show_name") return json;
|
|
1982
|
+
if (typeof json === "string" && json === "core_property") return json;
|
|
1983
|
+
if (typeof json === "string" && json === "alternative_text") return json;
|
|
1984
|
+
if (typeof json === "string" && json === "content_control") return json;
|
|
1985
|
+
if (typeof json === "string" && json === "paragraph") return json;
|
|
1986
|
+
if (typeof json === "string" && json === "field_code") return json;
|
|
1987
|
+
if (typeof json === "string" && json === "chart") return json;
|
|
1988
|
+
if (typeof json === "string" && json === "form_field") return json;
|
|
1989
|
+
if (typeof json === "string" && json === "deleted_text") return json;
|
|
1990
|
+
if (typeof json === "string" && json === "extended_property") return json;
|
|
1991
|
+
if (typeof json === "string" && json === "custom_xml") return json;
|
|
1992
|
+
if (typeof json === "string" && json === "section_name") return json;
|
|
1993
|
+
if (typeof json === "string" && json === "author") return json;
|
|
1994
|
+
if (typeof json === "string" && json === "object_name") return json;
|
|
1995
|
+
if (typeof json === "string" && json === "text") return json;
|
|
1996
|
+
if (typeof json === "string" && json === "hyperlink") return json;
|
|
1997
|
+
if (typeof json === "string" && json === "custom_property") return json;
|
|
1998
|
+
if (typeof json === "string" && json === "table_name") return json;
|
|
1999
|
+
if (typeof json === "string" && json === "document_variable") return json;
|
|
2000
|
+
if (typeof json === "string" && json === "connection") return json;
|
|
2001
|
+
if (typeof json === "string" && json === "formula") return json;
|
|
2002
|
+
if (typeof json === "string" && json === "data_validation") return json;
|
|
2003
|
+
if (typeof json === "string" && json === "attribute") return json;
|
|
2004
|
+
if (typeof json === "string" && json === "sheet_name") return json;
|
|
2005
|
+
if (typeof json === "string" && json === "vml_drawing") return json;
|
|
2006
|
+
if (typeof json === "string" && json === "pivot_cache") return json;
|
|
2007
|
+
if (typeof json === "string" && json === "table_column") return json;
|
|
2008
|
+
return {};
|
|
2009
|
+
}
|
|
2010
|
+
function KindToJSON(json) {
|
|
2011
|
+
return KindToJSONTyped(json, false);
|
|
2012
|
+
}
|
|
2013
|
+
function KindToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2014
|
+
if (value == null) return value;
|
|
2015
|
+
if (typeof value === "string" && value === "custom_show_name") return value;
|
|
2016
|
+
if (typeof value === "string" && value === "core_property") return value;
|
|
2017
|
+
if (typeof value === "string" && value === "alternative_text") return value;
|
|
2018
|
+
if (typeof value === "string" && value === "content_control") return value;
|
|
2019
|
+
if (typeof value === "string" && value === "paragraph") return value;
|
|
2020
|
+
if (typeof value === "string" && value === "field_code") return value;
|
|
2021
|
+
if (typeof value === "string" && value === "chart") return value;
|
|
2022
|
+
if (typeof value === "string" && value === "form_field") return value;
|
|
2023
|
+
if (typeof value === "string" && value === "deleted_text") return value;
|
|
2024
|
+
if (typeof value === "string" && value === "extended_property") return value;
|
|
2025
|
+
if (typeof value === "string" && value === "custom_xml") return value;
|
|
2026
|
+
if (typeof value === "string" && value === "section_name") return value;
|
|
2027
|
+
if (typeof value === "string" && value === "author") return value;
|
|
2028
|
+
if (typeof value === "string" && value === "object_name") return value;
|
|
2029
|
+
if (typeof value === "string" && value === "text") return value;
|
|
2030
|
+
if (typeof value === "string" && value === "hyperlink") return value;
|
|
2031
|
+
if (typeof value === "string" && value === "custom_property") return value;
|
|
2032
|
+
if (typeof value === "string" && value === "table_name") return value;
|
|
2033
|
+
if (typeof value === "string" && value === "document_variable") return value;
|
|
2034
|
+
if (typeof value === "string" && value === "connection") return value;
|
|
2035
|
+
if (typeof value === "string" && value === "formula") return value;
|
|
2036
|
+
if (typeof value === "string" && value === "data_validation") return value;
|
|
2037
|
+
if (typeof value === "string" && value === "attribute") return value;
|
|
2038
|
+
if (typeof value === "string" && value === "sheet_name") return value;
|
|
2039
|
+
if (typeof value === "string" && value === "vml_drawing") return value;
|
|
2040
|
+
if (typeof value === "string" && value === "pivot_cache") return value;
|
|
2041
|
+
if (typeof value === "string" && value === "table_column") return value;
|
|
2042
|
+
return {};
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
//#endregion
|
|
2046
|
+
//#region src/models/PartSegment.ts
|
|
2047
|
+
/**
|
|
2048
|
+
* @export
|
|
2049
|
+
*/
|
|
2050
|
+
const PartSegmentTypeEnum = { part: "part" };
|
|
2051
|
+
/**
|
|
2052
|
+
* Check if a given object implements the PartSegment interface.
|
|
2053
|
+
*/
|
|
2054
|
+
function instanceOfPartSegment(value) {
|
|
2055
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
2056
|
+
if (!("part" in value) || value["part"] === void 0) return false;
|
|
2057
|
+
return true;
|
|
2058
|
+
}
|
|
2059
|
+
function PartSegmentFromJSON(json) {
|
|
2060
|
+
return PartSegmentFromJSONTyped(json, false);
|
|
2061
|
+
}
|
|
2062
|
+
function PartSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2063
|
+
if (json == null) return json;
|
|
2064
|
+
return {
|
|
2065
|
+
"type": json["type"],
|
|
2066
|
+
"part": json["part"],
|
|
2067
|
+
"kind": json["kind"] == null ? void 0 : KindFromJSON(json["kind"])
|
|
2068
|
+
};
|
|
2069
|
+
}
|
|
2070
|
+
function PartSegmentToJSON(json) {
|
|
2071
|
+
return PartSegmentToJSONTyped(json, false);
|
|
2072
|
+
}
|
|
2073
|
+
function PartSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2074
|
+
if (value == null) return value;
|
|
2075
|
+
return {
|
|
2076
|
+
"type": value["type"],
|
|
2077
|
+
"part": value["part"],
|
|
2078
|
+
"kind": KindToJSON(value["kind"])
|
|
2079
|
+
};
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
//#endregion
|
|
2083
|
+
//#region src/models/PropertySegment.ts
|
|
2084
|
+
/**
|
|
2085
|
+
* @export
|
|
2086
|
+
*/
|
|
2087
|
+
const PropertySegmentTypeEnum = { property: "property" };
|
|
2088
|
+
/**
|
|
2089
|
+
* Check if a given object implements the PropertySegment interface.
|
|
2090
|
+
*/
|
|
2091
|
+
function instanceOfPropertySegment(value) {
|
|
2092
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
2093
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
2094
|
+
return true;
|
|
2095
|
+
}
|
|
2096
|
+
function PropertySegmentFromJSON(json) {
|
|
2097
|
+
return PropertySegmentFromJSONTyped(json, false);
|
|
2098
|
+
}
|
|
2099
|
+
function PropertySegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2100
|
+
if (json == null) return json;
|
|
2101
|
+
return {
|
|
2102
|
+
"type": json["type"],
|
|
2103
|
+
"name": json["name"]
|
|
2104
|
+
};
|
|
2105
|
+
}
|
|
2106
|
+
function PropertySegmentToJSON(json) {
|
|
2107
|
+
return PropertySegmentToJSONTyped(json, false);
|
|
2108
|
+
}
|
|
2109
|
+
function PropertySegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2110
|
+
if (value == null) return value;
|
|
2111
|
+
return {
|
|
2112
|
+
"type": value["type"],
|
|
2113
|
+
"name": value["name"]
|
|
2114
|
+
};
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
//#endregion
|
|
2118
|
+
//#region src/models/RangeKind.ts
|
|
2119
|
+
/**
|
|
2120
|
+
* Sensitive Data Protection API
|
|
2121
|
+
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, pseudonymize, hash, or encrypt).
|
|
2122
|
+
*
|
|
2123
|
+
* The version of the OpenAPI document: 0.1.0
|
|
2124
|
+
*
|
|
2125
|
+
*
|
|
2126
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2127
|
+
* https://openapi-generator.tech
|
|
2128
|
+
* Do not edit the class manually.
|
|
2129
|
+
*/
|
|
2130
|
+
/**
|
|
2131
|
+
* A data validation's prompt, error message or list of values.
|
|
2132
|
+
* @export
|
|
2133
|
+
*/
|
|
2134
|
+
const RangeKind = { data_validation: "data_validation" };
|
|
2135
|
+
function instanceOfRangeKind(value) {
|
|
2136
|
+
for (const key in RangeKind) if (Object.prototype.hasOwnProperty.call(RangeKind, key)) {
|
|
2137
|
+
if (RangeKind[key] === value) return true;
|
|
2138
|
+
}
|
|
2139
|
+
return false;
|
|
2140
|
+
}
|
|
2141
|
+
function RangeKindFromJSON(json) {
|
|
2142
|
+
return RangeKindFromJSONTyped(json, false);
|
|
2143
|
+
}
|
|
2144
|
+
function RangeKindFromJSONTyped(json, ignoreDiscriminator) {
|
|
2145
|
+
return json;
|
|
2146
|
+
}
|
|
2147
|
+
function RangeKindToJSON(value) {
|
|
2148
|
+
return value;
|
|
2149
|
+
}
|
|
2150
|
+
function RangeKindToJSONTyped(value, ignoreDiscriminator) {
|
|
2151
|
+
return value;
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
//#endregion
|
|
2155
|
+
//#region src/models/RangeSegment.ts
|
|
2156
|
+
/**
|
|
2157
|
+
* @export
|
|
2158
|
+
*/
|
|
2159
|
+
const RangeSegmentTypeEnum = { range: "range" };
|
|
2160
|
+
/**
|
|
2161
|
+
* Check if a given object implements the RangeSegment interface.
|
|
2162
|
+
*/
|
|
2163
|
+
function instanceOfRangeSegment(value) {
|
|
2164
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
2165
|
+
if (!("ref" in value) || value["ref"] === void 0) return false;
|
|
2166
|
+
if (!("kind" in value) || value["kind"] === void 0) return false;
|
|
2167
|
+
return true;
|
|
2168
|
+
}
|
|
2169
|
+
function RangeSegmentFromJSON(json) {
|
|
2170
|
+
return RangeSegmentFromJSONTyped(json, false);
|
|
2171
|
+
}
|
|
2172
|
+
function RangeSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2173
|
+
if (json == null) return json;
|
|
2174
|
+
return {
|
|
2175
|
+
"type": json["type"],
|
|
2176
|
+
"ref": json["ref"],
|
|
2177
|
+
"kind": RangeKindFromJSON(json["kind"])
|
|
2178
|
+
};
|
|
2179
|
+
}
|
|
2180
|
+
function RangeSegmentToJSON(json) {
|
|
2181
|
+
return RangeSegmentToJSONTyped(json, false);
|
|
2182
|
+
}
|
|
2183
|
+
function RangeSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2184
|
+
if (value == null) return value;
|
|
2185
|
+
return {
|
|
2186
|
+
"type": value["type"],
|
|
2187
|
+
"ref": value["ref"],
|
|
2188
|
+
"kind": RangeKindToJSON(value["kind"])
|
|
2189
|
+
};
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
//#endregion
|
|
2193
|
+
//#region src/models/RegionSegment.ts
|
|
2194
|
+
/**
|
|
2195
|
+
* @export
|
|
2196
|
+
*/
|
|
2197
|
+
const RegionSegmentTypeEnum = { region: "region" };
|
|
2198
|
+
/**
|
|
2199
|
+
* Check if a given object implements the RegionSegment interface.
|
|
2200
|
+
*/
|
|
2201
|
+
function instanceOfRegionSegment(value) {
|
|
2202
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
2203
|
+
if (!("x" in value) || value["x"] === void 0) return false;
|
|
2204
|
+
if (!("y" in value) || value["y"] === void 0) return false;
|
|
2205
|
+
if (!("w" in value) || value["w"] === void 0) return false;
|
|
2206
|
+
if (!("h" in value) || value["h"] === void 0) return false;
|
|
2207
|
+
return true;
|
|
2208
|
+
}
|
|
2209
|
+
function RegionSegmentFromJSON(json) {
|
|
2210
|
+
return RegionSegmentFromJSONTyped(json, false);
|
|
2211
|
+
}
|
|
2212
|
+
function RegionSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2213
|
+
if (json == null) return json;
|
|
2214
|
+
return {
|
|
2215
|
+
"type": json["type"],
|
|
2216
|
+
"x": json["x"],
|
|
2217
|
+
"y": json["y"],
|
|
2218
|
+
"w": json["w"],
|
|
2219
|
+
"h": json["h"]
|
|
2220
|
+
};
|
|
2221
|
+
}
|
|
2222
|
+
function RegionSegmentToJSON(json) {
|
|
2223
|
+
return RegionSegmentToJSONTyped(json, false);
|
|
2224
|
+
}
|
|
2225
|
+
function RegionSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2226
|
+
if (value == null) return value;
|
|
2227
|
+
return {
|
|
2228
|
+
"type": value["type"],
|
|
2229
|
+
"x": value["x"],
|
|
2230
|
+
"y": value["y"],
|
|
2231
|
+
"w": value["w"],
|
|
2232
|
+
"h": value["h"]
|
|
2233
|
+
};
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2236
|
+
//#endregion
|
|
2237
|
+
//#region src/models/SegmentSegment.ts
|
|
2238
|
+
/**
|
|
2239
|
+
* @export
|
|
2240
|
+
*/
|
|
2241
|
+
const SegmentSegmentTypeEnum = { segment: "segment" };
|
|
2242
|
+
/**
|
|
2243
|
+
* Check if a given object implements the SegmentSegment interface.
|
|
2244
|
+
*/
|
|
2245
|
+
function instanceOfSegmentSegment(value) {
|
|
2246
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
2247
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
2248
|
+
if (!("index" in value) || value["index"] === void 0) return false;
|
|
2249
|
+
return true;
|
|
2250
|
+
}
|
|
2251
|
+
function SegmentSegmentFromJSON(json) {
|
|
2252
|
+
return SegmentSegmentFromJSONTyped(json, false);
|
|
2253
|
+
}
|
|
2254
|
+
function SegmentSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2255
|
+
if (json == null) return json;
|
|
2256
|
+
return {
|
|
2257
|
+
"type": json["type"],
|
|
2258
|
+
"name": json["name"],
|
|
2259
|
+
"index": json["index"]
|
|
2260
|
+
};
|
|
2261
|
+
}
|
|
2262
|
+
function SegmentSegmentToJSON(json) {
|
|
2263
|
+
return SegmentSegmentToJSONTyped(json, false);
|
|
2264
|
+
}
|
|
2265
|
+
function SegmentSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2266
|
+
if (value == null) return value;
|
|
2267
|
+
return {
|
|
2268
|
+
"type": value["type"],
|
|
2269
|
+
"name": value["name"],
|
|
2270
|
+
"index": value["index"]
|
|
2271
|
+
};
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2274
|
+
//#endregion
|
|
2275
|
+
//#region src/models/ShapeKind.ts
|
|
2276
|
+
function ShapeKindFromJSON(json) {
|
|
2277
|
+
return ShapeKindFromJSONTyped(json, false);
|
|
2278
|
+
}
|
|
2279
|
+
function ShapeKindFromJSONTyped(json, ignoreDiscriminator) {
|
|
2280
|
+
if (json == null) return json;
|
|
2281
|
+
if (typeof json === "string" && json === "field_code") return json;
|
|
2282
|
+
if (typeof json === "string" && json === "form_field") return json;
|
|
2283
|
+
if (typeof json === "string" && json === "object_name") return json;
|
|
2284
|
+
if (typeof json === "string" && json === "deleted_text") return json;
|
|
2285
|
+
if (typeof json === "string" && json === "hyperlink") return json;
|
|
2286
|
+
if (typeof json === "string" && json === "content_control") return json;
|
|
2287
|
+
if (typeof json === "string" && json === "alternative_text") return json;
|
|
2288
|
+
if (typeof json === "string" && json === "attribute") return json;
|
|
2289
|
+
return {};
|
|
2290
|
+
}
|
|
2291
|
+
function ShapeKindToJSON(json) {
|
|
2292
|
+
return ShapeKindToJSONTyped(json, false);
|
|
2293
|
+
}
|
|
2294
|
+
function ShapeKindToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2295
|
+
if (value == null) return value;
|
|
2296
|
+
if (typeof value === "string" && value === "field_code") return value;
|
|
2297
|
+
if (typeof value === "string" && value === "form_field") return value;
|
|
2298
|
+
if (typeof value === "string" && value === "object_name") return value;
|
|
2299
|
+
if (typeof value === "string" && value === "deleted_text") return value;
|
|
2300
|
+
if (typeof value === "string" && value === "hyperlink") return value;
|
|
2301
|
+
if (typeof value === "string" && value === "content_control") return value;
|
|
2302
|
+
if (typeof value === "string" && value === "alternative_text") return value;
|
|
2303
|
+
if (typeof value === "string" && value === "attribute") return value;
|
|
2304
|
+
return {};
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
//#endregion
|
|
2308
|
+
//#region src/models/ShapeSegment.ts
|
|
2309
|
+
/**
|
|
2310
|
+
* @export
|
|
2311
|
+
*/
|
|
2312
|
+
const ShapeSegmentTypeEnum = { shape: "shape" };
|
|
2313
|
+
/**
|
|
2314
|
+
* Check if a given object implements the ShapeSegment interface.
|
|
2315
|
+
*/
|
|
2316
|
+
function instanceOfShapeSegment(value) {
|
|
2317
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
2318
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
2319
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
2320
|
+
return true;
|
|
2321
|
+
}
|
|
2322
|
+
function ShapeSegmentFromJSON(json) {
|
|
2323
|
+
return ShapeSegmentFromJSONTyped(json, false);
|
|
2324
|
+
}
|
|
2325
|
+
function ShapeSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2326
|
+
if (json == null) return json;
|
|
2327
|
+
return {
|
|
2328
|
+
"type": json["type"],
|
|
2329
|
+
"id": json["id"],
|
|
2330
|
+
"name": json["name"],
|
|
2331
|
+
"kind": json["kind"] == null ? void 0 : ShapeKindFromJSON(json["kind"])
|
|
2332
|
+
};
|
|
2333
|
+
}
|
|
2334
|
+
function ShapeSegmentToJSON(json) {
|
|
2335
|
+
return ShapeSegmentToJSONTyped(json, false);
|
|
2336
|
+
}
|
|
2337
|
+
function ShapeSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2338
|
+
if (value == null) return value;
|
|
2339
|
+
return {
|
|
2340
|
+
"type": value["type"],
|
|
2341
|
+
"id": value["id"],
|
|
2342
|
+
"name": value["name"],
|
|
2343
|
+
"kind": ShapeKindToJSON(value["kind"])
|
|
2344
|
+
};
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
//#endregion
|
|
2348
|
+
//#region src/models/SheetSegment.ts
|
|
2349
|
+
/**
|
|
2350
|
+
* @export
|
|
2351
|
+
*/
|
|
2352
|
+
const SheetSegmentTypeEnum = { sheet: "sheet" };
|
|
2353
|
+
/**
|
|
2354
|
+
* Check if a given object implements the SheetSegment interface.
|
|
2355
|
+
*/
|
|
2356
|
+
function instanceOfSheetSegment(value) {
|
|
2357
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
2358
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
2359
|
+
if (!("part" in value) || value["part"] === void 0) return false;
|
|
2360
|
+
return true;
|
|
2361
|
+
}
|
|
2362
|
+
function SheetSegmentFromJSON(json) {
|
|
2363
|
+
return SheetSegmentFromJSONTyped(json, false);
|
|
2364
|
+
}
|
|
2365
|
+
function SheetSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2366
|
+
if (json == null) return json;
|
|
2367
|
+
return {
|
|
2368
|
+
"type": json["type"],
|
|
2369
|
+
"name": json["name"],
|
|
2370
|
+
"part": json["part"]
|
|
2371
|
+
};
|
|
2372
|
+
}
|
|
2373
|
+
function SheetSegmentToJSON(json) {
|
|
2374
|
+
return SheetSegmentToJSONTyped(json, false);
|
|
2375
|
+
}
|
|
2376
|
+
function SheetSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2377
|
+
if (value == null) return value;
|
|
2378
|
+
return {
|
|
2379
|
+
"type": value["type"],
|
|
2380
|
+
"name": value["name"],
|
|
2381
|
+
"part": value["part"]
|
|
2382
|
+
};
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
//#endregion
|
|
2386
|
+
//#region src/models/SlideSegment.ts
|
|
2387
|
+
/**
|
|
2388
|
+
* @export
|
|
2389
|
+
*/
|
|
2390
|
+
const SlideSegmentTypeEnum = { slide: "slide" };
|
|
2391
|
+
/**
|
|
2392
|
+
* Check if a given object implements the SlideSegment interface.
|
|
2393
|
+
*/
|
|
2394
|
+
function instanceOfSlideSegment(value) {
|
|
2395
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
2396
|
+
if (!("number" in value) || value["number"] === void 0) return false;
|
|
2397
|
+
if (!("part" in value) || value["part"] === void 0) return false;
|
|
2398
|
+
return true;
|
|
2399
|
+
}
|
|
2400
|
+
function SlideSegmentFromJSON(json) {
|
|
2401
|
+
return SlideSegmentFromJSONTyped(json, false);
|
|
2402
|
+
}
|
|
2403
|
+
function SlideSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2404
|
+
if (json == null) return json;
|
|
2405
|
+
return {
|
|
2406
|
+
"type": json["type"],
|
|
2407
|
+
"number": json["number"],
|
|
2408
|
+
"part": json["part"],
|
|
2409
|
+
"kind": json["kind"] == null ? void 0 : KindFromJSON(json["kind"])
|
|
2410
|
+
};
|
|
2411
|
+
}
|
|
2412
|
+
function SlideSegmentToJSON(json) {
|
|
2413
|
+
return SlideSegmentToJSONTyped(json, false);
|
|
2414
|
+
}
|
|
2415
|
+
function SlideSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2416
|
+
if (value == null) return value;
|
|
2417
|
+
return {
|
|
2418
|
+
"type": value["type"],
|
|
2419
|
+
"number": value["number"],
|
|
2420
|
+
"part": value["part"],
|
|
2421
|
+
"kind": KindToJSON(value["kind"])
|
|
2422
|
+
};
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
//#endregion
|
|
2426
|
+
//#region src/models/SpeakerNotesSegment.ts
|
|
2427
|
+
/**
|
|
2428
|
+
* @export
|
|
2429
|
+
*/
|
|
2430
|
+
const SpeakerNotesSegmentTypeEnum = { speaker_notes: "speaker_notes" };
|
|
2431
|
+
/**
|
|
2432
|
+
* Check if a given object implements the SpeakerNotesSegment interface.
|
|
2433
|
+
*/
|
|
2434
|
+
function instanceOfSpeakerNotesSegment(value) {
|
|
2435
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
2436
|
+
if (!("slide" in value) || value["slide"] === void 0) return false;
|
|
2437
|
+
if (!("part" in value) || value["part"] === void 0) return false;
|
|
2438
|
+
return true;
|
|
2439
|
+
}
|
|
2440
|
+
function SpeakerNotesSegmentFromJSON(json) {
|
|
2441
|
+
return SpeakerNotesSegmentFromJSONTyped(json, false);
|
|
2442
|
+
}
|
|
2443
|
+
function SpeakerNotesSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2444
|
+
if (json == null) return json;
|
|
2445
|
+
return {
|
|
2446
|
+
"type": json["type"],
|
|
2447
|
+
"slide": json["slide"],
|
|
2448
|
+
"part": json["part"],
|
|
2449
|
+
"kind": json["kind"] == null ? void 0 : KindFromJSON(json["kind"])
|
|
2450
|
+
};
|
|
2451
|
+
}
|
|
2452
|
+
function SpeakerNotesSegmentToJSON(json) {
|
|
2453
|
+
return SpeakerNotesSegmentToJSONTyped(json, false);
|
|
2454
|
+
}
|
|
2455
|
+
function SpeakerNotesSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2456
|
+
if (value == null) return value;
|
|
2457
|
+
return {
|
|
2458
|
+
"type": value["type"],
|
|
2459
|
+
"slide": value["slide"],
|
|
2460
|
+
"part": value["part"],
|
|
2461
|
+
"kind": KindToJSON(value["kind"])
|
|
2462
|
+
};
|
|
2463
|
+
}
|
|
2464
|
+
|
|
2465
|
+
//#endregion
|
|
2466
|
+
//#region src/models/TableSegment.ts
|
|
2467
|
+
/**
|
|
2468
|
+
* @export
|
|
2469
|
+
*/
|
|
2470
|
+
const TableSegmentTypeEnum = { table: "table" };
|
|
2471
|
+
/**
|
|
2472
|
+
* Check if a given object implements the TableSegment interface.
|
|
2473
|
+
*/
|
|
2474
|
+
function instanceOfTableSegment(value) {
|
|
2475
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
2476
|
+
if (!("number" in value) || value["number"] === void 0) return false;
|
|
2477
|
+
return true;
|
|
2478
|
+
}
|
|
2479
|
+
function TableSegmentFromJSON(json) {
|
|
2480
|
+
return TableSegmentFromJSONTyped(json, false);
|
|
2481
|
+
}
|
|
2482
|
+
function TableSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2483
|
+
if (json == null) return json;
|
|
2484
|
+
return {
|
|
2485
|
+
"type": json["type"],
|
|
2486
|
+
"number": json["number"]
|
|
2487
|
+
};
|
|
2488
|
+
}
|
|
2489
|
+
function TableSegmentToJSON(json) {
|
|
2490
|
+
return TableSegmentToJSONTyped(json, false);
|
|
2491
|
+
}
|
|
2492
|
+
function TableSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2493
|
+
if (value == null) return value;
|
|
2494
|
+
return {
|
|
2495
|
+
"type": value["type"],
|
|
2496
|
+
"number": value["number"]
|
|
2497
|
+
};
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
//#endregion
|
|
2501
|
+
//#region src/models/TagSegment.ts
|
|
2502
|
+
/**
|
|
2503
|
+
* @export
|
|
2504
|
+
*/
|
|
2505
|
+
const TagSegmentTypeEnum = { tag: "tag" };
|
|
2506
|
+
/**
|
|
2507
|
+
* Check if a given object implements the TagSegment interface.
|
|
2508
|
+
*/
|
|
2509
|
+
function instanceOfTagSegment(value) {
|
|
2510
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
2511
|
+
if (!("group" in value) || value["group"] === void 0) return false;
|
|
2512
|
+
if (!("element" in value) || value["element"] === void 0) return false;
|
|
2513
|
+
return true;
|
|
2514
|
+
}
|
|
2515
|
+
function TagSegmentFromJSON(json) {
|
|
2516
|
+
return TagSegmentFromJSONTyped(json, false);
|
|
2517
|
+
}
|
|
2518
|
+
function TagSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2519
|
+
if (json == null) return json;
|
|
2520
|
+
return {
|
|
2521
|
+
"type": json["type"],
|
|
2522
|
+
"group": json["group"],
|
|
2523
|
+
"element": json["element"],
|
|
2524
|
+
"keyword": json["keyword"] == null ? void 0 : json["keyword"]
|
|
2525
|
+
};
|
|
2526
|
+
}
|
|
2527
|
+
function TagSegmentToJSON(json) {
|
|
2528
|
+
return TagSegmentToJSONTyped(json, false);
|
|
2529
|
+
}
|
|
2530
|
+
function TagSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2531
|
+
if (value == null) return value;
|
|
2532
|
+
return {
|
|
2533
|
+
"type": value["type"],
|
|
2534
|
+
"group": value["group"],
|
|
2535
|
+
"element": value["element"],
|
|
2536
|
+
"keyword": value["keyword"]
|
|
2537
|
+
};
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
//#endregion
|
|
2541
|
+
//#region src/models/TextSegment.ts
|
|
2542
|
+
/**
|
|
2543
|
+
* @export
|
|
2544
|
+
*/
|
|
2545
|
+
const TextSegmentTypeEnum = { text: "text" };
|
|
2546
|
+
/**
|
|
2547
|
+
* Check if a given object implements the TextSegment interface.
|
|
2548
|
+
*/
|
|
2549
|
+
function instanceOfTextSegment(value) {
|
|
2550
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
2551
|
+
if (!("input" in value) || value["input"] === void 0) return false;
|
|
2552
|
+
if (!("output" in value) || value["output"] === void 0) return false;
|
|
2553
|
+
return true;
|
|
2554
|
+
}
|
|
2555
|
+
function TextSegmentFromJSON(json) {
|
|
2556
|
+
return TextSegmentFromJSONTyped(json, false);
|
|
2557
|
+
}
|
|
2558
|
+
function TextSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2559
|
+
if (json == null) return json;
|
|
2560
|
+
return {
|
|
2561
|
+
"type": json["type"],
|
|
2562
|
+
"input": TextRangeFromJSON(json["input"]),
|
|
2563
|
+
"output": TextRangeFromJSON(json["output"])
|
|
2564
|
+
};
|
|
2565
|
+
}
|
|
2566
|
+
function TextSegmentToJSON(json) {
|
|
2567
|
+
return TextSegmentToJSONTyped(json, false);
|
|
2568
|
+
}
|
|
2569
|
+
function TextSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2570
|
+
if (value == null) return value;
|
|
2571
|
+
return {
|
|
2572
|
+
"type": value["type"],
|
|
2573
|
+
"input": TextRangeToJSON(value["input"]),
|
|
2574
|
+
"output": TextRangeToJSON(value["output"])
|
|
2575
|
+
};
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
//#endregion
|
|
2579
|
+
//#region src/models/PathSegment.ts
|
|
2580
|
+
function PathSegmentFromJSON(json) {
|
|
2581
|
+
return PathSegmentFromJSONTyped(json, false);
|
|
2582
|
+
}
|
|
2583
|
+
function PathSegmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2584
|
+
if (json == null) return json;
|
|
2585
|
+
switch (json["type"]) {
|
|
2586
|
+
case "attribute": return Object.assign({}, AttributeSegmentFromJSONTyped(json, true), { type: "attribute" });
|
|
2587
|
+
case "cell": return Object.assign({}, CellSegmentFromJSONTyped(json, true), { type: "cell" });
|
|
2588
|
+
case "cell_note": return Object.assign({}, CellNoteSegmentFromJSONTyped(json, true), { type: "cell_note" });
|
|
2589
|
+
case "comment": return Object.assign({}, CommentSegmentFromJSONTyped(json, true), { type: "comment" });
|
|
2590
|
+
case "component": return Object.assign({}, ComponentSegmentFromJSONTyped(json, true), { type: "component" });
|
|
2591
|
+
case "element": return Object.assign({}, ElementSegmentFromJSONTyped(json, true), { type: "element" });
|
|
2592
|
+
case "endnote": return Object.assign({}, EndnoteSegmentFromJSONTyped(json, true), { type: "endnote" });
|
|
2593
|
+
case "field": return Object.assign({}, FieldSegmentFromJSONTyped(json, true), { type: "field" });
|
|
2594
|
+
case "footnote": return Object.assign({}, FootnoteSegmentFromJSONTyped(json, true), { type: "footnote" });
|
|
2595
|
+
case "frame": return Object.assign({}, FrameSegmentFromJSONTyped(json, true), { type: "frame" });
|
|
2596
|
+
case "header_footer": return Object.assign({}, HeaderFooterSegmentFromJSONTyped(json, true), { type: "header_footer" });
|
|
2597
|
+
case "index": return Object.assign({}, IndexSegmentFromJSONTyped(json, true), { type: "index" });
|
|
2598
|
+
case "item": return Object.assign({}, ItemSegmentFromJSONTyped(json, true), { type: "item" });
|
|
2599
|
+
case "key": return Object.assign({}, KeySegmentFromJSONTyped(json, true), { type: "key" });
|
|
2600
|
+
case "line": return Object.assign({}, LineSegmentFromJSONTyped(json, true), { type: "line" });
|
|
2601
|
+
case "paragraph": return Object.assign({}, ParagraphSegmentFromJSONTyped(json, true), { type: "paragraph" });
|
|
2602
|
+
case "part": return Object.assign({}, PartSegmentFromJSONTyped(json, true), { type: "part" });
|
|
2603
|
+
case "property": return Object.assign({}, PropertySegmentFromJSONTyped(json, true), { type: "property" });
|
|
2604
|
+
case "range": return Object.assign({}, RangeSegmentFromJSONTyped(json, true), { type: "range" });
|
|
2605
|
+
case "region": return Object.assign({}, RegionSegmentFromJSONTyped(json, true), { type: "region" });
|
|
2606
|
+
case "segment": return Object.assign({}, SegmentSegmentFromJSONTyped(json, true), { type: "segment" });
|
|
2607
|
+
case "shape": return Object.assign({}, ShapeSegmentFromJSONTyped(json, true), { type: "shape" });
|
|
2608
|
+
case "sheet": return Object.assign({}, SheetSegmentFromJSONTyped(json, true), { type: "sheet" });
|
|
2609
|
+
case "slide": return Object.assign({}, SlideSegmentFromJSONTyped(json, true), { type: "slide" });
|
|
2610
|
+
case "speaker_notes": return Object.assign({}, SpeakerNotesSegmentFromJSONTyped(json, true), { type: "speaker_notes" });
|
|
2611
|
+
case "table": return Object.assign({}, TableSegmentFromJSONTyped(json, true), { type: "table" });
|
|
2612
|
+
case "tag": return Object.assign({}, TagSegmentFromJSONTyped(json, true), { type: "tag" });
|
|
2613
|
+
case "text": return Object.assign({}, TextSegmentFromJSONTyped(json, true), { type: "text" });
|
|
2614
|
+
default: return json;
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
function PathSegmentToJSON(json) {
|
|
2618
|
+
return PathSegmentToJSONTyped(json, false);
|
|
2619
|
+
}
|
|
2620
|
+
function PathSegmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2621
|
+
if (value == null) return value;
|
|
2622
|
+
switch (value["type"]) {
|
|
2623
|
+
case "attribute": return Object.assign({}, AttributeSegmentToJSON(value), { type: "attribute" });
|
|
2624
|
+
case "cell": return Object.assign({}, CellSegmentToJSON(value), { type: "cell" });
|
|
2625
|
+
case "cell_note": return Object.assign({}, CellNoteSegmentToJSON(value), { type: "cell_note" });
|
|
2626
|
+
case "comment": return Object.assign({}, CommentSegmentToJSON(value), { type: "comment" });
|
|
2627
|
+
case "component": return Object.assign({}, ComponentSegmentToJSON(value), { type: "component" });
|
|
2628
|
+
case "element": return Object.assign({}, ElementSegmentToJSON(value), { type: "element" });
|
|
2629
|
+
case "endnote": return Object.assign({}, EndnoteSegmentToJSON(value), { type: "endnote" });
|
|
2630
|
+
case "field": return Object.assign({}, FieldSegmentToJSON(value), { type: "field" });
|
|
2631
|
+
case "footnote": return Object.assign({}, FootnoteSegmentToJSON(value), { type: "footnote" });
|
|
2632
|
+
case "frame": return Object.assign({}, FrameSegmentToJSON(value), { type: "frame" });
|
|
2633
|
+
case "header_footer": return Object.assign({}, HeaderFooterSegmentToJSON(value), { type: "header_footer" });
|
|
2634
|
+
case "index": return Object.assign({}, IndexSegmentToJSON(value), { type: "index" });
|
|
2635
|
+
case "item": return Object.assign({}, ItemSegmentToJSON(value), { type: "item" });
|
|
2636
|
+
case "key": return Object.assign({}, KeySegmentToJSON(value), { type: "key" });
|
|
2637
|
+
case "line": return Object.assign({}, LineSegmentToJSON(value), { type: "line" });
|
|
2638
|
+
case "paragraph": return Object.assign({}, ParagraphSegmentToJSON(value), { type: "paragraph" });
|
|
2639
|
+
case "part": return Object.assign({}, PartSegmentToJSON(value), { type: "part" });
|
|
2640
|
+
case "property": return Object.assign({}, PropertySegmentToJSON(value), { type: "property" });
|
|
2641
|
+
case "range": return Object.assign({}, RangeSegmentToJSON(value), { type: "range" });
|
|
2642
|
+
case "region": return Object.assign({}, RegionSegmentToJSON(value), { type: "region" });
|
|
2643
|
+
case "segment": return Object.assign({}, SegmentSegmentToJSON(value), { type: "segment" });
|
|
2644
|
+
case "shape": return Object.assign({}, ShapeSegmentToJSON(value), { type: "shape" });
|
|
2645
|
+
case "sheet": return Object.assign({}, SheetSegmentToJSON(value), { type: "sheet" });
|
|
2646
|
+
case "slide": return Object.assign({}, SlideSegmentToJSON(value), { type: "slide" });
|
|
2647
|
+
case "speaker_notes": return Object.assign({}, SpeakerNotesSegmentToJSON(value), { type: "speaker_notes" });
|
|
2648
|
+
case "table": return Object.assign({}, TableSegmentToJSON(value), { type: "table" });
|
|
2649
|
+
case "tag": return Object.assign({}, TagSegmentToJSON(value), { type: "tag" });
|
|
2650
|
+
case "text": return Object.assign({}, TextSegmentToJSON(value), { type: "text" });
|
|
2651
|
+
default: return value;
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
|
|
2655
|
+
//#endregion
|
|
2656
|
+
//#region src/models/At.ts
|
|
2657
|
+
/**
|
|
2658
|
+
* Check if a given object implements the At interface.
|
|
2659
|
+
*/
|
|
2660
|
+
function instanceOfAt(value) {
|
|
2661
|
+
if (!("path" in value) || value["path"] === void 0) return false;
|
|
2662
|
+
if (!("text" in value) || value["text"] === void 0) return false;
|
|
2663
|
+
return true;
|
|
2664
|
+
}
|
|
2665
|
+
function AtFromJSON(json) {
|
|
2666
|
+
return AtFromJSONTyped(json, false);
|
|
2667
|
+
}
|
|
2668
|
+
function AtFromJSONTyped(json, ignoreDiscriminator) {
|
|
2669
|
+
if (json == null) return json;
|
|
2670
|
+
return {
|
|
2671
|
+
"path": json["path"].map(PathSegmentFromJSON),
|
|
2672
|
+
"text": json["text"]
|
|
2673
|
+
};
|
|
2674
|
+
}
|
|
2675
|
+
function AtToJSON(json) {
|
|
2676
|
+
return AtToJSONTyped(json, false);
|
|
2677
|
+
}
|
|
2678
|
+
function AtToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2679
|
+
if (value == null) return value;
|
|
2680
|
+
return {
|
|
2681
|
+
"path": value["path"].map(PathSegmentToJSON),
|
|
2682
|
+
"text": value["text"]
|
|
2683
|
+
};
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
//#endregion
|
|
2687
|
+
//#region src/models/PolicyDocumentRulesInner.ts
|
|
2688
|
+
function PolicyDocumentRulesInnerFromJSON(json) {
|
|
2689
|
+
return PolicyDocumentRulesInnerFromJSONTyped(json, false);
|
|
2690
|
+
}
|
|
2691
|
+
function PolicyDocumentRulesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
2692
|
+
if (json == null) return json;
|
|
2693
|
+
switch (json["type"]) {
|
|
2694
|
+
case "detect": return Object.assign({}, DetectRuleFromJSONTyped(json, true), { type: "detect" });
|
|
2695
|
+
case "encrypt": return Object.assign({}, EncryptRuleFromJSONTyped(json, true), { type: "encrypt" });
|
|
2696
|
+
case "hmac": return Object.assign({}, HMACRuleFromJSONTyped(json, true), { type: "hmac" });
|
|
2697
|
+
case "mask": return Object.assign({}, MaskRuleFromJSONTyped(json, true), { type: "mask" });
|
|
2698
|
+
case "pseudonymize": return Object.assign({}, PseudonymizeRuleFromJSONTyped(json, true), { type: "pseudonymize" });
|
|
2699
|
+
case "redact": return Object.assign({}, RedactRuleFromJSONTyped(json, true), { type: "redact" });
|
|
2700
|
+
case "replace": return Object.assign({}, ReplaceRuleFromJSONTyped(json, true), { type: "replace" });
|
|
2701
|
+
case "sha256": return Object.assign({}, SHA256RuleFromJSONTyped(json, true), { type: "sha256" });
|
|
2702
|
+
case "sha512": return Object.assign({}, SHA512RuleFromJSONTyped(json, true), { type: "sha512" });
|
|
2703
|
+
default: return json;
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
function PolicyDocumentRulesInnerToJSON(json) {
|
|
2707
|
+
return PolicyDocumentRulesInnerToJSONTyped(json, false);
|
|
2708
|
+
}
|
|
2709
|
+
function PolicyDocumentRulesInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2710
|
+
if (value == null) return value;
|
|
2711
|
+
switch (value["type"]) {
|
|
2712
|
+
case "detect": return Object.assign({}, DetectRuleToJSON(value), { type: "detect" });
|
|
2713
|
+
case "encrypt": return Object.assign({}, EncryptRuleToJSON(value), { type: "encrypt" });
|
|
2714
|
+
case "hmac": return Object.assign({}, HMACRuleToJSON(value), { type: "hmac" });
|
|
2715
|
+
case "mask": return Object.assign({}, MaskRuleToJSON(value), { type: "mask" });
|
|
2716
|
+
case "pseudonymize": return Object.assign({}, PseudonymizeRuleToJSON(value), { type: "pseudonymize" });
|
|
2717
|
+
case "redact": return Object.assign({}, RedactRuleToJSON(value), { type: "redact" });
|
|
2718
|
+
case "replace": return Object.assign({}, ReplaceRuleToJSON(value), { type: "replace" });
|
|
2719
|
+
case "sha256": return Object.assign({}, SHA256RuleToJSON(value), { type: "sha256" });
|
|
2720
|
+
case "sha512": return Object.assign({}, SHA512RuleToJSON(value), { type: "sha512" });
|
|
2721
|
+
default: return value;
|
|
2722
|
+
}
|
|
2723
|
+
}
|
|
2724
|
+
|
|
2725
|
+
//#endregion
|
|
2726
|
+
//#region src/models/PolicyDocument.ts
|
|
2727
|
+
/**
|
|
2728
|
+
* @export
|
|
2729
|
+
*/
|
|
2730
|
+
const PolicyDocumentSchemaVersionEnum = { NUMBER_1: 1 };
|
|
2731
|
+
/**
|
|
2732
|
+
* Check if a given object implements the PolicyDocument interface.
|
|
2733
|
+
*/
|
|
2734
|
+
function instanceOfPolicyDocument(value) {
|
|
2735
|
+
if (!("schema_version" in value) || value["schema_version"] === void 0) return false;
|
|
2736
|
+
if (!("rules" in value) || value["rules"] === void 0) return false;
|
|
2737
|
+
return true;
|
|
2738
|
+
}
|
|
2739
|
+
function PolicyDocumentFromJSON(json) {
|
|
2740
|
+
return PolicyDocumentFromJSONTyped(json, false);
|
|
2741
|
+
}
|
|
2742
|
+
function PolicyDocumentFromJSONTyped(json, ignoreDiscriminator) {
|
|
2743
|
+
if (json == null) return json;
|
|
2744
|
+
return {
|
|
2745
|
+
"schema_version": json["schema_version"],
|
|
2746
|
+
"name": json["name"] == null ? void 0 : json["name"],
|
|
2747
|
+
"confidence_threshold": json["confidence_threshold"] == null ? void 0 : json["confidence_threshold"],
|
|
2748
|
+
"rules": json["rules"].map(PolicyDocumentRulesInnerFromJSON)
|
|
2749
|
+
};
|
|
2750
|
+
}
|
|
2751
|
+
function PolicyDocumentToJSON(json) {
|
|
2752
|
+
return PolicyDocumentToJSONTyped(json, false);
|
|
2753
|
+
}
|
|
2754
|
+
function PolicyDocumentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2755
|
+
if (value == null) return value;
|
|
2756
|
+
return {
|
|
2757
|
+
"schema_version": value["schema_version"],
|
|
2758
|
+
"name": value["name"],
|
|
2759
|
+
"confidence_threshold": value["confidence_threshold"],
|
|
2760
|
+
"rules": value["rules"].map(PolicyDocumentRulesInnerToJSON)
|
|
2761
|
+
};
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2764
|
+
//#endregion
|
|
2765
|
+
//#region src/models/CreatePolicyRequest.ts
|
|
2766
|
+
/**
|
|
2767
|
+
* Check if a given object implements the CreatePolicyRequest interface.
|
|
2768
|
+
*/
|
|
2769
|
+
function instanceOfCreatePolicyRequest(value) {
|
|
2770
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
2771
|
+
if (!("document" in value) || value["document"] === void 0) return false;
|
|
2772
|
+
return true;
|
|
2773
|
+
}
|
|
2774
|
+
function CreatePolicyRequestFromJSON(json) {
|
|
2775
|
+
return CreatePolicyRequestFromJSONTyped(json, false);
|
|
2776
|
+
}
|
|
2777
|
+
function CreatePolicyRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
2778
|
+
if (json == null) return json;
|
|
2779
|
+
return {
|
|
2780
|
+
"name": json["name"],
|
|
2781
|
+
"document": PolicyDocumentFromJSON(json["document"])
|
|
2782
|
+
};
|
|
2783
|
+
}
|
|
2784
|
+
function CreatePolicyRequestToJSON(json) {
|
|
2785
|
+
return CreatePolicyRequestToJSONTyped(json, false);
|
|
2786
|
+
}
|
|
2787
|
+
function CreatePolicyRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2788
|
+
if (value == null) return value;
|
|
2789
|
+
return {
|
|
2790
|
+
"name": value["name"],
|
|
2791
|
+
"document": PolicyDocumentToJSON(value["document"])
|
|
2792
|
+
};
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
//#endregion
|
|
2796
|
+
//#region src/models/ErrorCode.ts
|
|
2797
|
+
/**
|
|
2798
|
+
* Sensitive Data Protection API
|
|
2799
|
+
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, pseudonymize, hash, or encrypt).
|
|
2800
|
+
*
|
|
2801
|
+
* The version of the OpenAPI document: 0.1.0
|
|
2802
|
+
*
|
|
2803
|
+
*
|
|
2804
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2805
|
+
* https://openapi-generator.tech
|
|
2806
|
+
* Do not edit the class manually.
|
|
2807
|
+
*/
|
|
2808
|
+
/**
|
|
2809
|
+
* What went wrong, for callers to branch on. `invalid_json` (400): the body
|
|
2810
|
+
* is not JSON. `invalid_request` (422): some fields are invalid, `details`
|
|
2811
|
+
* says which. `unauthorized` (401), `not_found` (404), `method_not_allowed`
|
|
2812
|
+
* (405). `internal` (500): the request failed; retrying may help.
|
|
2813
|
+
* `unavailable` (503): the model is not loaded.
|
|
2814
|
+
* `forbidden` (403): the caller's assigned policy sets the rules or threshold. `policy_unreadable` (409): that policy cannot be read.
|
|
2815
|
+
* @export
|
|
2816
|
+
*/
|
|
2817
|
+
const ErrorCode = {
|
|
2818
|
+
invalid_json: "invalid_json",
|
|
2819
|
+
invalid_request: "invalid_request",
|
|
2820
|
+
unauthorized: "unauthorized",
|
|
2821
|
+
not_found: "not_found",
|
|
2822
|
+
method_not_allowed: "method_not_allowed",
|
|
2823
|
+
internal: "internal",
|
|
2824
|
+
unavailable: "unavailable",
|
|
2825
|
+
forbidden: "forbidden",
|
|
2826
|
+
policy_unreadable: "policy_unreadable"
|
|
2827
|
+
};
|
|
2828
|
+
function instanceOfErrorCode(value) {
|
|
2829
|
+
for (const key in ErrorCode) if (Object.prototype.hasOwnProperty.call(ErrorCode, key)) {
|
|
2830
|
+
if (ErrorCode[key] === value) return true;
|
|
2831
|
+
}
|
|
2832
|
+
return false;
|
|
2833
|
+
}
|
|
2834
|
+
function ErrorCodeFromJSON(json) {
|
|
2835
|
+
return ErrorCodeFromJSONTyped(json, false);
|
|
2836
|
+
}
|
|
2837
|
+
function ErrorCodeFromJSONTyped(json, ignoreDiscriminator) {
|
|
2838
|
+
return json;
|
|
2839
|
+
}
|
|
2840
|
+
function ErrorCodeToJSON(value) {
|
|
2841
|
+
return value;
|
|
2842
|
+
}
|
|
2843
|
+
function ErrorCodeToJSONTyped(value, ignoreDiscriminator) {
|
|
2844
|
+
return value;
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
//#endregion
|
|
2848
|
+
//#region src/models/FieldErrorPathInner.ts
|
|
2849
|
+
/**
|
|
2850
|
+
* Check if a given object implements the FieldErrorPathInner interface.
|
|
2851
|
+
*/
|
|
2852
|
+
function instanceOfFieldErrorPathInner(value) {
|
|
2853
|
+
return true;
|
|
2854
|
+
}
|
|
2855
|
+
function FieldErrorPathInnerFromJSON(json) {
|
|
2856
|
+
return FieldErrorPathInnerFromJSONTyped(json, false);
|
|
2857
|
+
}
|
|
2858
|
+
function FieldErrorPathInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
2859
|
+
return json;
|
|
2860
|
+
}
|
|
2861
|
+
function FieldErrorPathInnerToJSON(json) {
|
|
2862
|
+
return FieldErrorPathInnerToJSONTyped(json, false);
|
|
2863
|
+
}
|
|
2864
|
+
function FieldErrorPathInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2865
|
+
return value;
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
//#endregion
|
|
2869
|
+
//#region src/models/FieldErrorCode.ts
|
|
2870
|
+
/**
|
|
2871
|
+
* Sensitive Data Protection API
|
|
2872
|
+
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, pseudonymize, hash, or encrypt).
|
|
2873
|
+
*
|
|
2874
|
+
* The version of the OpenAPI document: 0.1.0
|
|
2875
|
+
*
|
|
2876
|
+
*
|
|
2877
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2878
|
+
* https://openapi-generator.tech
|
|
2879
|
+
* Do not edit the class manually.
|
|
2880
|
+
*/
|
|
2881
|
+
/**
|
|
2882
|
+
* Why one field was refused. `missing`; `wrong_type` (see `expected`);
|
|
2883
|
+
* `too_short`/`too_long` in characters and `too_large` in UTF-8 bytes (see
|
|
2884
|
+
* `limit`); `too_few`/`too_many` items (see `limit`); `out_of_range` (see
|
|
2885
|
+
* `min`, `max`); `blank`: only whitespace; `unknown_type` (see `allowed`);
|
|
2886
|
+
* `invalid_pattern`: not a regular expression the engine runs;
|
|
2887
|
+
* `invalid_key`: not a Fernet key; `labels_over_budget`: the labels leave
|
|
2888
|
+
* the model too little room for text (see `tokens`, `limit`).
|
|
2889
|
+
* @export
|
|
2890
|
+
*/
|
|
2891
|
+
const FieldErrorCode = {
|
|
2892
|
+
missing: "missing",
|
|
2893
|
+
wrong_type: "wrong_type",
|
|
2894
|
+
too_short: "too_short",
|
|
2895
|
+
too_long: "too_long",
|
|
2896
|
+
too_large: "too_large",
|
|
2897
|
+
too_few: "too_few",
|
|
2898
|
+
too_many: "too_many",
|
|
2899
|
+
out_of_range: "out_of_range",
|
|
2900
|
+
blank: "blank",
|
|
2901
|
+
unknown_type: "unknown_type",
|
|
2902
|
+
invalid_pattern: "invalid_pattern",
|
|
2903
|
+
invalid_key: "invalid_key",
|
|
2904
|
+
labels_over_budget: "labels_over_budget"
|
|
2905
|
+
};
|
|
2906
|
+
function instanceOfFieldErrorCode(value) {
|
|
2907
|
+
for (const key in FieldErrorCode) if (Object.prototype.hasOwnProperty.call(FieldErrorCode, key)) {
|
|
2908
|
+
if (FieldErrorCode[key] === value) return true;
|
|
2909
|
+
}
|
|
2910
|
+
return false;
|
|
2911
|
+
}
|
|
2912
|
+
function FieldErrorCodeFromJSON(json) {
|
|
2913
|
+
return FieldErrorCodeFromJSONTyped(json, false);
|
|
2914
|
+
}
|
|
2915
|
+
function FieldErrorCodeFromJSONTyped(json, ignoreDiscriminator) {
|
|
2916
|
+
return json;
|
|
2917
|
+
}
|
|
2918
|
+
function FieldErrorCodeToJSON(value) {
|
|
2919
|
+
return value;
|
|
2920
|
+
}
|
|
2921
|
+
function FieldErrorCodeToJSONTyped(value, ignoreDiscriminator) {
|
|
2922
|
+
return value;
|
|
2923
|
+
}
|
|
2924
|
+
|
|
2925
|
+
//#endregion
|
|
2926
|
+
//#region src/models/FieldError.ts
|
|
2927
|
+
/**
|
|
2928
|
+
* Check if a given object implements the FieldError interface.
|
|
2929
|
+
*/
|
|
2930
|
+
function instanceOfFieldError(value) {
|
|
2931
|
+
if (!("path" in value) || value["path"] === void 0) return false;
|
|
2932
|
+
if (!("code" in value) || value["code"] === void 0) return false;
|
|
2933
|
+
if (!("message" in value) || value["message"] === void 0) return false;
|
|
2934
|
+
return true;
|
|
2935
|
+
}
|
|
2936
|
+
function FieldErrorFromJSON(json) {
|
|
2937
|
+
return FieldErrorFromJSONTyped(json, false);
|
|
2938
|
+
}
|
|
2939
|
+
function FieldErrorFromJSONTyped(json, ignoreDiscriminator) {
|
|
2940
|
+
if (json == null) return json;
|
|
2941
|
+
return {
|
|
2942
|
+
"path": json["path"].map(FieldErrorPathInnerFromJSON),
|
|
2943
|
+
"code": FieldErrorCodeFromJSON(json["code"]),
|
|
2944
|
+
"message": json["message"],
|
|
2945
|
+
"limit": json["limit"] == null ? void 0 : json["limit"],
|
|
2946
|
+
"min": json["min"] == null ? void 0 : json["min"],
|
|
2947
|
+
"max": json["max"] == null ? void 0 : json["max"],
|
|
2948
|
+
"expected": json["expected"] == null ? void 0 : json["expected"],
|
|
2949
|
+
"allowed": json["allowed"] == null ? void 0 : json["allowed"],
|
|
2950
|
+
"tokens": json["tokens"] == null ? void 0 : json["tokens"]
|
|
2951
|
+
};
|
|
2952
|
+
}
|
|
2953
|
+
function FieldErrorToJSON(json) {
|
|
2954
|
+
return FieldErrorToJSONTyped(json, false);
|
|
2955
|
+
}
|
|
2956
|
+
function FieldErrorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2957
|
+
if (value == null) return value;
|
|
2958
|
+
return {
|
|
2959
|
+
"path": value["path"].map(FieldErrorPathInnerToJSON),
|
|
2960
|
+
"code": FieldErrorCodeToJSON(value["code"]),
|
|
2961
|
+
"message": value["message"],
|
|
2962
|
+
"limit": value["limit"],
|
|
2963
|
+
"min": value["min"],
|
|
2964
|
+
"max": value["max"],
|
|
2965
|
+
"expected": value["expected"],
|
|
2966
|
+
"allowed": value["allowed"],
|
|
2967
|
+
"tokens": value["tokens"]
|
|
2968
|
+
};
|
|
2969
|
+
}
|
|
2970
|
+
|
|
2971
|
+
//#endregion
|
|
2972
|
+
//#region src/models/ErrorInfo.ts
|
|
980
2973
|
/**
|
|
981
|
-
* Check if a given object implements the
|
|
2974
|
+
* Check if a given object implements the ErrorInfo interface.
|
|
982
2975
|
*/
|
|
983
|
-
function
|
|
984
|
-
if (!("
|
|
985
|
-
if (!("
|
|
986
|
-
if (!("input" in value) || value["input"] === void 0) return false;
|
|
987
|
-
if (!("output" in value) || value["output"] === void 0) return false;
|
|
2976
|
+
function instanceOfErrorInfo(value) {
|
|
2977
|
+
if (!("code" in value) || value["code"] === void 0) return false;
|
|
2978
|
+
if (!("message" in value) || value["message"] === void 0) return false;
|
|
988
2979
|
return true;
|
|
989
2980
|
}
|
|
990
|
-
function
|
|
991
|
-
return
|
|
2981
|
+
function ErrorInfoFromJSON(json) {
|
|
2982
|
+
return ErrorInfoFromJSONTyped(json, false);
|
|
992
2983
|
}
|
|
993
|
-
function
|
|
2984
|
+
function ErrorInfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
994
2985
|
if (json == null) return json;
|
|
995
2986
|
return {
|
|
996
|
-
"
|
|
997
|
-
"
|
|
998
|
-
"
|
|
999
|
-
"input": TextRangeFromJSON(json["input"]),
|
|
1000
|
-
"output": TextRangeFromJSON(json["output"]),
|
|
1001
|
-
"score": json["score"] == null ? void 0 : json["score"]
|
|
2987
|
+
"code": ErrorCodeFromJSON(json["code"]),
|
|
2988
|
+
"message": json["message"],
|
|
2989
|
+
"details": json["details"] == null ? void 0 : json["details"].map(FieldErrorFromJSON)
|
|
1002
2990
|
};
|
|
1003
2991
|
}
|
|
1004
|
-
function
|
|
1005
|
-
return
|
|
2992
|
+
function ErrorInfoToJSON(json) {
|
|
2993
|
+
return ErrorInfoToJSONTyped(json, false);
|
|
1006
2994
|
}
|
|
1007
|
-
function
|
|
2995
|
+
function ErrorInfoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1008
2996
|
if (value == null) return value;
|
|
1009
2997
|
return {
|
|
1010
|
-
"
|
|
1011
|
-
"
|
|
1012
|
-
"
|
|
1013
|
-
"input": TextRangeToJSON(value["input"]),
|
|
1014
|
-
"output": TextRangeToJSON(value["output"]),
|
|
1015
|
-
"score": value["score"]
|
|
2998
|
+
"code": ErrorCodeToJSON(value["code"]),
|
|
2999
|
+
"message": value["message"],
|
|
3000
|
+
"details": value["details"] == null ? void 0 : value["details"].map(FieldErrorToJSON)
|
|
1016
3001
|
};
|
|
1017
3002
|
}
|
|
1018
3003
|
|
|
1019
3004
|
//#endregion
|
|
1020
|
-
//#region src/models/
|
|
3005
|
+
//#region src/models/PolicySummary.ts
|
|
1021
3006
|
/**
|
|
1022
|
-
* Check if a given object implements the
|
|
3007
|
+
* Check if a given object implements the PolicySummary interface.
|
|
1023
3008
|
*/
|
|
1024
|
-
function
|
|
3009
|
+
function instanceOfPolicySummary(value) {
|
|
1025
3010
|
if (!("id" in value) || value["id"] === void 0) return false;
|
|
1026
3011
|
if (!("name" in value) || value["name"] === void 0) return false;
|
|
1027
3012
|
if (!("versionId" in value) || value["versionId"] === void 0) return false;
|
|
1028
|
-
if (!("document" in value) || value["document"] === void 0) return false;
|
|
1029
3013
|
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
1030
3014
|
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
1031
3015
|
return true;
|
|
1032
3016
|
}
|
|
1033
|
-
function
|
|
1034
|
-
return
|
|
3017
|
+
function PolicySummaryFromJSON(json) {
|
|
3018
|
+
return PolicySummaryFromJSONTyped(json, false);
|
|
1035
3019
|
}
|
|
1036
|
-
function
|
|
3020
|
+
function PolicySummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
1037
3021
|
if (json == null) return json;
|
|
1038
3022
|
return {
|
|
1039
3023
|
"id": json["id"],
|
|
1040
3024
|
"name": json["name"],
|
|
1041
3025
|
"versionId": json["versionId"],
|
|
1042
|
-
"document": PolicyDocumentFromJSON(json["document"]),
|
|
1043
3026
|
"createdAt": json["createdAt"],
|
|
1044
3027
|
"updatedAt": json["updatedAt"]
|
|
1045
3028
|
};
|
|
1046
3029
|
}
|
|
1047
|
-
function
|
|
1048
|
-
return
|
|
3030
|
+
function PolicySummaryToJSON(json) {
|
|
3031
|
+
return PolicySummaryToJSONTyped(json, false);
|
|
1049
3032
|
}
|
|
1050
|
-
function
|
|
3033
|
+
function PolicySummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1051
3034
|
if (value == null) return value;
|
|
1052
3035
|
return {
|
|
1053
3036
|
"id": value["id"],
|
|
1054
3037
|
"name": value["name"],
|
|
1055
3038
|
"versionId": value["versionId"],
|
|
1056
|
-
"document": PolicyDocumentToJSON(value["document"]),
|
|
1057
3039
|
"createdAt": value["createdAt"],
|
|
1058
3040
|
"updatedAt": value["updatedAt"]
|
|
1059
3041
|
};
|
|
1060
3042
|
}
|
|
1061
3043
|
|
|
1062
3044
|
//#endregion
|
|
1063
|
-
//#region src/models/
|
|
1064
|
-
/**
|
|
1065
|
-
* @export
|
|
1066
|
-
*/
|
|
1067
|
-
const RedactRuleTypeEnum = { redact: "redact" };
|
|
3045
|
+
//#region src/models/ListPolicies200Response.ts
|
|
1068
3046
|
/**
|
|
1069
|
-
* Check if a given object implements the
|
|
3047
|
+
* Check if a given object implements the ListPolicies200Response interface.
|
|
1070
3048
|
*/
|
|
1071
|
-
function
|
|
1072
|
-
if (!("
|
|
3049
|
+
function instanceOfListPolicies200Response(value) {
|
|
3050
|
+
if (!("policies" in value) || value["policies"] === void 0) return false;
|
|
1073
3051
|
return true;
|
|
1074
3052
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return
|
|
3053
|
+
function ListPolicies200ResponseFromJSON(json) {
|
|
3054
|
+
return ListPolicies200ResponseFromJSONTyped(json, false);
|
|
1077
3055
|
}
|
|
1078
|
-
function
|
|
3056
|
+
function ListPolicies200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1079
3057
|
if (json == null) return json;
|
|
1080
|
-
return {
|
|
1081
|
-
"type": json["type"] == null ? void 0 : json["type"],
|
|
1082
|
-
"entities": json["entities"].map(DetectRuleEntitiesInnerFromJSON)
|
|
1083
|
-
};
|
|
3058
|
+
return { "policies": json["policies"].map(PolicySummaryFromJSON) };
|
|
1084
3059
|
}
|
|
1085
|
-
function
|
|
1086
|
-
return
|
|
3060
|
+
function ListPolicies200ResponseToJSON(json) {
|
|
3061
|
+
return ListPolicies200ResponseToJSONTyped(json, false);
|
|
1087
3062
|
}
|
|
1088
|
-
function
|
|
3063
|
+
function ListPolicies200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1089
3064
|
if (value == null) return value;
|
|
1090
|
-
return {
|
|
1091
|
-
"type": value["type"],
|
|
1092
|
-
"entities": value["entities"].map(DetectRuleEntitiesInnerToJSON)
|
|
1093
|
-
};
|
|
3065
|
+
return { "policies": value["policies"].map(PolicySummaryToJSON) };
|
|
1094
3066
|
}
|
|
1095
3067
|
|
|
1096
3068
|
//#endregion
|
|
1097
|
-
//#region src/models/
|
|
1098
|
-
/**
|
|
1099
|
-
* @export
|
|
1100
|
-
*/
|
|
1101
|
-
const RegexEntityTypeEnum = { regex: "regex" };
|
|
3069
|
+
//#region src/models/ModelError.ts
|
|
1102
3070
|
/**
|
|
1103
|
-
* Check if a given object implements the
|
|
3071
|
+
* Check if a given object implements the ModelError interface.
|
|
1104
3072
|
*/
|
|
1105
|
-
function
|
|
1106
|
-
if (!("
|
|
3073
|
+
function instanceOfModelError(value) {
|
|
3074
|
+
if (!("error" in value) || value["error"] === void 0) return false;
|
|
1107
3075
|
return true;
|
|
1108
3076
|
}
|
|
1109
|
-
function
|
|
1110
|
-
return
|
|
3077
|
+
function ModelErrorFromJSON(json) {
|
|
3078
|
+
return ModelErrorFromJSONTyped(json, false);
|
|
1111
3079
|
}
|
|
1112
|
-
function
|
|
3080
|
+
function ModelErrorFromJSONTyped(json, ignoreDiscriminator) {
|
|
1113
3081
|
if (json == null) return json;
|
|
1114
|
-
return {
|
|
1115
|
-
"type": json["type"] == null ? void 0 : json["type"],
|
|
1116
|
-
"value": json["value"]
|
|
1117
|
-
};
|
|
3082
|
+
return { "error": ErrorInfoFromJSON(json["error"]) };
|
|
1118
3083
|
}
|
|
1119
|
-
function
|
|
1120
|
-
return
|
|
3084
|
+
function ModelErrorToJSON(json) {
|
|
3085
|
+
return ModelErrorToJSONTyped(json, false);
|
|
1121
3086
|
}
|
|
1122
|
-
function
|
|
3087
|
+
function ModelErrorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1123
3088
|
if (value == null) return value;
|
|
1124
|
-
return {
|
|
1125
|
-
"type": value["type"],
|
|
1126
|
-
"value": value["value"]
|
|
1127
|
-
};
|
|
3089
|
+
return { "error": ErrorInfoToJSON(value["error"]) };
|
|
1128
3090
|
}
|
|
1129
3091
|
|
|
1130
3092
|
//#endregion
|
|
1131
|
-
//#region src/models/
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
*/
|
|
1135
|
-
const RegexResultTypeEnum = { regex: "regex" };
|
|
1136
|
-
/**
|
|
1137
|
-
* Check if a given object implements the RegexResult interface.
|
|
1138
|
-
*/
|
|
1139
|
-
function instanceOfRegexResult(value) {
|
|
1140
|
-
if (!("rule" in value) || value["rule"] === void 0) return false;
|
|
1141
|
-
if (!("value" in value) || value["value"] === void 0) return false;
|
|
1142
|
-
if (!("input" in value) || value["input"] === void 0) return false;
|
|
1143
|
-
if (!("output" in value) || value["output"] === void 0) return false;
|
|
1144
|
-
return true;
|
|
1145
|
-
}
|
|
1146
|
-
function RegexResultFromJSON(json) {
|
|
1147
|
-
return RegexResultFromJSONTyped(json, false);
|
|
3093
|
+
//#region src/models/ModelType.ts
|
|
3094
|
+
function ModelTypeFromJSON(json) {
|
|
3095
|
+
return ModelTypeFromJSONTyped(json, false);
|
|
1148
3096
|
}
|
|
1149
|
-
function
|
|
3097
|
+
function ModelTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
1150
3098
|
if (json == null) return json;
|
|
1151
|
-
return
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
"value": json["value"],
|
|
1155
|
-
"input": TextRangeFromJSON(json["input"]),
|
|
1156
|
-
"output": TextRangeFromJSON(json["output"])
|
|
1157
|
-
};
|
|
3099
|
+
if (typeof json === "string" && json === "text") return json;
|
|
3100
|
+
if (typeof json === "string" && json === "image") return json;
|
|
3101
|
+
return {};
|
|
1158
3102
|
}
|
|
1159
|
-
function
|
|
1160
|
-
return
|
|
3103
|
+
function ModelTypeToJSON(json) {
|
|
3104
|
+
return ModelTypeToJSONTyped(json, false);
|
|
1161
3105
|
}
|
|
1162
|
-
function
|
|
3106
|
+
function ModelTypeToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1163
3107
|
if (value == null) return value;
|
|
1164
|
-
return
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
"value": value["value"],
|
|
1168
|
-
"input": TextRangeToJSON(value["input"]),
|
|
1169
|
-
"output": TextRangeToJSON(value["output"])
|
|
1170
|
-
};
|
|
3108
|
+
if (typeof value === "string" && value === "text") return value;
|
|
3109
|
+
if (typeof value === "string" && value === "image") return value;
|
|
3110
|
+
return {};
|
|
1171
3111
|
}
|
|
1172
3112
|
|
|
1173
3113
|
//#endregion
|
|
1174
|
-
//#region src/models/
|
|
1175
|
-
/**
|
|
1176
|
-
* @export
|
|
1177
|
-
*/
|
|
1178
|
-
const ReplaceRuleTypeEnum = { replace: "replace" };
|
|
3114
|
+
//#region src/models/ModelStatus.ts
|
|
1179
3115
|
/**
|
|
1180
|
-
* Check if a given object implements the
|
|
3116
|
+
* Check if a given object implements the ModelStatus interface.
|
|
1181
3117
|
*/
|
|
1182
|
-
function
|
|
1183
|
-
if (!("
|
|
3118
|
+
function instanceOfModelStatus(value) {
|
|
3119
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
3120
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
3121
|
+
if (!("_default" in value) || value["_default"] === void 0) return false;
|
|
3122
|
+
if (!("ready" in value) || value["ready"] === void 0) return false;
|
|
1184
3123
|
return true;
|
|
1185
3124
|
}
|
|
1186
|
-
function
|
|
1187
|
-
return
|
|
3125
|
+
function ModelStatusFromJSON(json) {
|
|
3126
|
+
return ModelStatusFromJSONTyped(json, false);
|
|
1188
3127
|
}
|
|
1189
|
-
function
|
|
3128
|
+
function ModelStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
1190
3129
|
if (json == null) return json;
|
|
1191
3130
|
return {
|
|
1192
|
-
"
|
|
1193
|
-
"
|
|
1194
|
-
"
|
|
3131
|
+
"id": json["id"],
|
|
3132
|
+
"type": ModelTypeFromJSON(json["type"]),
|
|
3133
|
+
"_default": json["default"],
|
|
3134
|
+
"ready": json["ready"],
|
|
3135
|
+
"description": json["description"] == null ? void 0 : json["description"],
|
|
3136
|
+
"error": json["error"] == null ? void 0 : json["error"]
|
|
1195
3137
|
};
|
|
1196
3138
|
}
|
|
1197
|
-
function
|
|
1198
|
-
return
|
|
3139
|
+
function ModelStatusToJSON(json) {
|
|
3140
|
+
return ModelStatusToJSONTyped(json, false);
|
|
1199
3141
|
}
|
|
1200
|
-
function
|
|
3142
|
+
function ModelStatusToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1201
3143
|
if (value == null) return value;
|
|
1202
3144
|
return {
|
|
1203
|
-
"
|
|
1204
|
-
"
|
|
1205
|
-
"
|
|
3145
|
+
"id": value["id"],
|
|
3146
|
+
"type": ModelTypeToJSON(value["type"]),
|
|
3147
|
+
"default": value["_default"],
|
|
3148
|
+
"ready": value["ready"],
|
|
3149
|
+
"description": value["description"],
|
|
3150
|
+
"error": value["error"]
|
|
1206
3151
|
};
|
|
1207
3152
|
}
|
|
1208
3153
|
|
|
1209
3154
|
//#endregion
|
|
1210
|
-
//#region src/models/
|
|
1211
|
-
/**
|
|
1212
|
-
* @export
|
|
1213
|
-
*/
|
|
1214
|
-
const SHA256RuleTypeEnum = { sha256: "sha256" };
|
|
3155
|
+
//#region src/models/Policy.ts
|
|
1215
3156
|
/**
|
|
1216
|
-
* Check if a given object implements the
|
|
3157
|
+
* Check if a given object implements the Policy interface.
|
|
1217
3158
|
*/
|
|
1218
|
-
function
|
|
1219
|
-
if (!("
|
|
3159
|
+
function instanceOfPolicy(value) {
|
|
3160
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
3161
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
3162
|
+
if (!("versionId" in value) || value["versionId"] === void 0) return false;
|
|
3163
|
+
if (!("document" in value) || value["document"] === void 0) return false;
|
|
3164
|
+
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
3165
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
1220
3166
|
return true;
|
|
1221
3167
|
}
|
|
1222
|
-
function
|
|
1223
|
-
return
|
|
3168
|
+
function PolicyFromJSON(json) {
|
|
3169
|
+
return PolicyFromJSONTyped(json, false);
|
|
1224
3170
|
}
|
|
1225
|
-
function
|
|
3171
|
+
function PolicyFromJSONTyped(json, ignoreDiscriminator) {
|
|
1226
3172
|
if (json == null) return json;
|
|
1227
3173
|
return {
|
|
1228
|
-
"
|
|
1229
|
-
"
|
|
3174
|
+
"id": json["id"],
|
|
3175
|
+
"name": json["name"],
|
|
3176
|
+
"versionId": json["versionId"],
|
|
3177
|
+
"document": PolicyDocumentFromJSON(json["document"]),
|
|
3178
|
+
"createdAt": json["createdAt"],
|
|
3179
|
+
"updatedAt": json["updatedAt"]
|
|
1230
3180
|
};
|
|
1231
3181
|
}
|
|
1232
|
-
function
|
|
1233
|
-
return
|
|
3182
|
+
function PolicyToJSON(json) {
|
|
3183
|
+
return PolicyToJSONTyped(json, false);
|
|
1234
3184
|
}
|
|
1235
|
-
function
|
|
3185
|
+
function PolicyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1236
3186
|
if (value == null) return value;
|
|
1237
3187
|
return {
|
|
1238
|
-
"
|
|
1239
|
-
"
|
|
3188
|
+
"id": value["id"],
|
|
3189
|
+
"name": value["name"],
|
|
3190
|
+
"versionId": value["versionId"],
|
|
3191
|
+
"document": PolicyDocumentToJSON(value["document"]),
|
|
3192
|
+
"createdAt": value["createdAt"],
|
|
3193
|
+
"updatedAt": value["updatedAt"]
|
|
1240
3194
|
};
|
|
1241
3195
|
}
|
|
1242
3196
|
|
|
1243
3197
|
//#endregion
|
|
1244
|
-
//#region src/models/
|
|
1245
|
-
/**
|
|
1246
|
-
* @export
|
|
1247
|
-
*/
|
|
1248
|
-
const SHA512RuleTypeEnum = { sha512: "sha512" };
|
|
3198
|
+
//#region src/models/Refusal.ts
|
|
1249
3199
|
/**
|
|
1250
|
-
* Check if a given object implements the
|
|
3200
|
+
* Check if a given object implements the Refusal interface.
|
|
1251
3201
|
*/
|
|
1252
|
-
function
|
|
1253
|
-
if (!("
|
|
3202
|
+
function instanceOfRefusal(value) {
|
|
3203
|
+
if (!("error" in value) || value["error"] === void 0) return false;
|
|
1254
3204
|
return true;
|
|
1255
3205
|
}
|
|
1256
|
-
function
|
|
1257
|
-
return
|
|
3206
|
+
function RefusalFromJSON(json) {
|
|
3207
|
+
return RefusalFromJSONTyped(json, false);
|
|
1258
3208
|
}
|
|
1259
|
-
function
|
|
3209
|
+
function RefusalFromJSONTyped(json, ignoreDiscriminator) {
|
|
1260
3210
|
if (json == null) return json;
|
|
1261
3211
|
return {
|
|
1262
|
-
"
|
|
1263
|
-
"
|
|
3212
|
+
"error": json["error"],
|
|
3213
|
+
"signup": json["signup"] == null ? void 0 : json["signup"]
|
|
1264
3214
|
};
|
|
1265
3215
|
}
|
|
1266
|
-
function
|
|
1267
|
-
return
|
|
3216
|
+
function RefusalToJSON(json) {
|
|
3217
|
+
return RefusalToJSONTyped(json, false);
|
|
1268
3218
|
}
|
|
1269
|
-
function
|
|
3219
|
+
function RefusalToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1270
3220
|
if (value == null) return value;
|
|
1271
3221
|
return {
|
|
1272
|
-
"
|
|
1273
|
-
"
|
|
3222
|
+
"error": value["error"],
|
|
3223
|
+
"signup": value["signup"]
|
|
1274
3224
|
};
|
|
1275
3225
|
}
|
|
1276
3226
|
|
|
@@ -1292,7 +3242,8 @@ function ScanRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1292
3242
|
"text": json["text"],
|
|
1293
3243
|
"language": json["language"] == null ? void 0 : json["language"],
|
|
1294
3244
|
"entities": json["entities"] == null ? void 0 : json["entities"],
|
|
1295
|
-
"confidence_threshold": json["confidence_threshold"] == null ? void 0 : json["confidence_threshold"]
|
|
3245
|
+
"confidence_threshold": json["confidence_threshold"] == null ? void 0 : json["confidence_threshold"],
|
|
3246
|
+
"models": json["models"] == null ? void 0 : json["models"]
|
|
1296
3247
|
};
|
|
1297
3248
|
}
|
|
1298
3249
|
function ScanRequestBodyToJSON(json) {
|
|
@@ -1304,7 +3255,8 @@ function ScanRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1304
3255
|
"text": value["text"],
|
|
1305
3256
|
"language": value["language"],
|
|
1306
3257
|
"entities": value["entities"],
|
|
1307
|
-
"confidence_threshold": value["confidence_threshold"]
|
|
3258
|
+
"confidence_threshold": value["confidence_threshold"],
|
|
3259
|
+
"models": value["models"]
|
|
1308
3260
|
};
|
|
1309
3261
|
}
|
|
1310
3262
|
|
|
@@ -1353,6 +3305,7 @@ function ScanResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1353
3305
|
function instanceOfScanResponseBody(value) {
|
|
1354
3306
|
if (!("results" in value) || value["results"] === void 0) return false;
|
|
1355
3307
|
if (!("usage" in value) || value["usage"] === void 0) return false;
|
|
3308
|
+
if (!("models" in value) || value["models"] === void 0) return false;
|
|
1356
3309
|
return true;
|
|
1357
3310
|
}
|
|
1358
3311
|
function ScanResponseBodyFromJSON(json) {
|
|
@@ -1362,7 +3315,8 @@ function ScanResponseBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1362
3315
|
if (json == null) return json;
|
|
1363
3316
|
return {
|
|
1364
3317
|
"results": json["results"].map(ScanResultFromJSON),
|
|
1365
|
-
"usage": UsageFromJSON(json["usage"])
|
|
3318
|
+
"usage": UsageFromJSON(json["usage"]),
|
|
3319
|
+
"models": json["models"]
|
|
1366
3320
|
};
|
|
1367
3321
|
}
|
|
1368
3322
|
function ScanResponseBodyToJSON(json) {
|
|
@@ -1372,7 +3326,8 @@ function ScanResponseBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1372
3326
|
if (value == null) return value;
|
|
1373
3327
|
return {
|
|
1374
3328
|
"results": value["results"].map(ScanResultToJSON),
|
|
1375
|
-
"usage": UsageToJSON(value["usage"])
|
|
3329
|
+
"usage": UsageToJSON(value["usage"]),
|
|
3330
|
+
"models": value["models"]
|
|
1376
3331
|
};
|
|
1377
3332
|
}
|
|
1378
3333
|
|
|
@@ -1409,7 +3364,7 @@ function UpdatePolicyRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1409
3364
|
//#region src/apis/PoliciesApi.ts
|
|
1410
3365
|
/**
|
|
1411
3366
|
* Sensitive Data Protection API
|
|
1412
|
-
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, hash, or encrypt).
|
|
3367
|
+
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, pseudonymize, hash, or encrypt).
|
|
1413
3368
|
*
|
|
1414
3369
|
* The version of the OpenAPI document: 0.1.0
|
|
1415
3370
|
*
|
|
@@ -1551,7 +3506,7 @@ var PoliciesApi = class extends BaseAPI {
|
|
|
1551
3506
|
//#region src/apis/SensitiveDataProtectionApi.ts
|
|
1552
3507
|
/**
|
|
1553
3508
|
* Sensitive Data Protection API
|
|
1554
|
-
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, hash, or encrypt).
|
|
3509
|
+
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, pseudonymize, hash, or encrypt).
|
|
1555
3510
|
*
|
|
1556
3511
|
* The version of the OpenAPI document: 0.1.0
|
|
1557
3512
|
*
|
|
@@ -1565,7 +3520,53 @@ var PoliciesApi = class extends BaseAPI {
|
|
|
1565
3520
|
*/
|
|
1566
3521
|
var SensitiveDataProtectionApi = class extends BaseAPI {
|
|
1567
3522
|
/**
|
|
1568
|
-
* Anonymize sensitive data in
|
|
3523
|
+
* Anonymize sensitive data in a file. Reads the file\'s text (Office parts, cells, lines), applies the rules as `/anonymize` does, and returns the file in its own format with every change made: each value found, with where it is (`path`), and each part removed. With `Accept: application/x-ndjson`, answers with one JSON event per line: `start`, a `batch` per step of reading, then `done` (the same body) or `error`. An Office file\'s images and kept embedded files are read as files of their own beside its text: each has `task` events (queued, started, then done, stopped or failed), and its own `start` and `batch` events carry its `task` path.
|
|
3524
|
+
* Anonymize File
|
|
3525
|
+
*/
|
|
3526
|
+
async anonymizeFileRaw(requestParameters, initOverrides) {
|
|
3527
|
+
if (requestParameters["file"] == null) throw new RequiredError("file", "Required parameter \"file\" was null or undefined when calling anonymizeFile().");
|
|
3528
|
+
const queryParameters = {};
|
|
3529
|
+
const headerParameters = {};
|
|
3530
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key");
|
|
3531
|
+
const canConsumeForm$1 = canConsumeForm([{ contentType: "multipart/form-data" }]);
|
|
3532
|
+
let formParams;
|
|
3533
|
+
let useForm = false;
|
|
3534
|
+
useForm = canConsumeForm$1;
|
|
3535
|
+
if (useForm) formParams = new FormData();
|
|
3536
|
+
else formParams = new URLSearchParams();
|
|
3537
|
+
if (requestParameters["file"] != null) formParams.append("file", requestParameters["file"]);
|
|
3538
|
+
if (requestParameters["rules"] != null) formParams.append("rules", requestParameters["rules"]);
|
|
3539
|
+
if (requestParameters["confidence_threshold"] != null) formParams.append("confidence_threshold", requestParameters["confidence_threshold"]);
|
|
3540
|
+
if (requestParameters["embedded_rules"] != null) formParams.append("embedded_rules", requestParameters["embedded_rules"]);
|
|
3541
|
+
if (requestParameters["table_headers"] != null) formParams.append("table_headers", requestParameters["table_headers"]);
|
|
3542
|
+
if (requestParameters["models"] != null) formParams.append("models", requestParameters["models"]);
|
|
3543
|
+
if (requestParameters["dicom_options"] != null) formParams.append("dicom_options", requestParameters["dicom_options"]);
|
|
3544
|
+
const response = await this.request({
|
|
3545
|
+
path: `/anonymize/file`,
|
|
3546
|
+
method: "POST",
|
|
3547
|
+
headers: headerParameters,
|
|
3548
|
+
query: queryParameters,
|
|
3549
|
+
body: formParams
|
|
3550
|
+
}, initOverrides);
|
|
3551
|
+
return new JSONApiResponse(response, (jsonValue) => AnonymizeFileResponseBodyFromJSON(jsonValue));
|
|
3552
|
+
}
|
|
3553
|
+
/**
|
|
3554
|
+
* Anonymize sensitive data in a file. Reads the file\'s text (Office parts, cells, lines), applies the rules as `/anonymize` does, and returns the file in its own format with every change made: each value found, with where it is (`path`), and each part removed. With `Accept: application/x-ndjson`, answers with one JSON event per line: `start`, a `batch` per step of reading, then `done` (the same body) or `error`. An Office file\'s images and kept embedded files are read as files of their own beside its text: each has `task` events (queued, started, then done, stopped or failed), and its own `start` and `batch` events carry its `task` path.
|
|
3555
|
+
* Anonymize File
|
|
3556
|
+
*/
|
|
3557
|
+
async anonymizeFile(file, rules, confidence_threshold, embedded_rules, table_headers, models, dicom_options, initOverrides) {
|
|
3558
|
+
return await (await this.anonymizeFileRaw({
|
|
3559
|
+
file,
|
|
3560
|
+
rules,
|
|
3561
|
+
confidence_threshold,
|
|
3562
|
+
embedded_rules,
|
|
3563
|
+
table_headers,
|
|
3564
|
+
models,
|
|
3565
|
+
dicom_options
|
|
3566
|
+
}, initOverrides)).value();
|
|
3567
|
+
}
|
|
3568
|
+
/**
|
|
3569
|
+
* Anonymize sensitive data in text. Scans the request text for the entities targeted by each supplied rule and applies that rule\'s operation (replace, redact, mask, pseudonymize, hash, or encrypt) to every match. Returns the anonymized text together with a record of each transformation, including the original and resulting character ranges.
|
|
1569
3570
|
* Anonymize Text
|
|
1570
3571
|
*/
|
|
1571
3572
|
async anonymizeTextRaw(requestParameters, initOverrides) {
|
|
@@ -1584,7 +3585,7 @@ var SensitiveDataProtectionApi = class extends BaseAPI {
|
|
|
1584
3585
|
return new JSONApiResponse(response, (jsonValue) => AnonymizeResponseBodyFromJSON(jsonValue));
|
|
1585
3586
|
}
|
|
1586
3587
|
/**
|
|
1587
|
-
* Anonymize sensitive data in text. Scans the request text for the entities targeted by each supplied rule and applies that rule\'s operation (replace, redact, mask, hash, or encrypt) to every match. Returns the anonymized text together with a record of each transformation, including the original and resulting character ranges.
|
|
3588
|
+
* Anonymize sensitive data in text. Scans the request text for the entities targeted by each supplied rule and applies that rule\'s operation (replace, redact, mask, pseudonymize, hash, or encrypt) to every match. Returns the anonymized text together with a record of each transformation, including the original and resulting character ranges.
|
|
1588
3589
|
* Anonymize Text
|
|
1589
3590
|
*/
|
|
1590
3591
|
async anonymizeText(AnonymizeRequestBody, initOverrides) {
|
|
@@ -1615,6 +3616,26 @@ var SensitiveDataProtectionApi = class extends BaseAPI {
|
|
|
1615
3616
|
return await (await this.healthCheckRaw(initOverrides)).value();
|
|
1616
3617
|
}
|
|
1617
3618
|
/**
|
|
3619
|
+
* The models this server offers: text models (`type: text`, run on every request), then image readers (`type: image`, read a file\'s images), each type largest first. A request lists ids in `models`, each type\'s in order of preference: of each type, the first `ready` runs. If none of a type it names is ready, it is refused with a 503, with `Retry-After` while one still loads. A type it names none of runs on its `default`: the first `ready`, largest first (so `default` moves as models load); at startup, before any is ready, the request waits for the first to load. An unknown id is a 422.
|
|
3620
|
+
* List Models
|
|
3621
|
+
*/
|
|
3622
|
+
async listModelsRaw(initOverrides) {
|
|
3623
|
+
const response = await this.request({
|
|
3624
|
+
path: `/models`,
|
|
3625
|
+
method: "GET",
|
|
3626
|
+
headers: {},
|
|
3627
|
+
query: {}
|
|
3628
|
+
}, initOverrides);
|
|
3629
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(ModelStatusFromJSON));
|
|
3630
|
+
}
|
|
3631
|
+
/**
|
|
3632
|
+
* The models this server offers: text models (`type: text`, run on every request), then image readers (`type: image`, read a file\'s images), each type largest first. A request lists ids in `models`, each type\'s in order of preference: of each type, the first `ready` runs. If none of a type it names is ready, it is refused with a 503, with `Retry-After` while one still loads. A type it names none of runs on its `default`: the first `ready`, largest first (so `default` moves as models load); at startup, before any is ready, the request waits for the first to load. An unknown id is a 422.
|
|
3633
|
+
* List Models
|
|
3634
|
+
*/
|
|
3635
|
+
async listModels(initOverrides) {
|
|
3636
|
+
return await (await this.listModelsRaw(initOverrides)).value();
|
|
3637
|
+
}
|
|
3638
|
+
/**
|
|
1618
3639
|
* Scan text for sensitive data. Runs the configured detection entities over the request text and returns every match as a character range with its entity type and confidence score. Detections below the confidence threshold are omitted.
|
|
1619
3640
|
* Scan Text
|
|
1620
3641
|
*/
|
|
@@ -1641,6 +3662,24 @@ var SensitiveDataProtectionApi = class extends BaseAPI {
|
|
|
1641
3662
|
return await (await this.scanTextRaw({ ScanRequestBody }, initOverrides)).value();
|
|
1642
3663
|
}
|
|
1643
3664
|
};
|
|
3665
|
+
/**
|
|
3666
|
+
* @export
|
|
3667
|
+
*/
|
|
3668
|
+
const AnonymizeFileEmbeddedRulesEnum = {
|
|
3669
|
+
anonymize: "anonymize",
|
|
3670
|
+
anonymize_or_keep: "anonymize_or_keep",
|
|
3671
|
+
remove: "remove",
|
|
3672
|
+
keep: "keep"
|
|
3673
|
+
};
|
|
3674
|
+
/**
|
|
3675
|
+
* @export
|
|
3676
|
+
*/
|
|
3677
|
+
const AnonymizeFileTableHeadersEnum = {
|
|
3678
|
+
none: "none",
|
|
3679
|
+
first_row: "first_row",
|
|
3680
|
+
first_column: "first_column",
|
|
3681
|
+
last_column: "last_column"
|
|
3682
|
+
};
|
|
1644
3683
|
|
|
1645
3684
|
//#endregion
|
|
1646
|
-
export { AnonymizeRequestBodyFromJSON, AnonymizeRequestBodyFromJSONTyped, AnonymizeRequestBodyRulesInnerFromJSON, AnonymizeRequestBodyRulesInnerFromJSONTyped, AnonymizeRequestBodyRulesInnerToJSON, AnonymizeRequestBodyRulesInnerToJSONTyped, AnonymizeRequestBodyRulesInnerTypeEnum, AnonymizeRequestBodyToJSON, AnonymizeRequestBodyToJSONTyped, AnonymizeResponseBodyFromJSON, AnonymizeResponseBodyFromJSONTyped, AnonymizeResponseBodyResultsInnerFromJSON, AnonymizeResponseBodyResultsInnerFromJSONTyped, AnonymizeResponseBodyResultsInnerToJSON, AnonymizeResponseBodyResultsInnerToJSONTyped, AnonymizeResponseBodyResultsInnerTypeEnum, AnonymizeResponseBodyToJSON, AnonymizeResponseBodyToJSONTyped, BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, Configuration, CreatePolicyRequestFromJSON, CreatePolicyRequestFromJSONTyped, CreatePolicyRequestToJSON, CreatePolicyRequestToJSONTyped, DefaultConfig, DetectRuleEntitiesInnerFromJSON, DetectRuleEntitiesInnerFromJSONTyped, DetectRuleEntitiesInnerToJSON, DetectRuleEntitiesInnerToJSONTyped, DetectRuleEntitiesInnerTypeEnum, DetectRuleFromJSON, DetectRuleFromJSONTyped, DetectRuleToJSON, DetectRuleToJSONTyped, DetectRuleTypeEnum, EncryptRuleFromJSON, EncryptRuleFromJSONTyped, EncryptRuleToJSON, EncryptRuleToJSONTyped, EncryptRuleTypeEnum, FetchError, HTTPValidationErrorFromJSON, HTTPValidationErrorFromJSONTyped, HTTPValidationErrorToJSON, HTTPValidationErrorToJSONTyped, JSONApiResponse, ListPolicies200ResponseFromJSON, ListPolicies200ResponseFromJSONTyped, ListPolicies200ResponseToJSON, ListPolicies200ResponseToJSONTyped, MaskRuleFromJSON, MaskRuleFromJSONTyped, MaskRuleToJSON, MaskRuleToJSONTyped, MaskRuleTypeEnum, ModelEntityFromJSON, ModelEntityFromJSONTyped, ModelEntityToJSON, ModelEntityToJSONTyped, ModelEntityTypeEnum, ModelErrorFromJSON, ModelErrorFromJSONTyped, ModelErrorToJSON, ModelErrorToJSONTyped, ModelResultFromJSON, ModelResultFromJSONTyped, ModelResultToJSON, ModelResultToJSONTyped, ModelResultTypeEnum, PoliciesApi, PolicyDocumentFromJSON, PolicyDocumentFromJSONTyped, PolicyDocumentRulesInnerFromJSON, PolicyDocumentRulesInnerFromJSONTyped, PolicyDocumentRulesInnerToJSON, PolicyDocumentRulesInnerToJSONTyped, PolicyDocumentRulesInnerTypeEnum, PolicyDocumentSchemaVersionEnum, PolicyDocumentToJSON, PolicyDocumentToJSONTyped, PolicyFromJSON, PolicyFromJSONTyped, PolicySummaryFromJSON, PolicySummaryFromJSONTyped, PolicySummaryToJSON, PolicySummaryToJSONTyped, PolicyToJSON, PolicyToJSONTyped, RedactRuleFromJSON, RedactRuleFromJSONTyped, RedactRuleToJSON, RedactRuleToJSONTyped, RedactRuleTypeEnum, RegexEntityFromJSON, RegexEntityFromJSONTyped, RegexEntityToJSON, RegexEntityToJSONTyped, RegexEntityTypeEnum, RegexResultFromJSON, RegexResultFromJSONTyped, RegexResultToJSON, RegexResultToJSONTyped, RegexResultTypeEnum, ReplaceRuleFromJSON, ReplaceRuleFromJSONTyped, ReplaceRuleToJSON, ReplaceRuleToJSONTyped, ReplaceRuleTypeEnum, RequiredError, ResponseError, SHA256RuleFromJSON, SHA256RuleFromJSONTyped, SHA256RuleToJSON, SHA256RuleToJSONTyped, SHA256RuleTypeEnum, SHA512RuleFromJSON, SHA512RuleFromJSONTyped, SHA512RuleToJSON, SHA512RuleToJSONTyped, SHA512RuleTypeEnum, ScanRequestBodyFromJSON, ScanRequestBodyFromJSONTyped, ScanRequestBodyToJSON, ScanRequestBodyToJSONTyped, ScanResponseBodyFromJSON, ScanResponseBodyFromJSONTyped, ScanResponseBodyToJSON, ScanResponseBodyToJSONTyped, ScanResultFromJSON, ScanResultFromJSONTyped, ScanResultToJSON, ScanResultToJSONTyped, SensitiveDataProtectionApi, TextApiResponse, TextRangeFromJSON, TextRangeFromJSONTyped, TextRangeToJSON, TextRangeToJSONTyped, UpdatePolicyRequestFromJSON, UpdatePolicyRequestFromJSONTyped, UpdatePolicyRequestToJSON, UpdatePolicyRequestToJSONTyped, UsageFromJSON, UsageFromJSONTyped, UsageToJSON, UsageToJSONTyped, ValidationErrorFromJSON, ValidationErrorFromJSONTyped, ValidationErrorLocInnerFromJSON, ValidationErrorLocInnerFromJSONTyped, ValidationErrorLocInnerToJSON, ValidationErrorLocInnerToJSONTyped, ValidationErrorToJSON, ValidationErrorToJSONTyped, VoidApiResponse, canConsumeForm, exists, instanceOfAnonymizeRequestBody, instanceOfAnonymizeRequestBodyRulesInner, instanceOfAnonymizeResponseBody, instanceOfAnonymizeResponseBodyResultsInner, instanceOfCreatePolicyRequest, instanceOfDetectRule, instanceOfDetectRuleEntitiesInner, instanceOfEncryptRule, instanceOfHTTPValidationError, instanceOfListPolicies200Response, instanceOfMaskRule, instanceOfModelEntity, instanceOfModelError, instanceOfModelResult, instanceOfPolicy, instanceOfPolicyDocument, instanceOfPolicyDocumentRulesInner, instanceOfPolicySummary, instanceOfRedactRule, instanceOfRegexEntity, instanceOfRegexResult, instanceOfReplaceRule, instanceOfSHA256Rule, instanceOfSHA512Rule, instanceOfScanRequestBody, instanceOfScanResponseBody, instanceOfScanResult, instanceOfTextRange, instanceOfUpdatePolicyRequest, instanceOfUsage, instanceOfValidationError, instanceOfValidationErrorLocInner, mapValues, querystring };
|
|
3685
|
+
export { Action, ActionFromJSON, ActionFromJSONTyped, ActionToJSON, ActionToJSONTyped, AnonymizeFileEmbeddedRulesEnum, AnonymizeFileResponseBodyFromJSON, AnonymizeFileResponseBodyFromJSONTyped, AnonymizeFileResponseBodyToJSON, AnonymizeFileResponseBodyToJSONTyped, AnonymizeFileTableHeadersEnum, AnonymizeRequestBodyFromJSON, AnonymizeRequestBodyFromJSONTyped, AnonymizeRequestBodyToJSON, AnonymizeRequestBodyToJSONTyped, AnonymizeResponseBodyFromJSON, AnonymizeResponseBodyFromJSONTyped, AnonymizeResponseBodyToJSON, AnonymizeResponseBodyToJSONTyped, AppliedFromJSON, AppliedFromJSONTyped, AppliedToJSON, AppliedToJSONTyped, AtFromJSON, AtFromJSONTyped, AtToJSON, AtToJSONTyped, AttributeSegmentFromJSON, AttributeSegmentFromJSONTyped, AttributeSegmentToJSON, AttributeSegmentToJSONTyped, AttributeSegmentTypeEnum, BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, CellKindFromJSON, CellKindFromJSONTyped, CellKindToJSON, CellKindToJSONTyped, CellNoteSegmentFromJSON, CellNoteSegmentFromJSONTyped, CellNoteSegmentToJSON, CellNoteSegmentToJSONTyped, CellNoteSegmentTypeEnum, CellSegmentFromJSON, CellSegmentFromJSONTyped, CellSegmentToJSON, CellSegmentToJSONTyped, CellSegmentTypeEnum, CommentKind, CommentKindFromJSON, CommentKindFromJSONTyped, CommentKindToJSON, CommentKindToJSONTyped, CommentSegmentFromJSON, CommentSegmentFromJSONTyped, CommentSegmentToJSON, CommentSegmentToJSONTyped, CommentSegmentTypeEnum, ComponentSegmentFromJSON, ComponentSegmentFromJSONTyped, ComponentSegmentToJSON, ComponentSegmentToJSONTyped, ComponentSegmentTypeEnum, Configuration, CreatePolicyRequestFromJSON, CreatePolicyRequestFromJSONTyped, CreatePolicyRequestToJSON, CreatePolicyRequestToJSONTyped, DefaultConfig, DetectRuleFromJSON, DetectRuleFromJSONTyped, DetectRuleToJSON, DetectRuleToJSONTyped, DetectRuleTypeEnum, ElementSegmentFromJSON, ElementSegmentFromJSONTyped, ElementSegmentToJSON, ElementSegmentToJSONTyped, ElementSegmentTypeEnum, EncryptRuleFromJSON, EncryptRuleFromJSONTyped, EncryptRuleToJSON, EncryptRuleToJSONTyped, EncryptRuleTypeEnum, EndnoteSegmentFromJSON, EndnoteSegmentFromJSONTyped, EndnoteSegmentToJSON, EndnoteSegmentToJSONTyped, EndnoteSegmentTypeEnum, EntityBodyFromJSON, EntityBodyFromJSONTyped, EntityBodyToJSON, EntityBodyToJSONTyped, ErrorCode, ErrorCodeFromJSON, ErrorCodeFromJSONTyped, ErrorCodeToJSON, ErrorCodeToJSONTyped, ErrorInfoFromJSON, ErrorInfoFromJSONTyped, ErrorInfoToJSON, ErrorInfoToJSONTyped, FetchError, FieldErrorCode, FieldErrorCodeFromJSON, FieldErrorCodeFromJSONTyped, FieldErrorCodeToJSON, FieldErrorCodeToJSONTyped, FieldErrorFromJSON, FieldErrorFromJSONTyped, FieldErrorPathInnerFromJSON, FieldErrorPathInnerFromJSONTyped, FieldErrorPathInnerToJSON, FieldErrorPathInnerToJSONTyped, FieldErrorToJSON, FieldErrorToJSONTyped, FieldSegmentFromJSON, FieldSegmentFromJSONTyped, FieldSegmentToJSON, FieldSegmentToJSONTyped, FieldSegmentTypeEnum, FileAttributeResultFromJSON, FileAttributeResultFromJSONTyped, FileAttributeResultToJSON, FileAttributeResultToJSONTyped, FileAttributeResultTypeEnum, FileEmbeddedResultFromJSON, FileEmbeddedResultFromJSONTyped, FileEmbeddedResultToJSON, FileEmbeddedResultToJSONTyped, FileEmbeddedResultTypeEnum, FileModelResultFromJSON, FileModelResultFromJSONTyped, FileModelResultToJSON, FileModelResultToJSONTyped, FileModelResultTypeEnum, FileRegexResultFromJSON, FileRegexResultFromJSONTyped, FileRegexResultToJSON, FileRegexResultToJSONTyped, FileRegexResultTypeEnum, FileResultFromJSON, FileResultFromJSONTyped, FileResultToJSON, FileResultToJSONTyped, FootnoteSegmentFromJSON, FootnoteSegmentFromJSONTyped, FootnoteSegmentToJSON, FootnoteSegmentToJSONTyped, FootnoteSegmentTypeEnum, FrameSegmentFromJSON, FrameSegmentFromJSONTyped, FrameSegmentToJSON, FrameSegmentToJSONTyped, FrameSegmentTypeEnum, HMACRuleFromJSON, HMACRuleFromJSONTyped, HMACRuleToJSON, HMACRuleToJSONTyped, HMACRuleTypeEnum, HeaderFooterSegmentFromJSON, HeaderFooterSegmentFromJSONTyped, HeaderFooterSegmentToJSON, HeaderFooterSegmentToJSONTyped, HeaderFooterSegmentTypeEnum, IndexSegmentFromJSON, IndexSegmentFromJSONTyped, IndexSegmentToJSON, IndexSegmentToJSONTyped, IndexSegmentTypeEnum, ItemSegmentFromJSON, ItemSegmentFromJSONTyped, ItemSegmentToJSON, ItemSegmentToJSONTyped, ItemSegmentTypeEnum, JSONApiResponse, KeySegmentFromJSON, KeySegmentFromJSONTyped, KeySegmentToJSON, KeySegmentToJSONTyped, KeySegmentTypeEnum, KindFromJSON, KindFromJSONTyped, KindToJSON, KindToJSONTyped, LineSegmentFromJSON, LineSegmentFromJSONTyped, LineSegmentToJSON, LineSegmentToJSONTyped, LineSegmentTypeEnum, ListPolicies200ResponseFromJSON, ListPolicies200ResponseFromJSONTyped, ListPolicies200ResponseToJSON, ListPolicies200ResponseToJSONTyped, MaskRuleFromJSON, MaskRuleFromJSONTyped, MaskRuleToJSON, MaskRuleToJSONTyped, MaskRuleTypeEnum, ModelEntityFromJSON, ModelEntityFromJSONTyped, ModelEntityToJSON, ModelEntityToJSONTyped, ModelEntityTypeEnum, ModelErrorFromJSON, ModelErrorFromJSONTyped, ModelErrorToJSON, ModelErrorToJSONTyped, ModelResultFromJSON, ModelResultFromJSONTyped, ModelResultToJSON, ModelResultToJSONTyped, ModelResultTypeEnum, ModelStatusFromJSON, ModelStatusFromJSONTyped, ModelStatusToJSON, ModelStatusToJSONTyped, ModelTypeFromJSON, ModelTypeFromJSONTyped, ModelTypeToJSON, ModelTypeToJSONTyped, ParagraphKindFromJSON, ParagraphKindFromJSONTyped, ParagraphKindToJSON, ParagraphKindToJSONTyped, ParagraphSegmentFromJSON, ParagraphSegmentFromJSONTyped, ParagraphSegmentToJSON, ParagraphSegmentToJSONTyped, ParagraphSegmentTypeEnum, PartSegmentFromJSON, PartSegmentFromJSONTyped, PartSegmentToJSON, PartSegmentToJSONTyped, PartSegmentTypeEnum, PathSegmentFromJSON, PathSegmentFromJSONTyped, PathSegmentToJSON, PathSegmentToJSONTyped, PoliciesApi, PolicyDocumentFromJSON, PolicyDocumentFromJSONTyped, PolicyDocumentRulesInnerFromJSON, PolicyDocumentRulesInnerFromJSONTyped, PolicyDocumentRulesInnerToJSON, PolicyDocumentRulesInnerToJSONTyped, PolicyDocumentSchemaVersionEnum, PolicyDocumentToJSON, PolicyDocumentToJSONTyped, PolicyFromJSON, PolicyFromJSONTyped, PolicySummaryFromJSON, PolicySummaryFromJSONTyped, PolicySummaryToJSON, PolicySummaryToJSONTyped, PolicyToJSON, PolicyToJSONTyped, PropertySegmentFromJSON, PropertySegmentFromJSONTyped, PropertySegmentToJSON, PropertySegmentToJSONTyped, PropertySegmentTypeEnum, PseudonymizeRuleFromJSON, PseudonymizeRuleFromJSONTyped, PseudonymizeRuleToJSON, PseudonymizeRuleToJSONTyped, PseudonymizeRuleTypeEnum, RangeKind, RangeKindFromJSON, RangeKindFromJSONTyped, RangeKindToJSON, RangeKindToJSONTyped, RangeSegmentFromJSON, RangeSegmentFromJSONTyped, RangeSegmentToJSON, RangeSegmentToJSONTyped, RangeSegmentTypeEnum, RedactRuleFromJSON, RedactRuleFromJSONTyped, RedactRuleToJSON, RedactRuleToJSONTyped, RedactRuleTypeEnum, RefusalFromJSON, RefusalFromJSONTyped, RefusalToJSON, RefusalToJSONTyped, RegexEntityFromJSON, RegexEntityFromJSONTyped, RegexEntityToJSON, RegexEntityToJSONTyped, RegexEntityTypeEnum, RegexResultFromJSON, RegexResultFromJSONTyped, RegexResultToJSON, RegexResultToJSONTyped, RegexResultTypeEnum, RegionSegmentFromJSON, RegionSegmentFromJSONTyped, RegionSegmentToJSON, RegionSegmentToJSONTyped, RegionSegmentTypeEnum, ReplaceRuleFromJSON, ReplaceRuleFromJSONTyped, ReplaceRuleToJSON, ReplaceRuleToJSONTyped, ReplaceRuleTypeEnum, RequiredError, ResponseError, RuleBodyFromJSON, RuleBodyFromJSONTyped, RuleBodyToJSON, RuleBodyToJSONTyped, SHA256RuleFromJSON, SHA256RuleFromJSONTyped, SHA256RuleToJSON, SHA256RuleToJSONTyped, SHA256RuleTypeEnum, SHA512RuleFromJSON, SHA512RuleFromJSONTyped, SHA512RuleToJSON, SHA512RuleToJSONTyped, SHA512RuleTypeEnum, ScanRequestBodyFromJSON, ScanRequestBodyFromJSONTyped, ScanRequestBodyToJSON, ScanRequestBodyToJSONTyped, ScanResponseBodyFromJSON, ScanResponseBodyFromJSONTyped, ScanResponseBodyToJSON, ScanResponseBodyToJSONTyped, ScanResultFromJSON, ScanResultFromJSONTyped, ScanResultToJSON, ScanResultToJSONTyped, SegmentSegmentFromJSON, SegmentSegmentFromJSONTyped, SegmentSegmentToJSON, SegmentSegmentToJSONTyped, SegmentSegmentTypeEnum, SensitiveDataProtectionApi, ShapeKindFromJSON, ShapeKindFromJSONTyped, ShapeKindToJSON, ShapeKindToJSONTyped, ShapeSegmentFromJSON, ShapeSegmentFromJSONTyped, ShapeSegmentToJSON, ShapeSegmentToJSONTyped, ShapeSegmentTypeEnum, SheetSegmentFromJSON, SheetSegmentFromJSONTyped, SheetSegmentToJSON, SheetSegmentToJSONTyped, SheetSegmentTypeEnum, SlideSegmentFromJSON, SlideSegmentFromJSONTyped, SlideSegmentToJSON, SlideSegmentToJSONTyped, SlideSegmentTypeEnum, SpeakerNotesSegmentFromJSON, SpeakerNotesSegmentFromJSONTyped, SpeakerNotesSegmentToJSON, SpeakerNotesSegmentToJSONTyped, SpeakerNotesSegmentTypeEnum, TableSegmentFromJSON, TableSegmentFromJSONTyped, TableSegmentToJSON, TableSegmentToJSONTyped, TableSegmentTypeEnum, TagSegmentFromJSON, TagSegmentFromJSONTyped, TagSegmentToJSON, TagSegmentToJSONTyped, TagSegmentTypeEnum, TextApiResponse, TextRangeFromJSON, TextRangeFromJSONTyped, TextRangeToJSON, TextRangeToJSONTyped, TextSegmentFromJSON, TextSegmentFromJSONTyped, TextSegmentToJSON, TextSegmentToJSONTyped, TextSegmentTypeEnum, UpdatePolicyRequestFromJSON, UpdatePolicyRequestFromJSONTyped, UpdatePolicyRequestToJSON, UpdatePolicyRequestToJSONTyped, UsageFromJSON, UsageFromJSONTyped, UsageToJSON, UsageToJSONTyped, VoidApiResponse, canConsumeForm, exists, instanceOfAction, instanceOfAnonymizeFileResponseBody, instanceOfAnonymizeRequestBody, instanceOfAnonymizeResponseBody, instanceOfAt, instanceOfAttributeSegment, instanceOfCellNoteSegment, instanceOfCellSegment, instanceOfCommentKind, instanceOfCommentSegment, instanceOfComponentSegment, instanceOfCreatePolicyRequest, instanceOfDetectRule, instanceOfElementSegment, instanceOfEncryptRule, instanceOfEndnoteSegment, instanceOfErrorCode, instanceOfErrorInfo, instanceOfFieldError, instanceOfFieldErrorCode, instanceOfFieldErrorPathInner, instanceOfFieldSegment, instanceOfFileAttributeResult, instanceOfFileEmbeddedResult, instanceOfFileModelResult, instanceOfFileRegexResult, instanceOfFootnoteSegment, instanceOfFrameSegment, instanceOfHMACRule, instanceOfHeaderFooterSegment, instanceOfIndexSegment, instanceOfItemSegment, instanceOfKeySegment, instanceOfLineSegment, instanceOfListPolicies200Response, instanceOfMaskRule, instanceOfModelEntity, instanceOfModelError, instanceOfModelResult, instanceOfModelStatus, instanceOfParagraphSegment, instanceOfPartSegment, instanceOfPolicy, instanceOfPolicyDocument, instanceOfPolicySummary, instanceOfPropertySegment, instanceOfPseudonymizeRule, instanceOfRangeKind, instanceOfRangeSegment, instanceOfRedactRule, instanceOfRefusal, instanceOfRegexEntity, instanceOfRegexResult, instanceOfRegionSegment, instanceOfReplaceRule, instanceOfSHA256Rule, instanceOfSHA512Rule, instanceOfScanRequestBody, instanceOfScanResponseBody, instanceOfScanResult, instanceOfSegmentSegment, instanceOfShapeSegment, instanceOfSheetSegment, instanceOfSlideSegment, instanceOfSpeakerNotesSegment, instanceOfTableSegment, instanceOfTagSegment, instanceOfTextRange, instanceOfTextSegment, instanceOfUpdatePolicyRequest, instanceOfUsage, mapValues, querystring };
|