diff --git a/packages/@aws-cdk/aws-location-alpha/lib/index.ts b/packages/@aws-cdk/aws-location-alpha/lib/index.ts index 635d80d758a0c..9ae6e2fe55e33 100644 --- a/packages/@aws-cdk/aws-location-alpha/lib/index.ts +++ b/packages/@aws-cdk/aws-location-alpha/lib/index.ts @@ -1,4 +1,5 @@ export * from './place-index'; export * from './route-calculator'; +export * from './util'; // AWS::Location CloudFormation Resources: diff --git a/packages/@aws-cdk/aws-location-alpha/lib/place-index.ts b/packages/@aws-cdk/aws-location-alpha/lib/place-index.ts index c81f604c03873..009876b6d5b98 100644 --- a/packages/@aws-cdk/aws-location-alpha/lib/place-index.ts +++ b/packages/@aws-cdk/aws-location-alpha/lib/place-index.ts @@ -2,6 +2,7 @@ import * as iam from 'aws-cdk-lib/aws-iam'; import { ArnFormat, IResource, Lazy, Names, Resource, Stack, Token } from 'aws-cdk-lib/core'; import { Construct } from 'constructs'; import { CfnPlaceIndex } from 'aws-cdk-lib/aws-location'; +import { DataSource } from './util'; /** * A Place Index @@ -58,32 +59,6 @@ export interface PlaceIndexProps { readonly description?: string; } -/** - * Data source for a place index - */ -export enum DataSource { - /** - * Esri - * - * @see https://docs.aws.amazon.com/location/latest/developerguide/esri.html - */ - ESRI = 'Esri', - - /** - * Grab provides routing functionality for Southeast Asia. - * - * @see https://docs.aws.amazon.com/location/latest/developerguide/grab.html - */ - GRAB = 'Grab', - - /** - * HERE - * - * @see https://docs.aws.amazon.com/location/latest/developerguide/HERE.html - */ - HERE = 'Here', -} - /** * Intend use for the results of an operation */ diff --git a/packages/@aws-cdk/aws-location-alpha/lib/route-calculator.ts b/packages/@aws-cdk/aws-location-alpha/lib/route-calculator.ts index cfc4581e860b4..68544c461651c 100644 --- a/packages/@aws-cdk/aws-location-alpha/lib/route-calculator.ts +++ b/packages/@aws-cdk/aws-location-alpha/lib/route-calculator.ts @@ -2,8 +2,7 @@ import * as iam from 'aws-cdk-lib/aws-iam'; import { ArnFormat, IResource, Lazy, Resource, Stack, Token } from 'aws-cdk-lib/core'; import { Construct } from 'constructs'; import { CfnRouteCalculator } from 'aws-cdk-lib/aws-location'; -import { DataSource } from './place-index'; -import { generateUniqueId } from './util'; +import { generateUniqueId, DataSource } from './util'; /** * A Route Calculator diff --git a/packages/@aws-cdk/aws-location-alpha/lib/util.ts b/packages/@aws-cdk/aws-location-alpha/lib/util.ts index ff0871f6836ff..01b2ea55246ce 100644 --- a/packages/@aws-cdk/aws-location-alpha/lib/util.ts +++ b/packages/@aws-cdk/aws-location-alpha/lib/util.ts @@ -8,3 +8,29 @@ export function generateUniqueId(context: IConstruct): string { } return name; } + +/** + * Data source for a place index + */ +export enum DataSource { + /** + * Esri + * + * @see https://docs.aws.amazon.com/location/latest/developerguide/esri.html + */ + ESRI = 'Esri', + + /** + * Grab provides routing functionality for Southeast Asia. + * + * @see https://docs.aws.amazon.com/location/latest/developerguide/grab.html + */ + GRAB = 'Grab', + + /** + * HERE + * + * @see https://docs.aws.amazon.com/location/latest/developerguide/HERE.html + */ + HERE = 'Here', +} diff --git a/packages/@aws-cdk/aws-location-alpha/test/place-index.test.ts b/packages/@aws-cdk/aws-location-alpha/test/place-index.test.ts index a600705339445..610de8421a424 100644 --- a/packages/@aws-cdk/aws-location-alpha/test/place-index.test.ts +++ b/packages/@aws-cdk/aws-location-alpha/test/place-index.test.ts @@ -1,7 +1,8 @@ import { Match, Template } from 'aws-cdk-lib/assertions'; import * as iam from 'aws-cdk-lib/aws-iam'; import { Stack } from 'aws-cdk-lib'; -import { DataSource, IntendedUse, PlaceIndex } from '../lib/place-index'; +import { IntendedUse, PlaceIndex } from '../lib/place-index'; +import { DataSource } from '../lib'; let stack: Stack; beforeEach(() => {