Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename getDeviceOnboardingToken to createDeviceOnboardingToken #373

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {}

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

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

public async updateDevice(request: UpdateDeviceRequest): Promise<Result<DeviceDTO, ApplicationError>> {
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/test/transport/account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });

Expand All @@ -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 });

Expand Down
Loading