@twin.org/entity-storage-connector-file 0.0.1-next.4 → 0.0.1-next.6

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.
@@ -103,6 +103,13 @@ class FileEntityStorageConnector {
103
103
  }
104
104
  return true;
105
105
  }
106
+ /**
107
+ * Get the schema for the entities.
108
+ * @returns The schema for the entities.
109
+ */
110
+ getSchema() {
111
+ return this._entitySchema;
112
+ }
106
113
  /**
107
114
  * Get an entity.
108
115
  * @param id The id of the entity to get, or the index value if secondaryIndex is set.
@@ -101,6 +101,13 @@ class FileEntityStorageConnector {
101
101
  }
102
102
  return true;
103
103
  }
104
+ /**
105
+ * Get the schema for the entities.
106
+ * @returns The schema for the entities.
107
+ */
108
+ getSchema() {
109
+ return this._entitySchema;
110
+ }
104
111
  /**
105
112
  * Get an entity.
106
113
  * @param id The id of the entity to get, or the index value if secondaryIndex is set.
@@ -1,4 +1,4 @@
1
- import { type EntityCondition, type SortDirection } from "@twin.org/entity";
1
+ import { type EntityCondition, type IEntitySchema, type SortDirection } from "@twin.org/entity";
2
2
  import type { IEntityStorageConnector } from "@twin.org/entity-storage-models";
3
3
  import type { IFileEntityStorageConnectorConfig } from "./models/IFileEntityStorageConnectorConfig";
4
4
  /**
@@ -25,6 +25,11 @@ export declare class FileEntityStorageConnector<T = unknown> implements IEntityS
25
25
  * @returns True if the bootstrapping process was successful.
26
26
  */
27
27
  bootstrap(nodeLoggingConnectorType?: string): Promise<boolean>;
28
+ /**
29
+ * Get the schema for the entities.
30
+ * @returns The schema for the entities.
31
+ */
32
+ getSchema(): IEntitySchema;
28
33
  /**
29
34
  * Get an entity.
30
35
  * @param id The id of the entity to get, or the index value if secondaryIndex is set.
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/entity-storage-connector-file - Changelog
2
2
 
3
- ## v0.0.1-next.4
3
+ ## v0.0.1-next.6
4
4
 
5
5
  - Initial Release
@@ -74,6 +74,24 @@ True if the bootstrapping process was successful.
74
74
 
75
75
  ***
76
76
 
77
+ ### getSchema()
78
+
79
+ > **getSchema**(): `IEntitySchema`\<`unknown`\>
80
+
81
+ Get the schema for the entities.
82
+
83
+ #### Returns
84
+
85
+ `IEntitySchema`\<`unknown`\>
86
+
87
+ The schema for the entities.
88
+
89
+ #### Implementation of
90
+
91
+ `IEntityStorageConnector.getSchema`
92
+
93
+ ***
94
+
77
95
  ### get()
78
96
 
79
97
  > **get**(`id`, `secondaryIndex`?): `Promise`\<`undefined` \| `T`\>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/entity-storage-connector-file",
3
- "version": "0.0.1-next.4",
3
+ "version": "0.0.1-next.6",
4
4
  "description": "Entity Storage connector implementation using file storage",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@twin.org/core": "next",
18
18
  "@twin.org/entity": "next",
19
- "@twin.org/entity-storage-models": "0.0.1-next.4",
19
+ "@twin.org/entity-storage-models": "0.0.1-next.6",
20
20
  "@twin.org/logging-models": "next",
21
21
  "@twin.org/nameof": "next"
22
22
  },