@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 +1 -1
- package/dist/description.d.ts +8 -6
- package/dist/functions.d.ts +1 -1
- package/dist/property.d.ts +1 -0
- package/dist/security.d.ts +1 -1
- package/package.json +1 -1
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) =>
|
|
34
|
+
errorHandler?: <TError extends Error>(context: RouteContext, error: TError) => unknown | Promise<unknown>;
|
|
35
35
|
};
|
package/dist/description.d.ts
CHANGED
|
@@ -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
|
|
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>,
|
|
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> | {
|
package/dist/functions.d.ts
CHANGED
|
@@ -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
|
-
|
|
10
|
+
propName: string;
|
|
11
11
|
};
|
|
12
12
|
export type Pagination = {
|
|
13
13
|
recordsCount: number;
|
package/dist/property.d.ts
CHANGED
package/dist/security.d.ts
CHANGED
|
@@ -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
|
-
|
|
34
|
+
propName?: string;
|
|
35
35
|
parentId?: string;
|
|
36
36
|
childId?: string;
|
|
37
37
|
payload: TPayload;
|