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/get-managed.ts
Views: 688
import { z } from "../../framework";12import { FailedAPIOperationSchema } from "../common";3import { AccountIdSchema } from "../accounts/common";45import {6SiteLicenseIdSchema,7SiteLicenseQuotaSchema,8SiteLicenseRunLimitSchema,9} from "./common";1011// OpenAPI spec12//13export const GetManagedLicensesInputSchema = z14.object({15limit: z16.number()17.min(1)18.optional()19.describe("Limits number of results to the provided value."),20skip: z.number().min(1).optional().describe("Skips the first `n` results."),21})22.describe(23`Fetch all licenses which are managed by a particular \`account_id\`. Results are24returned in descending order of license creation time.`,25);2627export const GetManagedLicensesOutputSchema = z.union([28FailedAPIOperationSchema,29z30.object({31id: SiteLicenseIdSchema,32title: z.string().optional().describe("User-defined license title."),33description: z34.string()35.optional()36.describe("User-defined license description."),37expires: z38.number()39.optional()40.describe(41"UNIX timestamp (in milliseconds) which indicates when the license is to expire.",42),43activates: z.number().describe(44`UNIX timestamp (in milliseconds) which indicates when the license takes effect.45Licenses may be applied prior to this time, but will not take effect before it.`,46),47last_used: z48.number()49.optional()50.describe(51`UNIX timestamp (in milliseconds) which indicates when the license was last used52to upgrade a project while it started.`,53),54created: z55.number()56.optional()57.describe(58"UNIX timestamp (in milliseconds) which indicates when the license was created.",59),60managers: z61.array(AccountIdSchema)62.describe(63"A list of account ids which are permitted to manage this license.",64),65upgrades: z66.object({67cores: z.number().min(0),68cpu_shares: z.number().min(0),69disk_quota: z.number().min(0),70memory: z.number().min(0),71mintime: z.number().min(0),72network: z.number().min(0),73})74.optional()75.describe(76`**Deprecated:** A map of upgrades that are applied to a project when it has77this site license. This is been deprecated in favor of the \`quota\` field.`,78),79quota: SiteLicenseQuotaSchema.optional().describe(80"The exact resource quota allotted to this license.",81),82run_limit: SiteLicenseRunLimitSchema,83info: z84.record(z.string(), z.any())85.optional()86.describe(87`Structured object in which admins may store additional license information.88This field generally contains purchase information for the license (e.g.,89purchasing account, etc.)`,90),91})92.describe(93`Defines a site license object, which is used to determine resource limits (e.g.,94CPU, memory, disk space, etc.) to be applied to a running project.`,95),96]);9798export type GetManagedLicensesInput = z.infer<99typeof GetManagedLicensesInputSchema100>;101export type GetManagedLicensesOutput = z.infer<102typeof GetManagedLicensesOutputSchema103>;104105106