@aeriajs/types 0.0.40 → 0.0.42
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 +3 -3
- package/dist/config.d.ts +1 -1
- package/dist/functions.d.ts +0 -3
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ObjectId } from 'mongodb';
|
|
2
|
-
import type { Context, Contract, Description, CollectionSecurityPolicy, PackReferences
|
|
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, (
|
|
8
|
+
functions?: Record<string, (payload: any, context: Context, ...args: any[]) => any>;
|
|
9
9
|
functionContracts?: Record<string, Contract>;
|
|
10
|
-
exposedFunctions?: Record<string, readonly string[] | boolean>;
|
|
10
|
+
exposedFunctions?: Record<string, readonly string[] | boolean | 'unauthenticated' | 'unauthenticated-only'>;
|
|
11
11
|
};
|
|
12
12
|
export type AssetType = keyof Collection;
|
|
13
13
|
export type FunctionPath = `/${string}/${string}`;
|
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>;
|
package/dist/functions.d.ts
CHANGED