@aeriajs/types 0.0.79 → 0.0.81

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.
@@ -27,13 +27,15 @@ export type CollectionActionBase<TDescription extends Description> = {
27
27
  label?: string;
28
28
  icon?: Icon;
29
29
  ask?: boolean;
30
- button?: boolean;
31
30
  translate?: boolean;
32
31
  roles?: readonly string[];
33
32
  requires?: readonly PropertiesWithId<TDescription>[];
34
33
  };
35
34
  export type CollectionAction<TDescription extends Description> = CollectionActionBase<TDescription> & (CollectionActionRoute | CollectionActionFunction | CollectionActionEvent);
36
- export type CollectionActions<TDescription extends Description> = Record<string, null | CollectionAction<TDescription>>;
35
+ export type CollectionActions<TDescription extends Description> = Record<string, CollectionAction<TDescription> & {
36
+ button?: boolean;
37
+ } | null>;
38
+ export type CollectionIndividualActions<TDescription extends Description> = Record<string, CollectionAction<TDescription> | null>;
37
39
  export type FormLayout<TDescription extends Description> = {
38
40
  fields?: Partial<Record<PropertiesWithId<TDescription>, FormLayoutField<TDescription>>>;
39
41
  };
@@ -101,7 +103,7 @@ export type Description<TDescription extends Description = any> = JsonSchema<TDe
101
103
  table?: readonly PropertiesWithId<TDescription>[];
102
104
  tableMeta?: readonly PropertiesWithId<TDescription>[];
103
105
  filtersPresets?: Record<string, FiltersPreset<TDescription>>;
104
- freshItem?: Partial<Record<PropertiesWithId<TDescription>, any>>;
106
+ freshItem?: Partial<Record<PropertiesWithId<TDescription>, unknown>>;
105
107
  form?: readonly PropertiesWithId<TDescription>[] | Record<PropertiesWithId<TDescription>, string[]>;
106
108
  writable?: readonly PropertiesWithId<TDescription>[];
107
109
  filters?: readonly (PropertiesWithId<TDescription> | {
@@ -112,6 +114,6 @@ export type Description<TDescription extends Description = any> = JsonSchema<TDe
112
114
  formLayout?: Partial<FormLayout<TDescription>>;
113
115
  tableLayout?: Partial<TableLayout<TDescription>>;
114
116
  actions?: CollectionActions<TDescription>;
115
- individualActions?: CollectionActions<TDescription>;
117
+ individualActions?: CollectionIndividualActions<TDescription>;
116
118
  search?: SearchOptions<TDescription>;
117
119
  };
package/dist/http.d.ts CHANGED
@@ -21,8 +21,8 @@ export type GenericRequest = Omit<IncomingMessage, 'url' | 'method'> & {
21
21
  readonly method: RequestMethod;
22
22
  readonly body?: string;
23
23
  readonly fragments: string[];
24
- payload: Record<string, any>;
25
- query: Record<string, any>;
24
+ payload: Record<string, unknown>;
25
+ query: Record<string, unknown>;
26
26
  };
27
27
  export declare const STREAMED_RESPONSE: unique symbol;
28
28
  export type GenericResponse = ServerResponse & {
@@ -1,5 +1,6 @@
1
1
  import type { PhosphorIcon } from '@phosphor-icons/core';
2
2
  import type { Condition } from './condition.js';
3
+ import type { Context } from './context.js';
3
4
  export type PropertyArrayElement = 'checkbox' | 'radio' | 'select';
4
5
  export type PropertyInputType = 'text' | 'email' | 'password' | 'search' | 'time' | 'month';
5
6
  export type PropertyInputElement = 'input' | 'textarea';
@@ -93,7 +94,7 @@ export type ArrayOfRefs = Omit<ArrayProperty, 'items'> & {
93
94
  items: RefProperty;
94
95
  };
95
96
  export type GetterProperty = {
96
- getter: (document: any) => any;
97
+ getter: (document: unknown, context?: Context) => any;
97
98
  requires?: string[];
98
99
  };
99
100
  export type ConstProperty = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/types",
3
- "version": "0.0.79",
3
+ "version": "0.0.81",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",