/** * CLI options for the compare-docs command. * @publicDocs */ interface compareDocs { /** Specifies the folder where the generated files are located. * * @default `./docs/generated/` */ output?: string; /** Help message with description of command and available options. * * Alternatively, you can use the `--h` flag to display this message. */ help?: ''; } /** * Configuration options for a reference in shopify-dev. * @publicDocs */ interface ConfigOptions { /** The name of your reference. Will determine the url at which your reference appears in the form of `/api/{name}/`. */ name: string; /** Flag that will gate your reference from being seen until you are ready. If you delete the `beta_flag` entry, your documentation will go live. */ beta_flag: string; /** Github team used for tagging in feedback issues. */ github_teams: string; /** Link to your team's vault page. */ vault_team_url: string; /** Configuration to automatically update your repo's documentation. */ github_automation?: ConfigGithubOptions; /** The versioning scheme you want to use. Leave empty if you are not versioning your reference */ version_scheme?: 'semver' | 'calver'; /** Image used as the default image for all category previews. The string given will be the path to the image in shopify.dev. */ category_image?: string; /** Dark mode image used as the default image for all category previews. The string given will be the path to the image in shopify.dev. */ category_image_dark?: string; /** Hides the type information for reference entities in definition lists. Used for references that don't have types beyond string. */ hide_types?: boolean; /** Set to true to use the v2 data format (`generated_docs_data_v2.json`). Required for references using the `@publicDocs` pipeline. */ uses_v2_data?: boolean; /** Set to true to use only the `sidebar.yml` for navigation instead of merging entity categories into the sidebar automatically. */ skip_sidebar_merge?: boolean; /** Use if your versioning matches that of Shopify's GQL versioning. You have an unstable, release candidate, and latest version as your first three versions. This effects the annotations in the version selector drop down. */ usesStandardVersioning?: boolean; } /** * Configuration for automatic GitHub-based documentation syncing. * @publicDocs */ interface ConfigGithubOptions { /** Set value to true if your team wants their files automatically synced. */ enabled: boolean; /** The name of the repository (e.g., shopify/hydrogen-UI). */ repo: string; /** The branches (e.g., 'main', 'master', '2022-07-v1', etc.) from which documentation files will be pulled. */ branches: string[]; /** Where in the repository `generated_docs_data_v2.json` lives. */ generated_files_path: string; /** Where the screenshots in the repository live. */ screenshots_path: string; /** The path to the package manager file (e.g., package.json). If `package_manager_version_regex` isn't set, behaviour will be assumed based on the file name. */ package_manager_path: string; /** The regex used to extract the version from the package manager file. If omitted, behaviour will be assumed from the file name. */ package_manager_version_regex?: string; } /** * CLI options for the generate-docs command. Parses TypeScript source files for types tagged with `@publicDocs` and produces `generated_docs_data_v2.json`. * @publicDocs */ interface generateDocs { /** Specifies the input directory of source files to parse for `@publicDocs` types. Can provide multiple paths separated by a space. * * Defaults to the current working directory. */ input?: string; /** Specifies where the output will be generated. * * @default current working directory */ output?: string; /** * Specifies one or more space-separated paths from which declaration (`.d.ts`) files may be included when extracting types. * * Paths within `node_modules` are allowed, but packages should be included individually to minimize the impact on performance. */ declarationPath?: string; /** Path to a JSON file whose keys override the `description` of matching types in the generated output. * @deprecated */ overridePath?: string; /** Help message with description of command and available options. * * Alternatively, you can use the `--h` flag to display this message. */ help?: ''; } /** * CLI options for the set-up-config command. * @publicDocs */ interface setUpConfig { /** The name of your reference including caps and dashes between words. This will become part of the url path for your reference. */ name: string; /** Help message with description of command and available options. * * Alternatively, you can use the `--h` flag to display this message. */ help?: ''; } /** * CLI options for the set-up-docs command. Creates the initial folder structure for documentation output. */ interface setUpDocs { /** The path to the folder containing the source files. Can provide multiple paths separated by a space. * * @default `./src` */ srcInput?: string; /** Help message with description of command and available options. * * Alternatively, you can use the `--h` flag to display this message. */ help?: ''; } /** * JSDoc tags supported for entity documentation. * @publicDocs */ interface EntityTags { /** Displays the default value of a prop. */ default?: any; /** Displays the default value of a prop. */ defaultValue?: any; /** Marks the prop as deprecated. Can provide a message after the tag regarding the deprecation. */ deprecated?: string; /** Displays the environment variable. */ environment?: string; /** @deprecated Displays an example of how to use the prop. This tag required adding `jsDocTypeExamples: string[]` to the reference entity file, which is no longer supported. */ example?: string; /** Hides the prop from the documentation. */ private?: ''; /** Marks the prop as protected by styling the prop with a protected tooltip. */ protected?: ''; } export { ConfigGithubOptions, ConfigOptions, EntityTags, compareDocs, generateDocs, setUpConfig, setUpDocs };