@imbricate/core 3.19.0 → 3.20.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.
Files changed (51) hide show
  1. package/common/action.d.ts +4 -2
  2. package/database/base-class/essential-readonly.d.ts +2 -2
  3. package/database/base-class/full-feature-readonly.d.ts +2 -2
  4. package/database/base-class/full-feature-with-action.d.ts +2 -2
  5. package/database/base-class/full-feature.d.ts +2 -2
  6. package/database/interface.d.ts +2 -2
  7. package/database/schema.d.ts +1 -1
  8. package/database/schema.js +3 -3
  9. package/document/base-class/essential-readonly.d.ts +3 -3
  10. package/document/base-class/full-feature-readonly.d.ts +3 -3
  11. package/document/base-class/full-feature-with-action.d.ts +7 -5
  12. package/document/base-class/full-feature.d.ts +1 -10
  13. package/document/definition.d.ts +5 -3
  14. package/document/export.d.ts +0 -2
  15. package/document/export.js +0 -2
  16. package/document/interface.d.ts +17 -8
  17. package/document/outcome.d.ts +18 -0
  18. package/document/outcome.js +15 -1
  19. package/document/property/default-value.d.ts +2 -2
  20. package/document/property/default-value.js +10 -10
  21. package/document/property/definition.d.ts +4 -2
  22. package/document/property/primary.d.ts +4 -2
  23. package/document/property/triage-base.d.ts +15 -13
  24. package/document/property/triage-base.js +11 -11
  25. package/document/property/triage-manager.d.ts +5 -4
  26. package/document/property/triage.d.ts +2 -2
  27. package/error/property/feature-not-supported.d.ts +12 -0
  28. package/error/property/feature-not-supported.js +20 -0
  29. package/error/property/property-error.d.ts +9 -0
  30. package/error/property/property-error.js +16 -0
  31. package/index.d.ts +1 -0
  32. package/index.js +1 -0
  33. package/package.json +1 -1
  34. package/property/base-class/full-feature-with-action.d.ts +18 -0
  35. package/property/base-class/full-feature-with-action.js +18 -0
  36. package/property/base-class/full-feature.d.ts +15 -0
  37. package/property/base-class/full-feature.js +24 -0
  38. package/property/definition.d.ts +9 -0
  39. package/property/definition.js +7 -0
  40. package/property/export.d.ts +13 -0
  41. package/property/export.js +29 -0
  42. package/property/feature.d.ts +10 -0
  43. package/property/feature.js +17 -0
  44. package/property/interface.d.ts +45 -0
  45. package/property/interface.js +7 -0
  46. package/property/map.d.ts +9 -0
  47. package/property/map.js +7 -0
  48. package/{document/property.d.ts → property/type.d.ts} +5 -20
  49. package/{document/property.js → property/type.js} +3 -3
  50. package/{document → property}/validate.d.ts +3 -3
  51. package/{document → property}/validate.js +33 -30
@@ -14,7 +14,8 @@ export type ImbricateOriginActionParameterType = {
14
14
  };
15
15
  export type ImbricateOriginActionParameter = {
16
16
  readonly parameterKey: string;
17
- readonly getParameterName: (locale: IETF_LOCALE) => string;
17
+ readonly parameterName: Record<IETF_LOCALE, string>;
18
+ readonly parameterDescription: Record<IETF_LOCALE, string>;
18
19
  readonly parameterType: ImbricateOriginActionParameterType;
19
20
  };
