Skip to content

Commit 516d04b

Browse files
committed
refactor: rename EventBridge types
1 parent 74bc0f9 commit 516d04b

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

packages/@aws-cdk/service-spec-types/src/types/common.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ export interface NullType {
5252
readonly type: 'null';
5353
}
5454

55+
/**
56+
*
57+
* T is the entity type for compound objects.
58+
*
59+
* For example: TypeDefinition, EventTypeDefinition.
60+
*/
5561
export interface GenericDefinitionReference<T extends Entity> {
5662
readonly type: 'ref';
5763
readonly reference: Reference<T>;

packages/@aws-cdk/service-spec-types/src/types/database.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { promises as fs } from 'fs';
22
import { gunzipSync } from 'zlib';
33
import { Database, entityCollection, fieldIndex, stringCmp } from '@cdklabs/tskb';
44
import { IsAugmentedResource, ResourceAugmentation } from './augmentations';
5-
import { HasEvent, Event, EventUsesType, EventTypeDefinition } from './event';
5+
import { ResourceHasEvent, Event, EventUsesType, EventTypeDefinition } from './event';
66
import {
77
DimensionSet,
88
Metric,
@@ -63,7 +63,7 @@ export function emptyDatabase() {
6363
serviceHasMetric: r.relationship<ServiceHasMetric>('service', 'metric'),
6464
resourceHasDimensionSet: r.relationship<ResourceHasDimensionSet>('resource', 'dimensionSet'),
6565
serviceHasDimensionSet: r.relationship<ServiceHasDimensionSet>('service', 'dimensionSet'),
66-
hasEvent: r.relationship<HasEvent>('resource', 'event'),
66+
resourceHasEvent: r.relationship<ResourceHasEvent>('resource', 'event'),
6767
eventUsesType: r.relationship<EventUsesType>('event', 'eventTypeDefinition'),
6868
}),
6969
);
@@ -83,7 +83,7 @@ export type SpecDatabase = ReturnType<typeof emptyDatabase>;
8383
* Helpers for working with a SpecDatabase
8484
*/
8585
export class RichSpecDatabase {
86-
constructor(private readonly db: SpecDatabase) {}
86+
constructor(private readonly db: SpecDatabase) { }
8787

8888
/**
8989
* Find all resources of a given type

packages/@aws-cdk/service-spec-types/src/types/event.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export interface Event extends Entity {
3434
*/
3535
readonly resourcesField: Array<ResourceField>;
3636
/**
37-
* rootProperty has the reference for the root proprety for this event
37+
* rootProperty has the reference for the root property for this event
3838
*/
3939
readonly rootProperty: Reference<EventTypeDefinition>;
4040
}
@@ -44,7 +44,7 @@ export interface ResourceField {
4444
fieldName?: string;
4545
}
4646

47-
export type HasEvent = Relationship<Resource, Event>;
47+
export type ResourceHasEvent = Relationship<Resource, Event>;
4848

4949
export type EventProperties = Record<string, EventProperty>;
5050
export interface EventProperty {

0 commit comments

Comments
 (0)