Skip to content

Commit 7ffc1bf

Browse files
committed
refactor: move BackendLambdas type
1 parent 9db030c commit 7ffc1bf

11 files changed

+27
-28
lines changed

cdk/BackendLambdas.d.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

cdk/BackendStack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
Stack,
66
aws_ecr as ECR,
77
} from 'aws-cdk-lib'
8-
import type { BackendLambdas } from './BackendLambdas.js'
8+
import type { BackendLambdas } from './packBackendLambdas.js'
99
import type { PackedLayer } from '@bifravst/aws-cdk-lambda-helpers/layer'
1010
import { LambdaSource } from '@bifravst/aws-cdk-lambda-helpers/cdk'
1111
import { ConnectionInformationGeoLocation } from './resources/ConnectionInformationGeoLocation.js'

cdk/packBackendLambdas.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
import type { BackendLambdas } from './BackendLambdas.js'
21
import { packLambdaFromPath } from '@bifravst/aws-cdk-lambda-helpers'
2+
import type { PackedLambda } from '@bifravst/aws-cdk-lambda-helpers'
3+
4+
export type BackendLambdas = {
5+
updatesToLwM2M: PackedLambda
6+
shareDevice: PackedLambda
7+
sharingStatus: PackedLambda
8+
sharingStatusFingerprint: PackedLambda
9+
confirmOwnership: PackedLambda
10+
connectionInformationGeoLocation: PackedLambda
11+
devicesData: PackedLambda
12+
storeObjectsInTimestream: PackedLambda
13+
queryHistory: PackedLambda
14+
createCredentials: PackedLambda
15+
openSSL: PackedLambda
16+
senMLToLwM2M: PackedLambda
17+
senMLImportLogs: PackedLambda
18+
apiHealthCheck: PackedLambda
19+
}
320

421
const pack = async (id: string) => packLambdaFromPath(id, `lambda/${id}.ts`)
522

cdk/resources/ConnectionInformationGeoLocation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
IoTActionRole,
1616
} from '@bifravst/aws-cdk-lambda-helpers/cdk'
1717
import { Permissions as SettingsPermissions } from '@hello.nrfcloud.com/nrfcloud-api-helpers/cdk'
18-
import type { BackendLambdas } from '../BackendLambdas.js'
18+
import type { BackendLambdas } from '../packBackendLambdas.js'
1919

2020
/**
2121
* Resources that geo-location devices based on the LwM2M Connection Information

cdk/resources/CustomDevicesAPI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
Stack,
88
} from 'aws-cdk-lib'
99
import { Construct } from 'constructs'
10-
import type { BackendLambdas } from '../BackendLambdas.js'
10+
import type { BackendLambdas } from '../packBackendLambdas.js'
1111
import { STACK_NAME } from '../stackConfig.js'
1212
import type { PublicDevices } from './PublicDevices.js'
1313

cdk/resources/DevicesAPI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Duration, aws_iam as IAM, aws_lambda as Lambda } from 'aws-cdk-lib'
22
import { Construct } from 'constructs'
33
import type { PublicDevices } from './PublicDevices.js'
44
import { LambdaLogGroup } from '@bifravst/aws-cdk-lambda-helpers/cdk'
5-
import type { BackendLambdas } from '../BackendLambdas.js'
5+
import type { BackendLambdas } from '../packBackendLambdas.js'
66

77
export class DevicesAPI extends Construct {
88
public readonly devicesFn: Lambda.IFunction

cdk/resources/LwM2MObjectsHistory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
LambdaLogGroup,
1313
LambdaSource,
1414
} from '@bifravst/aws-cdk-lambda-helpers/cdk'
15-
import type { BackendLambdas } from '../BackendLambdas.js'
15+
import type { BackendLambdas } from '../packBackendLambdas.js'
1616

1717
/**
1818
* Store history of LwM2M objects

cdk/resources/LwM2MShadow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
aws_lambda as Lambda,
1010
} from 'aws-cdk-lib'
1111
import { Construct } from 'constructs'
12-
import type { BackendLambdas } from '../BackendLambdas.js'
12+
import type { BackendLambdas } from '../packBackendLambdas.js'
1313
import type { PublicDevices } from './PublicDevices.js'
1414

1515
/**

cdk/resources/SenMLMessage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
aws_dynamodb as DynamoDB,
1212
} from 'aws-cdk-lib'
1313
import { Construct } from 'constructs'
14-
import type { BackendLambdas } from '../BackendLambdas.js'
14+
import type { BackendLambdas } from '../packBackendLambdas.js'
1515
import type { PublicDevices } from './PublicDevices.js'
1616

1717
/**

cdk/resources/ShareAPI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import { Construct } from 'constructs'
88
import type { PublicDevices } from './PublicDevices.js'
99
import { LambdaLogGroup } from '@bifravst/aws-cdk-lambda-helpers/cdk'
10-
import type { BackendLambdas } from '../BackendLambdas.js'
10+
import type { BackendLambdas } from '../packBackendLambdas.js'
1111
import { Permissions } from '@hello.nrfcloud.com/nrfcloud-api-helpers/cdk'
1212

1313
export class ShareAPI extends Construct {

0 commit comments

Comments
 (0)