@semantha/sdk 10.8.4 → 10.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/index.d.mts +91 -1
- package/dist/index.d.ts +91 -1
- 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/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
# Project: pie_typescript-platform-sdk
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
💜 semantha Typescript Platform SDK
|
|
4
4
|
|
|
5
5
|
This is the TypeScript SDK for the semantha platform
|
|
6
|
+
|
|
7
|
+
This is available for download from <https://www.npmjs.com/package/@semantha/sdk>
|
package/dist/index.d.mts
CHANGED
|
@@ -1387,6 +1387,53 @@ interface PromptResponse {
|
|
|
1387
1387
|
response?: string;
|
|
1388
1388
|
}
|
|
1389
1389
|
|
|
1390
|
+
/**
|
|
1391
|
+
* @author semantha
|
|
1392
|
+
*
|
|
1393
|
+
* This is a generated file do not change manually!
|
|
1394
|
+
*/
|
|
1395
|
+
interface PromptValidationTemplate {
|
|
1396
|
+
userPrompt: string;
|
|
1397
|
+
systemPrompt?: string;
|
|
1398
|
+
temperature?: number;
|
|
1399
|
+
topK?: number;
|
|
1400
|
+
customFields?: CustomField[];
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
/**
|
|
1404
|
+
* @author semantha
|
|
1405
|
+
*
|
|
1406
|
+
* This is a generated file do not change manually!
|
|
1407
|
+
*/
|
|
1408
|
+
interface PromptValidationRequest {
|
|
1409
|
+
promptTemplate: PromptValidationTemplate;
|
|
1410
|
+
arguments: string[];
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
/**
|
|
1414
|
+
* @author semantha
|
|
1415
|
+
*
|
|
1416
|
+
* This is a generated file do not change manually!
|
|
1417
|
+
*/
|
|
1418
|
+
interface PromptValidationResult {
|
|
1419
|
+
status?: string;
|
|
1420
|
+
missingSystemPromptParams?: string[];
|
|
1421
|
+
missingUserPromptParams?: string[];
|
|
1422
|
+
errors?: ErrorContainer;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
/**
|
|
1426
|
+
* @author semantha
|
|
1427
|
+
*
|
|
1428
|
+
* This is a generated file do not change manually!
|
|
1429
|
+
*/
|
|
1430
|
+
interface PromptValidationResponse {
|
|
1431
|
+
renderedSystemPrompt?: string;
|
|
1432
|
+
renderedUserPrompt?: string;
|
|
1433
|
+
response?: string;
|
|
1434
|
+
validationResult?: PromptValidationResult;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1390
1437
|
/**
|
|
1391
1438
|
* @author semantha
|
|
1392
1439
|
*
|
|
@@ -2995,6 +3042,25 @@ declare class PromptEndpoint {
|
|
|
2995
3042
|
post(body?: PromptExecution): Promise<PromptResponse>;
|
|
2996
3043
|
}
|
|
2997
3044
|
|
|
3045
|
+
/**
|
|
3046
|
+
* @author semantha
|
|
3047
|
+
*
|
|
3048
|
+
* Class to access resource "/api/domains/{domainname}/prompts/validation"
|
|
3049
|
+
* This is a generated file do not change manually!
|
|
3050
|
+
*/
|
|
3051
|
+
declare class PromptValidationEndpoint {
|
|
3052
|
+
private readonly restClient;
|
|
3053
|
+
private readonly parentEndpoint;
|
|
3054
|
+
private readonly ENDPOINT;
|
|
3055
|
+
constructor(restClient: RestClient, parentEndpoint: string);
|
|
3056
|
+
/**
|
|
3057
|
+
* Validates prompt templating and executes role against the configured model. Requires domain admin role.
|
|
3058
|
+
*
|
|
3059
|
+
* @param body PromptValidationRequest? -
|
|
3060
|
+
*/
|
|
3061
|
+
post(body?: PromptValidationRequest): Promise<PromptValidationResponse>;
|
|
3062
|
+
}
|
|
3063
|
+
|
|
2998
3064
|
/**
|
|
2999
3065
|
* @author semantha
|
|
3000
3066
|
*
|
|
@@ -3006,6 +3072,7 @@ declare class PromptsEndpoint {
|
|
|
3006
3072
|
private readonly parentEndpoint;
|
|
3007
3073
|
private readonly ENDPOINT;
|
|
3008
3074
|
constructor(restClient: RestClient, parentEndpoint: string);
|
|
3075
|
+
validation(): PromptValidationEndpoint;
|
|
3009
3076
|
/**
|
|
3010
3077
|
* Read all available entities.
|
|
3011
3078
|
*/
|
|
@@ -3207,6 +3274,28 @@ declare class NamedentitiesEndpoint {
|
|
|
3207
3274
|
}): Promise<DocumentNamedEntity[]>;
|
|
3208
3275
|
}
|
|
3209
3276
|
|
|
3277
|
+
/**
|
|
3278
|
+
* @author semantha
|
|
3279
|
+
*
|
|
3280
|
+
* Class to access resource "/api/domains/{domainname}/referencedocuments/stream"
|
|
3281
|
+
* This is a generated file do not change manually!
|
|
3282
|
+
*/
|
|
3283
|
+
declare class ReferencedocumentsStreamEndpoint {
|
|
3284
|
+
private readonly restClient;
|
|
3285
|
+
private readonly parentEndpoint;
|
|
3286
|
+
private readonly ENDPOINT;
|
|
3287
|
+
constructor(restClient: RestClient, parentEndpoint: string);
|
|
3288
|
+
/**
|
|
3289
|
+
* Get all reference document information as a streamed JSON array.
|
|
3290
|
+
* Returns only document metadata (e.g. id, name, tags, document class) without document content such as pages, paragraphs or sentences. Ignored documents are excluded. Results are sorted by creation date descending.
|
|
3291
|
+
*
|
|
3292
|
+
* @param fields string? - Define which fields should be returned. The following values can be sent as a comma-separated list: 'id', 'name', 'tags', 'derivedtags', 'documentclass'. If empty or null all fields will be returned.
|
|
3293
|
+
*/
|
|
3294
|
+
get(params?: {
|
|
3295
|
+
fields?: string;
|
|
3296
|
+
}): Promise<DocumentInformation[]>;
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3210
3299
|
/**
|
|
3211
3300
|
* @author semantha
|
|
3212
3301
|
*
|
|
@@ -3237,6 +3326,7 @@ declare class ReferencedocumentsEndpoint {
|
|
|
3237
3326
|
constructor(restClient: RestClient, parentEndpoint: string);
|
|
3238
3327
|
namedentities(): NamedentitiesEndpoint;
|
|
3239
3328
|
statistic(): StatisticEndpoint;
|
|
3329
|
+
stream(): ReferencedocumentsStreamEndpoint;
|
|
3240
3330
|
/**
|
|
3241
3331
|
* Get all reference documents a.k.a. library items.
|
|
3242
3332
|
* 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>.
|
|
@@ -4912,4 +5002,4 @@ declare class SemanthaAPI {
|
|
|
4912
5002
|
model(): ModelEndpoint;
|
|
4913
5003
|
}
|
|
4914
5004
|
|
|
4915
|
-
export { type AnnotationCell, type AnnotationPage, type Answer, type AnswerReference, AnswersEndpoint, type Area, type Argument, type Attachment, type Attribute, type AttributeDatatypeEnum, AttributeDatatypeEnumValues, type AttributeOverview, type AttributeOverviewDatatypeEnum, AttributeOverviewDatatypeEnumValues, type BoostWord, BulkDomainsEndpoint, BulkEndpoint, BulkModelEndpoint, BulkdomainsDocumentclassesEndpoint, BulkdomainsDocumenttypesEndpoint, BulkdomainsDomainEndpoint, BulkdomainsReferencedocumentsEndpoint, BulkdomainsReferencesEndpoint, BulkmodelBoostwordsEndpoint, BulkmodelClassEndpoint, BulkmodelClassesEndpoint, BulkmodelDatapropertiesEndpoint, BulkmodelDomainEndpoint, BulkmodelDomainsEndpoint, BulkmodelInstancesEndpoint, BulkmodelMetadataEndpoint, BulkmodelNamedentitiesEndpoint, BulkmodelRulesEndpoint, BulkmodelStopwordsEndpoint, BulkmodelSynonymsEndpoint, BulkmodelclassInstancesEndpoint, type CellType, CelltypesEndpoint, type Char, type Chat, ChatEndpoint, type ChatResponse, ChatsEndpoint, ChildExtractorclassesEndpoint, type Class, type ClassBulk, type ClassBulkDatatypeEnum, ClassBulkDatatypeEnumValues, type ClassesOverview, CloneEndpoint, type ComplexProperty, type Condition, type ConditionValue, ConversionsEndpoint, type CurrentUser, CurrentuserEndpoint, type CustomField, type DataProperty, DiffEndpoint, type Difference, type DifferenceOperationEnum, DifferenceOperationEnumValues, type Distance, DocclassCustomfieldsEndpoint, DocclassDocumentclassesEndpoint, DocclassReferencedocumentsEndpoint, DocclassTagsEndpoint, type Document, type DocumentClass, type DocumentClassBulk, type DocumentClassNode, type DocumentInformation, type DocumentMetaData, type DocumentNamedEntity, type DocumentTable, type DocumentType, type DocumentTypeChange, type DocumentTypeConfig, DocumentannotationsEndpoint, DocumentclassEndpoint, DocumentclassesEndpoint, type DocumentmodeEnum, DocumentmodeEnumValues, DocumentsEndpoint, DocumenttypeEndpoint, DocumenttypesEndpoint, type Domain, DomainEndpoint, type DomainInfo, DomainsEndpoint, type Entity, type ErrorContainer, type ErrorField, type ErrorFieldCodeEnum, ErrorFieldCodeEnumValues, type Expression, type ExtractionArea, type ExtractionFile, type ExtractionReference, type Extractor, type ExtractorAttribute, type ExtractorAttributeDatatypeEnum, ExtractorAttributeDatatypeEnumValues, type ExtractorClass, type ExtractorClassOverview, type ExtractorTypeEnum, ExtractorTypeEnumValues, type Features, type Field, type FieldTypeEnum, FieldTypeEnumValues, type FileReference, type Finding, type FormatInformation, type Formatter, ImageEndpoint, ImagesEndpoint, type Info, InfoEndpoint, type Instance, type InstanceChild, type InstanceOverview, type Label, type LanguageDetection, LanguagesEndpoint, type Link, type LinkedInstance, type LinkedValue, MarkdownEndpoint, type Matcher, type MatcherTypeEnum, MatcherTypeEnumValues, MediaType, type Message, type MessageRoleEnum, MessageRoleEnumValues, type MetaInfoPage, type Metadata, type MetadataValue, type ModeEnum, ModeEnumValues, ModelAttributesEndpoint, ModelBoostwordEndpoint, ModelBoostwordsEndpoint, type ModelClass, ModelDatapropertiesEndpoint, ModelDatapropertyEndpoint, ModelDatatypesEndpoint, ModelDomainEndpoint, ModelDomainsEndpoint, ModelEndpoint, ModelExtractorclassEndpoint, ModelExtractorclassesEndpoint, ModelExtractorsEndpoint, ModelExtractortypesEndpoint, ModelFormattersEndpoint, type ModelInstance, type ModelMetadata, ModelMetadataEndpoint, ModelMetadatatypesEndpoint, ModelNamedentitiesEndpoint, ModelNamedentityEndpoint, ModelObjectpropertiesEndpoint, ModelOnemetadataEndpoint, ModelRegexEndpoint, ModelRegexesEndpoint, ModelRelationEndpoint, ModelRelationsEndpoint, ModelRuleEndpoint, ModelRulefunctionsEndpoint, ModelRulesEndpoint, ModelStopwordEndpoint, ModelStopwordsEndpoint, ModelSynonymEndpoint, ModelSynonymsEndpoint, ModelclassesEndpoint, ModelinstancesEndpoint, ModelontAttributeEndpoint, ModelontAttributesEndpoint, ModelontClassEndpoint, ModelontClassesEndpoint, ModelontInstanceEndpoint, ModelontInstancesEndpoint, ModelontclassInstancesEndpoint, type Name, type NamedEntity, NamedentitiesEndpoint, type Overview, type Page, type PageContent, type Paragraph, ParagraphEndpoint, type ParagraphUpdate, ParagraphsEndpoint, type ProcessInformation, type Prompt, PromptEndpoint, type PromptExecution, type PromptOverview, type PromptOverviewPromptLabelEnum, PromptOverviewPromptLabelEnumValues, type PromptPromptLabelEnum, PromptPromptLabelEnumValues, type PromptResponse, PromptsEndpoint, type Range, type Rect, type Reference, type ReferenceDocumentsResponseContainer, ReferencedocumentEndpoint, ReferencedocumentsEndpoint, ReferencesEndpoint, type Regex, type Relation, type RelationCondition, type ResponseMetaInfo, RestClient, RestResponse, RolesEndpoint, type Row, type Rule, type RuleFunction, type RuleFunctionTypeEnum, RuleFunctionTypeEnumValues, type RuleOverview, SemanthaAPI, type SemanticModel, type Sentence, SentenceEndpoint, SentencesEndpoint, type Settings, type SettingsDefaultSimilarityModeEnum, SettingsDefaultSimilarityModeEnumValues, SettingsEndpoint, type SettingsExtractionStrategyEnum, SettingsExtractionStrategyEnumValues, type SettingsTaggingStrategyEnum, SettingsTaggingStrategyEnumValues, type SimpleProperty, type Statistic, StatisticEndpoint, type StopWord, type Summarization, SummarizationsEndpoint, type SummarylengthEnum, SummarylengthEnumValues, type Synonym, type TableCell, type TableInstance, type TagDocs, TagEndpoint, TagReferencedocumentsEndpoint, TagsEndpoint, type TextType, TexttypesEndpoint, type Translation, type TranslationResponse, TranslationsEndpoint, TreeEndpoint, type TypeEnum, TypeEnumValues, ValidationEndpoint, type Version, isAttributeDatatypeEnumValue, isAttributeOverviewDatatypeEnumValue, isClassBulkDatatypeEnumValue, isDifferenceOperationEnumValue, isDocumentmodeEnumValue, isErrorFieldCodeEnumValue, isExtractorAttributeDatatypeEnumValue, isExtractorTypeEnumValue, isFieldTypeEnumValue, isMatcherTypeEnumValue, isMessageRoleEnumValue, isModeEnumValue, isPromptOverviewPromptLabelEnumValue, isPromptPromptLabelEnumValue, isRuleFunctionTypeEnumValue, isSettingsDefaultSimilarityModeEnumValue, isSettingsExtractionStrategyEnumValue, isSettingsTaggingStrategyEnumValue, isSummarylengthEnumValue, isTypeEnumValue };
|
|
5005
|
+
export { type AnnotationCell, type AnnotationPage, type Answer, type AnswerReference, AnswersEndpoint, type Area, type Argument, type Attachment, type Attribute, type AttributeDatatypeEnum, AttributeDatatypeEnumValues, type AttributeOverview, type AttributeOverviewDatatypeEnum, AttributeOverviewDatatypeEnumValues, type BoostWord, BulkDomainsEndpoint, BulkEndpoint, BulkModelEndpoint, BulkdomainsDocumentclassesEndpoint, BulkdomainsDocumenttypesEndpoint, BulkdomainsDomainEndpoint, BulkdomainsReferencedocumentsEndpoint, BulkdomainsReferencesEndpoint, BulkmodelBoostwordsEndpoint, BulkmodelClassEndpoint, BulkmodelClassesEndpoint, BulkmodelDatapropertiesEndpoint, BulkmodelDomainEndpoint, BulkmodelDomainsEndpoint, BulkmodelInstancesEndpoint, BulkmodelMetadataEndpoint, BulkmodelNamedentitiesEndpoint, BulkmodelRulesEndpoint, BulkmodelStopwordsEndpoint, BulkmodelSynonymsEndpoint, BulkmodelclassInstancesEndpoint, type CellType, CelltypesEndpoint, type Char, type Chat, ChatEndpoint, type ChatResponse, ChatsEndpoint, ChildExtractorclassesEndpoint, type Class, type ClassBulk, type ClassBulkDatatypeEnum, ClassBulkDatatypeEnumValues, type ClassesOverview, CloneEndpoint, type ComplexProperty, type Condition, type ConditionValue, ConversionsEndpoint, type CurrentUser, CurrentuserEndpoint, type CustomField, type DataProperty, DiffEndpoint, type Difference, type DifferenceOperationEnum, DifferenceOperationEnumValues, type Distance, DocclassCustomfieldsEndpoint, DocclassDocumentclassesEndpoint, DocclassReferencedocumentsEndpoint, DocclassTagsEndpoint, type Document, type DocumentClass, type DocumentClassBulk, type DocumentClassNode, type DocumentInformation, type DocumentMetaData, type DocumentNamedEntity, type DocumentTable, type DocumentType, type DocumentTypeChange, type DocumentTypeConfig, DocumentannotationsEndpoint, DocumentclassEndpoint, DocumentclassesEndpoint, type DocumentmodeEnum, DocumentmodeEnumValues, DocumentsEndpoint, DocumenttypeEndpoint, DocumenttypesEndpoint, type Domain, DomainEndpoint, type DomainInfo, DomainsEndpoint, type Entity, type ErrorContainer, type ErrorField, type ErrorFieldCodeEnum, ErrorFieldCodeEnumValues, type Expression, type ExtractionArea, type ExtractionFile, type ExtractionReference, type Extractor, type ExtractorAttribute, type ExtractorAttributeDatatypeEnum, ExtractorAttributeDatatypeEnumValues, type ExtractorClass, type ExtractorClassOverview, type ExtractorTypeEnum, ExtractorTypeEnumValues, type Features, type Field, type FieldTypeEnum, FieldTypeEnumValues, type FileReference, type Finding, type FormatInformation, type Formatter, ImageEndpoint, ImagesEndpoint, type Info, InfoEndpoint, type Instance, type InstanceChild, type InstanceOverview, type Label, type LanguageDetection, LanguagesEndpoint, type Link, type LinkedInstance, type LinkedValue, MarkdownEndpoint, type Matcher, type MatcherTypeEnum, MatcherTypeEnumValues, MediaType, type Message, type MessageRoleEnum, MessageRoleEnumValues, type MetaInfoPage, type Metadata, type MetadataValue, type ModeEnum, ModeEnumValues, ModelAttributesEndpoint, ModelBoostwordEndpoint, ModelBoostwordsEndpoint, type ModelClass, ModelDatapropertiesEndpoint, ModelDatapropertyEndpoint, ModelDatatypesEndpoint, ModelDomainEndpoint, ModelDomainsEndpoint, ModelEndpoint, ModelExtractorclassEndpoint, ModelExtractorclassesEndpoint, ModelExtractorsEndpoint, ModelExtractortypesEndpoint, ModelFormattersEndpoint, type ModelInstance, type ModelMetadata, ModelMetadataEndpoint, ModelMetadatatypesEndpoint, ModelNamedentitiesEndpoint, ModelNamedentityEndpoint, ModelObjectpropertiesEndpoint, ModelOnemetadataEndpoint, ModelRegexEndpoint, ModelRegexesEndpoint, ModelRelationEndpoint, ModelRelationsEndpoint, ModelRuleEndpoint, ModelRulefunctionsEndpoint, ModelRulesEndpoint, ModelStopwordEndpoint, ModelStopwordsEndpoint, ModelSynonymEndpoint, ModelSynonymsEndpoint, ModelclassesEndpoint, ModelinstancesEndpoint, ModelontAttributeEndpoint, ModelontAttributesEndpoint, ModelontClassEndpoint, ModelontClassesEndpoint, ModelontInstanceEndpoint, ModelontInstancesEndpoint, ModelontclassInstancesEndpoint, type Name, type NamedEntity, NamedentitiesEndpoint, type Overview, type Page, type PageContent, type Paragraph, ParagraphEndpoint, type ParagraphUpdate, ParagraphsEndpoint, type ProcessInformation, type Prompt, PromptEndpoint, type PromptExecution, type PromptOverview, type PromptOverviewPromptLabelEnum, PromptOverviewPromptLabelEnumValues, type PromptPromptLabelEnum, PromptPromptLabelEnumValues, type PromptResponse, PromptValidationEndpoint, type PromptValidationRequest, type PromptValidationResponse, type PromptValidationResult, type PromptValidationTemplate, PromptsEndpoint, type Range, type Rect, type Reference, type ReferenceDocumentsResponseContainer, ReferencedocumentEndpoint, ReferencedocumentsEndpoint, ReferencedocumentsStreamEndpoint, ReferencesEndpoint, type Regex, type Relation, type RelationCondition, type ResponseMetaInfo, RestClient, RestResponse, RolesEndpoint, type Row, type Rule, type RuleFunction, type RuleFunctionTypeEnum, RuleFunctionTypeEnumValues, type RuleOverview, SemanthaAPI, type SemanticModel, type Sentence, SentenceEndpoint, SentencesEndpoint, type Settings, type SettingsDefaultSimilarityModeEnum, SettingsDefaultSimilarityModeEnumValues, SettingsEndpoint, type SettingsExtractionStrategyEnum, SettingsExtractionStrategyEnumValues, type SettingsTaggingStrategyEnum, SettingsTaggingStrategyEnumValues, type SimpleProperty, type Statistic, StatisticEndpoint, type StopWord, type Summarization, SummarizationsEndpoint, type SummarylengthEnum, SummarylengthEnumValues, type Synonym, type TableCell, type TableInstance, type TagDocs, TagEndpoint, TagReferencedocumentsEndpoint, TagsEndpoint, type TextType, TexttypesEndpoint, type Translation, type TranslationResponse, TranslationsEndpoint, TreeEndpoint, type TypeEnum, TypeEnumValues, ValidationEndpoint, type Version, isAttributeDatatypeEnumValue, isAttributeOverviewDatatypeEnumValue, isClassBulkDatatypeEnumValue, isDifferenceOperationEnumValue, isDocumentmodeEnumValue, isErrorFieldCodeEnumValue, isExtractorAttributeDatatypeEnumValue, isExtractorTypeEnumValue, isFieldTypeEnumValue, isMatcherTypeEnumValue, isMessageRoleEnumValue, isModeEnumValue, isPromptOverviewPromptLabelEnumValue, isPromptPromptLabelEnumValue, isRuleFunctionTypeEnumValue, isSettingsDefaultSimilarityModeEnumValue, isSettingsExtractionStrategyEnumValue, isSettingsTaggingStrategyEnumValue, isSummarylengthEnumValue, isTypeEnumValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -1387,6 +1387,53 @@ interface PromptResponse {
|
|
|
1387
1387
|
response?: string;
|
|
1388
1388
|
}
|
|
1389
1389
|
|
|
1390
|
+
/**
|
|
1391
|
+
* @author semantha
|
|
1392
|
+
*
|
|
1393
|
+
* This is a generated file do not change manually!
|
|
1394
|
+
*/
|
|
1395
|
+
interface PromptValidationTemplate {
|
|
1396
|
+
userPrompt: string;
|
|
1397
|
+
systemPrompt?: string;
|
|
1398
|
+
temperature?: number;
|
|
1399
|
+
topK?: number;
|
|
1400
|
+
customFields?: CustomField[];
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
/**
|
|
1404
|
+
* @author semantha
|
|
1405
|
+
*
|
|
1406
|
+
* This is a generated file do not change manually!
|
|
1407
|
+
*/
|
|
1408
|
+
interface PromptValidationRequest {
|
|
1409
|
+
promptTemplate: PromptValidationTemplate;
|
|
1410
|
+
arguments: string[];
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
/**
|
|
1414
|
+
* @author semantha
|
|
1415
|
+
*
|
|
1416
|
+
* This is a generated file do not change manually!
|
|
1417
|
+
*/
|
|
1418
|
+
interface PromptValidationResult {
|
|
1419
|
+
status?: string;
|
|
1420
|
+
missingSystemPromptParams?: string[];
|
|
1421
|
+
missingUserPromptParams?: string[];
|
|
1422
|
+
errors?: ErrorContainer;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
/**
|
|
1426
|
+
* @author semantha
|
|
1427
|
+
*
|
|
1428
|
+
* This is a generated file do not change manually!
|
|
1429
|
+
*/
|
|
1430
|
+
interface PromptValidationResponse {
|
|
1431
|
+
renderedSystemPrompt?: string;
|
|
1432
|
+
renderedUserPrompt?: string;
|
|
1433
|
+
response?: string;
|
|
1434
|
+
validationResult?: PromptValidationResult;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1390
1437
|
/**
|
|
1391
1438
|
* @author semantha
|
|
1392
1439
|
*
|
|
@@ -2995,6 +3042,25 @@ declare class PromptEndpoint {
|
|
|
2995
3042
|
post(body?: PromptExecution): Promise<PromptResponse>;
|
|
2996
3043
|
}
|
|
2997
3044
|
|
|
3045
|
+
/**
|
|
3046
|
+
* @author semantha
|
|
3047
|
+
*
|
|
3048
|
+
* Class to access resource "/api/domains/{domainname}/prompts/validation"
|
|
3049
|
+
* This is a generated file do not change manually!
|
|
3050
|
+
*/
|
|
3051
|
+
declare class PromptValidationEndpoint {
|
|
3052
|
+
private readonly restClient;
|
|
3053
|
+
private readonly parentEndpoint;
|
|
3054
|
+
private readonly ENDPOINT;
|
|
3055
|
+
constructor(restClient: RestClient, parentEndpoint: string);
|
|
3056
|
+
/**
|
|
3057
|
+
* Validates prompt templating and executes role against the configured model. Requires domain admin role.
|
|
3058
|
+
*
|
|
3059
|
+
* @param body PromptValidationRequest? -
|
|
3060
|
+
*/
|
|
3061
|
+
post(body?: PromptValidationRequest): Promise<PromptValidationResponse>;
|
|
3062
|
+
}
|
|
3063
|
+
|
|
2998
3064
|
/**
|
|
2999
3065
|
* @author semantha
|
|
3000
3066
|
*
|
|
@@ -3006,6 +3072,7 @@ declare class PromptsEndpoint {
|
|
|
3006
3072
|
private readonly parentEndpoint;
|
|
3007
3073
|
private readonly ENDPOINT;
|
|
3008
3074
|
constructor(restClient: RestClient, parentEndpoint: string);
|
|
3075
|
+
validation(): PromptValidationEndpoint;
|
|
3009
3076
|
/**
|
|
3010
3077
|
* Read all available entities.
|
|
3011
3078
|
*/
|
|
@@ -3207,6 +3274,28 @@ declare class NamedentitiesEndpoint {
|
|
|
3207
3274
|
}): Promise<DocumentNamedEntity[]>;
|
|
3208
3275
|
}
|
|
3209
3276
|
|
|
3277
|
+
/**
|
|
3278
|
+
* @author semantha
|
|
3279
|
+
*
|
|
3280
|
+
* Class to access resource "/api/domains/{domainname}/referencedocuments/stream"
|
|
3281
|
+
* This is a generated file do not change manually!
|
|
3282
|
+
*/
|
|
3283
|
+
declare class ReferencedocumentsStreamEndpoint {
|
|
3284
|
+
private readonly restClient;
|
|
3285
|
+
private readonly parentEndpoint;
|
|
3286
|
+
private readonly ENDPOINT;
|
|
3287
|
+
constructor(restClient: RestClient, parentEndpoint: string);
|
|
3288
|
+
/**
|
|
3289
|
+
* Get all reference document information as a streamed JSON array.
|
|
3290
|
+
* Returns only document metadata (e.g. id, name, tags, document class) without document content such as pages, paragraphs or sentences. Ignored documents are excluded. Results are sorted by creation date descending.
|
|
3291
|
+
*
|
|
3292
|
+
* @param fields string? - Define which fields should be returned. The following values can be sent as a comma-separated list: 'id', 'name', 'tags', 'derivedtags', 'documentclass'. If empty or null all fields will be returned.
|
|
3293
|
+
*/
|
|
3294
|
+
get(params?: {
|
|
3295
|
+
fields?: string;
|
|
3296
|
+
}): Promise<DocumentInformation[]>;
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3210
3299
|
/**
|
|
3211
3300
|
* @author semantha
|
|
3212
3301
|
*
|
|
@@ -3237,6 +3326,7 @@ declare class ReferencedocumentsEndpoint {
|
|
|
3237
3326
|
constructor(restClient: RestClient, parentEndpoint: string);
|
|
3238
3327
|
namedentities(): NamedentitiesEndpoint;
|
|
3239
3328
|
statistic(): StatisticEndpoint;
|
|
3329
|
+
stream(): ReferencedocumentsStreamEndpoint;
|
|
3240
3330
|
/**
|
|
3241
3331
|
* Get all reference documents a.k.a. library items.
|
|
3242
3332
|
* 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>.
|
|
@@ -4912,4 +5002,4 @@ declare class SemanthaAPI {
|
|
|
4912
5002
|
model(): ModelEndpoint;
|
|
4913
5003
|
}
|
|
4914
5004
|
|
|
4915
|
-
export { type AnnotationCell, type AnnotationPage, type Answer, type AnswerReference, AnswersEndpoint, type Area, type Argument, type Attachment, type Attribute, type AttributeDatatypeEnum, AttributeDatatypeEnumValues, type AttributeOverview, type AttributeOverviewDatatypeEnum, AttributeOverviewDatatypeEnumValues, type BoostWord, BulkDomainsEndpoint, BulkEndpoint, BulkModelEndpoint, BulkdomainsDocumentclassesEndpoint, BulkdomainsDocumenttypesEndpoint, BulkdomainsDomainEndpoint, BulkdomainsReferencedocumentsEndpoint, BulkdomainsReferencesEndpoint, BulkmodelBoostwordsEndpoint, BulkmodelClassEndpoint, BulkmodelClassesEndpoint, BulkmodelDatapropertiesEndpoint, BulkmodelDomainEndpoint, BulkmodelDomainsEndpoint, BulkmodelInstancesEndpoint, BulkmodelMetadataEndpoint, BulkmodelNamedentitiesEndpoint, BulkmodelRulesEndpoint, BulkmodelStopwordsEndpoint, BulkmodelSynonymsEndpoint, BulkmodelclassInstancesEndpoint, type CellType, CelltypesEndpoint, type Char, type Chat, ChatEndpoint, type ChatResponse, ChatsEndpoint, ChildExtractorclassesEndpoint, type Class, type ClassBulk, type ClassBulkDatatypeEnum, ClassBulkDatatypeEnumValues, type ClassesOverview, CloneEndpoint, type ComplexProperty, type Condition, type ConditionValue, ConversionsEndpoint, type CurrentUser, CurrentuserEndpoint, type CustomField, type DataProperty, DiffEndpoint, type Difference, type DifferenceOperationEnum, DifferenceOperationEnumValues, type Distance, DocclassCustomfieldsEndpoint, DocclassDocumentclassesEndpoint, DocclassReferencedocumentsEndpoint, DocclassTagsEndpoint, type Document, type DocumentClass, type DocumentClassBulk, type DocumentClassNode, type DocumentInformation, type DocumentMetaData, type DocumentNamedEntity, type DocumentTable, type DocumentType, type DocumentTypeChange, type DocumentTypeConfig, DocumentannotationsEndpoint, DocumentclassEndpoint, DocumentclassesEndpoint, type DocumentmodeEnum, DocumentmodeEnumValues, DocumentsEndpoint, DocumenttypeEndpoint, DocumenttypesEndpoint, type Domain, DomainEndpoint, type DomainInfo, DomainsEndpoint, type Entity, type ErrorContainer, type ErrorField, type ErrorFieldCodeEnum, ErrorFieldCodeEnumValues, type Expression, type ExtractionArea, type ExtractionFile, type ExtractionReference, type Extractor, type ExtractorAttribute, type ExtractorAttributeDatatypeEnum, ExtractorAttributeDatatypeEnumValues, type ExtractorClass, type ExtractorClassOverview, type ExtractorTypeEnum, ExtractorTypeEnumValues, type Features, type Field, type FieldTypeEnum, FieldTypeEnumValues, type FileReference, type Finding, type FormatInformation, type Formatter, ImageEndpoint, ImagesEndpoint, type Info, InfoEndpoint, type Instance, type InstanceChild, type InstanceOverview, type Label, type LanguageDetection, LanguagesEndpoint, type Link, type LinkedInstance, type LinkedValue, MarkdownEndpoint, type Matcher, type MatcherTypeEnum, MatcherTypeEnumValues, MediaType, type Message, type MessageRoleEnum, MessageRoleEnumValues, type MetaInfoPage, type Metadata, type MetadataValue, type ModeEnum, ModeEnumValues, ModelAttributesEndpoint, ModelBoostwordEndpoint, ModelBoostwordsEndpoint, type ModelClass, ModelDatapropertiesEndpoint, ModelDatapropertyEndpoint, ModelDatatypesEndpoint, ModelDomainEndpoint, ModelDomainsEndpoint, ModelEndpoint, ModelExtractorclassEndpoint, ModelExtractorclassesEndpoint, ModelExtractorsEndpoint, ModelExtractortypesEndpoint, ModelFormattersEndpoint, type ModelInstance, type ModelMetadata, ModelMetadataEndpoint, ModelMetadatatypesEndpoint, ModelNamedentitiesEndpoint, ModelNamedentityEndpoint, ModelObjectpropertiesEndpoint, ModelOnemetadataEndpoint, ModelRegexEndpoint, ModelRegexesEndpoint, ModelRelationEndpoint, ModelRelationsEndpoint, ModelRuleEndpoint, ModelRulefunctionsEndpoint, ModelRulesEndpoint, ModelStopwordEndpoint, ModelStopwordsEndpoint, ModelSynonymEndpoint, ModelSynonymsEndpoint, ModelclassesEndpoint, ModelinstancesEndpoint, ModelontAttributeEndpoint, ModelontAttributesEndpoint, ModelontClassEndpoint, ModelontClassesEndpoint, ModelontInstanceEndpoint, ModelontInstancesEndpoint, ModelontclassInstancesEndpoint, type Name, type NamedEntity, NamedentitiesEndpoint, type Overview, type Page, type PageContent, type Paragraph, ParagraphEndpoint, type ParagraphUpdate, ParagraphsEndpoint, type ProcessInformation, type Prompt, PromptEndpoint, type PromptExecution, type PromptOverview, type PromptOverviewPromptLabelEnum, PromptOverviewPromptLabelEnumValues, type PromptPromptLabelEnum, PromptPromptLabelEnumValues, type PromptResponse, PromptsEndpoint, type Range, type Rect, type Reference, type ReferenceDocumentsResponseContainer, ReferencedocumentEndpoint, ReferencedocumentsEndpoint, ReferencesEndpoint, type Regex, type Relation, type RelationCondition, type ResponseMetaInfo, RestClient, RestResponse, RolesEndpoint, type Row, type Rule, type RuleFunction, type RuleFunctionTypeEnum, RuleFunctionTypeEnumValues, type RuleOverview, SemanthaAPI, type SemanticModel, type Sentence, SentenceEndpoint, SentencesEndpoint, type Settings, type SettingsDefaultSimilarityModeEnum, SettingsDefaultSimilarityModeEnumValues, SettingsEndpoint, type SettingsExtractionStrategyEnum, SettingsExtractionStrategyEnumValues, type SettingsTaggingStrategyEnum, SettingsTaggingStrategyEnumValues, type SimpleProperty, type Statistic, StatisticEndpoint, type StopWord, type Summarization, SummarizationsEndpoint, type SummarylengthEnum, SummarylengthEnumValues, type Synonym, type TableCell, type TableInstance, type TagDocs, TagEndpoint, TagReferencedocumentsEndpoint, TagsEndpoint, type TextType, TexttypesEndpoint, type Translation, type TranslationResponse, TranslationsEndpoint, TreeEndpoint, type TypeEnum, TypeEnumValues, ValidationEndpoint, type Version, isAttributeDatatypeEnumValue, isAttributeOverviewDatatypeEnumValue, isClassBulkDatatypeEnumValue, isDifferenceOperationEnumValue, isDocumentmodeEnumValue, isErrorFieldCodeEnumValue, isExtractorAttributeDatatypeEnumValue, isExtractorTypeEnumValue, isFieldTypeEnumValue, isMatcherTypeEnumValue, isMessageRoleEnumValue, isModeEnumValue, isPromptOverviewPromptLabelEnumValue, isPromptPromptLabelEnumValue, isRuleFunctionTypeEnumValue, isSettingsDefaultSimilarityModeEnumValue, isSettingsExtractionStrategyEnumValue, isSettingsTaggingStrategyEnumValue, isSummarylengthEnumValue, isTypeEnumValue };
|
|
5005
|
+
export { type AnnotationCell, type AnnotationPage, type Answer, type AnswerReference, AnswersEndpoint, type Area, type Argument, type Attachment, type Attribute, type AttributeDatatypeEnum, AttributeDatatypeEnumValues, type AttributeOverview, type AttributeOverviewDatatypeEnum, AttributeOverviewDatatypeEnumValues, type BoostWord, BulkDomainsEndpoint, BulkEndpoint, BulkModelEndpoint, BulkdomainsDocumentclassesEndpoint, BulkdomainsDocumenttypesEndpoint, BulkdomainsDomainEndpoint, BulkdomainsReferencedocumentsEndpoint, BulkdomainsReferencesEndpoint, BulkmodelBoostwordsEndpoint, BulkmodelClassEndpoint, BulkmodelClassesEndpoint, BulkmodelDatapropertiesEndpoint, BulkmodelDomainEndpoint, BulkmodelDomainsEndpoint, BulkmodelInstancesEndpoint, BulkmodelMetadataEndpoint, BulkmodelNamedentitiesEndpoint, BulkmodelRulesEndpoint, BulkmodelStopwordsEndpoint, BulkmodelSynonymsEndpoint, BulkmodelclassInstancesEndpoint, type CellType, CelltypesEndpoint, type Char, type Chat, ChatEndpoint, type ChatResponse, ChatsEndpoint, ChildExtractorclassesEndpoint, type Class, type ClassBulk, type ClassBulkDatatypeEnum, ClassBulkDatatypeEnumValues, type ClassesOverview, CloneEndpoint, type ComplexProperty, type Condition, type ConditionValue, ConversionsEndpoint, type CurrentUser, CurrentuserEndpoint, type CustomField, type DataProperty, DiffEndpoint, type Difference, type DifferenceOperationEnum, DifferenceOperationEnumValues, type Distance, DocclassCustomfieldsEndpoint, DocclassDocumentclassesEndpoint, DocclassReferencedocumentsEndpoint, DocclassTagsEndpoint, type Document, type DocumentClass, type DocumentClassBulk, type DocumentClassNode, type DocumentInformation, type DocumentMetaData, type DocumentNamedEntity, type DocumentTable, type DocumentType, type DocumentTypeChange, type DocumentTypeConfig, DocumentannotationsEndpoint, DocumentclassEndpoint, DocumentclassesEndpoint, type DocumentmodeEnum, DocumentmodeEnumValues, DocumentsEndpoint, DocumenttypeEndpoint, DocumenttypesEndpoint, type Domain, DomainEndpoint, type DomainInfo, DomainsEndpoint, type Entity, type ErrorContainer, type ErrorField, type ErrorFieldCodeEnum, ErrorFieldCodeEnumValues, type Expression, type ExtractionArea, type ExtractionFile, type ExtractionReference, type Extractor, type ExtractorAttribute, type ExtractorAttributeDatatypeEnum, ExtractorAttributeDatatypeEnumValues, type ExtractorClass, type ExtractorClassOverview, type ExtractorTypeEnum, ExtractorTypeEnumValues, type Features, type Field, type FieldTypeEnum, FieldTypeEnumValues, type FileReference, type Finding, type FormatInformation, type Formatter, ImageEndpoint, ImagesEndpoint, type Info, InfoEndpoint, type Instance, type InstanceChild, type InstanceOverview, type Label, type LanguageDetection, LanguagesEndpoint, type Link, type LinkedInstance, type LinkedValue, MarkdownEndpoint, type Matcher, type MatcherTypeEnum, MatcherTypeEnumValues, MediaType, type Message, type MessageRoleEnum, MessageRoleEnumValues, type MetaInfoPage, type Metadata, type MetadataValue, type ModeEnum, ModeEnumValues, ModelAttributesEndpoint, ModelBoostwordEndpoint, ModelBoostwordsEndpoint, type ModelClass, ModelDatapropertiesEndpoint, ModelDatapropertyEndpoint, ModelDatatypesEndpoint, ModelDomainEndpoint, ModelDomainsEndpoint, ModelEndpoint, ModelExtractorclassEndpoint, ModelExtractorclassesEndpoint, ModelExtractorsEndpoint, ModelExtractortypesEndpoint, ModelFormattersEndpoint, type ModelInstance, type ModelMetadata, ModelMetadataEndpoint, ModelMetadatatypesEndpoint, ModelNamedentitiesEndpoint, ModelNamedentityEndpoint, ModelObjectpropertiesEndpoint, ModelOnemetadataEndpoint, ModelRegexEndpoint, ModelRegexesEndpoint, ModelRelationEndpoint, ModelRelationsEndpoint, ModelRuleEndpoint, ModelRulefunctionsEndpoint, ModelRulesEndpoint, ModelStopwordEndpoint, ModelStopwordsEndpoint, ModelSynonymEndpoint, ModelSynonymsEndpoint, ModelclassesEndpoint, ModelinstancesEndpoint, ModelontAttributeEndpoint, ModelontAttributesEndpoint, ModelontClassEndpoint, ModelontClassesEndpoint, ModelontInstanceEndpoint, ModelontInstancesEndpoint, ModelontclassInstancesEndpoint, type Name, type NamedEntity, NamedentitiesEndpoint, type Overview, type Page, type PageContent, type Paragraph, ParagraphEndpoint, type ParagraphUpdate, ParagraphsEndpoint, type ProcessInformation, type Prompt, PromptEndpoint, type PromptExecution, type PromptOverview, type PromptOverviewPromptLabelEnum, PromptOverviewPromptLabelEnumValues, type PromptPromptLabelEnum, PromptPromptLabelEnumValues, type PromptResponse, PromptValidationEndpoint, type PromptValidationRequest, type PromptValidationResponse, type PromptValidationResult, type PromptValidationTemplate, PromptsEndpoint, type Range, type Rect, type Reference, type ReferenceDocumentsResponseContainer, ReferencedocumentEndpoint, ReferencedocumentsEndpoint, ReferencedocumentsStreamEndpoint, ReferencesEndpoint, type Regex, type Relation, type RelationCondition, type ResponseMetaInfo, RestClient, RestResponse, RolesEndpoint, type Row, type Rule, type RuleFunction, type RuleFunctionTypeEnum, RuleFunctionTypeEnumValues, type RuleOverview, SemanthaAPI, type SemanticModel, type Sentence, SentenceEndpoint, SentencesEndpoint, type Settings, type SettingsDefaultSimilarityModeEnum, SettingsDefaultSimilarityModeEnumValues, SettingsEndpoint, type SettingsExtractionStrategyEnum, SettingsExtractionStrategyEnumValues, type SettingsTaggingStrategyEnum, SettingsTaggingStrategyEnumValues, type SimpleProperty, type Statistic, StatisticEndpoint, type StopWord, type Summarization, SummarizationsEndpoint, type SummarylengthEnum, SummarylengthEnumValues, type Synonym, type TableCell, type TableInstance, type TagDocs, TagEndpoint, TagReferencedocumentsEndpoint, TagsEndpoint, type TextType, TexttypesEndpoint, type Translation, type TranslationResponse, TranslationsEndpoint, TreeEndpoint, type TypeEnum, TypeEnumValues, ValidationEndpoint, type Version, isAttributeDatatypeEnumValue, isAttributeOverviewDatatypeEnumValue, isClassBulkDatatypeEnumValue, isDifferenceOperationEnumValue, isDocumentmodeEnumValue, isErrorFieldCodeEnumValue, isExtractorAttributeDatatypeEnumValue, isExtractorTypeEnumValue, isFieldTypeEnumValue, isMatcherTypeEnumValue, isMessageRoleEnumValue, isModeEnumValue, isPromptOverviewPromptLabelEnumValue, isPromptPromptLabelEnumValue, isRuleFunctionTypeEnumValue, isSettingsDefaultSimilarityModeEnumValue, isSettingsExtractionStrategyEnumValue, isSettingsTaggingStrategyEnumValue, isSummarylengthEnumValue, isTypeEnumValue };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var m=require('axios'),ce=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 ce__namespace=/*#__PURE__*/_interopNamespace(ce);var ye=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Je(r){return ye.includes(r)}var Ce=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Ve(r){return Ce.includes(r)}var fe=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function ke(r){return fe.includes(r)}var Te=["DELETE","INSERT","EQUAL"];function Ue(r){return Te.includes(r)}var Oe=["sentence","paragraph"];function Ye(r){return Oe.includes(r)}var Pe=["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 $e(r){return Pe.includes(r)}var De=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function ze(r){return De.includes(r)}var ge=["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 Ke(r){return ge.includes(r)}var Ie=["CLASS","OBJECT_PROPERTY","DATA_PROPERTY"];function Ze(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 er(r){return Re.includes(r)}var xe=["USER","ASSISTANT","SYSTEM"];function nr(r){return xe.includes(r)}var ve=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto"];function or(r){return ve.includes(r)}var we=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY"];function ar(r){return we.includes(r)}var Me=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY"];function lr(r){return Me.includes(r)}var Se=["OPERATOR","FUNCTION"];function dr(r){return Se.includes(r)}var be=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto"];function Er(r){return be.includes(r)}var Ae=["ANY","TOP1","TOP3","TOP5","TOP10"];function cr(r){return Ae.includes(r)}var _e=["TOP1","TOP3","TOP5","TOP10"];function yr(r){return _e.includes(r)}var He=["SHORT","MEDIUM","LONG"];function fr(r){return He.includes(r)}var Be=["similarity","extraction"];function Or(r){return Be.includes(r)}var l=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.TEXT_PLAIN="text/plain",s))(n||{}),p=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="",this.skipAuthHeader=!!t&&!(e||i||o||a);}static LEEWAY=30;expireTime;accessToken;skipAuthHeader;async buildHeadersForJsonRequest(){return this.skipAuthHeader?{Accept:"application/json"}:{Accept:"application/json",Authorization:`Bearer ${await this.getToken()}`}}async buildHeadersForRequest(){return this.skipAuthHeader?{}:{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 l(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 l(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 N=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var E=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 u=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 u(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 P=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 D=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 g=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 E(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 P(this.restClient,this.ENDPOINT)}synonyms(){return new D(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 g(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 N(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+"/conversions";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toFile()}};var V=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 F=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new V(this.restClient,this.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+"/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 U=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 X=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 Y=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;tags(){return new X(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 W=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 U(this.restClient,this.ENDPOINT)}referencedocuments(){return new Y(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 q=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tree";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var z=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;tree(){return new q(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 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 patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}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){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/markdown";}ENDPOINT;async getAsPlainText(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("text/plain"))).toModel()}};var st=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 at=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/paragraphs";}ENDPOINT};var pt=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 lt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/sentences";}ENDPOINT};var mt=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)}markdown(){return new ot(this.restClient,this.ENDPOINT)}paragraphs(t){return t!=null?new st(this.restClient,this.ENDPOINT,t):new at(this.restClient,this.ENDPOINT)}sentences(t){return t!=null?new pt(this.restClient,this.ENDPOINT,t):new lt(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 dt=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 Nt=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 Et=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;namedentities(){return new dt(this.restClient,this.ENDPOINT)}statistic(){return new Nt(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 ut=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 ct=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 ht=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 yt=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 Ct=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 yt(this.restClient,this.ENDPOINT)}};var ft=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 Tt=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 Ot=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/translations";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Pt=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 Dt=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 W(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 mt(this.restClient,this.ENDPOINT,t):new Et(this.restClient,this.ENDPOINT)}references(){return new ut(this.restClient,this.ENDPOINT)}settings(){return new ct(this.restClient,this.ENDPOINT)}summarizations(){return new ht(this.restClient,this.ENDPOINT)}tags(t){return t!=null?new Ct(this.restClient,this.ENDPOINT,t):new ft(this.restClient,this.ENDPOINT)}texttypes(){return new Tt(this.restClient,this.ENDPOINT)}translations(){return new Ot(this.restClient,this.ENDPOINT)}validation(){return new Pt(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var gt=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 It=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 Rt=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 xt=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 vt=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 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 Gt=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 Ut=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 $t=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 qt=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 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 Gt(this.restClient,this.ENDPOINT,t):new Ut(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 $t(this.restClient,this.ENDPOINT)}rules(t){return t!=null?new Wt(this.restClient,this.ENDPOINT,t):new qt(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 xt(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 Ee="/api/v3",ue=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 p(this.parseServerUrl(t),e),Ee)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new r(new p(this.parseServerUrl(t)),Ee)}static loginWithCredentials(t,e,i,o){return t=this.parseServerUrl(t),new r(new p(t,void 0,e,i,o),Ee)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=ce__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(Ne=>Ne.length!==0).map(Ne=>Ne.split("=")),o=this.getValueOfInPropertiesFile("serverUrl",i),a=this.getValueOfInPropertiesFile("clientId",i),de=this.getValueOfInPropertiesFile("clientSecret",i),he=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(o,a,de,he)}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 L(this.restClient,this.endpoint())}currentuser(){return new F(this.restClient,this.endpoint())}diff(){return new k(this.restClient,this.endpoint())}domains(t){return t!=null?new Dt(this.restClient,this.endpoint(),t):new gt(this.restClient,this.endpoint())}info(){return new It(this.restClient,this.endpoint())}languages(){return new Rt(this.restClient,this.endpoint())}model(){return new me(this.restClient,this.endpoint())}};exports.AnswersEndpoint=d;exports.AttributeDatatypeEnumValues=ye;exports.AttributeOverviewDatatypeEnumValues=Ce;exports.BulkDomainsEndpoint=N;exports.BulkEndpoint=b;exports.BulkModelEndpoint=R;exports.BulkdomainsDocumentclassesEndpoint=x;exports.BulkdomainsDocumenttypesEndpoint=v;exports.BulkdomainsDomainEndpoint=S;exports.BulkdomainsReferencedocumentsEndpoint=w;exports.BulkdomainsReferencesEndpoint=M;exports.BulkmodelBoostwordsEndpoint=E;exports.BulkmodelClassEndpoint=c;exports.BulkmodelClassesEndpoint=h;exports.BulkmodelDatapropertiesEndpoint=y;exports.BulkmodelDomainEndpoint=g;exports.BulkmodelDomainsEndpoint=I;exports.BulkmodelInstancesEndpoint=C;exports.BulkmodelMetadataEndpoint=f;exports.BulkmodelNamedentitiesEndpoint=T;exports.BulkmodelRulesEndpoint=O;exports.BulkmodelStopwordsEndpoint=P;exports.BulkmodelSynonymsEndpoint=D;exports.BulkmodelclassInstancesEndpoint=u;exports.CelltypesEndpoint=A;exports.ChatEndpoint=_;exports.ChatsEndpoint=H;exports.ChildExtractorclassesEndpoint=B;exports.ClassBulkDatatypeEnumValues=fe;exports.CloneEndpoint=J;exports.ConversionsEndpoint=L;exports.CurrentuserEndpoint=F;exports.DiffEndpoint=k;exports.DifferenceOperationEnumValues=Te;exports.DocclassCustomfieldsEndpoint=G;exports.DocclassDocumentclassesEndpoint=U;exports.DocclassReferencedocumentsEndpoint=Y;exports.DocclassTagsEndpoint=X;exports.DocumentannotationsEndpoint=W;exports.DocumentclassEndpoint=$;exports.DocumentclassesEndpoint=z;exports.DocumentmodeEnumValues=Oe;exports.DocumentsEndpoint=j;exports.DocumenttypeEndpoint=K;exports.DocumenttypesEndpoint=Q;exports.DomainEndpoint=Dt;exports.DomainsEndpoint=gt;exports.ErrorFieldCodeEnumValues=Pe;exports.ExtractorAttributeDatatypeEnumValues=De;exports.ExtractorTypeEnumValues=ge;exports.FieldTypeEnumValues=Ie;exports.ImageEndpoint=nt;exports.ImagesEndpoint=it;exports.InfoEndpoint=It;exports.LanguagesEndpoint=Rt;exports.MarkdownEndpoint=ot;exports.MatcherTypeEnumValues=Re;exports.MediaType=n;exports.MessageRoleEnumValues=xe;exports.ModeEnumValues=ve;exports.ModelAttributesEndpoint=vt;exports.ModelBoostwordEndpoint=wt;exports.ModelBoostwordsEndpoint=Mt;exports.ModelDatapropertiesEndpoint=St;exports.ModelDatapropertyEndpoint=bt;exports.ModelDatatypesEndpoint=xt;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=Gt;exports.ModelRegexesEndpoint=Ut;exports.ModelRelationEndpoint=Xt;exports.ModelRelationsEndpoint=Yt;exports.ModelRuleEndpoint=Wt;exports.ModelRulefunctionsEndpoint=$t;exports.ModelRulesEndpoint=qt;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=dt;exports.ParagraphEndpoint=st;exports.ParagraphsEndpoint=at;exports.PromptEndpoint=et;exports.PromptOverviewPromptLabelEnumValues=we;exports.PromptPromptLabelEnumValues=Me;exports.PromptsEndpoint=rt;exports.ReferencedocumentEndpoint=mt;exports.ReferencedocumentsEndpoint=Et;exports.ReferencesEndpoint=ut;exports.RestClient=p;exports.RestResponse=l;exports.RolesEndpoint=V;exports.RuleFunctionTypeEnumValues=Se;exports.SemanthaAPI=ue;exports.SentenceEndpoint=pt;exports.SentencesEndpoint=lt;exports.SettingsDefaultSimilarityModeEnumValues=be;exports.SettingsEndpoint=ct;exports.SettingsExtractionStrategyEnumValues=Ae;exports.SettingsTaggingStrategyEnumValues=_e;exports.StatisticEndpoint=Nt;exports.SummarizationsEndpoint=ht;exports.SummarylengthEnumValues=He;exports.TagEndpoint=Ct;exports.TagReferencedocumentsEndpoint=yt;exports.TagsEndpoint=ft;exports.TexttypesEndpoint=Tt;exports.TranslationsEndpoint=Ot;exports.TreeEndpoint=q;exports.TypeEnumValues=Be;exports.ValidationEndpoint=Pt;exports.isAttributeDatatypeEnumValue=Je;exports.isAttributeOverviewDatatypeEnumValue=Ve;exports.isClassBulkDatatypeEnumValue=ke;exports.isDifferenceOperationEnumValue=Ue;exports.isDocumentmodeEnumValue=Ye;exports.isErrorFieldCodeEnumValue=$e;exports.isExtractorAttributeDatatypeEnumValue=ze;exports.isExtractorTypeEnumValue=Ke;exports.isFieldTypeEnumValue=Ze;exports.isMatcherTypeEnumValue=er;exports.isMessageRoleEnumValue=nr;exports.isModeEnumValue=or;exports.isPromptOverviewPromptLabelEnumValue=ar;exports.isPromptPromptLabelEnumValue=lr;exports.isRuleFunctionTypeEnumValue=dr;exports.isSettingsDefaultSimilarityModeEnumValue=Er;exports.isSettingsExtractionStrategyEnumValue=cr;exports.isSettingsTaggingStrategyEnumValue=yr;exports.isSummarylengthEnumValue=fr;exports.isTypeEnumValue=Or;//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';var m=require('axios'),ye=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 ye__namespace=/*#__PURE__*/_interopNamespace(ye);var Ce=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Ve(r){return Ce.includes(r)}var Te=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function ke(r){return Te.includes(r)}var Pe=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Ue(r){return Pe.includes(r)}var Oe=["DELETE","INSERT","EQUAL"];function Ye(r){return Oe.includes(r)}var De=["sentence","paragraph"];function $e(r){return De.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 ze(r){return ge.includes(r)}var Ie=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Ke(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 Ze(r){return Re.includes(r)}var xe=["CLASS","OBJECT_PROPERTY","DATA_PROPERTY"];function er(r){return xe.includes(r)}var ve=["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 nr(r){return ve.includes(r)}var we=["USER","ASSISTANT","SYSTEM"];function or(r){return we.includes(r)}var Me=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto"];function ar(r){return Me.includes(r)}var Se=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY"];function lr(r){return Se.includes(r)}var be=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY"];function dr(r){return be.includes(r)}var Ae=["OPERATOR","FUNCTION"];function Er(r){return Ae.includes(r)}var _e=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto"];function cr(r){return _e.includes(r)}var He=["ANY","TOP1","TOP3","TOP5","TOP10"];function yr(r){return He.includes(r)}var Be=["TOP1","TOP3","TOP5","TOP10"];function Cr(r){return Be.includes(r)}var Je=["SHORT","MEDIUM","LONG"];function Pr(r){return Je.includes(r)}var Le=["similarity","extraction"];function Dr(r){return Le.includes(r)}var l=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.TEXT_PLAIN="text/plain",s))(n||{}),p=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="",this.skipAuthHeader=!!t&&!(e||i||o||a);}static LEEWAY=30;expireTime;accessToken;skipAuthHeader;async buildHeadersForJsonRequest(){return this.skipAuthHeader?{Accept:"application/json"}:{Accept:"application/json",Authorization:`Bearer ${await this.getToken()}`}}async buildHeadersForRequest(){return this.skipAuthHeader?{}:{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 l(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 Ee=await this.buildHeadersForRequest();i={...i,...Ee};}return new l(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 N=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var E=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 u=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 u(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 f=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 C=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 P=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 O=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 D=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 g=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 E(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 f(this.restClient,this.ENDPOINT)}metadata(){return new C(this.restClient,this.ENDPOINT)}namedentities(){return new T(this.restClient,this.ENDPOINT)}rules(){return new P(this.restClient,this.ENDPOINT)}stopwords(){return new O(this.restClient,this.ENDPOINT)}synonyms(){return new D(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 g(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 N(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+"/conversions";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toFile()}};var V=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 F=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new V(this.restClient,this.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+"/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 U=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 X=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 Y=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;tags(){return new X(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 W=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 U(this.restClient,this.ENDPOINT)}referencedocuments(){return new Y(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 q=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tree";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var z=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;tree(){return new q(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 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 patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}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+"/validation";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var nt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/prompts";}ENDPOINT;validation(){return new rt(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 post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var it=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 ot=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/images";}ENDPOINT};var st=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/markdown";}ENDPOINT;async getAsPlainText(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("text/plain"))).toModel()}};var at=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 pt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/paragraphs";}ENDPOINT};var lt=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 mt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/sentences";}ENDPOINT};var dt=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 it(this.restClient,this.ENDPOINT,t):new ot(this.restClient,this.ENDPOINT)}markdown(){return new st(this.restClient,this.ENDPOINT)}paragraphs(t){return t!=null?new at(this.restClient,this.ENDPOINT,t):new pt(this.restClient,this.ENDPOINT)}sentences(t){return t!=null?new lt(this.restClient,this.ENDPOINT,t):new mt(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 Nt=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 Et=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/stream";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var ut=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 ct=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;namedentities(){return new Nt(this.restClient,this.ENDPOINT)}statistic(){return new ut(this.restClient,this.ENDPOINT)}stream(){return new Et(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 ht=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 yt=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 ft=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 Ct=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 Tt=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 Ct(this.restClient,this.ENDPOINT)}};var Pt=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 Ot=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 Dt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/translations";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var gt=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 It=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 W(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 nt(this.restClient,this.ENDPOINT)}referencedocuments(t){return t!=null?new dt(this.restClient,this.ENDPOINT,t):new ct(this.restClient,this.ENDPOINT)}references(){return new ht(this.restClient,this.ENDPOINT)}settings(){return new yt(this.restClient,this.ENDPOINT)}summarizations(){return new ft(this.restClient,this.ENDPOINT)}tags(t){return t!=null?new Tt(this.restClient,this.ENDPOINT,t):new Pt(this.restClient,this.ENDPOINT)}texttypes(){return new Ot(this.restClient,this.ENDPOINT)}translations(){return new Dt(this.restClient,this.ENDPOINT)}validation(){return new gt(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Rt=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 xt=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 vt=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 wt=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 Mt=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 St=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 bt=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 At=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 _t=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 Ht=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 Bt=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 Jt=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 Lt=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 Vt=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 Ft=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 kt=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 Gt=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 Ut=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 Xt=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 Yt=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 Wt=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 $t=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 qt=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 zt=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 jt=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 Kt=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 Qt=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 Zt=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 te=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 ee=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 re=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 ne=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 ie=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 ee(this.restClient,this.ENDPOINT,t):new re(this.restClient,this.ENDPOINT)}instances(){return new ne(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 oe=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 se=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 ae=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 pe=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 Mt(this.restClient,this.ENDPOINT)}boostwords(t){return t!=null?new St(this.restClient,this.ENDPOINT,t):new bt(this.restClient,this.ENDPOINT)}classes(t){return t!=null?new ie(this.restClient,this.ENDPOINT,t):new oe(this.restClient,this.ENDPOINT)}dataproperties(t){return t!=null?new _t(this.restClient,this.ENDPOINT,t):new At(this.restClient,this.ENDPOINT)}extractorclasses(t){return t!=null?new Ht(this.restClient,this.ENDPOINT,t):new Bt(this.restClient,this.ENDPOINT)}extractors(){return new Jt(this.restClient,this.ENDPOINT)}formatters(){return new Lt(this.restClient,this.ENDPOINT)}instances(t){return t!=null?new se(this.restClient,this.ENDPOINT,t):new ae(this.restClient,this.ENDPOINT)}metadata(t){return t!=null?new Ut(this.restClient,this.ENDPOINT,t):new Vt(this.restClient,this.ENDPOINT)}namedentities(t){return t!=null?new kt(this.restClient,this.ENDPOINT,t):new Ft(this.restClient,this.ENDPOINT)}objectproperties(){return new Gt(this.restClient,this.ENDPOINT)}regexes(t){return t!=null?new Xt(this.restClient,this.ENDPOINT,t):new Yt(this.restClient,this.ENDPOINT)}relations(t){return t!=null?new Wt(this.restClient,this.ENDPOINT,t):new $t(this.restClient,this.ENDPOINT)}rulefunctions(){return new zt(this.restClient,this.ENDPOINT)}rules(t){return t!=null?new qt(this.restClient,this.ENDPOINT,t):new jt(this.restClient,this.ENDPOINT)}stopwords(t){return t!=null?new Kt(this.restClient,this.ENDPOINT,t):new Qt(this.restClient,this.ENDPOINT)}synonyms(t){return t!=null?new Zt(this.restClient,this.ENDPOINT,t):new te(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 le=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var me=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 de=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 Ne=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/model";}ENDPOINT;datatypes(){return new wt(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new pe(this.restClient,this.ENDPOINT,t):new le(this.restClient,this.ENDPOINT)}extractortypes(){return new me(this.restClient,this.ENDPOINT)}metadatatypes(){return new de(this.restClient,this.ENDPOINT)}};var ce="/api/v3",he=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 p(this.parseServerUrl(t),e),ce)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new r(new p(this.parseServerUrl(t)),ce)}static loginWithCredentials(t,e,i,o){return t=this.parseServerUrl(t),new r(new p(t,void 0,e,i,o),ce)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=ye__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(ue=>ue.length!==0).map(ue=>ue.split("=")),o=this.getValueOfInPropertiesFile("serverUrl",i),a=this.getValueOfInPropertiesFile("clientId",i),Ee=this.getValueOfInPropertiesFile("clientSecret",i),fe=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(o,a,Ee,fe)}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 L(this.restClient,this.endpoint())}currentuser(){return new F(this.restClient,this.endpoint())}diff(){return new k(this.restClient,this.endpoint())}domains(t){return t!=null?new It(this.restClient,this.endpoint(),t):new Rt(this.restClient,this.endpoint())}info(){return new xt(this.restClient,this.endpoint())}languages(){return new vt(this.restClient,this.endpoint())}model(){return new Ne(this.restClient,this.endpoint())}};exports.AnswersEndpoint=d;exports.AttributeDatatypeEnumValues=Ce;exports.AttributeOverviewDatatypeEnumValues=Te;exports.BulkDomainsEndpoint=N;exports.BulkEndpoint=b;exports.BulkModelEndpoint=R;exports.BulkdomainsDocumentclassesEndpoint=x;exports.BulkdomainsDocumenttypesEndpoint=v;exports.BulkdomainsDomainEndpoint=S;exports.BulkdomainsReferencedocumentsEndpoint=w;exports.BulkdomainsReferencesEndpoint=M;exports.BulkmodelBoostwordsEndpoint=E;exports.BulkmodelClassEndpoint=c;exports.BulkmodelClassesEndpoint=h;exports.BulkmodelDatapropertiesEndpoint=y;exports.BulkmodelDomainEndpoint=g;exports.BulkmodelDomainsEndpoint=I;exports.BulkmodelInstancesEndpoint=f;exports.BulkmodelMetadataEndpoint=C;exports.BulkmodelNamedentitiesEndpoint=T;exports.BulkmodelRulesEndpoint=P;exports.BulkmodelStopwordsEndpoint=O;exports.BulkmodelSynonymsEndpoint=D;exports.BulkmodelclassInstancesEndpoint=u;exports.CelltypesEndpoint=A;exports.ChatEndpoint=_;exports.ChatsEndpoint=H;exports.ChildExtractorclassesEndpoint=B;exports.ClassBulkDatatypeEnumValues=Pe;exports.CloneEndpoint=J;exports.ConversionsEndpoint=L;exports.CurrentuserEndpoint=F;exports.DiffEndpoint=k;exports.DifferenceOperationEnumValues=Oe;exports.DocclassCustomfieldsEndpoint=G;exports.DocclassDocumentclassesEndpoint=U;exports.DocclassReferencedocumentsEndpoint=Y;exports.DocclassTagsEndpoint=X;exports.DocumentannotationsEndpoint=W;exports.DocumentclassEndpoint=$;exports.DocumentclassesEndpoint=z;exports.DocumentmodeEnumValues=De;exports.DocumentsEndpoint=j;exports.DocumenttypeEndpoint=K;exports.DocumenttypesEndpoint=Q;exports.DomainEndpoint=It;exports.DomainsEndpoint=Rt;exports.ErrorFieldCodeEnumValues=ge;exports.ExtractorAttributeDatatypeEnumValues=Ie;exports.ExtractorTypeEnumValues=Re;exports.FieldTypeEnumValues=xe;exports.ImageEndpoint=it;exports.ImagesEndpoint=ot;exports.InfoEndpoint=xt;exports.LanguagesEndpoint=vt;exports.MarkdownEndpoint=st;exports.MatcherTypeEnumValues=ve;exports.MediaType=n;exports.MessageRoleEnumValues=we;exports.ModeEnumValues=Me;exports.ModelAttributesEndpoint=Mt;exports.ModelBoostwordEndpoint=St;exports.ModelBoostwordsEndpoint=bt;exports.ModelDatapropertiesEndpoint=At;exports.ModelDatapropertyEndpoint=_t;exports.ModelDatatypesEndpoint=wt;exports.ModelDomainEndpoint=pe;exports.ModelDomainsEndpoint=le;exports.ModelEndpoint=Ne;exports.ModelExtractorclassEndpoint=Ht;exports.ModelExtractorclassesEndpoint=Bt;exports.ModelExtractorsEndpoint=Jt;exports.ModelExtractortypesEndpoint=me;exports.ModelFormattersEndpoint=Lt;exports.ModelMetadataEndpoint=Vt;exports.ModelMetadatatypesEndpoint=de;exports.ModelNamedentitiesEndpoint=Ft;exports.ModelNamedentityEndpoint=kt;exports.ModelObjectpropertiesEndpoint=Gt;exports.ModelOnemetadataEndpoint=Ut;exports.ModelRegexEndpoint=Xt;exports.ModelRegexesEndpoint=Yt;exports.ModelRelationEndpoint=Wt;exports.ModelRelationsEndpoint=$t;exports.ModelRuleEndpoint=qt;exports.ModelRulefunctionsEndpoint=zt;exports.ModelRulesEndpoint=jt;exports.ModelStopwordEndpoint=Kt;exports.ModelStopwordsEndpoint=Qt;exports.ModelSynonymEndpoint=Zt;exports.ModelSynonymsEndpoint=te;exports.ModelclassesEndpoint=Z;exports.ModelinstancesEndpoint=tt;exports.ModelontAttributeEndpoint=ee;exports.ModelontAttributesEndpoint=re;exports.ModelontClassEndpoint=ie;exports.ModelontClassesEndpoint=oe;exports.ModelontInstanceEndpoint=se;exports.ModelontInstancesEndpoint=ae;exports.ModelontclassInstancesEndpoint=ne;exports.NamedentitiesEndpoint=Nt;exports.ParagraphEndpoint=at;exports.ParagraphsEndpoint=pt;exports.PromptEndpoint=et;exports.PromptOverviewPromptLabelEnumValues=Se;exports.PromptPromptLabelEnumValues=be;exports.PromptValidationEndpoint=rt;exports.PromptsEndpoint=nt;exports.ReferencedocumentEndpoint=dt;exports.ReferencedocumentsEndpoint=ct;exports.ReferencedocumentsStreamEndpoint=Et;exports.ReferencesEndpoint=ht;exports.RestClient=p;exports.RestResponse=l;exports.RolesEndpoint=V;exports.RuleFunctionTypeEnumValues=Ae;exports.SemanthaAPI=he;exports.SentenceEndpoint=lt;exports.SentencesEndpoint=mt;exports.SettingsDefaultSimilarityModeEnumValues=_e;exports.SettingsEndpoint=yt;exports.SettingsExtractionStrategyEnumValues=He;exports.SettingsTaggingStrategyEnumValues=Be;exports.StatisticEndpoint=ut;exports.SummarizationsEndpoint=ft;exports.SummarylengthEnumValues=Je;exports.TagEndpoint=Tt;exports.TagReferencedocumentsEndpoint=Ct;exports.TagsEndpoint=Pt;exports.TexttypesEndpoint=Ot;exports.TranslationsEndpoint=Dt;exports.TreeEndpoint=q;exports.TypeEnumValues=Le;exports.ValidationEndpoint=gt;exports.isAttributeDatatypeEnumValue=Ve;exports.isAttributeOverviewDatatypeEnumValue=ke;exports.isClassBulkDatatypeEnumValue=Ue;exports.isDifferenceOperationEnumValue=Ye;exports.isDocumentmodeEnumValue=$e;exports.isErrorFieldCodeEnumValue=ze;exports.isExtractorAttributeDatatypeEnumValue=Ke;exports.isExtractorTypeEnumValue=Ze;exports.isFieldTypeEnumValue=er;exports.isMatcherTypeEnumValue=nr;exports.isMessageRoleEnumValue=or;exports.isModeEnumValue=ar;exports.isPromptOverviewPromptLabelEnumValue=lr;exports.isPromptPromptLabelEnumValue=dr;exports.isRuleFunctionTypeEnumValue=Er;exports.isSettingsDefaultSimilarityModeEnumValue=cr;exports.isSettingsExtractionStrategyEnumValue=yr;exports.isSettingsTaggingStrategyEnumValue=Cr;exports.isSummarylengthEnumValue=Pr;exports.isTypeEnumValue=Dr;//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|