@aeriajs/types 0.0.111 → 0.0.113

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/dist/config.d.ts CHANGED
@@ -2,6 +2,8 @@ import type { RouteContext } from './context.js';
2
2
  import type { RouteUri } from './http.js';
3
3
  import type { RateLimitingParams } from './security.js';
4
4
  import type { CollectionItem } from './collection.js';
5
+ import type { UserRole } from './token.js';
6
+ export type RolesHierarchy = Record<UserRole, readonly UserRole[] | boolean>;
5
7
  export type ApiConfig = {
6
8
  name?: string;
7
9
  secret?: string;
@@ -38,6 +40,7 @@ export type ApiConfig = {
38
40
  };
39
41
  paginationLimit?: number;
40
42
  exposeFunctionsByDefault?: boolean | 'unauthenticated';
43
+ rolesHierarchy?: RolesHierarchy;
41
44
  };
42
45
  tokenUserProperties?: (keyof CollectionItem<'user'>)[];
43
46
  errorHandler?: <TError>(context: RouteContext, error: TError) => unknown | Promise<unknown>;
@@ -3,7 +3,7 @@ import type { PhosphorIcon } from '@phosphor-icons/core';
3
3
  import type { Condition } from './condition.js';
4
4
  import type { JsonSchema, PropertiesWithId } from './property.js';
5
5
  import type { OwnershipMode } from './security.js';
6
- export type DescriptionPreset = 'crud' | 'duplicate' | 'remove' | 'removeAll' | 'owned' | 'timestamped' | 'view';
6
+ export type DescriptionPreset = 'add' | 'crud' | 'duplicate' | 'remove' | 'removeAll' | 'owned' | 'timestamped' | 'view';
7
7
  export type Icon = PhosphorIcon['name'];
8
8
  export type CollectionActionRoute = {
9
9
  route: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/types",
3
- "version": "0.0.111",
3
+ "version": "0.0.113",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",