Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/lib/api/schema/licenses/common.ts
Views: 688
/* See src/packages/util/db-schema/site-licenses.ts for the database schema corresponding1to this type.2*/34import { z } from "../../framework";56export const SiteLicenseIdSchema = z7.string()8.uuid()9.describe("Site license id.");1011export const SiteLicenseIdleTimeoutSchema = z12.enum(["short", "medium", "day"])13.describe("Available options for finite project idle run times.");1415export const SiteLicenseUptimeSchema = z16.union([SiteLicenseIdleTimeoutSchema, z.literal("always_running")])17.describe(18`Determines how long a project runs while not being used before being automatically19stopped. A \`short\` value corresponds to a 30-minute timeout, and a \`medium\` value20to a 2-hour timeout.`,21);2223export const SiteLicenseRunLimitSchema = z24.number()25.min(0)26.describe("Number of projects which may simultaneously use this license");2728export const SiteLicenseQuotaSchema = z.object({29always_running: z30.boolean()31.nullish()32.describe(33`Indicates whether the project(s) this license is applied to should be34allowed to always be running.`,35),36boost: z37.boolean()38.nullish()39.describe(40`If \`true\`, this license is a boost license and allows for a project to41temporarily boost the amount of resources available to a project by the amount42specified in the \`cpu\`, \`memory\`, and \`disk\` fields.`,43),44cpu: z45.number()46.min(1)47.describe("Limits the total number of vCPUs allocated to a project."),48dedicated_cpu: z.number().min(1).nullish(),49dedicated_ram: z.number().min(1).nullish(),50disk: z51.number()52.min(1)53.describe(54`Disk size in GB to be allocated to the project to which this license is55applied.`,56),57idle_timeout: SiteLicenseIdleTimeoutSchema.nullish(),58member: z.boolean().describe(59`Member hosting significantly reduces competition for resources, and we60prioritize support requests much higher. _Please be aware: licenses of61different member hosting service levels cannot be combined!_`,62),63ram: z64.number()65.min(1)66.describe(67"Limits the total memory a project can use. At least 2GB is recommended.",68),69user: z.enum(["academic", "business"]).describe("User type."),70});717273