@itzworking/events-manager 0.0.161 → 0.0.196
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/application-event-detail-metadata.js +26 -0
- package/dist-cjs/application-event-detail.js +26 -0
- package/dist-es/application-event-detail-metadata.js +22 -0
- package/dist-es/application-event-detail.js +22 -0
- package/dist-es/errors/index.js +1 -0
- package/dist-es/errors/missing-environment-variables-error.js +9 -0
- package/dist-es/eventbridge/eventbridge.js +2 -0
- package/dist-es/eventbridge/index.js +2 -0
- package/dist-es/eventbridge/put-eb-events.js +24 -0
- package/dist-es/events-manager.js +84 -0
- package/dist-es/index.js +5 -0
- package/{dist → dist-types}/application-event-detail-metadata.d.ts +0 -1
- package/{dist → dist-types}/application-event-detail.d.ts +0 -1
- package/{dist → dist-types}/errors/index.d.ts +0 -1
- package/{dist → dist-types}/errors/missing-environment-variables-error.d.ts +0 -1
- package/{dist → dist-types}/eventbridge/eventbridge.d.ts +0 -1
- package/{dist → dist-types}/eventbridge/index.d.ts +0 -1
- package/{dist → dist-types}/eventbridge/put-eb-events.d.ts +0 -1
- package/{dist → dist-types}/events-manager.d.ts +0 -1
- package/{dist → dist-types}/index.d.ts +0 -1
- package/package.json +24 -24
- package/dist/application-event-detail-metadata.d.ts.map +0 -1
- package/dist/application-event-detail-metadata.js +0 -38
- package/dist/application-event-detail.d.ts.map +0 -1
- package/dist/application-event-detail.js +0 -37
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/missing-environment-variables-error.d.ts.map +0 -1
- package/dist/eventbridge/eventbridge.d.ts.map +0 -1
- package/dist/eventbridge/index.d.ts.map +0 -1
- package/dist/eventbridge/put-eb-events.d.ts.map +0 -1
- package/dist/events-manager.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- /package/{dist → dist-cjs}/errors/index.js +0 -0
- /package/{dist → dist-cjs}/errors/missing-environment-variables-error.js +0 -0
- /package/{dist → dist-cjs}/eventbridge/eventbridge.js +0 -0
- /package/{dist → dist-cjs}/eventbridge/index.js +0 -0
- /package/{dist → dist-cjs}/eventbridge/put-eb-events.js +0 -0
- /package/{dist → dist-cjs}/events-manager.js +0 -0
- /package/{dist → dist-cjs}/index.js +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApplicationEventDetailMetadata = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const decorated_class_1 = require("@itzworking/decorated-class");
|
|
6
|
+
const uuid_1 = require("uuid");
|
|
7
|
+
class ApplicationEventDetailMetadata extends decorated_class_1.DecoratedClass {
|
|
8
|
+
idempotencyKey;
|
|
9
|
+
createdAt;
|
|
10
|
+
constructor(props) {
|
|
11
|
+
super(props);
|
|
12
|
+
if (!props?.idempotencyKey) {
|
|
13
|
+
this.idempotencyKey = (0, uuid_1.v4)();
|
|
14
|
+
}
|
|
15
|
+
if (!props?.createdAt) {
|
|
16
|
+
this.createdAt = Date.now();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.ApplicationEventDetailMetadata = ApplicationEventDetailMetadata;
|
|
21
|
+
tslib_1.__decorate([
|
|
22
|
+
(0, decorated_class_1.Attribute)(decorated_class_1.AttributeType.String)
|
|
23
|
+
], ApplicationEventDetailMetadata.prototype, "idempotencyKey", void 0);
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
(0, decorated_class_1.Attribute)(decorated_class_1.AttributeType.Integer)
|
|
26
|
+
], ApplicationEventDetailMetadata.prototype, "createdAt", void 0);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApplicationEventDetail = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const decorated_class_1 = require("@itzworking/decorated-class");
|
|
6
|
+
const application_event_detail_metadata_1 = require("./application-event-detail-metadata");
|
|
7
|
+
class ApplicationEventDetail extends decorated_class_1.DecoratedClass {
|
|
8
|
+
metadata;
|
|
9
|
+
data;
|
|
10
|
+
constructor(props) {
|
|
11
|
+
super(props);
|
|
12
|
+
if (!props?.metadata) {
|
|
13
|
+
this.metadata = new application_event_detail_metadata_1.ApplicationEventDetailMetadata(props?.metadata);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ApplicationEventDetail = ApplicationEventDetail;
|
|
18
|
+
tslib_1.__decorate([
|
|
19
|
+
decorated_class_1.NotNull,
|
|
20
|
+
(0, decorated_class_1.Attribute)(decorated_class_1.AttributeType.Object, {
|
|
21
|
+
nestedType: application_event_detail_metadata_1.ApplicationEventDetailMetadata,
|
|
22
|
+
})
|
|
23
|
+
], ApplicationEventDetail.prototype, "metadata", void 0);
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
(0, decorated_class_1.Attribute)(decorated_class_1.AttributeType.Object)
|
|
26
|
+
], ApplicationEventDetail.prototype, "data", void 0);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Attribute, AttributeType, DecoratedClass, } from "@itzworking/decorated-class";
|
|
3
|
+
import { v4 as uuid } from "uuid";
|
|
4
|
+
export class ApplicationEventDetailMetadata extends DecoratedClass {
|
|
5
|
+
idempotencyKey;
|
|
6
|
+
createdAt;
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
if (!props?.idempotencyKey) {
|
|
10
|
+
this.idempotencyKey = uuid();
|
|
11
|
+
}
|
|
12
|
+
if (!props?.createdAt) {
|
|
13
|
+
this.createdAt = Date.now();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
Attribute(AttributeType.String)
|
|
19
|
+
], ApplicationEventDetailMetadata.prototype, "idempotencyKey", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
Attribute(AttributeType.Integer)
|
|
22
|
+
], ApplicationEventDetailMetadata.prototype, "createdAt", void 0);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Attribute, AttributeType, DecoratedClass, NotNull, } from "@itzworking/decorated-class";
|
|
3
|
+
import { ApplicationEventDetailMetadata } from "./application-event-detail-metadata";
|
|
4
|
+
export class ApplicationEventDetail extends DecoratedClass {
|
|
5
|
+
metadata;
|
|
6
|
+
data;
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
if (!props?.metadata) {
|
|
10
|
+
this.metadata = new ApplicationEventDetailMetadata(props?.metadata);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
NotNull,
|
|
16
|
+
Attribute(AttributeType.Object, {
|
|
17
|
+
nestedType: ApplicationEventDetailMetadata,
|
|
18
|
+
})
|
|
19
|
+
], ApplicationEventDetail.prototype, "metadata", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
Attribute(AttributeType.Object)
|
|
22
|
+
], ApplicationEventDetail.prototype, "data", void 0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./missing-environment-variables-error";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export class MissingEnvironmentVariablesError extends Error {
|
|
2
|
+
constructor(missingEnvironmentVariables) {
|
|
3
|
+
super(JSON.stringify({
|
|
4
|
+
name: "MissingEnvironmentVariablesError",
|
|
5
|
+
message: `Missing environment variables: ${missingEnvironmentVariables.join(", ")}`,
|
|
6
|
+
}));
|
|
7
|
+
this.name = "MissingEnvironmentVariablesError";
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { logger } from "@itzworking/powertools";
|
|
2
|
+
import { PutEventsCommand, } from "@aws-sdk/client-eventbridge";
|
|
3
|
+
import { eventbridge } from "./eventbridge";
|
|
4
|
+
export const putEbEvents = async (input) => {
|
|
5
|
+
logger.debug({
|
|
6
|
+
message: "send eventbridge PutEventsCommand",
|
|
7
|
+
awsService: "eventbridge",
|
|
8
|
+
action: "PutEventsCommand",
|
|
9
|
+
input,
|
|
10
|
+
});
|
|
11
|
+
try {
|
|
12
|
+
return eventbridge.send(new PutEventsCommand(input));
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
logger.error({
|
|
16
|
+
message: "send eventbridge PutEventsCommand",
|
|
17
|
+
awsService: "eventbridge",
|
|
18
|
+
action: "PutEventsCommand",
|
|
19
|
+
input,
|
|
20
|
+
error,
|
|
21
|
+
});
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { validator } from "@itzworking/decorated-class";
|
|
2
|
+
import { logger } from "@itzworking/powertools";
|
|
3
|
+
import { ApplicationEventDetail } from "./application-event-detail";
|
|
4
|
+
import { putEbEvents } from "./eventbridge";
|
|
5
|
+
import { MissingEnvironmentVariablesError } from "./errors";
|
|
6
|
+
class EventsManagerClass {
|
|
7
|
+
ready = false;
|
|
8
|
+
serviceName;
|
|
9
|
+
eventBusName;
|
|
10
|
+
eventSource;
|
|
11
|
+
setup() {
|
|
12
|
+
if (this.ready) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
this.serviceName = process.env.SERVICE_NAME || "";
|
|
16
|
+
this.eventBusName =
|
|
17
|
+
process.env.EVENT_BUS_NAME || process.env.MAIN_EVENT_BUS_NAME || "";
|
|
18
|
+
this.eventSource = process.env.NAMESPACE || "";
|
|
19
|
+
const missingEnvironmentVariables = [];
|
|
20
|
+
if (!this.serviceName) {
|
|
21
|
+
missingEnvironmentVariables.push("SERVICE_NAME");
|
|
22
|
+
}
|
|
23
|
+
if (!this.eventBusName) {
|
|
24
|
+
missingEnvironmentVariables.push("EVENT_BUS_NAME or MAIN_EVENT_BUS_NAME");
|
|
25
|
+
}
|
|
26
|
+
if (!this.eventSource) {
|
|
27
|
+
missingEnvironmentVariables.push("NAMESPACE");
|
|
28
|
+
}
|
|
29
|
+
if (missingEnvironmentVariables.length > 0) {
|
|
30
|
+
logger.error("Missing environment variables", {
|
|
31
|
+
missing: missingEnvironmentVariables,
|
|
32
|
+
});
|
|
33
|
+
throw new MissingEnvironmentVariablesError(missingEnvironmentVariables);
|
|
34
|
+
}
|
|
35
|
+
logger.debug("EventsManager initialized", {
|
|
36
|
+
serviceName: this.serviceName,
|
|
37
|
+
eventBusName: this.eventBusName,
|
|
38
|
+
eventSource: this.eventSource,
|
|
39
|
+
});
|
|
40
|
+
this.ready = true;
|
|
41
|
+
}
|
|
42
|
+
async publishEvent(entityClass, eventName, data) {
|
|
43
|
+
this.setup();
|
|
44
|
+
logger.debug("Publishing event", {
|
|
45
|
+
eventName,
|
|
46
|
+
entityClass: entityClass.name,
|
|
47
|
+
});
|
|
48
|
+
const applicationEventDetail = new ApplicationEventDetail({
|
|
49
|
+
data: data instanceof entityClass ? data : new entityClass(data),
|
|
50
|
+
});
|
|
51
|
+
try {
|
|
52
|
+
validator.validate(applicationEventDetail);
|
|
53
|
+
const events = {
|
|
54
|
+
Entries: [
|
|
55
|
+
{
|
|
56
|
+
Detail: JSON.stringify(applicationEventDetail),
|
|
57
|
+
DetailType: `${this.serviceName}.${eventName}`,
|
|
58
|
+
Source: this.eventSource,
|
|
59
|
+
EventBusName: this.eventBusName,
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
logger.debug("Sending event to EventBridge", {
|
|
64
|
+
detailType: events.Entries[0].DetailType,
|
|
65
|
+
eventBusName: this.eventBusName,
|
|
66
|
+
});
|
|
67
|
+
const result = await putEbEvents(events);
|
|
68
|
+
logger.info("Event published successfully", {
|
|
69
|
+
eventName,
|
|
70
|
+
detailType: events.Entries[0].DetailType,
|
|
71
|
+
});
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
logger.error("Failed to publish event", {
|
|
76
|
+
eventName,
|
|
77
|
+
error: error.message,
|
|
78
|
+
entityClass: entityClass.name,
|
|
79
|
+
});
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export const EventsManager = new EventsManagerClass();
|
package/dist-es/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itzworking/events-manager",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
3
|
+
"version": "0.0.196",
|
|
4
|
+
"main": "./dist-cjs/index.js",
|
|
5
|
+
"module": "./dist-es/index.js",
|
|
6
|
+
"types": "./dist-types/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build:all": "concurrently \"npm run build:cjs\" \"npm run build:es\" \"npm run build:types\"",
|
|
9
|
+
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
10
|
+
"build:es": "tsc -p tsconfig.es.json",
|
|
11
|
+
"build:types": "tsc -p tsconfig.types.json"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=18.0.0"
|
|
16
15
|
},
|
|
17
16
|
"files": [
|
|
18
|
-
"dist",
|
|
17
|
+
"dist-*/**",
|
|
19
18
|
"!**/*.tsbuildinfo"
|
|
20
19
|
],
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@aws-sdk/client-eventbridge": "3.x",
|
|
22
|
+
"@itzworking/decorated-class": "0.0.196",
|
|
23
|
+
"@itzworking/powertools": "0.0.196",
|
|
24
|
+
"uuid": "10.x"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"tslib": "^2.3.0"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://itzworking.io",
|
|
21
30
|
"nx": {
|
|
22
31
|
"targets": {
|
|
23
32
|
"publish": {
|
|
24
33
|
"dependsOn": [
|
|
25
|
-
"build"
|
|
34
|
+
"build:all"
|
|
26
35
|
],
|
|
27
36
|
"executor": "nx:run-commands",
|
|
28
37
|
"options": {
|
|
@@ -33,14 +42,5 @@
|
|
|
33
42
|
"tags": [
|
|
34
43
|
"type:lib"
|
|
35
44
|
]
|
|
36
|
-
},
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"tslib": "^2.3.0"
|
|
39
|
-
},
|
|
40
|
-
"peerDependencies": {
|
|
41
|
-
"@aws-sdk/client-eventbridge": "3.x",
|
|
42
|
-
"@itzworking/decorated-class": "0.0.161",
|
|
43
|
-
"@itzworking/powertools": "0.0.161",
|
|
44
|
-
"uuid": "10.x"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"application-event-detail-metadata.d.ts","sourceRoot":"","sources":["../src/application-event-detail-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EACf,MAAM,6BAA6B,CAAC;AAGrC,qBAAa,8BAA+B,SAAQ,cAAc;IAEhE,cAAc,EAAE,MAAM,CAAC;IAGvB,SAAS,EAAE,MAAM,CAAC;gBAEN,KAAK,CAAC,EAAE,GAAG;CASxB"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApplicationEventDetailMetadata = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const decorated_class_1 = require("@itzworking/decorated-class");
|
|
6
|
-
const uuid_1 = require("uuid");
|
|
7
|
-
let ApplicationEventDetailMetadata = (() => {
|
|
8
|
-
let _classSuper = decorated_class_1.DecoratedClass;
|
|
9
|
-
let _idempotencyKey_decorators;
|
|
10
|
-
let _idempotencyKey_initializers = [];
|
|
11
|
-
let _idempotencyKey_extraInitializers = [];
|
|
12
|
-
let _createdAt_decorators;
|
|
13
|
-
let _createdAt_initializers = [];
|
|
14
|
-
let _createdAt_extraInitializers = [];
|
|
15
|
-
return class ApplicationEventDetailMetadata extends _classSuper {
|
|
16
|
-
static {
|
|
17
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
18
|
-
_idempotencyKey_decorators = [(0, decorated_class_1.Attribute)(decorated_class_1.AttributeType.String)];
|
|
19
|
-
_createdAt_decorators = [(0, decorated_class_1.Attribute)(decorated_class_1.AttributeType.Integer)];
|
|
20
|
-
tslib_1.__esDecorate(null, null, _idempotencyKey_decorators, { kind: "field", name: "idempotencyKey", static: false, private: false, access: { has: obj => "idempotencyKey" in obj, get: obj => obj.idempotencyKey, set: (obj, value) => { obj.idempotencyKey = value; } }, metadata: _metadata }, _idempotencyKey_initializers, _idempotencyKey_extraInitializers);
|
|
21
|
-
tslib_1.__esDecorate(null, null, _createdAt_decorators, { kind: "field", name: "createdAt", static: false, private: false, access: { has: obj => "createdAt" in obj, get: obj => obj.createdAt, set: (obj, value) => { obj.createdAt = value; } }, metadata: _metadata }, _createdAt_initializers, _createdAt_extraInitializers);
|
|
22
|
-
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
23
|
-
}
|
|
24
|
-
idempotencyKey = tslib_1.__runInitializers(this, _idempotencyKey_initializers, void 0);
|
|
25
|
-
createdAt = (tslib_1.__runInitializers(this, _idempotencyKey_extraInitializers), tslib_1.__runInitializers(this, _createdAt_initializers, void 0));
|
|
26
|
-
constructor(props) {
|
|
27
|
-
super(props);
|
|
28
|
-
tslib_1.__runInitializers(this, _createdAt_extraInitializers);
|
|
29
|
-
if (!props?.idempotencyKey) {
|
|
30
|
-
this.idempotencyKey = (0, uuid_1.v4)();
|
|
31
|
-
}
|
|
32
|
-
if (!props?.createdAt) {
|
|
33
|
-
this.createdAt = Date.now();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
exports.ApplicationEventDetailMetadata = ApplicationEventDetailMetadata;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"application-event-detail.d.ts","sourceRoot":"","sources":["../src/application-event-detail.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EAEf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF,qBAAa,sBAAsB,CACjC,CAAC,SAAS,cAAc,CACxB,SAAQ,cAAc;IAKtB,QAAQ,EAAE,8BAA8B,CAAC;IAGzC,IAAI,EAAE,CAAC,CAAC;gBAEI,KAAK,CAAC,EAAE,GAAG;CAMxB"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApplicationEventDetail = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const decorated_class_1 = require("@itzworking/decorated-class");
|
|
6
|
-
const application_event_detail_metadata_1 = require("./application-event-detail-metadata");
|
|
7
|
-
let ApplicationEventDetail = (() => {
|
|
8
|
-
let _classSuper = decorated_class_1.DecoratedClass;
|
|
9
|
-
let _metadata_decorators;
|
|
10
|
-
let _metadata_initializers = [];
|
|
11
|
-
let _metadata_extraInitializers = [];
|
|
12
|
-
let _data_decorators;
|
|
13
|
-
let _data_initializers = [];
|
|
14
|
-
let _data_extraInitializers = [];
|
|
15
|
-
return class ApplicationEventDetail extends _classSuper {
|
|
16
|
-
static {
|
|
17
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
18
|
-
_metadata_decorators = [decorated_class_1.NotNull, (0, decorated_class_1.Attribute)(decorated_class_1.AttributeType.Object, {
|
|
19
|
-
nestedType: application_event_detail_metadata_1.ApplicationEventDetailMetadata,
|
|
20
|
-
})];
|
|
21
|
-
_data_decorators = [(0, decorated_class_1.Attribute)(decorated_class_1.AttributeType.Object)];
|
|
22
|
-
tslib_1.__esDecorate(null, null, _metadata_decorators, { kind: "field", name: "metadata", static: false, private: false, access: { has: obj => "metadata" in obj, get: obj => obj.metadata, set: (obj, value) => { obj.metadata = value; } }, metadata: _metadata }, _metadata_initializers, _metadata_extraInitializers);
|
|
23
|
-
tslib_1.__esDecorate(null, null, _data_decorators, { kind: "field", name: "data", static: false, private: false, access: { has: obj => "data" in obj, get: obj => obj.data, set: (obj, value) => { obj.data = value; } }, metadata: _metadata }, _data_initializers, _data_extraInitializers);
|
|
24
|
-
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
25
|
-
}
|
|
26
|
-
metadata = tslib_1.__runInitializers(this, _metadata_initializers, void 0);
|
|
27
|
-
data = (tslib_1.__runInitializers(this, _metadata_extraInitializers), tslib_1.__runInitializers(this, _data_initializers, void 0));
|
|
28
|
-
constructor(props) {
|
|
29
|
-
super(props);
|
|
30
|
-
tslib_1.__runInitializers(this, _data_extraInitializers);
|
|
31
|
-
if (!props?.metadata) {
|
|
32
|
-
this.metadata = new application_event_detail_metadata_1.ApplicationEventDetailMetadata(props?.metadata);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
})();
|
|
37
|
-
exports.ApplicationEventDetail = ApplicationEventDetail;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"missing-environment-variables-error.d.ts","sourceRoot":"","sources":["../../src/errors/missing-environment-variables-error.ts"],"names":[],"mappings":"AAAA,qBAAa,gCAAiC,SAAQ,KAAK;gBAC7C,2BAA2B,EAAE,MAAM,EAAE;CAWlD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventbridge.d.ts","sourceRoot":"","sources":["../../src/eventbridge/eventbridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,eAAO,MAAM,WAAW,mBAA4B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eventbridge/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAE9B,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"put-eb-events.d.ts","sourceRoot":"","sources":["../../src/eventbridge/put-eb-events.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,qBAAqB,EACtB,MAAM,6BAA6B,CAAC;AAGrC,eAAO,MAAM,WAAW,UAAiB,qBAAqB,0EAmB7D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events-manager.d.ts","sourceRoot":"","sources":["../src/events-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAa,MAAM,6BAA6B,CAAC;AAMxE,cAAM,kBAAkB;IACtB,KAAK,UAAS;IAEd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IAEpB,KAAK;IAsCC,YAAY,CAAC,CAAC,SAAS,cAAc,EACzC,WAAW,EAAE,KAAK,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,EACnC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,CAAC;CAiDV;AAED,eAAO,MAAM,aAAa,oBAA2B,CAAC"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAE9B,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|