@aeriajs/types 0.0.78 → 0.0.80

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
@@ -31,5 +31,5 @@ export type ApiConfig = {
31
31
  exposeFunctionsByDefault?: boolean | 'unauthenticated';
32
32
  };
33
33
  tokenUserProperties?: string[];
34
- errorHandler?: <TError extends Error>(context: RouteContext, error: TError) => any | Promise<any>;
34
+ errorHandler?: <TError extends Error>(context: RouteContext, error: TError) => unknown | Promise<unknown>;
35
35
  };
@@ -47,11 +47,12 @@ export type FormLayoutField<TDescription extends Description> = {
47
47
  props?: Record<string, any>;
48
48
  };
49
49
  };
50
+ export type TableLayoutAction<TDescription extends Description> = {
51
+ button?: boolean | Condition<TDescription>;
52
+ if?: Condition<TDescription>;
53
+ };
50
54
  export type TableLayout<TDescription extends Description> = {
51
- actions: Partial<Record<keyof TDescription['individualActions'], {
52
- button?: boolean | Condition<TDescription>;
53
- if?: Condition<TDescription>;
54
- }>>;
55
+ actions?: Partial<Record<keyof TDescription['individualActions'], TableLayoutAction<TDescription>>>;
55
56
  };
56
57
  export type FiltersPreset<TDescription extends Description> = {
57
58
  label?: string;
@@ -75,8 +76,9 @@ export type Layout<TDescription extends Description = any> = {
75
76
  options?: LayoutOptions<TDescription>;
76
77
  };
77
78
  export type SearchOptions<TDescription extends Description> = {
78
- placeholder?: string;
79
79
  indexes: readonly (keyof TDescription['properties'])[];
80
+ placeholder?: string;
81
+ exactMatches?: boolean;
80
82
  };
81
83
  export type RuntimeDescription<TDescription extends Description = any> = Pick<TDescription, 'actions' | 'individualActions' | 'filters' | 'filtersPresets' | 'layout' | 'table' | 'tableMeta' | 'form' | 'tableLayout' | 'formLayout'>;
82
84
  export type Description<TDescription extends Description = any> = JsonSchema<TDescription> & {
@@ -99,7 +101,7 @@ export type Description<TDescription extends Description = any> = JsonSchema<TDe
99
101
  table?: readonly PropertiesWithId<TDescription>[];
100
102
  tableMeta?: readonly PropertiesWithId<TDescription>[];
101
103
  filtersPresets?: Record<string, FiltersPreset<TDescription>>;
102
- freshItem?: Partial<Record<PropertiesWithId<TDescription>, any>>;
104
+ freshItem?: Partial<Record<PropertiesWithId<TDescription>, unknown>>;
103
105
  form?: readonly PropertiesWithId<TDescription>[] | Record<PropertiesWithId<TDescription>, string[]>;
104
106
  writable?: readonly PropertiesWithId<TDescription>[];
105
107
  filters?: readonly (PropertiesWithId<TDescription> | {
@@ -7,7 +7,7 @@ import type { ValidationErrorCode, TraverseError } from './validation.js';
7
7
  import type { HTTPStatus, WithACErrors } from './http.js';
8
8
  export type UploadAuxProps = {
9
9
  parentId: string;
10
- propertyName: string;
10
+ propName: string;
11
11
  };
12
12
  export type Pagination = {
13
13
  recordsCount: number;
@@ -94,6 +94,7 @@ export type ArrayOfRefs = Omit<ArrayProperty, 'items'> & {
94
94
  };
95
95
  export type GetterProperty = {
96
96
  getter: (document: any) => any;
97
+ requires?: string[];
97
98
  };
98
99
  export type ConstProperty = {
99
100
  const: string | number | boolean | undefined | null;
@@ -31,7 +31,7 @@ export type CollectionSecurityPolicy<TCollection extends {
31
31
  functions?: Partial<Record<keyof TCollection['functions'], SecurityPolicy>>;
32
32
  };
33
33
  export type CollectionHookProps<TPayload = any> = {
34
- propertyName?: string;
34
+ propName?: string;
35
35
  parentId?: string;
36
36
  childId?: string;
37
37
  payload: TPayload;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/types",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",