@aeriajs/types 0.0.40 → 0.0.41

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/api.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import type { ObjectId } from 'mongodb';
2
- import type { Context, Contract, Description, CollectionSecurityPolicy, PackReferences, FunctionAttributes } from '.';
2
+ import type { Context, Contract, Description, CollectionSecurityPolicy, PackReferences } from '.';
3
3
  export type AcceptedRole = UserRole | UserRole[] | null | unknown;
4
4
  export type Collection<TCollection extends Collection = any> = {
5
5
  description: Description;
6
6
  item?: any;
7
7
  security?: CollectionSecurityPolicy<TCollection>;
8
- functions?: Record<string, ((payload: any, context: Context, ...args: any[]) => any) & FunctionAttributes>;
8
+ functions?: Record<string, (payload: any, context: Context, ...args: any[]) => any>;
9
9
  functionContracts?: Record<string, Contract>;
10
10
  exposedFunctions?: Record<string, readonly string[] | boolean>;
11
11
  };
package/dist/config.d.ts CHANGED
@@ -26,7 +26,7 @@ export type ApiConfig = {
26
26
  roles: string[];
27
27
  active: boolean;
28
28
  }>;
29
- exposeFunctionsByDefault?: boolean;
29
+ exposeFunctionsByDefault?: boolean | 'unauthenticated';
30
30
  };
31
31
  tokenUserProperties?: string[];
32
32
  errorHandler?: <TError extends Error>(context: RouteContext, error: TError) => any | Promise<any>;
@@ -79,7 +79,4 @@ export type CollectionFunctionsPaginated<TDocument extends CollectionDocument<Op
79
79
  pagination: Pagination;
80
80
  }>;
81
81
  };
82
- export type FunctionAttributes = {
83
- exposed?: boolean;
84
- };
85
82
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/types",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",