20
21
  export declare enum IMBRICATE_ORIGIN_ACTION_APPEARANCE {
@@ -26,7 +27,8 @@ export declare enum IMBRICATE_ORIGIN_ACTION_APPEARANCE {
26
27
  }
27
28
  export type ImbricateOriginAction = {
28
29
  readonly actionIdentifier: string;
29
- readonly getActionName: (locale: IETF_LOCALE) => string;
30
+ readonly actionName: Record<IETF_LOCALE, string>;
31
+ readonly actionDescription: Record<IETF_LOCALE, string>;
30
32
  readonly parameters: ImbricateOriginActionParameter[];
31
33
  readonly appearance?: IMBRICATE_ORIGIN_ACTION_APPEARANCE;
32
34
  readonly disabled?: boolean;
@@ -3,7 +3,7 @@
3
3
  * @namespace Database
4
4
  * @description Essential Readonly
5
5
  */
6
- import { DocumentProperties } from "../../document/property";
6
+ import { ImbricatePropertyRecord } 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: DocumentProperties, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
16
+ createDocument(_properties: ImbricatePropertyRecord, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
17
17
  removeDocument(_uniqueIdentifier: string, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseRemoveDocumentOutcome>;
18
18
  }
@@ -3,7 +3,7 @@
3
3
  * @namespace Database_BaseClass
4
4
  * @description Full Feature Readonly
5
5
  */
6
- import { DocumentProperties } from "../../document/property";
6
+ import { ImbricatePropertyRecord } 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: DocumentProperties, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
16
+ createDocument(_properties: ImbricatePropertyRecord, _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>;
@@ -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 { DocumentProperties } from "../../document/property";
7
+ import { ImbricatePropertyRecord } 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: DocumentProperties, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
21
+ abstract createDocument(properties: ImbricatePropertyRecord, 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 { DocumentProperties } from "../../document/property";
7
+ import { ImbricatePropertyRecord } 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: DocumentProperties, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
22
+ abstract createDocument(properties: ImbricatePropertyRecord, 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 { DocumentProperties } from "../document/property";
7
+ import { ImbricatePropertyRecord } 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";
@@ -59,7 +59,7 @@ export interface IImbricateDatabase {
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: DocumentProperties, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
62
+ createDocument(properties: ImbricatePropertyRecord, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
63
63
  /**
64
64
  * Get one document from the database
65
65
  *
@@ -3,7 +3,7 @@
3
3
  * @namespace Database
4
4
  * @description Schema
5
5
  */
6
- import { IMBRICATE_PROPERTY_TYPE } from "../document/property";
6
+ import { IMBRICATE_PROPERTY_TYPE } from "../property/type";
7
7
  export type ImbricateDatabaseSchemaProperty<T extends IMBRICATE_PROPERTY_TYPE> = {
8
8
  readonly propertyIdentifier: string;
9
9
  } & ImbricateDatabaseSchemaPropertyForCreation<T>;
@@ -6,7 +6,7 @@
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.validateImbricateSchema = exports.validateImbricateSchemaProperty = void 0;
9
- const property_1 = require("../document/property");
9
+ const type_1 = require("../property/type");
10
10
  /**
11
11
  * Validate a schema property
12
12
  *
@@ -22,11 +22,11 @@ const validateImbricateSchemaProperty = (property) => {
22
22
  if (typeof property.propertyName !== "string") {
23
23
  return "Property name must be a string";
24
24
  }
25
- if (!Object.values(property_1.IMBRICATE_PROPERTY_TYPE).includes(property.propertyType)) {
25
+ if (!Object.values(type_1.IMBRICATE_PROPERTY_TYPE).includes(property.propertyType)) {
26
26
  return "Property type must be a valid type";
27
27
  }
28
28
  switch (property.propertyType) {
29
- case property_1.IMBRICATE_PROPERTY_TYPE.REFERENCE: {
29
+ case type_1.IMBRICATE_PROPERTY_TYPE.REFERENCE: {
30
30
  if (typeof property.propertyOptions !== "object") {
31
31
  return "Property options must be an object";
32
32
  }
@@ -3,15 +3,15 @@
3
3
  * @namespace Document
4
4
  * @description Essential Readonly
5
5
  */
6
+ import { ImbricatePropertyRecord } from "../../property/map";
6
7
  import { DocumentAnnotations, ImbricateDocumentAuditOptions } from "../definition";
7
8
  import { IMBRICATE_DOCUMENT_FEATURE } from "../feature";
8
9
  import { IImbricateDocument } from "../interface";
9
10
  import { ImbricateDocumentPutPropertyOutcome } from "../outcome";
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
- mergeProperty(_properties: DocumentProperties, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
16
- replaceProperties(_properties: DocumentProperties, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
15
+ mergeProperty(_properties: ImbricatePropertyRecord, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
16
+ replaceProperties(_properties: ImbricatePropertyRecord, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
17
17
  }
@@ -3,16 +3,16 @@
3
3
  * @namespace Document
4
4
  * @description Full Feature Readonly
5
5
  */
6
+ import { ImbricatePropertyRecord } from "../../property/map";
6
7
  import { DocumentAnnotationValue, DocumentEditRecord, ImbricateDocumentAuditOptions } from "../definition";
7
8
  import { IMBRICATE_DOCUMENT_FEATURE } from "../feature";
8
9
  import { IImbricateDocument } from "../interface";
9
10
  import { ImbricateDocumentAddEditRecordsOutcome, ImbricateDocumentDeleteAnnotationOutcome, ImbricateDocumentPutAnnotationOutcome, ImbricateDocumentPutPropertyOutcome } from "../outcome";
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
- mergeProperties(_properties: DocumentProperties, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
15
- replaceProperties(_properties: DocumentProperties, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
14
+ mergeProperties(_properties: ImbricatePropertyRecord, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
15
+ replaceProperties(_properties: ImbricatePropertyRecord, _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>;
@@ -4,19 +4,21 @@
4
4
  * @description Full Feature
5
5
  */
6
6
  import { ImbricateCommonQueryOriginActionsOutcome, ImbricateCommonQueryOriginActionsQuery, ImbricateOriginActionInput, ImbricateOriginActionOutcome } from "../../common/action";
7
+ import { ImbricatePropertyKey } from "../../property/definition";
8
+ import { ImbricatePropertyRecord } from "../../property/map";
7
9
  import { DocumentAnnotationValue, DocumentAnnotations, DocumentEditRecord, ImbricateDocumentAuditOptions } from "../definition";
8
10
  import { IMBRICATE_DOCUMENT_FEATURE } from "../feature";
9
11
  import { IImbricateDocument } from "../interface";
10
- import { ImbricateDocumentAddEditRecordsOutcome, ImbricateDocumentDeleteAnnotationOutcome, ImbricateDocumentGetEditRecordsOutcome, ImbricateDocumentPutAnnotationOutcome, ImbricateDocumentPutPropertyOutcome } from "../outcome";
11
- import { DocumentProperties } from "../property";
12
+ import { ImbricateDocumentAddEditRecordsOutcome, ImbricateDocumentDeleteAnnotationOutcome, ImbricateDocumentGetEditRecordsOutcome, ImbricateDocumentGetPropertiesOutcome, ImbricateDocumentGetPropertyOutcome, ImbricateDocumentPutAnnotationOutcome, ImbricateDocumentPutPropertyOutcome } from "../outcome";
12
13
  export declare abstract class ImbricateDocumentFullFeatureWithActionBase implements IImbricateDocument {
13
14
  abstract readonly uniqueIdentifier: string;
14
15
  abstract readonly documentVersion: string;
15
- abstract readonly properties: DocumentProperties;
16
16
  abstract readonly annotations: DocumentAnnotations;
17
17
  readonly supportedFeatures: IMBRICATE_DOCUMENT_FEATURE[];
18
- abstract mergeProperties(properties: DocumentProperties, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
19
- abstract replaceProperties(properties: DocumentProperties, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
18
+ abstract getProperties(): ImbricateDocumentGetPropertiesOutcome;
19
+ abstract getProperty(key: ImbricatePropertyKey): ImbricateDocumentGetPropertyOutcome;
20
+ abstract mergeProperties(properties: ImbricatePropertyRecord, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
21
+ abstract replaceProperties(properties: ImbricatePropertyRecord, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
20
22
  abstract putAnnotation(namespace: string, identifier: string, value: DocumentAnnotationValue, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutAnnotationOutcome>;
21
23
  abstract deleteAnnotation(namespace: string, identifier: string, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentDeleteAnnotationOutcome>;
22
24
  abstract addEditRecords(records: DocumentEditRecord[]): Promise<ImbricateDocumentAddEditRecordsOutcome>;
@@ -4,24 +4,15 @@
4
4
  * @description Full Feature
5
5
  */
6
6
  import { ImbricateCommonQueryOriginActionsOutcome, ImbricateCommonQueryOriginActionsQuery, ImbricateOriginActionInput, ImbricateOriginActionOutcome } from "../../common/action";
7
- import { DocumentAnnotationValue, DocumentAnnotations, DocumentEditRecord, ImbricateDocumentAuditOptions } from "../definition";
7
+ import { DocumentAnnotations } from "../definition";
8
8
  import { IMBRICATE_DOCUMENT_FEATURE } from "../feature";
9
9
  import { IImbricateDocument } from "../interface";
10
- import { ImbricateDocumentAddEditRecordsOutcome, ImbricateDocumentDeleteAnnotationOutcome, ImbricateDocumentGetEditRecordsOutcome, ImbricateDocumentPutAnnotationOutcome, ImbricateDocumentPutPropertyOutcome } from "../outcome";
11
- import { DocumentProperties } from "../property";
12
10
  import { ImbricateDocumentFullFeatureWithActionBase } from "./full-feature-with-action";
13
11
  export declare abstract class ImbricateDocumentFullFeatureBase extends ImbricateDocumentFullFeatureWithActionBase implements IImbricateDocument {
14
12
  abstract readonly uniqueIdentifier: string;
15
13
  abstract readonly documentVersion: string;
16
- abstract readonly properties: DocumentProperties;
17
14
  abstract readonly annotations: DocumentAnnotations;
18
15
  readonly supportedFeatures: IMBRICATE_DOCUMENT_FEATURE[];
19
- abstract mergeProperties(properties: DocumentProperties, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
20
- abstract replaceProperties(properties: DocumentProperties, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
21
- abstract putAnnotation(namespace: string, identifier: string, value: DocumentAnnotationValue, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutAnnotationOutcome>;
22
- abstract deleteAnnotation(namespace: string, identifier: string, auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentDeleteAnnotationOutcome>;
23
- abstract addEditRecords(records: DocumentEditRecord[]): Promise<ImbricateDocumentAddEditRecordsOutcome>;
24
- abstract getEditRecords(): Promise<ImbricateDocumentGetEditRecordsOutcome>;
25
16
  queryOriginActions(_query: ImbricateCommonQueryOriginActionsQuery): PromiseLike<ImbricateCommonQueryOriginActionsOutcome>;
26
17
  executeOriginAction(_input: ImbricateOriginActionInput): Promise<ImbricateOriginActionOutcome>;
27
18
  }
@@ -4,7 +4,9 @@
4
4
  * @description Definition
5
5
  */
6
6
  import { ImbricateAuthor } from "../author/definition";
7
- import { DocumentPropertyKey, DocumentPropertyValue, IMBRICATE_PROPERTY_TYPE } from "./property";
7
+ import { ImbricatePropertyKey } from "../property/definition";
8
+ import { IImbricateProperty } from "../property/interface";
9
+ import { IMBRICATE_PROPERTY_TYPE } from "../property/type";
8
10
  /**
9
11
  * Edit record type of the document
10
12
  */
@@ -15,8 +17,8 @@ export declare enum IMBRICATE_DOCUMENT_EDIT_TYPE {
15
17
  RESOLVE_CONFLICT = "RESOLVE_CONFLICT"
16
18
  }
17
19
  export type DocumentEditOperationValuePutProperty = {
18
- readonly key: DocumentPropertyKey;
19
- readonly value: DocumentPropertyValue<IMBRICATE_PROPERTY_TYPE>;
20
+ readonly key: ImbricatePropertyKey;
21
+ readonly value: IImbricateProperty<IMBRICATE_PROPERTY_TYPE>;
20
22
  };
21
23
  export type DocumentEditOperationPutAnnotation = {
22
24
  readonly annotationNamespace: string;
@@ -14,10 +14,8 @@ export * from "./definition";
14
14
  export * from "./feature";
15
15
  export * from "./interface";
16
16
  export * from "./outcome";
17
- export * from "./property";
18
17
  export * from "./property/default-value";
19
18
  export * from "./property/definition";
20
19
  export * from "./property/primary";
21
20
  export * from "./property/triage";
22
21
  export * from "./property/triage-manager";
23
- export * from "./validate";
@@ -30,10 +30,8 @@ __exportStar(require("./definition"), exports);
30
30
  __exportStar(require("./feature"), exports);
31
31
  __exportStar(require("./interface"), exports);
32
32
  __exportStar(require("./outcome"), exports);
33
- __exportStar(require("./property"), exports);
34
33
  __exportStar(require("./property/default-value"), exports);
35
34
  __exportStar(require("./property/definition"), exports);
36
35
  __exportStar(require("./property/primary"), exports);
37
36
  __exportStar(require("./property/triage"), exports);
38
37
  __exportStar(require("./property/triage-manager"), exports);
39
- __exportStar(require("./validate"), exports);
@@ -4,10 +4,11 @@
4
4
  * @description Interface
5
5
  */
6
6
  import { ImbricateCommonQueryOriginActionsOutcome, ImbricateCommonQueryOriginActionsQuery, ImbricateOriginActionInput, ImbricateOriginActionOutcome } from "../common/action";
7
+ import { ImbricatePropertyKey } from "../property/definition";
8
+ import { ImbricatePropertyRecord } from "../property/map";
7
9
  import { DocumentAnnotationValue, DocumentAnnotations, DocumentEditRecord, ImbricateDocumentAuditOptions } from "./definition";
8
10
  import { IMBRICATE_DOCUMENT_FEATURE } from "./feature";
9
- import { ImbricateDocumentAddEditRecordsOutcome, ImbricateDocumentDeleteAnnotationOutcome, ImbricateDocumentGetEditRecordsOutcome, ImbricateDocumentPutAnnotationOutcome, ImbricateDocumentPutPropertyOutcome } from "./outcome";
10
- import { DocumentProperties } from "./property";
11
+ import { ImbricateDocumentAddEditRecordsOutcome, ImbricateDocumentDeleteAnnotationOutcome, ImbricateDocumentGetEditRecordsOutcome, ImbricateDocumentGetPropertiesOutcome, ImbricateDocumentGetPropertyOutcome, ImbricateDocumentPutAnnotationOutcome, ImbricateDocumentPutPropertyOutcome } from "./outcome";
11
12
  export interface IImbricateDocument {
12
13
  /**
13
14
  * Unique identifier of the database
@@ -17,10 +18,6 @@ export interface IImbricateDocument {
17
18
  * Version of the document draft
18
19
  */
19
20
  readonly documentVersion: string;
20
- /**
21
- * Properties of the document
22
- */
23
- readonly properties: DocumentProperties;
24
21
  /**
25
22
  * Annotations of the database
26
23
  */
@@ -29,6 +26,18 @@ export interface IImbricateDocument {
29
26
  * Supported features of the document
30
27
  */
31
28
  readonly supportedFeatures: IMBRICATE_DOCUMENT_FEATURE[];
29
+ /**
30
+ * Get properties of the document
31
+ */
32
+ getProperties(): ImbricateDocumentGetPropertiesOutcome;
33
+ /**
34
+ * Get a property of the document
35
+ *
36
+ * @param propertyKey the key of the property
37
+ *
38
+ * @returns the property of the document
39
+ */
40
+ getProperty(propertyKey: ImbricatePropertyKey): ImbricateDocumentGetPropertyOutcome;
32
41
  /**
33
42
  * Merge a property to the document
34
43
  *
@@ -40,7 +49,7 @@ export interface IImbricateDocument {
40
49
  * @returns a promise of the outcome of the put property
41
50
  * Symbol: S_Document_PutProperty_InvalidKey - if the key is invalid
42
51
  */
43
- mergeProperties(properties: DocumentProperties, auditOptions?: ImbricateDocumentAuditOptions): PromiseLike<ImbricateDocumentPutPropertyOutcome>;
52
+ mergeProperties(properties: ImbricatePropertyRecord, auditOptions?: ImbricateDocumentAuditOptions): PromiseLike<ImbricateDocumentPutPropertyOutcome>;
44
53
  /**
45
54
  * Replace all properties of the document
46
55
  *
@@ -52,7 +61,7 @@ export interface IImbricateDocument {
52
61
  * @returns a promise of the outcome of the put properties
53
62
  * Symbol: S_Document_PutProperty_InvalidKey - if the key is invalid
54
63
  */
55
- replaceProperties(properties: DocumentProperties, auditOptions?: ImbricateDocumentAuditOptions): PromiseLike<ImbricateDocumentPutPropertyOutcome>;
64
+ replaceProperties(properties: ImbricatePropertyRecord, auditOptions?: ImbricateDocumentAuditOptions): PromiseLike<ImbricateDocumentPutPropertyOutcome>;
56
65
  /**
57
66
  * Put annotation to the document, optional
58
67
  *
@@ -4,7 +4,25 @@
4
4
  * @description Outcome
5
5
  */
6
6
  import { CommonOutcomeSymbol } from "../common/outcome";
7
+ import { IImbricateProperty } from "../property/interface";
8
+ import { ImbricatePropertyRecord } from "../property/map";
9
+ import { IMBRICATE_PROPERTY_TYPE } from "../property/type";
7
10
  import { DocumentEditRecord } from "./definition";
11
+ export declare const S_Document_GetProperties_Unknown: unique symbol;
12
+ export type ImbricateDocumentGetPropertiesOutcomeSymbol = typeof S_Document_GetProperties_Unknown;
13
+ export declare const ImbricateDocumentGetPropertiesOutcomeSymbolList: ImbricateDocumentGetPropertiesOutcomeSymbol[];
14
+ export declare const rebuildImbricateDocumentGetPropertiesSymbol: (symbolDescription: string) => CommonOutcomeSymbol | typeof S_Document_GetProperties_Unknown;
15
+ export type ImbricateDocumentGetPropertiesOutcome = {
16
+ readonly properties: ImbricatePropertyRecord;
17
+ } | CommonOutcomeSymbol | ImbricateDocumentGetPropertiesOutcomeSymbol;
18
+ export declare const S_Document_GetProperty_NotFound: unique symbol;
19
+ export declare const S_Document_GetProperty_Unknown: unique symbol;
20
+ export type ImbricateDocumentGetPropertyOutcomeSymbol = typeof S_Document_GetProperty_NotFound | typeof S_Document_GetProperty_Unknown;
21
+ export declare const ImbricateDocumentGetPropertyOutcomeSymbolList: ImbricateDocumentGetPropertyOutcomeSymbol[];
22
+ export declare const rebuildImbricateDocumentGetPropertySymbol: (symbolDescription: string) => CommonOutcomeSymbol | ImbricateDocumentGetPropertyOutcomeSymbol;
23
+ export type ImbricateDocumentGetPropertyOutcome = {
24
+ readonly property: IImbricateProperty<IMBRICATE_PROPERTY_TYPE>;
25
+ } | CommonOutcomeSymbol | ImbricateDocumentGetPropertyOutcomeSymbol;
8
26
  export declare const S_Document_PutProperty_InvalidKey: unique symbol;
9
27
  export declare const S_Document_PutProperty_InvalidValue: unique symbol;
10
28
  export declare const S_Document_PutProperty_Unknown: unique symbol;
@@ -5,8 +5,22 @@
5
5
  * @description Outcome
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.rebuildImbricateDocumentGetEditRecordsSymbol = exports.ImbricateDocumentGetEditRecordsOutcomeSymbolList = exports.S_Document_GetEditRecords_Unknown = exports.S_Document_GetEditRecords_NotFound = exports.rebuildImbricateDocumentAddEditRecordsSymbol = exports.ImbricateDocumentAddEditRecordsOutcomeSymbolList = exports.S_Document_AddEditRecords_Unknown = exports.S_Document_AddEditRecords_InvalidRecord = exports.rebuildImbricateDocumentDeleteAnnotationSymbol = exports.ImbricateDocumentDeleteAnnotationOutcomeSymbolList = exports.S_Document_DeleteAnnotation_Unknown = exports.S_Document_DeleteAnnotation_NotFound = exports.rebuildImbricateDocumentPutAnnotationSymbol = exports.ImbricateDocumentPutAnnotationOutcomeSymbolList = exports.S_Document_PutAnnotation_Unknown = exports.S_Document_PutAnnotation_InvalidIdentifier = exports.S_Document_PutAnnotation_InvalidNamespace = exports.rebuildImbricateDocumentPutPropertySymbol = exports.ImbricateDocumentPutPropertyOutcomeSymbolList = exports.S_Document_PutProperty_Unknown = exports.S_Document_PutProperty_InvalidValue = exports.S_Document_PutProperty_InvalidKey = void 0;
8
+ exports.rebuildImbricateDocumentGetEditRecordsSymbol = exports.ImbricateDocumentGetEditRecordsOutcomeSymbolList = exports.S_Document_GetEditRecords_Unknown = exports.S_Document_GetEditRecords_NotFound = exports.rebuildImbricateDocumentAddEditRecordsSymbol = exports.ImbricateDocumentAddEditRecordsOutcomeSymbolList = exports.S_Document_AddEditRecords_Unknown = exports.S_Document_AddEditRecords_InvalidRecord = exports.rebuildImbricateDocumentDeleteAnnotationSymbol = exports.ImbricateDocumentDeleteAnnotationOutcomeSymbolList = exports.S_Document_DeleteAnnotation_Unknown = exports.S_Document_DeleteAnnotation_NotFound = exports.rebuildImbricateDocumentPutAnnotationSymbol = exports.ImbricateDocumentPutAnnotationOutcomeSymbolList = exports.S_Document_PutAnnotation_Unknown = exports.S_Document_PutAnnotation_InvalidIdentifier = exports.S_Document_PutAnnotation_InvalidNamespace = exports.rebuildImbricateDocumentPutPropertySymbol = exports.ImbricateDocumentPutPropertyOutcomeSymbolList = exports.S_Document_PutProperty_Unknown = exports.S_Document_PutProperty_InvalidValue = exports.S_Document_PutProperty_InvalidKey = exports.rebuildImbricateDocumentGetPropertySymbol = exports.ImbricateDocumentGetPropertyOutcomeSymbolList = exports.S_Document_GetProperty_Unknown = exports.S_Document_GetProperty_NotFound = exports.rebuildImbricateDocumentGetPropertiesSymbol = exports.ImbricateDocumentGetPropertiesOutcomeSymbolList = exports.S_Document_GetProperties_Unknown = void 0;
9
9
  const rebuild_symbol_1 = require("../util/rebuild-symbol");
10
+ // Get Properties
11
+ exports.S_Document_GetProperties_Unknown = Symbol("Document_GetProperties_Unknown");
12
+ exports.ImbricateDocumentGetPropertiesOutcomeSymbolList = [
13
+ exports.S_Document_GetProperties_Unknown,
14
+ ];
15
+ exports.rebuildImbricateDocumentGetPropertiesSymbol = (0, rebuild_symbol_1.createRebuildImbricateSymbolFunction)(exports.ImbricateDocumentGetPropertiesOutcomeSymbolList, exports.S_Document_GetProperties_Unknown);
16
+ // Get Property
17
+ exports.S_Document_GetProperty_NotFound = Symbol("Document_GetProperty_NotFound");
18
+ exports.S_Document_GetProperty_Unknown = Symbol("Document_GetProperty_Unknown");
19
+ exports.ImbricateDocumentGetPropertyOutcomeSymbolList = [
20
+ exports.S_Document_GetProperty_NotFound,
21
+ exports.S_Document_GetProperty_Unknown,
22
+ ];
23
+ exports.rebuildImbricateDocumentGetPropertySymbol = (0, rebuild_symbol_1.createRebuildImbricateSymbolFunction)(exports.ImbricateDocumentGetPropertyOutcomeSymbolList, exports.S_Document_GetProperty_Unknown);
10
24
  // Put Property
11
25
  exports.S_Document_PutProperty_InvalidKey = Symbol("Document_PutProperty_InvalidKey");
12
26
  exports.S_Document_PutProperty_InvalidValue = Symbol("Document_PutProperty_InvalidValue");
@@ -3,5 +3,5 @@
3
3
  * @namespace Document_Property
4
4
  * @description Default Value
5
5
  */
6
- import { DocumentPropertyValueObject, IMBRICATE_PROPERTY_TYPE } from "../property";
7
- export declare const getImbricateDefaultValueOfProperty: (type: IMBRICATE_PROPERTY_TYPE) => DocumentPropertyValueObject<IMBRICATE_PROPERTY_TYPE>;
6
+ import { IMBRICATE_PROPERTY_TYPE, ImbricatePropertyValueObject } from "../../property/type";
7
+ export declare const getImbricateDefaultValueOfProperty: (type: IMBRICATE_PROPERTY_TYPE) => ImbricatePropertyValueObject<IMBRICATE_PROPERTY_TYPE>;
@@ -6,19 +6,19 @@
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.getImbricateDefaultValueOfProperty = void 0;
9
- const property_1 = require("../property");
9
+ const type_1 = require("../../property/type");
10
10
  // IMBRICATE_PROPERTY_TYPE SWITCH
11
11
  const getImbricateDefaultValueOfProperty = (type) => {
12
12
  switch (type) {
13
- case property_1.IMBRICATE_PROPERTY_TYPE.BOOLEAN: return false;
14
- case property_1.IMBRICATE_PROPERTY_TYPE.STRING: return "";
15
- case property_1.IMBRICATE_PROPERTY_TYPE.NUMBER: return 0;
16
- case property_1.IMBRICATE_PROPERTY_TYPE.MARKDOWN: return "";
17
- case property_1.IMBRICATE_PROPERTY_TYPE.JSON: return "";
18
- case property_1.IMBRICATE_PROPERTY_TYPE.IMBRISCRIPT: return "";
19
- case property_1.IMBRICATE_PROPERTY_TYPE.DATE: return new Date().toISOString();
20
- case property_1.IMBRICATE_PROPERTY_TYPE.LABEL: return [];
21
- case property_1.IMBRICATE_PROPERTY_TYPE.REFERENCE: return [];
13
+ case type_1.IMBRICATE_PROPERTY_TYPE.BOOLEAN: return false;
14
+ case type_1.IMBRICATE_PROPERTY_TYPE.STRING: return "";
15
+ case type_1.IMBRICATE_PROPERTY_TYPE.NUMBER: return 0;
16
+ case type_1.IMBRICATE_PROPERTY_TYPE.MARKDOWN: return "";
17
+ case type_1.IMBRICATE_PROPERTY_TYPE.JSON: return "";
18
+ case type_1.IMBRICATE_PROPERTY_TYPE.IMBRISCRIPT: return "";
19
+ case type_1.IMBRICATE_PROPERTY_TYPE.DATE: return new Date().toISOString();
20
+ case type_1.IMBRICATE_PROPERTY_TYPE.LABEL: return [];
21
+ case type_1.IMBRICATE_PROPERTY_TYPE.REFERENCE: return [];
22
22
  }
23
23
  return null;
24
24
  };
@@ -3,5 +3,7 @@
3
3
  * @namespace Document_Property
4
4
  * @description Definition
5
5
  */
6
- import { DocumentPropertyKey, DocumentPropertyValue, IMBRICATE_PROPERTY_TYPE } from "../property";
7
- export type DocumentPropertyTriageFunction<T extends IMBRICATE_PROPERTY_TYPE, Result> = (propertyKey: DocumentPropertyKey, value: DocumentPropertyValue<T>) => Result;
6
+ import { ImbricatePropertyKey } from "../../property/definition";
7
+ import { IImbricateProperty } from "../../property/interface";
8
+ import { IMBRICATE_PROPERTY_TYPE } from "../../property/type";
9
+ export type ImbricatePropertyTriageFunction<T extends IMBRICATE_PROPERTY_TYPE, Result> = (propertyKey: ImbricatePropertyKey, value: IImbricateProperty<T>) => Result;
@@ -4,5 +4,7 @@
4
4
  * @description Primary
5
5
  */
6
6
  import { ImbricateDatabaseSchema } from "../../database/schema";
7
- import { DocumentProperties, DocumentPropertyValue, IMBRICATE_PROPERTY_TYPE } from "../property";
8
- export declare const findPrimaryProperty: (schema: ImbricateDatabaseSchema, properties: DocumentProperties) => DocumentPropertyValue<IMBRICATE_PROPERTY_TYPE> | null;
7
+ import { IImbricateProperty } from "../../property/interface";
8
+ import { ImbricatePropertyRecord } from "../../property/map";
9
+ import { IMBRICATE_PROPERTY_TYPE } from "../../property/type";
10
+ export declare const findPrimaryProperty: (schema: ImbricateDatabaseSchema, properties: ImbricatePropertyRecord) => IImbricateProperty<IMBRICATE_PROPERTY_TYPE> | null;
@@ -3,8 +3,10 @@
3
3
  * @namespace Document_Property
4
4
  * @description Triage Base
5
5
  */
6
- import { DocumentProperties, DocumentPropertyKey, IMBRICATE_PROPERTY_TYPE } from "../property";
7
- import { DocumentPropertyTriageFunction } from "./definition";
6
+ import { ImbricatePropertyKey } from "../../property/definition";
7
+ import { ImbricatePropertyRecord } from "../../property/map";
8
+ import { IMBRICATE_PROPERTY_TYPE } from "../../property/type";
9
+ import { ImbricatePropertyTriageFunction } from "./definition";
8
10
  export declare class ImbricateDocumentPropertyTriageBase<Result> {
9
11
  private readonly _triageFunctionsByKey;
10
12
  private readonly _triageFunctionsByType;
@@ -17,15 +19,15 @@ export declare class ImbricateDocumentPropertyTriageBase<Result> {
17
19
  * @param triageFunction triage function
18
20
  * @returns triage manager
19
21
  */
20
- forPropertyKey<T extends IMBRICATE_PROPERTY_TYPE>(propertyKey: DocumentPropertyKey, triageFunction: DocumentPropertyTriageFunction<T, Result>): this;
21
- forBoolean(triageFunction: DocumentPropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.BOOLEAN, Result>): this;
22
- forString(triageFunction: DocumentPropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.STRING, Result>): this;
23
- forNumber(triageFunction: DocumentPropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.NUMBER, Result>): this;
24
- forMarkdown(triageFunction: DocumentPropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.MARKDOWN, Result>): this;
25
- forJson(triageFunction: DocumentPropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.JSON, Result>): this;
26
- forImbriscript(triageFunction: DocumentPropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.IMBRISCRIPT, Result>): this;
27
- forDate(triageFunction: DocumentPropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.DATE, Result>): this;
28
- forLabel(triageFunction: DocumentPropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.LABEL, Result>): this;
29
- forReference(triageFunction: DocumentPropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.REFERENCE, Result>): this;
30
- protected _collect(properties: DocumentProperties): Map<DocumentPropertyKey, Result>;
22
+ forPropertyKey<T extends IMBRICATE_PROPERTY_TYPE>(propertyKey: ImbricatePropertyKey, triageFunction: ImbricatePropertyTriageFunction<T, Result>): this;
23
+ forBoolean(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.BOOLEAN, Result>): this;
24
+ forString(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.STRING, Result>): this;
25
+ forNumber(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.NUMBER, Result>): this;
26
+ forMarkdown(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.MARKDOWN, Result>): this;
27
+ forJson(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.JSON, Result>): this;
28
+ forImbriscript(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.IMBRISCRIPT, Result>): this;
29
+ forDate(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.DATE, Result>): this;
30
+ forLabel(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.LABEL, Result>): this;
31
+ forReference(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.REFERENCE, Result>): this;
32
+ protected _collect(properties: ImbricatePropertyRecord): Map<ImbricatePropertyKey, Result>;
31
33
  }
@@ -6,7 +6,7 @@
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.ImbricateDocumentPropertyTriageBase = void 0;
9
- const property_1 = require("../property");
9
+ const type_1 = require("../../property/type");
10
10
  // IMBRICATE_PROPERTY_TYPE SWITCH
11
11
  class ImbricateDocumentPropertyTriageBase {
12
12
  constructor() {
@@ -26,39 +26,39 @@ class ImbricateDocumentPropertyTriageBase {
26
26
  return this;
27
27
  }
28
28
  forBoolean(triageFunction) {
29
- this._triageFunctionsByType.set(property_1.IMBRICATE_PROPERTY_TYPE.BOOLEAN, triageFunction);
29
+ this._triageFunctionsByType.set(type_1.IMBRICATE_PROPERTY_TYPE.BOOLEAN, triageFunction);
30
30
  return this;
31
31
  }
32
32
  forString(triageFunction) {
33
- this._triageFunctionsByType.set(property_1.IMBRICATE_PROPERTY_TYPE.STRING, triageFunction);
33
+ this._triageFunctionsByType.set(type_1.IMBRICATE_PROPERTY_TYPE.STRING, triageFunction);
34
34
  return this;
35
35
  }
36
36
  forNumber(triageFunction) {
37
- this._triageFunctionsByType.set(property_1.IMBRICATE_PROPERTY_TYPE.NUMBER, triageFunction);
37
+ this._triageFunctionsByType.set(type_1.IMBRICATE_PROPERTY_TYPE.NUMBER, triageFunction);
38
38
  return this;
39
39
  }
40
40
  forMarkdown(triageFunction) {
41
- this._triageFunctionsByType.set(property_1.IMBRICATE_PROPERTY_TYPE.MARKDOWN, triageFunction);
41
+ this._triageFunctionsByType.set(type_1.IMBRICATE_PROPERTY_TYPE.MARKDOWN, triageFunction);
42
42
  return this;
43
43
  }
44
44
  forJson(triageFunction) {
45
- this._triageFunctionsByType.set(property_1.IMBRICATE_PROPERTY_TYPE.JSON, triageFunction);
45
+ this._triageFunctionsByType.set(type_1.IMBRICATE_PROPERTY_TYPE.JSON, triageFunction);
46
46
  return this;
47
47
  }
48
48
  forImbriscript(triageFunction) {
49
- this._triageFunctionsByType.set(property_1.IMBRICATE_PROPERTY_TYPE.IMBRISCRIPT, triageFunction);
49
+ this._triageFunctionsByType.set(type_1.IMBRICATE_PROPERTY_TYPE.IMBRISCRIPT, triageFunction);
50
50
  return this;
51
51
  }
52
52
  forDate(triageFunction) {
53
- this._triageFunctionsByType.set(property_1.IMBRICATE_PROPERTY_TYPE.DATE, triageFunction);
53
+ this._triageFunctionsByType.set(type_1.IMBRICATE_PROPERTY_TYPE.DATE, triageFunction);
54
54
  return this;
55
55
  }
56
56
  forLabel(triageFunction) {
57
- this._triageFunctionsByType.set(property_1.IMBRICATE_PROPERTY_TYPE.LABEL, triageFunction);
57
+ this._triageFunctionsByType.set(type_1.IMBRICATE_PROPERTY_TYPE.LABEL, triageFunction);
58
58
  return this;
59
59
  }
60
60
  forReference(triageFunction) {
61
- this._triageFunctionsByType.set(property_1.IMBRICATE_PROPERTY_TYPE.REFERENCE, triageFunction);
61
+ this._triageFunctionsByType.set(type_1.IMBRICATE_PROPERTY_TYPE.REFERENCE, triageFunction);
62
62
  return this;
63
63
  }
64
64
  _collect(properties) {
@@ -72,7 +72,7 @@ class ImbricateDocumentPropertyTriageBase {
72
72
  result.set(key, value);
73
73
  continue;
74
74
  }
75
- const typeFunction = this._triageFunctionsByType.get(property.type);
75
+ const typeFunction = this._triageFunctionsByType.get(property.propertyType);
76
76
  if (typeof typeFunction === "function") {
77
77
  const value = typeFunction(key, property);
78
78
  result.set(key, value);
@@ -3,10 +3,11 @@
3
3
  * @namespace Document_Property
4
4
  * @description Triage Manager
5
5
  */
6
- import { DocumentProperties, DocumentPropertyKey } from "../property";
6
+ import { ImbricatePropertyKey } from "../../property/definition";
7
+ import { ImbricatePropertyRecord } from "../../property/map";
7
8
  import { ImbricateDocumentPropertyTriageBase } from "./triage-base";
8
9
  export declare class ImbricateDocumentPropertyTriageManager<Result> extends ImbricateDocumentPropertyTriageBase<Result> {
9
- static create<Result>(properties: DocumentProperties): ImbricateDocumentPropertyTriageManager<Result>;
10
+ static create<Result>(properties: ImbricatePropertyRecord): ImbricateDocumentPropertyTriageManager<Result>;
10
11
  private readonly _properties;
11
12
  private constructor();
12
13
  /**
@@ -20,11 +21,11 @@ export declare class ImbricateDocumentPropertyTriageManager<Result> extends Imbr
20
21
  *
21
22
  * @returns collected result as map
22
23
  */
23
- collectAsMap(): Map<DocumentPropertyKey, Result>;
24
+ collectAsMap(): Map<ImbricatePropertyKey, Result>;
24
25
  /**
25
26
  * Collect the result as object
26
27
  *
27
28
  * @returns collected result as object
28
29
  */
29
- collectAsObject(): Record<DocumentPropertyKey, Result>;
30
+ collectAsObject(): Record<ImbricatePropertyKey, Result>;
30
31
  }