@imbricate/core 3.0.4 → 3.1.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.
@@ -15,11 +15,17 @@ export declare enum IMBRICATE_PROPERTY_TYPE {
15
15
  }
16
16
  /**
17
17
  * Document properties
18
+ *
19
+ * Key - Property key, which should match schema properties unique identifier
20
+ * Value - Property value, which should match schema properties type
18
21
  */
19
22
  export type DocumentProperties = Record<DocumentPropertyKey, DocumentPropertyValue<IMBRICATE_PROPERTY_TYPE>>;
23
+ /**
24
+ * Document property key, which should match schema properties unique identifier
25
+ */
20
26
  export type DocumentPropertyKey = string;
21
27
  export type DocumentPropertyValue<T extends IMBRICATE_PROPERTY_TYPE> = {
22
- readonly type: IMBRICATE_PROPERTY_TYPE;
28
+ readonly type: T;
23
29
  readonly value: DocumentPropertyValueObject<T>;
24
30
  };
25
31
  export type DocumentPropertyValueObject<T extends IMBRICATE_PROPERTY_TYPE> = T extends IMBRICATE_PROPERTY_TYPE.STRING ? string : T extends IMBRICATE_PROPERTY_TYPE.MARKDOWN ? string : never;
@@ -23,7 +23,7 @@ const validateImbricateProperties = (properties, schema) => {
23
23
  const keys = Object.keys(properties);
24
24
  for (const key of keys) {
25
25
  const property = schema.properties.find((each) => {
26
- return each.propertyName === key;
26
+ return each.propertyIdentifier === key;
27
27
  });
28
28
  if (!property) {
29
29
  return `Property ${key} not found in schema`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imbricate/core",
3
3
  "main": "index.js",
4
- "version": "3.0.4",
4
+ "version": "3.1.0",
5
5
  "description": "Imbricate Core, Notebook for Engineers",
6
6
  "repository": {
7
7
  "type": "git",