Skip to content

Commit 6bd9be2

Browse files
authored
Rename getDeviceOnboardingToken to createDeviceOnboardingToken (#373)
* refactor: rename getDeviceOnboardingToken to createDeviceOnboardingToken * chore: update usages
1 parent b44bcaf commit 6bd9be2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/app-runtime/test/runtime/AppStringProcessor.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ describe("AppStringProcessor", function () {
182182

183183
test("device onboarding with a password protected Token", async function () {
184184
const deviceResult = await runtime1Session.transportServices.devices.createDevice({});
185-
const tokenResult = await runtime1Session.transportServices.devices.getDeviceOnboardingToken({
185+
const tokenResult = await runtime1Session.transportServices.devices.createDeviceOnboardingToken({
186186
id: deviceResult.value.id,
187187
passwordProtection: { password: "password" }
188188
});

packages/runtime/src/extensibility/facades/transport/DevicesFacade.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class DevicesFacade {
2727
@Inject private readonly updateDeviceUseCase: UpdateDeviceUseCase,
2828
@Inject private readonly deleteDeviceUseCase: DeleteDeviceUseCase,
2929
@Inject private readonly getDeviceOnboardingInfoUseCase: GetDeviceOnboardingInfoUseCase,
30-
@Inject private readonly getDeviceOnboardingTokenUseCase: CreateDeviceOnboardingTokenUseCase,
30+
@Inject private readonly createDeviceOnboardingTokenUseCase: CreateDeviceOnboardingTokenUseCase,
3131
@Inject private readonly setCommunicationLanguageUseCase: SetCommunicationLanguageUseCase
3232
) {}
3333

@@ -47,8 +47,8 @@ export class DevicesFacade {
4747
return await this.getDeviceOnboardingInfoUseCase.execute(request);
4848
}
4949

50-
public async getDeviceOnboardingToken(request: CreateDeviceOnboardingTokenRequest): Promise<Result<TokenDTO, ApplicationError>> {
51-
return await this.getDeviceOnboardingTokenUseCase.execute(request);
50+
public async createDeviceOnboardingToken(request: CreateDeviceOnboardingTokenRequest): Promise<Result<TokenDTO, ApplicationError>> {
51+
return await this.createDeviceOnboardingTokenUseCase.execute(request);
5252
}
5353

5454
public async updateDevice(request: UpdateDeviceRequest): Promise<Result<DeviceDTO, ApplicationError>> {

packages/runtime/test/transport/account.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ describe("LoadItemFromTruncatedReference", () => {
166166
});
167167

168168
test("loads the DeviceOnboardingInfo with the truncated reference", async () => {
169-
const deviceOnboardingInfoReference = (await sTransportServices.devices.getDeviceOnboardingToken({ id: device.id })).value.truncatedReference;
169+
const deviceOnboardingInfoReference = (await sTransportServices.devices.createDeviceOnboardingToken({ id: device.id })).value.truncatedReference;
170170

171171
const result = await sTransportServices.account.loadItemFromTruncatedReference({ reference: deviceOnboardingInfoReference });
172172

@@ -176,7 +176,7 @@ describe("LoadItemFromTruncatedReference", () => {
176176

177177
test("loads the DeviceOnboardingInfo with the truncated reference including a profile name", async () => {
178178
const profileName = "aProfileName";
179-
const deviceOnboardingInfoReference = (await sTransportServices.devices.getDeviceOnboardingToken({ id: device.id, profileName })).value.truncatedReference;
179+
const deviceOnboardingInfoReference = (await sTransportServices.devices.createDeviceOnboardingToken({ id: device.id, profileName })).value.truncatedReference;
180180

181181
const result = await sTransportServices.account.loadItemFromTruncatedReference({ reference: deviceOnboardingInfoReference });
182182

0 commit comments

Comments
 (0)