UNPKG

@junobuild/admin

Version:

A library for interfacing with admin features of Juno

207 lines (206 loc) 6.6 kB
import * as z from 'zod'; /** * A schema for validating a version string in `x.y.z` format. * * Examples of valid versions: * - 0.1.0" * - 2.3.4 */ export declare const MetadataVersionSchema: z.ZodString; /** * A version string in `x.y.z` format. */ export type MetadataVersion = z.infer<typeof MetadataVersionSchema>; /** * A schema representing the metadata of a single release. * * Includes the version of the release itself (tag) and the versions * of all modules bundled with it. */ export declare const ReleaseMetadataSchema: z.ZodObject<{ /** * Unique version identifier for the release, following the `x.y.z` format. * @type {MetadataVersion} */ tag: z.ZodString; /** * The version of the console included in the release. * @type {MetadataVersion} */ console: z.ZodString; /** * Version of the Observatory module included in the release. * This field is optional because it was introduced in Juno v0.0.10. * * @type {MetadataVersion | undefined} */ observatory: z.ZodOptional<z.ZodString>; /** * Version of the Mission Control module included in the release. * @type {MetadataVersion} */ mission_control: z.ZodString; /** * Version of the Satellite module included in the release. * @type {MetadataVersion} */ satellite: z.ZodString; /** * Version of the Orbiter module included in the release. * This field is optional because it was introduced in Juno v0.0.17. * * @type {MetadataVersion | undefined} */ orbiter: z.ZodOptional<z.ZodString>; /** * Version of the Sputnik module included in the release. * This field is optional because it was introduced in Juno v0.0.47. * * @type {MetadataVersion | undefined} */ sputnik: z.ZodOptional<z.ZodString>; }, z.core.$strict>; /** * The metadata for a release provided by Juno. */ export type ReleaseMetadata = z.infer<typeof ReleaseMetadataSchema>; /** * A schema representing the list of releases provided by Juno. * * Rules: * - The list must contain at least one release. * - Each release must have a unique `tag` (version identifier). * - The same module version can appear in multiple releases, as not every release * necessarily publishes a new version of each module. * * Validation: * - Ensures no duplicate `tag` values across the list of releases. */ export declare const ReleasesSchema: z.ZodArray<z.ZodObject<{ /** * Unique version identifier for the release, following the `x.y.z` format. * @type {MetadataVersion} */ tag: z.ZodString; /** * The version of the console included in the release. * @type {MetadataVersion} */ console: z.ZodString; /** * Version of the Observatory module included in the release. * This field is optional because it was introduced in Juno v0.0.10. * * @type {MetadataVersion | undefined} */ observatory: z.ZodOptional<z.ZodString>; /** * Version of the Mission Control module included in the release. * @type {MetadataVersion} */ mission_control: z.ZodString; /** * Version of the Satellite module included in the release. * @type {MetadataVersion} */ satellite: z.ZodString; /** * Version of the Orbiter module included in the release. * This field is optional because it was introduced in Juno v0.0.17. * * @type {MetadataVersion | undefined} */ orbiter: z.ZodOptional<z.ZodString>; /** * Version of the Sputnik module included in the release. * This field is optional because it was introduced in Juno v0.0.47. * * @type {MetadataVersion | undefined} */ sputnik: z.ZodOptional<z.ZodString>; }, z.core.$strict>>; /** * The list of releases provided by Juno. */ export type Releases = z.infer<typeof ReleasesSchema>; /** * A schema for the list of all versions across releases. * * Rules: * - The list must contain at least one release. */ export declare const MetadataVersionsSchema: z.ZodArray<z.ZodString>; /** * List of all versions across releases. */ export type MetadataVersions = z.infer<typeof MetadataVersionsSchema>; /** * A schema representing the metadata for multiple releases provided by Juno. */ export declare const ReleasesMetadataSchema: z.ZodObject<{ /** * List of all Mission Control versions across releases. * @type {MetadataVersion} */ mission_controls: z.ZodArray<z.ZodString>; /** * List of all Satellite versions across releases. * @type {MetadataVersion} */ satellites: z.ZodArray<z.ZodString>; /** * List of all Orbiter versions across releases. * @type {MetadataVersion} */ orbiters: z.ZodArray<z.ZodString>; /** * List of release metadata objects, each representing one release. */ releases: z.ZodArray<z.ZodObject<{ /** * Unique version identifier for the release, following the `x.y.z` format. * @type {MetadataVersion} */ tag: z.ZodString; /** * The version of the console included in the release. * @type {MetadataVersion} */ console: z.ZodString; /** * Version of the Observatory module included in the release. * This field is optional because it was introduced in Juno v0.0.10. * * @type {MetadataVersion | undefined} */ observatory: z.ZodOptional<z.ZodString>; /** * Version of the Mission Control module included in the release. * @type {MetadataVersion} */ mission_control: z.ZodString; /** * Version of the Satellite module included in the release. * @type {MetadataVersion} */ satellite: z.ZodString; /** * Version of the Orbiter module included in the release. * This field is optional because it was introduced in Juno v0.0.17. * * @type {MetadataVersion | undefined} */ orbiter: z.ZodOptional<z.ZodString>; /** * Version of the Sputnik module included in the release. * This field is optional because it was introduced in Juno v0.0.47. * * @type {MetadataVersion | undefined} */ sputnik: z.ZodOptional<z.ZodString>; }, z.core.$strict>>; }, z.core.$strict>; /** * The metadata for multiple releases provided by Juno. */ export type ReleasesMetadata = z.infer<typeof ReleasesMetadataSchema>;