diff --git a/docs/apis.mdx b/docs/apis.mdx index 93ab3d2f1..dd83bd9bf 100644 --- a/docs/apis.mdx +++ b/docs/apis.mdx @@ -674,7 +674,16 @@ func validate(next apis.Handler) apis.Handler { ``` ```dart !! -// Middleware currently not supported in dart +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + return ctx; + } + + return ctx.next(); +} ``` @@ -742,7 +751,15 @@ func main() { ``` ```dart !! -// API level middleware currently not supported in dart +import 'package:nitric_sdk/nitric.dart'; +import '../middlewares'; + +final customersApi = Nitric.api( + "customers", + opts: ApiOptions( + middlewares: [logRequest, validate], + ) +); ``` @@ -819,7 +836,21 @@ func main() { ``` ```dart !! -// Route level middleware currently not supported in dart +import 'package:nitric_sdk/nitric.dart'; +import '../middlewares'; + +Future getAllCustomers(HttpContext ctx) async { + // gets the customers + return ctx.next(); +} + +final customersApi = Nitric.api("customers"); + +// Inline using .get() +customersApi.get("/customers", getAllCustomers, middlewares: [logRequest, validate]); + +// Inline using .route() +customersApi.route("/customers", middlewares: [logRequest, validate]).get(getAllCustomers); ``` diff --git a/docs/reference/dart/api/api-all.mdx b/docs/reference/dart/api/api-all.mdx new file mode 100644 index 000000000..38a9470b2 --- /dev/null +++ b/docs/reference/dart/api/api-all.mdx @@ -0,0 +1,121 @@ +--- +description: "Reference for Nitric's Dart library - Register a single handler for all HTTP Methods (GET, POST, PUT, DELETE, PATCH) on the route." +--- + +# Dart - api.all() + +Register a single handler for all HTTP Methods (GET, POST, PUT, DELETE, PATCH) on a route. + + + This method is a convenient short version of + [api().route().all()](./api-route-all) + + +```dart +import 'package:nitric_sdk/nitric.dart'; + +// Create an API named 'public' +final api = Nitric.api("public"); + +api.all("/customers/:customersId", (ctx) async { + // construct a response for all incoming HTTP requests + final responseBody = {}; + ctx.res.json(responseBody); + + return ctx; +}); +``` + +## Parameters + + + + The path matcher to use for the route. Matchers accept path parameters in + the form of a colon prefixed string. The string provided will be used as + that path parameter's name when calling handlers. + + + The middleware service to use as the handler for HTTP requests. + + + Security rules to apply with scopes to the entire API. + + + The list of middleware that will run before the handler is called. To call + the next middleware in the chain use `ctx.next()`, to finish early return + `ctx` by itself. The ordering of middleware goes: API -> Route -> Method. + + + +## Examples + +### Register a handler for all requests + +```dart +import 'package:nitric_sdk/nitric.dart'; + +// Create an API named 'public' +final api = Nitric.api("public"); + +api.all("/customers/:customersId", (ctx) async { + // construct a response for all incoming HTTP requests + final responseBody = {}; + ctx.res.json(responseBody); + + return ctx; +}); +``` + +### Chain services as a single method handler + +When multiple services are provided they will be called as a chain. If one succeeds, it will move on to the next. This allows middleware to be composed into more complex handlers. You can call the next middleware in the chain using `ctx.next()`. If a middleware in the chain does not call `.next` and instead returns the base context, the call chain will end. + +```dart +import 'package:nitric_sdk/nitric.dart'; +import '../middlewares'; + +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + // End the middleware chain by not calling `ctx.next()`. + return ctx; + } + + return ctx.next(); +} + +Future handleCustomer(HttpContext ctx) async { + // handle the request... + return ctx.next(); +} + +// The validate middleware will run before the handleCustomer handler +Nitric.api("public").all("/customers", handleCustomer, middlewares: [validate]); +``` + +### Access the request body + +The request body is accessible from the `ctx.req` object. + +```dart +import 'package:nitric_sdk/nitric.dart'; + +// Create an API named 'public' +final api = Nitric.api("public"); + +api.all("/customers/:customerId", (ctx) async { + // Extract the path parameter + final id = ctx.req.pathParams["customerId"]!; + + // Extract the request body + final body = ctx.req.json(); + + // Construct response for the /customers request... + final responseBody = {}; + ctx.res.json(responseBody); + + return ctx; +}); +``` diff --git a/docs/reference/dart/api/api-delete.mdx b/docs/reference/dart/api/api-delete.mdx index d1b2b0300..87ecd56ce 100644 --- a/docs/reference/dart/api/api-delete.mdx +++ b/docs/reference/dart/api/api-delete.mdx @@ -43,6 +43,11 @@ api.delete("/customers/:customerId", (ctx) async { Security rules to apply with scopes to the entire API. + + The list of middleware that will run before the handler is called. To call + the next middleware in the chain use `ctx.next()`, to finish early return + `ctx` by itself. The ordering of middleware goes: API -> Route -> Method. + ## Examples @@ -67,6 +72,34 @@ api.delete("/customers/:customerId", (ctx) async { }); ``` +### Chain services as a single method handler + +When multiple services are provided they will be called as a chain. If one succeeds, it will move on to the next. This allows middleware to be composed into more complex handlers. You can call the next middleware in the chain using `ctx.next()`. If a middleware in the chain does not call `.next` and instead returns the base context, the call chain will end. + +```dart +import 'package:nitric_sdk/nitric.dart'; + +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + // End the middleware chain by not calling `ctx.next()`. + return ctx; + } + + return ctx.next(); +} + +Future deleteCustomer(HttpContext ctx) async { + // handle the DELETE request... + return ctx.next(); +} + +// The validate middleware will run before the deleteCustomer handler +Nitric.api("public").delete("/customers", deleteCustomer, middlewares: [validate]); +``` + ### Access the request body The DELETE request body is accessible from the `ctx.req` object. diff --git a/docs/reference/dart/api/api-get.mdx b/docs/reference/dart/api/api-get.mdx index 7dd6560dd..a9c919e78 100644 --- a/docs/reference/dart/api/api-get.mdx +++ b/docs/reference/dart/api/api-get.mdx @@ -43,6 +43,11 @@ api.get("/customers/:customerId", (ctx) async { Security rules to apply with scopes to the entire API. + + The list of middleware that will run before the handler is called. To call + the next middleware in the chain use `ctx.next()`, to finish early return + `ctx` by itself. The ordering of middleware goes: API -> Route -> Method. + ## Examples @@ -63,3 +68,31 @@ api.get("/customers", (ctx) async { return ctx; }); ``` + +### Chain services as a single method handler + +When multiple services are provided they will be called as a chain. If one succeeds, it will move on to the next. This allows middleware to be composed into more complex handlers. You can call the next middleware in the chain using `ctx.next()`. If a middleware in the chain does not call `.next` and instead returns the base context, the call chain will end. + +```dart +import 'package:nitric_sdk/nitric.dart'; + +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + // End the middleware chain by not calling `ctx.next()`. + return ctx; + } + + return ctx.next(); +} + +Future getCustomer(HttpContext ctx) async { + // handle the GET request... + return ctx.next(); +} + +// The validate middleware will run before the getCustomer handler +Nitric.api("public").get("/customers", getCustomer, middlewares: [validate]); +``` diff --git a/docs/reference/dart/api/api-patch.mdx b/docs/reference/dart/api/api-patch.mdx index e96faa57e..a85c56215 100644 --- a/docs/reference/dart/api/api-patch.mdx +++ b/docs/reference/dart/api/api-patch.mdx @@ -43,6 +43,11 @@ api.patch("/customers/:customerId", (ctx) async { Security rules to apply with scopes to the entire API. + + The list of middleware that will run before the handler is called. To call + the next middleware in the chain use `ctx.next()`, to finish early return + `ctx` by itself. The ordering of middleware goes: API -> Route -> Method. + ## Examples @@ -64,6 +69,34 @@ api.patch("/customers", (ctx) async { }); ``` +### Chain services as a single method handler + +When multiple services are provided they will be called as a chain. If one succeeds, it will move on to the next. This allows middleware to be composed into more complex handlers. You can call the next middleware in the chain using `ctx.next()`. If a middleware in the chain does not call `.next` and instead returns the base context, the call chain will end. + +```dart +import 'package:nitric_sdk/nitric.dart'; + +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + // End the middleware chain by not calling `ctx.next()`. + return ctx; + } + + return ctx.next(); +} + +Future udpateCustomer(HttpContext ctx) async { + // handle the PATCH request... + return ctx.next(); +} + +// The validate middleware will run before the updateCustomer handler +Nitric.api("public").patch("/customers", updateCustomer, middlewares: [validate]); +``` + ### Access the request body The PATCH request body is accessible from the `ctx.req` object. diff --git a/docs/reference/dart/api/api-post.mdx b/docs/reference/dart/api/api-post.mdx index e0ae3504a..790f9ad8a 100644 --- a/docs/reference/dart/api/api-post.mdx +++ b/docs/reference/dart/api/api-post.mdx @@ -43,6 +43,11 @@ api.post("/customers/:customerId", (ctx) async { Security rules to apply with scopes to the entire API. + + The list of middleware that will run before the handler is called. To call + the next middleware in the chain use `ctx.next()`, to finish early return + `ctx` by itself. The ordering of middleware goes: API -> Route -> Method. + ## Examples @@ -64,6 +69,34 @@ api.post("/customers", (ctx) async { }); ``` +### Chain services as a single method handler + +When multiple services are provided they will be called as a chain. If one succeeds, it will move on to the next. This allows middleware to be composed into more complex handlers. You can call the next middleware in the chain using `ctx.next()`. If a middleware in the chain does not call `.next` and instead returns the base context, the call chain will end. + +```dart +import 'package:nitric_sdk/nitric.dart'; + +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + // End the middleware chain by not calling `ctx.next()`. + return ctx; + } + + return ctx.next(); +} + +Future createCustomer(HttpContext ctx) async { + // handle the POST request... + return ctx.next(); +} + +// The validate middleware will run before the createCustomer handler +Nitric.api("public").post("/customers", createCustomer, middlewares: [validate]); +``` + ### Access the request body The POST request body is accessible from the `ctx.req` object. diff --git a/docs/reference/dart/api/api-put.mdx b/docs/reference/dart/api/api-put.mdx index 97a498bb3..baff07add 100644 --- a/docs/reference/dart/api/api-put.mdx +++ b/docs/reference/dart/api/api-put.mdx @@ -43,6 +43,11 @@ api.put("/customers/:customerId", (ctx) async { Security rules to apply with scopes to the entire API. + + The list of middleware that will run before the handler is called. To call + the next middleware in the chain use `ctx.next()`, to finish early return + `ctx` by itself. The ordering of middleware goes: API -> Route -> Method. + ## Examples @@ -64,6 +69,34 @@ api.put("/customers", (ctx) async { }); ``` +### Chain services as a single method handler + +When multiple services are provided they will be called as a chain. If one succeeds, it will move on to the next. This allows middleware to be composed into more complex handlers. You can call the next middleware in the chain using `ctx.next()`. If a middleware in the chain does not call `.next` and instead returns the base context, the call chain will end. + +```dart +import 'package:nitric_sdk/nitric.dart'; + +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + // End the middleware chain by not calling `ctx.next()`. + return ctx; + } + + return ctx.next(); +} + +Future createOrUpdateCustomer(HttpContext ctx) async { + // handle the UPDATE request... + return ctx.next(); +} + +// The validate middleware will run before the createOrUpdateCustomer handler +Nitric.api("public").put("/customers", createOrUpdateCustomer, middlewares: [validate]); +``` + ### Access the request body The PUT request body is accessible from the `ctx.req` object. diff --git a/docs/reference/dart/api/api-route-all.mdx b/docs/reference/dart/api/api-route-all.mdx index 9e59c7167..6cff7bba7 100644 --- a/docs/reference/dart/api/api-route-all.mdx +++ b/docs/reference/dart/api/api-route-all.mdx @@ -26,9 +26,6 @@ customersRoute.all((ctx) async { The middleware service to use as the handler for HTTP requests. - - Security rules to apply with scopes to the entire API. - ### Notes @@ -68,6 +65,37 @@ customersRoute.all((ctx) async { }); ``` +### Chain services as a single method handler + +When multiple services are provided they will be called as a chain. If one succeeds, it will move on to the next. This allows middleware to be composed into more complex handlers. You can call the next middleware in the chain using `ctx.next()`. If a middleware in the chain does not call `.next` and instead returns the base context, the call chain will end. + +```dart +import 'package:nitric_sdk/nitric.dart'; + +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + // End the middleware chain by not calling `ctx.next()`. + return ctx; + } + + return ctx.next(); +} + +Future handleCustomer(HttpContext ctx) async { + // handle the request... + return ctx.next(); +} + +// The validate middleware will run before all handlers that are created using this route +final customersRoute = Nitric.api("public").route("/customers", middlewares: [validate]); + +// The validate middleware will run before the handleCustomer handler +customersRoute.all(handleCustomer); +``` + ### Access the request body For methods that include a request body, such as `POST` and `PUT`, you can access the body from the `ctx.req` object. diff --git a/docs/reference/dart/api/api-route-delete.mdx b/docs/reference/dart/api/api-route-delete.mdx index eaf934dbc..e01f5393c 100644 --- a/docs/reference/dart/api/api-route-delete.mdx +++ b/docs/reference/dart/api/api-route-delete.mdx @@ -26,9 +26,6 @@ customersRoute.delete((ctx) async { The middleware service to use as the handler for HTTP requests. - - Security rules to apply with scopes to the entire API. - ## Examples @@ -49,6 +46,37 @@ customersRoute.delete((ctx) async { }); ``` +### Chain services as a single method handler + +When multiple services are provided they will be called as a chain. If one succeeds, it will move on to the next. This allows middleware to be composed into more complex handlers. You can call the next middleware in the chain using `ctx.next()`. If a middleware in the chain does not call `.next` and instead returns the base context, the call chain will end. + +```dart +import 'package:nitric_sdk/nitric.dart'; + +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + // End the middleware chain by not calling `ctx.next()`. + return ctx; + } + + return ctx.next(); +} + +Future deleteCustomer(HttpContext ctx) async { + // handle the DELETE request... + return ctx.next(); +} + +// The validate middleware will run before all handlers that are created using this route +final customersRoute = Nitric.api("public").route("/customers", middlewares: [validate]); + +// The validate middleware will run before the deleteCustomer handler +customersRoute.delete(deleteCustomer); +``` + ### Access the request body The DELETE request body is accessible from the `ctx.req` object. diff --git a/docs/reference/dart/api/api-route-get.mdx b/docs/reference/dart/api/api-route-get.mdx index 00cd81765..d22dc9039 100644 --- a/docs/reference/dart/api/api-route-get.mdx +++ b/docs/reference/dart/api/api-route-get.mdx @@ -26,9 +26,6 @@ customersRoute.get((ctx) async { The middleware service to use as the handler for HTTP requests. - - Security rules to apply with scopes to the entire API. - ## Examples @@ -48,3 +45,34 @@ customersRoute.get((ctx) async { return ctx; }); ``` + +### Chain services as a single method handler + +When multiple services are provided they will be called as a chain. If one succeeds, it will move on to the next. This allows middleware to be composed into more complex handlers. You can call the next middleware in the chain using `ctx.next()`. If a middleware in the chain does not call `.next` and instead returns the base context, the call chain will end. + +```dart +import 'package:nitric_sdk/nitric.dart'; + +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + // End the middleware chain by not calling `ctx.next()`. + return ctx; + } + + return ctx.next(); +} + +Future getCustomer(HttpContext ctx) async { + // handle the GET request... + return ctx.next(); +} + +// The validate middleware will run before all handlers that are created using this route +final customersRoute = Nitric.api("public").route("/customers", middlewares: [validate]); + +// The validate middleware will run before the getCustomer handler +customersRoute.get(getCustomer); +``` diff --git a/docs/reference/dart/api/api-route-patch.mdx b/docs/reference/dart/api/api-route-patch.mdx index 5746af003..25a1fa4b2 100644 --- a/docs/reference/dart/api/api-route-patch.mdx +++ b/docs/reference/dart/api/api-route-patch.mdx @@ -26,9 +26,6 @@ customersRoute.patch((ctx) async { The middleware service to use as the handler for HTTP requests. - - Security rules to apply with scopes to the entire API. - ## Examples @@ -49,6 +46,37 @@ customersRoute.patch((ctx) async { }); ``` +### Chain services as a single method handler + +When multiple services are provided they will be called as a chain. If one succeeds, it will move on to the next. This allows middleware to be composed into more complex handlers. You can call the next middleware in the chain using `ctx.next()`. If a middleware in the chain does not call `.next` and instead returns the base context, the call chain will end. + +```dart +import 'package:nitric_sdk/nitric.dart'; + +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + // End the middleware chain by not calling `ctx.next()`. + return ctx; + } + + return ctx.next(); +} + +Future updateCustomer(HttpContext ctx) async { + // handle the PATCH request... + return ctx.next(); +} + +// The validate middleware will run before all handlers that are created using this route +final customersRoute = Nitric.api("public").route("/customers", middlewares: [validate]); + +// The validate middleware will run before the updateCustomer handler +customersRoute.patch(updateCustomer); +``` + ### Access the request body The PATCH request body is accessible from the `ctx.req` object. diff --git a/docs/reference/dart/api/api-route-post.mdx b/docs/reference/dart/api/api-route-post.mdx index b182cb844..fbd14b8b9 100644 --- a/docs/reference/dart/api/api-route-post.mdx +++ b/docs/reference/dart/api/api-route-post.mdx @@ -26,9 +26,6 @@ customersRoute.post((ctx) async { The middleware service to use as the handler for HTTP requests. - - Security rules to apply with scopes to the entire API. - ## Examples @@ -49,6 +46,37 @@ customersRoute.post((ctx) async { }); ``` +### Chain services as a single method handler + +When multiple services are provided they will be called as a chain. If one succeeds, it will move on to the next. This allows middleware to be composed into more complex handlers. You can call the next middleware in the chain using `ctx.next()`. If a middleware in the chain does not call `.next` and instead returns the base context, the call chain will end. + +```dart +import 'package:nitric_sdk/nitric.dart'; + +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + // End the middleware chain by not calling `ctx.next()`. + return ctx; + } + + return ctx.next(); +} + +Future createCustomer(HttpContext ctx) async { + // handle the POST request... + return ctx.next(); +} + +// The validate middleware will run before all handlers that are created using this route +final customersRoute = Nitric.api("public").route("/customers", middlewares: [validate]); + +// The validate middleware will run before the createCustomer handler +customersRoute.post(createCustomer); +``` + ### Access the request body The POST request body is accessible from the `ctx.req` object. diff --git a/docs/reference/dart/api/api-route-put.mdx b/docs/reference/dart/api/api-route-put.mdx index 6b233b5b5..c35ab6991 100644 --- a/docs/reference/dart/api/api-route-put.mdx +++ b/docs/reference/dart/api/api-route-put.mdx @@ -26,9 +26,6 @@ customersRoute.put((ctx) async { The middleware service to use as the handler for HTTP requests. - - Security rules to apply with scopes to the entire API. - ## Examples @@ -49,6 +46,37 @@ customersRoute.put((ctx) async { }); ``` +### Chain services as a single method handler + +When multiple services are provided they will be called as a chain. If one succeeds, it will move on to the next. This allows middleware to be composed into more complex handlers. You can call the next middleware in the chain using `ctx.next()`. If a middleware in the chain does not call `.next` and instead returns the base context, the call chain will end. + +```dart +import 'package:nitric_sdk/nitric.dart'; + +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + // End the middleware chain by not calling `ctx.next()`. + return ctx; + } + + return ctx.next(); +} + +Future createOrUpdateCustomer(HttpContext ctx) async { + // handle the PUT request... +return ctx.next(); +} + +// The validate middleware will run before all handlers that are created using this route +final customersRoute = Nitric.api("public").route("/customers", middlewares: [validate]); + +// The validate middleware will run before the createOrUpdateCustomer handler +customersRoute.put(createOrUpdateCustomer); +``` + ### Access the request body The PUT request body is accessible from the `ctx.req` object. diff --git a/docs/reference/dart/api/api-route.mdx b/docs/reference/dart/api/api-route.mdx index bb0e025bf..8dc4e84b6 100644 --- a/docs/reference/dart/api/api-route.mdx +++ b/docs/reference/dart/api/api-route.mdx @@ -22,6 +22,14 @@ final customersRoute = Nitric.api("public").route("/customers"); provided will be used as that path parameter's name when calling middleware and handlers. + + Security rules to apply with scopes to the entire API. + + + The list of middleware that will run before the handler is called. To call + the next middleware in the chain use `ctx.next()`, to finish early return + `ctx` by itself. The ordering of middleware goes: API -> Route -> Method. + ## Examples @@ -45,3 +53,27 @@ import 'package:nitric_sdk/nitric.dart'; final customersRoute = Nitric.api("public").route("/customers/:customerId"); ``` + +### Create a route with a middleware chain + +When creating your route you can supply a list of middleware that will run before any of the handlers. If the middleware succeeds it will move on to the next middleware in the chain. This allows middleware to be composed into more complex handlers. You can call the next middleware in the chain using `ctx.next()`. If a middleware in the chain does not call `.next` and instead returns the base context, the call chain will end. + +```dart +import 'package:nitric_sdk/nitric.dart'; + +/// Validate that all requests include a `Content-Type` header +Future validate(HttpContext ctx) async { + if (!ctx.req.headers.containsKey("Content-Type")) { + ctx.res.status = 400; + ctx.res.body = "header Content-Type is required"; + + // End the middleware chain by not calling `ctx.next()`. + return ctx; + } + + return ctx.next(); +} + +// The validate middleware will run before all handlers that are created using this route +final customersRoute = Nitric.api("public").route("/customers", middlewares: [validate]); +``` diff --git a/docs/reference/dart/api/api.mdx b/docs/reference/dart/api/api.mdx index ffa2e4557..ce2b9df91 100644 --- a/docs/reference/dart/api/api.mdx +++ b/docs/reference/dart/api/api.mdx @@ -28,6 +28,12 @@ final publicApi = Nitric.api("public"); Security rules to apply with scopes to the entire API. + + The list of middleware that will run before the handler is called. To + call the next middleware in the chain use `ctx.next()`, to finish early + return `ctx` by itself. The ordering of middleware goes: API -> Route -> + Method. + diff --git a/src/config/reference/dart.ts b/src/config/reference/dart.ts index 05e0f6a1f..58a654a74 100644 --- a/src/config/reference/dart.ts +++ b/src/config/reference/dart.ts @@ -17,6 +17,10 @@ export const DartReference: NavGroup = { title: 'api()', href: '/reference/dart/api/api', }, + { + title: 'api.all()', + href: '/reference/dart/api/api-all', + }, { title: 'api.get()', href: '/reference/dart/api/api-get',