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