@diagonal-hq/cli 0.36.1 → 0.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/cli.mjs +12 -1
- package/dist/sdk-contract.d.ts +0 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -914,6 +914,7 @@ export default defineResource<'members'>({
|
|
|
914
914
|
|
|
915
915
|
- The build accepts only a field key whose field type the setting allows. For example, `notifiable.email_field` accepts only an `email` field. With the folder type argument, such as `defineResource<'members'>({...})`, the editor checks the key after the build generates the types of the folder. Without the argument, the editor accepts any key.
|
|
916
916
|
- A file cannot declare `role` or `permission`. Authorization provisioning owns the Role and Permission resources. It also maps `authenticatable.roles_field`, so a file cannot set it.
|
|
917
|
+
- The Page SDK types of an authenticatable resource include the provisioned `roles` relation: `resource()` exposes `fields.roles`, and `useRecords`, `search`, and `useResourceDataTable` accept `relations: ['roles']` and type `record.roles`. Role records have a string `id` and loosely typed fields, like other records of `Resources.Roles`. A resource file that declares its own `roles` field keeps that field's type. If the resource ever had another field with the key `roles`, provisioning names the relation `roles_2`, but the page types still say `roles`. Page bindings (`bindings.<name>.relations`, the page props, and the `seo` context) and workflow data calls do not type this provisioned relation, because they read `generated/resources.ts`.
|
|
917
918
|
- A page reference setting names a page file by its uid, as `Pages.<Name>.uid` from `@app/generated/pages`. These settings are `authenticatable.login_page`, `authenticatable.login_redirect`, and `schedulable.calendar_connections_page`. See [Page reference settings](#page-reference-settings).
|
|
918
919
|
- The build checks the setting names, the required settings, the select values, and each field reference. A relation path, such as an Itemizable offering path, names a relation of each resource on the way.
|
|
919
920
|
- Each field reference is stored as the field id, as the resource builder stores it. This includes a nested reference, such as an Eventable excluded field, and each key of a relation path.
|