From 0bcee7b7a191db488243a758ee896e0845139e45 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Wed, 1 Apr 2026 17:19:15 -0500 Subject: [PATCH 1/3] docs: use typedoc monorepo mode to generate an html reference API site --- .gitignore | 1 + .spellcheck.dict.txt | 1 + docs/reference-api-readme.md | 7 ++ package.json | 3 + packages/ai/typedoc.json | 5 + packages/app-distribution/typedoc.json | 4 + packages/app/typedoc.json | 5 + packages/auth/typedoc.json | 4 + packages/database/typedoc.json | 4 + packages/firestore/typedoc.json | 5 + packages/in-app-messaging/typedoc.json | 4 + packages/installations/typedoc.json | 4 + packages/ml/typedoc.json | 4 + packages/perf/typedoc.json | 4 + packages/remote-config/typedoc.json | 4 + packages/storage/typedoc.json | 4 + packages/vertexai/typedoc.json | 5 + typedoc.json | 67 ++++++++++ yarn.lock | 165 ++++++++++++++++++++++++- 19 files changed, 299 insertions(+), 1 deletion(-) create mode 100644 docs/reference-api-readme.md create mode 100644 packages/ai/typedoc.json create mode 100644 packages/app-distribution/typedoc.json create mode 100644 packages/app/typedoc.json create mode 100644 packages/auth/typedoc.json create mode 100644 packages/database/typedoc.json create mode 100644 packages/firestore/typedoc.json create mode 100644 packages/in-app-messaging/typedoc.json create mode 100644 packages/installations/typedoc.json create mode 100644 packages/ml/typedoc.json create mode 100644 packages/perf/typedoc.json create mode 100644 packages/remote-config/typedoc.json create mode 100644 packages/storage/typedoc.json create mode 100644 packages/vertexai/typedoc.json create mode 100644 typedoc.json diff --git a/.gitignore b/.gitignore index 738419a9c8..398fa7f43c 100644 --- a/.gitignore +++ b/.gitignore @@ -538,6 +538,7 @@ Pods/* packages/**/version.js packages/**/version.ts typedoc.raw.json +reference/ tests/ios/Firebase tests/ios/resetXcode.sh .tmp diff --git a/.spellcheck.dict.txt b/.spellcheck.dict.txt index 4d9306b7f5..9852f5c292 100644 --- a/.spellcheck.dict.txt +++ b/.spellcheck.dict.txt @@ -132,6 +132,7 @@ NoSQL Notifee notifee NPE +npm NPM OAuth onboarding diff --git a/docs/reference-api-readme.md b/docs/reference-api-readme.md new file mode 100644 index 0000000000..c4f6d4ce67 --- /dev/null +++ b/docs/reference-api-readme.md @@ -0,0 +1,7 @@ +# API reference + +This site documents the TypeScript and JavaScript APIs for the [`react-native-firebase`](https://github.com/invertase/react-native-firebase) packages published on npm under the `@react-native-firebase/*` scope. + +The **app** module is required; all other modules are optional peer packages. Use the sidebar to open each package. Cross-package types (for example `FirebaseApp`) link between modules when they are part of this documentation build. + +For guides and setup, see the [main documentation](https://rnfirebase.io). diff --git a/package.json b/package.json index abf1d71a63..2b25d6dee4 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,8 @@ "lint:spellcheck": "spellchecker --quiet --files=\"docs/**/*.md\" --dictionaries=\"./.spellcheck.dict.txt\" --reports=\"spelling.json\" --plugins spell indefinite-article repeated-words syntax-mentions syntax-urls frontmatter", "tsc:compile": "tsc --project .", "lint:all": "yarn lint && yarn lint:markdown && yarn lint:spellcheck && yarn tsc:compile", + "reference:api": "typedoc", + "reference:api:gh-pages": "typedoc --out apidocs-out --hostedBaseUrl https://invertase.github.io/react-native-firebase/ --useHostedBaseUrlForAbsoluteLinks", "tests:ai:mocks": "yarn ts-node ./scripts/fetch_ai_mock_responses.ts && yarn ts-node ./packages/ai/__tests__/test-utils/convert-mocks.ts", "tests:jest": "jest", "tests:jest-watch": "jest --watch", @@ -106,6 +108,7 @@ "spellchecker-cli": "^7.0.2", "ts-jest": "^29.4.6", "ts-node": "^10.9.2", + "typedoc": "^0.28.18", "typescript": "^5.9.3" }, "resolutions": { diff --git a/packages/ai/typedoc.json b/packages/ai/typedoc.json new file mode 100644 index 0000000000..1a8dcae982 --- /dev/null +++ b/packages/ai/typedoc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/index.ts"], + "tsconfig": "tsconfig.json" +} diff --git a/packages/app-distribution/typedoc.json b/packages/app-distribution/typedoc.json new file mode 100644 index 0000000000..a1be394b96 --- /dev/null +++ b/packages/app-distribution/typedoc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/index.d.ts"] +} diff --git a/packages/app/typedoc.json b/packages/app/typedoc.json new file mode 100644 index 0000000000..1a8dcae982 --- /dev/null +++ b/packages/app/typedoc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/index.ts"], + "tsconfig": "tsconfig.json" +} diff --git a/packages/auth/typedoc.json b/packages/auth/typedoc.json new file mode 100644 index 0000000000..a1be394b96 --- /dev/null +++ b/packages/auth/typedoc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/index.d.ts"] +} diff --git a/packages/database/typedoc.json b/packages/database/typedoc.json new file mode 100644 index 0000000000..a1be394b96 --- /dev/null +++ b/packages/database/typedoc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/index.d.ts"] +} diff --git a/packages/firestore/typedoc.json b/packages/firestore/typedoc.json new file mode 100644 index 0000000000..1ada5a3f2b --- /dev/null +++ b/packages/firestore/typedoc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/index.ts", "lib/pipelines/index.ts"], + "tsconfig": "tsconfig.json" +} diff --git a/packages/in-app-messaging/typedoc.json b/packages/in-app-messaging/typedoc.json new file mode 100644 index 0000000000..a1be394b96 --- /dev/null +++ b/packages/in-app-messaging/typedoc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/index.d.ts"] +} diff --git a/packages/installations/typedoc.json b/packages/installations/typedoc.json new file mode 100644 index 0000000000..a1be394b96 --- /dev/null +++ b/packages/installations/typedoc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/index.d.ts"] +} diff --git a/packages/ml/typedoc.json b/packages/ml/typedoc.json new file mode 100644 index 0000000000..a1be394b96 --- /dev/null +++ b/packages/ml/typedoc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/index.d.ts"] +} diff --git a/packages/perf/typedoc.json b/packages/perf/typedoc.json new file mode 100644 index 0000000000..a1be394b96 --- /dev/null +++ b/packages/perf/typedoc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/index.d.ts"] +} diff --git a/packages/remote-config/typedoc.json b/packages/remote-config/typedoc.json new file mode 100644 index 0000000000..a1be394b96 --- /dev/null +++ b/packages/remote-config/typedoc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/index.d.ts"] +} diff --git a/packages/storage/typedoc.json b/packages/storage/typedoc.json new file mode 100644 index 0000000000..a1be394b96 --- /dev/null +++ b/packages/storage/typedoc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/index.d.ts"] +} diff --git a/packages/vertexai/typedoc.json b/packages/vertexai/typedoc.json new file mode 100644 index 0000000000..1a8dcae982 --- /dev/null +++ b/packages/vertexai/typedoc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/index.ts"], + "tsconfig": "tsconfig.json" +} diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000000..3ced07dd0c --- /dev/null +++ b/typedoc.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "name": "React Native Firebase", + "entryPointStrategy": "packages", + "entryPoints": [ + "packages/app", + "packages/ai", + "packages/analytics", + "packages/app-check", + "packages/app-distribution", + "packages/auth", + "packages/crashlytics", + "packages/database", + "packages/firestore", + "packages/functions", + "packages/in-app-messaging", + "packages/installations", + "packages/messaging", + "packages/ml", + "packages/perf", + "packages/remote-config", + "packages/storage" + ], + "out": "reference", + "githubPages": true, + "router": "structure", + "navigation": { + "includeFolders": true, + "includeCategories": true, + "includeGroups": true, + "excludeReferences": false + }, + "categorizeByGroup": false, + "sortEntryPoints": false, + "excludeExternals": true, + "useFirstParagraphOfCommentAsSummary": true, + "searchInComments": true, + "hideGenerator": true, + "cleanOutputDir": true, + "titleLink": "https://github.com/invertase/react-native-firebase", + "navigationLinks": { + "GitHub": "https://github.com/invertase/react-native-firebase", + "npm": "https://www.npmjs.com/search?q=scope%3Areact-native-firebase" + }, + "sidebarLinks": { + "Documentation": "https://rnfirebase.io" + }, + "readme": "docs/reference-api-readme.md", + "packageOptions": { + "excludeExternals": true, + "excludePrivate": true, + "readme": "none", + "skipErrorChecking": true, + "gitRevision": "main", + "groupOrder": [ "Functions", "*" ] + }, + "externalSymbolLinkMappings": { + "@firebase/app": { + "FirebaseApp": "https://firebase.google.com/docs/reference/js/app.firebaseapp" + } + }, + "validation": { + "notExported": false, + "invalidLink": false, + "notDocumented": false + } +} diff --git a/yarn.lock b/yarn.lock index e5733685b4..66b89b4375 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3868,6 +3868,19 @@ __metadata: languageName: node linkType: hard +"@gerrit0/mini-shiki@npm:^3.23.0": + version: 3.23.0 + resolution: "@gerrit0/mini-shiki@npm:3.23.0" + dependencies: + "@shikijs/engine-oniguruma": "npm:^3.23.0" + "@shikijs/langs": "npm:^3.23.0" + "@shikijs/themes": "npm:^3.23.0" + "@shikijs/types": "npm:^3.23.0" + "@shikijs/vscode-textmate": "npm:^10.0.2" + checksum: 10/d44dac7c3f58ba136285b3c15c8a89eba120f7a493dddcf6178601ab8c0a5286da6a19515100297934288c41ae225f21013a4c395fe2f656b58f812dd13ccc1e + languageName: node + linkType: hard + "@google-cloud/cloud-sql-connector@npm:^1.3.3": version: 1.8.4 resolution: "@google-cloud/cloud-sql-connector@npm:1.8.4" @@ -6914,6 +6927,51 @@ __metadata: languageName: node linkType: hard +"@shikijs/engine-oniguruma@npm:^3.23.0": + version: 3.23.0 + resolution: "@shikijs/engine-oniguruma@npm:3.23.0" + dependencies: + "@shikijs/types": "npm:3.23.0" + "@shikijs/vscode-textmate": "npm:^10.0.2" + checksum: 10/edd8983be86f6b055793813e80ecf31c3cefdd896f3742797ae03f2cbb9f467ac736c4b152d4a5c42dbd17da17d24ff798a15d37bcf6205d7f8cd8f44e2a11e0 + languageName: node + linkType: hard + +"@shikijs/langs@npm:^3.23.0": + version: 3.23.0 + resolution: "@shikijs/langs@npm:3.23.0" + dependencies: + "@shikijs/types": "npm:3.23.0" + checksum: 10/115b1afb9eb4eb300eb68b146e442f7e6d196878798c5b9d75dd53a6ef1e1c3b27e325353a10973e3fa47d88630e937b8a3cf3b37b6eef80bf2aec3d51657bb3 + languageName: node + linkType: hard + +"@shikijs/themes@npm:^3.23.0": + version: 3.23.0 + resolution: "@shikijs/themes@npm:3.23.0" + dependencies: + "@shikijs/types": "npm:3.23.0" + checksum: 10/741987380445b788aea6cc1e03492bc06950f1a0461edf45083bd226889c5ba78c7ed1af9724afacab7d6471777f0c0e8871577183dfb2cfbceb255663374835 + languageName: node + linkType: hard + +"@shikijs/types@npm:3.23.0, @shikijs/types@npm:^3.23.0": + version: 3.23.0 + resolution: "@shikijs/types@npm:3.23.0" + dependencies: + "@shikijs/vscode-textmate": "npm:^10.0.2" + "@types/hast": "npm:^3.0.4" + checksum: 10/18b5703d445d53dd6782a3e2c7332009302c6c046f301d9cd99f1a26b9c8329b3e502b096894bffac61f78835c533827bab2ce78a39666ab87b78f8d7ca11f7b + languageName: node + linkType: hard + +"@shikijs/vscode-textmate@npm:^10.0.2": + version: 10.0.2 + resolution: "@shikijs/vscode-textmate@npm:10.0.2" + checksum: 10/d924cba8a01cd9ca12f56ba097d628fdb81455abb85884c8d8a5ae85b628a37dd5907e7691019b97107bd6608c866adf91ba04a1c3bba391281c88e386c044ea + languageName: node + linkType: hard + "@sideway/address@npm:^4.1.5": version: 4.1.5 resolution: "@sideway/address@npm:4.1.5" @@ -7229,7 +7287,7 @@ __metadata: languageName: node linkType: hard -"@types/hast@npm:^3.0.0": +"@types/hast@npm:^3.0.0, @types/hast@npm:^3.0.4": version: 3.0.4 resolution: "@types/hast@npm:3.0.4" dependencies: @@ -9003,6 +9061,15 @@ __metadata: languageName: node linkType: hard +"brace-expansion@npm:^5.0.5": + version: 5.0.5 + resolution: "brace-expansion@npm:5.0.5" + dependencies: + balanced-match: "npm:^4.0.2" + checksum: 10/f259b2ddf04489da9512ad637ba6b4ef2d77abd4445d20f7f1714585f153435200a53fa6a2e4a5ee974df14ddad4cd16421f6f803e96e8b452bd48598878d0ee + languageName: node + linkType: hard + "braces@npm:^3.0.3, braces@npm:~3.0.2": version: 3.0.3 resolution: "braces@npm:3.0.3" @@ -11251,6 +11318,13 @@ __metadata: languageName: node linkType: hard +"entities@npm:^4.4.0": + version: 4.5.0 + resolution: "entities@npm:4.5.0" + checksum: 10/ede2a35c9bce1aeccd055a1b445d41c75a14a2bb1cd22e242f20cf04d236cdcd7f9c859eb83f76885327bfae0c25bf03303665ee1ce3d47c5927b98b0e3e3d48 + languageName: node + linkType: hard + "entities@npm:^6.0.0": version: 6.0.1 resolution: "entities@npm:6.0.1" @@ -16607,6 +16681,15 @@ __metadata: languageName: node linkType: hard +"linkify-it@npm:^5.0.0": + version: 5.0.0 + resolution: "linkify-it@npm:5.0.0" + dependencies: + uc.micro: "npm:^2.0.0" + checksum: 10/ef3b7609dda6ec0c0be8a7b879cea195f0d36387b0011660cd6711bba0ad82137f59b458b7e703ec74f11d88e7c1328e2ad9b855a8500c0ded67461a8c4519e6 + languageName: node + linkType: hard + "load-json-file@npm:6.2.0": version: 6.2.0 resolution: "load-json-file@npm:6.2.0" @@ -16940,6 +17023,13 @@ __metadata: languageName: node linkType: hard +"lunr@npm:^2.3.9": + version: 2.3.9 + resolution: "lunr@npm:2.3.9" + checksum: 10/f2f6db34c046f5a767782fe2454e6dd69c75ba3c5cf5c1cb9cacca2313a99c2ba78ff8fa67dac866fb7c4ffd5f22e06684793f5f15ba14bddb598b94513d54bf + languageName: node + linkType: hard + "make-dir@npm:4.0.0, make-dir@npm:^4.0.0": version: 4.0.0 resolution: "make-dir@npm:4.0.0" @@ -17055,6 +17145,22 @@ __metadata: languageName: node linkType: hard +"markdown-it@npm:^14.1.1": + version: 14.1.1 + resolution: "markdown-it@npm:14.1.1" + dependencies: + argparse: "npm:^2.0.1" + entities: "npm:^4.4.0" + linkify-it: "npm:^5.0.0" + mdurl: "npm:^2.0.0" + punycode.js: "npm:^2.3.1" + uc.micro: "npm:^2.1.0" + bin: + markdown-it: bin/markdown-it.mjs + checksum: 10/088822c8aa9346ba4af6a205f6ee0f4baae55e3314f040dc5c28c897d57d0f979840c71872b3582a6a6e572d8c851c54e323c82f4559011dfa2e96224fc20fc2 + languageName: node + linkType: hard + "marked-terminal@npm:^7.0.0": version: 7.3.0 resolution: "marked-terminal@npm:7.3.0" @@ -17193,6 +17299,13 @@ __metadata: languageName: node linkType: hard +"mdurl@npm:^2.0.0": + version: 2.0.0 + resolution: "mdurl@npm:2.0.0" + checksum: 10/1720349d4a53e401aa993241368e35c0ad13d816ad0b28388928c58ca9faa0cf755fa45f18ccbf64f4ce54a845a50ddce5c84e4016897b513096a68dac4b0158 + languageName: node + linkType: hard + "media-typer@npm:0.3.0": version: 0.3.0 resolution: "media-typer@npm:0.3.0" @@ -18381,6 +18494,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^10.2.4": + version: 10.2.5 + resolution: "minimatch@npm:10.2.5" + dependencies: + brace-expansion: "npm:^5.0.5" + checksum: 10/19e87a931aff60ee7b9d80f39f817b8bfc54f61f8356ee3549fbf636dbccacacfec8d803eac73293955c4527cd085247dfc064bce4a5e349f8f3b85e2bf5da0f + languageName: node + linkType: hard + "minimatch@npm:^5.0.1, minimatch@npm:^5.1.0": version: 5.1.6 resolution: "minimatch@npm:5.1.6" @@ -20962,6 +21084,13 @@ __metadata: languageName: node linkType: hard +"punycode.js@npm:^2.3.1": + version: 2.3.1 + resolution: "punycode.js@npm:2.3.1" + checksum: 10/f0e946d1edf063f9e3d30a32ca86d8ff90ed13ca40dad9c75d37510a04473340cfc98db23a905cc1e517b1e9deb0f6021dce6f422ace235c60d3c9ac47c5a16a + languageName: node + linkType: hard + "punycode@npm:^2.1.0, punycode@npm:^2.1.1": version: 2.3.1 resolution: "punycode@npm:2.3.1" @@ -21325,6 +21454,7 @@ __metadata: spellchecker-cli: "npm:^7.0.2" ts-jest: "npm:^29.4.6" ts-node: "npm:^10.9.2" + typedoc: "npm:^0.28.18" typescript: "npm:^5.9.3" languageName: unknown linkType: soft @@ -24414,6 +24544,23 @@ __metadata: languageName: node linkType: hard +"typedoc@npm:^0.28.18": + version: 0.28.18 + resolution: "typedoc@npm:0.28.18" + dependencies: + "@gerrit0/mini-shiki": "npm:^3.23.0" + lunr: "npm:^2.3.9" + markdown-it: "npm:^14.1.1" + minimatch: "npm:^10.2.4" + yaml: "npm:^2.8.2" + peerDependencies: + typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x + bin: + typedoc: bin/typedoc + checksum: 10/d7342aeeda34a69e853463e5300a7a06ec42757e2942f3de4a2c882f08f1d4e4d03662a4e8e8259e14c1a0b948b57a6e833d6e391ba41987c4cd400d4d76aeab + languageName: node + linkType: hard + "typescript@npm:>=3 < 6, typescript@npm:^5.9.3": version: 5.9.3 resolution: "typescript@npm:5.9.3" @@ -24448,6 +24595,13 @@ __metadata: languageName: node linkType: hard +"uc.micro@npm:^2.0.0, uc.micro@npm:^2.1.0": + version: 2.1.0 + resolution: "uc.micro@npm:2.1.0" + checksum: 10/37197358242eb9afe367502d4638ac8c5838b78792ab218eafe48287b0ed28aaca268ec0392cc5729f6c90266744de32c06ae938549aee041fc93b0f9672d6b2 + languageName: node + linkType: hard + "uglify-js@npm:^3.1.4": version: 3.19.3 resolution: "uglify-js@npm:3.19.3" @@ -25797,6 +25951,15 @@ __metadata: languageName: node linkType: hard +"yaml@npm:^2.8.2": + version: 2.8.3 + resolution: "yaml@npm:2.8.3" + bin: + yaml: bin.mjs + checksum: 10/ecad41d39d34fae5cc17ea2d4b7f7f55faacd45cbce8983ba22d48d1ed1a92ed242ea49ea813a79ac39a69f75f9c5a03e7b5395fd954d55476f25e21a47c141d + languageName: node + linkType: hard + "yargs-parser@npm:21.1.1, yargs-parser@npm:^21.0.0, yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" From e882f07beae9729cc2c123aead4a785aaac6176a Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Wed, 1 Apr 2026 17:19:53 -0500 Subject: [PATCH 2/3] fix(docs): workflow to generate+publish API docs, call same on publish --- .github/workflows/deploy-api-reference.yml | 37 ++++++++++++++++++++++ .github/workflows/publish.yml | 9 ++++++ .gitignore | 1 + 3 files changed, 47 insertions(+) create mode 100644 .github/workflows/deploy-api-reference.yml diff --git a/.github/workflows/deploy-api-reference.yml b/.github/workflows/deploy-api-reference.yml new file mode 100644 index 0000000000..a431af5173 --- /dev/null +++ b/.github/workflows/deploy-api-reference.yml @@ -0,0 +1,37 @@ +name: Deploy API Reference +on: + workflow_dispatch: +jobs: + deploy-api-reference: + name: 'Deploy API Reference' + runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: actions/setup-node@v6 + with: + node-version: lts/* + registry-url: 'https://registry.npmjs.org' + - name: Install latest NPM + run: | + npm --version + npm install -g npm@latest + npm --version + - name: Yarn Install + uses: nick-fields/retry@v3 + with: + timeout_minutes: 15 + retry_wait_seconds: 60 + max_attempts: 3 + command: yarn + - name: Build API reference (TypeDoc) + run: yarn reference:api:gh-pages + - name: Upload API reference artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./apidocs-out diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8538523d9f..be0d628212 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -64,3 +64,12 @@ jobs: # org admin Github Token required for the changelog/tag commit+push # to work via an exception to branch protection rules GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + + deploy-api-reference: + name: 'Deploy API Reference' + needs: publish_npm + uses: ./.github/workflows/deploy-api-reference.yml + permissions: + contents: read + pages: write + id-token: write diff --git a/.gitignore b/.gitignore index 398fa7f43c..802ffc379e 100644 --- a/.gitignore +++ b/.gitignore @@ -539,6 +539,7 @@ packages/**/version.js packages/**/version.ts typedoc.raw.json reference/ +apidocs-out/ tests/ios/Firebase tests/ios/resetXcode.sh .tmp From 054334b953bed04e9cbaa919802205e434dd4af3 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 6 Apr 2026 19:34:30 -0500 Subject: [PATCH 3/3] style(lint): de-lint all jsdoc/typedoc comments --- packages/ai/lib/index.ts | 6 +- packages/ai/lib/public-types.ts | 2 +- packages/ai/lib/types/imagen/requests.ts | 2 +- packages/ai/lib/types/imagen/responses.ts | 4 +- packages/ai/typedoc.json | 3 +- packages/analytics/lib/modular.ts | 7 +- packages/analytics/typedoc.json | 48 +++++++++++ packages/app-check/typedoc.json | 15 ++++ packages/app-distribution/typedoc.json | 6 +- packages/app/lib/types/app.ts | 60 ++++--------- packages/app/typedoc.json | 3 +- packages/auth/lib/index.d.ts | 84 +++++++++---------- packages/auth/typedoc.json | 3 +- packages/crashlytics/typedoc.json | 6 ++ packages/database/lib/index.d.ts | 6 +- packages/database/typedoc.json | 4 +- .../firestore/lib/pipelines/expressions.ts | 10 +-- packages/firestore/lib/types/namespaced.ts | 2 - packages/firestore/typedoc.json | 30 ++++++- packages/functions/typedoc.json | 14 ++++ packages/in-app-messaging/typedoc.json | 3 +- packages/installations/typedoc.json | 4 +- packages/messaging/lib/types/messaging.ts | 73 ++++------------ packages/messaging/typedoc.json | 22 +++++ packages/ml/lib/modular/index.d.ts | 2 +- packages/ml/typedoc.json | 4 +- packages/perf/typedoc.json | 3 +- packages/remote-config/lib/index.d.ts | 2 +- packages/remote-config/typedoc.json | 4 +- packages/storage/lib/index.d.ts | 20 ++--- packages/storage/lib/modular/index.d.ts | 4 +- packages/storage/typedoc.json | 4 +- typedoc.json | 8 +- 33 files changed, 276 insertions(+), 192 deletions(-) create mode 100644 packages/analytics/typedoc.json create mode 100644 packages/app-check/typedoc.json create mode 100644 packages/crashlytics/typedoc.json create mode 100644 packages/functions/typedoc.json create mode 100644 packages/messaging/typedoc.json diff --git a/packages/ai/lib/index.ts b/packages/ai/lib/index.ts index 6dfce8da33..67fccfdb88 100644 --- a/packages/ai/lib/index.ts +++ b/packages/ai/lib/index.ts @@ -49,7 +49,7 @@ export { /** * Returns the default {@link AI} instance that is associated with the provided - * {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new instance with the + * {@link @firebase/app!FirebaseApp}. If no instance exists, initializes a new instance with the * default settings. * * @example @@ -69,9 +69,9 @@ export { * const ai = getAI(app, { backend: new VertexAIBackend() }); * ``` * - * @param app - The {@link @firebase/app#FirebaseApp} to use. + * @param app - The {@link @firebase/app!FirebaseApp} to use. * @param options - {@link AIOptions} that configure the AI instance. - * @returns The default {@link AI} instance for the given {@link @firebase/app#FirebaseApp}. + * @returns The default {@link AI} instance for the given {@link @firebase/app!FirebaseApp}. * * @public */ diff --git a/packages/ai/lib/public-types.ts b/packages/ai/lib/public-types.ts index e17cb281db..e6b0b9c765 100644 --- a/packages/ai/lib/public-types.ts +++ b/packages/ai/lib/public-types.ts @@ -87,7 +87,7 @@ export type BackendType = (typeof BackendType)[keyof typeof BackendType]; */ export interface AI { /** - * The {@link @firebase/app#FirebaseApp} this {@link AI} instance is associated with. + * The {@link @firebase/app!FirebaseApp} this {@link AI} instance is associated with. */ app: ReactNativeFirebase.FirebaseApp; appCheck?: FirebaseAppCheckTypes.Module | null; diff --git a/packages/ai/lib/types/imagen/requests.ts b/packages/ai/lib/types/imagen/requests.ts index 20fda7f167..baa8db3831 100644 --- a/packages/ai/lib/types/imagen/requests.ts +++ b/packages/ai/lib/types/imagen/requests.ts @@ -73,7 +73,7 @@ export interface ImagenGenerationConfig { numberOfImages?: number; /** * The aspect ratio of the generated images. The default value is square 1:1. - * Supported aspect ratios depend on the Imagen model, see {@link (ImagenAspectRatio:type)} + * Supported aspect ratios depend on the Imagen model, see {@link ImagenAspectRatio} * for more details. */ aspectRatio?: ImagenAspectRatio; diff --git a/packages/ai/lib/types/imagen/responses.ts b/packages/ai/lib/types/imagen/responses.ts index 548c1f0df0..18b642eded 100644 --- a/packages/ai/lib/types/imagen/responses.ts +++ b/packages/ai/lib/types/imagen/responses.ts @@ -71,8 +71,8 @@ export interface ImagenGenerationResponse; /** - * A prompt appears on the device to ask the user to update play services + * A prompt appears on the device to ask the user to update play services, returns undefined on iOS * * #### Example * * ```js * await firebase.utils().promptForPlayServices(); * ``` - * - * @android Android only - iOS returns undefined */ abstract promptForPlayServices(): Promise; /** - * Attempts to make Google Play services available on this device + * Attempts to make Google Play services available on this device, returns undefined on iOS * * #### Example * * ```js * await firebase.utils().makePlayServicesAvailable(); * ``` - * - * @android Android only - iOS returns undefined */ abstract makePlayServicesAvailable(): Promise; /** - * Resolves an error by starting any intents requiring user interaction. + * Resolves an error by starting any intents requiring user interaction, returns undefined on iOS * * #### Example * * ```js * await firebase.utils().resolutionForPlayServices(); * ``` - * - * @android Android only - iOS returns undefined */ abstract resolutionForPlayServices(): Promise; } diff --git a/packages/app/typedoc.json b/packages/app/typedoc.json index 1a8dcae982..532f326da2 100644 --- a/packages/app/typedoc.json +++ b/packages/app/typedoc.json @@ -1,5 +1,6 @@ { "$schema": "https://typedoc.org/schema.json", "entryPoints": ["lib/index.ts"], - "tsconfig": "tsconfig.json" + "tsconfig": "tsconfig.json", + "intentionallyNotExported": ["FirebaseRoot"] } diff --git a/packages/auth/lib/index.d.ts b/packages/auth/lib/index.d.ts index dfd47fd9a9..7e87730bb7 100644 --- a/packages/auth/lib/index.d.ts +++ b/packages/auth/lib/index.d.ts @@ -102,7 +102,7 @@ export namespace FirebaseAuthTypes { /** * Creates a new `AuthCredential`. * - * @returns {@link auth.AuthCredential}. + * @returns {@link AuthCredential}. * @param token A provider token. * @param secret A provider secret. */ @@ -122,7 +122,7 @@ export namespace FirebaseAuthTypes { /** * Creates a new `AuthCredential`. * - * @returns {@link auth.AuthCredential}. + * @returns {@link AuthCredential}. * @param token A provider token. * @param secret A provider secret. */ @@ -166,7 +166,7 @@ export namespace FirebaseAuthTypes { /** * Creates a new `OIDCProvider`. * - * @returns {@link auth.AuthCredential}. + * @returns {@link AuthCredential}. * @param oidcSuffix this is the "Provider ID" value from the firebase console fx `azure_test`. * @param token A provider token. */ @@ -182,7 +182,7 @@ export namespace FirebaseAuthTypes { */ PROVIDER_ID: string; /** - * This corresponds to the sign-in method identifier as returned in {@link auth#fetchSignInMethodsForEmail}. + * This corresponds to the sign-in method identifier as returned in {@link fetchSignInMethodsForEmail}. * * #### Example * @@ -195,7 +195,7 @@ export namespace FirebaseAuthTypes { */ EMAIL_LINK_SIGN_IN_METHOD: string; /** - * This corresponds to the sign-in method identifier as returned in {@link auth#fetchSignInMethodsForEmail}. + * This corresponds to the sign-in method identifier as returned in {@link fetchSignInMethodsForEmail}. * * #### Example * @@ -216,7 +216,7 @@ export namespace FirebaseAuthTypes { * const authCredential = firebase.auth.EmailAuthProvider.credential('joe.bloggs@example.com', '123456'); * ``` * - * @returns {@link auth.AuthCredential} + * @returns {@link AuthCredential} * @param email Users email address. * @param password User account password. */ @@ -245,7 +245,7 @@ export namespace FirebaseAuthTypes { */ CODE_SENT: 'sent'; /** - * The timeout specified in {@link auth#verifyPhoneNumber} has expired. + * The timeout specified in {@link verifyPhoneNumber} has expired. */ AUTO_VERIFY_TIMEOUT: 'timeout'; /** @@ -471,7 +471,7 @@ export namespace FirebaseAuthTypes { } /** - * A structure containing additional user information from a federated identity provider via {@link auth.UserCredential}. + * A structure containing additional user information from a federated identity provider via {@link UserCredential}. * * #### Example * @@ -515,13 +515,13 @@ export namespace FirebaseAuthTypes { */ additionalUserInfo?: AdditionalUserInfo; /** - * Returns the {@link auth.User} interface of this credential. + * Returns the {@link User} interface of this credential. */ user: User; } /** - * Holds the user metadata for the current {@link auth.User}. + * Holds the user metadata for the current {@link User}. * * #### Example * @@ -747,7 +747,7 @@ export namespace FirebaseAuthTypes { } /** - * Interface representing ID token result obtained from {@link auth.User#getIdTokenResult}. + * Interface representing ID token result obtained from {@link User#getIdTokenResult}. * It contains the ID token JWT string and other helper properties for getting different data * associated with the token as well as all the decoded payload claims. * @@ -818,7 +818,7 @@ export namespace FirebaseAuthTypes { } /** - * A result from a {@link auth#signInWithPhoneNumber} call. + * A result from a {@link signInWithPhoneNumber} call. * * #### Example * @@ -843,8 +843,8 @@ export namespace FirebaseAuthTypes { } /** - * Android specific options which can be attached to the {@link auth.ActionCodeSettings} object - * to be sent with requests such as {@link auth.User#sendEmailVerification}. + * Android specific options which can be attached to the {@link ActionCodeSettings} object + * to be sent with requests such as {@link User#sendEmailVerification}. * * #### Example * @@ -873,7 +873,7 @@ export namespace FirebaseAuthTypes { } /** - * Additional data returned from a {@link auth#checkActionCode} call. + * Additional data returned from a {@link checkActionCode} call. * For the PASSWORD_RESET, VERIFY_EMAIL, and RECOVER_EMAIL actions, this object contains an email field with the address the email was sent to. * For the RECOVER_EMAIL action, which allows a user to undo an email address change, this object also contains a fromEmail field with the user account's new email address. After the action completes, the user's email address will revert to the value in the email field from the value in fromEmail field. * @@ -892,13 +892,13 @@ export namespace FirebaseAuthTypes { */ email?: string; /** - * This signifies the current email associated with the account, which may have changed as a result of the {@link auth#checkActionCode} call performed. + * This signifies the current email associated with the account, which may have changed as a result of the {@link checkActionCode} call performed. */ fromEmail?: string; } /** - * The interface returned from a {@link auth#checkActionCode} call. + * The interface returned from a {@link checkActionCode} call. * * #### Example * @@ -919,8 +919,8 @@ export namespace FirebaseAuthTypes { } /** - * iOS specific options which can be attached to the {@link auth.ActionCodeSettings} object - * to be sent with requests such as {@link auth.User#sendEmailVerification}. + * iOS specific options which can be attached to the {@link ActionCodeSettings} object + * to be sent with requests such as {@link User#sendEmailVerification}. * * #### Example * @@ -940,7 +940,7 @@ export namespace FirebaseAuthTypes { } /** - * Options to be sent with requests such as {@link auth.User#sendEmailVerification}. + * Options to be sent with requests such as {@link User#sendEmailVerification}. * * #### Example * @@ -985,7 +985,7 @@ export namespace FirebaseAuthTypes { } /** - * An auth listener callback function for {@link auth#onAuthStateChanged}. + * An auth listener callback function for {@link onAuthStateChanged}. * * #### Example * @@ -1073,11 +1073,11 @@ export namespace FirebaseAuthTypes { } /** - * The listener function returned from a {@link auth#verifyPhoneNumber} call. + * The listener function returned from a {@link verifyPhoneNumber} call. */ export interface PhoneAuthListener { /** - * The phone auth state listener. See {@link auth.PhoneAuthState} for different event state types. + * The phone auth state listener. See {@link PhoneAuthState} for different event state types. * * #### Example * @@ -1152,7 +1152,7 @@ export namespace FirebaseAuthTypes { * }); * ``` * - * > Used when no `onRejected` handler is passed to {@link auth.PhoneAuthListener#then}. + * > Used when no `onRejected` handler is passed to {@link PhoneAuthListener#then}. * * @param onRejected Rejected promise handler. */ @@ -1253,24 +1253,24 @@ export namespace FirebaseAuthTypes { emailVerified: boolean; /** * Returns true if the user is anonymous; that is, the user account was created with - * {@link auth#signInAnonymously} and has not been linked to another account - * with {@link auth#linkWithCredential}. + * {@link signInAnonymously} and has not been linked to another account + * with {@link linkWithCredential}. */ isAnonymous: boolean; /** - * Returns the {@link auth.UserMetadata} associated with this user. + * Returns the {@link UserMetadata} associated with this user. */ metadata: UserMetadata; /** - * Returns the {@link auth.MultiFactor} associated with this user. + * Returns the {@link MultiFactor} associated with this user. */ multiFactor: MultiFactor | null; /** * Returns the phone number of the user, as stored in the Firebase project's user database, - * or null if none exists. This can be updated at any time by calling {@link auth.User#updatePhoneNumber}. + * or null if none exists. This can be updated at any time by calling {@link User#updatePhoneNumber}. */ phoneNumber: string | null; @@ -1357,8 +1357,8 @@ export namespace FirebaseAuthTypes { * @error auth/wrong-password Thrown if the password used in a auth.EmailAuthProvider.credential is not correct or when the user associated with the email does not have a password. * @error auth/invalid-verification-code Thrown if the credential is a auth.PhoneAuthProvider.credential and the verification code of the credential is not valid. * @error auth/invalid-verification-id Thrown if the credential is a auth.PhoneAuthProvider.credential and the verification ID of the credential is not valid. - * @throws on iOS {@link auth.NativeFirebaseAuthError}, on Android {@link auth.NativeFirebaseError} - * @param credential A created {@link auth.AuthCredential}. + * @throws on iOS {@link NativeFirebaseAuthError}, on Android {@link NativeFirebaseError} + * @param credential A created {@link AuthCredential}. */ linkWithCredential(credential: AuthCredential): Promise; @@ -1383,8 +1383,8 @@ export namespace FirebaseAuthTypes { * @error auth/wrong-password Thrown if the password used in a auth.EmailAuthProvider.credential is not correct or when the user associated with the email does not have a password. * @error auth/invalid-verification-code Thrown if the credential is a auth.PhoneAuthProvider.credential and the verification code of the credential is not valid. * @error auth/invalid-verification-id Thrown if the credential is a auth.PhoneAuthProvider.credential and the verification ID of the credential is not valid. - * @throws on iOS {@link auth.NativeFirebaseAuthError}, on Android {@link auth.NativeFirebaseError} - * @param provider A created {@link auth.AuthProvider}. + * @throws on iOS {@link NativeFirebaseAuthError}, on Android {@link NativeFirebaseError} + * @param provider A created {@link AuthProvider}. */ linkWithPopup(provider: AuthProvider): Promise; @@ -1409,8 +1409,8 @@ export namespace FirebaseAuthTypes { * @error auth/wrong-password Thrown if the password used in a auth.EmailAuthProvider.credential is not correct or when the user associated with the email does not have a password. * @error auth/invalid-verification-code Thrown if the credential is a auth.PhoneAuthProvider.credential and the verification code of the credential is not valid. * @error auth/invalid-verification-id Thrown if the credential is a auth.PhoneAuthProvider.credential and the verification ID of the credential is not valid. - * @throws on iOS {@link auth.NativeFirebaseAuthError}, on Android {@link auth.NativeFirebaseError} - * @param provider A created {@link auth.AuthProvider}. + * @throws on iOS {@link NativeFirebaseAuthError}, on Android {@link NativeFirebaseError} + * @param provider A created {@link AuthProvider}. */ linkWithRedirect(provider: AuthProvider): Promise; @@ -1431,7 +1431,7 @@ export namespace FirebaseAuthTypes { * @error auth/wrong-password Thrown if the password used in a auth.EmailAuthProvider.credential is not correct or when the user associated with the email does not have a password. * @error auth/invalid-verification-code Thrown if the credential is a auth.PhoneAuthProvider.credential and the verification code of the credential is not valid. * @error auth/invalid-verification-id Thrown if the credential is a auth.PhoneAuthProvider.credential and the verification ID of the credential is not valid. - * @param credential A created {@link auth.AuthCredential}. + * @param credential A created {@link AuthCredential}. */ reauthenticateWithCredential(credential: AuthCredential): Promise; @@ -1451,7 +1451,7 @@ export namespace FirebaseAuthTypes { * @error auth/wrong-password Thrown if the password used in a auth.EmailAuthProvider.credential is not correct or when the user associated with the email does not have a password. * @error auth/invalid-verification-code Thrown if the credential is a auth.PhoneAuthProvider.credential and the verification code of the credential is not valid. * @error auth/invalid-verification-id Thrown if the credential is a auth.PhoneAuthProvider.credential and the verification ID of the credential is not valid. - * @param provider A created {@link auth.AuthProvider}. + * @param provider A created {@link AuthProvider}. * @returns A promise that resolves with no value. */ reauthenticateWithRedirect(provider: AuthProvider): Promise; @@ -1686,7 +1686,7 @@ export namespace FirebaseAuthTypes { * const user = firebase.auth().currentUser; * ``` * - * > It is recommended to use {@link auth#onAuthStateChanged} to track whether the user is currently signed in. + * > It is recommended to use {@link onAuthStateChanged} to track whether the user is currently signed in. */ currentUser: User | null; /** @@ -1765,9 +1765,9 @@ export namespace FirebaseAuthTypes { /** * Adds a listener to observe changes to the User object. This is a superset of everything from - * {@link auth#onAuthStateChanged}, {@link auth#onIdTokenChanged} and user changes. The goal of this + * {@link onAuthStateChanged}, {@link onIdTokenChanged} and user changes. The goal of this * method is to provide easier listening to all user changes, such as when credentials are - * linked and unlinked, without manually having to call {@link auth.User#reload}. + * linked and unlinked, without manually having to call {@link User#reload}. * * #### Example * @@ -1792,7 +1792,7 @@ export namespace FirebaseAuthTypes { /** * Signs the user out. * - * Triggers the {@link auth#onAuthStateChanged} listener. + * Triggers the {@link onAuthStateChanged} listener. * * #### Example * @@ -2143,7 +2143,7 @@ export namespace FirebaseAuthTypes { /** * Completes the password reset process with the confirmation code and new password, via - * {@link auth#sendPasswordResetEmail}. + * {@link sendPasswordResetEmail}. * * #### Example * diff --git a/packages/auth/typedoc.json b/packages/auth/typedoc.json index a1be394b96..12fefc5cf3 100644 --- a/packages/auth/typedoc.json +++ b/packages/auth/typedoc.json @@ -1,4 +1,5 @@ { "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["lib/index.d.ts"] + "entryPoints": ["lib/index.d.ts"], + "intentionallyNotExported": ["AuthNamespace"] } diff --git a/packages/crashlytics/typedoc.json b/packages/crashlytics/typedoc.json new file mode 100644 index 0000000000..6e70d1d02d --- /dev/null +++ b/packages/crashlytics/typedoc.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/modular.ts", "lib/types/crashlytics.ts"], + "tsconfig": "tsconfig.json", + "intentionallyNotExported": ["_Statics"] +} diff --git a/packages/database/lib/index.d.ts b/packages/database/lib/index.d.ts index 780b60db9d..b6902fb812 100644 --- a/packages/database/lib/index.d.ts +++ b/packages/database/lib/index.d.ts @@ -273,7 +273,7 @@ export namespace FirebaseDatabaseTypes { /** * Sets a priority for the data at this Database location. Setting null removes any priority at this location. * - * See {@link database.Query#orderByPriority} to learn how to use priority values in your query. + * See {@link Query#orderByPriority} to learn how to use priority values in your query. * * #### Example * @@ -413,7 +413,7 @@ export namespace FirebaseDatabaseTypes { push(value?: any, onComplete?: () => void): ThenableReference; /** - * Returns an {@link database.OnDisconnect} instance. + * Returns an {@link OnDisconnect} instance. * * #### Example * @@ -497,7 +497,7 @@ export namespace FirebaseDatabaseTypes { * Returns whether or not the current and provided queries represent the same location, have the same query parameters. * * Two Reference objects are equivalent if they represent the same location and are from the same instance of - * {@link app}. Equivalent queries share the same sort order, limits, and starting and ending points. + * {@link @firebase/app!FirebaseApp}. Equivalent queries share the same sort order, limits, and starting and ending points. * * #### Example * diff --git a/packages/database/typedoc.json b/packages/database/typedoc.json index a1be394b96..45aec0df2f 100644 --- a/packages/database/typedoc.json +++ b/packages/database/typedoc.json @@ -1,4 +1,6 @@ { "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["lib/index.d.ts"] + "entryPoints": ["lib/index.d.ts"], + "intentionallyNotExported": ["DatabaseNamespace"] + } diff --git a/packages/firestore/lib/pipelines/expressions.ts b/packages/firestore/lib/pipelines/expressions.ts index 83dafa6e03..b5ff72f415 100644 --- a/packages/firestore/lib/pipelines/expressions.ts +++ b/packages/firestore/lib/pipelines/expressions.ts @@ -1132,8 +1132,8 @@ export function constant( * @beta * Creates an expression that adds two or more expressions together. * - * @param first - The first expression to add. - * @param second - The second expression or literal to add. + * @param _first - The first expression to add. + * @param _second - The second expression or literal to add. * @returns A new Expression representing the addition operation. */ export function add(_first: Expression, _second: Expression | unknown): FunctionExpression; @@ -1141,8 +1141,8 @@ export function add(_first: Expression, _second: Expression | unknown): Function * @beta * Creates an expression that adds a field's value to an expression. * - * @param fieldName - The name of the field containing the value to add. - * @param second - The second expression or literal to add. + * @param _fieldName - The name of the field containing the value to add. + * @param _second - The second expression or literal to add. * @returns A new Expression representing the addition operation. */ export function add(_fieldName: string, _second: Expression | unknown): FunctionExpression; @@ -1230,7 +1230,7 @@ export function multiply( * @beta * Creates an expression that evaluates to the document ID (and optionally path). * - * @param documentPath - Document path string or DocumentReference. + * @param _documentPath - Document path string or DocumentReference. * @returns A new Expression representing the document ID. */ export function documentId(_documentPath: string | DocumentReference): FunctionExpression; diff --git a/packages/firestore/lib/types/namespaced.ts b/packages/firestore/lib/types/namespaced.ts index e5f42e6341..e33d97b74c 100644 --- a/packages/firestore/lib/types/namespaced.ts +++ b/packages/firestore/lib/types/namespaced.ts @@ -44,8 +44,6 @@ import { ReactNativeFirebase } from '@react-native-firebase/app'; * * // firebase.firestore().X * ``` - * - * @firebase firestore */ // eslint-disable-next-line @typescript-eslint/no-namespace export namespace FirebaseFirestoreTypes { diff --git a/packages/firestore/typedoc.json b/packages/firestore/typedoc.json index 1ada5a3f2b..8a0ab4e5cc 100644 --- a/packages/firestore/typedoc.json +++ b/packages/firestore/typedoc.json @@ -1,5 +1,31 @@ { "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["lib/index.ts", "lib/pipelines/index.ts"], - "tsconfig": "tsconfig.json" + "entryPoints": [ + "lib/modular.ts", + "lib/FirestoreTransaction.ts", + "lib/FirestoreWriteBatch.ts", + "lib/FirestoreFilter.ts", + "lib/FirestoreDocumentChange.ts", + "lib/FirestoreDocumentSnapshot.ts", + "lib/FirestorePersistentCacheIndexManager.ts", + "lib/FirestoreQuerySnapshot.ts", + "lib/types/firestore.ts", + "lib/pipelines/index.ts", + "lib/pipelines/expressions.ts", + "lib/pipelines/stage_options.ts", + "lib/pipelines/pipeline-source.ts" + ], + "tsconfig": "tsconfig.json", + "intentionallyNotExported": [ + "FirestoreInternal", + "FilterValue", + "default", + "FilterMap", + "DocumentFieldValueInternal", + "FirestorePipelineSerializedInternal", + "TimestampUnit", + "FilterOperator", + "SerializedFilterSpec", + "FirestoreBlobInternal" + ] } diff --git a/packages/functions/typedoc.json b/packages/functions/typedoc.json new file mode 100644 index 0000000000..954869a0ab --- /dev/null +++ b/packages/functions/typedoc.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/modular.ts", "lib/types/functions.ts"], + "tsconfig": "tsconfig.json", + "intentionallyNotExported": [ + "_HttpsCallable", + "_HttpsCallableOptions", + "_HttpsCallableResult", + "_HttpsCallableStreamOptions", + "_HttpsCallableStreamResult", + "_HttpsError", + "_HttpsErrorCode" + ] +} diff --git a/packages/in-app-messaging/typedoc.json b/packages/in-app-messaging/typedoc.json index a1be394b96..d3359a2a23 100644 --- a/packages/in-app-messaging/typedoc.json +++ b/packages/in-app-messaging/typedoc.json @@ -1,4 +1,5 @@ { "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["lib/index.d.ts"] + "entryPoints": ["lib/index.d.ts"], + "intentionallyNotExported": ["InAppMessagingNamespace"] } diff --git a/packages/installations/typedoc.json b/packages/installations/typedoc.json index a1be394b96..bf93ba7159 100644 --- a/packages/installations/typedoc.json +++ b/packages/installations/typedoc.json @@ -1,4 +1,6 @@ { "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["lib/index.d.ts"] + "entryPoints": ["lib/index.d.ts"], + "intentionallyNotExported": ["InstallationsNamespace"] + } diff --git a/packages/messaging/lib/types/messaging.ts b/packages/messaging/lib/types/messaging.ts index a9f97fc829..12307ec7d0 100644 --- a/packages/messaging/lib/types/messaging.ts +++ b/packages/messaging/lib/types/messaging.ts @@ -78,23 +78,17 @@ export interface RemoteMessage { /** * Whether the iOS APNs message was configured as a background update notification. - * - * @platform ios iOS */ contentAvailable?: boolean; /** * Whether the iOS APNs `mutable-content` property on the message was set * allowing the app to modify the notification via app extensions. - * - * @platform ios iOS */ mutableContent?: boolean; /** * The iOS category this notification is assigned to. - * - * @platform ios iOS */ category?: string; @@ -161,16 +155,12 @@ export interface FcmOptions { */ export interface NativeTokenOptions { /** - * The app name of the FirebaseApp instance. - * - * @platform android Android + * On Android, the app name of the FirebaseApp instance. */ appName?: string; /** - * The senderID for a particular Firebase project. - * - * @platform ios iOS + * On iOS, the senderID for a particular Firebase project. */ senderId?: string; } @@ -180,20 +170,16 @@ export interface NativeTokenOptions { */ export interface GetTokenOptions { /** - * The VAPID key used to authenticate the push subscribers + * On Web, the VAPID key used to authenticate the push subscribers * to receive push messages only from sending servers * that hold the corresponding private key. - * - * @platform web */ vapidKey?: string; /** - * The service worker registration for receiving push messaging. + * On Web, the service worker registration for receiving push messaging. * If the registration is not provided explicitly, you need to * have a firebase-messaging-sw.js at your root location. - * - * @platform web */ serviceWorkerRegistration?: any; // ServiceWorkerRegistration is a web API type } @@ -404,11 +390,9 @@ export interface IOSPermissions { alert?: boolean; /** - * Request permission for Siri to automatically read out notification messages over AirPods. + * On iOS >= 13, request permission for Siri to automatically read out notification messages over AirPods. * * Defaults to false. - * - * @platform ios iOS >= 13 */ announcement?: boolean; @@ -434,11 +418,9 @@ export interface IOSPermissions { carPlay?: boolean; /** - * Request permission to provisionally create non-interrupting notifications. + * On iOS, equest permission to provisionally create non-interrupting notifications. * * Defaults to false. - * - * @platform ios iOS >= 12 */ provisional?: boolean; @@ -450,11 +432,9 @@ export interface IOSPermissions { sound?: boolean; /** - * Request permission to display a button for in-app notification settings. + * On iOS, request permission to display a button for in-app notification settings. * * Default to false - * - * @platform ios iOS >= 12 */ providesAppNotificationSettings?: boolean; } @@ -520,16 +500,12 @@ export interface Messaging extends ReactNativeFirebase.FirebaseModule { /** * When the app is opened from iOS notifications settings from a quit state, * this method will return `true` or `false` if the app was opened via another method. - * - * @ios iOS >= 12 */ getDidOpenSettingsForNotification(): Promise; /** - * Returns whether the root view is headless or not + * iOS only - Returns whether the root view is headless or not * i.e true if the app was launched in the background (for example, by data-only cloud message) - * - * @platform ios iOS */ getIsHeadless(): Promise; @@ -584,8 +560,6 @@ export interface Messaging extends ReactNativeFirebase.FirebaseModule { * be received or sent. * * > You can safely call this method on Android without platform checks. It's a no-op on Android and will promise resolve `AuthorizationStatus.AUTHORIZED`. - * - * @ios */ requestPermission(permissions?: IOSPermissions): Promise; @@ -598,12 +572,10 @@ export interface Messaging extends ReactNativeFirebase.FirebaseModule { registerDeviceForRemoteMessages(): Promise; /** - * Returns a boolean value whether the user has registered for remote notifications via + * On iOS, returns a boolean value whether the user has registered for remote notifications via * `registerDeviceForRemoteMessages()`. * * > You can safely access this property on Android without platform checks. Android returns `true` only. - * - * @platform ios */ isDeviceRegisteredForRemoteMessages: boolean; @@ -620,11 +592,9 @@ export interface Messaging extends ReactNativeFirebase.FirebaseModule { isDeliveryMetricsExportToBigQueryEnabled: boolean; /** - * Unregisters the app from receiving remote notifications. + * On iOS, unregisters the app from receiving remote notifications. * * > You can safely call this method on Android without platform checks. It's a no-op on Android and will promise resolve `void`. - * - * @platform ios */ unregisterDeviceForRemoteMessages(): Promise; @@ -633,8 +603,6 @@ export interface Messaging extends ReactNativeFirebase.FirebaseModule { * iOS devices without using the FCM service. * * > You can safely call this method on Android without platform checks. It's a no-op on Android and will promise resolve `null`. - * - * @platform ios */ getAPNSToken(): Promise; @@ -645,7 +613,6 @@ export interface Messaging extends ReactNativeFirebase.FirebaseModule { * * @param token a hexadecimal string representing your APNS token * @param type optional string specifying 'prod', 'sandbox' or 'unknown' token type - * @platform ios */ setAPNSToken(token: string, type?: string): Promise; @@ -655,23 +622,19 @@ export interface Messaging extends ReactNativeFirebase.FirebaseModule { hasPermission(): Promise; /** - * Called when the FCM server deletes pending messages. + * On Android, called when the FCM server deletes pending messages. * * Returns an unsubscribe function to stop listening for deleted messages. * - * NOTE: Android only - * * @param listener Called when the FCM deletes pending messages. */ onDeletedMessages(listener: () => void): () => void; /** - * When sending a `RemoteMessage`, this listener is called when the message has been sent to FCM. + * On Android, when sending a `RemoteMessage`, this listener is called when the message has been sent to FCM. * * Returns an unsubscribe function to stop listening for sent messages. * - * NOTE: Android only - * * @param listener Called when the FCM sends the remote message to FCM. */ onMessageSent(listener: (messageId: string) => any): () => void; @@ -697,17 +660,13 @@ export interface Messaging extends ReactNativeFirebase.FirebaseModule { setBackgroundMessageHandler(handler: (message: RemoteMessage) => Promise): void; /** - * Set a handler function which is called when the `${App Name} notifications settings` + * On iOS, set a handler function which is called when the `${App Name} notifications settings` * link in iOS settings is clicked. - * - * @ios iOS >= 12 */ setOpenSettingsForNotificationsHandler(handler: (message: RemoteMessage) => any): void; /** - * Send a new `RemoteMessage` to the FCM server. - * - * NOTE: Android only + * On Android, send a new `RemoteMessage` to the FCM server. * * @param message A `RemoteMessage` interface. */ @@ -743,9 +702,7 @@ export interface Messaging extends ReactNativeFirebase.FirebaseModule { setNotificationDelegationEnabled(enabled: boolean): Promise; /** - * Checks if all required APIs exist in the browser. - * - * @web + * On Web, checks if all required APIs exist in the browser. */ isSupported(): Promise; } diff --git a/packages/messaging/typedoc.json b/packages/messaging/typedoc.json new file mode 100644 index 0000000000..40abe04f95 --- /dev/null +++ b/packages/messaging/typedoc.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["lib/modular.ts", "lib/types/messaging.ts"], + "tsconfig": "tsconfig.json", + "intentionallyNotExported": [ + "_AuthorizationStatus", + "_FcmOptions", + "_GetTokenOptions", + "_IOSPermissions", + "_MessagePriority", + "_Messaging", + "_NativeTokenOptions", + "_Notification", + "_NotificationAndroidPriority", + "_NotificationAndroidVisibility", + "_NotificationIOSCriticalSound", + "_NotificationPayload", + "_RemoteMessage", + "_SendErrorEvent", + "_MessagingStatics" + ] +} diff --git a/packages/ml/lib/modular/index.d.ts b/packages/ml/lib/modular/index.d.ts index ee65cb3b8c..d5569800c8 100644 --- a/packages/ml/lib/modular/index.d.ts +++ b/packages/ml/lib/modular/index.d.ts @@ -6,7 +6,7 @@ import FirebaseApp = ReactNativeFirebase.FirebaseApp; /** * Returns the existing default {@link FirebaseML} instance that is associated with the - * default {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new + * default {@link @firebase/app!FirebaseApp}. If no instance exists, initializes a new * instance with default settings. * * @returns The {@link FirebaseML} instance of the provided app. diff --git a/packages/ml/typedoc.json b/packages/ml/typedoc.json index a1be394b96..ac150fc6a6 100644 --- a/packages/ml/typedoc.json +++ b/packages/ml/typedoc.json @@ -1,4 +1,6 @@ { "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["lib/index.d.ts"] + "entryPoints": ["lib/index.d.ts"], + "intentionallyNotExported": ["MLNamespace"] + } diff --git a/packages/perf/typedoc.json b/packages/perf/typedoc.json index a1be394b96..ce7104d0e0 100644 --- a/packages/perf/typedoc.json +++ b/packages/perf/typedoc.json @@ -1,4 +1,5 @@ { "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["lib/index.d.ts"] + "entryPoints": ["lib/index.d.ts"], + "intentionallyNotExported": ["PerfNamespace"] } diff --git a/packages/remote-config/lib/index.d.ts b/packages/remote-config/lib/index.d.ts index fcbd4cb73c..29f4a37ba1 100644 --- a/packages/remote-config/lib/index.d.ts +++ b/packages/remote-config/lib/index.d.ts @@ -434,7 +434,7 @@ export namespace FirebaseRemoteConfigTypes { * and the config update process fetches the new config but does not automatically activate * it for you. Typically you will activate the config in your callback to use the new values. * - * @param remoteConfig - The {@link RemoteConfig} instance. + * @param remoteConfig - The RemoteConfig instance. * @param observer - The {@link ConfigUpdateObserver} to be notified of config updates. * @returns An {@link Unsubscribe} function to remove the listener. */ diff --git a/packages/remote-config/typedoc.json b/packages/remote-config/typedoc.json index a1be394b96..7a1c06b962 100644 --- a/packages/remote-config/typedoc.json +++ b/packages/remote-config/typedoc.json @@ -1,4 +1,6 @@ { "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["lib/index.d.ts"] + "entryPoints": ["lib/index.d.ts"], + "intentionallyNotExported": ["RemoteConfigNamespace"] + } diff --git a/packages/storage/lib/index.d.ts b/packages/storage/lib/index.d.ts index 09287f6e26..ef617137fa 100644 --- a/packages/storage/lib/index.d.ts +++ b/packages/storage/lib/index.d.ts @@ -632,7 +632,7 @@ export namespace FirebaseStorageTypes { put(data: Blob | Uint8Array | ArrayBuffer, metadata?: SettableMetadata): Task; /** - * Puts a string on the storage bucket. Depending on the string type, set a {@link storage.StringFormat} type. + * Puts a string on the storage bucket. Depending on the string type, set a {@link StringFormat} type. * * #### Example * @@ -673,7 +673,7 @@ export namespace FirebaseStorageTypes { } /** - * The snapshot observer returned from a {@link storage.Task#on} listener. + * The snapshot observer returned from a {@link Task#on} listener. * * #### Example * @@ -894,12 +894,12 @@ export namespace FirebaseStorageTypes { bytesTransferred: number; /** - * The metadata of the tasks via a {@link storage.FullMetadata} interface. + * The metadata of the tasks via a {@link FullMetadata} interface. */ metadata: FullMetadata; /** - * The {@link storage.Reference} of the task. + * The {@link Reference} of the task. */ ref: Reference; @@ -909,7 +909,7 @@ export namespace FirebaseStorageTypes { state: 'cancelled' | 'error' | 'paused' | 'running' | 'success'; /** - * The parent {@link storage.Task} of this snapshot. + * The parent {@link Task} of this snapshot. */ task: Task; @@ -919,7 +919,7 @@ export namespace FirebaseStorageTypes { totalBytes: number; /** - * If the {@link storage.TaskSnapshot#state} is `error`, returns a JavaScript error of the + * If the {@link TaskSnapshot#state} is `error`, returns a JavaScript error of the * current task snapshot. */ error?: NativeFirebaseError; @@ -930,12 +930,12 @@ export namespace FirebaseStorageTypes { */ export interface TaskResult { /** - * The metadata of the tasks via a {@link storage.FullMetadata} interface. + * The metadata of the tasks via a {@link FullMetadata} interface. */ metadata: FullMetadata; /** - * The {@link storage.Reference} of the task. + * The {@link Reference} of the task. */ ref: Reference; } @@ -1099,7 +1099,7 @@ export namespace FirebaseStorageTypes { setMaxOperationRetryTime(time: number): Promise; /** - * Returns a new {@link storage.Reference} instance. + * Returns a new {@link Reference} instance. * * #### Example * @@ -1113,7 +1113,7 @@ export namespace FirebaseStorageTypes { ref(path?: string): Reference; /** - * Returns a new {@link storage.Reference} instance from a storage bucket URL. + * Returns a new {@link Reference} instance from a storage bucket URL. * * #### Example * diff --git a/packages/storage/lib/modular/index.d.ts b/packages/storage/lib/modular/index.d.ts index 0d3f41cb27..0c3a74b87b 100644 --- a/packages/storage/lib/modular/index.d.ts +++ b/packages/storage/lib/modular/index.d.ts @@ -55,7 +55,7 @@ export declare function getStorage(app?: FirebaseApp, bucketUrl?: string): Stora * * @param app - The {@link FirebaseApp} instance that the returned {@link Storage} * instance is associated with. - * @returns The {@link Firestore} instance of the provided app. + * @returns The {@link Storage} instance of the provided app. */ export declare function getStorage(app?: FirebaseApp): Storage; @@ -67,7 +67,7 @@ export declare function getStorage(app?: FirebaseApp): Storage; * @param app - The {@link FirebaseApp} instance that the returned {@link Storage} * instance is associated with. If `null` the default app is used. * @param bucketUrl - The gs:// url to the Firebase Storage Bucket. If `null` the default bucket is used. - * @returns The {@link Firestore} instance of the provided app. + * @returns The {@link Storage} instance of the provided app. */ export declare function getStorage(app?: FirebaseApp, bucketUrl?: string): Storage; diff --git a/packages/storage/typedoc.json b/packages/storage/typedoc.json index a1be394b96..cd8324a1dc 100644 --- a/packages/storage/typedoc.json +++ b/packages/storage/typedoc.json @@ -1,4 +1,6 @@ { "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["lib/index.d.ts"] + "entryPoints": ["lib/index.d.ts"], + "intentionallyNotExported": ["StorageNamespace"] + } diff --git a/typedoc.json b/typedoc.json index 3ced07dd0c..7fc17e8dee 100644 --- a/typedoc.json +++ b/typedoc.json @@ -52,16 +52,20 @@ "readme": "none", "skipErrorChecking": true, "gitRevision": "main", - "groupOrder": [ "Functions", "*" ] + "groupOrder": ["Functions", "*"] }, "externalSymbolLinkMappings": { "@firebase/app": { "FirebaseApp": "https://firebase.google.com/docs/reference/js/app.firebaseapp" } }, + "treatWarningsAsErrors": true, + "treatValidationWarningsAsErrors": true, "validation": { "notExported": false, - "invalidLink": false, + "invalidLink": true, + "invalidPath": true, + "rewrittenLink": true, "notDocumented": false } }