@webitel/api-services 26.8.31 → 26.8.32
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.
package/package.json
CHANGED
|
@@ -107,6 +107,10 @@ const getDevice = async ({ itemId: id }: GetItemParams) => {
|
|
|
107
107
|
const preRequestHandler = (item: ApiParams) => {
|
|
108
108
|
const copy = deepCopy(item);
|
|
109
109
|
if (!copy.password) copy.password = undefined;
|
|
110
|
+
if (!copy.hotdesk) {
|
|
111
|
+
delete copy.hotdesk;
|
|
112
|
+
delete copy.hotdesks;
|
|
113
|
+
}
|
|
110
114
|
return copy;
|
|
111
115
|
};
|
|
112
116
|
|
|
@@ -43,8 +43,10 @@ export const deviceSchema = z
|
|
|
43
43
|
brand: z.string().optional().default(''),
|
|
44
44
|
model: z.string().optional().default(''),
|
|
45
45
|
mac: optionalMacSchema,
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
// No defaults — regular devices must omit these (see DevicesAPI.preRequestHandler / WTEL-10460).
|
|
47
|
+
// Hotdesk create sets them in opened-device via applyHotdeskDefaults.
|
|
48
|
+
hotdesk: z.boolean().optional(),
|
|
49
|
+
hotdesks: z.array(z.string()).optional(),
|
|
48
50
|
})
|
|
49
51
|
.superRefine((data, ctx) => {
|
|
50
52
|
if (!data.id && !data.password) {
|