diff --git a/docs/.gitignore b/docs/.gitignore index 49ba8fa7c..54672dd8f 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -2,4 +2,5 @@ node_modules/ .docusaurus .DS_Store build/ -.stylelintrc.json \ No newline at end of file +.stylelintrc.json +content/generated-reference \ No newline at end of file diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 0a2058be9..079594109 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -66,7 +66,15 @@ plugins: ], }, ], - + [ + 'docusaurus-plugin-typedoc', + { + id: 'generated-reference', + entryPoints: ['../src/index.ts'], + tsconfig: '../tsconfig.json', + out: "./content/generated-reference", + }, + ], ], diff --git a/docs/package-lock.json b/docs/package-lock.json index 65be5b629..126b771bf 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -14,10 +14,13 @@ "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", "css-minimizer-webpack-plugin": "^7.0.0", + "docusaurus-plugin-typedoc": "^1.0.5", "docusaurus-theme-github-codeblock": "^2.0.2", "prism-react-renderer": "^2.4.0", "react": "^18.0.0", - "react-dom": "^18.0.0" + "react-dom": "^18.0.0", + "typedoc": "^0.26.7", + "typedoc-plugin-markdown": "^4.2.7" }, "devDependencies": { "@docusaurus/module-type-aliases": "3.5.2", @@ -3027,6 +3030,57 @@ "version": "1.0.0-next.25", "license": "MIT" }, + "node_modules/@shikijs/core": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.18.0.tgz", + "integrity": "sha512-VK4BNVCd2leY62Nm2JjyxtRLkyrZT/tv104O81eyaCjHq4Adceq2uJVFJJAIof6lT1mBwZrEo2qT/T+grv3MQQ==", + "license": "MIT", + "dependencies": { + "@shikijs/engine-javascript": "1.18.0", + "@shikijs/engine-oniguruma": "1.18.0", + "@shikijs/types": "1.18.0", + "@shikijs/vscode-textmate": "^9.2.2", + "@types/hast": "^3.0.4", + "hast-util-to-html": "^9.0.3" + } + }, + "node_modules/@shikijs/engine-javascript": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.18.0.tgz", + "integrity": "sha512-qoP/aO/ATNwYAUw1YMdaip/YVEstMZEgrwhePm83Ll9OeQPuxDZd48szZR8oSQNQBT8m8UlWxZv8EA3lFuyI5A==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "1.18.0", + "@shikijs/vscode-textmate": "^9.2.2", + "oniguruma-to-js": "0.4.3" + } + }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.18.0.tgz", + "integrity": "sha512-B9u0ZKI/cud+TcmF8Chyh+R4V5qQVvyDOqXC2l2a4x73PBSBc6sZ0JRAX3eqyJswqir6ktwApUUGBYePdKnMJg==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "1.18.0", + "@shikijs/vscode-textmate": "^9.2.2" + } + }, + "node_modules/@shikijs/types": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.18.0.tgz", + "integrity": "sha512-O9N36UEaGGrxv1yUrN2nye7gDLG5Uq0/c1LyfmxsvzNPqlHzWo9DI0A4+fhW2y3bGKuQu/fwS7EPdKJJCowcVA==", + "license": "MIT", + "dependencies": { + "@shikijs/vscode-textmate": "^9.2.2", + "@types/hast": "^3.0.4" + } + }, + "node_modules/@shikijs/vscode-textmate": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-9.2.2.tgz", + "integrity": "sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==", + "license": "MIT" + }, "node_modules/@sideway/address": { "version": "4.1.5", "license": "BSD-3-Clause", @@ -5941,6 +5995,15 @@ "node": ">=6" } }, + "node_modules/docusaurus-plugin-typedoc": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/docusaurus-plugin-typedoc/-/docusaurus-plugin-typedoc-1.0.5.tgz", + "integrity": "sha512-mv8LBJYilGOOPLqaIM3vbYc34m4qwOCpb4WfP24DOPFNj2uiTerw8sg9MGvN6Jx2+J8rq9/WMnjcyz3UMqoIIQ==", + "license": "MIT", + "peerDependencies": { + "typedoc-plugin-markdown": ">=4.0.0" + } + }, "node_modules/docusaurus-theme-github-codeblock": { "version": "2.0.2", "license": "MIT", @@ -7277,6 +7340,29 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/hast-util-to-html": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.3.tgz", + "integrity": "sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/hast-util-to-jsx-runtime": { "version": "2.3.0", "license": "MIT", @@ -8216,6 +8302,15 @@ "version": "1.2.4", "license": "MIT" }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "license": "MIT", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, "node_modules/loader-runner": { "version": "4.3.0", "license": "MIT", @@ -8311,6 +8406,12 @@ "yallist": "^3.0.2" } }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "license": "MIT" + }, "node_modules/markdown-extensions": { "version": "2.0.0", "license": "MIT", @@ -8321,6 +8422,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, "node_modules/markdown-table": { "version": "3.0.3", "license": "MIT", @@ -8697,6 +8815,12 @@ "version": "2.0.30", "license": "CC0-1.0" }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "license": "MIT" + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -10639,6 +10763,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/oniguruma-to-js": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/oniguruma-to-js/-/oniguruma-to-js-0.4.3.tgz", + "integrity": "sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==", + "license": "MIT", + "dependencies": { + "regex": "^4.3.2" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/open": { "version": "8.4.2", "license": "MIT", @@ -11638,6 +11774,15 @@ "version": "1.4.1", "license": "MIT" }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/pupa": { "version": "3.1.0", "license": "MIT", @@ -12066,6 +12211,12 @@ "@babel/runtime": "^7.8.4" } }, + "node_modules/regex": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/regex/-/regex-4.3.2.tgz", + "integrity": "sha512-kK/AA3A9K6q2js89+VMymcboLOlF5lZRCYJv3gzszXFHBr6kO6qLGzbm+UIugBEV8SMMKCTR59txoY6ctRHYVw==", + "license": "MIT" + }, "node_modules/regexpu-core": { "version": "5.3.2", "license": "MIT", @@ -12847,6 +12998,20 @@ "node": ">=4" } }, + "node_modules/shiki": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.18.0.tgz", + "integrity": "sha512-8jo7tOXr96h9PBQmOHVrltnETn1honZZY76YA79MHheGQg55jBvbm9dtU+MI5pjC5NJCFuA6rvVTLVeSW5cE4A==", + "license": "MIT", + "dependencies": { + "@shikijs/core": "1.18.0", + "@shikijs/engine-javascript": "1.18.0", + "@shikijs/engine-oniguruma": "1.18.0", + "@shikijs/types": "1.18.0", + "@shikijs/vscode-textmate": "^9.2.2", + "@types/hast": "^3.0.4" + } + }, "node_modules/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", @@ -13727,6 +13892,76 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/typedoc": { + "version": "0.26.7", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.7.tgz", + "integrity": "sha512-gUeI/Wk99vjXXMi8kanwzyhmeFEGv1LTdTQsiyIsmSYsBebvFxhbcyAx7Zjo4cMbpLGxM4Uz3jVIjksu/I2v6Q==", + "license": "Apache-2.0", + "dependencies": { + "lunr": "^2.3.9", + "markdown-it": "^14.1.0", + "minimatch": "^9.0.5", + "shiki": "^1.16.2", + "yaml": "^2.5.1" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x" + } + }, + "node_modules/typedoc-plugin-markdown": { + "version": "4.2.7", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.2.7.tgz", + "integrity": "sha512-bLsQdweSm48P9j6kGqQ3/4GCH5zu2EnURSkkxqirNc+uVFE9YK825ogDw+WbNkRHIV6eZK/1U43gT7YfglyYOg==", + "license": "MIT", + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "typedoc": "0.26.x" + } + }, + "node_modules/typedoc/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/typedoc/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typedoc/node_modules/yaml": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", + "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/typescript": { "version": "5.5.4", "license": "Apache-2.0", @@ -13739,6 +13974,12 @@ "node": ">=14.17" } }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "license": "MIT" + }, "node_modules/undici-types": { "version": "6.11.1", "license": "MIT" diff --git a/docs/package.json b/docs/package.json index fa1cd46e7..3a39b8703 100644 --- a/docs/package.json +++ b/docs/package.json @@ -20,10 +20,13 @@ "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", "css-minimizer-webpack-plugin": "^7.0.0", + "docusaurus-plugin-typedoc": "^1.0.5", "docusaurus-theme-github-codeblock": "^2.0.2", "prism-react-renderer": "^2.4.0", "react": "^18.0.0", - "react-dom": "^18.0.0" + "react-dom": "^18.0.0", + "typedoc": "^0.26.7", + "typedoc-plugin-markdown": "^4.2.7" }, "devDependencies": { "@docusaurus/module-type-aliases": "3.5.2", @@ -46,4 +49,4 @@ "engines": { "node": ">=20.0" } -} \ No newline at end of file +} diff --git a/docs/sidebars.js b/docs/sidebars.js index 54625e6f4..5512605a5 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -91,6 +91,15 @@ const sidebars = { }, { type: 'html', value: '
' }, 'reference', + { + type: 'category', + label: 'Generated Reference', + link: { + type: 'doc', + id: 'generated-reference/index', + }, + items: require('./content/generated-reference/typedoc-sidebar.cjs'), + }, { type: 'html', value: '
' }, { type: 'link', diff --git a/docs/typedoc.json b/docs/typedoc.json new file mode 100644 index 000000000..614dee46b --- /dev/null +++ b/docs/typedoc.json @@ -0,0 +1,7 @@ +{ + "skipErrorChecking": true, + "useCodeBlocks": true, + "logLevel": "Error", + "readme": "none", + "gitRevision": "main" + } \ No newline at end of file diff --git a/src/types/actions/index.ts b/src/types/actions/index.ts index 5c7e7841a..dd3e1d93f 100644 --- a/src/types/actions/index.ts +++ b/src/types/actions/index.ts @@ -18,12 +18,12 @@ export * from './workflow-step-edit'; * TODO: BlockAction's default generic parameter (ElementAction) might be too specific to allow for this type to be used * as a constraint on SlackActionMiddlewareArgs' Action generic parameter. * - * If someone were to instantiate SlackActionMiddlewareArgs>, would it work? We need it to - * work as long as SomeNewAction implements BasicElementAction. + * If someone were to instantiate `SlackActionMiddlewareArgs>`, would it work? We need it to + * work as long as `SomeNewAction` implements `BasicElementAction`. * - * We don't want to substitute BlockAction with BlockAction here because that means the completions - * offered when no generic parameter is bound would be limited to BasicElementAction rather than the union of known - * actions - ElementAction. + * We don't want to substitute BlockAction with `BlockAction` here because that means the + * completions offered when no generic parameter is bound would be limited to BasicElementAction rather than the union + * of known actions - ElementAction. */ export type SlackAction = BlockAction | InteractiveMessage | DialogSubmitAction | WorkflowStepEdit;