@aeriajs/builtins 0.0.127 → 0.0.128
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/authentication.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RouteContext, SchemaWithId, TokenRecipient } from '@aeriajs/types';
|
|
2
2
|
import type { ObjectId } from '@aeriajs/core';
|
|
3
3
|
import type { description } from './collections/user/description.js';
|
|
4
4
|
export type SuccessfulAuthentication = {
|
|
@@ -11,7 +11,7 @@ export declare enum AuthenticationError {
|
|
|
11
11
|
InvalidCredentials = "INVALID_CREDENTIALS",
|
|
12
12
|
InactiveUser = "INACTIVE_USER"
|
|
13
13
|
}
|
|
14
|
-
export declare const successfulAuthentication: (userId: ObjectId, context:
|
|
14
|
+
export declare const successfulAuthentication: (userId: ObjectId, context: RouteContext) => Promise<SuccessfulAuthentication>;
|
|
15
15
|
export declare const defaultSuccessfulAuthentication: () => Promise<{
|
|
16
16
|
user: {
|
|
17
17
|
_id: null;
|
package/dist/authentication.js
CHANGED
|
@@ -8,7 +8,7 @@ var AuthenticationError;
|
|
|
8
8
|
AuthenticationError["InactiveUser"] = "INACTIVE_USER";
|
|
9
9
|
})(AuthenticationError || (exports.AuthenticationError = AuthenticationError = {}));
|
|
10
10
|
const successfulAuthentication = async (userId, context) => {
|
|
11
|
-
const { error, result: user } = await context.
|
|
11
|
+
const { error, result: user } = await context.collections.user.functions.get({
|
|
12
12
|
filters: {
|
|
13
13
|
_id: userId,
|
|
14
14
|
},
|
package/dist/authentication.mjs
CHANGED
|
@@ -6,7 +6,7 @@ export var AuthenticationError = /* @__PURE__ */ ((AuthenticationError2) => {
|
|
|
6
6
|
return AuthenticationError2;
|
|
7
7
|
})(AuthenticationError || {});
|
|
8
8
|
export const successfulAuthentication = async (userId, context) => {
|
|
9
|
-
const { error, result: user } = await context.
|
|
9
|
+
const { error, result: user } = await context.collections.user.functions.get({
|
|
10
10
|
filters: {
|
|
11
11
|
_id: userId
|
|
12
12
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/builtins",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.128",
|
|
4
4
|
"description": "## Installation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"mongodb": "^6.5.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@aeriajs/core": "^0.0.
|
|
48
|
+
"@aeriajs/core": "^0.0.128",
|
|
49
49
|
"@aeriajs/common": "^0.0.80",
|
|
50
50
|
"@aeriajs/entrypoint": "^0.0.82",
|
|
51
51
|
"@aeriajs/types": "^0.0.68",
|