@imbricate/core 3.20.1 → 3.24.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.
@@ -3,7 +3,7 @@
3
3
  * @namespace Database
4
4
  * @description Essential Readonly
5
5
  */
6
- import { ImbricatePropertyRecord } from "../../property/map";
6
+ import { ImbricatePropertyRecordDrafter } from "../../property/map";
7
7
  import { ImbricateDatabaseAuditOptions } from "../definition";
8
8
  import { IMBRICATE_DATABASE_FEATURE } from "../feature";
9
9
  import { IImbricateDatabase } from "../interface";
@@ -13,6 +13,6 @@ import { ImbricateDatabaseEssentialBase } from "./essential";
13
13
  export declare abstract class ImbricateDatabaseEssentialReadOnlyBase extends ImbricateDatabaseEssentialBase implements IImbricateDatabase {
14
14
  readonly supportedFeatures: IMBRICATE_DATABASE_FEATURE[];
15
15
  putSchema(_schema: ImbricateDatabaseSchema, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutSchemaOutcome>;
16
- createDocument(_properties: ImbricatePropertyRecord, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
16
+ createDocument(_propertiesDrafter: ImbricatePropertyRecordDrafter, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
17
17
  removeDocument(_uniqueIdentifier: string, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseRemoveDocumentOutcome>;
18
18
  }
@@ -19,7 +19,7 @@ class ImbricateDatabaseEssentialReadOnlyBase extends essential_1.ImbricateDataba
19
19
  putSchema(_schema, _auditOptions) {
20
20
  throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_SCHEMA);
21
21
  }
22
- createDocument(_properties, _auditOptions) {
22
+ createDocument(_propertiesDrafter, _auditOptions) {
23
23
  throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_CREATE_DOCUMENT);
24
24
  }
25
25
  removeDocument(_uniqueIdentifier, _auditOptions) {
@@ -3,7 +3,7 @@
3
3
  * @namespace Database_BaseClass
4
4
  * @description Full Feature Readonly
5
5
  */
6
- import { ImbricatePropertyRecord } from "../../property/map";
6
+ import { ImbricatePropertyRecordDrafter } from "../../property/map";
7
7
  import { DatabaseAnnotationValue, DatabaseEditRecord, ImbricateDatabaseAuditOptions } from "../definition";
8
8
  import { IMBRICATE_DATABASE_FEATURE } from "../feature";
9
9
  import { IImbricateDatabase } from "../interface";
@@ -13,7 +13,7 @@ import { ImbricateDatabaseFullFeatureBase } from "./full-feature";
13
13
  export declare abstract class ImbricateDatabaseFullFeatureReadOnlyBase extends ImbricateDatabaseFullFeatureBase implements IImbricateDatabase {
14
14
  readonly supportedFeatures: IMBRICATE_DATABASE_FEATURE[];
15
15
  putSchema(_schema: ImbricateDatabaseSchema, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutSchemaOutcome>;
16
- createDocument(_properties: ImbricatePropertyRecord, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
16
+ createDocument(_propertiesDrafter: ImbricatePropertyRecordDrafter, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
17
17
  removeDocument(_uniqueIdentifier: string, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseRemoveDocumentOutcome>;
18
18
  putAnnotation(_namespace: string, _identifier: string, _value: DatabaseAnnotationValue, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutAnnotationOutcome>;
19
19
  deleteAnnotation(_namespace: string, _identifier: string, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseDeleteAnnotationOutcome>;
@@ -20,7 +20,7 @@ class ImbricateDatabaseFullFeatureReadOnlyBase extends full_feature_1.ImbricateD
20
20
  putSchema(_schema, _auditOptions) {
21
21
  throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_SCHEMA);
22
22
  }
23
- createDocument(_properties, _auditOptions) {
23
+ createDocument(_propertiesDrafter, _auditOptions) {
24
24
  throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_CREATE_DOCUMENT);
25
25
  }
26
26
  removeDocument(_uniqueIdentifier, _auditOptions) {
@@ -4,7 +4,7 @@
4
4
  * @description Full Feature With Action
5
5
  */
6
6
  import { ImbricateCommonQueryOriginActionsOutcome, ImbricateCommonQueryOriginActionsQuery, ImbricateOriginActionInput, ImbricateOriginActionOutcome } from "../../common/action";
7
- import { ImbricatePropertyRecord } from "../../property/map";
7
+ import { ImbricatePropertyRecordDrafter } from "../../property/map";
8
8
  import { DatabaseAnnotationValue, DatabaseAnnotations, DatabaseEditRecord, ImbricateDatabaseAuditOptions, ImbricateDocumentQuery } from "../definition";
9
9
  import { IMBRICATE_DATABASE_FEATURE } from "../feature";
10
10
  import { IImbricateDatabase } from "../interface";
@@ -18,7 +18,7 @@ export declare abstract class ImbricateDatabaseFullFeatureWithActionBase impleme
18
18
  abstract readonly annotations: DatabaseAnnotations;
19
19
  readonly supportedFeatures: IMBRICATE_DATABASE_FEATURE[];
20
20
  abstract putSchema(schema: ImbricateDatabaseSchema, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutSchemaOutcome>;
21
- abstract createDocument(properties: ImbricatePropertyRecord, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
21
+ abstract createDocument(propertiesDrafter: ImbricatePropertyRecordDrafter, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
22
22
  abstract getDocument(uniqueIdentifier: string): PromiseLike<ImbricateDatabaseGetDocumentOutcome>;
23
23
  abstract queryDocuments(query: ImbricateDocumentQuery): PromiseLike<ImbricateDatabaseQueryDocumentsOutcome>;
24
24
  abstract countDocuments(query: ImbricateDocumentQuery): PromiseLike<ImbricateDatabaseCountDocumentsOutcome>;
@@ -4,7 +4,7 @@
4
4
  * @description Full Feature
5
5
  */
6
6
  import { ImbricateCommonQueryOriginActionsOutcome, ImbricateCommonQueryOriginActionsQuery, ImbricateOriginActionInput, ImbricateOriginActionOutcome } from "../../common/action";
7
- import { ImbricatePropertyRecord } from "../../property/map";
7
+ import { ImbricatePropertyRecordDrafter } from "../../property/map";
8
8
  import { DatabaseAnnotationValue, DatabaseAnnotations, DatabaseEditRecord, ImbricateDatabaseAuditOptions, ImbricateDocumentQuery } from "../definition";
9
9
  import { IMBRICATE_DATABASE_FEATURE } from "../feature";
10
10
  import { IImbricateDatabase } from "../interface";
@@ -19,7 +19,7 @@ export declare abstract class ImbricateDatabaseFullFeatureBase extends Imbricate
19
19
  abstract readonly annotations: DatabaseAnnotations;
20
20
  readonly supportedFeatures: IMBRICATE_DATABASE_FEATURE[];
21
21
  abstract putSchema(schema: ImbricateDatabaseSchema, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutSchemaOutcome>;
22
- abstract createDocument(properties: ImbricatePropertyRecord, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
22
+ abstract createDocument(propertiesDrafter: ImbricatePropertyRecordDrafter, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
23
23
  abstract getDocument(uniqueIdentifier: string): PromiseLike<ImbricateDatabaseGetDocumentOutcome>;
24
24
  abstract queryDocuments(query: ImbricateDocumentQuery): PromiseLike<ImbricateDatabaseQueryDocumentsOutcome>;
25
25
  abstract countDocuments(query: ImbricateDocumentQuery): PromiseLike<ImbricateDatabaseCountDocumentsOutcome>;
@@ -4,7 +4,7 @@
4
4
  * @description Interface
5
5
  */
6
6
  import { ImbricateCommonQueryOriginActionsOutcome, ImbricateCommonQueryOriginActionsQuery, ImbricateOriginActionInput, ImbricateOriginActionOutcome } from "../common/action";
7
- import { ImbricatePropertyRecord } from "../property/map";
7
+ import { ImbricatePropertyRecordDrafter } from "../property/map";
8
8
  import { DatabaseAnnotationValue, DatabaseAnnotations, DatabaseEditRecord, ImbricateDatabaseAuditOptions, ImbricateDocumentQuery } from "./definition";
9
9
  import { IMBRICATE_DATABASE_FEATURE } from "./feature";
10
10
  import { ImbricateDatabaseAddEditRecordsOutcome, ImbricateDatabaseCountDocumentsOutcome, ImbricateDatabaseCreateDocumentOutcome, ImbricateDatabaseDeleteAnnotationOutcome, ImbricateDatabaseGetDocumentOutcome, ImbricateDatabaseGetEditRecordsOutcome, ImbricateDatabasePutAnnotationOutcome, ImbricateDatabasePutSchemaOutcome, ImbricateDatabaseQueryDocumentsOutcome, ImbricateDatabaseRemoveDocumentOutcome } from "./outcome";
@@ -53,13 +53,13 @@ export interface IImbricateDatabase {
53
53
  *
54
54
  * RequireFeature: DATABASE_CREATE_DOCUMENT
55
55
  *
56
- * @param properties properties of the document
56
+ * @param propertiesDrafter properties drafter of the document
57
57
  * @param auditOptions audit options of the document
58
58
  *
59
59
  * @returns a promise of the outcome of the create document
60
60
  * Symbol: S_CreateDocument_IdentifierDuplicated - if the identifier is duplicated
61
61
  */
62
- createDocument(properties: ImbricatePropertyRecord, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
62
+ createDocument(propertiesDrafter: ImbricatePropertyRecordDrafter, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
63
63
  /**
64
64
  * Get one document from the database
65
65
  *
@@ -3,7 +3,8 @@
3
3
  * @namespace Document
4
4
  * @description Essential Readonly
5
5
  */
6
- import { ImbricatePropertyRecord } from "../../property/map";
6
+ import { ImbricatePropertyDrafter, ImbricatePropertyRecordDrafter } from "../../property/map";
7
+ import { IMBRICATE_PROPERTY_TYPE } from "../../property/type";
7
8
  import { DocumentAnnotations, ImbricateDocumentAuditOptions } from "../definition";
8
9
  import { IMBRICATE_DOCUMENT_FEATURE } from "../feature";
9
10
  import { IImbricateDocument } from "../interface";
@@ -12,6 +13,7 @@ import { ImbricateDocumentEssentialBase } from "./essential";
12
13
  export declare abstract class ImbricateDocumentEssentialReadonlyBase extends ImbricateDocumentEssentialBase implements IImbricateDocument {
13
14
  readonly annotations: DocumentAnnotations;
14
15
  readonly supportedFeatures: IMBRICATE_DOCUMENT_FEATURE[];
15
- mergeProperty(_properties: ImbricatePropertyRecord, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
16
- replaceProperties(_properties: ImbricatePropertyRecord, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
16
+ putProperty<T extends IMBRICATE_PROPERTY_TYPE>(_propertyDrafter: ImbricatePropertyDrafter<T>, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
17
+ mergeProperties(_propertiesDrafter: ImbricatePropertyRecordDrafter, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
18
+ replaceProperties(_propertiesDrafter: ImbricatePropertyRecordDrafter, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
17
19
  }
@@ -15,10 +15,13 @@ class ImbricateDocumentEssentialReadonlyBase extends essential_1.ImbricateDocume
15
15
  this.annotations = {};
16
16
  this.supportedFeatures = [];
17
17
  }
18
- mergeProperty(_properties, _auditOptions) {
18
+ putProperty(_propertyDrafter, _auditOptions) {
19
19
  throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_PROPERTY);
20
20
  }
21
- replaceProperties(_properties, _auditOptions) {
21
+ mergeProperties(_propertiesDrafter, _auditOptions) {
22
+ throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_PROPERTY);
23
+ }
24
+ replaceProperties(_propertiesDrafter, _auditOptions) {
22
25
  throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_PROPERTY);
23
26
  }
24
27
  }
@@ -3,7 +3,8 @@
3
3
  * @namespace Document
4
4
  * @description Full Feature Readonly
5
5
  */
6
- import { ImbricatePropertyRecord } from "../../property/map";
6
+ import { ImbricatePropertyDrafter, ImbricatePropertyRecordDrafter } from "../../property/map";
7
+ import { IMBRICATE_PROPERTY_TYPE } from "../../property/type";
7
8
  import { DocumentAnnotationValue, DocumentEditRecord, ImbricateDocumentAuditOptions } from "../definition";
8
9
  import { IMBRICATE_DOCUMENT_FEATURE } from "../feature";
9
10
  import { IImbricateDocument } from "../interface";
@@ -11,8 +12,9 @@ import { ImbricateDocumentAddEditRecordsOutcome, ImbricateDocumentDeleteAnnotati
11
12
  import { ImbricateDocumentFullFeatureBase } from "./full-feature";
12
13
  export declare abstract class ImbricateDocumentFullFeatureReadonlyBase extends ImbricateDocumentFullFeatureBase implements IImbricateDocument {
13
14
  readonly supportedFeatures: IMBRICATE_DOCUMENT_FEATURE[];
14
- mergeProperties(_properties: ImbricatePropertyRecord, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
15
- replaceProperties(_properties: ImbricatePropertyRecord, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
15
+ putProperty<T extends IMBRICATE_PROPERTY_TYPE>(_propertyDrafter: ImbricatePropertyDrafter<T>, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
16
+ mergeProperties(_propertiesDrafter: ImbricatePropertyRecordDrafter, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
17
+ replaceProperties(_propertiesDrafter: ImbricatePropertyRecordDrafter, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
16
18
  putAnnotation(_namespace: string, _identifier: string, _value: DocumentAnnotationValue, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutAnnotationOutcome>;
17
19
  deleteAnnotation(_namespace: string, _identifier: string, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentDeleteAnnotationOutcome>;
18
20
  addEditRecords(_records: DocumentEditRecord[]): Promise<ImbricateDocumentAddEditRecordsOutcome>;
@@ -16,10 +16,13 @@ class ImbricateDocumentFullFeatureReadonlyBase extends full_feature_1.ImbricateD
16
16
  feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_GET_EDIT_RECORD,
17
17
  ];
18
18
  }
19
- mergeProperties(_properties, _auditOptions) {
19
+ putProperty(_propertyDrafter, _auditOptions) {
20
20
  throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_PROPERTY);
21
21
  }
22
- replaceProperties(_properties, _auditOptions) {
22
+ mergeProperties(_propertiesDrafter, _auditOptions) {
23
+ throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_PROPERTY);
24
+ }
25
+ replaceProperties(_propertiesDrafter, _auditOptions) {
23
26
  throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_PROPERTY);
24
27
  }
25
28
  putAnnotation(_namespace, _identifier, _value, _auditOptions) {
@@ -5,7 +5,8 @@
5
5
  */
6
6
  import { ImbricateCommonQueryOriginActionsOutcome, ImbricateCommonQueryOriginActionsQuery, ImbricateOriginActionInput, ImbricateOriginActionOutcome } from "../../common/action";
7
7
  import { ImbricatePropertyKey } from "../../property/definition";
8
- import { ImbricatePropertyRecord } from "../../property/map";
8
+ import { ImbricatePropertyDrafter, ImbricatePropertyRecordDrafter } from "../../property/map";
9
+ import { IMBRICATE_PROPERTY_TYPE } from "../../property/type";
9
10
  import { DocumentAnnotationValue, DocumentAnnotations, DocumentEditRecord, ImbricateDocumentAuditOptions } from "../definition";
10
11
  import { IMBRICATE_DOCUMENT_FEATURE } from "../feature";
11
12
  import { IImbricateDocument } from "../interface";
@@ -17,8 +18,9 @@ export declare abstract class ImbricateDocumentFullFeatureWithActionBase impleme
17
18
  readonly supportedFeatures: IMBRICATE_DOCUMENT_FEATURE[];
18
19
  abstract getProperties(): ImbricateDocumentGetPropertiesOutcome;
19
20
  abstract getProperty(key: ImbricatePropertyKey): ImbricateDocumentGetPropertyOutcome;
20
- abstract mergeProperties(properties: ImbricatePropertyRecord, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
21
- abstract replaceProperties(properties: ImbricatePropertyRecord, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
21
+ abstract putProperty<T extends IMBRICATE_PROPERTY_TYPE>(propertyDrafter: ImbricatePropertyDrafter<T>, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
22
+ abstract mergeProperties(propertiesDrafter: ImbricatePropertyRecordDrafter, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
23
+ abstract replaceProperties(propertiesDrafter: ImbricatePropertyRecordDrafter, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
22
24
  abstract putAnnotation(namespace: string, identifier: string, value: DocumentAnnotationValue, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutAnnotationOutcome>;
23
25
  abstract deleteAnnotation(namespace: string, identifier: string, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentDeleteAnnotationOutcome>;
24
26
  abstract addEditRecords(records: DocumentEditRecord[]): Promise<ImbricateDocumentAddEditRecordsOutcome>;
@@ -5,7 +5,8 @@
5
5
  */
6
6
  import { ImbricateCommonQueryOriginActionsOutcome, ImbricateCommonQueryOriginActionsQuery, ImbricateOriginActionInput, ImbricateOriginActionOutcome } from "../common/action";
7
7
  import { ImbricatePropertyKey } from "../property/definition";
8
- import { ImbricatePropertyRecord } from "../property/map";
8
+ import { ImbricatePropertyDrafter, ImbricatePropertyRecordDrafter } from "../property/map";
9
+ import { IMBRICATE_PROPERTY_TYPE } from "../property/type";
9
10
  import { DocumentAnnotationValue, DocumentAnnotations, DocumentEditRecord, ImbricateDocumentAuditOptions } from "./definition";
10
11
  import { IMBRICATE_DOCUMENT_FEATURE } from "./feature";
11
12
  import { ImbricateDocumentAddEditRecordsOutcome, ImbricateDocumentDeleteAnnotationOutcome, ImbricateDocumentGetEditRecordsOutcome, ImbricateDocumentGetPropertiesOutcome, ImbricateDocumentGetPropertyOutcome, ImbricateDocumentPutAnnotationOutcome, ImbricateDocumentPutPropertyOutcome } from "./outcome";
@@ -38,6 +39,18 @@ export interface IImbricateDocument {
38
39
  * @returns the property of the document
39
40
  */
40
41
  getProperty(propertyKey: ImbricatePropertyKey): ImbricateDocumentGetPropertyOutcome;
42
+ /**
43
+ * Put a property to the document
44
+ *
45
+ * RequireFeature: DOCUMENT_PUT_PROPERTY
46
+ *
47
+ * @param propertyDrafter the property drafter to put
48
+ * @param auditOptions audit options of the document
49
+ *
50
+ * @returns a promise of the outcome of the put property
51
+ * Symbol: S_Document_PutProperty_InvalidKey - if the key is invalid
52
+ */
53
+ putProperty<T extends IMBRICATE_PROPERTY_TYPE>(propertyDrafter: ImbricatePropertyDrafter<T>, auditOptions?: ImbricateDocumentAuditOptions): PromiseLike<ImbricateDocumentPutPropertyOutcome>;
41
54
  /**
42
55
  * Merge a property to the document
43
56
  *
@@ -49,19 +62,19 @@ export interface IImbricateDocument {
49
62
  * @returns a promise of the outcome of the put property
50
63
  * Symbol: S_Document_PutProperty_InvalidKey - if the key is invalid
51
64
  */
52
- mergeProperties(properties: ImbricatePropertyRecord, auditOptions?: ImbricateDocumentAuditOptions): PromiseLike<ImbricateDocumentPutPropertyOutcome>;
65
+ mergeProperties(propertiesDrafter: ImbricatePropertyRecordDrafter, auditOptions?: ImbricateDocumentAuditOptions): PromiseLike<ImbricateDocumentPutPropertyOutcome>;
53
66
  /**
54
67
  * Replace all properties of the document
55
68
  *
56
69
  * RequireFeature: DOCUMENT_PUT_PROPERTIES
57
70
  *
58
- * @param properties properties of the document
71
+ * @param propertiesDrafter properties drafter of the document
59
72
  * @param auditOptions audit options of the document
60
73
  *
61
74
  * @returns a promise of the outcome of the put properties
62
75
  * Symbol: S_Document_PutProperty_InvalidKey - if the key is invalid
63
76
  */
64
- replaceProperties(properties: ImbricatePropertyRecord, auditOptions?: ImbricateDocumentAuditOptions): PromiseLike<ImbricateDocumentPutPropertyOutcome>;
77
+ replaceProperties(propertiesDrafter: ImbricatePropertyRecordDrafter, auditOptions?: ImbricateDocumentAuditOptions): PromiseLike<ImbricateDocumentPutPropertyOutcome>;
65
78
  /**
66
79
  * Put annotation to the document, optional
67
80
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imbricate/core",
3
3
  "main": "index.js",
4
- "version": "3.20.1",
4
+ "version": "3.24.0",
5
5
  "description": "Imbricate Core, Notebook for Engineers",
6
6
  "repository": {
7
7
  "type": "git",
@@ -13,7 +13,6 @@ export declare abstract class ImbricatePropertyFullFeatureWithActionBase<T exten
13
13
  abstract readonly propertyType: T;
14
14
  abstract readonly propertyValue: ImbricatePropertyValueObject<T>;
15
15
  readonly supportedFeatures: IMBRICATE_PROPERTY_FEATURE[];
16
- abstract cloneWithValue(value: ImbricatePropertyValueObject<T>): IImbricateProperty<T>;
17
16
  abstract queryOriginActions(query: ImbricateCommonQueryOriginActionsQuery): PromiseLike<ImbricateCommonQueryOriginActionsOutcome>;
18
17
  abstract executeOriginAction(input: ImbricateOriginActionInput): PromiseLike<ImbricateOriginActionOutcome>;
19
18
  }
@@ -24,14 +24,6 @@ export interface IImbricateProperty<T extends IMBRICATE_PROPERTY_TYPE> {
24
24
  * Supported features of the property
25
25
  */
26
26
  readonly supportedFeatures: IMBRICATE_PROPERTY_FEATURE[];
27
- /**
28
- * Clone the property with the new value
29
- *
30
- * @param value the new value
31
- *
32
- * @returns the cloned property
33
- */
34
- cloneWithValue(value: ImbricatePropertyValueObject<T>): IImbricateProperty<T>;
35
27
  /**
36
28
  * Query the property actions
37
29
  *
package/property/map.d.ts CHANGED
@@ -5,5 +5,8 @@
5
5
  */
6
6
  import { ImbricatePropertyKey } from "./definition";
7
7
  import { IImbricateProperty } from "./interface";
8
- import { IMBRICATE_PROPERTY_TYPE } from "./type";
8
+ import { IMBRICATE_PROPERTY_TYPE, ImbricatePropertyValueObject } from "./type";
9
9
  export type ImbricatePropertyRecord = Record<ImbricatePropertyKey, IImbricateProperty<IMBRICATE_PROPERTY_TYPE>>;
10
+ export type ImbricatePropertyGenerator<T extends IMBRICATE_PROPERTY_TYPE> = (propertyKey: ImbricatePropertyKey, propertyType: T, propertyValue: ImbricatePropertyValueObject<T>) => IImbricateProperty<T>;
11
+ export type ImbricatePropertyDrafter<T extends IMBRICATE_PROPERTY_TYPE> = (generator: ImbricatePropertyGenerator<T>) => IImbricateProperty<T>;
12
+ export type ImbricatePropertyRecordDrafter = (generator: ImbricatePropertyGenerator<IMBRICATE_PROPERTY_TYPE>) => ImbricatePropertyRecord;