Complete Homarr provider integration
This commit is contained in:
1 parent
bc59355eab
commit
165201632d
23 files changed
+986
-61
No files matched your search
@@ -102,6 +102,29 @@ export const workshopUserSchema = z.object({
|
||||
});
|
||||
export type WorkshopUser = z.infer<typeof workshopUserSchema>;
|
||||
|
||||
export const workshopAssistantUsageSchema = z.object({
|
||||
limit: z.number().int().nonnegative(),
|
||||
used: z.number().int().nonnegative(),
|
||||
remaining: z.number().int().nonnegative(),
|
||||
resetsAt: z.string().datetime({ offset: true }),
|
||||
});
|
||||
export type WorkshopAssistantUsage = z.infer<typeof workshopAssistantUsageSchema>;
|
||||
|
||||
export const workshopAssistantActivitySchema = z.object({
|
||||
id: z.string(),
|
||||
status: z.enum(["processing", "completed", "failed"]),
|
||||
model: z.string(),
|
||||
requestUnits: z.number().int().positive(),
|
||||
inputTokens: z.number().int().nonnegative().default(0),
|
||||
outputTokens: z.number().int().nonnegative().default(0),
|
||||
totalTokens: z.number().int().nonnegative().default(0),
|
||||
durationMs: z.number().int().nonnegative().default(0),
|
||||
cost: z.number().nonnegative().default(0),
|
||||
created: z.string(),
|
||||
updated: z.string(),
|
||||
});
|
||||
export type WorkshopAssistantActivity = z.infer<typeof workshopAssistantActivitySchema>;
|
||||
|
||||
const normalizeWorkshopSubmissionRecord = (value: unknown) => {
|
||||
if (typeof value !== "object" || value === null || Array.isArray(value)) return value;
|
||||
const record = value as Record<string, unknown>;
|
||||
|
||||
Reference in new issue
Block a user