@quba/sensitive-data-protection 0.1.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -6
- package/dist/index.cjs +2884 -569
- package/dist/index.d.cts +3059 -765
- package/dist/index.d.mts +3059 -765
- package/dist/index.mjs +2574 -535
- package/docs/Action.md +33 -0
- package/docs/AnonymizeFileResponseBody.md +43 -0
- package/docs/AnonymizeRequestBody.md +4 -2
- package/docs/AnonymizeResponseBody.md +3 -1
- package/docs/{AnonymizeResponseBodySpansInner.md → Applied.md} +7 -4
- package/docs/At.md +37 -0
- package/docs/AttributeSegment.md +37 -0
- package/docs/{ValidationErrorLocInner.md → CellKind.md} +5 -4
- package/docs/CellNoteSegment.md +35 -0
- package/docs/CellSegment.md +43 -0
- package/docs/CommentKind.md +33 -0
- package/docs/CommentSegment.md +39 -0
- package/docs/ComponentSegment.md +39 -0
- package/docs/DetectRule.md +3 -1
- package/docs/ElementSegment.md +39 -0
- package/docs/EncryptRule.md +3 -1
- package/docs/{DetectRuleEntitiesInner.md → EndnoteSegment.md} +7 -6
- package/docs/{EntitiesAnyOfInner.md → EntityBody.md} +5 -4
- package/docs/ErrorCode.md +33 -0
- package/docs/ErrorInfo.md +39 -0
- package/docs/FieldError.md +51 -0
- package/docs/FieldErrorCode.md +33 -0
- package/docs/{HTTPValidationError.md → FieldErrorPathInner.md} +5 -6
- package/docs/FieldSegment.md +39 -0
- package/docs/FileAttributeResult.md +47 -0
- package/docs/FileEmbeddedResult.md +43 -0
- package/docs/FileModelResult.md +49 -0
- package/docs/{AnonymizeResponseBodyResultsInner.md → FileRegexResult.md} +11 -8
- package/docs/FileResult.md +51 -0
- package/docs/FootnoteSegment.md +37 -0
- package/docs/FrameSegment.md +37 -0
- package/docs/HMACRule.md +43 -0
- package/docs/HeaderFooterSegment.md +37 -0
- package/docs/IndexSegment.md +37 -0
- package/docs/ItemSegment.md +37 -0
- package/docs/KeySegment.md +37 -0
- package/docs/Kind.md +33 -0
- package/docs/LineSegment.md +39 -0
- package/docs/MaskRule.md +3 -1
- package/docs/ModelError.md +2 -3
- package/docs/ModelResult.md +2 -0
- package/docs/ModelStatus.md +45 -0
- package/docs/{Entities.md → ModelType.md} +5 -4
- package/docs/ParagraphKind.md +33 -0
- package/docs/ParagraphSegment.md +39 -0
- package/docs/PartSegment.md +39 -0
- package/docs/PathSegment.md +79 -0
- package/docs/PolicyDocumentRulesInner.md +7 -1
- package/docs/{ValidationError.md → PropertySegment.md} +7 -12
- package/docs/PseudonymizeRule.md +41 -0
- package/docs/RangeKind.md +33 -0
- package/docs/RangeSegment.md +39 -0
- package/docs/RedactRule.md +3 -1
- package/docs/Refusal.md +36 -0
- package/docs/RegexResult.md +2 -0
- package/docs/RegionSegment.md +43 -0
- package/docs/ReplaceRule.md +3 -1
- package/docs/{AnonymizeRequestBodyRulesInner.md → RuleBody.md} +12 -5
- package/docs/SHA256Rule.md +3 -1
- package/docs/SHA512Rule.md +3 -1
- package/docs/ScanRequestBody.md +2 -0
- package/docs/ScanResponseBody.md +2 -0
- package/docs/SegmentSegment.md +39 -0
- package/docs/SensitiveDataProtectionApi.md +160 -3
- package/docs/ShapeKind.md +33 -0
- package/docs/ShapeSegment.md +41 -0
- package/docs/SheetSegment.md +39 -0
- package/docs/SlideSegment.md +41 -0
- package/docs/SpeakerNotesSegment.md +41 -0
- package/docs/TableSegment.md +37 -0
- package/docs/TagSegment.md +41 -0
- package/docs/TextSegment.md +39 -0
- package/package.json +1 -1
package/dist/index.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,392 +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
|
-
"
|
|
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"]
|
|
373
371
|
};
|
|
374
372
|
}
|
|
375
|
-
function
|
|
376
|
-
return
|
|
373
|
+
function FileAttributeResultToJSON(json) {
|
|
374
|
+
return FileAttributeResultToJSONTyped(json, false);
|
|
377
375
|
}
|
|
378
|
-
function
|
|
376
|
+
function FileAttributeResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
379
377
|
if (value == null) return value;
|
|
380
378
|
return {
|
|
381
|
-
"
|
|
382
|
-
"
|
|
383
|
-
"
|
|
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"]
|
|
384
386
|
};
|
|
385
387
|
}
|
|
386
388
|
|
|
387
389
|
//#endregion
|
|
388
|
-
//#region src/models/
|
|
390
|
+
//#region src/models/FileEmbeddedResult.ts
|
|
389
391
|
/**
|
|
390
|
-
*
|
|
392
|
+
* @export
|
|
391
393
|
*/
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
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;
|
|
395
404
|
return true;
|
|
396
405
|
}
|
|
397
|
-
function
|
|
398
|
-
return
|
|
406
|
+
function FileEmbeddedResultFromJSON(json) {
|
|
407
|
+
return FileEmbeddedResultFromJSONTyped(json, false);
|
|
399
408
|
}
|
|
400
|
-
function
|
|
409
|
+
function FileEmbeddedResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
401
410
|
if (json == null) return json;
|
|
402
411
|
return {
|
|
403
|
-
"
|
|
404
|
-
"
|
|
412
|
+
"type": json["type"],
|
|
413
|
+
"id": json["id"],
|
|
414
|
+
"rule": json["rule"],
|
|
415
|
+
"content_type": json["content_type"],
|
|
416
|
+
"path": json["path"]
|
|
405
417
|
};
|
|
406
418
|
}
|
|
407
|
-
function
|
|
408
|
-
return
|
|
419
|
+
function FileEmbeddedResultToJSON(json) {
|
|
420
|
+
return FileEmbeddedResultToJSONTyped(json, false);
|
|
409
421
|
}
|
|
410
|
-
function
|
|
422
|
+
function FileEmbeddedResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
411
423
|
if (value == null) return value;
|
|
412
424
|
return {
|
|
413
|
-
"
|
|
414
|
-
"
|
|
425
|
+
"type": value["type"],
|
|
426
|
+
"id": value["id"],
|
|
427
|
+
"rule": value["rule"],
|
|
428
|
+
"content_type": value["content_type"],
|
|
429
|
+
"path": value["path"]
|
|
415
430
|
};
|
|
416
431
|
}
|
|
417
432
|
|
|
418
433
|
//#endregion
|
|
419
|
-
//#region src/models/
|
|
434
|
+
//#region src/models/FileModelResult.ts
|
|
420
435
|
/**
|
|
421
|
-
*
|
|
436
|
+
* @export
|
|
422
437
|
*/
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
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;
|
|
426
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;
|
|
427
451
|
return true;
|
|
428
452
|
}
|
|
429
|
-
function
|
|
430
|
-
return
|
|
453
|
+
function FileModelResultFromJSON(json) {
|
|
454
|
+
return FileModelResultFromJSONTyped(json, false);
|
|
431
455
|
}
|
|
432
|
-
function
|
|
456
|
+
function FileModelResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
433
457
|
if (json == null) return json;
|
|
434
458
|
return {
|
|
435
|
-
"
|
|
436
|
-
"
|
|
437
|
-
"
|
|
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"]
|
|
438
467
|
};
|
|
439
468
|
}
|
|
440
|
-
function
|
|
441
|
-
return
|
|
469
|
+
function FileModelResultToJSON(json) {
|
|
470
|
+
return FileModelResultToJSONTyped(json, false);
|
|
442
471
|
}
|
|
443
|
-
function
|
|
472
|
+
function FileModelResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
444
473
|
if (value == null) return value;
|
|
445
474
|
return {
|
|
446
|
-
"
|
|
447
|
-
"
|
|
448
|
-
"
|
|
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"]
|
|
449
483
|
};
|
|
450
484
|
}
|
|
451
485
|
|
|
452
486
|
//#endregion
|
|
453
|
-
//#region src/models/
|
|
487
|
+
//#region src/models/FileRegexResult.ts
|
|
454
488
|
/**
|
|
455
489
|
* @export
|
|
456
490
|
*/
|
|
457
|
-
const
|
|
458
|
-
model: "model",
|
|
459
|
-
regex: "regex"
|
|
460
|
-
};
|
|
491
|
+
const FileRegexResultTypeEnum = { regex: "regex" };
|
|
461
492
|
/**
|
|
462
|
-
* Check if a given object implements the
|
|
493
|
+
* Check if a given object implements the FileRegexResult interface.
|
|
463
494
|
*/
|
|
464
|
-
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;
|
|
465
498
|
if (!("rule" in value) || value["rule"] === void 0) return false;
|
|
466
499
|
if (!("value" in value) || value["value"] === void 0) return false;
|
|
467
500
|
if (!("input" in value) || value["input"] === void 0) return false;
|
|
468
501
|
if (!("output" in value) || value["output"] === void 0) return false;
|
|
502
|
+
if (!("path" in value) || value["path"] === void 0) return false;
|
|
469
503
|
return true;
|
|
470
504
|
}
|
|
471
|
-
function
|
|
472
|
-
return
|
|
505
|
+
function FileRegexResultFromJSON(json) {
|
|
506
|
+
return FileRegexResultFromJSONTyped(json, false);
|
|
473
507
|
}
|
|
474
|
-
function
|
|
508
|
+
function FileRegexResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
475
509
|
if (json == null) return json;
|
|
476
510
|
return {
|
|
477
|
-
"type": json["type"]
|
|
511
|
+
"type": json["type"],
|
|
512
|
+
"id": json["id"],
|
|
478
513
|
"rule": json["rule"],
|
|
479
514
|
"value": json["value"],
|
|
480
|
-
"input":
|
|
481
|
-
"output":
|
|
482
|
-
"
|
|
515
|
+
"input": json["input"],
|
|
516
|
+
"output": json["output"],
|
|
517
|
+
"path": json["path"]
|
|
483
518
|
};
|
|
484
519
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
520
|
+
function FileRegexResultToJSON(json) {
|
|
521
|
+
return FileRegexResultToJSONTyped(json, false);
|
|
487
522
|
}
|
|
488
|
-
function
|
|
523
|
+
function FileRegexResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
489
524
|
if (value == null) return value;
|
|
490
525
|
return {
|
|
491
526
|
"type": value["type"],
|
|
527
|
+
"id": value["id"],
|
|
492
528
|
"rule": value["rule"],
|
|
493
529
|
"value": value["value"],
|
|
494
|
-
"input":
|
|
495
|
-
"output":
|
|
496
|
-
"
|
|
530
|
+
"input": value["input"],
|
|
531
|
+
"output": value["output"],
|
|
532
|
+
"path": value["path"]
|
|
497
533
|
};
|
|
498
534
|
}
|
|
499
535
|
|
|
500
536
|
//#endregion
|
|
501
|
-
//#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
|
|
502
567
|
/**
|
|
503
|
-
* Check if a given object implements the
|
|
568
|
+
* Check if a given object implements the AnonymizeFileResponseBody interface.
|
|
504
569
|
*/
|
|
505
|
-
function
|
|
506
|
-
if (!("text" in value) || value["text"] === void 0) return false;
|
|
570
|
+
function instanceOfAnonymizeFileResponseBody(value) {
|
|
507
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;
|
|
508
576
|
return true;
|
|
509
577
|
}
|
|
510
|
-
function
|
|
511
|
-
return
|
|
578
|
+
function AnonymizeFileResponseBodyFromJSON(json) {
|
|
579
|
+
return AnonymizeFileResponseBodyFromJSONTyped(json, false);
|
|
512
580
|
}
|
|
513
|
-
function
|
|
581
|
+
function AnonymizeFileResponseBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
514
582
|
if (json == null) return json;
|
|
515
583
|
return {
|
|
516
|
-
"
|
|
517
|
-
"
|
|
518
|
-
"
|
|
584
|
+
"usage": UsageFromJSON(json["usage"]),
|
|
585
|
+
"models": json["models"],
|
|
586
|
+
"format": json["format"],
|
|
587
|
+
"results": json["results"].map(FileResultFromJSON),
|
|
588
|
+
"file": json["file"]
|
|
519
589
|
};
|
|
520
590
|
}
|
|
521
|
-
function
|
|
522
|
-
return
|
|
591
|
+
function AnonymizeFileResponseBodyToJSON(json) {
|
|
592
|
+
return AnonymizeFileResponseBodyToJSONTyped(json, false);
|
|
523
593
|
}
|
|
524
|
-
function
|
|
594
|
+
function AnonymizeFileResponseBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
525
595
|
if (value == null) return value;
|
|
526
596
|
return {
|
|
527
|
-
"
|
|
528
|
-
"
|
|
529
|
-
"
|
|
597
|
+
"usage": UsageToJSON(value["usage"]),
|
|
598
|
+
"models": value["models"],
|
|
599
|
+
"format": value["format"],
|
|
600
|
+
"results": value["results"].map(FileResultToJSON),
|
|
601
|
+
"file": value["file"]
|
|
530
602
|
};
|
|
531
603
|
}
|
|
532
604
|
|
|
533
605
|
//#endregion
|
|
534
|
-
//#region src/models/
|
|
606
|
+
//#region src/models/ModelEntity.ts
|
|
535
607
|
/**
|
|
536
608
|
* @export
|
|
537
609
|
*/
|
|
538
|
-
const
|
|
539
|
-
detect: "detect",
|
|
540
|
-
redact: "redact",
|
|
541
|
-
replace: "replace",
|
|
542
|
-
mask: "mask",
|
|
543
|
-
sha256: "sha256",
|
|
544
|
-
sha512: "sha512",
|
|
545
|
-
encrypt: "encrypt"
|
|
546
|
-
};
|
|
610
|
+
const ModelEntityTypeEnum = { model: "model" };
|
|
547
611
|
/**
|
|
548
|
-
* Check if a given object implements the
|
|
612
|
+
* Check if a given object implements the ModelEntity interface.
|
|
549
613
|
*/
|
|
550
|
-
function
|
|
551
|
-
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;
|
|
552
617
|
return true;
|
|
553
618
|
}
|
|
554
|
-
function
|
|
555
|
-
return
|
|
619
|
+
function ModelEntityFromJSON(json) {
|
|
620
|
+
return ModelEntityFromJSONTyped(json, false);
|
|
556
621
|
}
|
|
557
|
-
function
|
|
622
|
+
function ModelEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
558
623
|
if (json == null) return json;
|
|
559
624
|
return {
|
|
560
|
-
"type": json["type"]
|
|
561
|
-
"
|
|
562
|
-
"replacement": json["replacement"] == null ? void 0 : json["replacement"],
|
|
563
|
-
"masking_char": json["masking_char"] == null ? void 0 : json["masking_char"],
|
|
564
|
-
"chars_to_mask": json["chars_to_mask"] == null ? void 0 : json["chars_to_mask"],
|
|
565
|
-
"from_end": json["from_end"] == null ? void 0 : json["from_end"],
|
|
566
|
-
"key": json["key"] == null ? void 0 : json["key"]
|
|
625
|
+
"type": json["type"],
|
|
626
|
+
"value": json["value"]
|
|
567
627
|
};
|
|
568
628
|
}
|
|
569
|
-
function
|
|
570
|
-
return
|
|
629
|
+
function ModelEntityToJSON(json) {
|
|
630
|
+
return ModelEntityToJSONTyped(json, false);
|
|
571
631
|
}
|
|
572
|
-
function
|
|
632
|
+
function ModelEntityToJSONTyped(value, ignoreDiscriminator = false) {
|
|
573
633
|
if (value == null) return value;
|
|
574
634
|
return {
|
|
575
635
|
"type": value["type"],
|
|
576
|
-
"
|
|
577
|
-
"replacement": value["replacement"],
|
|
578
|
-
"masking_char": value["masking_char"],
|
|
579
|
-
"chars_to_mask": value["chars_to_mask"],
|
|
580
|
-
"from_end": value["from_end"],
|
|
581
|
-
"key": value["key"]
|
|
636
|
+
"value": value["value"]
|
|
582
637
|
};
|
|
583
638
|
}
|
|
584
639
|
|
|
585
640
|
//#endregion
|
|
586
|
-
//#region src/models/
|
|
641
|
+
//#region src/models/RegexEntity.ts
|
|
587
642
|
/**
|
|
588
643
|
* @export
|
|
589
644
|
*/
|
|
590
|
-
const
|
|
645
|
+
const RegexEntityTypeEnum = { regex: "regex" };
|
|
591
646
|
/**
|
|
592
|
-
* Check if a given object implements the
|
|
647
|
+
* Check if a given object implements the RegexEntity interface.
|
|
593
648
|
*/
|
|
594
|
-
function
|
|
595
|
-
if (!("
|
|
596
|
-
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;
|
|
597
652
|
return true;
|
|
598
653
|
}
|
|
599
|
-
function
|
|
600
|
-
return
|
|
654
|
+
function RegexEntityFromJSON(json) {
|
|
655
|
+
return RegexEntityFromJSONTyped(json, false);
|
|
601
656
|
}
|
|
602
|
-
function
|
|
657
|
+
function RegexEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
603
658
|
if (json == null) return json;
|
|
604
659
|
return {
|
|
605
|
-
"
|
|
606
|
-
"
|
|
607
|
-
"confidence_threshold": json["confidence_threshold"] == null ? void 0 : json["confidence_threshold"],
|
|
608
|
-
"rules": json["rules"].map(PolicyDocumentRulesInnerFromJSON)
|
|
660
|
+
"type": json["type"],
|
|
661
|
+
"value": json["value"]
|
|
609
662
|
};
|
|
610
663
|
}
|
|
611
|
-
function
|
|
612
|
-
return
|
|
664
|
+
function RegexEntityToJSON(json) {
|
|
665
|
+
return RegexEntityToJSONTyped(json, false);
|
|
613
666
|
}
|
|
614
|
-
function
|
|
667
|
+
function RegexEntityToJSONTyped(value, ignoreDiscriminator = false) {
|
|
615
668
|
if (value == null) return value;
|
|
616
669
|
return {
|
|
617
|
-
"
|
|
618
|
-
"
|
|
619
|
-
"confidence_threshold": value["confidence_threshold"],
|
|
620
|
-
"rules": value["rules"].map(PolicyDocumentRulesInnerToJSON)
|
|
670
|
+
"type": value["type"],
|
|
671
|
+
"value": value["value"]
|
|
621
672
|
};
|
|
622
673
|
}
|
|
623
674
|
|
|
624
675
|
//#endregion
|
|
625
|
-
//#region src/models/
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
*/
|
|
629
|
-
function instanceOfCreatePolicyRequest(value) {
|
|
630
|
-
if (!("name" in value) || value["name"] === void 0) return false;
|
|
631
|
-
if (!("document" in value) || value["document"] === void 0) return false;
|
|
632
|
-
return true;
|
|
676
|
+
//#region src/models/EntityBody.ts
|
|
677
|
+
function EntityBodyFromJSON(json) {
|
|
678
|
+
return EntityBodyFromJSONTyped(json, false);
|
|
633
679
|
}
|
|
634
|
-
function
|
|
635
|
-
return CreatePolicyRequestFromJSONTyped(json, false);
|
|
636
|
-
}
|
|
637
|
-
function CreatePolicyRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
680
|
+
function EntityBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
638
681
|
if (json == null) return json;
|
|
639
|
-
|
|
640
|
-
"
|
|
641
|
-
"
|
|
642
|
-
|
|
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
|
+
}
|
|
643
687
|
}
|
|
644
|
-
function
|
|
645
|
-
return
|
|
688
|
+
function EntityBodyToJSON(json) {
|
|
689
|
+
return EntityBodyToJSONTyped(json, false);
|
|
646
690
|
}
|
|
647
|
-
function
|
|
691
|
+
function EntityBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
648
692
|
if (value == null) return value;
|
|
649
|
-
|
|
650
|
-
"
|
|
651
|
-
"
|
|
652
|
-
|
|
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
|
+
}
|
|
653
698
|
}
|
|
654
699
|
|
|
655
700
|
//#endregion
|
|
@@ -662,6 +707,7 @@ const DetectRuleTypeEnum = { detect: "detect" };
|
|
|
662
707
|
* Check if a given object implements the DetectRule interface.
|
|
663
708
|
*/
|
|
664
709
|
function instanceOfDetectRule(value) {
|
|
710
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
665
711
|
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
666
712
|
return true;
|
|
667
713
|
}
|
|
@@ -671,8 +717,9 @@ function DetectRuleFromJSON(json) {
|
|
|
671
717
|
function DetectRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
672
718
|
if (json == null) return json;
|
|
673
719
|
return {
|
|
674
|
-
"type": json["type"]
|
|
675
|
-
"entities": json["entities"].map(
|
|
720
|
+
"type": json["type"],
|
|
721
|
+
"entities": json["entities"].map(EntityBodyFromJSON),
|
|
722
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
|
|
676
723
|
};
|
|
677
724
|
}
|
|
678
725
|
function DetectRuleToJSON(json) {
|
|
@@ -682,7 +729,8 @@ function DetectRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
682
729
|
if (value == null) return value;
|
|
683
730
|
return {
|
|
684
731
|
"type": value["type"],
|
|
685
|
-
"entities": value["entities"].map(
|
|
732
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
733
|
+
"action": ActionToJSON(value["action"])
|
|
686
734
|
};
|
|
687
735
|
}
|
|
688
736
|
|
|
@@ -696,6 +744,7 @@ const EncryptRuleTypeEnum = { encrypt: "encrypt" };
|
|
|
696
744
|
* Check if a given object implements the EncryptRule interface.
|
|
697
745
|
*/
|
|
698
746
|
function instanceOfEncryptRule(value) {
|
|
747
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
699
748
|
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
700
749
|
return true;
|
|
701
750
|
}
|
|
@@ -705,8 +754,9 @@ function EncryptRuleFromJSON(json) {
|
|
|
705
754
|
function EncryptRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
706
755
|
if (json == null) return json;
|
|
707
756
|
return {
|
|
708
|
-
"type": json["type"]
|
|
709
|
-
"entities": json["entities"].map(
|
|
757
|
+
"type": json["type"],
|
|
758
|
+
"entities": json["entities"].map(EntityBodyFromJSON),
|
|
759
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
|
|
710
760
|
"key": json["key"] == null ? void 0 : json["key"]
|
|
711
761
|
};
|
|
712
762
|
}
|
|
@@ -717,561 +767,2461 @@ function EncryptRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
717
767
|
if (value == null) return value;
|
|
718
768
|
return {
|
|
719
769
|
"type": value["type"],
|
|
720
|
-
"entities": value["entities"].map(
|
|
770
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
771
|
+
"action": ActionToJSON(value["action"]),
|
|
721
772
|
"key": value["key"]
|
|
722
773
|
};
|
|
723
774
|
}
|
|
724
775
|
|
|
725
776
|
//#endregion
|
|
726
|
-
//#region src/models/
|
|
777
|
+
//#region src/models/HMACRule.ts
|
|
727
778
|
/**
|
|
728
|
-
*
|
|
779
|
+
* @export
|
|
780
|
+
*/
|
|
781
|
+
const HMACRuleTypeEnum = { hmac: "hmac" };
|
|
782
|
+
/**
|
|
783
|
+
* Check if a given object implements the HMACRule interface.
|
|
729
784
|
*/
|
|
730
|
-
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;
|
|
731
789
|
return true;
|
|
732
790
|
}
|
|
733
|
-
function
|
|
734
|
-
return
|
|
791
|
+
function HMACRuleFromJSON(json) {
|
|
792
|
+
return HMACRuleFromJSONTyped(json, false);
|
|
735
793
|
}
|
|
736
|
-
function
|
|
737
|
-
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
|
+
};
|
|
738
803
|
}
|
|
739
|
-
function
|
|
740
|
-
return
|
|
804
|
+
function HMACRuleToJSON(json) {
|
|
805
|
+
return HMACRuleToJSONTyped(json, false);
|
|
741
806
|
}
|
|
742
|
-
function
|
|
743
|
-
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
|
+
};
|
|
744
816
|
}
|
|
745
817
|
|
|
746
818
|
//#endregion
|
|
747
|
-
//#region src/models/
|
|
819
|
+
//#region src/models/MaskRule.ts
|
|
820
|
+
/**
|
|
821
|
+
* @export
|
|
822
|
+
*/
|
|
823
|
+
const MaskRuleTypeEnum = { mask: "mask" };
|
|
748
824
|
/**
|
|
749
|
-
* Check if a given object implements the
|
|
825
|
+
* Check if a given object implements the MaskRule interface.
|
|
750
826
|
*/
|
|
751
|
-
function
|
|
752
|
-
if (!("loc" in value) || value["loc"] === void 0) return false;
|
|
753
|
-
if (!("msg" in value) || value["msg"] === void 0) return false;
|
|
827
|
+
function instanceOfMaskRule(value) {
|
|
754
828
|
if (!("type" in value) || value["type"] === void 0) return false;
|
|
829
|
+
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
755
830
|
return true;
|
|
756
831
|
}
|
|
757
|
-
function
|
|
758
|
-
return
|
|
832
|
+
function MaskRuleFromJSON(json) {
|
|
833
|
+
return MaskRuleFromJSONTyped(json, false);
|
|
759
834
|
}
|
|
760
|
-
function
|
|
835
|
+
function MaskRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
761
836
|
if (json == null) return json;
|
|
762
837
|
return {
|
|
763
|
-
"loc": json["loc"].map(ValidationErrorLocInnerFromJSON),
|
|
764
|
-
"msg": json["msg"],
|
|
765
838
|
"type": json["type"],
|
|
766
|
-
"
|
|
767
|
-
"
|
|
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"]
|
|
768
844
|
};
|
|
769
845
|
}
|
|
770
|
-
function
|
|
771
|
-
return
|
|
846
|
+
function MaskRuleToJSON(json) {
|
|
847
|
+
return MaskRuleToJSONTyped(json, false);
|
|
772
848
|
}
|
|
773
|
-
function
|
|
849
|
+
function MaskRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
774
850
|
if (value == null) return value;
|
|
775
851
|
return {
|
|
776
|
-
"loc": value["loc"].map(ValidationErrorLocInnerToJSON),
|
|
777
|
-
"msg": value["msg"],
|
|
778
852
|
"type": value["type"],
|
|
779
|
-
"
|
|
780
|
-
"
|
|
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"]
|
|
781
858
|
};
|
|
782
859
|
}
|
|
783
860
|
|
|
784
861
|
//#endregion
|
|
785
|
-
//#region src/models/
|
|
862
|
+
//#region src/models/PseudonymizeRule.ts
|
|
863
|
+
/**
|
|
864
|
+
* @export
|
|
865
|
+
*/
|
|
866
|
+
const PseudonymizeRuleTypeEnum = { pseudonymize: "pseudonymize" };
|
|
786
867
|
/**
|
|
787
|
-
* Check if a given object implements the
|
|
868
|
+
* Check if a given object implements the PseudonymizeRule interface.
|
|
788
869
|
*/
|
|
789
|
-
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;
|
|
790
873
|
return true;
|
|
791
874
|
}
|
|
792
|
-
function
|
|
793
|
-
return
|
|
875
|
+
function PseudonymizeRuleFromJSON(json) {
|
|
876
|
+
return PseudonymizeRuleFromJSONTyped(json, false);
|
|
794
877
|
}
|
|
795
|
-
function
|
|
878
|
+
function PseudonymizeRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
796
879
|
if (json == null) return json;
|
|
797
|
-
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
|
+
};
|
|
798
886
|
}
|
|
799
|
-
function
|
|
800
|
-
return
|
|
887
|
+
function PseudonymizeRuleToJSON(json) {
|
|
888
|
+
return PseudonymizeRuleToJSONTyped(json, false);
|
|
801
889
|
}
|
|
802
|
-
function
|
|
890
|
+
function PseudonymizeRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
803
891
|
if (value == null) return value;
|
|
804
|
-
return {
|
|
892
|
+
return {
|
|
893
|
+
"type": value["type"],
|
|
894
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
895
|
+
"action": ActionToJSON(value["action"]),
|
|
896
|
+
"tag": value["tag"]
|
|
897
|
+
};
|
|
805
898
|
}
|
|
806
899
|
|
|
807
900
|
//#endregion
|
|
808
|
-
//#region src/models/
|
|
901
|
+
//#region src/models/RedactRule.ts
|
|
809
902
|
/**
|
|
810
|
-
*
|
|
903
|
+
* @export
|
|
811
904
|
*/
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
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;
|
|
818
912
|
return true;
|
|
819
913
|
}
|
|
820
|
-
function
|
|
821
|
-
return
|
|
914
|
+
function RedactRuleFromJSON(json) {
|
|
915
|
+
return RedactRuleFromJSONTyped(json, false);
|
|
822
916
|
}
|
|
823
|
-
function
|
|
917
|
+
function RedactRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
824
918
|
if (json == null) return json;
|
|
825
919
|
return {
|
|
826
|
-
"
|
|
827
|
-
"
|
|
828
|
-
"
|
|
829
|
-
"createdAt": json["createdAt"],
|
|
830
|
-
"updatedAt": json["updatedAt"]
|
|
920
|
+
"type": json["type"],
|
|
921
|
+
"entities": json["entities"].map(EntityBodyFromJSON),
|
|
922
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
|
|
831
923
|
};
|
|
832
924
|
}
|
|
833
|
-
function
|
|
834
|
-
return
|
|
925
|
+
function RedactRuleToJSON(json) {
|
|
926
|
+
return RedactRuleToJSONTyped(json, false);
|
|
835
927
|
}
|
|
836
|
-
function
|
|
928
|
+
function RedactRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
837
929
|
if (value == null) return value;
|
|
838
930
|
return {
|
|
839
|
-
"
|
|
840
|
-
"
|
|
841
|
-
"
|
|
842
|
-
"createdAt": value["createdAt"],
|
|
843
|
-
"updatedAt": value["updatedAt"]
|
|
931
|
+
"type": value["type"],
|
|
932
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
933
|
+
"action": ActionToJSON(value["action"])
|
|
844
934
|
};
|
|
845
935
|
}
|
|
846
936
|
|
|
847
937
|
//#endregion
|
|
848
|
-
//#region src/models/
|
|
938
|
+
//#region src/models/ReplaceRule.ts
|
|
849
939
|
/**
|
|
850
|
-
*
|
|
940
|
+
* @export
|
|
851
941
|
*/
|
|
852
|
-
|
|
853
|
-
|
|
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;
|
|
854
949
|
return true;
|
|
855
950
|
}
|
|
856
|
-
function
|
|
857
|
-
return
|
|
951
|
+
function ReplaceRuleFromJSON(json) {
|
|
952
|
+
return ReplaceRuleFromJSONTyped(json, false);
|
|
858
953
|
}
|
|
859
|
-
function
|
|
954
|
+
function ReplaceRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
860
955
|
if (json == null) return json;
|
|
861
|
-
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
|
+
};
|
|
862
962
|
}
|
|
863
|
-
function
|
|
864
|
-
return
|
|
963
|
+
function ReplaceRuleToJSON(json) {
|
|
964
|
+
return ReplaceRuleToJSONTyped(json, false);
|
|
865
965
|
}
|
|
866
|
-
function
|
|
966
|
+
function ReplaceRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
867
967
|
if (value == null) return value;
|
|
868
|
-
return {
|
|
968
|
+
return {
|
|
969
|
+
"type": value["type"],
|
|
970
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
971
|
+
"action": ActionToJSON(value["action"]),
|
|
972
|
+
"replacement": value["replacement"]
|
|
973
|
+
};
|
|
869
974
|
}
|
|
870
975
|
|
|
871
976
|
//#endregion
|
|
872
|
-
//#region src/models/
|
|
977
|
+
//#region src/models/SHA256Rule.ts
|
|
873
978
|
/**
|
|
874
979
|
* @export
|
|
875
980
|
*/
|
|
876
|
-
const
|
|
981
|
+
const SHA256RuleTypeEnum = { sha256: "sha256" };
|
|
877
982
|
/**
|
|
878
|
-
* Check if a given object implements the
|
|
983
|
+
* Check if a given object implements the SHA256Rule interface.
|
|
879
984
|
*/
|
|
880
|
-
function
|
|
985
|
+
function instanceOfSHA256Rule(value) {
|
|
986
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
881
987
|
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
882
988
|
return true;
|
|
883
989
|
}
|
|
884
|
-
function
|
|
885
|
-
return
|
|
990
|
+
function SHA256RuleFromJSON(json) {
|
|
991
|
+
return SHA256RuleFromJSONTyped(json, false);
|
|
886
992
|
}
|
|
887
|
-
function
|
|
993
|
+
function SHA256RuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
888
994
|
if (json == null) return json;
|
|
889
995
|
return {
|
|
890
|
-
"type": json["type"]
|
|
891
|
-
"entities": json["entities"].map(
|
|
892
|
-
"
|
|
893
|
-
"chars_to_mask": json["chars_to_mask"] == null ? void 0 : json["chars_to_mask"],
|
|
894
|
-
"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"])
|
|
895
999
|
};
|
|
896
1000
|
}
|
|
897
|
-
function
|
|
898
|
-
return
|
|
1001
|
+
function SHA256RuleToJSON(json) {
|
|
1002
|
+
return SHA256RuleToJSONTyped(json, false);
|
|
899
1003
|
}
|
|
900
|
-
function
|
|
1004
|
+
function SHA256RuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
901
1005
|
if (value == null) return value;
|
|
902
1006
|
return {
|
|
903
1007
|
"type": value["type"],
|
|
904
|
-
"entities": value["entities"].map(
|
|
905
|
-
"
|
|
906
|
-
"chars_to_mask": value["chars_to_mask"],
|
|
907
|
-
"from_end": value["from_end"]
|
|
1008
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
1009
|
+
"action": ActionToJSON(value["action"])
|
|
908
1010
|
};
|
|
909
1011
|
}
|
|
910
1012
|
|
|
911
1013
|
//#endregion
|
|
912
|
-
//#region src/models/
|
|
1014
|
+
//#region src/models/SHA512Rule.ts
|
|
913
1015
|
/**
|
|
914
1016
|
* @export
|
|
915
1017
|
*/
|
|
916
|
-
const
|
|
1018
|
+
const SHA512RuleTypeEnum = { sha512: "sha512" };
|
|
917
1019
|
/**
|
|
918
|
-
* Check if a given object implements the
|
|
1020
|
+
* Check if a given object implements the SHA512Rule interface.
|
|
919
1021
|
*/
|
|
920
|
-
function
|
|
921
|
-
if (!("
|
|
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;
|
|
922
1025
|
return true;
|
|
923
1026
|
}
|
|
924
|
-
function
|
|
925
|
-
return
|
|
1027
|
+
function SHA512RuleFromJSON(json) {
|
|
1028
|
+
return SHA512RuleFromJSONTyped(json, false);
|
|
926
1029
|
}
|
|
927
|
-
function
|
|
1030
|
+
function SHA512RuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
928
1031
|
if (json == null) return json;
|
|
929
1032
|
return {
|
|
930
|
-
"type": json["type"]
|
|
931
|
-
"
|
|
1033
|
+
"type": json["type"],
|
|
1034
|
+
"entities": json["entities"].map(EntityBodyFromJSON),
|
|
1035
|
+
"action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
|
|
932
1036
|
};
|
|
933
1037
|
}
|
|
934
|
-
function
|
|
935
|
-
return
|
|
1038
|
+
function SHA512RuleToJSON(json) {
|
|
1039
|
+
return SHA512RuleToJSONTyped(json, false);
|
|
936
1040
|
}
|
|
937
|
-
function
|
|
1041
|
+
function SHA512RuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
938
1042
|
if (value == null) return value;
|
|
939
1043
|
return {
|
|
940
1044
|
"type": value["type"],
|
|
941
|
-
"
|
|
1045
|
+
"entities": value["entities"].map(EntityBodyToJSON),
|
|
1046
|
+
"action": ActionToJSON(value["action"])
|
|
942
1047
|
};
|
|
943
1048
|
}
|
|
944
1049
|
|
|
945
1050
|
//#endregion
|
|
946
|
-
//#region src/models/
|
|
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
|
|
947
1091
|
/**
|
|
948
|
-
* Check if a given object implements the
|
|
1092
|
+
* Check if a given object implements the AnonymizeRequestBody interface.
|
|
949
1093
|
*/
|
|
950
|
-
function
|
|
951
|
-
if (!("
|
|
1094
|
+
function instanceOfAnonymizeRequestBody(value) {
|
|
1095
|
+
if (!("text" in value) || value["text"] === void 0) return false;
|
|
952
1096
|
return true;
|
|
953
1097
|
}
|
|
954
|
-
function
|
|
955
|
-
return
|
|
1098
|
+
function AnonymizeRequestBodyFromJSON(json) {
|
|
1099
|
+
return AnonymizeRequestBodyFromJSONTyped(json, false);
|
|
956
1100
|
}
|
|
957
|
-
function
|
|
1101
|
+
function AnonymizeRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
958
1102
|
if (json == null) return json;
|
|
959
1103
|
return {
|
|
960
|
-
"
|
|
961
|
-
"
|
|
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"]
|
|
962
1108
|
};
|
|
963
1109
|
}
|
|
964
|
-
function
|
|
965
|
-
return
|
|
1110
|
+
function AnonymizeRequestBodyToJSON(json) {
|
|
1111
|
+
return AnonymizeRequestBodyToJSONTyped(json, false);
|
|
966
1112
|
}
|
|
967
|
-
function
|
|
1113
|
+
function AnonymizeRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
968
1114
|
if (value == null) return value;
|
|
969
1115
|
return {
|
|
970
|
-
"
|
|
971
|
-
"
|
|
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"]
|
|
972
1120
|
};
|
|
973
1121
|
}
|
|
974
1122
|
|
|
975
1123
|
//#endregion
|
|
976
|
-
//#region src/models/
|
|
1124
|
+
//#region src/models/TextRange.ts
|
|
977
1125
|
/**
|
|
978
|
-
*
|
|
1126
|
+
* Check if a given object implements the TextRange interface.
|
|
979
1127
|
*/
|
|
980
|
-
|
|
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.
|
|
2930
|
+
*/
|
|
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;
|
|
2935
|
+
return true;
|
|
2936
|
+
}
|
|
2937
|
+
function FieldErrorFromJSON(json) {
|
|
2938
|
+
return FieldErrorFromJSONTyped(json, false);
|
|
2939
|
+
}
|
|
2940
|
+
function FieldErrorFromJSONTyped(json, ignoreDiscriminator) {
|
|
2941
|
+
if (json == null) return json;
|
|
2942
|
+
return {
|
|
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"]
|
|
2952
|
+
};
|
|
2953
|
+
}
|
|
2954
|
+
function FieldErrorToJSON(json) {
|
|
2955
|
+
return FieldErrorToJSONTyped(json, false);
|
|
2956
|
+
}
|
|
2957
|
+
function FieldErrorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2958
|
+
if (value == null) return value;
|
|
2959
|
+
return {
|
|
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"]
|
|
2969
|
+
};
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2972
|
+
//#endregion
|
|
2973
|
+
//#region src/models/ErrorInfo.ts
|
|
981
2974
|
/**
|
|
982
|
-
* Check if a given object implements the
|
|
2975
|
+
* Check if a given object implements the ErrorInfo interface.
|
|
983
2976
|
*/
|
|
984
|
-
function
|
|
985
|
-
if (!("
|
|
986
|
-
if (!("
|
|
987
|
-
if (!("input" in value) || value["input"] === void 0) return false;
|
|
988
|
-
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;
|
|
989
2980
|
return true;
|
|
990
2981
|
}
|
|
991
|
-
function
|
|
992
|
-
return
|
|
2982
|
+
function ErrorInfoFromJSON(json) {
|
|
2983
|
+
return ErrorInfoFromJSONTyped(json, false);
|
|
993
2984
|
}
|
|
994
|
-
function
|
|
2985
|
+
function ErrorInfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
995
2986
|
if (json == null) return json;
|
|
996
2987
|
return {
|
|
997
|
-
"
|
|
998
|
-
"
|
|
999
|
-
"
|
|
1000
|
-
"input": TextRangeFromJSON(json["input"]),
|
|
1001
|
-
"output": TextRangeFromJSON(json["output"]),
|
|
1002
|
-
"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)
|
|
1003
2991
|
};
|
|
1004
2992
|
}
|
|
1005
|
-
function
|
|
1006
|
-
return
|
|
2993
|
+
function ErrorInfoToJSON(json) {
|
|
2994
|
+
return ErrorInfoToJSONTyped(json, false);
|
|
1007
2995
|
}
|
|
1008
|
-
function
|
|
2996
|
+
function ErrorInfoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1009
2997
|
if (value == null) return value;
|
|
1010
2998
|
return {
|
|
1011
|
-
"
|
|
1012
|
-
"
|
|
1013
|
-
"
|
|
1014
|
-
"input": TextRangeToJSON(value["input"]),
|
|
1015
|
-
"output": TextRangeToJSON(value["output"]),
|
|
1016
|
-
"score": value["score"]
|
|
2999
|
+
"code": ErrorCodeToJSON(value["code"]),
|
|
3000
|
+
"message": value["message"],
|
|
3001
|
+
"details": value["details"] == null ? void 0 : value["details"].map(FieldErrorToJSON)
|
|
1017
3002
|
};
|
|
1018
3003
|
}
|
|
1019
3004
|
|
|
1020
3005
|
//#endregion
|
|
1021
|
-
//#region src/models/
|
|
3006
|
+
//#region src/models/PolicySummary.ts
|
|
1022
3007
|
/**
|
|
1023
|
-
* Check if a given object implements the
|
|
3008
|
+
* Check if a given object implements the PolicySummary interface.
|
|
1024
3009
|
*/
|
|
1025
|
-
function
|
|
3010
|
+
function instanceOfPolicySummary(value) {
|
|
1026
3011
|
if (!("id" in value) || value["id"] === void 0) return false;
|
|
1027
3012
|
if (!("name" in value) || value["name"] === void 0) return false;
|
|
1028
3013
|
if (!("versionId" in value) || value["versionId"] === void 0) return false;
|
|
1029
|
-
if (!("document" in value) || value["document"] === void 0) return false;
|
|
1030
3014
|
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
1031
3015
|
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
1032
3016
|
return true;
|
|
1033
3017
|
}
|
|
1034
|
-
function
|
|
1035
|
-
return
|
|
3018
|
+
function PolicySummaryFromJSON(json) {
|
|
3019
|
+
return PolicySummaryFromJSONTyped(json, false);
|
|
1036
3020
|
}
|
|
1037
|
-
function
|
|
3021
|
+
function PolicySummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
1038
3022
|
if (json == null) return json;
|
|
1039
3023
|
return {
|
|
1040
3024
|
"id": json["id"],
|
|
1041
3025
|
"name": json["name"],
|
|
1042
3026
|
"versionId": json["versionId"],
|
|
1043
|
-
"document": PolicyDocumentFromJSON(json["document"]),
|
|
1044
3027
|
"createdAt": json["createdAt"],
|
|
1045
3028
|
"updatedAt": json["updatedAt"]
|
|
1046
3029
|
};
|
|
1047
3030
|
}
|
|
1048
|
-
function
|
|
1049
|
-
return
|
|
3031
|
+
function PolicySummaryToJSON(json) {
|
|
3032
|
+
return PolicySummaryToJSONTyped(json, false);
|
|
1050
3033
|
}
|
|
1051
|
-
function
|
|
3034
|
+
function PolicySummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1052
3035
|
if (value == null) return value;
|
|
1053
3036
|
return {
|
|
1054
3037
|
"id": value["id"],
|
|
1055
3038
|
"name": value["name"],
|
|
1056
3039
|
"versionId": value["versionId"],
|
|
1057
|
-
"document": PolicyDocumentToJSON(value["document"]),
|
|
1058
3040
|
"createdAt": value["createdAt"],
|
|
1059
3041
|
"updatedAt": value["updatedAt"]
|
|
1060
3042
|
};
|
|
1061
3043
|
}
|
|
1062
3044
|
|
|
1063
3045
|
//#endregion
|
|
1064
|
-
//#region src/models/
|
|
1065
|
-
/**
|
|
1066
|
-
* @export
|
|
1067
|
-
*/
|
|
1068
|
-
const RedactRuleTypeEnum = { redact: "redact" };
|
|
3046
|
+
//#region src/models/ListPolicies200Response.ts
|
|
1069
3047
|
/**
|
|
1070
|
-
* Check if a given object implements the
|
|
3048
|
+
* Check if a given object implements the ListPolicies200Response interface.
|
|
1071
3049
|
*/
|
|
1072
|
-
function
|
|
1073
|
-
if (!("
|
|
3050
|
+
function instanceOfListPolicies200Response(value) {
|
|
3051
|
+
if (!("policies" in value) || value["policies"] === void 0) return false;
|
|
1074
3052
|
return true;
|
|
1075
3053
|
}
|
|
1076
|
-
function
|
|
1077
|
-
return
|
|
3054
|
+
function ListPolicies200ResponseFromJSON(json) {
|
|
3055
|
+
return ListPolicies200ResponseFromJSONTyped(json, false);
|
|
1078
3056
|
}
|
|
1079
|
-
function
|
|
3057
|
+
function ListPolicies200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1080
3058
|
if (json == null) return json;
|
|
1081
|
-
return {
|
|
1082
|
-
"type": json["type"] == null ? void 0 : json["type"],
|
|
1083
|
-
"entities": json["entities"].map(DetectRuleEntitiesInnerFromJSON)
|
|
1084
|
-
};
|
|
3059
|
+
return { "policies": json["policies"].map(PolicySummaryFromJSON) };
|
|
1085
3060
|
}
|
|
1086
|
-
function
|
|
1087
|
-
return
|
|
3061
|
+
function ListPolicies200ResponseToJSON(json) {
|
|
3062
|
+
return ListPolicies200ResponseToJSONTyped(json, false);
|
|
1088
3063
|
}
|
|
1089
|
-
function
|
|
3064
|
+
function ListPolicies200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1090
3065
|
if (value == null) return value;
|
|
1091
|
-
return {
|
|
1092
|
-
"type": value["type"],
|
|
1093
|
-
"entities": value["entities"].map(DetectRuleEntitiesInnerToJSON)
|
|
1094
|
-
};
|
|
3066
|
+
return { "policies": value["policies"].map(PolicySummaryToJSON) };
|
|
1095
3067
|
}
|
|
1096
3068
|
|
|
1097
3069
|
//#endregion
|
|
1098
|
-
//#region src/models/
|
|
1099
|
-
/**
|
|
1100
|
-
* @export
|
|
1101
|
-
*/
|
|
1102
|
-
const RegexEntityTypeEnum = { regex: "regex" };
|
|
3070
|
+
//#region src/models/ModelError.ts
|
|
1103
3071
|
/**
|
|
1104
|
-
* Check if a given object implements the
|
|
3072
|
+
* Check if a given object implements the ModelError interface.
|
|
1105
3073
|
*/
|
|
1106
|
-
function
|
|
1107
|
-
if (!("
|
|
3074
|
+
function instanceOfModelError(value) {
|
|
3075
|
+
if (!("error" in value) || value["error"] === void 0) return false;
|
|
1108
3076
|
return true;
|
|
1109
3077
|
}
|
|
1110
|
-
function
|
|
1111
|
-
return
|
|
3078
|
+
function ModelErrorFromJSON(json) {
|
|
3079
|
+
return ModelErrorFromJSONTyped(json, false);
|
|
1112
3080
|
}
|
|
1113
|
-
function
|
|
3081
|
+
function ModelErrorFromJSONTyped(json, ignoreDiscriminator) {
|
|
1114
3082
|
if (json == null) return json;
|
|
1115
|
-
return {
|
|
1116
|
-
"type": json["type"] == null ? void 0 : json["type"],
|
|
1117
|
-
"value": json["value"]
|
|
1118
|
-
};
|
|
3083
|
+
return { "error": ErrorInfoFromJSON(json["error"]) };
|
|
1119
3084
|
}
|
|
1120
|
-
function
|
|
1121
|
-
return
|
|
3085
|
+
function ModelErrorToJSON(json) {
|
|
3086
|
+
return ModelErrorToJSONTyped(json, false);
|
|
1122
3087
|
}
|
|
1123
|
-
function
|
|
3088
|
+
function ModelErrorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1124
3089
|
if (value == null) return value;
|
|
1125
|
-
return {
|
|
1126
|
-
"type": value["type"],
|
|
1127
|
-
"value": value["value"]
|
|
1128
|
-
};
|
|
3090
|
+
return { "error": ErrorInfoToJSON(value["error"]) };
|
|
1129
3091
|
}
|
|
1130
3092
|
|
|
1131
3093
|
//#endregion
|
|
1132
|
-
//#region src/models/
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
*/
|
|
1136
|
-
const RegexResultTypeEnum = { regex: "regex" };
|
|
1137
|
-
/**
|
|
1138
|
-
* Check if a given object implements the RegexResult interface.
|
|
1139
|
-
*/
|
|
1140
|
-
function instanceOfRegexResult(value) {
|
|
1141
|
-
if (!("rule" in value) || value["rule"] === void 0) return false;
|
|
1142
|
-
if (!("value" in value) || value["value"] === void 0) return false;
|
|
1143
|
-
if (!("input" in value) || value["input"] === void 0) return false;
|
|
1144
|
-
if (!("output" in value) || value["output"] === void 0) return false;
|
|
1145
|
-
return true;
|
|
1146
|
-
}
|
|
1147
|
-
function RegexResultFromJSON(json) {
|
|
1148
|
-
return RegexResultFromJSONTyped(json, false);
|
|
3094
|
+
//#region src/models/ModelType.ts
|
|
3095
|
+
function ModelTypeFromJSON(json) {
|
|
3096
|
+
return ModelTypeFromJSONTyped(json, false);
|
|
1149
3097
|
}
|
|
1150
|
-
function
|
|
3098
|
+
function ModelTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
1151
3099
|
if (json == null) return json;
|
|
1152
|
-
return
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
"value": json["value"],
|
|
1156
|
-
"input": TextRangeFromJSON(json["input"]),
|
|
1157
|
-
"output": TextRangeFromJSON(json["output"])
|
|
1158
|
-
};
|
|
3100
|
+
if (typeof json === "string" && json === "text") return json;
|
|
3101
|
+
if (typeof json === "string" && json === "image") return json;
|
|
3102
|
+
return {};
|
|
1159
3103
|
}
|
|
1160
|
-
function
|
|
1161
|
-
return
|
|
3104
|
+
function ModelTypeToJSON(json) {
|
|
3105
|
+
return ModelTypeToJSONTyped(json, false);
|
|
1162
3106
|
}
|
|
1163
|
-
function
|
|
3107
|
+
function ModelTypeToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1164
3108
|
if (value == null) return value;
|
|
1165
|
-
return
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
"value": value["value"],
|
|
1169
|
-
"input": TextRangeToJSON(value["input"]),
|
|
1170
|
-
"output": TextRangeToJSON(value["output"])
|
|
1171
|
-
};
|
|
3109
|
+
if (typeof value === "string" && value === "text") return value;
|
|
3110
|
+
if (typeof value === "string" && value === "image") return value;
|
|
3111
|
+
return {};
|
|
1172
3112
|
}
|
|
1173
3113
|
|
|
1174
3114
|
//#endregion
|
|
1175
|
-
//#region src/models/
|
|
1176
|
-
/**
|
|
1177
|
-
* @export
|
|
1178
|
-
*/
|
|
1179
|
-
const ReplaceRuleTypeEnum = { replace: "replace" };
|
|
3115
|
+
//#region src/models/ModelStatus.ts
|
|
1180
3116
|
/**
|
|
1181
|
-
* Check if a given object implements the
|
|
3117
|
+
* Check if a given object implements the ModelStatus interface.
|
|
1182
3118
|
*/
|
|
1183
|
-
function
|
|
1184
|
-
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;
|
|
1185
3124
|
return true;
|
|
1186
3125
|
}
|
|
1187
|
-
function
|
|
1188
|
-
return
|
|
3126
|
+
function ModelStatusFromJSON(json) {
|
|
3127
|
+
return ModelStatusFromJSONTyped(json, false);
|
|
1189
3128
|
}
|
|
1190
|
-
function
|
|
3129
|
+
function ModelStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
1191
3130
|
if (json == null) return json;
|
|
1192
3131
|
return {
|
|
1193
|
-
"
|
|
1194
|
-
"
|
|
1195
|
-
"
|
|
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"]
|
|
1196
3138
|
};
|
|
1197
3139
|
}
|
|
1198
|
-
function
|
|
1199
|
-
return
|
|
3140
|
+
function ModelStatusToJSON(json) {
|
|
3141
|
+
return ModelStatusToJSONTyped(json, false);
|
|
1200
3142
|
}
|
|
1201
|
-
function
|
|
3143
|
+
function ModelStatusToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1202
3144
|
if (value == null) return value;
|
|
1203
3145
|
return {
|
|
1204
|
-
"
|
|
1205
|
-
"
|
|
1206
|
-
"
|
|
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"]
|
|
1207
3152
|
};
|
|
1208
3153
|
}
|
|
1209
3154
|
|
|
1210
3155
|
//#endregion
|
|
1211
|
-
//#region src/models/
|
|
1212
|
-
/**
|
|
1213
|
-
* @export
|
|
1214
|
-
*/
|
|
1215
|
-
const SHA256RuleTypeEnum = { sha256: "sha256" };
|
|
3156
|
+
//#region src/models/Policy.ts
|
|
1216
3157
|
/**
|
|
1217
|
-
* Check if a given object implements the
|
|
3158
|
+
* Check if a given object implements the Policy interface.
|
|
1218
3159
|
*/
|
|
1219
|
-
function
|
|
1220
|
-
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;
|
|
1221
3167
|
return true;
|
|
1222
3168
|
}
|
|
1223
|
-
function
|
|
1224
|
-
return
|
|
3169
|
+
function PolicyFromJSON(json) {
|
|
3170
|
+
return PolicyFromJSONTyped(json, false);
|
|
1225
3171
|
}
|
|
1226
|
-
function
|
|
3172
|
+
function PolicyFromJSONTyped(json, ignoreDiscriminator) {
|
|
1227
3173
|
if (json == null) return json;
|
|
1228
3174
|
return {
|
|
1229
|
-
"
|
|
1230
|
-
"
|
|
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"]
|
|
1231
3181
|
};
|
|
1232
3182
|
}
|
|
1233
|
-
function
|
|
1234
|
-
return
|
|
3183
|
+
function PolicyToJSON(json) {
|
|
3184
|
+
return PolicyToJSONTyped(json, false);
|
|
1235
3185
|
}
|
|
1236
|
-
function
|
|
3186
|
+
function PolicyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1237
3187
|
if (value == null) return value;
|
|
1238
3188
|
return {
|
|
1239
|
-
"
|
|
1240
|
-
"
|
|
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"]
|
|
1241
3195
|
};
|
|
1242
3196
|
}
|
|
1243
3197
|
|
|
1244
3198
|
//#endregion
|
|
1245
|
-
//#region src/models/
|
|
1246
|
-
/**
|
|
1247
|
-
* @export
|
|
1248
|
-
*/
|
|
1249
|
-
const SHA512RuleTypeEnum = { sha512: "sha512" };
|
|
3199
|
+
//#region src/models/Refusal.ts
|
|
1250
3200
|
/**
|
|
1251
|
-
* Check if a given object implements the
|
|
3201
|
+
* Check if a given object implements the Refusal interface.
|
|
1252
3202
|
*/
|
|
1253
|
-
function
|
|
1254
|
-
if (!("
|
|
3203
|
+
function instanceOfRefusal(value) {
|
|
3204
|
+
if (!("error" in value) || value["error"] === void 0) return false;
|
|
1255
3205
|
return true;
|
|
1256
3206
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return
|
|
3207
|
+
function RefusalFromJSON(json) {
|
|
3208
|
+
return RefusalFromJSONTyped(json, false);
|
|
1259
3209
|
}
|
|
1260
|
-
function
|
|
3210
|
+
function RefusalFromJSONTyped(json, ignoreDiscriminator) {
|
|
1261
3211
|
if (json == null) return json;
|
|
1262
3212
|
return {
|
|
1263
|
-
"
|
|
1264
|
-
"
|
|
3213
|
+
"error": json["error"],
|
|
3214
|
+
"signup": json["signup"] == null ? void 0 : json["signup"]
|
|
1265
3215
|
};
|
|
1266
3216
|
}
|
|
1267
|
-
function
|
|
1268
|
-
return
|
|
3217
|
+
function RefusalToJSON(json) {
|
|
3218
|
+
return RefusalToJSONTyped(json, false);
|
|
1269
3219
|
}
|
|
1270
|
-
function
|
|
3220
|
+
function RefusalToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1271
3221
|
if (value == null) return value;
|
|
1272
3222
|
return {
|
|
1273
|
-
"
|
|
1274
|
-
"
|
|
3223
|
+
"error": value["error"],
|
|
3224
|
+
"signup": value["signup"]
|
|
1275
3225
|
};
|
|
1276
3226
|
}
|
|
1277
3227
|
|
|
@@ -1293,7 +3243,8 @@ function ScanRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1293
3243
|
"text": json["text"],
|
|
1294
3244
|
"language": json["language"] == null ? void 0 : json["language"],
|
|
1295
3245
|
"entities": json["entities"] == null ? void 0 : json["entities"],
|
|
1296
|
-
"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"]
|
|
1297
3248
|
};
|
|
1298
3249
|
}
|
|
1299
3250
|
function ScanRequestBodyToJSON(json) {
|
|
@@ -1305,7 +3256,8 @@ function ScanRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1305
3256
|
"text": value["text"],
|
|
1306
3257
|
"language": value["language"],
|
|
1307
3258
|
"entities": value["entities"],
|
|
1308
|
-
"confidence_threshold": value["confidence_threshold"]
|
|
3259
|
+
"confidence_threshold": value["confidence_threshold"],
|
|
3260
|
+
"models": value["models"]
|
|
1309
3261
|
};
|
|
1310
3262
|
}
|
|
1311
3263
|
|
|
@@ -1354,6 +3306,7 @@ function ScanResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1354
3306
|
function instanceOfScanResponseBody(value) {
|
|
1355
3307
|
if (!("results" in value) || value["results"] === void 0) return false;
|
|
1356
3308
|
if (!("usage" in value) || value["usage"] === void 0) return false;
|
|
3309
|
+
if (!("models" in value) || value["models"] === void 0) return false;
|
|
1357
3310
|
return true;
|
|
1358
3311
|
}
|
|
1359
3312
|
function ScanResponseBodyFromJSON(json) {
|
|
@@ -1363,7 +3316,8 @@ function ScanResponseBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1363
3316
|
if (json == null) return json;
|
|
1364
3317
|
return {
|
|
1365
3318
|
"results": json["results"].map(ScanResultFromJSON),
|
|
1366
|
-
"usage": UsageFromJSON(json["usage"])
|
|
3319
|
+
"usage": UsageFromJSON(json["usage"]),
|
|
3320
|
+
"models": json["models"]
|
|
1367
3321
|
};
|
|
1368
3322
|
}
|
|
1369
3323
|
function ScanResponseBodyToJSON(json) {
|
|
@@ -1373,7 +3327,8 @@ function ScanResponseBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1373
3327
|
if (value == null) return value;
|
|
1374
3328
|
return {
|
|
1375
3329
|
"results": value["results"].map(ScanResultToJSON),
|
|
1376
|
-
"usage": UsageToJSON(value["usage"])
|
|
3330
|
+
"usage": UsageToJSON(value["usage"]),
|
|
3331
|
+
"models": value["models"]
|
|
1377
3332
|
};
|
|
1378
3333
|
}
|
|
1379
3334
|
|
|
@@ -1410,7 +3365,7 @@ function UpdatePolicyRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1410
3365
|
//#region src/apis/PoliciesApi.ts
|
|
1411
3366
|
/**
|
|
1412
3367
|
* Sensitive Data Protection API
|
|
1413
|
-
* 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).
|
|
1414
3369
|
*
|
|
1415
3370
|
* The version of the OpenAPI document: 0.1.0
|
|
1416
3371
|
*
|
|
@@ -1552,7 +3507,7 @@ var PoliciesApi = class extends BaseAPI {
|
|
|
1552
3507
|
//#region src/apis/SensitiveDataProtectionApi.ts
|
|
1553
3508
|
/**
|
|
1554
3509
|
* Sensitive Data Protection API
|
|
1555
|
-
* 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).
|
|
1556
3511
|
*
|
|
1557
3512
|
* The version of the OpenAPI document: 0.1.0
|
|
1558
3513
|
*
|
|
@@ -1566,7 +3521,53 @@ var PoliciesApi = class extends BaseAPI {
|
|
|
1566
3521
|
*/
|
|
1567
3522
|
var SensitiveDataProtectionApi = class extends BaseAPI {
|
|
1568
3523
|
/**
|
|
1569
|
-
* 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.
|
|
1570
3571
|
* Anonymize Text
|
|
1571
3572
|
*/
|
|
1572
3573
|
async anonymizeTextRaw(requestParameters, initOverrides) {
|
|
@@ -1585,7 +3586,7 @@ var SensitiveDataProtectionApi = class extends BaseAPI {
|
|
|
1585
3586
|
return new JSONApiResponse(response, (jsonValue) => AnonymizeResponseBodyFromJSON(jsonValue));
|
|
1586
3587
|
}
|
|
1587
3588
|
/**
|
|
1588
|
-
* 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.
|
|
1589
3590
|
* Anonymize Text
|
|
1590
3591
|
*/
|
|
1591
3592
|
async anonymizeText(AnonymizeRequestBody, initOverrides) {
|
|
@@ -1616,6 +3617,26 @@ var SensitiveDataProtectionApi = class extends BaseAPI {
|
|
|
1616
3617
|
return await (await this.healthCheckRaw(initOverrides)).value();
|
|
1617
3618
|
}
|
|
1618
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
|
+
/**
|
|
1619
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.
|
|
1620
3641
|
* Scan Text
|
|
1621
3642
|
*/
|
|
@@ -1642,57 +3663,218 @@ var SensitiveDataProtectionApi = class extends BaseAPI {
|
|
|
1642
3663
|
return await (await this.scanTextRaw({ ScanRequestBody }, initOverrides)).value();
|
|
1643
3664
|
}
|
|
1644
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
|
+
};
|
|
1645
3684
|
|
|
1646
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;
|
|
1647
3697
|
exports.AnonymizeRequestBodyFromJSON = AnonymizeRequestBodyFromJSON;
|
|
1648
3698
|
exports.AnonymizeRequestBodyFromJSONTyped = AnonymizeRequestBodyFromJSONTyped;
|
|
1649
|
-
exports.AnonymizeRequestBodyRulesInnerFromJSON = AnonymizeRequestBodyRulesInnerFromJSON;
|
|
1650
|
-
exports.AnonymizeRequestBodyRulesInnerFromJSONTyped = AnonymizeRequestBodyRulesInnerFromJSONTyped;
|
|
1651
|
-
exports.AnonymizeRequestBodyRulesInnerToJSON = AnonymizeRequestBodyRulesInnerToJSON;
|
|
1652
|
-
exports.AnonymizeRequestBodyRulesInnerToJSONTyped = AnonymizeRequestBodyRulesInnerToJSONTyped;
|
|
1653
|
-
exports.AnonymizeRequestBodyRulesInnerTypeEnum = AnonymizeRequestBodyRulesInnerTypeEnum;
|
|
1654
3699
|
exports.AnonymizeRequestBodyToJSON = AnonymizeRequestBodyToJSON;
|
|
1655
3700
|
exports.AnonymizeRequestBodyToJSONTyped = AnonymizeRequestBodyToJSONTyped;
|
|
1656
3701
|
exports.AnonymizeResponseBodyFromJSON = AnonymizeResponseBodyFromJSON;
|
|
1657
3702
|
exports.AnonymizeResponseBodyFromJSONTyped = AnonymizeResponseBodyFromJSONTyped;
|
|
1658
|
-
exports.AnonymizeResponseBodyResultsInnerFromJSON = AnonymizeResponseBodyResultsInnerFromJSON;
|
|
1659
|
-
exports.AnonymizeResponseBodyResultsInnerFromJSONTyped = AnonymizeResponseBodyResultsInnerFromJSONTyped;
|
|
1660
|
-
exports.AnonymizeResponseBodyResultsInnerToJSON = AnonymizeResponseBodyResultsInnerToJSON;
|
|
1661
|
-
exports.AnonymizeResponseBodyResultsInnerToJSONTyped = AnonymizeResponseBodyResultsInnerToJSONTyped;
|
|
1662
|
-
exports.AnonymizeResponseBodyResultsInnerTypeEnum = AnonymizeResponseBodyResultsInnerTypeEnum;
|
|
1663
3703
|
exports.AnonymizeResponseBodyToJSON = AnonymizeResponseBodyToJSON;
|
|
1664
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;
|
|
1665
3718
|
exports.BASE_PATH = BASE_PATH;
|
|
1666
3719
|
exports.BaseAPI = BaseAPI;
|
|
1667
3720
|
exports.BlobApiResponse = BlobApiResponse;
|
|
1668
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;
|
|
1669
3751
|
exports.Configuration = Configuration;
|
|
1670
3752
|
exports.CreatePolicyRequestFromJSON = CreatePolicyRequestFromJSON;
|
|
1671
3753
|
exports.CreatePolicyRequestFromJSONTyped = CreatePolicyRequestFromJSONTyped;
|
|
1672
3754
|
exports.CreatePolicyRequestToJSON = CreatePolicyRequestToJSON;
|
|
1673
3755
|
exports.CreatePolicyRequestToJSONTyped = CreatePolicyRequestToJSONTyped;
|
|
1674
3756
|
exports.DefaultConfig = DefaultConfig;
|
|
1675
|
-
exports.DetectRuleEntitiesInnerFromJSON = DetectRuleEntitiesInnerFromJSON;
|
|
1676
|
-
exports.DetectRuleEntitiesInnerFromJSONTyped = DetectRuleEntitiesInnerFromJSONTyped;
|
|
1677
|
-
exports.DetectRuleEntitiesInnerToJSON = DetectRuleEntitiesInnerToJSON;
|
|
1678
|
-
exports.DetectRuleEntitiesInnerToJSONTyped = DetectRuleEntitiesInnerToJSONTyped;
|
|
1679
|
-
exports.DetectRuleEntitiesInnerTypeEnum = DetectRuleEntitiesInnerTypeEnum;
|
|
1680
3757
|
exports.DetectRuleFromJSON = DetectRuleFromJSON;
|
|
1681
3758
|
exports.DetectRuleFromJSONTyped = DetectRuleFromJSONTyped;
|
|
1682
3759
|
exports.DetectRuleToJSON = DetectRuleToJSON;
|
|
1683
3760
|
exports.DetectRuleToJSONTyped = DetectRuleToJSONTyped;
|
|
1684
3761
|
exports.DetectRuleTypeEnum = DetectRuleTypeEnum;
|
|
3762
|
+
exports.ElementSegmentFromJSON = ElementSegmentFromJSON;
|
|
3763
|
+
exports.ElementSegmentFromJSONTyped = ElementSegmentFromJSONTyped;
|
|
3764
|
+
exports.ElementSegmentToJSON = ElementSegmentToJSON;
|
|
3765
|
+
exports.ElementSegmentToJSONTyped = ElementSegmentToJSONTyped;
|
|
3766
|
+
exports.ElementSegmentTypeEnum = ElementSegmentTypeEnum;
|
|
1685
3767
|
exports.EncryptRuleFromJSON = EncryptRuleFromJSON;
|
|
1686
3768
|
exports.EncryptRuleFromJSONTyped = EncryptRuleFromJSONTyped;
|
|
1687
3769
|
exports.EncryptRuleToJSON = EncryptRuleToJSON;
|
|
1688
3770
|
exports.EncryptRuleToJSONTyped = EncryptRuleToJSONTyped;
|
|
1689
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;
|
|
1690
3790
|
exports.FetchError = FetchError;
|
|
1691
|
-
exports.
|
|
1692
|
-
exports.
|
|
1693
|
-
exports.
|
|
1694
|
-
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;
|
|
1695
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;
|
|
1696
3878
|
exports.ListPolicies200ResponseFromJSON = ListPolicies200ResponseFromJSON;
|
|
1697
3879
|
exports.ListPolicies200ResponseFromJSONTyped = ListPolicies200ResponseFromJSONTyped;
|
|
1698
3880
|
exports.ListPolicies200ResponseToJSON = ListPolicies200ResponseToJSON;
|
|
@@ -1716,6 +3898,32 @@ exports.ModelResultFromJSONTyped = ModelResultFromJSONTyped;
|
|
|
1716
3898
|
exports.ModelResultToJSON = ModelResultToJSON;
|
|
1717
3899
|
exports.ModelResultToJSONTyped = ModelResultToJSONTyped;
|
|
1718
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;
|
|
1719
3927
|
exports.PoliciesApi = PoliciesApi;
|
|
1720
3928
|
exports.PolicyDocumentFromJSON = PolicyDocumentFromJSON;
|
|
1721
3929
|
exports.PolicyDocumentFromJSONTyped = PolicyDocumentFromJSONTyped;
|
|
@@ -1723,7 +3931,6 @@ exports.PolicyDocumentRulesInnerFromJSON = PolicyDocumentRulesInnerFromJSON;
|
|
|
1723
3931
|
exports.PolicyDocumentRulesInnerFromJSONTyped = PolicyDocumentRulesInnerFromJSONTyped;
|
|
1724
3932
|
exports.PolicyDocumentRulesInnerToJSON = PolicyDocumentRulesInnerToJSON;
|
|
1725
3933
|
exports.PolicyDocumentRulesInnerToJSONTyped = PolicyDocumentRulesInnerToJSONTyped;
|
|
1726
|
-
exports.PolicyDocumentRulesInnerTypeEnum = PolicyDocumentRulesInnerTypeEnum;
|
|
1727
3934
|
exports.PolicyDocumentSchemaVersionEnum = PolicyDocumentSchemaVersionEnum;
|
|
1728
3935
|
exports.PolicyDocumentToJSON = PolicyDocumentToJSON;
|
|
1729
3936
|
exports.PolicyDocumentToJSONTyped = PolicyDocumentToJSONTyped;
|
|
@@ -1735,11 +3942,35 @@ exports.PolicySummaryToJSON = PolicySummaryToJSON;
|
|
|
1735
3942
|
exports.PolicySummaryToJSONTyped = PolicySummaryToJSONTyped;
|
|
1736
3943
|
exports.PolicyToJSON = PolicyToJSON;
|
|
1737
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;
|
|
1738
3965
|
exports.RedactRuleFromJSON = RedactRuleFromJSON;
|
|
1739
3966
|
exports.RedactRuleFromJSONTyped = RedactRuleFromJSONTyped;
|
|
1740
3967
|
exports.RedactRuleToJSON = RedactRuleToJSON;
|
|
1741
3968
|
exports.RedactRuleToJSONTyped = RedactRuleToJSONTyped;
|
|
1742
3969
|
exports.RedactRuleTypeEnum = RedactRuleTypeEnum;
|
|
3970
|
+
exports.RefusalFromJSON = RefusalFromJSON;
|
|
3971
|
+
exports.RefusalFromJSONTyped = RefusalFromJSONTyped;
|
|
3972
|
+
exports.RefusalToJSON = RefusalToJSON;
|
|
3973
|
+
exports.RefusalToJSONTyped = RefusalToJSONTyped;
|
|
1743
3974
|
exports.RegexEntityFromJSON = RegexEntityFromJSON;
|
|
1744
3975
|
exports.RegexEntityFromJSONTyped = RegexEntityFromJSONTyped;
|
|
1745
3976
|
exports.RegexEntityToJSON = RegexEntityToJSON;
|
|
@@ -1750,6 +3981,11 @@ exports.RegexResultFromJSONTyped = RegexResultFromJSONTyped;
|
|
|
1750
3981
|
exports.RegexResultToJSON = RegexResultToJSON;
|
|
1751
3982
|
exports.RegexResultToJSONTyped = RegexResultToJSONTyped;
|
|
1752
3983
|
exports.RegexResultTypeEnum = RegexResultTypeEnum;
|
|
3984
|
+
exports.RegionSegmentFromJSON = RegionSegmentFromJSON;
|
|
3985
|
+
exports.RegionSegmentFromJSONTyped = RegionSegmentFromJSONTyped;
|
|
3986
|
+
exports.RegionSegmentToJSON = RegionSegmentToJSON;
|
|
3987
|
+
exports.RegionSegmentToJSONTyped = RegionSegmentToJSONTyped;
|
|
3988
|
+
exports.RegionSegmentTypeEnum = RegionSegmentTypeEnum;
|
|
1753
3989
|
exports.ReplaceRuleFromJSON = ReplaceRuleFromJSON;
|
|
1754
3990
|
exports.ReplaceRuleFromJSONTyped = ReplaceRuleFromJSONTyped;
|
|
1755
3991
|
exports.ReplaceRuleToJSON = ReplaceRuleToJSON;
|
|
@@ -1757,6 +3993,10 @@ exports.ReplaceRuleToJSONTyped = ReplaceRuleToJSONTyped;
|
|
|
1757
3993
|
exports.ReplaceRuleTypeEnum = ReplaceRuleTypeEnum;
|
|
1758
3994
|
exports.RequiredError = RequiredError;
|
|
1759
3995
|
exports.ResponseError = ResponseError;
|
|
3996
|
+
exports.RuleBodyFromJSON = RuleBodyFromJSON;
|
|
3997
|
+
exports.RuleBodyFromJSONTyped = RuleBodyFromJSONTyped;
|
|
3998
|
+
exports.RuleBodyToJSON = RuleBodyToJSON;
|
|
3999
|
+
exports.RuleBodyToJSONTyped = RuleBodyToJSONTyped;
|
|
1760
4000
|
exports.SHA256RuleFromJSON = SHA256RuleFromJSON;
|
|
1761
4001
|
exports.SHA256RuleFromJSONTyped = SHA256RuleFromJSONTyped;
|
|
1762
4002
|
exports.SHA256RuleToJSON = SHA256RuleToJSON;
|
|
@@ -1779,12 +4019,56 @@ exports.ScanResultFromJSON = ScanResultFromJSON;
|
|
|
1779
4019
|
exports.ScanResultFromJSONTyped = ScanResultFromJSONTyped;
|
|
1780
4020
|
exports.ScanResultToJSON = ScanResultToJSON;
|
|
1781
4021
|
exports.ScanResultToJSONTyped = ScanResultToJSONTyped;
|
|
4022
|
+
exports.SegmentSegmentFromJSON = SegmentSegmentFromJSON;
|
|
4023
|
+
exports.SegmentSegmentFromJSONTyped = SegmentSegmentFromJSONTyped;
|
|
4024
|
+
exports.SegmentSegmentToJSON = SegmentSegmentToJSON;
|
|
4025
|
+
exports.SegmentSegmentToJSONTyped = SegmentSegmentToJSONTyped;
|
|
4026
|
+
exports.SegmentSegmentTypeEnum = SegmentSegmentTypeEnum;
|
|
1782
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;
|
|
1783
4062
|
exports.TextApiResponse = TextApiResponse;
|
|
1784
4063
|
exports.TextRangeFromJSON = TextRangeFromJSON;
|
|
1785
4064
|
exports.TextRangeFromJSONTyped = TextRangeFromJSONTyped;
|
|
1786
4065
|
exports.TextRangeToJSON = TextRangeToJSON;
|
|
1787
4066
|
exports.TextRangeToJSONTyped = TextRangeToJSONTyped;
|
|
4067
|
+
exports.TextSegmentFromJSON = TextSegmentFromJSON;
|
|
4068
|
+
exports.TextSegmentFromJSONTyped = TextSegmentFromJSONTyped;
|
|
4069
|
+
exports.TextSegmentToJSON = TextSegmentToJSON;
|
|
4070
|
+
exports.TextSegmentToJSONTyped = TextSegmentToJSONTyped;
|
|
4071
|
+
exports.TextSegmentTypeEnum = TextSegmentTypeEnum;
|
|
1788
4072
|
exports.UpdatePolicyRequestFromJSON = UpdatePolicyRequestFromJSON;
|
|
1789
4073
|
exports.UpdatePolicyRequestFromJSONTyped = UpdatePolicyRequestFromJSONTyped;
|
|
1790
4074
|
exports.UpdatePolicyRequestToJSON = UpdatePolicyRequestToJSON;
|
|
@@ -1793,48 +4077,79 @@ exports.UsageFromJSON = UsageFromJSON;
|
|
|
1793
4077
|
exports.UsageFromJSONTyped = UsageFromJSONTyped;
|
|
1794
4078
|
exports.UsageToJSON = UsageToJSON;
|
|
1795
4079
|
exports.UsageToJSONTyped = UsageToJSONTyped;
|
|
1796
|
-
exports.ValidationErrorFromJSON = ValidationErrorFromJSON;
|
|
1797
|
-
exports.ValidationErrorFromJSONTyped = ValidationErrorFromJSONTyped;
|
|
1798
|
-
exports.ValidationErrorLocInnerFromJSON = ValidationErrorLocInnerFromJSON;
|
|
1799
|
-
exports.ValidationErrorLocInnerFromJSONTyped = ValidationErrorLocInnerFromJSONTyped;
|
|
1800
|
-
exports.ValidationErrorLocInnerToJSON = ValidationErrorLocInnerToJSON;
|
|
1801
|
-
exports.ValidationErrorLocInnerToJSONTyped = ValidationErrorLocInnerToJSONTyped;
|
|
1802
|
-
exports.ValidationErrorToJSON = ValidationErrorToJSON;
|
|
1803
|
-
exports.ValidationErrorToJSONTyped = ValidationErrorToJSONTyped;
|
|
1804
4080
|
exports.VoidApiResponse = VoidApiResponse;
|
|
1805
4081
|
exports.canConsumeForm = canConsumeForm;
|
|
1806
4082
|
exports.exists = exists;
|
|
4083
|
+
exports.instanceOfAction = instanceOfAction;
|
|
4084
|
+
exports.instanceOfAnonymizeFileResponseBody = instanceOfAnonymizeFileResponseBody;
|
|
1807
4085
|
exports.instanceOfAnonymizeRequestBody = instanceOfAnonymizeRequestBody;
|
|
1808
|
-
exports.instanceOfAnonymizeRequestBodyRulesInner = instanceOfAnonymizeRequestBodyRulesInner;
|
|
1809
4086
|
exports.instanceOfAnonymizeResponseBody = instanceOfAnonymizeResponseBody;
|
|
1810
|
-
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;
|
|
1811
4094
|
exports.instanceOfCreatePolicyRequest = instanceOfCreatePolicyRequest;
|
|
1812
4095
|
exports.instanceOfDetectRule = instanceOfDetectRule;
|
|
1813
|
-
exports.
|
|
4096
|
+
exports.instanceOfElementSegment = instanceOfElementSegment;
|
|
1814
4097
|
exports.instanceOfEncryptRule = instanceOfEncryptRule;
|
|
1815
|
-
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;
|
|
1816
4117
|
exports.instanceOfListPolicies200Response = instanceOfListPolicies200Response;
|
|
1817
4118
|
exports.instanceOfMaskRule = instanceOfMaskRule;
|
|
1818
4119
|
exports.instanceOfModelEntity = instanceOfModelEntity;
|
|
1819
4120
|
exports.instanceOfModelError = instanceOfModelError;
|
|
1820
4121
|
exports.instanceOfModelResult = instanceOfModelResult;
|
|
4122
|
+
exports.instanceOfModelStatus = instanceOfModelStatus;
|
|
4123
|
+
exports.instanceOfParagraphSegment = instanceOfParagraphSegment;
|
|
4124
|
+
exports.instanceOfPartSegment = instanceOfPartSegment;
|
|
1821
4125
|
exports.instanceOfPolicy = instanceOfPolicy;
|
|
1822
4126
|
exports.instanceOfPolicyDocument = instanceOfPolicyDocument;
|
|
1823
|
-
exports.instanceOfPolicyDocumentRulesInner = instanceOfPolicyDocumentRulesInner;
|
|
1824
4127
|
exports.instanceOfPolicySummary = instanceOfPolicySummary;
|
|
4128
|
+
exports.instanceOfPropertySegment = instanceOfPropertySegment;
|
|
4129
|
+
exports.instanceOfPseudonymizeRule = instanceOfPseudonymizeRule;
|
|
4130
|
+
exports.instanceOfRangeKind = instanceOfRangeKind;
|
|
4131
|
+
exports.instanceOfRangeSegment = instanceOfRangeSegment;
|
|
1825
4132
|
exports.instanceOfRedactRule = instanceOfRedactRule;
|
|
4133
|
+
exports.instanceOfRefusal = instanceOfRefusal;
|
|
1826
4134
|
exports.instanceOfRegexEntity = instanceOfRegexEntity;
|
|
1827
4135
|
exports.instanceOfRegexResult = instanceOfRegexResult;
|
|
4136
|
+
exports.instanceOfRegionSegment = instanceOfRegionSegment;
|
|
1828
4137
|
exports.instanceOfReplaceRule = instanceOfReplaceRule;
|
|
1829
4138
|
exports.instanceOfSHA256Rule = instanceOfSHA256Rule;
|
|
1830
4139
|
exports.instanceOfSHA512Rule = instanceOfSHA512Rule;
|
|
1831
4140
|
exports.instanceOfScanRequestBody = instanceOfScanRequestBody;
|
|
1832
4141
|
exports.instanceOfScanResponseBody = instanceOfScanResponseBody;
|
|
1833
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;
|
|
1834
4150
|
exports.instanceOfTextRange = instanceOfTextRange;
|
|
4151
|
+
exports.instanceOfTextSegment = instanceOfTextSegment;
|
|
1835
4152
|
exports.instanceOfUpdatePolicyRequest = instanceOfUpdatePolicyRequest;
|
|
1836
4153
|
exports.instanceOfUsage = instanceOfUsage;
|
|
1837
|
-
exports.instanceOfValidationError = instanceOfValidationError;
|
|
1838
|
-
exports.instanceOfValidationErrorLocInner = instanceOfValidationErrorLocInner;
|
|
1839
4154
|
exports.mapValues = mapValues;
|
|
1840
4155
|
exports.querystring = querystring;
|