From ec437b7f2599f8e384faeb7e72b41dd6130f2c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20K=C3=B6nig?= Date: Wed, 18 Dec 2024 11:36:53 +0100 Subject: [PATCH 1/2] refactor: rename getDeviceOnboardingToken to createDeviceOnboardingToken --- .../src/extensibility/facades/transport/DevicesFacade.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/runtime/src/extensibility/facades/transport/DevicesFacade.ts b/packages/runtime/src/extensibility/facades/transport/DevicesFacade.ts index 679ab4213..c99362cef 100644 --- a/packages/runtime/src/extensibility/facades/transport/DevicesFacade.ts +++ b/packages/runtime/src/extensibility/facades/transport/DevicesFacade.ts @@ -27,7 +27,7 @@ export class DevicesFacade { @Inject private readonly updateDeviceUseCase: UpdateDeviceUseCase, @Inject private readonly deleteDeviceUseCase: DeleteDeviceUseCase, @Inject private readonly getDeviceOnboardingInfoUseCase: GetDeviceOnboardingInfoUseCase, - @Inject private readonly getDeviceOnboardingTokenUseCase: CreateDeviceOnboardingTokenUseCase, + @Inject private readonly createDeviceOnboardingTokenUseCase: CreateDeviceOnboardingTokenUseCase, @Inject private readonly setCommunicationLanguageUseCase: SetCommunicationLanguageUseCase ) {} @@ -47,8 +47,8 @@ export class DevicesFacade { return await this.getDeviceOnboardingInfoUseCase.execute(request); } - public async getDeviceOnboardingToken(request: CreateDeviceOnboardingTokenRequest): Promise> { - return await this.getDeviceOnboardingTokenUseCase.execute(request); + public async createDeviceOnboardingToken(request: CreateDeviceOnboardingTokenRequest): Promise> { + return await this.createDeviceOnboardingTokenUseCase.execute(request); } public async updateDevice(request: UpdateDeviceRequest): Promise> { From 0846ded2bf2ac283aa93d2017acd951d2e192744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20K=C3=B6nig?= Date: Wed, 18 Dec 2024 11:36:59 +0100 Subject: [PATCH 2/2] chore: update usages --- packages/app-runtime/test/runtime/AppStringProcessor.test.ts | 2 +- packages/runtime/test/transport/account.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app-runtime/test/runtime/AppStringProcessor.test.ts b/packages/app-runtime/test/runtime/AppStringProcessor.test.ts index 9055b1d69..fdd62536e 100644 --- a/packages/app-runtime/test/runtime/AppStringProcessor.test.ts +++ b/packages/app-runtime/test/runtime/AppStringProcessor.test.ts @@ -182,7 +182,7 @@ describe("AppStringProcessor", function () { test("device onboarding with a password protected Token", async function () { const deviceResult = await runtime1Session.transportServices.devices.createDevice({}); - const tokenResult = await runtime1Session.transportServices.devices.getDeviceOnboardingToken({ + const tokenResult = await runtime1Session.transportServices.devices.createDeviceOnboardingToken({ id: deviceResult.value.id, passwordProtection: { password: "password" } }); diff --git a/packages/runtime/test/transport/account.test.ts b/packages/runtime/test/transport/account.test.ts index 6ab950f88..9ac67dcf8 100644 --- a/packages/runtime/test/transport/account.test.ts +++ b/packages/runtime/test/transport/account.test.ts @@ -166,7 +166,7 @@ describe("LoadItemFromTruncatedReference", () => { }); test("loads the DeviceOnboardingInfo with the truncated reference", async () => { - const deviceOnboardingInfoReference = (await sTransportServices.devices.getDeviceOnboardingToken({ id: device.id })).value.truncatedReference; + const deviceOnboardingInfoReference = (await sTransportServices.devices.createDeviceOnboardingToken({ id: device.id })).value.truncatedReference; const result = await sTransportServices.account.loadItemFromTruncatedReference({ reference: deviceOnboardingInfoReference }); @@ -176,7 +176,7 @@ describe("LoadItemFromTruncatedReference", () => { test("loads the DeviceOnboardingInfo with the truncated reference including a profile name", async () => { const profileName = "aProfileName"; - const deviceOnboardingInfoReference = (await sTransportServices.devices.getDeviceOnboardingToken({ id: device.id, profileName })).value.truncatedReference; + const deviceOnboardingInfoReference = (await sTransportServices.devices.createDeviceOnboardingToken({ id: device.id, profileName })).value.truncatedReference; const result = await sTransportServices.account.loadItemFromTruncatedReference({ reference: deviceOnboardingInfoReference });