@twin.org/messaging-service 0.0.1-next.2 → 0.0.1-next.4

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.
@@ -235,4 +235,14 @@ class MessagingService {
235
235
  }
236
236
  }
237
237
 
238
+ // Copyright 2024 IOTA Stiftung.
239
+ // SPDX-License-Identifier: Apache-2.0.
240
+ /**
241
+ * Initialize the schema for the messaging service.
242
+ */
243
+ function initSchema() {
244
+ entity.EntitySchemaFactory.register("TemplateEntry", () => entity.EntitySchemaHelper.getSchema(TemplateEntry));
245
+ }
246
+
238
247
  exports.MessagingService = MessagingService;
248
+ exports.initSchema = initSchema;
@@ -1,7 +1,7 @@
1
1
  import { Is, GeneralError, Guards } from '@twin.org/core';
2
2
  import { EntityStorageConnectorFactory } from '@twin.org/entity-storage-models';
3
3
  import { MessagingEmailConnectorFactory, MessagingPushNotificationsConnectorFactory, MessagingSmsConnectorFactory } from '@twin.org/messaging-models';
4
- import { property, entity } from '@twin.org/entity';
4
+ import { property, entity, EntitySchemaFactory, EntitySchemaHelper } from '@twin.org/entity';
5
5
 
6
6
  // Copyright 2024 IOTA Stiftung.
7
7
  // SPDX-License-Identifier: Apache-2.0.
@@ -233,4 +233,13 @@ class MessagingService {
233
233
  }
234
234
  }
235
235
 
236
- export { MessagingService };
236
+ // Copyright 2024 IOTA Stiftung.
237
+ // SPDX-License-Identifier: Apache-2.0.
238
+ /**
239
+ * Initialize the schema for the messaging service.
240
+ */
241
+ function initSchema() {
242
+ EntitySchemaFactory.register("TemplateEntry", () => EntitySchemaHelper.getSchema(TemplateEntry));
243
+ }
244
+
245
+ export { MessagingService, initSchema };
@@ -1 +1,2 @@
1
1
  export * from "./messagingService";
2
+ export * from "./schema";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Initialize the schema for the messaging service.
3
+ */
4
+ export declare function initSchema(): void;
@@ -0,0 +1,9 @@
1
+ # Function: initSchema()
2
+
3
+ > **initSchema**(): `void`
4
+
5
+ Initialize the schema for the messaging service.
6
+
7
+ ## Returns
8
+
9
+ `void`
@@ -3,3 +3,7 @@
3
3
  ## Classes
4
4
 
5
5
  - [MessagingService](classes/MessagingService.md)
6
+
7
+ ## Functions
8
+
9
+ - [initSchema](functions/initSchema.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/messaging-service",
3
- "version": "0.0.1-next.2",
3
+ "version": "0.0.1-next.4",
4
4
  "description": "Messaging service implementation",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,9 +16,9 @@
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.2",
19
+ "@twin.org/entity-storage-models": "^0.0.1-next.4",
20
20
  "@twin.org/logging-models": "next",
21
- "@twin.org/messaging-models": "0.0.1-next.2",
21
+ "@twin.org/messaging-models": "0.0.1-next.4",
22
22
  "@twin.org/nameof": "next"
23
23
  },
24
24
  "main": "./dist/cjs/index.cjs",