major updates to device and links management in admin
This commit is contained in:
@@ -15,6 +15,8 @@ export const linkSchema = v.object({
|
||||
id: v.number(),
|
||||
token: v.string(),
|
||||
status: linkStatusSchema,
|
||||
appName: v.string(),
|
||||
appPackage: v.string(),
|
||||
linkedDeviceId: v.nullable(v.number()),
|
||||
expiresAt: v.nullable(v.date()),
|
||||
lastAccessedAt: v.nullable(v.date()),
|
||||
@@ -31,7 +33,9 @@ export type LinkWithDevice = v.InferOutput<typeof linkWithDeviceSchema>;
|
||||
|
||||
export const createLinkSchema = v.object({
|
||||
token: v.pipe(v.string(), v.minLength(1)),
|
||||
linkedDeviceId: v.optional(v.nullable(v.number())),
|
||||
appName: v.pipe(v.string(), v.minLength(1)),
|
||||
appPackage: v.pipe(v.string(), v.minLength(1)),
|
||||
linkedDeviceId: v.number(),
|
||||
expiresAt: v.optional(v.nullable(v.date())),
|
||||
});
|
||||
export type CreateLink = v.InferOutput<typeof createLinkSchema>;
|
||||
@@ -39,6 +43,8 @@ export type CreateLink = v.InferOutput<typeof createLinkSchema>;
|
||||
export const updateLinkSchema = v.partial(
|
||||
v.object({
|
||||
status: linkStatusSchema,
|
||||
appName: v.string(),
|
||||
appPackage: v.string(),
|
||||
linkedDeviceId: v.nullable(v.number()),
|
||||
expiresAt: v.nullable(v.date()),
|
||||
lastAccessedAt: v.nullable(v.date()),
|
||||
|
||||
Reference in New Issue
Block a user