mirror of
https://github.com/supabase/supabase.git
synced 2026-09-08 19:08:44 +08:00
cli/ref-doc
5 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
31d1a639c0 |
docs: Update SDK references from recent releases (#47830)
## Summary Updates SDK reference docs and the client-side tracing guide based on recent releases across all six Supabase SDKs. ## SDKs analyzed | SDK | Repo | Latest commit | Latest tag | |-----|------|--------------|------------| | js | supabase/supabase-js | `e4e8864` | v3.0.0-next.29 | | dart | supabase/supabase-flutter | `c3e3602` | yet_another_json_isolate-v2.1.1 | | py | supabase/supabase-py | `6570638` | v3.0.0a1 | | swift | supabase/supabase-swift | `ebef170` | v2.51.0 | | kt | supabase-community/supabase-kt | `e23df20` | 3.7.0-beta-1 | | csharp | supabase-community/supabase-csharp | `3fad62f` | v1.1.2 | ## Documentation changes ### `apps/docs/spec/supabase_dart_v2.yml` - **OAuth Server API** ([supabase-flutter#1561](https://github.com/supabase/supabase-flutter/pull/1561)): Added `oauth-server-api` group stub and `listGrants()` / `revokeGrant()` method entries, matching the existing `common-client-libs-sections.json` nav IDs. - **`listBuckets()` options** ([supabase-flutter#1557](https://github.com/supabase/supabase-flutter/pull/1557)): Added example showing `ListBucketsOptions` with `search`, `limit`, `offset`, `sortColumn`, and `sortOrder`. ### `apps/docs/spec/supabase_py_v2.yml` - **`on_postgres_changes` `select` param** ([supabase-py#1524](https://github.com/supabase/supabase-py/pull/1524)): Added `listening-to-selected-columns` example for the new `select=["id", "name"]` parameter. - **Expanded filter operators** ([supabase-py#1524](https://github.com/supabase/supabase-py/pull/1524)): Updated `listening-to-row-level-changes` note to list all supported operators (`eq`, `neq`, `lt`, `lte`, `gt`, `gte`, `in`, `like`, `ilike`, `is`, `match`, `imatch`, `isdistinct`) plus `not.` prefix and comma-AND. ### `apps/docs/spec/supabase_swift_v2.yml` - **OpenTelemetry tracing setup** ([supabase-swift#1101](https://github.com/supabase/supabase-swift/pull/1101)): Added `initialize-client-with-opentelemetry` example under the `initializing` section documenting the `OpenTelemetry` SwiftPM package trait, provider wiring, and known `_invokeWithStreamedResponse` limitation. ### `apps/docs/content/guides/telemetry/client-side-tracing.mdx` - **Merged Swift and Dart tracing docs** into the existing JS guide ([supabase-swift#1101](https://github.com/supabase/supabase-swift/pull/1101), [supabase-flutter#1564](https://github.com/supabase/supabase-flutter/pull/1564)). - **Converted to tabbed layout** (`<Tabs queryGroup="language">`) with JavaScript / Swift / Dart tabs, matching the pattern used across other multi-SDK guides. - Updated title to "Client-side tracing" and nav label accordingly. ## SDKs with no doc-worthy changes - **js**: Bug fixes only (auth session clearing, realtime heartbeat suppression) — no new API surface. - **kt**: PKCE for `resend()` — behavioral enhancement, no new spec entry needed. - **csharp**: Chore/compliance/maintenance only. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added Dart “OAuth Server” API docs for listing OAuth grants and revoking grants (including signed-in context and the `clientId` parameter), with examples. * Extended Dart Storage docs with a new `listBuckets` example using `ListBucketsOptions` for filtering, pagination, and sorting. * Updated Python Realtime docs with generalized PostgREST-style row filter operators and added examples for listening to selected columns. * Reworked the “Client-side tracing” guide across JS, Swift, and Dart, including expanded configuration and troubleshooting (trace propagation and `traceparent` details). * Renamed the telemetry navigation label to “Client-side tracing.” <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|
|
a132009a51 |
docs(dart): storage buckets, streaming/cache-purge, web3, OAuth grants, and July additions (#47971)
## What Updates the Dart/Flutter reference (`apps/docs/spec/supabase_dart_v2.yml`) for features shipped in [`supabase/supabase-flutter`](https://github.com/supabase/supabase-flutter) in July (through the July 17 storage CDN-cache additions). Built on the **new reference pipeline** (#47224 / #47994): each method's section is inherited from the nearest section-header entry in the YAML, and subcategory overviews are committed partials under `spec/reference/dart/v2/partials/`. `common-client-libs-sections.json` is **not** touched. Scoped to items **not** already covered by #47728 (OAuth server authorization details, custom providers admin, `explain` format, realtime `onHeartbeat` and filter examples). Rebased onto `master` now that #47994 and #47728 have landed. ## New reference entries **Storage** - Vector buckets (new **Vector Buckets** section): create/get/list/delete bucket, index create/get/list/delete/access, and vector put/get/list/query/delete (`supabase.storage.vectors`) - Analytics (Iceberg) buckets (new **Analytics Buckets** section): `createAnalyticsBucket`, `listAnalyticsBuckets`, `deleteAnalyticsBucket`, and the `analyticsCatalog()` accessor - `listPaginated` (list files v2), under File Buckets - `downloadStream()` (streaming file downloads), under File Buckets - `purgeCache()` (object CDN cache invalidation) and `purgeBucketCache()` (bucket CDN cache invalidation) **Auth** - `signInWithWeb3` - OAuth server `listGrants` and `revokeGrant` (in the **OAuth Server** section, `supabase.auth.oauth`) **Database** - `stripNulls()` modifier ## Enrichments to existing entries - Storage: `cacheNonce` on `getPublicUrl` / `createSignedUrl` / `download`; filter/sort/pagination options on `listBuckets` - Auth: `channel` on `mfa.challenge()`; `currentPassword` on `updateUser`; async `getSession()` note and example; `friendlyName` on `registerPasskey()` and `passkey.startRegistration()` - Functions: `abortSignal` on `invoke` ## Pipeline plumbing - New partials: `analytics-buckets.json`, `vector-buckets.json`, `oauth-server.json` - `generate-dart-reference.ts`: registers `analytics-buckets`, `vector-buckets`, and `oauth-server-api` group-header ids in `HEADER_IDS` so they render as section overviews rather than methods ## Source PRs supabase-flutter: #1547, #1554, #1557, #1559, #1561, #1563, #1578, #1579, #1580, #1585, #1588, #1590, #1591, #1593, #1603, #1607, #1608 ## Verification `pnpm codegen:references:dart` builds cleanly: the generator writes 141 method declarations (all ids resolve to a section, no invalid method names, no slug collisions), and the nav renders the Analytics Buckets, Vector Buckets, and OAuth Server sections with the expected methods. ## Notes - Skipped (no reference home / would need product decisions): Iceberg namespace/table management (the full `IcebergRestCatalog` API, which lives in a standalone `iceberg-js` package upstream), `dryRun`, functions exception subtypes, trace-context headers, `persistSession`, configurable postgrest timeout/retry. - `storageanalytics-from` maps to Dart's `analyticsCatalog(bucketId)` (the Iceberg catalog entry point), since Dart has no `analytics.from()` equivalent. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Expanded Dart docs with Web3 sign-in plus passkey, MFA channel, and OAuth grant listing/revocation. * Added storage APIs/examples for listing buckets with options, CDN cache bypass via `cacheNonce`, and cache/purge support. * Documented `stripNulls()` database modifier and cursor-based paginated storage listing. * **Documentation** * Updated auth references with optional `currentPassword`, `friendlyName`, and clarified `currentSession` vs `getSession()`. * Added `abortSignal` support and examples for `supabase.functions.invoke()`. * **Bug Fixes** * Improved Dart reference generation so analytics/vector bucket sections aren’t emitted as method declarations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
9f5b36fb3b |
docs(dart): OAuth server, custom providers, realtime heartbeat & explain reference updates (#47728)
> **Stacked on #47994** (`docs/dart-reference-categories-in-yaml`). Review/merge that first; GitHub will retarget this to `master` once it lands. ## What Adds Dart client library reference entries (`apps/docs/spec/supabase_dart_v2.yml`) for features shipped in [`supabase/supabase-flutter`](https://github.com/supabase/supabase-flutter) (parity with `supabase-js`). Rebuilt on the **new reference pipeline** (#47224 / #47994): each method's section comes from `category` / `subcategory` fields on its own YAML entry, with subcategory overviews as committed partials under `spec/reference/dart/v2/partials/`. As a result this PR no longer touches `common-client-libs-sections.json` or `supabase_js_v2.yml` (the earlier shared-nav id rename is unnecessary now that Dart no longer reads that file). ## Changes **Auth (OAuth 2.1 server)** — new **OAuth Server** section - `oauth.getAuthorizationDetails()`, `oauth.approveAuthorization()`, `oauth.denyAuthorization()` **Auth admin** — new **Custom Provider Admin** section - `admin.customProviders.listProviders/createProvider/getProvider/updateProvider/deleteProvider`, including `customClaimsAllowlist` **Realtime** - `onHeartbeat` - `onPostgresChanges` examples for the new pattern/negated filter operators, multiple filters, and column selection **Postgrest** - `explain()` `format` option (`ExplainFormat.text` / `.json`) ## Pipeline plumbing - New partials: `oauth-server.json`, `custom-provider-admin.json` - `generate-dart-reference.ts`: registers `oauth-server-api` and `admin-custom-providers-api` group-header ids in `HEADER_IDS` ## Source PRs supabase-flutter: #1499, #1516, #1517, #1519, #1526 ## Verification `pnpm codegen:references:new` builds cleanly and the nav renders the new **OAuth Server**, **Custom Provider Admin**, and Realtime **onHeartbeat** entries. ## Notes - `RealtimeChannelConfig.replicationReady` (#1526) is omitted since there is no reference slot for channel-config options. - The **OAuth Server** section also appears in #47971 (which adds `listGrants` / `revokeGrant`). Whichever lands second should drop the duplicate section header/partial and keep both sets of methods. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added OAuth 2.1 server consent-flow methods for retrieving, approving, and denying authorization requests. * Added admin APIs for managing custom OIDC/OAuth providers. * Added Realtime heartbeat monitoring and advanced Postgres change filters. * Added text and JSON output options for query explanations. * **Documentation** * Expanded Dart API reference coverage across Auth, MFA, Passkeys, Database, Realtime, and Storage. * Added dedicated reference sections for OAuth Server and Custom Provider administration. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
8c511032b6 |
docs(dart): derive reference sections from spec YAML section headers (#47994)
## What Addresses @jeremenichelli's feedback that the Dart v2 reference required maintaining section metadata separately from the spec. The reference now derives every method's section from the spec YAML itself, with **no per-method metadata**. ## How Each **section-header** entry in `supabase_dart_v2.yml` carries the `category` and optional `subcategory` that every method after it inherits, up to the next header: - Existing subcategory headers gain a `category`/`subcategory`: `auth-mfa-api`, `passkey-api`, `admin-api`, `admin-passkey-api`, `file-buckets`, `using-modifiers`, `using-filters`. - New top-level category headers mark the sections that previously had no header: `auth-api`, `functions-api`, `database-api`, `realtime-api`. `generate-dart-reference.ts` walks the spec in order, tracking the current section from the most recent header, and tags each method's declaration with it. A method may still set `category`/`subcategory` explicitly to override, and the converter errors if a method appears before any header. ## Why this is less work - **Authoring a new method:** place it in the right section. No `category`/`subcategory` fields, no nav file edit. - **Adding a section:** one header entry (with `category`/`subcategory`) plus its overview partial. - `common-client-libs-sections.json` is not touched (it still drives the legacy-pipeline SDKs). ## Verification The generated navigation (`content/reference/dart/v2/sections.json`, `bySlug.json`) is **byte-for-byte identical** to the previous output. `pnpm codegen:references:new` writes 105 method declarations across 5 categories with no orphaned methods and no slug collisions. Supersedes the earlier per-method-`category` approach on this branch. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Improved Dart/Flutter API reference organization by leveraging spec-provided `category` and `subcategory` taxonomy for clearer grouping (Auth, Passkey, Edge Functions, Database, Realtime, Storage, and database modifiers/filters). * Updated reference generation to use structured in-spec section headers, resulting in more consistent published categorization and navigation. * **Bug Fixes** * Enhanced validation and error messaging for entries that can’t be assigned to a section/category, including clearer guidance on how to fix incomplete spec items. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
833d3cb1d7 |
docs: migrate Dart/Flutter reference to the new reference pipeline (#47224)
## What Routes the **Dart/Flutter v2** reference through the new reference-content pipeline (`scripts/build-reference-content.ts` + `spec/reference/dart/v2/`), the same one JavaScript v2 already uses. Dart v1 stays on the legacy YAML pipeline. ## How Dart has no upstream TypeDoc dump, so this follows the reference README's "adapt other formats as a pre-step" approach: - **`scripts/generate-dart-reference.ts`** converts the committed legacy spec (`spec/supabase_dart_v2.yml`) plus the shared section tree into a TypeDoc-shaped dump at `spec/reference/dart/v2/supabase_flutter.json` (gitignored, like every other dump). Each Dart method becomes a `variant: 'declaration'` node tagged with `@category`/`@subcategory` and carries the legacy function shape (description, notes, params, examples) on a non-TypeDoc `content` field. - **`build-reference-content.ts`** gains a small, backward-compatible addition: it spreads a declaration's `content` straight onto the `functions.json` entry. The renderer then shows params/examples/notes exactly as the legacy YAML did, with no typeSpec round-trip. The field is absent for real TypeDoc dumps, so **JavaScript output is unchanged** (existing JS snapshot still passes). - `dart-v2` added to `SUPPORTS_NEW_REFERENCE_PROCESS`; the v2 `specFile` is dropped from the nav entry so the legacy generator skips it. - Dart search ingest switched to the new-pipeline loader. - `config.json` + hand-authored partials (intro markdown, `initializing`, and subcategory overviews like `using-filters`, `auth-mfa`) added under `spec/reference/dart/v2/partials/`, mirroring the JS lib. - The dart dump is regenerated in `codegen:references:new` and in CI; a self-contained `dart/v2` snapshot test covers the full YAML → dump → content path. ## Verification - `vitest run scripts/build-reference-content.test.ts` — both JS and Dart snapshots pass. - 112 function sections all resolve to renderable `functions.json` entries (104 methods + 7 subcategory overviews + `initializing`). - `tsc --noEmit` clean for all changed files. - Legacy generator confirmed to skip dart v2 (only `dart.v1.*` regenerated). > Note: the live dev server (which needs the Supabase backend) was not run; verification was done at the data-pipeline level plus parity with the production JS pipeline behavior. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Dart v2 reference documentation sections, including Installing, Initializing, Filters, Modifiers, Auth Admin, MFA, Passkeys, File Buckets, Introduction, and Upgrade guidance. * Expanded the Dart v2 reference pipeline so Dart API pages are generated from the newer reference content flow. * **Bug Fixes** * Improved Dart reference rendering by preserving legacy descriptions, notes, params, and examples in generated function entries. * Updated Dart v2 reference search to use the new pipeline’s generated content so results and navigation stay in sync. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Jeremias Menichelli <jmenichelli@gmail.com> |