Skip to content

Commit

Permalink
fix: Do not export useDeviceModels hook (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x authored Jun 27, 2023
1 parent 7c13bbe commit f213f33
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"@tanstack/react-query": "^4.28.0",
"classnames": "^2.3.2",
"luxon": "^3.3.0",
"seamapi": "^6.7.0",
"seamapi": "^6.12.1",
"uuid": "^9.0.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const Content: Story = {
return (
<Box display='grid' gap={3} gridTemplateColumns='1fr'>
<DeviceHealthBar filter={null} onFilterSelect={() => {}} devices={[]} />

<DeviceHealthBar
filter={filter}
onFilterSelect={setFilter}
Expand All @@ -33,6 +32,7 @@ export const Content: Story = {
connected_account_id: 'account_1',
device_type: 'august_lock',
device_id: 'dev_1',
is_managed: true,
capabilities_supported: [],
created_at: '2023-05-08T22:38:30.963Z',
workspace_id: 'workspace_1',
Expand Down Expand Up @@ -62,6 +62,7 @@ export const Content: Story = {
connected_account_id: 'account_1',
device_type: 'august_lock',
device_id: 'dev_2',
is_managed: true,
capabilities_supported: [],
created_at: '2023-05-08T22:38:30.963Z',
workspace_id: 'workspace_1',
Expand Down
10 changes: 8 additions & 2 deletions src/lib/seam/device-models/use-device-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ export type UseDeviceModelsParams = DeviceModelsListRequest
export type UseDeviceModelsData = DeviceModel[]

export function useDeviceModels(
params?: UseDeviceModelsParams
params?: Omit<
UseDeviceModelsParams,
'acknowledge_intentional_use_of_internal_api'
>
): UseSeamQueryResult<'deviceModels', UseDeviceModelsData> {
const { client } = useSeamClient()

Expand All @@ -25,7 +28,10 @@ export function useDeviceModels(
queryKey: ['device_models', 'list', params],
queryFn: async () => {
if (client == null) return []
const deviceModels = await client?.deviceModels.list(params)
const deviceModels = await client?.deviceModels.list({
...params,
acknowledge_intentional_use_of_internal_api: true,
})
return deviceModels
},
})
Expand Down
1 change: 0 additions & 1 deletion src/lib/seam/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export * from './access-codes/use-access-code.js'
export * from './access-codes/use-access-codes.js'
export * from './connect-webviews/use-create-connect-webview.js'
export * from './device-models/use-device-models.js'
export * from './devices/use-device.js'
export * from './devices/use-devices.js'
export * from './use-seam-client.js'

0 comments on commit f213f33

Please sign in to comment.