diff --git a/content/_partials/authentication.md b/content/_partials/authentication.md index 849c894e..3377cf9a 100644 --- a/content/_partials/authentication.md +++ b/content/_partials/authentication.md @@ -30,4 +30,3 @@ Requests can be authenticated in the following ways: Using a query parameter for authentication can lead to it being revealed or logged. If possible, use another method. :: :: -:: diff --git a/content/_partials/query-functions.md b/content/_partials/query-functions.md index 7ec38a64..351d3a2a 100644 --- a/content/_partials/query-functions.md +++ b/content/_partials/query-functions.md @@ -9,8 +9,8 @@ The syntax for using a function is `function(field)`. | `week` | Extract the week from a datetime/date/timestamp field | | `day` | Extract the day from a datetime/date/timestamp field | | `weekday` | Extract the weekday from a datetime/date/timestamp field | -| `hour` | Extract the hour from a datetime/date/timestamp field | -| `minute` | Extract the minute from a datetime/date/timestamp field | -| `second` | Extract the second from a datetime/date/timestamp field | +| `hour` | Extract the hour from a datetime/time/timestamp field | +| `minute` | Extract the minute from a datetime/time/timestamp field | +| `second` | Extract the second from a datetime/time/timestamp field | | `count` | Extract the number of items from a JSON array or relational field | | `json` | Extract a specific value from a JSON field using path notation | diff --git a/content/guides/04.connect/2.filter-rules.md b/content/guides/04.connect/2.filter-rules.md index 2740aa0f..f94b5ba8 100644 --- a/content/guides/04.connect/2.filter-rules.md +++ b/content/guides/04.connect/2.filter-rules.md @@ -211,7 +211,6 @@ In the above, `categories` is the relational field in the collection. `_none` ch ``` :: :: -:: ::example **Nested user and role variables in permissions** diff --git a/content/guides/04.connect/4.relations.md b/content/guides/04.connect/4.relations.md index 28106db8..c97466cc 100644 --- a/content/guides/04.connect/4.relations.md +++ b/content/guides/04.connect/4.relations.md @@ -83,7 +83,6 @@ use this same structure to select what the related items are: ``` :: :: -:: You can also provide an object instead of a primary key in order to create new items nested on the fly, or an object with a primary key included to update an existing item: @@ -150,7 +149,6 @@ with a primary key included to update an existing item: ``` :: :: -:: To remove items from this relationship, omit them from the array: diff --git a/content/guides/04.connect/6.sdk.md b/content/guides/04.connect/6.sdk.md index 48546334..8e432b01 100644 --- a/content/guides/04.connect/6.sdk.md +++ b/content/guides/04.connect/6.sdk.md @@ -56,8 +56,6 @@ The Directus SDK is a "Composable Client" that allows you to customize and build ::callout{icon="material-symbols:school-outline" color="secondary" to="/tutorials/tips-and-tricks/advanced-types-with-the-directus-sdk"} Learn how to create a Schema for SDK client creation. - :: - :: :: @@ -113,7 +111,6 @@ To call custom endpoints using the SDK, you can manually provide a path and meth --- label: JavaScript --- - ```js import { createDirectus, rest } from '@directus/sdk'; const directus = createDirectus('http://directus.example.com').with(rest()); @@ -123,9 +120,7 @@ To call custom endpoints using the SDK, you can manually provide a path and meth method: 'GET', })); ``` - :: - ::div{class="pr-6"} --- label: TypeScript @@ -139,7 +134,6 @@ To call custom endpoints using the SDK, you can manually provide a path and meth method: 'GET', })); ``` - :: :: ### GraphQL Usage diff --git a/content/tutorials/3.tips-and-tricks/advanced-types-with-the-directus-sdk.md b/content/tutorials/3.tips-and-tricks/advanced-types-with-the-directus-sdk.md index 6ffde866..c5c43570 100644 --- a/content/tutorials/3.tips-and-tricks/advanced-types-with-the-directus-sdk.md +++ b/content/tutorials/3.tips-and-tricks/advanced-types-with-the-directus-sdk.md @@ -82,10 +82,9 @@ interface CollectionA { } ``` -There are currently 3 literal types that can be applied. The first 2 are both used to apply the `count(field)` +There are currently 5 literal types that can be applied. The first 2 are both used to apply the `count(field)` array function in the `filter`/`field` auto-complete suggestions, these are the -`'json'` and `'csv'` string literal types. The `'datetime'` string literal type which is used to apply all -datetime functions in the `filter`/`field` auto-complete suggestions. +`'json'` and `'csv'` string literal types. The `'datetime'`, `'date'`, and `'time'` string literal types which are used to apply related functions in the `filter`/`field` auto-complete suggestions. ```ts interface CollectionA { @@ -96,13 +95,15 @@ interface CollectionA { tags: 'csv'; // [!code ++] json_field: 'json'; // [!code ++] date_created: 'datetime'; // [!code ++] + start_time: 'time'; // [!code ++] + event_date: 'date'; // [!code ++] } ``` In the output types these string literals will get resolved to their appropriate types: - `'csv'` resolves to `string[]` -- `'datetime'` resolves to `string` +- `'datetime'`, `'date'`, and `'time'` resolve to `string` - `'json'` resolves to [`JsonValue`](https://github.com/directus/directus/blob/main/sdk/src/types/output.ts#L105) ::callout{icon="material-symbols:warning-rounded" color="warning"}