knowmax-quest-types 2.15.1 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ICollection.d.ts +15 -0
- package/dist/ICollection.js +2 -0
- package/dist/ICollectionDocumentReference.d.ts +8 -0
- package/dist/ICollectionDocumentReference.js +2 -0
- package/dist/ICollectionNode.d.ts +44 -0
- package/dist/ICollectionNode.js +2 -0
- package/dist/ICoverInfo.d.ts +8 -0
- package/dist/ICoverInfo.js +2 -0
- package/dist/ICoverOptions.d.ts +10 -0
- package/dist/ICoverOptions.js +2 -0
- package/dist/IDataCompare.d.ts +9 -0
- package/dist/IDataCompare.js +2 -0
- package/dist/IDataCompareOptions.d.ts +10 -0
- package/dist/IDataCompareOptions.js +2 -0
- package/dist/IDataOptions.d.ts +11 -0
- package/dist/IDataOptions.js +2 -0
- package/dist/IDocument.d.ts +19 -0
- package/dist/IDocument.js +2 -0
- package/dist/IDocumentAlternative.d.ts +16 -0
- package/dist/IDocumentAlternative.js +2 -0
- package/dist/IDocumentAlternativeInfo.d.ts +9 -0
- package/dist/IDocumentAlternativeInfo.js +2 -0
- package/dist/IDocumentGroup.d.ts +13 -0
- package/dist/IDocumentGroup.js +2 -0
- package/dist/IDocumentNode.d.ts +22 -0
- package/dist/IDocumentNode.js +2 -0
- package/dist/IDocumentVersion.d.ts +38 -0
- package/dist/IDocumentVersion.js +2 -0
- package/dist/IDocumentWithVersionInfo.d.ts +6 -0
- package/dist/IDocumentWithVersionInfo.js +2 -0
- package/dist/IFavoriteInfo.d.ts +10 -0
- package/dist/IFavoriteInfo.js +2 -0
- package/dist/IImportLog.d.ts +13 -0
- package/dist/IImportLog.js +2 -0
- package/dist/IMetadata.d.ts +8 -0
- package/dist/IMetadata.js +2 -0
- package/dist/IMetadataForNodes.d.ts +10 -0
- package/dist/IMetadataForNodes.js +2 -0
- package/dist/IMetadataForQuestId.d.ts +6 -0
- package/dist/IMetadataForQuestId.js +2 -0
- package/dist/IMetadataValueSuggestion.d.ts +13 -0
- package/dist/IMetadataValueSuggestion.js +2 -0
- package/dist/IReference.d.ts +12 -0
- package/dist/IReference.js +2 -0
- package/dist/IReferenceInfo.d.ts +45 -0
- package/dist/IReferenceInfo.js +2 -0
- package/dist/IReferenceInfo.test.d.ts +1 -0
- package/dist/IReferenceInfo.test.js +48 -0
- package/dist/IReferenceInfoOptions.d.ts +26 -0
- package/dist/IReferenceInfoOptions.js +2 -0
- package/dist/IResource.d.ts +21 -0
- package/dist/IResource.js +2 -0
- package/dist/IVersionMapItem.d.ts +7 -0
- package/dist/IVersionMapItem.js +2 -0
- package/dist/IVersionMapOptions.d.ts +5 -0
- package/dist/IVersionMapOptions.js +2 -0
- package/dist/contenttypes.d.ts +4 -0
- package/dist/contenttypes.js +7 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +45 -0
- package/dist/licenseaccess.d.ts +3 -0
- package/dist/licenseaccess.js +6 -0
- package/dist/metadata.d.ts +7 -0
- package/dist/metadata.js +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IMetadata } from '.';
|
|
2
|
+
export interface ICollection {
|
|
3
|
+
id: number;
|
|
4
|
+
label: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
/** Optional quest id of document to which collection is associated. */
|
|
8
|
+
associatedQuestId?: string;
|
|
9
|
+
modified: string;
|
|
10
|
+
modifiedBy: string;
|
|
11
|
+
created: string;
|
|
12
|
+
createdBy: string;
|
|
13
|
+
/** Optional metadata associated with colection. */
|
|
14
|
+
metadata?: IMetadata[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ICollection } from ".";
|
|
2
|
+
export interface ICollectionDocumentReference {
|
|
3
|
+
collection: ICollection;
|
|
4
|
+
/** Describes version of document that is referenced from this collection. Null in case current version is referenced. */
|
|
5
|
+
version?: number;
|
|
6
|
+
/** Describes that document to which this collection document reference belongs is the actual version referenced. */
|
|
7
|
+
versionMatch: boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface ICollectionNode<T extends ICollectionNode<T> = ICollectionNode<any>> {
|
|
2
|
+
/** Numeric identification of node. */
|
|
3
|
+
id: number;
|
|
4
|
+
/** Id of collection to which node belongs. */
|
|
5
|
+
collectionId: number;
|
|
6
|
+
/** Id of parent node. */
|
|
7
|
+
parentId?: number;
|
|
8
|
+
sequence: number;
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
/** Optional reference to a Quest document (without version specification). */
|
|
12
|
+
documentQuestId?: string;
|
|
13
|
+
/** Resolved numeric id of referenced document. */
|
|
14
|
+
documentId?: number;
|
|
15
|
+
/** Explicitly specified version. If omited the current version is assumed. */
|
|
16
|
+
documentVersion?: number;
|
|
17
|
+
customValue?: string;
|
|
18
|
+
customLicenseId?: string;
|
|
19
|
+
created: string;
|
|
20
|
+
createdBy: string;
|
|
21
|
+
modified: string;
|
|
22
|
+
modifiedBy: string;
|
|
23
|
+
/** Indicates if child nodes are available for this node. */
|
|
24
|
+
hasChilds: boolean;
|
|
25
|
+
/** Title of referenced Quest document. Either title of specific document version of document. */
|
|
26
|
+
referencedTitle?: string;
|
|
27
|
+
/** Version of referenced Quest document. */
|
|
28
|
+
referencedVersion?: number;
|
|
29
|
+
/** Date of referenced Quest document. */
|
|
30
|
+
referencedDate?: string;
|
|
31
|
+
/** Indicates if referenced Quest document is valid. */
|
|
32
|
+
referenceValid?: boolean;
|
|
33
|
+
/** Indicates if referenced Quest document could be located exactly. */
|
|
34
|
+
referenceExact?: boolean;
|
|
35
|
+
/** Indicated if reference Quest document has a cover. */
|
|
36
|
+
referenceCover?: boolean;
|
|
37
|
+
/** License information for user calling method that returns this CollectionNodeInfoEx. Only applies to nodes with a valid document reference. Possible values: Unknown, Enabled, Disabled. */
|
|
38
|
+
license?: string;
|
|
39
|
+
/** Indicates if this node or any node in it's childs is enabled by license (and thus has a valid document reference). */
|
|
40
|
+
hasLicenseEnabled?: boolean;
|
|
41
|
+
/** Indicates if this node or any node in it's childs is disabled by license (and thus has a valid document reference). */
|
|
42
|
+
hasLicenseDisabled?: boolean;
|
|
43
|
+
child?: T[];
|
|
44
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ICoverInfo {
|
|
2
|
+
/** Document requested or document to which DocumentVersion requested belongs has cover image specified. */
|
|
3
|
+
documentAvailable: boolean;
|
|
4
|
+
documentMimeType?: string;
|
|
5
|
+
/** DocumentVersion requested has cover image specified. */
|
|
6
|
+
versionAvailable: boolean;
|
|
7
|
+
versionMimeType?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Options for getting cover. */
|
|
2
|
+
export interface ICoverOptions {
|
|
3
|
+
/** Return thumb instead of full image. Thumb will be of type JPG or SVG. Default true. */
|
|
4
|
+
thumb?: boolean;
|
|
5
|
+
/** If set to true only document version specific cover is returned. Otherwise allows to fall back to document specific image. Default false. */
|
|
6
|
+
versionSpecific?: boolean;
|
|
7
|
+
/** If set to true JSON reference info of requested document will be returned in case no cover image could be located.
|
|
8
|
+
* The reference info includes document meta info to allow the client to determine alternative image. Default false. */
|
|
9
|
+
softFail?: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IReferenceInfo } from '.';
|
|
2
|
+
export interface IDataCompare {
|
|
3
|
+
referenceInfo1: IReferenceInfo;
|
|
4
|
+
referenceInfo2: IReferenceInfo;
|
|
5
|
+
/** True if versions are different. */
|
|
6
|
+
changed: boolean;
|
|
7
|
+
/** Html string with comparison of both references. */
|
|
8
|
+
html: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Options for getting document data comparison. */
|
|
2
|
+
export interface IDataCompareOptions {
|
|
3
|
+
id2: string;
|
|
4
|
+
allowOffline?: boolean;
|
|
5
|
+
allowInvalid?: boolean;
|
|
6
|
+
compose?: boolean | string;
|
|
7
|
+
transform?: string;
|
|
8
|
+
linkManager?: boolean;
|
|
9
|
+
linkManagerMode?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Options for getting document data. */
|
|
2
|
+
export interface IDataOptions {
|
|
3
|
+
allowOffline?: boolean;
|
|
4
|
+
allowInvalid?: boolean;
|
|
5
|
+
compose?: boolean | string;
|
|
6
|
+
transform?: string;
|
|
7
|
+
linkManager?: boolean;
|
|
8
|
+
linkManagerMode?: string;
|
|
9
|
+
preview?: boolean | number;
|
|
10
|
+
previewImage?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface IDocument {
|
|
2
|
+
/** Internal identification. */
|
|
3
|
+
id: number;
|
|
4
|
+
/** Public Quest identification. */
|
|
5
|
+
questId: string;
|
|
6
|
+
/** Document title. */
|
|
7
|
+
title: string;
|
|
8
|
+
/** Explicit marking of document and all it's versions as archive. Not set in case Quest should infer this value. */
|
|
9
|
+
archive?: boolean;
|
|
10
|
+
/** Internal identification of optional document group to which this document belongs. */
|
|
11
|
+
documentGroupId?: number;
|
|
12
|
+
/** Quest identification of optional document group to which this document belongs. */
|
|
13
|
+
documentGroupQuestId?: string;
|
|
14
|
+
modified: string;
|
|
15
|
+
modifiedBy: string;
|
|
16
|
+
created: string;
|
|
17
|
+
createdBy: string;
|
|
18
|
+
}
|
|
19
|
+
export type IDocumentEditable = Pick<IDocument, 'questId' | 'title' | 'archive' | 'documentGroupId'>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IDocumentNode, IDocumentVersion } from ".";
|
|
2
|
+
export interface IDocumentAlternative {
|
|
3
|
+
id: number;
|
|
4
|
+
documentVersionId: number;
|
|
5
|
+
documentNodeId?: number;
|
|
6
|
+
label: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
mimeType: string;
|
|
10
|
+
modified: string;
|
|
11
|
+
modifiedBy: string;
|
|
12
|
+
created: string;
|
|
13
|
+
createdBy: string;
|
|
14
|
+
documentNode?: IDocumentNode;
|
|
15
|
+
documentVersion?: IDocumentVersion;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IDocumentGroup {
|
|
2
|
+
/** Internal identification. */
|
|
3
|
+
id: number;
|
|
4
|
+
/** Quest identification for document group. */
|
|
5
|
+
questId: string;
|
|
6
|
+
/** Document group title */
|
|
7
|
+
title?: string;
|
|
8
|
+
modified: string;
|
|
9
|
+
modifiedBy: string;
|
|
10
|
+
created: string;
|
|
11
|
+
createdBy: string;
|
|
12
|
+
}
|
|
13
|
+
export type IDocumentGroupEditable = Pick<IDocumentGroup, 'questId' | 'title'>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IMetadata } from ".";
|
|
2
|
+
export interface IDocumentNode<T extends IDocumentNode<T> = IDocumentNode<any>> {
|
|
3
|
+
/** Internal identification. */
|
|
4
|
+
id: number;
|
|
5
|
+
/** Public Quest identification. */
|
|
6
|
+
questId?: string;
|
|
7
|
+
/** Url to data for this node. */
|
|
8
|
+
url?: string;
|
|
9
|
+
/** Title for this document node. */
|
|
10
|
+
title?: string;
|
|
11
|
+
/** Describes Quest specific type for this document node. */
|
|
12
|
+
type: string;
|
|
13
|
+
/** True in case this document node is composable. Composable nodes can optionally be included in their parents data contents. */
|
|
14
|
+
composable: boolean;
|
|
15
|
+
/** Describes MIME type for data associated with this document node. */
|
|
16
|
+
mimeType?: string;
|
|
17
|
+
/** Describes ordinal sequence within other document nodes at same level. */
|
|
18
|
+
sequence: number;
|
|
19
|
+
/** Describes metadata for this document node. */
|
|
20
|
+
metadata?: IMetadata[];
|
|
21
|
+
child?: T[];
|
|
22
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface IDocumentVersion {
|
|
2
|
+
/** Internal identification. */
|
|
3
|
+
id: number;
|
|
4
|
+
/** Version number of this document version. */
|
|
5
|
+
version: number;
|
|
6
|
+
/** Url to data for this document version. */
|
|
7
|
+
url: string;
|
|
8
|
+
/** Title for this specific document version in case it differs from title for document to which this version belongs. */
|
|
9
|
+
title?: string;
|
|
10
|
+
/** Date time for this document version. */
|
|
11
|
+
date: string;
|
|
12
|
+
/** Reflects inferred current version setting. It's either true because it was explicitly set as current document or
|
|
13
|
+
* because it was inferred because this document is the latest online version for a document without expliciet document version marked as current.
|
|
14
|
+
*/
|
|
15
|
+
current: boolean;
|
|
16
|
+
/** Reflects inferred value indiciating whether this version is considered archive. It's true in case document to which version belongs
|
|
17
|
+
* was explicitly marked archive or in case this version is older than current version for this document.
|
|
18
|
+
*/
|
|
19
|
+
archive?: boolean;
|
|
20
|
+
/** Description as set for this document version. */
|
|
21
|
+
description?: string;
|
|
22
|
+
/** Quest importer responsible for importing this document version. */
|
|
23
|
+
importerId: string;
|
|
24
|
+
/** Describes if this document version contains any document nodes. */
|
|
25
|
+
hasNodes: boolean;
|
|
26
|
+
/** True in case document version is valid. */
|
|
27
|
+
valid: boolean;
|
|
28
|
+
/** True in case document version is online. */
|
|
29
|
+
online: boolean;
|
|
30
|
+
/** Origin identification as set during data import. Custom field to describe origin of data import. */
|
|
31
|
+
originId?: string;
|
|
32
|
+
modified: string;
|
|
33
|
+
modifiedBy: string;
|
|
34
|
+
created: string;
|
|
35
|
+
createdBy: string;
|
|
36
|
+
resourceCount: number;
|
|
37
|
+
messageCount: number;
|
|
38
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface IFavoriteInfo {
|
|
2
|
+
/** Reference is a direct favorite. */
|
|
3
|
+
exact: boolean;
|
|
4
|
+
/** Document is direct favorite or user has a favorite in document. */
|
|
5
|
+
document: boolean;
|
|
6
|
+
/** DocumentVersion is direct favorite or user has favorite in documentVersion. */
|
|
7
|
+
documentVersion: boolean;
|
|
8
|
+
/** DocumentNode is direct favorite. Must be an exact match. */
|
|
9
|
+
documentNode: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IDocumentNode, IDocumentVersion } from ".";
|
|
2
|
+
export interface IImportlog {
|
|
3
|
+
id: number;
|
|
4
|
+
documentVersionId: number;
|
|
5
|
+
documentNodeId?: number;
|
|
6
|
+
type: string;
|
|
7
|
+
subject: string;
|
|
8
|
+
message: string;
|
|
9
|
+
details: string;
|
|
10
|
+
created: string;
|
|
11
|
+
documentNode?: IDocumentNode;
|
|
12
|
+
documentVersion?: IDocumentVersion;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IMetadataForQuestId } from ".";
|
|
2
|
+
/** Metadata for a collection of nodes within a document version. */
|
|
3
|
+
export interface IMetadataForNodes {
|
|
4
|
+
/** Identification of document to which these nodes belong. Without version specification. */
|
|
5
|
+
questId: string;
|
|
6
|
+
/** Version number of document version to which these nodes belong. */
|
|
7
|
+
version: number;
|
|
8
|
+
/** All hierarchically child nodes of document node specified by questId. */
|
|
9
|
+
nodes: IMetadataForQuestId[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Single result from /api/metadatavalue/suggest endpoint. */
|
|
2
|
+
export interface IMetadataValueSuggestion {
|
|
3
|
+
/** Identification of metadata when requesting suggestions. Usually in format familylabel.label */
|
|
4
|
+
metadataDefinition: string;
|
|
5
|
+
/** Suggested values for metadata. */
|
|
6
|
+
values: IMetadataValueSuggestionItem[];
|
|
7
|
+
}
|
|
8
|
+
export interface IMetadataValueSuggestionItem {
|
|
9
|
+
/** Actual value. */
|
|
10
|
+
value: string;
|
|
11
|
+
/** Value with marking of query. */
|
|
12
|
+
highlightedValue: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IDocumentNode, IDocumentVersion } from ".";
|
|
2
|
+
export interface IReference {
|
|
3
|
+
id: number;
|
|
4
|
+
documentVersionId: number;
|
|
5
|
+
documentNodeId?: number;
|
|
6
|
+
type: string;
|
|
7
|
+
value: string;
|
|
8
|
+
domain: string;
|
|
9
|
+
count: number;
|
|
10
|
+
documentNode?: IDocumentNode;
|
|
11
|
+
documentVersion?: IDocumentVersion;
|
|
12
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IDocument, IDocumentVersion, IDocumentNode, IMetadata, IFavoriteInfo, ICollectionDocumentReference, ICoverInfo, IResource, IDocumentAlternativeInfo } from '.';
|
|
2
|
+
export interface IReferenceInfo<T extends IDocumentNode<T> = IDocumentNode<any>> {
|
|
3
|
+
/** Originally requested Quest id. */
|
|
4
|
+
requestedQuestId: string;
|
|
5
|
+
/** Quest id after parsing. */
|
|
6
|
+
parsedQuestId: string;
|
|
7
|
+
/** Contains last part of Quest id in case reference was partly located but last part could not be located. */
|
|
8
|
+
questIdLeftover?: string;
|
|
9
|
+
/** Contains located reference. In case a version was specified, it includes explicit version number. */
|
|
10
|
+
questId: string;
|
|
11
|
+
/** True if requested item was exactly located. */
|
|
12
|
+
located: boolean;
|
|
13
|
+
/** Contains type of reference located. */
|
|
14
|
+
type: string;
|
|
15
|
+
/** Set in case of error while resolving reference. Possible values: InvalidInput, InvalidIdentification, DocumentNotFound, DocumentVersionNotFound, DocumentNodeNotFound, DocumentAlternativeNotFound. */
|
|
16
|
+
error?: string;
|
|
17
|
+
/** Document referenced by Quest id. */
|
|
18
|
+
document?: IDocument;
|
|
19
|
+
/** Document version referenced by Quest id (if any). */
|
|
20
|
+
documentVersion?: IDocumentVersion;
|
|
21
|
+
/** Document node referenced by Quest id (if any). */
|
|
22
|
+
documentNode?: T;
|
|
23
|
+
/** Resource referenced by Quest id (if any). */
|
|
24
|
+
resource?: IResource;
|
|
25
|
+
/** Info about document alternative referenced by Quest id (if any). */
|
|
26
|
+
documentAlternative?: IDocumentAlternativeInfo;
|
|
27
|
+
/** Metadata that belongs to Quest id (if requested). */
|
|
28
|
+
metadata: IMetadata[];
|
|
29
|
+
/** Collections in which document referenced by Quest id occurs (if requested). */
|
|
30
|
+
collections: ICollectionDocumentReference[];
|
|
31
|
+
/** List of info about document alternatives referenced by Quest id (if requested). */
|
|
32
|
+
documentAlternativesInfo?: IDocumentAlternativeInfo[];
|
|
33
|
+
/** Information about cover image for document and/or documentversion specified by Quest id (if requested). */
|
|
34
|
+
coverInfo?: ICoverInfo;
|
|
35
|
+
/** Set for user calling this method. Only for users authenticated by Knowmax License System. Possible values: Unknown, Enabled, Disabled */
|
|
36
|
+
licenseItemAccess?: string;
|
|
37
|
+
/** Security labels for document. Only for users authenticated by Knowmax License System. */
|
|
38
|
+
securityLabels?: string[];
|
|
39
|
+
/** Set for user calling this method. Only for users with a custom identity in an associated application. */
|
|
40
|
+
favoriteInfo?: IFavoriteInfo;
|
|
41
|
+
/** Key for this document version in search index. */
|
|
42
|
+
documentVersionIndexKey?: string;
|
|
43
|
+
/** Key for this document node in search index. */
|
|
44
|
+
documentNodeIndexKey?: string;
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const chai_1 = require("chai");
|
|
4
|
+
it('IReference works without generic', () => {
|
|
5
|
+
const info = {
|
|
6
|
+
requestedQuestId: '',
|
|
7
|
+
parsedQuestId: '',
|
|
8
|
+
questId: '',
|
|
9
|
+
located: true,
|
|
10
|
+
type: '',
|
|
11
|
+
document: {
|
|
12
|
+
created: '',
|
|
13
|
+
createdBy: '',
|
|
14
|
+
id: 0,
|
|
15
|
+
questId: '',
|
|
16
|
+
title: '',
|
|
17
|
+
modified: '',
|
|
18
|
+
modifiedBy: ''
|
|
19
|
+
},
|
|
20
|
+
documentVersion: {
|
|
21
|
+
modifiedBy: '',
|
|
22
|
+
online: true,
|
|
23
|
+
modified: '',
|
|
24
|
+
createdBy: '',
|
|
25
|
+
created: '',
|
|
26
|
+
current: true,
|
|
27
|
+
id: 0,
|
|
28
|
+
date: '',
|
|
29
|
+
hasNodes: false,
|
|
30
|
+
importerId: '',
|
|
31
|
+
messageCount: 0,
|
|
32
|
+
originId: '',
|
|
33
|
+
resourceCount: 0,
|
|
34
|
+
url: '',
|
|
35
|
+
valid: true,
|
|
36
|
+
version: 1
|
|
37
|
+
},
|
|
38
|
+
documentNode: {
|
|
39
|
+
id: 0,
|
|
40
|
+
type: '',
|
|
41
|
+
composable: false,
|
|
42
|
+
sequence: 0
|
|
43
|
+
},
|
|
44
|
+
metadata: [],
|
|
45
|
+
collections: [],
|
|
46
|
+
};
|
|
47
|
+
chai_1.assert.isDefined(info);
|
|
48
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface IReferenceInfoOptions {
|
|
2
|
+
/** Get information for documents marked offline. Specific version required. */
|
|
3
|
+
allowOffline?: boolean;
|
|
4
|
+
/** Get information for documents marked invalid. Specific version required. */
|
|
5
|
+
allowInvalid?: boolean;
|
|
6
|
+
/** Include information about requested version. */
|
|
7
|
+
includeDocumentVersion?: boolean;
|
|
8
|
+
/** Include information about requested resource. */
|
|
9
|
+
includeResource?: boolean;
|
|
10
|
+
/** Include information about requested document node. */
|
|
11
|
+
includeDocumentNode?: boolean;
|
|
12
|
+
/** Include information about requested document alternative. */
|
|
13
|
+
includeDocumentAlternative?: boolean;
|
|
14
|
+
/** Include metadata. */
|
|
15
|
+
includeMetadata?: boolean;
|
|
16
|
+
/** Include collections in which document exists. */
|
|
17
|
+
includeCollections?: boolean;
|
|
18
|
+
/** Include availability information about cover image. */
|
|
19
|
+
includeCoverInfo?: boolean;
|
|
20
|
+
/** Include archive status of document version. Make sure to set includeDocumentVersion to true if archive value is required. */
|
|
21
|
+
includeDocumentVersionArchive?: boolean;
|
|
22
|
+
/** Include information about available document alternatives at level of reference (either documentversion of documentnode). */
|
|
23
|
+
includeDocumentAlternativesInfo?: boolean;
|
|
24
|
+
/** Include information about optional document group to which document referenced belongs. */
|
|
25
|
+
includeDocumentGroup?: boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IDocumentVersion } from ".";
|
|
2
|
+
export interface IResource {
|
|
3
|
+
/** Internal identification. */
|
|
4
|
+
id: number;
|
|
5
|
+
/** Internal id of document version to which resource belongs. */
|
|
6
|
+
documentVersionId: number;
|
|
7
|
+
/** Name of resource. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Url to data for this resource. */
|
|
10
|
+
url: string;
|
|
11
|
+
/** Title of this resource. */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Size in bytes of this resource. */
|
|
14
|
+
size: number;
|
|
15
|
+
/** MIME type which describes data associated with this resource. */
|
|
16
|
+
mimeType: string;
|
|
17
|
+
/** Optional group identification to which resource belongs. */
|
|
18
|
+
group?: string;
|
|
19
|
+
/** Document version info. If requested. */
|
|
20
|
+
documentVersion?: IDocumentVersion;
|
|
21
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONTENTTYPE_SVG = exports.CONTENTTYPE_JSON = exports.CONTENTTYPE_XML = exports.CONTENTTYPE_PDF = void 0;
|
|
4
|
+
exports.CONTENTTYPE_PDF = 'application/pdf';
|
|
5
|
+
exports.CONTENTTYPE_XML = 'application/xml';
|
|
6
|
+
exports.CONTENTTYPE_JSON = 'application/json';
|
|
7
|
+
exports.CONTENTTYPE_SVG = 'image/svg+xml';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from './contenttypes';
|
|
2
|
+
export * from './licenseaccess';
|
|
3
|
+
export * from './ICollectionNode';
|
|
4
|
+
export * from './IDataOptions';
|
|
5
|
+
export * from './IDataCompareOptions';
|
|
6
|
+
export * from './IDataCompare';
|
|
7
|
+
export * from './IDocument';
|
|
8
|
+
export * from './IDocumentWithVersionInfo';
|
|
9
|
+
export * from './IDocumentNode';
|
|
10
|
+
export * from './IDocumentVersion';
|
|
11
|
+
export * from './IFavoriteInfo';
|
|
12
|
+
export * from './IMetadata';
|
|
13
|
+
export * from './IReferenceInfo';
|
|
14
|
+
export * from './IReferenceInfoOptions';
|
|
15
|
+
export * from './IVersionMapOptions';
|
|
16
|
+
export * from './IVersionMapItem';
|
|
17
|
+
export * from './ICoverOptions';
|
|
18
|
+
export * from './ICollectionDocumentReference';
|
|
19
|
+
export * from './ICollection';
|
|
20
|
+
export * from './ICoverInfo';
|
|
21
|
+
export * from './IResource';
|
|
22
|
+
export * from './IImportLog';
|
|
23
|
+
export * from './IReference';
|
|
24
|
+
export * from './IDocumentAlternative';
|
|
25
|
+
export * from './IMetadataForNodes';
|
|
26
|
+
export * from './IMetadataForQuestId';
|
|
27
|
+
export * from './IMetadataValueSuggestion';
|
|
28
|
+
export * from './IDocumentAlternativeInfo';
|
|
29
|
+
export * from './metadata';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./contenttypes"), exports);
|
|
18
|
+
__exportStar(require("./licenseaccess"), exports);
|
|
19
|
+
__exportStar(require("./ICollectionNode"), exports);
|
|
20
|
+
__exportStar(require("./IDataOptions"), exports);
|
|
21
|
+
__exportStar(require("./IDataCompareOptions"), exports);
|
|
22
|
+
__exportStar(require("./IDataCompare"), exports);
|
|
23
|
+
__exportStar(require("./IDocument"), exports);
|
|
24
|
+
__exportStar(require("./IDocumentWithVersionInfo"), exports);
|
|
25
|
+
__exportStar(require("./IDocumentNode"), exports);
|
|
26
|
+
__exportStar(require("./IDocumentVersion"), exports);
|
|
27
|
+
__exportStar(require("./IFavoriteInfo"), exports);
|
|
28
|
+
__exportStar(require("./IMetadata"), exports);
|
|
29
|
+
__exportStar(require("./IReferenceInfo"), exports);
|
|
30
|
+
__exportStar(require("./IReferenceInfoOptions"), exports);
|
|
31
|
+
__exportStar(require("./IVersionMapOptions"), exports);
|
|
32
|
+
__exportStar(require("./IVersionMapItem"), exports);
|
|
33
|
+
__exportStar(require("./ICoverOptions"), exports);
|
|
34
|
+
__exportStar(require("./ICollectionDocumentReference"), exports);
|
|
35
|
+
__exportStar(require("./ICollection"), exports);
|
|
36
|
+
__exportStar(require("./ICoverInfo"), exports);
|
|
37
|
+
__exportStar(require("./IResource"), exports);
|
|
38
|
+
__exportStar(require("./IImportLog"), exports);
|
|
39
|
+
__exportStar(require("./IReference"), exports);
|
|
40
|
+
__exportStar(require("./IDocumentAlternative"), exports);
|
|
41
|
+
__exportStar(require("./IMetadataForNodes"), exports);
|
|
42
|
+
__exportStar(require("./IMetadataForQuestId"), exports);
|
|
43
|
+
__exportStar(require("./IMetadataValueSuggestion"), exports);
|
|
44
|
+
__exportStar(require("./IDocumentAlternativeInfo"), exports);
|
|
45
|
+
__exportStar(require("./metadata"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LICENSEACCESS_UNKNOWN = exports.LICENSEACCESS_DISABLED = exports.LICENSEACCESS_ENABLED = void 0;
|
|
4
|
+
exports.LICENSEACCESS_ENABLED = 'Enabled';
|
|
5
|
+
exports.LICENSEACCESS_DISABLED = 'Disabled';
|
|
6
|
+
exports.LICENSEACCESS_UNKNOWN = 'Unknown';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const METADATAORIGIN_DOCUMENT = "Document";
|
|
2
|
+
export declare const METADATAORIGIN_DOCUMENTVERSION = "DocumentVersion";
|
|
3
|
+
export declare const METADATAORIGIN_DOCUMENTNODE = "DocumentNode";
|
|
4
|
+
export declare const METADATAORIGIN_COLLECTION = "Collection";
|
|
5
|
+
export declare const METADATAORIGIN_DYNAMIC = "Dynamic";
|
|
6
|
+
export declare const METADATAORIGIN_DYNAMICINDEXABLE = "DynamicIndexable";
|
|
7
|
+
export type MetadataOrigin = typeof METADATAORIGIN_DOCUMENT | typeof METADATAORIGIN_DOCUMENTVERSION | typeof METADATAORIGIN_DOCUMENTNODE | typeof METADATAORIGIN_COLLECTION | typeof METADATAORIGIN_DYNAMIC | typeof METADATAORIGIN_DYNAMICINDEXABLE;
|
package/dist/metadata.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.METADATAORIGIN_DYNAMICINDEXABLE = exports.METADATAORIGIN_DYNAMIC = exports.METADATAORIGIN_COLLECTION = exports.METADATAORIGIN_DOCUMENTNODE = exports.METADATAORIGIN_DOCUMENTVERSION = exports.METADATAORIGIN_DOCUMENT = void 0;
|
|
4
|
+
exports.METADATAORIGIN_DOCUMENT = 'Document';
|
|
5
|
+
exports.METADATAORIGIN_DOCUMENTVERSION = 'DocumentVersion';
|
|
6
|
+
exports.METADATAORIGIN_DOCUMENTNODE = 'DocumentNode';
|
|
7
|
+
exports.METADATAORIGIN_COLLECTION = 'Collection';
|
|
8
|
+
exports.METADATAORIGIN_DYNAMIC = 'Dynamic';
|
|
9
|
+
exports.METADATAORIGIN_DYNAMICINDEXABLE = 'DynamicIndexable';
|