@twin.org/messaging-service 0.0.1 → 0.0.2-next.1

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.
@@ -26,7 +26,7 @@ exports.TemplateEntry = class TemplateEntry {
26
26
  /**
27
27
  * The timestamp of the template entry.
28
28
  */
29
- ts;
29
+ dateCreated;
30
30
  };
31
31
  __decorate([
32
32
  entity.property({ type: "string", isPrimary: true }),
@@ -41,9 +41,9 @@ __decorate([
41
41
  __metadata("design:type", String)
42
42
  ], exports.TemplateEntry.prototype, "content", void 0);
43
43
  __decorate([
44
- entity.property({ type: "integer", format: "uint64", sortDirection: entity.SortDirection.Descending }),
45
- __metadata("design:type", Number)
46
- ], exports.TemplateEntry.prototype, "ts", void 0);
44
+ entity.property({ type: "string", format: "date-time", sortDirection: entity.SortDirection.Descending }),
45
+ __metadata("design:type", String)
46
+ ], exports.TemplateEntry.prototype, "dateCreated", void 0);
47
47
  exports.TemplateEntry = __decorate([
48
48
  entity.entity()
49
49
  ], exports.TemplateEntry);
@@ -54,10 +54,6 @@ exports.TemplateEntry = __decorate([
54
54
  * Service for performing email messaging operations to a connector.
55
55
  */
56
56
  class MessagingService {
57
- /**
58
- * The namespace for the service.
59
- */
60
- static NAMESPACE = "messaging";
61
57
  /**
62
58
  * Runtime name for the class.
63
59
  */
@@ -189,7 +185,7 @@ class MessagingService {
189
185
  core.Guards.stringValue(this.CLASS_NAME, "content", content);
190
186
  const templateEntry = new exports.TemplateEntry();
191
187
  templateEntry.id = `${templateId}:${locale}`;
192
- templateEntry.ts = Date.now();
188
+ templateEntry.dateCreated = new Date(Date.now()).toISOString();
193
189
  templateEntry.title = title;
194
190
  templateEntry.content = content;
195
191
  await this._entityStorageConnector.set(templateEntry);
@@ -24,7 +24,7 @@ let TemplateEntry = class TemplateEntry {
24
24
  /**
25
25
  * The timestamp of the template entry.
26
26
  */
27
- ts;
27
+ dateCreated;
28
28
  };
29
29
  __decorate([
30
30
  property({ type: "string", isPrimary: true }),
@@ -39,9 +39,9 @@ __decorate([
39
39
  __metadata("design:type", String)
40
40
  ], TemplateEntry.prototype, "content", void 0);
41
41
  __decorate([
42
- property({ type: "integer", format: "uint64", sortDirection: SortDirection.Descending }),
43
- __metadata("design:type", Number)
44
- ], TemplateEntry.prototype, "ts", void 0);
42
+ property({ type: "string", format: "date-time", sortDirection: SortDirection.Descending }),
43
+ __metadata("design:type", String)
44
+ ], TemplateEntry.prototype, "dateCreated", void 0);
45
45
  TemplateEntry = __decorate([
46
46
  entity()
47
47
  ], TemplateEntry);
@@ -52,10 +52,6 @@ TemplateEntry = __decorate([
52
52
  * Service for performing email messaging operations to a connector.
53
53
  */
54
54
  class MessagingService {
55
- /**
56
- * The namespace for the service.
57
- */
58
- static NAMESPACE = "messaging";
59
55
  /**
60
56
  * Runtime name for the class.
61
57
  */
@@ -187,7 +183,7 @@ class MessagingService {
187
183
  Guards.stringValue(this.CLASS_NAME, "content", content);
188
184
  const templateEntry = new TemplateEntry();
189
185
  templateEntry.id = `${templateId}:${locale}`;
190
- templateEntry.ts = Date.now();
186
+ templateEntry.dateCreated = new Date(Date.now()).toISOString();
191
187
  templateEntry.title = title;
192
188
  templateEntry.content = content;
193
189
  await this._entityStorageConnector.set(templateEntry);
@@ -17,5 +17,5 @@ export declare class TemplateEntry {
17
17
  /**
18
18
  * The timestamp of the template entry.
19
19
  */
20
- ts: number;
20
+ dateCreated: string;
21
21
  }
@@ -4,10 +4,6 @@ import type { IMessagingServiceConstructorOptions } from "./models/IMessagingSer
4
4
  * Service for performing email messaging operations to a connector.
5
5
  */
6
6
  export declare class MessagingService implements IMessagingComponent {
7
- /**
8
- * The namespace for the service.
9
- */
10
- static readonly NAMESPACE: string;
11
7
  /**
12
8
  * Runtime name for the class.
13
9
  */
package/docs/changelog.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @twin.org/messaging-service - Changelog
2
2
 
3
+ ## [0.0.2-next.1](https://github.com/twinfoundation/messaging/compare/messaging-service-v0.0.2-next.0...messaging-service-v0.0.2-next.1) (2025-08-20)
4
+
5
+
6
+ ### Features
7
+
8
+ * Messaging services ([#3](https://github.com/twinfoundation/messaging/issues/3)) ([32571b5](https://github.com/twinfoundation/messaging/commit/32571b5abf5d3fc3b168074c23507e926c5d00b0))
9
+ * remove unused namespace ([2201898](https://github.com/twinfoundation/messaging/commit/22018988b84e4b3e76da1a1e16f29bfde7e6f0e6))
10
+ * update dependencies ([53dcde6](https://github.com/twinfoundation/messaging/commit/53dcde60d6efaee5957296f6d097cb97c0fb2f9d))
11
+ * update framework core ([fc476b4](https://github.com/twinfoundation/messaging/commit/fc476b48e6075de0ae871e3cec1fa179aa04b5eb))
12
+ * use shared store mechanism ([#8](https://github.com/twinfoundation/messaging/issues/8)) ([9ad65c2](https://github.com/twinfoundation/messaging/commit/9ad65c239ba77bb75604a1f6e51b975357f3228d))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/twinfoundation/messaging/commit/8b99d4f01c4f2b08da8d2affc1b9554fcb0d3690))
18
+
19
+
20
+ ### Dependencies
21
+
22
+ * The following workspace dependencies were updated
23
+ * dependencies
24
+ * @twin.org/messaging-models bumped from 0.0.2-next.0 to 0.0.2-next.1
25
+
3
26
  ## 0.0.1 (2025-07-08)
4
27
 
5
28
 
@@ -28,14 +28,6 @@ The options for the connector.
28
28
 
29
29
  ## Properties
30
30
 
31
- ### NAMESPACE
32
-
33
- > `readonly` `static` **NAMESPACE**: `string` = `"messaging"`
34
-
35
- The namespace for the service.
36
-
37
- ***
38
-
39
31
  ### CLASS\_NAME
40
32
 
41
33
  > `readonly` **CLASS\_NAME**: `string`
@@ -38,8 +38,8 @@ The content.
38
38
 
39
39
  ***
40
40
 
41
- ### ts
41
+ ### dateCreated
42
42
 
43
- > **ts**: `number`
43
+ > **dateCreated**: `string`
44
44
 
45
45
  The timestamp of the template entry.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/messaging-service",
3
- "version": "0.0.1",
3
+ "version": "0.0.2-next.1",
4
4
  "description": "Messaging service implementation",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,12 +14,12 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/core": "^0.0.1",
18
- "@twin.org/entity": "^0.0.1",
19
- "@twin.org/entity-storage-models": "^0.0.1",
20
- "@twin.org/logging-models": "^0.0.1",
21
- "@twin.org/messaging-models": "^0.0.1",
22
- "@twin.org/nameof": "^0.0.1"
17
+ "@twin.org/core": "next",
18
+ "@twin.org/entity": "next",
19
+ "@twin.org/entity-storage-models": "next",
20
+ "@twin.org/logging-models": "next",
21
+ "@twin.org/messaging-models": "0.0.2-next.1",
22
+ "@twin.org/nameof": "next"
23
23
  },
24
24
  "main": "./dist/cjs/index.cjs",
25
25
  "module": "./dist/esm/index.mjs",