@twin.org/messaging-service 0.0.1 → 0.0.2-next.2
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.
- package/dist/cjs/index.cjs +5 -9
- package/dist/esm/index.mjs +5 -9
- package/dist/types/entities/templateEntry.d.ts +1 -1
- package/dist/types/messagingService.d.ts +0 -4
- package/docs/changelog.md +37 -0
- package/docs/reference/classes/MessagingService.md +0 -8
- package/docs/reference/classes/TemplateEntry.md +2 -2
- package/package.json +7 -7
package/dist/cjs/index.cjs
CHANGED
|
@@ -26,7 +26,7 @@ exports.TemplateEntry = class TemplateEntry {
|
|
|
26
26
|
/**
|
|
27
27
|
* The timestamp of the template entry.
|
|
28
28
|
*/
|
|
29
|
-
|
|
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: "
|
|
45
|
-
__metadata("design:type",
|
|
46
|
-
], exports.TemplateEntry.prototype, "
|
|
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.
|
|
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);
|
package/dist/esm/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ let TemplateEntry = class TemplateEntry {
|
|
|
24
24
|
/**
|
|
25
25
|
* The timestamp of the template entry.
|
|
26
26
|
*/
|
|
27
|
-
|
|
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: "
|
|
43
|
-
__metadata("design:type",
|
|
44
|
-
], TemplateEntry.prototype, "
|
|
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.
|
|
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);
|
|
@@ -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,42 @@
|
|
|
1
1
|
# @twin.org/messaging-service - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.2](https://github.com/twinfoundation/messaging/compare/messaging-service-v0.0.2-next.1...messaging-service-v0.0.2-next.2) (2025-08-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* eslint migration to flat config ([faa02ec](https://github.com/twinfoundation/messaging/commit/faa02ec0ef450db88b08e938415e40cf13625d15))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/messaging-models bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
16
|
+
|
|
17
|
+
## [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)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* Messaging services ([#3](https://github.com/twinfoundation/messaging/issues/3)) ([32571b5](https://github.com/twinfoundation/messaging/commit/32571b5abf5d3fc3b168074c23507e926c5d00b0))
|
|
23
|
+
* remove unused namespace ([2201898](https://github.com/twinfoundation/messaging/commit/22018988b84e4b3e76da1a1e16f29bfde7e6f0e6))
|
|
24
|
+
* update dependencies ([53dcde6](https://github.com/twinfoundation/messaging/commit/53dcde60d6efaee5957296f6d097cb97c0fb2f9d))
|
|
25
|
+
* update framework core ([fc476b4](https://github.com/twinfoundation/messaging/commit/fc476b48e6075de0ae871e3cec1fa179aa04b5eb))
|
|
26
|
+
* use shared store mechanism ([#8](https://github.com/twinfoundation/messaging/issues/8)) ([9ad65c2](https://github.com/twinfoundation/messaging/commit/9ad65c239ba77bb75604a1f6e51b975357f3228d))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/twinfoundation/messaging/commit/8b99d4f01c4f2b08da8d2affc1b9554fcb0d3690))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Dependencies
|
|
35
|
+
|
|
36
|
+
* The following workspace dependencies were updated
|
|
37
|
+
* dependencies
|
|
38
|
+
* @twin.org/messaging-models bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
39
|
+
|
|
3
40
|
## 0.0.1 (2025-07-08)
|
|
4
41
|
|
|
5
42
|
|
|
@@ -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`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/messaging-service",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-next.2",
|
|
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": "
|
|
18
|
-
"@twin.org/entity": "
|
|
19
|
-
"@twin.org/entity-storage-models": "
|
|
20
|
-
"@twin.org/logging-models": "
|
|
21
|
-
"@twin.org/messaging-models": "
|
|
22
|
-
"@twin.org/nameof": "
|
|
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.2",
|
|
22
|
+
"@twin.org/nameof": "next"
|
|
23
23
|
},
|
|
24
24
|
"main": "./dist/cjs/index.cjs",
|
|
25
25
|
"module": "./dist/esm/index.mjs",
|