diff --git a/public/lib/device-connector/DeviceConnector.ts b/public/lib/device-connector/DeviceConnector.ts index c97d4cf7..68e88df4 100644 --- a/public/lib/device-connector/DeviceConnector.ts +++ b/public/lib/device-connector/DeviceConnector.ts @@ -98,7 +98,7 @@ export default class DeviceConnector extends Model implements DeviceConnectorInt }) } - static async add(device: DeviceInterface, connector: ConnectorInterface, data: DeviceConnectorCreateInterface, id?: string, draft = true): Promise> { + static async add(device: DeviceInterface, connector: ConnectorInterface, data: DeviceConnectorCreateInterface, id?: string | null, draft = true): Promise> { return await DeviceConnector.dispatch('add', { id, draft, diff --git a/public/lib/devices/Device.ts b/public/lib/devices/Device.ts index 75cfab9a..685a6655 100644 --- a/public/lib/devices/Device.ts +++ b/public/lib/devices/Device.ts @@ -175,7 +175,7 @@ export default class Device extends Model implements DeviceInterface { }) } - static async add(data: DeviceCreateInterface, id?: string, draft = true): Promise> { + static async add(data: DeviceCreateInterface, id?: string | null, draft = true): Promise> { return await Device.dispatch('add', { id, draft, diff --git a/public/types/devices-module.ts b/public/types/devices-module.ts index bc14dce3..228d3789 100644 --- a/public/types/devices-module.ts +++ b/public/types/devices-module.ts @@ -21,6 +21,7 @@ declare module '@vuex-orm/core' { } // Re-export models types +export * from '@/lib/types' export * from '@/lib/channel-configuration/types' export * from '@/lib/channel-properties/types' export * from '@/lib/channels/types'