@aeriajs/types 0.0.71 → 0.0.73

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.
@@ -6,10 +6,10 @@ import type { Description } from './description.js';
6
6
  export type Collection<TCollection extends Collection = any> = {
7
7
  description: Description;
8
8
  item?: any;
9
- security?: CollectionSecurityPolicy<TCollection>;
10
9
  functions?: Record<string, (payload: any, context: Context<any>, ...args: any[]) => any>;
11
10
  contracts?: Record<string, Contract>;
12
11
  exposedFunctions?: Record<string, AccessCondition>;
12
+ security?: CollectionSecurityPolicy<TCollection>;
13
13
  };
14
14
  export type CollectionItem<TCollectionName extends keyof Collections> = Omit<Collections[TCollectionName]['item'], '_id'>;
15
15
  export type CollectionItemWithId<TCollectionName extends keyof Collections> = Collections[TCollectionName]['item'];
@@ -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 CollectionPresets = 'crud' | 'duplicate' | 'remove' | 'removeAll' | 'owned' | 'timestamped' | 'view';
6
+ export type DescriptionPreset = 'crud' | 'duplicate' | 'remove' | 'removeAll' | 'owned' | 'timestamped' | 'view';
7
7
  export type Icon = PhosphorIcon['name'];
8
8
  export type CollectionActionRoute = {
9
9
  route: {
@@ -24,7 +24,7 @@ export type CollectionActionEvent = {
24
24
  event?: string;
25
25
  };
26
26
  export type CollectionActionBase<TDescription extends Description> = {
27
- label: string;
27
+ label?: string;
28
28
  icon?: Icon;
29
29
  ask?: boolean;
30
30
  button?: boolean;
@@ -61,12 +61,6 @@ export type FiltersPreset<TDescription extends Description> = {
61
61
  badgeFunction?: string;
62
62
  default?: boolean;
63
63
  };
64
- export type CollectionOptions<TDescription extends Description> = {
65
- queryPreset?: {
66
- filters?: Partial<Record<PropertiesWithId<TDescription> | `$${string}`, any>>;
67
- sort?: Partial<Record<PropertiesWithId<TDescription>, any>>;
68
- };
69
- };
70
64
  export type LayoutName = 'tabular' | 'grid' | 'list';
71
65
  export type LayoutOptions<TDescription extends Description = any> = {
72
66
  picture?: PropertiesWithId<TDescription>;
@@ -88,11 +82,9 @@ export type RuntimeDescription<TDescription extends Description = any> = Pick<TD
88
82
  export type Description<TDescription extends Description = any> = JsonSchema<TDescription> & {
89
83
  title?: string;
90
84
  categories?: readonly string[];
91
- system?: boolean;
92
- inline?: boolean;
85
+ hidden?: boolean;
93
86
  preferred?: Record<string, RuntimeDescription<TDescription>>;
94
87
  icon?: Icon;
95
- options?: CollectionOptions<TDescription>;
96
88
  indexes?: readonly PropertiesWithId<TDescription>[];
97
89
  defaults?: Record<string, any>;
98
90
  owned?: OwnershipMode;
@@ -103,7 +95,7 @@ export type Description<TDescription extends Description = any> = JsonSchema<TDe
103
95
  timestamps?: false;
104
96
  immutable?: boolean | readonly (keyof TDescription['properties'])[] | ((doc: WithId<any>) => boolean | Promise<boolean>);
105
97
  route?: readonly string[];
106
- presets?: readonly CollectionPresets[];
98
+ presets?: readonly DescriptionPreset[];
107
99
  table?: readonly PropertiesWithId<TDescription>[];
108
100
  tableMeta?: readonly PropertiesWithId<TDescription>[];
109
101
  filtersPresets?: Record<string, FiltersPreset<TDescription>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/types",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",