@twin.org/entity-storage-connector-dynamodb 0.0.1-next.4 → 0.0.1-next.5

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.
@@ -214,6 +214,13 @@ class DynamoDbEntityStorageConnector {
214
214
  }
215
215
  return true;
216
216
  }
217
+ /**
218
+ * Get the schema for the entities.
219
+ * @returns The schema for the entities.
220
+ */
221
+ getSchema() {
222
+ return this._entitySchema;
223
+ }
217
224
  /**
218
225
  * Get an entity.
219
226
  * @param id The id of the entity to get, or the index value if secondaryIndex is set.
@@ -212,6 +212,13 @@ class DynamoDbEntityStorageConnector {
212
212
  }
213
213
  return true;
214
214
  }
215
+ /**
216
+ * Get the schema for the entities.
217
+ * @returns The schema for the entities.
218
+ */
219
+ getSchema() {
220
+ return this._entitySchema;
221
+ }
215
222
  /**
216
223
  * Get an entity.
217
224
  * @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 { IDynamoDbEntityStorageConnectorConfig } from "./models/IDynamoDbEntityStorageConnectorConfig";
4
4
  /**
@@ -27,6 +27,11 @@ export declare class DynamoDbEntityStorageConnector<T = unknown> implements IEnt
27
27
  * @returns True if the bootstrapping process was successful.
28
28
  */
29
29
  bootstrap(nodeLoggingConnectorType?: string): Promise<boolean>;
30
+ /**
31
+ * Get the schema for the entities.
32
+ * @returns The schema for the entities.
33
+ */
34
+ getSchema(): IEntitySchema;
30
35
  /**
31
36
  * Get an entity.
32
37
  * @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-dynamodb - Changelog
2
2
 
3
- ## v0.0.1-next.4
3
+ ## v0.0.1-next.5
4
4
 
5
5
  - Initial Release
@@ -78,6 +78,24 @@ True if the bootstrapping process was successful.
78
78
 
79
79
  ***
80
80
 
81
+ ### getSchema()
82
+
83
+ > **getSchema**(): `IEntitySchema`\<`unknown`\>
84
+
85
+ Get the schema for the entities.
86
+
87
+ #### Returns
88
+
89
+ `IEntitySchema`\<`unknown`\>
90
+
91
+ The schema for the entities.
92
+
93
+ #### Implementation of
94
+
95
+ `IEntityStorageConnector.getSchema`
96
+
97
+ ***
98
+
81
99
  ### get()
82
100
 
83
101
  > **get**(`id`, `secondaryIndex`?): `Promise`\<`undefined` \| `T`\>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/entity-storage-connector-dynamodb",
3
- "version": "0.0.1-next.4",
3
+ "version": "0.0.1-next.5",
4
4
  "description": "Entity Storage connector implementation using DynamoDb storage",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,7 +19,7 @@
19
19
  "@aws-sdk/util-dynamodb": "3.656",
20
20
  "@twin.org/core": "next",
21
21
  "@twin.org/entity": "next",
22
- "@twin.org/entity-storage-models": "0.0.1-next.4",
22
+ "@twin.org/entity-storage-models": "0.0.1-next.5",
23
23
  "@twin.org/logging-models": "next",
24
24
  "@twin.org/nameof": "next"
25
25
  },