favalib 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,12 +2,12 @@ import AddEntryCommand from './commands/AddEntryCommand.mjs';
2
2
  import AddSyncDeviceCommand from './commands/AddSyncDeviceCommand.mjs';
3
3
  import DeleteEntryCommand from './commands/DeleteEntryCommand.mjs';
4
4
  import UpdateEntryCommand from './commands/UpdateEntryCommand.mjs';
5
- import ChangeSyncDeviceInfoCommand from './commands/ChangeDeviceInfoCommand.mjs';
5
+ import ChangeDeviceInfoCommand from './commands/ChangeDeviceInfoCommand.mjs';
6
6
  declare const commandConstructors: {
7
7
  AddEntry: typeof AddEntryCommand;
8
8
  DeleteEntry: typeof DeleteEntryCommand;
9
9
  UpdateEntry: typeof UpdateEntryCommand;
10
10
  AddSyncDevice: typeof AddSyncDeviceCommand;
11
- ChangeSyncDeviceInfo: typeof ChangeSyncDeviceInfoCommand;
11
+ ChangeDeviceInfo: typeof ChangeDeviceInfoCommand;
12
12
  };
13
13
  export default commandConstructors;
@@ -2,12 +2,12 @@ import AddEntryCommand from './commands/AddEntryCommand.mjs';
2
2
  import AddSyncDeviceCommand from './commands/AddSyncDeviceCommand.mjs';
3
3
  import DeleteEntryCommand from './commands/DeleteEntryCommand.mjs';
4
4
  import UpdateEntryCommand from './commands/UpdateEntryCommand.mjs';
5
- import ChangeSyncDeviceInfoCommand from './commands/ChangeDeviceInfoCommand.mjs';
5
+ import ChangeDeviceInfoCommand from './commands/ChangeDeviceInfoCommand.mjs';
6
6
  const commandConstructors = {
7
7
  AddEntry: AddEntryCommand,
8
8
  DeleteEntry: DeleteEntryCommand,
9
9
  UpdateEntry: UpdateEntryCommand,
10
10
  AddSyncDevice: AddSyncDeviceCommand,
11
- ChangeSyncDeviceInfo: ChangeSyncDeviceInfoCommand,
11
+ ChangeDeviceInfo: ChangeDeviceInfoCommand,
12
12
  };
13
13
  export default commandConstructors;
@@ -1,7 +1,7 @@
1
1
  import type TwoFaLibMediator from '../../TwoFaLibMediator.mjs';
2
2
  import Command from '../BaseCommand.mjs';
3
3
  import type { DeviceFriendlyName, DeviceId, DeviceType } from '../../interfaces/SyncTypes.mjs';
4
- export interface ChangeSyncDeviceInfoData {
4
+ export interface ChangeDeviceInfoData {
5
5
  deviceId: DeviceId;
6
6
  newDeviceInfo: {
7
7
  deviceFriendlyName?: DeviceFriendlyName;
@@ -11,17 +11,17 @@ export interface ChangeSyncDeviceInfoData {
11
11
  /**
12
12
  * Represents a command that when executed changes the device info of a sync device
13
13
  */
14
- declare class ChangeDeviceInfoCommand extends Command<ChangeSyncDeviceInfoData> {
14
+ declare class ChangeDeviceInfoCommand extends Command<ChangeDeviceInfoData> {
15
15
  /**
16
- * Creates a new ChangeSyncDeviceMetaCommand instance.
16
+ * Creates a new ChangeDeviceMetaCommand instance.
17
17
  * @inheritdoc
18
18
  * @param data - The id of the device to change and the new meta info
19
19
  */
20
- constructor(data: ChangeSyncDeviceInfoData, id?: string, timestamp?: number, version?: string, fromRemote?: boolean);
20
+ constructor(data: ChangeDeviceInfoData, id?: string, timestamp?: number, version?: string, fromRemote?: boolean);
21
21
  /**
22
- * Executes the command to change the sync device info
22
+ * Executes the command to change the device info
23
23
  * @inheritdoc
24
- * @throws {InvalidCommandError} If the referenced sync device cannot be found
24
+ * @throws {InvalidCommandError} If the referenced device cannot be found
25
25
  */
26
26
  execute(mediator: TwoFaLibMediator): Promise<void>;
27
27
  /**
@@ -5,7 +5,7 @@ import Command from '../BaseCommand.mjs';
5
5
  */
6
6
  class ChangeDeviceInfoCommand extends Command {
7
7
  /**
8
- * Creates a new ChangeSyncDeviceMetaCommand instance.
8
+ * Creates a new ChangeDeviceMetaCommand instance.
9
9
  * @inheritdoc
10
10
  * @param data - The id of the device to change and the new meta info
11
11
  */
@@ -13,9 +13,9 @@ class ChangeDeviceInfoCommand extends Command {
13
13
  super('ChangeDeviceInfo', data, id, timestamp, version, fromRemote);
14
14
  }
15
15
  /**
16
- * Executes the command to change the sync device info
16
+ * Executes the command to change the device info
17
17
  * @inheritdoc
18
- * @throws {InvalidCommandError} If the referenced sync device cannot be found
18
+ * @throws {InvalidCommandError} If the referenced device cannot be found
19
19
  */
20
20
  async execute(mediator) {
21
21
  if (!this.validate(mediator)) {
@@ -2,7 +2,7 @@ import type { AddEntryData } from '../Command/commands/AddEntryCommand.mjs';
2
2
  import type { DeleteEntryData } from '../Command/commands/DeleteEntryCommand.mjs';
3
3
  import type { UpdateEntryData } from '../Command/commands/UpdateEntryCommand.mjs';
4
4
  import type { AddSyncDeviceData } from '../Command/commands/AddSyncDeviceCommand.mjs';
5
- import type { ChangeSyncDeviceInfoData } from '../Command/commands/ChangeDeviceInfoCommand.mjs';
5
+ import type { ChangeDeviceInfoData } from '../Command/commands/ChangeDeviceInfoCommand.mjs';
6
6
  export type SyncCommand = ({
7
7
  type: 'AddEntry';
8
8
  data: AddEntryData;
@@ -16,9 +16,9 @@ export type SyncCommand = ({
16
16
  type: 'AddSyncDevice';
17
17
  data: AddSyncDeviceData;
18
18
  } | {
19
- type: 'ChangeSyncDeviceInfo';
20
- data: ChangeSyncDeviceInfoData;
19
+ type: 'ChangeDeviceInfo';
20
+ data: ChangeDeviceInfoData;
21
21
  }) & {
22
22
  id: string;
23
23
  };
24
- export type CommandData = AddEntryData | DeleteEntryData | UpdateEntryData | AddSyncDeviceData | ChangeSyncDeviceInfoData;
24
+ export type CommandData = AddEntryData | DeleteEntryData | UpdateEntryData | AddSyncDeviceData | ChangeDeviceInfoData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "favalib",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {