@imbricate/core 3.16.0 → 3.17.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.
@@ -7,11 +7,11 @@ import { DocumentAnnotations, ImbricateDocumentAuditOptions } from "../definitio
7
7
  import { IMBRICATE_DOCUMENT_FEATURE } from "../feature";
8
8
  import { IImbricateDocument } from "../interface";
9
9
  import { ImbricateDocumentPutPropertyOutcome } from "../outcome";
10
- import { DocumentProperties, DocumentPropertyKey, DocumentPropertyValue, IMBRICATE_PROPERTY_TYPE } from "../property";
10
+ import { DocumentProperties } from "../property";
11
11
  import { ImbricateDocumentEssentialBase } from "./essential";
12
12
  export declare abstract class ImbricateDocumentEssentialReadonlyBase extends ImbricateDocumentEssentialBase implements IImbricateDocument {
13
13
  readonly annotations: DocumentAnnotations;
14
14
  readonly supportedFeatures: IMBRICATE_DOCUMENT_FEATURE[];
15
- putProperty(_key: DocumentPropertyKey, _value: DocumentPropertyValue<IMBRICATE_PROPERTY_TYPE>, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
16
- putProperties(_properties: DocumentProperties, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
15
+ mergeProperty(_properties: DocumentProperties, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
16
+ replaceProperties(_properties: DocumentProperties, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
17
17
  }
@@ -15,10 +15,10 @@ class ImbricateDocumentEssentialReadonlyBase extends essential_1.ImbricateDocume
15
15
  this.annotations = {};
16
16
  this.supportedFeatures = [];
17
17
  }
18
- putProperty(_key, _value, _auditOptions) {
18
+ mergeProperty(_properties, _auditOptions) {
19
19
  throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_PROPERTY);
20
20
  }
21
- putProperties(_properties, _auditOptions) {
21
+ replaceProperties(_properties, _auditOptions) {
22
22
  throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_PROPERTY);
23
23
  }
24
24
  }
@@ -7,12 +7,12 @@ import { DocumentAnnotationValue, DocumentEditRecord, ImbricateDocumentAuditOpti
7
7
  import { IMBRICATE_DOCUMENT_FEATURE } from "../feature";
8
8
  import { IImbricateDocument } from "../interface";
9
9
  import { ImbricateDocumentAddEditRecordsOutcome, ImbricateDocumentDeleteAnnotationOutcome, ImbricateDocumentPutAnnotationOutcome, ImbricateDocumentPutPropertyOutcome } from "../outcome";
10
- import { DocumentProperties, DocumentPropertyKey, DocumentPropertyValue, IMBRICATE_PROPERTY_TYPE } from "../property";
10
+ import { DocumentProperties } from "../property";
11
11
  import { ImbricateDocumentFullFeatureBase } from "./full-feature";
12
12
  export declare abstract class ImbricateDocumentFullFeatureReadonlyBase extends ImbricateDocumentFullFeatureBase implements IImbricateDocument {
13
13
  readonly supportedFeatures: IMBRICATE_DOCUMENT_FEATURE[];
14
- putProperty(_key: DocumentPropertyKey, _value: DocumentPropertyValue<IMBRICATE_PROPERTY_TYPE>, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
15
- putProperties(_properties: DocumentProperties, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
14
+ mergeProperties(_properties: DocumentProperties, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
15
+ replaceProperties(_properties: DocumentProperties, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
16
16
  putAnnotation(_namespace: string, _identifier: string, _value: DocumentAnnotationValue, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutAnnotationOutcome>;
17
17
  deleteAnnotation(_namespace: string, _identifier: string, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentDeleteAnnotationOutcome>;
18
18
  addEditRecords(_records: DocumentEditRecord[]): Promise<ImbricateDocumentAddEditRecordsOutcome>;
@@ -16,10 +16,10 @@ class ImbricateDocumentFullFeatureReadonlyBase extends full_feature_1.ImbricateD
16
16
  feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_GET_EDIT_RECORD,
17
17
  ];
18
18
  }
19
- putProperty(_key, _value, _auditOptions) {
19
+ mergeProperties(_properties, _auditOptions) {
20
20
  throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_PROPERTY);
21
21
  }
22
- putProperties(_properties, _auditOptions) {
22
+ replaceProperties(_properties, _auditOptions) {
23
23
  throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_PROPERTY);
24
24
  }
25
25
  putAnnotation(_namespace, _identifier, _value, _auditOptions) {
@@ -7,15 +7,15 @@ import { DocumentAnnotationValue, DocumentAnnotations, DocumentEditRecord, Imbri
7
7
  import { IMBRICATE_DOCUMENT_FEATURE } from "../feature";
8
8
  import { IImbricateDocument } from "../interface";
9
9
  import { ImbricateDocumentAddEditRecordsOutcome, ImbricateDocumentDeleteAnnotationOutcome, ImbricateDocumentGetEditRecordsOutcome, ImbricateDocumentPutAnnotationOutcome, ImbricateDocumentPutPropertyOutcome } from "../outcome";
10
- import { DocumentProperties, DocumentPropertyKey, DocumentPropertyValue, IMBRICATE_PROPERTY_TYPE } from "../property";
10
+ import { DocumentProperties } from "../property";
11
11
  export declare abstract class ImbricateDocumentFullFeatureBase implements IImbricateDocument {
12
12
  abstract readonly uniqueIdentifier: string;
13
13
  abstract readonly documentVersion: string;
14
14
  abstract readonly properties: DocumentProperties;
15
15
  abstract readonly annotations: DocumentAnnotations;
16
16
  readonly supportedFeatures: IMBRICATE_DOCUMENT_FEATURE[];
17
- abstract putProperty(key: DocumentPropertyKey, value: DocumentPropertyValue<IMBRICATE_PROPERTY_TYPE>, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
18
- abstract putProperties(properties: DocumentProperties, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
17
+ abstract mergeProperties(properties: DocumentProperties, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
18
+ abstract replaceProperties(properties: DocumentProperties, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
19
19
  abstract putAnnotation(namespace: string, identifier: string, value: DocumentAnnotationValue, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutAnnotationOutcome>;
20
20
  abstract deleteAnnotation(namespace: string, identifier: string, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentDeleteAnnotationOutcome>;
21
21
  abstract addEditRecords(records: DocumentEditRecord[]): Promise<ImbricateDocumentAddEditRecordsOutcome>;
@@ -6,7 +6,7 @@
6
6
  import { DocumentAnnotationValue, DocumentAnnotations, DocumentEditRecord, ImbricateDocumentAuditOptions } from "./definition";
7
7
  import { IMBRICATE_DOCUMENT_FEATURE } from "./feature";
8
8
  import { ImbricateDocumentAddEditRecordsOutcome, ImbricateDocumentDeleteAnnotationOutcome, ImbricateDocumentGetEditRecordsOutcome, ImbricateDocumentPutAnnotationOutcome, ImbricateDocumentPutPropertyOutcome } from "./outcome";
9
- import { DocumentProperties, DocumentPropertyKey, DocumentPropertyValue, IMBRICATE_PROPERTY_TYPE } from "./property";
9
+ import { DocumentProperties } from "./property";
10
10
  export interface IImbricateDocument {
11
11
  /**
12
12
  * Unique identifier of the database
@@ -29,20 +29,19 @@ export interface IImbricateDocument {
29
29
  */
30
30
  readonly supportedFeatures: IMBRICATE_DOCUMENT_FEATURE[];
31
31
  /**
32
- * Update a property from the document
32
+ * Merge a property to the document
33
33
  *
34
34
  * RequireFeature: DOCUMENT_PUT_PROPERTY
35
35
  *
36
- * @param key key of the property
37
- * @param value value of the property
36
+ * @param properties properties of the document
38
37
  * @param auditOptions audit options of the document
39
38
  *
40
39
  * @returns a promise of the outcome of the put property
41
40
  * Symbol: S_Document_PutProperty_InvalidKey - if the key is invalid
42
41
  */
43
- putProperty(key: DocumentPropertyKey, value: DocumentPropertyValue<IMBRICATE_PROPERTY_TYPE>, auditOptions?: ImbricateDocumentAuditOptions): PromiseLike<ImbricateDocumentPutPropertyOutcome>;
42
+ mergeProperties(properties: DocumentProperties, auditOptions?: ImbricateDocumentAuditOptions): PromiseLike<ImbricateDocumentPutPropertyOutcome>;
44
43
  /**
45
- * Put and replace all properties of the document, optional
44
+ * Replace all properties of the document
46
45
  *
47
46
  * RequireFeature: DOCUMENT_PUT_PROPERTIES
48
47
  *
@@ -52,7 +51,7 @@ export interface IImbricateDocument {
52
51
  * @returns a promise of the outcome of the put properties
53
52
  * Symbol: S_Document_PutProperty_InvalidKey - if the key is invalid
54
53
  */
55
- putProperties(properties: DocumentProperties, auditOptions?: ImbricateDocumentAuditOptions): PromiseLike<ImbricateDocumentPutPropertyOutcome>;
54
+ replaceProperties(properties: DocumentProperties, auditOptions?: ImbricateDocumentAuditOptions): PromiseLike<ImbricateDocumentPutPropertyOutcome>;
56
55
  /**
57
56
  * Put annotation to the document, optional
58
57
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imbricate/core",
3
3
  "main": "index.js",
4
- "version": "3.16.0",
4
+ "version": "3.17.0",
5
5
  "description": "Imbricate Core, Notebook for Engineers",
6
6
  "repository": {
7
7
  "type": "git",