UNPKG

@azure-utils/storybooks

Version:

Utils to upload and manage Storybooks via Azure Functions and storage.

81 lines (79 loc) 2.11 kB
const require_projects = require('./projects-Dq7sJTc7.cjs'); //#region src/utils/openapi-utils.ts const openAPIPaths = {}; function registerOpenAPIPath(path, input) { path ||= "/"; if (!path.startsWith("/")) path = `/${path}`; const value = openAPIPaths[path]; if (value) openAPIPaths[path] = { ...value, ...input }; else openAPIPaths[path] = input; } const openAPITags = { projects: { name: "Projects", description: "A project manages a single Storybook instance across multiple builds." }, builds: { name: "Builds", description: "A build is a specific version of a Storybook instance." }, labels: { name: "Labels", description: "Labels can be used to manage multiple Storybook instances. Labels can be git-branches or Pull Requests." }, storybook: { name: "Storybook", description: "View storybook files for a specific project and build." }, webUI: { name: "Web UI", description: "Serves static files for web-ui." } }; const openAPISchemas = { ProjectSchema: require_projects.ProjectSchema, BuildSchema: require_projects.BuildSchema, LabelSchema: require_projects.LabelSchema, BuildUploadSchema: require_projects.BuildUploadSchema, ProjectCreateSchema: require_projects.ProjectCreateSchema }; const openAPISecuritySchemas = { functionsKey: { type: "apiKey", in: "header", name: "x-functions-key", description: "Azure Admin Functions key for authentication if authLevel is set to 'admin'." } }; //#endregion Object.defineProperty(exports, 'openAPIPaths', { enumerable: true, get: function () { return openAPIPaths; } }); Object.defineProperty(exports, 'openAPISchemas', { enumerable: true, get: function () { return openAPISchemas; } }); Object.defineProperty(exports, 'openAPISecuritySchemas', { enumerable: true, get: function () { return openAPISecuritySchemas; } }); Object.defineProperty(exports, 'openAPITags', { enumerable: true, get: function () { return openAPITags; } }); Object.defineProperty(exports, 'registerOpenAPIPath', { enumerable: true, get: function () { return registerOpenAPIPath; } });