feat(devices): add rename and forget controls and clarify fleet labels
This commit is contained in:
15 files changed
+411
-21
No files matched your search
@@ -409,6 +409,27 @@ export function createKnownDevice(input: {
|
||||
});
|
||||
}
|
||||
|
||||
export function renameKnownDevice(
|
||||
deviceId: string,
|
||||
displayName: string,
|
||||
): Promise<KnownDevice> {
|
||||
return request<KnownDevice>(
|
||||
`/api/v1/control/devices/${encodeURIComponent(deviceId)}`,
|
||||
{
|
||||
method: "PATCH",
|
||||
body: JSON.stringify({ display_name: displayName }),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
export function forgetKnownDevice(
|
||||
deviceId: string,
|
||||
): Promise<{ device_id: string; forgotten: boolean }> {
|
||||
return request(`/api/v1/control/devices/${encodeURIComponent(deviceId)}`, {
|
||||
method: "DELETE",
|
||||
});
|
||||
}
|
||||
|
||||
export function attachDeviceIdentifier(
|
||||
deviceId: string,
|
||||
identifier: { kind: string; value: string },
|
||||
|
||||
Reference in new issue
Block a user