@alanszp/eventbridge-client 12.0.2 → 12.0.3
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/package.json +4 -7
- package/.gitignore +0 -3
- package/.npmignore +0 -3
- package/node_modules/@cspotcode/source-map-support/LICENSE.md +0 -21
- package/node_modules/@cspotcode/source-map-support/README.md +0 -289
- package/node_modules/@cspotcode/source-map-support/browser-source-map-support.js +0 -114
- package/node_modules/@cspotcode/source-map-support/package.json +0 -50
- package/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts +0 -7
- package/node_modules/@cspotcode/source-map-support/register-hook-require.js +0 -3
- package/node_modules/@cspotcode/source-map-support/register.d.ts +0 -7
- package/node_modules/@cspotcode/source-map-support/register.js +0 -1
- package/node_modules/@cspotcode/source-map-support/source-map-support.d.ts +0 -76
- package/node_modules/@cspotcode/source-map-support/source-map-support.js +0 -938
- package/node_modules/@jridgewell/trace-mapping/LICENSE +0 -19
- package/node_modules/@jridgewell/trace-mapping/README.md +0 -193
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +0 -514
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +0 -1
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +0 -528
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +0 -1
- package/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts +0 -8
- package/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts +0 -32
- package/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts +0 -7
- package/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts +0 -1
- package/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts +0 -2
- package/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +0 -16
- package/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts +0 -4
- package/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +0 -70
- package/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts +0 -85
- package/node_modules/@jridgewell/trace-mapping/package.json +0 -70
- package/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/node_modules/@types/node/assert.d.ts +0 -996
- package/node_modules/@types/node/async_hooks.d.ts +0 -539
- package/node_modules/@types/node/buffer.d.ts +0 -2362
- package/node_modules/@types/node/child_process.d.ts +0 -1540
- package/node_modules/@types/node/cluster.d.ts +0 -432
- package/node_modules/@types/node/console.d.ts +0 -415
- package/node_modules/@types/node/constants.d.ts +0 -19
- package/node_modules/@types/node/crypto.d.ts +0 -4487
- package/node_modules/@types/node/dgram.d.ts +0 -596
- package/node_modules/@types/node/diagnostics_channel.d.ts +0 -545
- package/node_modules/@types/node/dns/promises.d.ts +0 -425
- package/node_modules/@types/node/dns.d.ts +0 -809
- package/node_modules/@types/node/dom-events.d.ts +0 -122
- package/node_modules/@types/node/domain.d.ts +0 -170
- package/node_modules/@types/node/events.d.ts +0 -879
- package/node_modules/@types/node/fs/promises.d.ts +0 -1239
- package/node_modules/@types/node/fs.d.ts +0 -4311
- package/node_modules/@types/node/globals.d.ts +0 -411
- package/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/@types/node/http.d.ts +0 -1887
- package/node_modules/@types/node/http2.d.ts +0 -2382
- package/node_modules/@types/node/https.d.ts +0 -550
- package/node_modules/@types/node/index.d.ts +0 -88
- package/node_modules/@types/node/inspector.d.ts +0 -2747
- package/node_modules/@types/node/module.d.ts +0 -315
- package/node_modules/@types/node/net.d.ts +0 -949
- package/node_modules/@types/node/os.d.ts +0 -478
- package/node_modules/@types/node/package.json +0 -229
- package/node_modules/@types/node/path.d.ts +0 -191
- package/node_modules/@types/node/perf_hooks.d.ts +0 -645
- package/node_modules/@types/node/process.d.ts +0 -1561
- package/node_modules/@types/node/punycode.d.ts +0 -117
- package/node_modules/@types/node/querystring.d.ts +0 -141
- package/node_modules/@types/node/readline/promises.d.ts +0 -150
- package/node_modules/@types/node/readline.d.ts +0 -539
- package/node_modules/@types/node/repl.d.ts +0 -430
- package/node_modules/@types/node/stream/consumers.d.ts +0 -12
- package/node_modules/@types/node/stream/promises.d.ts +0 -83
- package/node_modules/@types/node/stream/web.d.ts +0 -366
- package/node_modules/@types/node/stream.d.ts +0 -1701
- package/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/node_modules/@types/node/test.d.ts +0 -1465
- package/node_modules/@types/node/timers/promises.d.ts +0 -93
- package/node_modules/@types/node/timers.d.ts +0 -240
- package/node_modules/@types/node/tls.d.ts +0 -1210
- package/node_modules/@types/node/trace_events.d.ts +0 -182
- package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
- package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
- package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
- package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
- package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
- package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
- package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
- package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
- package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
- package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
- package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
- package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
- package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
- package/node_modules/@types/node/ts4.8/events.d.ts +0 -879
- package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
- package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
- package/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
- package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
- package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
- package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
- package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
- package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
- package/node_modules/@types/node/ts4.8/module.d.ts +0 -315
- package/node_modules/@types/node/ts4.8/net.d.ts +0 -949
- package/node_modules/@types/node/ts4.8/os.d.ts +0 -478
- package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
- package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
- package/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
- package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
- package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
- package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
- package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
- package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
- package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
- package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
- package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
- package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
- package/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
- package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
- package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
- package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
- package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
- package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
- package/node_modules/@types/node/ts4.8/url.d.ts +0 -927
- package/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
- package/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
- package/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
- package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
- package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
- package/node_modules/@types/node/tty.d.ts +0 -208
- package/node_modules/@types/node/url.d.ts +0 -927
- package/node_modules/@types/node/util.d.ts +0 -2183
- package/node_modules/@types/node/v8.d.ts +0 -764
- package/node_modules/@types/node/vm.d.ts +0 -903
- package/node_modules/@types/node/wasi.d.ts +0 -179
- package/node_modules/@types/node/worker_threads.d.ts +0 -691
- package/node_modules/@types/node/zlib.d.ts +0 -517
- package/src/aws/awsEventbridgeClient.ts +0 -4
- package/src/aws/awsTypes.ts +0 -10
- package/src/aws/index.ts +0 -2
- package/src/basicEventbridgeClient.test.ts +0 -149
- package/src/basicEventbridgeClient.ts +0 -160
- package/src/helpers/mapLaraEventToAWSEvent.ts +0 -37
- package/src/index.ts +0 -3
- package/src/mockEventbridgeClient.ts +0 -11
- package/src/mocks/fixtures/eventbridgeFixture.ts +0 -41
- package/src/types/UpdatedEvent.ts +0 -39
- package/src/types/index.ts +0 -1
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { ILogger } from "@alanszp/logger";
|
|
2
|
-
import { SharedContext } from "@alanszp/shared-context";
|
|
3
|
-
import { chain, omit, partition } from "lodash";
|
|
4
|
-
import {
|
|
5
|
-
getEventbridgeClient,
|
|
6
|
-
PutEventEntryRequest,
|
|
7
|
-
PutEventEntryResponse,
|
|
8
|
-
} from "./aws";
|
|
9
|
-
import { mapLaraEventToAWSEvent } from "./helpers/mapLaraEventToAWSEvent";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Represents an event that is sent in the Lara ecosystem.
|
|
13
|
-
*
|
|
14
|
-
* @property topic: The topic of the event. E.g.: if an employee was created, topid would be employee.created.
|
|
15
|
-
* @property body: The body of the event. This will be used to match in the rules, along with the topic and maybe the id. If it has a property id it
|
|
16
|
-
* will be overwritten by the id sent to this method in the parameters.
|
|
17
|
-
*/
|
|
18
|
-
export type LaraEvent = {
|
|
19
|
-
topic: string;
|
|
20
|
-
body: Record<string, unknown>;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export type PutEventFailedEntryResponse = PutEventEntryResponse & {
|
|
24
|
-
event: PutEventEntryRequest;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export interface EventDispatchResult {
|
|
28
|
-
successful: PutEventEntryResponse[];
|
|
29
|
-
failed: PutEventFailedEntryResponse[];
|
|
30
|
-
failedCount: number | undefined;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Max batch size for the putEvents request defined by AWS.
|
|
35
|
-
*/
|
|
36
|
-
const MAX_BATCH_SIZE = 10;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Basic client for Eventbridge.
|
|
40
|
-
* Usage will be done by extending this class and implementing methods that internally call the protected sendEvents method.
|
|
41
|
-
*/
|
|
42
|
-
export class BasicEventbridgeClient {
|
|
43
|
-
private appName: string;
|
|
44
|
-
private env: string;
|
|
45
|
-
private bus: string;
|
|
46
|
-
private client;
|
|
47
|
-
|
|
48
|
-
protected getLogger: () => ILogger;
|
|
49
|
-
protected context: SharedContext;
|
|
50
|
-
|
|
51
|
-
constructor(
|
|
52
|
-
appName: string,
|
|
53
|
-
env: string,
|
|
54
|
-
getLogger: () => ILogger,
|
|
55
|
-
context: SharedContext,
|
|
56
|
-
bus: string,
|
|
57
|
-
customEndpoint?: string,
|
|
58
|
-
customRegion?: string
|
|
59
|
-
) {
|
|
60
|
-
this.appName = appName;
|
|
61
|
-
this.env = env;
|
|
62
|
-
this.bus = bus;
|
|
63
|
-
this.getLogger = getLogger;
|
|
64
|
-
this.context = context;
|
|
65
|
-
this.client = getEventbridgeClient(customEndpoint, customRegion);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
protected async sendEvents(
|
|
69
|
-
events: LaraEvent[]
|
|
70
|
-
): Promise<EventDispatchResult> {
|
|
71
|
-
const logger = this.getLogger();
|
|
72
|
-
|
|
73
|
-
const eventsToSend = chain(events)
|
|
74
|
-
.map((event) =>
|
|
75
|
-
mapLaraEventToAWSEvent(
|
|
76
|
-
event,
|
|
77
|
-
this.env,
|
|
78
|
-
this.appName,
|
|
79
|
-
this.bus,
|
|
80
|
-
logger,
|
|
81
|
-
this.context
|
|
82
|
-
)
|
|
83
|
-
)
|
|
84
|
-
.compact()
|
|
85
|
-
.map((event) => ({
|
|
86
|
-
Entries: [event],
|
|
87
|
-
}))
|
|
88
|
-
.value();
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Eventbridge in US-EAST-1 has a limit of 10.000 events/second.
|
|
92
|
-
* We should be fine without a limiter here.
|
|
93
|
-
*/
|
|
94
|
-
const results = await Promise.all(
|
|
95
|
-
eventsToSend.map((singleEventArray) =>
|
|
96
|
-
this.client
|
|
97
|
-
.putEvents(singleEventArray)
|
|
98
|
-
.promise()
|
|
99
|
-
.then(({ Entries, FailedEntryCount }) => ({
|
|
100
|
-
FailedEntryCount,
|
|
101
|
-
Entries: [
|
|
102
|
-
{
|
|
103
|
-
...(Entries || [])[0],
|
|
104
|
-
event: singleEventArray.Entries[0],
|
|
105
|
-
},
|
|
106
|
-
],
|
|
107
|
-
}))
|
|
108
|
-
.catch((error) => ({
|
|
109
|
-
FailedEntryCount: 1,
|
|
110
|
-
Entries: [
|
|
111
|
-
{
|
|
112
|
-
EventId: undefined,
|
|
113
|
-
ErrorMessage: JSON.stringify(error),
|
|
114
|
-
event: singleEventArray.Entries[0],
|
|
115
|
-
},
|
|
116
|
-
],
|
|
117
|
-
}))
|
|
118
|
-
)
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
const aggregatedResult = results.reduce(
|
|
122
|
-
(prev, act) => {
|
|
123
|
-
const { Entries: NewEntries, FailedEntryCount: newFailedCount } = act;
|
|
124
|
-
const { eventsDispatched, failedCount } = prev;
|
|
125
|
-
|
|
126
|
-
return {
|
|
127
|
-
eventsDispatched: [
|
|
128
|
-
...(eventsDispatched || []),
|
|
129
|
-
...(NewEntries || []),
|
|
130
|
-
],
|
|
131
|
-
failedCount: (failedCount || 0) + (newFailedCount || 0),
|
|
132
|
-
};
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
eventsDispatched: [],
|
|
136
|
-
failedCount: 0,
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
|
|
140
|
-
const { eventsDispatched, failedCount } = aggregatedResult;
|
|
141
|
-
|
|
142
|
-
const [successful, failed] = partition(
|
|
143
|
-
eventsDispatched,
|
|
144
|
-
(entry) => entry.EventId
|
|
145
|
-
);
|
|
146
|
-
|
|
147
|
-
logger.info("eventbridge.client.sendEvents.end", {
|
|
148
|
-
successful,
|
|
149
|
-
failed,
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
return {
|
|
153
|
-
successful: successful.map((eventDispatched) =>
|
|
154
|
-
omit(eventDispatched, "event")
|
|
155
|
-
),
|
|
156
|
-
failed,
|
|
157
|
-
failedCount,
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { LaraEvent } from "../basicEventbridgeClient";
|
|
2
|
-
import { PutEventsRequestEntry } from "aws-sdk/clients/eventbridge";
|
|
3
|
-
import type { ILogger } from "@alanszp/logger";
|
|
4
|
-
import type { SharedContext } from "@alanszp/shared-context";
|
|
5
|
-
import { compact } from "lodash";
|
|
6
|
-
import { createId } from "@paralleldrive/cuid2";
|
|
7
|
-
|
|
8
|
-
export function mapLaraEventToAWSEvent(
|
|
9
|
-
{ topic, body }: LaraEvent,
|
|
10
|
-
env: string,
|
|
11
|
-
appName: string,
|
|
12
|
-
bus: string,
|
|
13
|
-
logger: ILogger,
|
|
14
|
-
context: SharedContext
|
|
15
|
-
): PutEventsRequestEntry | undefined {
|
|
16
|
-
const lid = context.getLifecycleId() || createId();
|
|
17
|
-
const oldlLch = context.getLifecycleChain();
|
|
18
|
-
const lch = compact([oldlLch, "aws.eb"]).join(",");
|
|
19
|
-
try {
|
|
20
|
-
return {
|
|
21
|
-
DetailType: topic,
|
|
22
|
-
Detail: JSON.stringify({ ...body, lch, lid }), // lid is included here since the TraceHeader is not sent to the targets by aws
|
|
23
|
-
Source: `${env}.lara.${appName}`,
|
|
24
|
-
EventBusName: bus,
|
|
25
|
-
Time: new Date(),
|
|
26
|
-
TraceHeader: lid,
|
|
27
|
-
};
|
|
28
|
-
} catch {
|
|
29
|
-
const org = body.organizationReference as string;
|
|
30
|
-
logger.error("eventbridge.client.map_lara_to_aws_event.parse_error", {
|
|
31
|
-
topic,
|
|
32
|
-
org,
|
|
33
|
-
lid,
|
|
34
|
-
});
|
|
35
|
-
return undefined;
|
|
36
|
-
}
|
|
37
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BasicEventbridgeClient,
|
|
3
|
-
EventDispatchResult,
|
|
4
|
-
LaraEvent,
|
|
5
|
-
} from "./basicEventbridgeClient";
|
|
6
|
-
|
|
7
|
-
export class MockEventbridgeClient extends BasicEventbridgeClient {
|
|
8
|
-
public mockSendEvents(events: LaraEvent[]): Promise<EventDispatchResult> {
|
|
9
|
-
return this.sendEvents(events);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export const topics = ["topic1", "topic2"];
|
|
2
|
-
|
|
3
|
-
export const events = [{ property: "1" }, { property: "2" }];
|
|
4
|
-
|
|
5
|
-
export const twoEventsToSend = [
|
|
6
|
-
{ topic: topics[0], body: events[0] },
|
|
7
|
-
{ topic: topics[1], body: events[1] },
|
|
8
|
-
];
|
|
9
|
-
|
|
10
|
-
export const twoSuccessfulResponses = [
|
|
11
|
-
{
|
|
12
|
-
Entries: [{ EventId: 1 }],
|
|
13
|
-
FailedEntryCount: 0,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
Entries: [{ EventId: 2 }],
|
|
17
|
-
FailedEntryCount: 0,
|
|
18
|
-
},
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
export const twoUnsuccessfulResponses = [
|
|
22
|
-
{
|
|
23
|
-
Entries: [{ EventId: undefined }],
|
|
24
|
-
FailedEntryCount: 1,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
Entries: [{ EventId: undefined }],
|
|
28
|
-
FailedEntryCount: 1,
|
|
29
|
-
},
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
export const oneSuccessfulOneUnsuccessfulResponses = [
|
|
33
|
-
{
|
|
34
|
-
Entries: [{ EventId: 1 }],
|
|
35
|
-
FailedEntryCount: 0,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
Entries: [{ EventId: null }],
|
|
39
|
-
FailedEntryCount: 1,
|
|
40
|
-
},
|
|
41
|
-
];
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
2
|
-
type PropertyKeys<T> = {
|
|
3
|
-
[K in keyof T as T[K] extends Function ? never : K]: T[K];
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
type UpdatedIdentifiers<
|
|
7
|
-
Entity,
|
|
8
|
-
Identifiers extends keyof PropertyKeys<Entity>,
|
|
9
|
-
PartialEntity = Pick<PropertyKeys<Entity>, Identifiers>
|
|
10
|
-
> = {
|
|
11
|
-
[K in keyof PartialEntity]: PartialEntity[K];
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
type UpdatedFields<
|
|
15
|
-
Entity,
|
|
16
|
-
Identifiers extends keyof PropertyKeys<Entity>,
|
|
17
|
-
PartialEntity = Omit<PropertyKeys<Entity>, Identifiers>
|
|
18
|
-
> = {
|
|
19
|
-
[K in keyof PartialEntity]?: PartialEntity[K];
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export type CreatedEvent<
|
|
23
|
-
Entity,
|
|
24
|
-
Identifiers extends keyof PropertyKeys<Entity>
|
|
25
|
-
> = UpdatedFields<Entity, Identifiers>;
|
|
26
|
-
|
|
27
|
-
export type UpdatedEvent<
|
|
28
|
-
Entity,
|
|
29
|
-
Identifiers extends keyof PropertyKeys<Entity>
|
|
30
|
-
> = UpdatedFields<Entity, Identifiers> &
|
|
31
|
-
UpdatedIdentifiers<Entity, Identifiers> & {
|
|
32
|
-
_previousValues?: UpdatedFields<Entity, Identifiers>;
|
|
33
|
-
modifiedKeys: (keyof UpdatedFields<Entity, Identifiers>)[];
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export type DeletedEvent<
|
|
37
|
-
Entity,
|
|
38
|
-
Identifiers extends keyof PropertyKeys<Entity>
|
|
39
|
-
> = UpdatedIdentifiers<Entity, Identifiers>;
|
package/src/types/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./UpdatedEvent";
|