@aeriajs/types 0.0.81 → 0.0.83

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.
@@ -45,7 +45,7 @@ export type CountPayload<TDocument extends CollectionDocument<OptionalId<any>>>
45
45
  export type GetPayload<TDocument extends CollectionDocument<OptionalId<any>>> = {
46
46
  filters: Filters<TDocument>;
47
47
  project?: Projection<TDocument>;
48
- populate?: (keyof TDocument | string)[];
48
+ populate?: (keyof TDocument)[];
49
49
  };
50
50
  export type GetAllPayload<TDocument extends CollectionDocument<OptionalId<any>>> = {
51
51
  filters?: Filters<TDocument>;
@@ -53,7 +53,7 @@ export type GetAllPayload<TDocument extends CollectionDocument<OptionalId<any>>>
53
53
  offset?: number;
54
54
  limit?: number;
55
55
  sort?: QuerySort<TDocument>;
56
- populate?: (keyof TDocument | string)[];
56
+ populate?: (keyof TDocument)[];
57
57
  };
58
58
  export type InsertPayload<TDocument extends CollectionDocument<any>> = {
59
59
  what: What<TDocument>;
@@ -1,4 +1,5 @@
1
1
  import type { PhosphorIcon } from '@phosphor-icons/core';
2
+ import type { ObjectId } from 'mongodb';
2
3
  import type { Condition } from './condition.js';
3
4
  import type { Context } from './context.js';
4
5
  export type PropertyArrayElement = 'checkbox' | 'radio' | 'select';
@@ -94,7 +95,9 @@ export type ArrayOfRefs = Omit<ArrayProperty, 'items'> & {
94
95
  items: RefProperty;
95
96
  };
96
97
  export type GetterProperty = {
97
- getter: (document: unknown, context?: Context) => any;
98
+ getter: (document: unknown & {
99
+ _id: ObjectId;
100
+ }, context: Context) => unknown;
98
101
  requires?: string[];
99
102
  };
100
103
  export type ConstProperty = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/types",
3
- "version": "0.0.81",
3
+ "version": "0.0.83",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",