@semantha/sdk 10.0.0 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +18 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2154,8 +2154,12 @@ declare class BulkdomainsDocumentclassesEndpoint {
|
|
|
2154
2154
|
constructor(restClient: RestClient, parentEndpoint: string);
|
|
2155
2155
|
/**
|
|
2156
2156
|
* Get all document classesThis is the quiet version of 'get /api/domains/{domainname}/documentclasses'
|
|
2157
|
+
*
|
|
2158
|
+
* @param withdocids boolean? -
|
|
2157
2159
|
*/
|
|
2158
|
-
get(
|
|
2160
|
+
get(params?: {
|
|
2161
|
+
withdocids?: boolean;
|
|
2162
|
+
}): Promise<DocumentClassBulk[]>;
|
|
2159
2163
|
/**
|
|
2160
2164
|
* Create one or more document classesThis is the quiet version of 'post /api/domains/{domainname}/documentclasses'
|
|
2161
2165
|
*
|
|
@@ -2580,7 +2584,7 @@ declare class DocclassDocumentclassesEndpoint {
|
|
|
2580
2584
|
*/
|
|
2581
2585
|
patch(body: string[]): Promise<DocumentClass[]>;
|
|
2582
2586
|
/**
|
|
2583
|
-
* Create one
|
|
2587
|
+
* Create one subclass for a document class identified by name
|
|
2584
2588
|
*
|
|
2585
2589
|
* @param body DocumentClass? -
|
|
2586
2590
|
*/
|
|
@@ -2733,7 +2737,7 @@ declare class DocumentclassesEndpoint {
|
|
|
2733
2737
|
*/
|
|
2734
2738
|
delete(): Promise<RestResponse<void>>;
|
|
2735
2739
|
/**
|
|
2736
|
-
* Create one
|
|
2740
|
+
* Create one document class
|
|
2737
2741
|
*
|
|
2738
2742
|
* @param body DocumentClass? -
|
|
2739
2743
|
*/
|
|
@@ -3342,13 +3346,13 @@ declare class ReferencedocumentsEndpoint {
|
|
|
3342
3346
|
/**
|
|
3343
3347
|
* Get all reference documents a.k.a. library items.Supports server side pagination and filtering for <strong>application/json</strong> media type only by using <strong>offset</strong> and <strong>limit</strong> query parameter.<br><strong>Filter parameters:</strong> name, createdbefore, createdafter, tags, documentclassids, metadata.<br>Without <strong>offset</strong> and <strong>limit</strong> parameter, data can be filtered only by <strong>tags</strong> and <strong>documentclassids</strong>.
|
|
3344
3348
|
*
|
|
3345
|
-
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3346
3349
|
* @param documentids string? - List of document Ids for target. The limit here is 65000 IDs. The IDs can be passed as a comma separated string.
|
|
3347
3350
|
* @param name string? - Filter documents for a given name
|
|
3348
3351
|
* @param createdafter number? - Filter for documents which are created after a given UNIX timestamp. The createdafter filter only works when also using the parameters offset and limit.
|
|
3349
3352
|
* @param createdbefore number? - Filter for documents which are created before a given UNIX timestamp. The createdbefore filter only works when also using the parameters offset and limit.
|
|
3350
3353
|
* @param updatedafter number? - Filter for documents which are updated after a given UNIX timestamp. The updatedafter filter only works when also using the parameters offset and limit.
|
|
3351
3354
|
* @param updatedbefore number? - Filter for documents which are updated before a given UNIX timestamp. The updatedbefore filter only works when also using the parameters offset and limit.
|
|
3355
|
+
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3352
3356
|
* @param documentclassids string? - List of documentclass IDs for the target. The limit here is 1000 IDs. The IDs are passed as a comma separated list.
|
|
3353
3357
|
* @param withoutdocumentclass boolean? - Filters the returned reference documents to include only documents that are not linked to a documentclass. The parameter is of type boolean and is set to false by default.
|
|
3354
3358
|
* @param mincharacters number? - Filters the returned reference documents to include only documents that have a minimum of characters
|
|
@@ -3362,13 +3366,13 @@ declare class ReferencedocumentsEndpoint {
|
|
|
3362
3366
|
* @param fields string? - Define which fields should be returned by the /referencedocuments endpoints. The following values can be sent as a comma-separated list: 'id', 'name', 'tags', 'derivedtags', 'metadata', 'filename', 'created', 'processed', 'lang', 'updated, color, derivedcolor, comment, derivedcomment, documentclass, contentpreview'. If empty or null all fields will be returned. Example: "id,name,contentpreview,tags"
|
|
3363
3367
|
*/
|
|
3364
3368
|
get(params?: {
|
|
3365
|
-
tags?: string;
|
|
3366
3369
|
documentids?: string;
|
|
3367
3370
|
name?: string;
|
|
3368
3371
|
createdafter?: number;
|
|
3369
3372
|
createdbefore?: number;
|
|
3370
3373
|
updatedafter?: number;
|
|
3371
3374
|
updatedbefore?: number;
|
|
3375
|
+
tags?: string;
|
|
3372
3376
|
documentclassids?: string;
|
|
3373
3377
|
withoutdocumentclass?: boolean;
|
|
3374
3378
|
mincharacters?: number;
|
|
@@ -3384,13 +3388,13 @@ declare class ReferencedocumentsEndpoint {
|
|
|
3384
3388
|
/**
|
|
3385
3389
|
* Get all reference documents a.k.a. library items.Supports server side pagination and filtering for <strong>application/json</strong> media type only by using <strong>offset</strong> and <strong>limit</strong> query parameter.<br><strong>Filter parameters:</strong> name, createdbefore, createdafter, tags, documentclassids, metadata.<br>Without <strong>offset</strong> and <strong>limit</strong> parameter, data can be filtered only by <strong>tags</strong> and <strong>documentclassids</strong>.
|
|
3386
3390
|
*
|
|
3387
|
-
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3388
3391
|
* @param documentids string? - List of document Ids for target. The limit here is 65000 IDs. The IDs can be passed as a comma separated string.
|
|
3389
3392
|
* @param name string? - Filter documents for a given name
|
|
3390
3393
|
* @param createdafter number? - Filter for documents which are created after a given UNIX timestamp. The createdafter filter only works when also using the parameters offset and limit.
|
|
3391
3394
|
* @param createdbefore number? - Filter for documents which are created before a given UNIX timestamp. The createdbefore filter only works when also using the parameters offset and limit.
|
|
3392
3395
|
* @param updatedafter number? - Filter for documents which are updated after a given UNIX timestamp. The updatedafter filter only works when also using the parameters offset and limit.
|
|
3393
3396
|
* @param updatedbefore number? - Filter for documents which are updated before a given UNIX timestamp. The updatedbefore filter only works when also using the parameters offset and limit.
|
|
3397
|
+
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3394
3398
|
* @param documentclassids string? - List of documentclass IDs for the target. The limit here is 1000 IDs. The IDs are passed as a comma separated list.
|
|
3395
3399
|
* @param withoutdocumentclass boolean? - Filters the returned reference documents to include only documents that are not linked to a documentclass. The parameter is of type boolean and is set to false by default.
|
|
3396
3400
|
* @param mincharacters number? - Filters the returned reference documents to include only documents that have a minimum of characters
|
|
@@ -3404,13 +3408,13 @@ declare class ReferencedocumentsEndpoint {
|
|
|
3404
3408
|
* @param fields string? - Define which fields should be returned by the /referencedocuments endpoints. The following values can be sent as a comma-separated list: 'id', 'name', 'tags', 'derivedtags', 'metadata', 'filename', 'created', 'processed', 'lang', 'updated, color, derivedcolor, comment, derivedcomment, documentclass, contentpreview'. If empty or null all fields will be returned. Example: "id,name,contentpreview,tags"
|
|
3405
3409
|
*/
|
|
3406
3410
|
getAsXlsx(params?: {
|
|
3407
|
-
tags?: string;
|
|
3408
3411
|
documentids?: string;
|
|
3409
3412
|
name?: string;
|
|
3410
3413
|
createdafter?: number;
|
|
3411
3414
|
createdbefore?: number;
|
|
3412
3415
|
updatedafter?: number;
|
|
3413
3416
|
updatedbefore?: number;
|
|
3417
|
+
tags?: string;
|
|
3414
3418
|
documentclassids?: string;
|
|
3415
3419
|
withoutdocumentclass?: boolean;
|
|
3416
3420
|
mincharacters?: number;
|
|
@@ -3489,8 +3493,7 @@ declare class ReferencesEndpoint {
|
|
|
3489
3493
|
*
|
|
3490
3494
|
* @param file Blob? - Input document (left document).
|
|
3491
3495
|
* @param referencedocument Blob? - Reference document(s) to be used instead of the documents in the domain's library.
|
|
3492
|
-
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs.
|
|
3493
|
-
* The IDs are passed as a JSON array.
|
|
3496
|
+
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs. The IDs are passed as a JSON array.
|
|
3494
3497
|
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3495
3498
|
* @param documentclassids string[]? - List of documentclass IDs for the target. The limit here is 1000 IDs.
|
|
3496
3499
|
* The IDs are passed as a JSON array.
|
|
@@ -3542,8 +3545,7 @@ declare class ReferencesEndpoint {
|
|
|
3542
3545
|
*
|
|
3543
3546
|
* @param file Blob? - Input document (left document).
|
|
3544
3547
|
* @param referencedocument Blob? - Reference document(s) to be used instead of the documents in the domain's library.
|
|
3545
|
-
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs.
|
|
3546
|
-
* The IDs are passed as a JSON array.
|
|
3548
|
+
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs. The IDs are passed as a JSON array.
|
|
3547
3549
|
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3548
3550
|
* @param documentclassids string[]? - List of documentclass IDs for the target. The limit here is 1000 IDs.
|
|
3549
3551
|
* The IDs are passed as a JSON array.
|
|
@@ -3595,8 +3597,7 @@ declare class ReferencesEndpoint {
|
|
|
3595
3597
|
*
|
|
3596
3598
|
* @param file Blob? - Input document (left document).
|
|
3597
3599
|
* @param referencedocument Blob? - Reference document(s) to be used instead of the documents in the domain's library.
|
|
3598
|
-
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs.
|
|
3599
|
-
* The IDs are passed as a JSON array.
|
|
3600
|
+
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs. The IDs are passed as a JSON array.
|
|
3600
3601
|
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3601
3602
|
* @param documentclassids string[]? - List of documentclass IDs for the target. The limit here is 1000 IDs.
|
|
3602
3603
|
* The IDs are passed as a JSON array.
|
|
@@ -3648,8 +3649,7 @@ declare class ReferencesEndpoint {
|
|
|
3648
3649
|
*
|
|
3649
3650
|
* @param file Blob? - Input document (left document).
|
|
3650
3651
|
* @param referencedocument Blob? - Reference document(s) to be used instead of the documents in the domain's library.
|
|
3651
|
-
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs.
|
|
3652
|
-
* The IDs are passed as a JSON array.
|
|
3652
|
+
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs. The IDs are passed as a JSON array.
|
|
3653
3653
|
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3654
3654
|
* @param documentclassids string[]? - List of documentclass IDs for the target. The limit here is 1000 IDs.
|
|
3655
3655
|
* The IDs are passed as a JSON array.
|
|
@@ -3875,7 +3875,7 @@ declare class ValidationEndpoint {
|
|
|
3875
3875
|
private readonly ENDPOINT;
|
|
3876
3876
|
constructor(restClient: RestClient, parentEndpoint: string);
|
|
3877
3877
|
/**
|
|
3878
|
-
* Validate existing data in a
|
|
3878
|
+
* Validate existing data in a document. The coordinates come back, if data is found
|
|
3879
3879
|
*
|
|
3880
3880
|
* @param file Blob? - Input document (left document).
|
|
3881
3881
|
*/
|
|
@@ -4515,7 +4515,7 @@ declare class ModelRulefunctionsEndpoint {
|
|
|
4515
4515
|
private readonly ENDPOINT;
|
|
4516
4516
|
constructor(restClient: RestClient, parentEndpoint: string);
|
|
4517
4517
|
/**
|
|
4518
|
-
* Get all
|
|
4518
|
+
* Get all rulefunctions
|
|
4519
4519
|
*/
|
|
4520
4520
|
get(): Promise<RuleFunction[]>;
|
|
4521
4521
|
}
|
|
@@ -4887,7 +4887,7 @@ declare class ModelDomainEndpoint {
|
|
|
4887
4887
|
/**
|
|
4888
4888
|
* Update a domain by domainname
|
|
4889
4889
|
*
|
|
4890
|
-
* @param file Blob -
|
|
4890
|
+
* @param file Blob -
|
|
4891
4891
|
*/
|
|
4892
4892
|
patch(file: Blob): Promise<Blob>;
|
|
4893
4893
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -2154,8 +2154,12 @@ declare class BulkdomainsDocumentclassesEndpoint {
|
|
|
2154
2154
|
constructor(restClient: RestClient, parentEndpoint: string);
|
|
2155
2155
|
/**
|
|
2156
2156
|
* Get all document classesThis is the quiet version of 'get /api/domains/{domainname}/documentclasses'
|
|
2157
|
+
*
|
|
2158
|
+
* @param withdocids boolean? -
|
|
2157
2159
|
*/
|
|
2158
|
-
get(
|
|
2160
|
+
get(params?: {
|
|
2161
|
+
withdocids?: boolean;
|
|
2162
|
+
}): Promise<DocumentClassBulk[]>;
|
|
2159
2163
|
/**
|
|
2160
2164
|
* Create one or more document classesThis is the quiet version of 'post /api/domains/{domainname}/documentclasses'
|
|
2161
2165
|
*
|
|
@@ -2580,7 +2584,7 @@ declare class DocclassDocumentclassesEndpoint {
|
|
|
2580
2584
|
*/
|
|
2581
2585
|
patch(body: string[]): Promise<DocumentClass[]>;
|
|
2582
2586
|
/**
|
|
2583
|
-
* Create one
|
|
2587
|
+
* Create one subclass for a document class identified by name
|
|
2584
2588
|
*
|
|
2585
2589
|
* @param body DocumentClass? -
|
|
2586
2590
|
*/
|
|
@@ -2733,7 +2737,7 @@ declare class DocumentclassesEndpoint {
|
|
|
2733
2737
|
*/
|
|
2734
2738
|
delete(): Promise<RestResponse<void>>;
|
|
2735
2739
|
/**
|
|
2736
|
-
* Create one
|
|
2740
|
+
* Create one document class
|
|
2737
2741
|
*
|
|
2738
2742
|
* @param body DocumentClass? -
|
|
2739
2743
|
*/
|
|
@@ -3342,13 +3346,13 @@ declare class ReferencedocumentsEndpoint {
|
|
|
3342
3346
|
/**
|
|
3343
3347
|
* Get all reference documents a.k.a. library items.Supports server side pagination and filtering for <strong>application/json</strong> media type only by using <strong>offset</strong> and <strong>limit</strong> query parameter.<br><strong>Filter parameters:</strong> name, createdbefore, createdafter, tags, documentclassids, metadata.<br>Without <strong>offset</strong> and <strong>limit</strong> parameter, data can be filtered only by <strong>tags</strong> and <strong>documentclassids</strong>.
|
|
3344
3348
|
*
|
|
3345
|
-
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3346
3349
|
* @param documentids string? - List of document Ids for target. The limit here is 65000 IDs. The IDs can be passed as a comma separated string.
|
|
3347
3350
|
* @param name string? - Filter documents for a given name
|
|
3348
3351
|
* @param createdafter number? - Filter for documents which are created after a given UNIX timestamp. The createdafter filter only works when also using the parameters offset and limit.
|
|
3349
3352
|
* @param createdbefore number? - Filter for documents which are created before a given UNIX timestamp. The createdbefore filter only works when also using the parameters offset and limit.
|
|
3350
3353
|
* @param updatedafter number? - Filter for documents which are updated after a given UNIX timestamp. The updatedafter filter only works when also using the parameters offset and limit.
|
|
3351
3354
|
* @param updatedbefore number? - Filter for documents which are updated before a given UNIX timestamp. The updatedbefore filter only works when also using the parameters offset and limit.
|
|
3355
|
+
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3352
3356
|
* @param documentclassids string? - List of documentclass IDs for the target. The limit here is 1000 IDs. The IDs are passed as a comma separated list.
|
|
3353
3357
|
* @param withoutdocumentclass boolean? - Filters the returned reference documents to include only documents that are not linked to a documentclass. The parameter is of type boolean and is set to false by default.
|
|
3354
3358
|
* @param mincharacters number? - Filters the returned reference documents to include only documents that have a minimum of characters
|
|
@@ -3362,13 +3366,13 @@ declare class ReferencedocumentsEndpoint {
|
|
|
3362
3366
|
* @param fields string? - Define which fields should be returned by the /referencedocuments endpoints. The following values can be sent as a comma-separated list: 'id', 'name', 'tags', 'derivedtags', 'metadata', 'filename', 'created', 'processed', 'lang', 'updated, color, derivedcolor, comment, derivedcomment, documentclass, contentpreview'. If empty or null all fields will be returned. Example: "id,name,contentpreview,tags"
|
|
3363
3367
|
*/
|
|
3364
3368
|
get(params?: {
|
|
3365
|
-
tags?: string;
|
|
3366
3369
|
documentids?: string;
|
|
3367
3370
|
name?: string;
|
|
3368
3371
|
createdafter?: number;
|
|
3369
3372
|
createdbefore?: number;
|
|
3370
3373
|
updatedafter?: number;
|
|
3371
3374
|
updatedbefore?: number;
|
|
3375
|
+
tags?: string;
|
|
3372
3376
|
documentclassids?: string;
|
|
3373
3377
|
withoutdocumentclass?: boolean;
|
|
3374
3378
|
mincharacters?: number;
|
|
@@ -3384,13 +3388,13 @@ declare class ReferencedocumentsEndpoint {
|
|
|
3384
3388
|
/**
|
|
3385
3389
|
* Get all reference documents a.k.a. library items.Supports server side pagination and filtering for <strong>application/json</strong> media type only by using <strong>offset</strong> and <strong>limit</strong> query parameter.<br><strong>Filter parameters:</strong> name, createdbefore, createdafter, tags, documentclassids, metadata.<br>Without <strong>offset</strong> and <strong>limit</strong> parameter, data can be filtered only by <strong>tags</strong> and <strong>documentclassids</strong>.
|
|
3386
3390
|
*
|
|
3387
|
-
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3388
3391
|
* @param documentids string? - List of document Ids for target. The limit here is 65000 IDs. The IDs can be passed as a comma separated string.
|
|
3389
3392
|
* @param name string? - Filter documents for a given name
|
|
3390
3393
|
* @param createdafter number? - Filter for documents which are created after a given UNIX timestamp. The createdafter filter only works when also using the parameters offset and limit.
|
|
3391
3394
|
* @param createdbefore number? - Filter for documents which are created before a given UNIX timestamp. The createdbefore filter only works when also using the parameters offset and limit.
|
|
3392
3395
|
* @param updatedafter number? - Filter for documents which are updated after a given UNIX timestamp. The updatedafter filter only works when also using the parameters offset and limit.
|
|
3393
3396
|
* @param updatedbefore number? - Filter for documents which are updated before a given UNIX timestamp. The updatedbefore filter only works when also using the parameters offset and limit.
|
|
3397
|
+
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3394
3398
|
* @param documentclassids string? - List of documentclass IDs for the target. The limit here is 1000 IDs. The IDs are passed as a comma separated list.
|
|
3395
3399
|
* @param withoutdocumentclass boolean? - Filters the returned reference documents to include only documents that are not linked to a documentclass. The parameter is of type boolean and is set to false by default.
|
|
3396
3400
|
* @param mincharacters number? - Filters the returned reference documents to include only documents that have a minimum of characters
|
|
@@ -3404,13 +3408,13 @@ declare class ReferencedocumentsEndpoint {
|
|
|
3404
3408
|
* @param fields string? - Define which fields should be returned by the /referencedocuments endpoints. The following values can be sent as a comma-separated list: 'id', 'name', 'tags', 'derivedtags', 'metadata', 'filename', 'created', 'processed', 'lang', 'updated, color, derivedcolor, comment, derivedcomment, documentclass, contentpreview'. If empty or null all fields will be returned. Example: "id,name,contentpreview,tags"
|
|
3405
3409
|
*/
|
|
3406
3410
|
getAsXlsx(params?: {
|
|
3407
|
-
tags?: string;
|
|
3408
3411
|
documentids?: string;
|
|
3409
3412
|
name?: string;
|
|
3410
3413
|
createdafter?: number;
|
|
3411
3414
|
createdbefore?: number;
|
|
3412
3415
|
updatedafter?: number;
|
|
3413
3416
|
updatedbefore?: number;
|
|
3417
|
+
tags?: string;
|
|
3414
3418
|
documentclassids?: string;
|
|
3415
3419
|
withoutdocumentclass?: boolean;
|
|
3416
3420
|
mincharacters?: number;
|
|
@@ -3489,8 +3493,7 @@ declare class ReferencesEndpoint {
|
|
|
3489
3493
|
*
|
|
3490
3494
|
* @param file Blob? - Input document (left document).
|
|
3491
3495
|
* @param referencedocument Blob? - Reference document(s) to be used instead of the documents in the domain's library.
|
|
3492
|
-
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs.
|
|
3493
|
-
* The IDs are passed as a JSON array.
|
|
3496
|
+
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs. The IDs are passed as a JSON array.
|
|
3494
3497
|
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3495
3498
|
* @param documentclassids string[]? - List of documentclass IDs for the target. The limit here is 1000 IDs.
|
|
3496
3499
|
* The IDs are passed as a JSON array.
|
|
@@ -3542,8 +3545,7 @@ declare class ReferencesEndpoint {
|
|
|
3542
3545
|
*
|
|
3543
3546
|
* @param file Blob? - Input document (left document).
|
|
3544
3547
|
* @param referencedocument Blob? - Reference document(s) to be used instead of the documents in the domain's library.
|
|
3545
|
-
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs.
|
|
3546
|
-
* The IDs are passed as a JSON array.
|
|
3548
|
+
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs. The IDs are passed as a JSON array.
|
|
3547
3549
|
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3548
3550
|
* @param documentclassids string[]? - List of documentclass IDs for the target. The limit here is 1000 IDs.
|
|
3549
3551
|
* The IDs are passed as a JSON array.
|
|
@@ -3595,8 +3597,7 @@ declare class ReferencesEndpoint {
|
|
|
3595
3597
|
*
|
|
3596
3598
|
* @param file Blob? - Input document (left document).
|
|
3597
3599
|
* @param referencedocument Blob? - Reference document(s) to be used instead of the documents in the domain's library.
|
|
3598
|
-
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs.
|
|
3599
|
-
* The IDs are passed as a JSON array.
|
|
3600
|
+
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs. The IDs are passed as a JSON array.
|
|
3600
3601
|
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3601
3602
|
* @param documentclassids string[]? - List of documentclass IDs for the target. The limit here is 1000 IDs.
|
|
3602
3603
|
* The IDs are passed as a JSON array.
|
|
@@ -3648,8 +3649,7 @@ declare class ReferencesEndpoint {
|
|
|
3648
3649
|
*
|
|
3649
3650
|
* @param file Blob? - Input document (left document).
|
|
3650
3651
|
* @param referencedocument Blob? - Reference document(s) to be used instead of the documents in the domain's library.
|
|
3651
|
-
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs.
|
|
3652
|
-
* The IDs are passed as a JSON array.
|
|
3652
|
+
* @param referencedocumentids string[]? - To filter for document IDs. The limit here is 65000 IDs. The IDs are passed as a JSON array.
|
|
3653
3653
|
* @param tags string? - List of tags to filter the reference library. You can combine the tags using a comma (OR) and using a plus sign (AND).
|
|
3654
3654
|
* @param documentclassids string[]? - List of documentclass IDs for the target. The limit here is 1000 IDs.
|
|
3655
3655
|
* The IDs are passed as a JSON array.
|
|
@@ -3875,7 +3875,7 @@ declare class ValidationEndpoint {
|
|
|
3875
3875
|
private readonly ENDPOINT;
|
|
3876
3876
|
constructor(restClient: RestClient, parentEndpoint: string);
|
|
3877
3877
|
/**
|
|
3878
|
-
* Validate existing data in a
|
|
3878
|
+
* Validate existing data in a document. The coordinates come back, if data is found
|
|
3879
3879
|
*
|
|
3880
3880
|
* @param file Blob? - Input document (left document).
|
|
3881
3881
|
*/
|
|
@@ -4515,7 +4515,7 @@ declare class ModelRulefunctionsEndpoint {
|
|
|
4515
4515
|
private readonly ENDPOINT;
|
|
4516
4516
|
constructor(restClient: RestClient, parentEndpoint: string);
|
|
4517
4517
|
/**
|
|
4518
|
-
* Get all
|
|
4518
|
+
* Get all rulefunctions
|
|
4519
4519
|
*/
|
|
4520
4520
|
get(): Promise<RuleFunction[]>;
|
|
4521
4521
|
}
|
|
@@ -4887,7 +4887,7 @@ declare class ModelDomainEndpoint {
|
|
|
4887
4887
|
/**
|
|
4888
4888
|
* Update a domain by domainname
|
|
4889
4889
|
*
|
|
4890
|
-
* @param file Blob -
|
|
4890
|
+
* @param file Blob -
|
|
4891
4891
|
*/
|
|
4892
4892
|
patch(file: Blob): Promise<Blob>;
|
|
4893
4893
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var m=require('axios'),Ee=require('fs');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var m__default=/*#__PURE__*/_interopDefault(m);var Ee__namespace=/*#__PURE__*/_interopNamespace(Ee);var he=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Fe(r){return he.includes(r)}var ye=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Ue(r){return ye.includes(r)}var Ce=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Xe(r){return Ce.includes(r)}var fe=["LOCAL","BALANCED","GLOBAL"];function We(r){return fe.includes(r)}var Te=["DELETE","INSERT","EQUAL"];function $e(r){return Te.includes(r)}var Oe=["sentence","paragraph"];function je(r){return Oe.includes(r)}var ge=["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","CONTENT_TOO_LARGE","INTERNAL_SERVER_ERROR","GATEWAY_TIMEOUT","DOCUMENTTYPE_NOT_FOUND","DOCUMENTTYPE_NAME_EXISTS","DOCUMENTTYPE_NOT_EDITABLE","COMPARE_DOC_IS_EMPTY","COMPARE_WRONG_LANGUAGE","COMPARE_NO_REFERENCES","DOMAIN_NOT_FOUND","TOO_MANY_TOKENS","NO_FILE_FOUND","FILE_TYPE_NOT_SUPPORTED","FILE_PASSWORDPROTECTED","MISSING_SERVICE_DEFINITION","SERVICE_CALL_ERROR","GENERATIVE_MODEL_ERROR","USED_AS_LINKED_EXTRACTOR","CYCLICAL_DEPENDENCY_LINKED_EXTRACTOR","FILE_TOO_BIG","TOO_MANY_ROWS","REGEX_INVALID","GENERATIVE_MODEL_CONTEXT_EXCEEDED","PROMPT_NOT_DELETABLE","JPEG2000_NOT_SUPPORTED","TRANSLATION_ERROR","RESOURCE_NOT_FOUND","PARENT_RESOURCE_NOT_FOUND","RESOURCE_PARAMETER_CONSTRAINT_VIOLATION","PLATFORM_UNREACHABLE","FILE_SIZE_TOOBIG","USER_REPOSITORY_NOT_CONFIGURED","PDF_NOT_CONFIGURED","INVALID_USER_PASSWORD","UNKNOWN_FINGERPRINTER_ID","JSON_ARRAY_EMPTY","TOKENS_ILLEGAL_TYPE","NO_JSON","INVALID_JSON_FORMAT","JSON_OBJECT_HAS_NO_DOCUMENTS","DOCUMENTS_ARE_NO_JSON_ARRAY","DOCUMENTS_JSON_ARRAY_EMPTY","DOCUMENTS_VALUE_ERROR","DOCUMENTS_TYPE_ERROR","DOCUMENTS_TOO_FEW_DOCUMENTS","REQ_NO_JSON_ARRAY","SENTENCE_LIST_NOT_TWO","IMAGE_NOT_PROVIDED","IMAGE_INVALID_FORMAT","MODEL_NAME_INVALID","THRESHOLD_INVALID","IMAGE_BUFFER_EMPTY","INVALID_MODEL_ID","IMAGE_NOT_PROVIDED_IFP","IMAGE_INVALID_DATA","IMAGE_INVALID_FORMAT_IFP"];function Qe(r){return ge.includes(r)}var Pe=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function tr(r){return Pe.includes(r)}var De=["REGEX","ANDREGEX","ANDNOTREGEX","NOTREGEX","REGEX_CASE_INSENSITIVE","ANDREGEX_CASE_INSENSITIVE","ANDNOTREGEX_CASE_INSENSITIVE","NOTREGEX_CASE_INSENSITIVE","SIMILAR","ANDSIMILAR","ANDNOTSIMILAR","NOTSIMILAR","LIBRARY","ANDLIBRARY","ANDNOTLIBRARY","NOTLIBRARY","PARAGRAPH_DETECTION","CONSTANT","INTERNAL","INTERNAL_2","INTERNAL_3","INTERNAL_4","INTERNAL_5","INTERNAL_6","INTERNAL_7","INTERNAL_8","INTERNAL_9","INTERNAL_10","RANGE","REGEX_PARAGRAPH_LASTMATCH","REGEX_DOCUMENT_LASTMATCH","INTERNAL_PARAGRAPH_LASTMATCH","INTERNAL_DOCUMENT_LASTMATCH","END_OF_DOCUMENT","START_OF_DOCUMENT","NEXT_HEADING","TEXT_TYPE"];function rr(r){return De.includes(r)}var Ie=["CLASS","OBJECT_PROPERTY","DATA_PROPERTY"];function ir(r){return Ie.includes(r)}var Re=["REGEX","ANDREGEX","ANDNOTREGEX","NOTREGEX","REGEX_CASE_INSENSITIVE","ANDREGEX_CASE_INSENSITIVE","ANDNOTREGEX_CASE_INSENSITIVE","NOTREGEX_CASE_INSENSITIVE","SIMILAR","ANDSIMILAR","ANDNOTSIMILAR","NOTSIMILAR","LIBRARY","ANDLIBRARY","ANDNOTLIBRARY","NOTLIBRARY","PARAGRAPH_DETECTION","CONSTANT","INTERNAL","INTERNAL_2","INTERNAL_3","INTERNAL_4","INTERNAL_5","INTERNAL_6","INTERNAL_7","INTERNAL_8","INTERNAL_9","INTERNAL_10","RANGE","REGEX_PARAGRAPH_LASTMATCH","REGEX_DOCUMENT_LASTMATCH","INTERNAL_PARAGRAPH_LASTMATCH","INTERNAL_DOCUMENT_LASTMATCH","END_OF_DOCUMENT","START_OF_DOCUMENT","NEXT_HEADING","TEXT_TYPE"];function sr(r){return Re.includes(r)}var xe=["USER","ASSISTANT","SYSTEM"];function pr(r){return xe.includes(r)}var ve=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto"];function mr(r){return ve.includes(r)}var we=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY","INTERNAL","CUSTOM"];function ur(r){return we.includes(r)}var Me=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY","INTERNAL","CUSTOM"];function Er(r){return Me.includes(r)}var Se=["HOURS","DAYS","MONTHS","YEARS"];function hr(r){return Se.includes(r)}var be=["OPERATOR","FUNCTION"];function Cr(r){return be.includes(r)}var Ae=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto"];function Tr(r){return Ae.includes(r)}var _e=["ANY","TOP1","TOP3","TOP5","TOP10"];function gr(r){return _e.includes(r)}var He=["TOP1","TOP3","TOP5","TOP10"];function Dr(r){return He.includes(r)}var Be=["LOCAL","BALANCED","GLOBAL"];function Rr(r){return Be.includes(r)}var Je=["HOURS","DAYS","MONTHS","YEARS"];function vr(r){return Je.includes(r)}var Le=["SHORT","MEDIUM","LONG"];function Mr(r){return Le.includes(r)}var Ve=["similarity","extraction"];function br(r){return Ve.includes(r)}var p=class{constructor(t){this.response=t;}async toModel(){return (await this.response).data}async toFile(){let t=await this.response,e=t?.headers["content-disposition"],i="file";if(e){let o=e.match(/filename="?([^"]+)"?/);o&&o[1]&&(i=o[1]);}return new File([t.data],i)}async getStatusCode(){return (await this.response).status}async getStatusText(){return (await this.response).statusText}};var n=(s=>(s.JSON="application/json",s.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",s.PDF="application/pdf",s.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",s.ZIP="application/zip",s.REQIFZ="application/reqifz",s.PNG="image/png",s.BINARY="application/octet-stream",s))(n||{}),l=class r{constructor(t,e,i,o,a){this.serverUrl=t;this.apiKey=e;this.clientId=i;this.client_secret=o;this.tokenUrl=a;this.expireTime=0,this.accessToken="";}static LEEWAY=30;expireTime;accessToken;async buildHeadersForJsonRequest(){return {Accept:"application/json",Authorization:`Bearer ${await this.getToken()}`}}async buildHeadersForRequest(){return {Authorization:`Bearer ${await this.getToken()}`}}async getToken(){if(this.apiKey)return this.apiKey;if(this.clientId&&this.client_secret&&this.tokenUrl&&(this.accessToken==""||this.expireTime<performance.now())){let t={grant_type:"client_credentials",client_id:this.clientId,client_secret:this.client_secret,scope:"openid"},e=await m__default.default.post(this.tokenUrl,t,{headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded"}});if(e.status>=m__default.default.HttpStatusCode.BadRequest)return "";this.accessToken=e.data.id_token??e.data.access_token,this.expireTime=performance.now()+(e.data.expires_in-r.LEEWAY);}return this.accessToken}async request(t,e,i){if(!i.headers)i.headers=await this.buildHeadersForJsonRequest();else {let o=await this.buildHeadersForRequest();i.headers={...i.headers,...o};}return new p(m__default.default.request({method:t,url:this.serverUrl+e,headers:{...i.headers,"User-Agent":"semantha TypeScript SDK; "},data:i.data,params:i.params,responseType:i.responseType}))}async get(t,e,i,o,a="json"){return this.request("GET",t,{params:e,headers:i,data:o,responseType:a})}async post(t,e,i,o,a="json"){if(!i)i=await this.buildHeadersForJsonRequest();else {let de=await this.buildHeadersForRequest();i={...i,...de};}return new p(m__default.default.post(this.serverUrl+t,o,{params:e,headers:i,responseType:a}))}async delete(t,e){return this.request("DELETE",t,{data:e})}async patch(t,e){return this.request("PATCH",t,{data:e})}async put(t,e){return this.request("PUT",t,{data:e})}toHeader(t,e){return e?{Accept:t,"Content-Type":e}:{Accept:t}}};var d=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/answers";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var N=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/boostwords";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var E=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var c=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.classid=i;this.ENDPOINT=this.parentEndpoint+`/classes/${this.classid}`;}ENDPOINT;instances(){return new E(this.restClient,this.ENDPOINT)}};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var y=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/dataproperties";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var C=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var f=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/metadata";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var T=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/namedentities";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var O=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/rules";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var g=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/stopwords";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var P=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/synonyms";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var D=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;boostwords(){return new N(this.restClient,this.ENDPOINT)}classes(t){return t!=null?new c(this.restClient,this.ENDPOINT,t):new h(this.restClient,this.ENDPOINT)}dataproperties(){return new y(this.restClient,this.ENDPOINT)}instances(){return new C(this.restClient,this.ENDPOINT)}metadata(){return new f(this.restClient,this.ENDPOINT)}namedentities(){return new T(this.restClient,this.ENDPOINT)}rules(){return new O(this.restClient,this.ENDPOINT)}stopwords(){return new g(this.restClient,this.ENDPOINT)}synonyms(){return new P(this.restClient,this.ENDPOINT)}};var I=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var R=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/model";}ENDPOINT;domains(t){return t!=null?new D(this.restClient,this.ENDPOINT,t):new I(this.restClient,this.ENDPOINT)}};var x=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var v=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documenttypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var w=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,t)}async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postJson(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var M=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/references";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var S=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;documentclasses(){return new x(this.restClient,this.ENDPOINT)}documenttypes(){return new v(this.restClient,this.ENDPOINT)}referencedocuments(){return new w(this.restClient,this.ENDPOINT)}references(){return new M(this.restClient,this.ENDPOINT)}};var b=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/bulk";}ENDPOINT;domains(t){return t!=null?new S(this.restClient,this.ENDPOINT,t):new u(this.restClient,this.ENDPOINT)}model(){return new R(this.restClient,this.ENDPOINT)}};var A=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/celltypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var _=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/chats/${this.id}`;}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var H=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/chats";}ENDPOINT};var B=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractorclasses";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var J=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/clone";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var L=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/clusters";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var V=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/conversions";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toFile()}};var F=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/roles";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var k=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new F(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var U=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/diff";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var G=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/customfields";}ENDPOINT;async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var X=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,t)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Y=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tags";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var W=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;tags(){return new Y(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,t)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var q=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentannotations";}ENDPOINT;async postAsDocx(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t)).toFile()}async postAsPdf(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/pdf"),t)).toFile()}};var $=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/documentclasses/${this.id}`;}ENDPOINT;customfields(){return new G(this.restClient,this.ENDPOINT)}documentclasses(){return new X(this.restClient,this.ENDPOINT)}referencedocuments(){return new W(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var z=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var j=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documents";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postAsXlsx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t,"blob")).toFile()}async postAsDocx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t)).toFile()}async postAsPng(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("image/png"),t)).toFile()}async postAsReqifz(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/reqifz"),t)).toFile()}};var K=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/documenttypes/${this.id}`;}ENDPOINT;clone(){return new J(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var Q=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documenttypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Z=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/modelclasses";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var tt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/modelinstances";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postJson(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postAsXlsx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t,"blob")).toFile()}};var et=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/prompts/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var rt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/prompts";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var nt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/images/${this.id}`;}ENDPOINT;async getAsBinary(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/octet-stream"),null,"blob")).toFile()}};var it=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/images";}ENDPOINT};var ot=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/paragraphs/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var st=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/paragraphs";}ENDPOINT};var at=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/sentences/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var pt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/sentences";}ENDPOINT};var lt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.documentid=i;this.ENDPOINT=this.parentEndpoint+`/referencedocuments/${this.documentid}`;}ENDPOINT;images(t){return t!=null?new nt(this.restClient,this.ENDPOINT,t):new it(this.restClient,this.ENDPOINT)}paragraphs(t){return t!=null?new ot(this.restClient,this.ENDPOINT,t):new st(this.restClient,this.ENDPOINT)}sentences(t){return t!=null?new at(this.restClient,this.ENDPOINT,t):new pt(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var mt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/namedentities";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var dt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/statistic";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var ut=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;clusters(){return new L(this.restClient,this.ENDPOINT)}namedentities(){return new mt(this.restClient,this.ENDPOINT)}statistic(){return new dt(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async getAsXlsx(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postJson(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var Nt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/references";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postAsXlsx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t,"blob")).toFile()}async postAsDocx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t)).toFile()}async postAsPdf(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/pdf"),t)).toFile()}};var Et=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/settings";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var ct=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/summarizations";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var ht=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}};var yt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.tagname=i;this.ENDPOINT=this.parentEndpoint+`/tags/${this.tagname}`;}ENDPOINT;referencedocuments(){return new ht(this.restClient,this.ENDPOINT)}};var Ct=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tags";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var ft=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/texttypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var Tt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/transactions";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var Ot=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/validation";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var gt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;answers(){return new d(this.restClient,this.ENDPOINT)}chats(t){return t!=null?new _(this.restClient,this.ENDPOINT,t):new H(this.restClient,this.ENDPOINT)}documentannotations(){return new q(this.restClient,this.ENDPOINT)}documentclasses(t){return t!=null?new $(this.restClient,this.ENDPOINT,t):new z(this.restClient,this.ENDPOINT)}documents(){return new j(this.restClient,this.ENDPOINT)}documenttypes(t){return t!=null?new K(this.restClient,this.ENDPOINT,t):new Q(this.restClient,this.ENDPOINT)}modelclasses(){return new Z(this.restClient,this.ENDPOINT)}modelinstances(){return new tt(this.restClient,this.ENDPOINT)}prompts(t){return t!=null?new et(this.restClient,this.ENDPOINT,t):new rt(this.restClient,this.ENDPOINT)}referencedocuments(t){return t!=null?new lt(this.restClient,this.ENDPOINT,t):new ut(this.restClient,this.ENDPOINT)}references(){return new Nt(this.restClient,this.ENDPOINT)}settings(){return new Et(this.restClient,this.ENDPOINT)}summarizations(){return new ct(this.restClient,this.ENDPOINT)}tags(t){return t!=null?new yt(this.restClient,this.ENDPOINT,t):new Ct(this.restClient,this.ENDPOINT)}texttypes(){return new ft(this.restClient,this.ENDPOINT)}transactions(){return new Tt(this.restClient,this.ENDPOINT)}validation(){return new Ot(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Pt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Dt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/info";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var It=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/languages";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Rt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/datatypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var xt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/attributes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var vt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/backups";}ENDPOINT;async post(){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),{})).toModel()}};var wt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/boostwords/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Mt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/boostwords";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var St=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/dataproperties";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var bt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/dataproperties/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var At=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/extractorclasses/${this.id}`;}ENDPOINT;extractorclasses(){return new B(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var _t=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractorclasses";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Ht=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractors";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Bt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/formatters";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Jt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/metadata";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Lt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/namedentities";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Vt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/namedentities/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Ft=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/objectproperties";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var kt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/metadata/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Ut=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/regexes/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Gt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/regexes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Xt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/relations/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Yt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/relations";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Wt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/rules/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var qt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/rulefunctions";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var $t=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/rules";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var zt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/stopwords/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var jt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/stopwords";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Kt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/synonyms/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Qt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/synonyms";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Zt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/attributes/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var te=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/attributes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var ee=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}};var re=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.classid=i;this.ENDPOINT=this.parentEndpoint+`/classes/${this.classid}`;}ENDPOINT;attributes(t){return t!=null?new Zt(this.restClient,this.ENDPOINT,t):new te(this.restClient,this.ENDPOINT)}instances(){return new ee(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var ne=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classes";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var ie=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/instances/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var oe=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async getAsXlsx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var se=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;attributes(){return new xt(this.restClient,this.ENDPOINT)}backups(){return new vt(this.restClient,this.ENDPOINT)}boostwords(t){return t!=null?new wt(this.restClient,this.ENDPOINT,t):new Mt(this.restClient,this.ENDPOINT)}classes(t){return t!=null?new re(this.restClient,this.ENDPOINT,t):new ne(this.restClient,this.ENDPOINT)}dataproperties(t){return t!=null?new bt(this.restClient,this.ENDPOINT,t):new St(this.restClient,this.ENDPOINT)}extractorclasses(t){return t!=null?new At(this.restClient,this.ENDPOINT,t):new _t(this.restClient,this.ENDPOINT)}extractors(){return new Ht(this.restClient,this.ENDPOINT)}formatters(){return new Bt(this.restClient,this.ENDPOINT)}instances(t){return t!=null?new ie(this.restClient,this.ENDPOINT,t):new oe(this.restClient,this.ENDPOINT)}metadata(t){return t!=null?new kt(this.restClient,this.ENDPOINT,t):new Jt(this.restClient,this.ENDPOINT)}namedentities(t){return t!=null?new Vt(this.restClient,this.ENDPOINT,t):new Lt(this.restClient,this.ENDPOINT)}objectproperties(){return new Ft(this.restClient,this.ENDPOINT)}regexes(t){return t!=null?new Ut(this.restClient,this.ENDPOINT,t):new Gt(this.restClient,this.ENDPOINT)}relations(t){return t!=null?new Xt(this.restClient,this.ENDPOINT,t):new Yt(this.restClient,this.ENDPOINT)}rulefunctions(){return new qt(this.restClient,this.ENDPOINT)}rules(t){return t!=null?new Wt(this.restClient,this.ENDPOINT,t):new $t(this.restClient,this.ENDPOINT)}stopwords(t){return t!=null?new zt(this.restClient,this.ENDPOINT,t):new jt(this.restClient,this.ENDPOINT)}synonyms(t){return t!=null?new Kt(this.restClient,this.ENDPOINT,t):new Qt(this.restClient,this.ENDPOINT)}async getAsXlsx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var ae=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var pe=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractortypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var le=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/metadatatypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var me=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/model";}ENDPOINT;datatypes(){return new Rt(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new se(this.restClient,this.ENDPOINT,t):new ae(this.restClient,this.ENDPOINT)}extractortypes(){return new pe(this.restClient,this.ENDPOINT)}metadatatypes(){return new le(this.restClient,this.ENDPOINT)}};var ue="/api/v3",Ne=class r{constructor(t,e){this.restClient=t;this.parentEndpoint=e;}static loginWithApiKey(t,e){if(!e)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new r(new l(this.parseServerUrl(t),e),ue)}static loginWithCredentials(t,e,i,o){return t=this.parseServerUrl(t),new r(new l(t,void 0,e,i,o),ue)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=Ee__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(s=>s.length!==0).map(s=>s.split("=")),o=this.getValueOfInPropertiesFile("serverUrl",i),a=this.getValueOfInPropertiesFile("clientId",i),de=this.getValueOfInPropertiesFile("clientSecret",i),ce=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(o,a,de,ce)}throw new Error("Can not login, please supply a credentials properties file.")}static parseServerUrl(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t.endsWith("/tt-platform-ui/en/#")?t=t.replace("/tt-platform-ui/en/#","/tt-platform-server"):t.endsWith("/tt-platform-server")||(t+="/tt-platform-server"),t}static getValueOfInPropertiesFile(t,e){for(let i of e)if(i[0]===t)return i[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}bulk(){return new b(this.restClient,this.endpoint())}celltypes(){return new A(this.restClient,this.endpoint())}conversions(){return new V(this.restClient,this.endpoint())}currentuser(){return new k(this.restClient,this.endpoint())}diff(){return new U(this.restClient,this.endpoint())}domains(t){return t!=null?new gt(this.restClient,this.endpoint(),t):new Pt(this.restClient,this.endpoint())}info(){return new Dt(this.restClient,this.endpoint())}languages(){return new It(this.restClient,this.endpoint())}model(){return new me(this.restClient,this.endpoint())}};exports.AnswersEndpoint=d;exports.AttributeDatatypeEnumValues=he;exports.AttributeOverviewDatatypeEnumValues=ye;exports.BulkDomainsEndpoint=u;exports.BulkEndpoint=b;exports.BulkModelEndpoint=R;exports.BulkdomainsDocumentclassesEndpoint=x;exports.BulkdomainsDocumenttypesEndpoint=v;exports.BulkdomainsDomainEndpoint=S;exports.BulkdomainsReferencedocumentsEndpoint=w;exports.BulkdomainsReferencesEndpoint=M;exports.BulkmodelBoostwordsEndpoint=N;exports.BulkmodelClassEndpoint=c;exports.BulkmodelClassesEndpoint=h;exports.BulkmodelDatapropertiesEndpoint=y;exports.BulkmodelDomainEndpoint=D;exports.BulkmodelDomainsEndpoint=I;exports.BulkmodelInstancesEndpoint=C;exports.BulkmodelMetadataEndpoint=f;exports.BulkmodelNamedentitiesEndpoint=T;exports.BulkmodelRulesEndpoint=O;exports.BulkmodelStopwordsEndpoint=g;exports.BulkmodelSynonymsEndpoint=P;exports.BulkmodelclassInstancesEndpoint=E;exports.CelltypesEndpoint=A;exports.ChatEndpoint=_;exports.ChatsEndpoint=H;exports.ChildExtractorclassesEndpoint=B;exports.ClassBulkDatatypeEnumValues=Ce;exports.CloneEndpoint=J;exports.ClusteringstructureEnumValues=fe;exports.ClustersEndpoint=L;exports.ConversionsEndpoint=V;exports.CurrentuserEndpoint=k;exports.DiffEndpoint=U;exports.DifferenceOperationEnumValues=Te;exports.DocclassCustomfieldsEndpoint=G;exports.DocclassDocumentclassesEndpoint=X;exports.DocclassReferencedocumentsEndpoint=W;exports.DocclassTagsEndpoint=Y;exports.DocumentannotationsEndpoint=q;exports.DocumentclassEndpoint=$;exports.DocumentclassesEndpoint=z;exports.DocumentmodeEnumValues=Oe;exports.DocumentsEndpoint=j;exports.DocumenttypeEndpoint=K;exports.DocumenttypesEndpoint=Q;exports.DomainEndpoint=gt;exports.DomainsEndpoint=Pt;exports.ErrorFieldCodeEnumValues=ge;exports.ExtractorAttributeDatatypeEnumValues=Pe;exports.ExtractorTypeEnumValues=De;exports.FieldTypeEnumValues=Ie;exports.ImageEndpoint=nt;exports.ImagesEndpoint=it;exports.InfoEndpoint=Dt;exports.LanguagesEndpoint=It;exports.MatcherTypeEnumValues=Re;exports.MediaType=n;exports.MessageRoleEnumValues=xe;exports.ModeEnumValues=ve;exports.ModelAttributesEndpoint=xt;exports.ModelBackupsEndpoint=vt;exports.ModelBoostwordEndpoint=wt;exports.ModelBoostwordsEndpoint=Mt;exports.ModelDatapropertiesEndpoint=St;exports.ModelDatapropertyEndpoint=bt;exports.ModelDatatypesEndpoint=Rt;exports.ModelDomainEndpoint=se;exports.ModelDomainsEndpoint=ae;exports.ModelEndpoint=me;exports.ModelExtractorclassEndpoint=At;exports.ModelExtractorclassesEndpoint=_t;exports.ModelExtractorsEndpoint=Ht;exports.ModelExtractortypesEndpoint=pe;exports.ModelFormattersEndpoint=Bt;exports.ModelMetadataEndpoint=Jt;exports.ModelMetadatatypesEndpoint=le;exports.ModelNamedentitiesEndpoint=Lt;exports.ModelNamedentityEndpoint=Vt;exports.ModelObjectpropertiesEndpoint=Ft;exports.ModelOnemetadataEndpoint=kt;exports.ModelRegexEndpoint=Ut;exports.ModelRegexesEndpoint=Gt;exports.ModelRelationEndpoint=Xt;exports.ModelRelationsEndpoint=Yt;exports.ModelRuleEndpoint=Wt;exports.ModelRulefunctionsEndpoint=qt;exports.ModelRulesEndpoint=$t;exports.ModelStopwordEndpoint=zt;exports.ModelStopwordsEndpoint=jt;exports.ModelSynonymEndpoint=Kt;exports.ModelSynonymsEndpoint=Qt;exports.ModelclassesEndpoint=Z;exports.ModelinstancesEndpoint=tt;exports.ModelontAttributeEndpoint=Zt;exports.ModelontAttributesEndpoint=te;exports.ModelontClassEndpoint=re;exports.ModelontClassesEndpoint=ne;exports.ModelontInstanceEndpoint=ie;exports.ModelontInstancesEndpoint=oe;exports.ModelontclassInstancesEndpoint=ee;exports.NamedentitiesEndpoint=mt;exports.ParagraphEndpoint=ot;exports.ParagraphsEndpoint=st;exports.PromptEndpoint=et;exports.PromptOverviewPromptLabelEnumValues=we;exports.PromptPromptLabelEnumValues=Me;exports.PromptsEndpoint=rt;exports.RangeEnumValues=Se;exports.ReferencedocumentEndpoint=lt;exports.ReferencedocumentsEndpoint=ut;exports.ReferencesEndpoint=Nt;exports.RestClient=l;exports.RestResponse=p;exports.RolesEndpoint=F;exports.RuleFunctionTypeEnumValues=be;exports.SemanthaAPI=Ne;exports.SentenceEndpoint=at;exports.SentencesEndpoint=pt;exports.SettingsDefaultSimilarityModeEnumValues=Ae;exports.SettingsEndpoint=Et;exports.SettingsExtractionStrategyEnumValues=_e;exports.SettingsTaggingStrategyEnumValues=He;exports.SmartClusterSemiSupervisedRequestClusteringStructureEnumValues=Be;exports.SmartClusterSemiSupervisedRequestTopicOverTimeRangeEnumValues=Je;exports.StatisticEndpoint=dt;exports.SummarizationsEndpoint=ct;exports.SummarylengthEnumValues=Le;exports.TagEndpoint=yt;exports.TagReferencedocumentsEndpoint=ht;exports.TagsEndpoint=Ct;exports.TexttypesEndpoint=ft;exports.TransactionsEndpoint=Tt;exports.TypeEnumValues=Ve;exports.ValidationEndpoint=Ot;exports.isAttributeDatatypeEnumValue=Fe;exports.isAttributeOverviewDatatypeEnumValue=Ue;exports.isClassBulkDatatypeEnumValue=Xe;exports.isClusteringstructureEnumValue=We;exports.isDifferenceOperationEnumValue=$e;exports.isDocumentmodeEnumValue=je;exports.isErrorFieldCodeEnumValue=Qe;exports.isExtractorAttributeDatatypeEnumValue=tr;exports.isExtractorTypeEnumValue=rr;exports.isFieldTypeEnumValue=ir;exports.isMatcherTypeEnumValue=sr;exports.isMessageRoleEnumValue=pr;exports.isModeEnumValue=mr;exports.isPromptOverviewPromptLabelEnumValue=ur;exports.isPromptPromptLabelEnumValue=Er;exports.isRangeEnumValue=hr;exports.isRuleFunctionTypeEnumValue=Cr;exports.isSettingsDefaultSimilarityModeEnumValue=Tr;exports.isSettingsExtractionStrategyEnumValue=gr;exports.isSettingsTaggingStrategyEnumValue=Dr;exports.isSmartClusterSemiSupervisedRequestClusteringStructureEnumValue=Rr;exports.isSmartClusterSemiSupervisedRequestTopicOverTimeRangeEnumValue=vr;exports.isSummarylengthEnumValue=Mr;exports.isTypeEnumValue=br;//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';var m=require('axios'),Ee=require('fs');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var m__default=/*#__PURE__*/_interopDefault(m);var Ee__namespace=/*#__PURE__*/_interopNamespace(Ee);var he=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Fe(r){return he.includes(r)}var ye=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Ue(r){return ye.includes(r)}var Ce=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Xe(r){return Ce.includes(r)}var fe=["LOCAL","BALANCED","GLOBAL"];function We(r){return fe.includes(r)}var Te=["DELETE","INSERT","EQUAL"];function $e(r){return Te.includes(r)}var Oe=["sentence","paragraph"];function je(r){return Oe.includes(r)}var ge=["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","CONTENT_TOO_LARGE","INTERNAL_SERVER_ERROR","GATEWAY_TIMEOUT","DOCUMENTTYPE_NOT_FOUND","DOCUMENTTYPE_NAME_EXISTS","DOCUMENTTYPE_NOT_EDITABLE","COMPARE_DOC_IS_EMPTY","COMPARE_WRONG_LANGUAGE","COMPARE_NO_REFERENCES","DOMAIN_NOT_FOUND","TOO_MANY_TOKENS","NO_FILE_FOUND","FILE_TYPE_NOT_SUPPORTED","FILE_PASSWORDPROTECTED","MISSING_SERVICE_DEFINITION","SERVICE_CALL_ERROR","GENERATIVE_MODEL_ERROR","USED_AS_LINKED_EXTRACTOR","CYCLICAL_DEPENDENCY_LINKED_EXTRACTOR","FILE_TOO_BIG","TOO_MANY_ROWS","REGEX_INVALID","GENERATIVE_MODEL_CONTEXT_EXCEEDED","PROMPT_NOT_DELETABLE","JPEG2000_NOT_SUPPORTED","TRANSLATION_ERROR","RESOURCE_NOT_FOUND","PARENT_RESOURCE_NOT_FOUND","RESOURCE_PARAMETER_CONSTRAINT_VIOLATION","PLATFORM_UNREACHABLE","FILE_SIZE_TOOBIG","USER_REPOSITORY_NOT_CONFIGURED","PDF_NOT_CONFIGURED","INVALID_USER_PASSWORD","UNKNOWN_FINGERPRINTER_ID","JSON_ARRAY_EMPTY","TOKENS_ILLEGAL_TYPE","NO_JSON","INVALID_JSON_FORMAT","JSON_OBJECT_HAS_NO_DOCUMENTS","DOCUMENTS_ARE_NO_JSON_ARRAY","DOCUMENTS_JSON_ARRAY_EMPTY","DOCUMENTS_VALUE_ERROR","DOCUMENTS_TYPE_ERROR","DOCUMENTS_TOO_FEW_DOCUMENTS","REQ_NO_JSON_ARRAY","SENTENCE_LIST_NOT_TWO","IMAGE_NOT_PROVIDED","IMAGE_INVALID_FORMAT","MODEL_NAME_INVALID","THRESHOLD_INVALID","IMAGE_BUFFER_EMPTY","INVALID_MODEL_ID","IMAGE_NOT_PROVIDED_IFP","IMAGE_INVALID_DATA","IMAGE_INVALID_FORMAT_IFP"];function Qe(r){return ge.includes(r)}var Pe=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function tr(r){return Pe.includes(r)}var De=["REGEX","ANDREGEX","ANDNOTREGEX","NOTREGEX","REGEX_CASE_INSENSITIVE","ANDREGEX_CASE_INSENSITIVE","ANDNOTREGEX_CASE_INSENSITIVE","NOTREGEX_CASE_INSENSITIVE","SIMILAR","ANDSIMILAR","ANDNOTSIMILAR","NOTSIMILAR","LIBRARY","ANDLIBRARY","ANDNOTLIBRARY","NOTLIBRARY","PARAGRAPH_DETECTION","CONSTANT","INTERNAL","INTERNAL_2","INTERNAL_3","INTERNAL_4","INTERNAL_5","INTERNAL_6","INTERNAL_7","INTERNAL_8","INTERNAL_9","INTERNAL_10","RANGE","REGEX_PARAGRAPH_LASTMATCH","REGEX_DOCUMENT_LASTMATCH","INTERNAL_PARAGRAPH_LASTMATCH","INTERNAL_DOCUMENT_LASTMATCH","END_OF_DOCUMENT","START_OF_DOCUMENT","NEXT_HEADING","TEXT_TYPE"];function rr(r){return De.includes(r)}var Ie=["CLASS","OBJECT_PROPERTY","DATA_PROPERTY"];function ir(r){return Ie.includes(r)}var Re=["REGEX","ANDREGEX","ANDNOTREGEX","NOTREGEX","REGEX_CASE_INSENSITIVE","ANDREGEX_CASE_INSENSITIVE","ANDNOTREGEX_CASE_INSENSITIVE","NOTREGEX_CASE_INSENSITIVE","SIMILAR","ANDSIMILAR","ANDNOTSIMILAR","NOTSIMILAR","LIBRARY","ANDLIBRARY","ANDNOTLIBRARY","NOTLIBRARY","PARAGRAPH_DETECTION","CONSTANT","INTERNAL","INTERNAL_2","INTERNAL_3","INTERNAL_4","INTERNAL_5","INTERNAL_6","INTERNAL_7","INTERNAL_8","INTERNAL_9","INTERNAL_10","RANGE","REGEX_PARAGRAPH_LASTMATCH","REGEX_DOCUMENT_LASTMATCH","INTERNAL_PARAGRAPH_LASTMATCH","INTERNAL_DOCUMENT_LASTMATCH","END_OF_DOCUMENT","START_OF_DOCUMENT","NEXT_HEADING","TEXT_TYPE"];function sr(r){return Re.includes(r)}var xe=["USER","ASSISTANT","SYSTEM"];function pr(r){return xe.includes(r)}var ve=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto"];function mr(r){return ve.includes(r)}var we=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY","INTERNAL","CUSTOM"];function ur(r){return we.includes(r)}var Me=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY","INTERNAL","CUSTOM"];function Er(r){return Me.includes(r)}var Se=["HOURS","DAYS","MONTHS","YEARS"];function hr(r){return Se.includes(r)}var be=["OPERATOR","FUNCTION"];function Cr(r){return be.includes(r)}var Ae=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto"];function Tr(r){return Ae.includes(r)}var _e=["ANY","TOP1","TOP3","TOP5","TOP10"];function gr(r){return _e.includes(r)}var He=["TOP1","TOP3","TOP5","TOP10"];function Dr(r){return He.includes(r)}var Be=["LOCAL","BALANCED","GLOBAL"];function Rr(r){return Be.includes(r)}var Je=["HOURS","DAYS","MONTHS","YEARS"];function vr(r){return Je.includes(r)}var Le=["SHORT","MEDIUM","LONG"];function Mr(r){return Le.includes(r)}var Ve=["similarity","extraction"];function br(r){return Ve.includes(r)}var p=class{constructor(t){this.response=t;}async toModel(){return (await this.response).data}async toFile(){let t=await this.response,e=t?.headers["content-disposition"],i="file";if(e){let o=e.match(/filename="?([^"]+)"?/);o&&o[1]&&(i=o[1]);}return new File([t.data],i)}async getStatusCode(){return (await this.response).status}async getStatusText(){return (await this.response).statusText}};var n=(s=>(s.JSON="application/json",s.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",s.PDF="application/pdf",s.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",s.ZIP="application/zip",s.REQIFZ="application/reqifz",s.PNG="image/png",s.BINARY="application/octet-stream",s))(n||{}),l=class r{constructor(t,e,i,o,a){this.serverUrl=t;this.apiKey=e;this.clientId=i;this.client_secret=o;this.tokenUrl=a;this.expireTime=0,this.accessToken="";}static LEEWAY=30;expireTime;accessToken;async buildHeadersForJsonRequest(){return {Accept:"application/json",Authorization:`Bearer ${await this.getToken()}`}}async buildHeadersForRequest(){return {Authorization:`Bearer ${await this.getToken()}`}}async getToken(){if(this.apiKey)return this.apiKey;if(this.clientId&&this.client_secret&&this.tokenUrl&&(this.accessToken==""||this.expireTime<performance.now())){let t={grant_type:"client_credentials",client_id:this.clientId,client_secret:this.client_secret,scope:"openid"},e=await m__default.default.post(this.tokenUrl,t,{headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded"}});if(e.status>=m__default.default.HttpStatusCode.BadRequest)return "";this.accessToken=e.data.id_token??e.data.access_token,this.expireTime=performance.now()+(e.data.expires_in-r.LEEWAY);}return this.accessToken}async request(t,e,i){if(!i.headers)i.headers=await this.buildHeadersForJsonRequest();else {let o=await this.buildHeadersForRequest();i.headers={...i.headers,...o};}return new p(m__default.default.request({method:t,url:this.serverUrl+e,headers:{...i.headers,"User-Agent":"semantha TypeScript SDK; "},data:i.data,params:i.params,responseType:i.responseType}))}async get(t,e,i,o,a="json"){return this.request("GET",t,{params:e,headers:i,data:o,responseType:a})}async post(t,e,i,o,a="json"){if(!i)i=await this.buildHeadersForJsonRequest();else {let de=await this.buildHeadersForRequest();i={...i,...de};}return new p(m__default.default.post(this.serverUrl+t,o,{params:e,headers:i,responseType:a}))}async delete(t,e){return this.request("DELETE",t,{data:e})}async patch(t,e){return this.request("PATCH",t,{data:e})}async put(t,e){return this.request("PUT",t,{data:e})}toHeader(t,e){return e?{Accept:t,"Content-Type":e}:{Accept:t}}};var d=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/answers";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var N=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/boostwords";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var E=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var c=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.classid=i;this.ENDPOINT=this.parentEndpoint+`/classes/${this.classid}`;}ENDPOINT;instances(){return new E(this.restClient,this.ENDPOINT)}};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var y=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/dataproperties";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var C=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var f=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/metadata";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var T=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/namedentities";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var O=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/rules";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var g=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/stopwords";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var P=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/synonyms";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var D=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;boostwords(){return new N(this.restClient,this.ENDPOINT)}classes(t){return t!=null?new c(this.restClient,this.ENDPOINT,t):new h(this.restClient,this.ENDPOINT)}dataproperties(){return new y(this.restClient,this.ENDPOINT)}instances(){return new C(this.restClient,this.ENDPOINT)}metadata(){return new f(this.restClient,this.ENDPOINT)}namedentities(){return new T(this.restClient,this.ENDPOINT)}rules(){return new O(this.restClient,this.ENDPOINT)}stopwords(){return new g(this.restClient,this.ENDPOINT)}synonyms(){return new P(this.restClient,this.ENDPOINT)}};var I=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var R=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/model";}ENDPOINT;domains(t){return t!=null?new D(this.restClient,this.ENDPOINT,t):new I(this.restClient,this.ENDPOINT)}};var x=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var v=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documenttypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var w=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,t)}async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postJson(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var M=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/references";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var S=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;documentclasses(){return new x(this.restClient,this.ENDPOINT)}documenttypes(){return new v(this.restClient,this.ENDPOINT)}referencedocuments(){return new w(this.restClient,this.ENDPOINT)}references(){return new M(this.restClient,this.ENDPOINT)}};var b=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/bulk";}ENDPOINT;domains(t){return t!=null?new S(this.restClient,this.ENDPOINT,t):new u(this.restClient,this.ENDPOINT)}model(){return new R(this.restClient,this.ENDPOINT)}};var A=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/celltypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var _=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/chats/${this.id}`;}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var H=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/chats";}ENDPOINT};var B=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractorclasses";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var J=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/clone";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var L=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/clusters";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var V=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/conversions";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toFile()}};var F=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/roles";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var k=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new F(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var U=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/diff";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var G=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/customfields";}ENDPOINT;async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var X=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,t)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Y=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tags";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var W=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;tags(){return new Y(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,t)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var q=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentannotations";}ENDPOINT;async postAsDocx(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t)).toFile()}async postAsPdf(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/pdf"),t)).toFile()}};var $=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/documentclasses/${this.id}`;}ENDPOINT;customfields(){return new G(this.restClient,this.ENDPOINT)}documentclasses(){return new X(this.restClient,this.ENDPOINT)}referencedocuments(){return new W(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var z=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var j=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documents";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postAsXlsx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t,"blob")).toFile()}async postAsDocx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t)).toFile()}async postAsPng(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("image/png"),t)).toFile()}async postAsReqifz(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/reqifz"),t)).toFile()}};var K=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/documenttypes/${this.id}`;}ENDPOINT;clone(){return new J(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var Q=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documenttypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Z=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/modelclasses";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var tt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/modelinstances";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postJson(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postAsXlsx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t,"blob")).toFile()}};var et=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/prompts/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var rt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/prompts";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var nt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/images/${this.id}`;}ENDPOINT;async getAsBinary(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/octet-stream"),null,"blob")).toFile()}};var it=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/images";}ENDPOINT};var ot=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/paragraphs/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var st=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/paragraphs";}ENDPOINT};var at=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/sentences/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var pt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/sentences";}ENDPOINT};var lt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.documentid=i;this.ENDPOINT=this.parentEndpoint+`/referencedocuments/${this.documentid}`;}ENDPOINT;images(t){return t!=null?new nt(this.restClient,this.ENDPOINT,t):new it(this.restClient,this.ENDPOINT)}paragraphs(t){return t!=null?new ot(this.restClient,this.ENDPOINT,t):new st(this.restClient,this.ENDPOINT)}sentences(t){return t!=null?new at(this.restClient,this.ENDPOINT,t):new pt(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var mt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/namedentities";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var dt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/statistic";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var ut=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;clusters(){return new L(this.restClient,this.ENDPOINT)}namedentities(){return new mt(this.restClient,this.ENDPOINT)}statistic(){return new dt(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async getAsXlsx(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postJson(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var Nt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/references";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postAsXlsx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t,"blob")).toFile()}async postAsDocx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t)).toFile()}async postAsPdf(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/pdf"),t)).toFile()}};var Et=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/settings";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var ct=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/summarizations";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var ht=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}};var yt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.tagname=i;this.ENDPOINT=this.parentEndpoint+`/tags/${this.tagname}`;}ENDPOINT;referencedocuments(){return new ht(this.restClient,this.ENDPOINT)}};var Ct=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tags";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var ft=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/texttypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var Tt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/transactions";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var Ot=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/validation";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var gt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;answers(){return new d(this.restClient,this.ENDPOINT)}chats(t){return t!=null?new _(this.restClient,this.ENDPOINT,t):new H(this.restClient,this.ENDPOINT)}documentannotations(){return new q(this.restClient,this.ENDPOINT)}documentclasses(t){return t!=null?new $(this.restClient,this.ENDPOINT,t):new z(this.restClient,this.ENDPOINT)}documents(){return new j(this.restClient,this.ENDPOINT)}documenttypes(t){return t!=null?new K(this.restClient,this.ENDPOINT,t):new Q(this.restClient,this.ENDPOINT)}modelclasses(){return new Z(this.restClient,this.ENDPOINT)}modelinstances(){return new tt(this.restClient,this.ENDPOINT)}prompts(t){return t!=null?new et(this.restClient,this.ENDPOINT,t):new rt(this.restClient,this.ENDPOINT)}referencedocuments(t){return t!=null?new lt(this.restClient,this.ENDPOINT,t):new ut(this.restClient,this.ENDPOINT)}references(){return new Nt(this.restClient,this.ENDPOINT)}settings(){return new Et(this.restClient,this.ENDPOINT)}summarizations(){return new ct(this.restClient,this.ENDPOINT)}tags(t){return t!=null?new yt(this.restClient,this.ENDPOINT,t):new Ct(this.restClient,this.ENDPOINT)}texttypes(){return new ft(this.restClient,this.ENDPOINT)}transactions(){return new Tt(this.restClient,this.ENDPOINT)}validation(){return new Ot(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Pt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Dt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/info";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var It=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/languages";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Rt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/datatypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var xt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/attributes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var vt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/backups";}ENDPOINT;async post(){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),{})).toModel()}};var wt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/boostwords/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Mt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/boostwords";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var St=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/dataproperties";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var bt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/dataproperties/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var At=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/extractorclasses/${this.id}`;}ENDPOINT;extractorclasses(){return new B(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var _t=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractorclasses";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Ht=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractors";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Bt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/formatters";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Jt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/metadata";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Lt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/namedentities";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Vt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/namedentities/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Ft=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/objectproperties";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var kt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/metadata/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Ut=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/regexes/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Gt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/regexes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Xt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/relations/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Yt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/relations";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Wt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/rules/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var qt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/rulefunctions";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var $t=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/rules";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var zt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/stopwords/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var jt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/stopwords";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Kt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/synonyms/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Qt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/synonyms";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Zt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/attributes/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var te=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/attributes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var ee=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}};var re=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.classid=i;this.ENDPOINT=this.parentEndpoint+`/classes/${this.classid}`;}ENDPOINT;attributes(t){return t!=null?new Zt(this.restClient,this.ENDPOINT,t):new te(this.restClient,this.ENDPOINT)}instances(){return new ee(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var ne=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classes";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var ie=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/instances/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var oe=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async getAsXlsx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var se=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;attributes(){return new xt(this.restClient,this.ENDPOINT)}backups(){return new vt(this.restClient,this.ENDPOINT)}boostwords(t){return t!=null?new wt(this.restClient,this.ENDPOINT,t):new Mt(this.restClient,this.ENDPOINT)}classes(t){return t!=null?new re(this.restClient,this.ENDPOINT,t):new ne(this.restClient,this.ENDPOINT)}dataproperties(t){return t!=null?new bt(this.restClient,this.ENDPOINT,t):new St(this.restClient,this.ENDPOINT)}extractorclasses(t){return t!=null?new At(this.restClient,this.ENDPOINT,t):new _t(this.restClient,this.ENDPOINT)}extractors(){return new Ht(this.restClient,this.ENDPOINT)}formatters(){return new Bt(this.restClient,this.ENDPOINT)}instances(t){return t!=null?new ie(this.restClient,this.ENDPOINT,t):new oe(this.restClient,this.ENDPOINT)}metadata(t){return t!=null?new kt(this.restClient,this.ENDPOINT,t):new Jt(this.restClient,this.ENDPOINT)}namedentities(t){return t!=null?new Vt(this.restClient,this.ENDPOINT,t):new Lt(this.restClient,this.ENDPOINT)}objectproperties(){return new Ft(this.restClient,this.ENDPOINT)}regexes(t){return t!=null?new Ut(this.restClient,this.ENDPOINT,t):new Gt(this.restClient,this.ENDPOINT)}relations(t){return t!=null?new Xt(this.restClient,this.ENDPOINT,t):new Yt(this.restClient,this.ENDPOINT)}rulefunctions(){return new qt(this.restClient,this.ENDPOINT)}rules(t){return t!=null?new Wt(this.restClient,this.ENDPOINT,t):new $t(this.restClient,this.ENDPOINT)}stopwords(t){return t!=null?new zt(this.restClient,this.ENDPOINT,t):new jt(this.restClient,this.ENDPOINT)}synonyms(t){return t!=null?new Kt(this.restClient,this.ENDPOINT,t):new Qt(this.restClient,this.ENDPOINT)}async getAsXlsx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var ae=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var pe=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractortypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var le=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/metadatatypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var me=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/model";}ENDPOINT;datatypes(){return new Rt(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new se(this.restClient,this.ENDPOINT,t):new ae(this.restClient,this.ENDPOINT)}extractortypes(){return new pe(this.restClient,this.ENDPOINT)}metadatatypes(){return new le(this.restClient,this.ENDPOINT)}};var ue="/api/v3",Ne=class r{constructor(t,e){this.restClient=t;this.parentEndpoint=e;}static loginWithApiKey(t,e){if(!e)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new r(new l(this.parseServerUrl(t),e),ue)}static loginWithCredentials(t,e,i,o){return t=this.parseServerUrl(t),new r(new l(t,void 0,e,i,o),ue)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=Ee__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(s=>s.length!==0).map(s=>s.split("=")),o=this.getValueOfInPropertiesFile("serverUrl",i),a=this.getValueOfInPropertiesFile("clientId",i),de=this.getValueOfInPropertiesFile("clientSecret",i),ce=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(o,a,de,ce)}throw new Error("Can not login, please supply a credentials properties file.")}static parseServerUrl(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t.endsWith("/tt-platform-ui/en/#")?t=t.replace("/tt-platform-ui/en/#","/tt-platform-server"):t.endsWith("/tt-platform-server")||(t+="/tt-platform-server"),t}static getValueOfInPropertiesFile(t,e){for(let i of e)if(i[0]===t)return i[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}bulk(){return new b(this.restClient,this.endpoint())}celltypes(){return new A(this.restClient,this.endpoint())}conversions(){return new V(this.restClient,this.endpoint())}currentuser(){return new k(this.restClient,this.endpoint())}diff(){return new U(this.restClient,this.endpoint())}domains(t){return t!=null?new gt(this.restClient,this.endpoint(),t):new Pt(this.restClient,this.endpoint())}info(){return new Dt(this.restClient,this.endpoint())}languages(){return new It(this.restClient,this.endpoint())}model(){return new me(this.restClient,this.endpoint())}};exports.AnswersEndpoint=d;exports.AttributeDatatypeEnumValues=he;exports.AttributeOverviewDatatypeEnumValues=ye;exports.BulkDomainsEndpoint=u;exports.BulkEndpoint=b;exports.BulkModelEndpoint=R;exports.BulkdomainsDocumentclassesEndpoint=x;exports.BulkdomainsDocumenttypesEndpoint=v;exports.BulkdomainsDomainEndpoint=S;exports.BulkdomainsReferencedocumentsEndpoint=w;exports.BulkdomainsReferencesEndpoint=M;exports.BulkmodelBoostwordsEndpoint=N;exports.BulkmodelClassEndpoint=c;exports.BulkmodelClassesEndpoint=h;exports.BulkmodelDatapropertiesEndpoint=y;exports.BulkmodelDomainEndpoint=D;exports.BulkmodelDomainsEndpoint=I;exports.BulkmodelInstancesEndpoint=C;exports.BulkmodelMetadataEndpoint=f;exports.BulkmodelNamedentitiesEndpoint=T;exports.BulkmodelRulesEndpoint=O;exports.BulkmodelStopwordsEndpoint=g;exports.BulkmodelSynonymsEndpoint=P;exports.BulkmodelclassInstancesEndpoint=E;exports.CelltypesEndpoint=A;exports.ChatEndpoint=_;exports.ChatsEndpoint=H;exports.ChildExtractorclassesEndpoint=B;exports.ClassBulkDatatypeEnumValues=Ce;exports.CloneEndpoint=J;exports.ClusteringstructureEnumValues=fe;exports.ClustersEndpoint=L;exports.ConversionsEndpoint=V;exports.CurrentuserEndpoint=k;exports.DiffEndpoint=U;exports.DifferenceOperationEnumValues=Te;exports.DocclassCustomfieldsEndpoint=G;exports.DocclassDocumentclassesEndpoint=X;exports.DocclassReferencedocumentsEndpoint=W;exports.DocclassTagsEndpoint=Y;exports.DocumentannotationsEndpoint=q;exports.DocumentclassEndpoint=$;exports.DocumentclassesEndpoint=z;exports.DocumentmodeEnumValues=Oe;exports.DocumentsEndpoint=j;exports.DocumenttypeEndpoint=K;exports.DocumenttypesEndpoint=Q;exports.DomainEndpoint=gt;exports.DomainsEndpoint=Pt;exports.ErrorFieldCodeEnumValues=ge;exports.ExtractorAttributeDatatypeEnumValues=Pe;exports.ExtractorTypeEnumValues=De;exports.FieldTypeEnumValues=Ie;exports.ImageEndpoint=nt;exports.ImagesEndpoint=it;exports.InfoEndpoint=Dt;exports.LanguagesEndpoint=It;exports.MatcherTypeEnumValues=Re;exports.MediaType=n;exports.MessageRoleEnumValues=xe;exports.ModeEnumValues=ve;exports.ModelAttributesEndpoint=xt;exports.ModelBackupsEndpoint=vt;exports.ModelBoostwordEndpoint=wt;exports.ModelBoostwordsEndpoint=Mt;exports.ModelDatapropertiesEndpoint=St;exports.ModelDatapropertyEndpoint=bt;exports.ModelDatatypesEndpoint=Rt;exports.ModelDomainEndpoint=se;exports.ModelDomainsEndpoint=ae;exports.ModelEndpoint=me;exports.ModelExtractorclassEndpoint=At;exports.ModelExtractorclassesEndpoint=_t;exports.ModelExtractorsEndpoint=Ht;exports.ModelExtractortypesEndpoint=pe;exports.ModelFormattersEndpoint=Bt;exports.ModelMetadataEndpoint=Jt;exports.ModelMetadatatypesEndpoint=le;exports.ModelNamedentitiesEndpoint=Lt;exports.ModelNamedentityEndpoint=Vt;exports.ModelObjectpropertiesEndpoint=Ft;exports.ModelOnemetadataEndpoint=kt;exports.ModelRegexEndpoint=Ut;exports.ModelRegexesEndpoint=Gt;exports.ModelRelationEndpoint=Xt;exports.ModelRelationsEndpoint=Yt;exports.ModelRuleEndpoint=Wt;exports.ModelRulefunctionsEndpoint=qt;exports.ModelRulesEndpoint=$t;exports.ModelStopwordEndpoint=zt;exports.ModelStopwordsEndpoint=jt;exports.ModelSynonymEndpoint=Kt;exports.ModelSynonymsEndpoint=Qt;exports.ModelclassesEndpoint=Z;exports.ModelinstancesEndpoint=tt;exports.ModelontAttributeEndpoint=Zt;exports.ModelontAttributesEndpoint=te;exports.ModelontClassEndpoint=re;exports.ModelontClassesEndpoint=ne;exports.ModelontInstanceEndpoint=ie;exports.ModelontInstancesEndpoint=oe;exports.ModelontclassInstancesEndpoint=ee;exports.NamedentitiesEndpoint=mt;exports.ParagraphEndpoint=ot;exports.ParagraphsEndpoint=st;exports.PromptEndpoint=et;exports.PromptOverviewPromptLabelEnumValues=we;exports.PromptPromptLabelEnumValues=Me;exports.PromptsEndpoint=rt;exports.RangeEnumValues=Se;exports.ReferencedocumentEndpoint=lt;exports.ReferencedocumentsEndpoint=ut;exports.ReferencesEndpoint=Nt;exports.RestClient=l;exports.RestResponse=p;exports.RolesEndpoint=F;exports.RuleFunctionTypeEnumValues=be;exports.SemanthaAPI=Ne;exports.SentenceEndpoint=at;exports.SentencesEndpoint=pt;exports.SettingsDefaultSimilarityModeEnumValues=Ae;exports.SettingsEndpoint=Et;exports.SettingsExtractionStrategyEnumValues=_e;exports.SettingsTaggingStrategyEnumValues=He;exports.SmartClusterSemiSupervisedRequestClusteringStructureEnumValues=Be;exports.SmartClusterSemiSupervisedRequestTopicOverTimeRangeEnumValues=Je;exports.StatisticEndpoint=dt;exports.SummarizationsEndpoint=ct;exports.SummarylengthEnumValues=Le;exports.TagEndpoint=yt;exports.TagReferencedocumentsEndpoint=ht;exports.TagsEndpoint=Ct;exports.TexttypesEndpoint=ft;exports.TransactionsEndpoint=Tt;exports.TypeEnumValues=Ve;exports.ValidationEndpoint=Ot;exports.isAttributeDatatypeEnumValue=Fe;exports.isAttributeOverviewDatatypeEnumValue=Ue;exports.isClassBulkDatatypeEnumValue=Xe;exports.isClusteringstructureEnumValue=We;exports.isDifferenceOperationEnumValue=$e;exports.isDocumentmodeEnumValue=je;exports.isErrorFieldCodeEnumValue=Qe;exports.isExtractorAttributeDatatypeEnumValue=tr;exports.isExtractorTypeEnumValue=rr;exports.isFieldTypeEnumValue=ir;exports.isMatcherTypeEnumValue=sr;exports.isMessageRoleEnumValue=pr;exports.isModeEnumValue=mr;exports.isPromptOverviewPromptLabelEnumValue=ur;exports.isPromptPromptLabelEnumValue=Er;exports.isRangeEnumValue=hr;exports.isRuleFunctionTypeEnumValue=Cr;exports.isSettingsDefaultSimilarityModeEnumValue=Tr;exports.isSettingsExtractionStrategyEnumValue=gr;exports.isSettingsTaggingStrategyEnumValue=Dr;exports.isSmartClusterSemiSupervisedRequestClusteringStructureEnumValue=Rr;exports.isSmartClusterSemiSupervisedRequestTopicOverTimeRangeEnumValue=vr;exports.isSummarylengthEnumValue=Mr;exports.isTypeEnumValue=br;//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|