@aeriajs/builtins 0.0.255 → 0.0.257
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/collections/file/download.d.ts +56 -16
- package/dist/collections/file/download.js +40 -1
- package/dist/collections/file/download.mjs +40 -1
- package/dist/collections/file/index.d.ts +461 -20
- package/dist/collections/file/index.js +3 -0
- package/dist/collections/file/index.mjs +4 -1
- package/dist/collections/file/remove.d.ts +2 -2
- package/dist/collections/user/activate.d.ts +67 -33
- package/dist/collections/user/activate.js +45 -1
- package/dist/collections/user/activate.mjs +45 -1
- package/dist/collections/user/authenticate.d.ts +136 -41
- package/dist/collections/user/authenticate.js +98 -2
- package/dist/collections/user/authenticate.mjs +98 -2
- package/dist/collections/user/createAccount.d.ts +124 -111
- package/dist/collections/user/createAccount.js +27 -1
- package/dist/collections/user/createAccount.mjs +27 -1
- package/dist/collections/user/editProfile.d.ts +95 -103
- package/dist/collections/user/editProfile.js +21 -1
- package/dist/collections/user/editProfile.mjs +21 -1
- package/dist/collections/user/getActivationLink.d.ts +92 -60
- package/dist/collections/user/getActivationLink.js +39 -4
- package/dist/collections/user/getActivationLink.mjs +39 -3
- package/dist/collections/user/getCurrentUser.d.ts +43 -113
- package/dist/collections/user/getCurrentUser.js +31 -1
- package/dist/collections/user/getCurrentUser.mjs +31 -1
- package/dist/collections/user/getInfo.d.ts +71 -26
- package/dist/collections/user/getInfo.js +47 -1
- package/dist/collections/user/getInfo.mjs +47 -1
- package/dist/collections/user/getRedefinePasswordLink.d.ts +91 -55
- package/dist/collections/user/getRedefinePasswordLink.js +32 -2
- package/dist/collections/user/getRedefinePasswordLink.mjs +33 -3
- package/dist/collections/user/index.d.ts +3480 -630
- package/dist/collections/user/index.js +9 -21
- package/dist/collections/user/index.mjs +18 -30
- package/dist/collections/user/redefinePassword.d.ts +93 -34
- package/dist/collections/user/redefinePassword.js +46 -6
- package/dist/collections/user/redefinePassword.mjs +46 -6
- package/dist/functions/describe.d.ts +38 -12
- package/dist/index.d.ts +4397 -1106
- package/package.json +7 -7
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.user = void 0;
|
|
4
4
|
const core_1 = require("@aeriajs/core");
|
|
5
|
-
const types_1 = require("@aeriajs/types");
|
|
6
5
|
const description_js_1 = require("./description.js");
|
|
7
6
|
const authenticate_js_1 = require("./authenticate.js");
|
|
8
7
|
const activate_js_1 = require("./activate.js");
|
|
@@ -61,25 +60,14 @@ exports.user = (0, core_1.defineCollection)({
|
|
|
61
60
|
Object.assign(exports.user, {
|
|
62
61
|
exposedFunctions,
|
|
63
62
|
contracts: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
$ref: 'user',
|
|
74
|
-
}),
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
getCurrentUser: {
|
|
78
|
-
response: [
|
|
79
|
-
(0, types_1.resultSchema)({
|
|
80
|
-
$ref: 'user',
|
|
81
|
-
}),
|
|
82
|
-
],
|
|
83
|
-
},
|
|
63
|
+
activate: activate_js_1.activateContract,
|
|
64
|
+
authenticate: authenticate_js_1.authenticateContract,
|
|
65
|
+
createAccount: createAccount_js_1.createAccountContract,
|
|
66
|
+
editProfile: editProfile_js_1.editProfileContract,
|
|
67
|
+
getActivationLink: getActivationLink_js_1.getActivationLinkContract,
|
|
68
|
+
getCurrentUser: getCurrentUser_js_1.getCurrentUserContract,
|
|
69
|
+
getInfo: getInfo_js_1.getInfoContract,
|
|
70
|
+
getRedefinePasswordLink: getRedefinePasswordLink_js_1.getRedefinePasswordLinkContract,
|
|
71
|
+
redefinePassword: redefinePassword_js_1.redefinePasswordContract,
|
|
84
72
|
},
|
|
85
73
|
});
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { defineCollection, get, getAll, remove, upload, removeFile } from "@aeriajs/core";
|
|
3
|
-
import { functionSchemas, resultSchema } from "@aeriajs/types";
|
|
4
3
|
import { description } from "./description.mjs";
|
|
5
|
-
import { authenticate } from "./authenticate.mjs";
|
|
6
|
-
import { activate } from "./activate.mjs";
|
|
4
|
+
import { authenticate, authenticateContract } from "./authenticate.mjs";
|
|
5
|
+
import { activate, activateContract } from "./activate.mjs";
|
|
7
6
|
import { insert } from "./insert.mjs";
|
|
8
|
-
import { createAccount } from "./createAccount.mjs";
|
|
9
|
-
import { getInfo } from "./getInfo.mjs";
|
|
10
|
-
import { getCurrentUser } from "./getCurrentUser.mjs";
|
|
11
|
-
import { getActivationLink } from "./getActivationLink.mjs";
|
|
12
|
-
import { redefinePassword } from "./redefinePassword.mjs";
|
|
13
|
-
import { getRedefinePasswordLink } from "./getRedefinePasswordLink.mjs";
|
|
14
|
-
import { editProfile } from "./editProfile.mjs";
|
|
7
|
+
import { createAccount, createAccountContract } from "./createAccount.mjs";
|
|
8
|
+
import { getInfo, getInfoContract } from "./getInfo.mjs";
|
|
9
|
+
import { getCurrentUser, getCurrentUserContract } from "./getCurrentUser.mjs";
|
|
10
|
+
import { getActivationLink, getActivationLinkContract } from "./getActivationLink.mjs";
|
|
11
|
+
import { redefinePassword, redefinePasswordContract } from "./redefinePassword.mjs";
|
|
12
|
+
import { getRedefinePasswordLink, getRedefinePasswordLinkContract } from "./getRedefinePasswordLink.mjs";
|
|
13
|
+
import { editProfile, editProfileContract } from "./editProfile.mjs";
|
|
15
14
|
const functions = {
|
|
16
15
|
get,
|
|
17
16
|
getAll,
|
|
@@ -59,25 +58,14 @@ export const user = defineCollection({
|
|
|
59
58
|
Object.assign(user, {
|
|
60
59
|
exposedFunctions,
|
|
61
60
|
contracts: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
$ref: "user"
|
|
72
|
-
})
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
|
-
getCurrentUser: {
|
|
76
|
-
response: [
|
|
77
|
-
resultSchema({
|
|
78
|
-
$ref: "user"
|
|
79
|
-
})
|
|
80
|
-
]
|
|
81
|
-
}
|
|
61
|
+
activate: activateContract,
|
|
62
|
+
authenticate: authenticateContract,
|
|
63
|
+
createAccount: createAccountContract,
|
|
64
|
+
editProfile: editProfileContract,
|
|
65
|
+
getActivationLink: getActivationLinkContract,
|
|
66
|
+
getCurrentUser: getCurrentUserContract,
|
|
67
|
+
getInfo: getInfoContract,
|
|
68
|
+
getRedefinePasswordLink: getRedefinePasswordLinkContract,
|
|
69
|
+
redefinePassword: redefinePasswordContract
|
|
82
70
|
}
|
|
83
71
|
});
|
|
@@ -1,41 +1,100 @@
|
|
|
1
|
-
import type { Context } from '@aeriajs/types';
|
|
1
|
+
import type { Context, ContractToFunction } from '@aeriajs/types';
|
|
2
2
|
import type { description } from './description.js';
|
|
3
|
-
|
|
4
|
-
import { Result } from '@aeriajs/types';
|
|
5
|
-
export declare const ActivationError: {
|
|
3
|
+
export declare const RedefinePasswordError: {
|
|
6
4
|
readonly UserNotFound: "USER_NOT_FOUND";
|
|
7
5
|
readonly UserNotActive: "USER_NOT_ACTIVE";
|
|
8
6
|
readonly InvalidLink: "INVALID_LINK";
|
|
9
7
|
readonly InvalidToken: "INVALID_TOKEN";
|
|
10
8
|
};
|
|
11
|
-
export declare const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}> | Result.Error<{
|
|
28
|
-
readonly code: "INVALID_TOKEN";
|
|
29
|
-
} & {
|
|
30
|
-
httpStatus: 401;
|
|
31
|
-
}> | Result.Error<{
|
|
32
|
-
readonly code: "MALFORMED_INPUT";
|
|
33
|
-
} & {
|
|
34
|
-
httpStatus: 422;
|
|
35
|
-
}> | {
|
|
36
|
-
readonly _tag: "Result";
|
|
37
|
-
readonly error: undefined;
|
|
38
|
-
readonly result: {
|
|
39
|
-
readonly userId: ObjectId;
|
|
9
|
+
export declare const redefinePasswordContract: {
|
|
10
|
+
readonly payload: {
|
|
11
|
+
readonly type: "object";
|
|
12
|
+
readonly required: readonly [];
|
|
13
|
+
readonly properties: {
|
|
14
|
+
readonly userId: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly format: "objectid";
|
|
17
|
+
};
|
|
18
|
+
readonly password: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
};
|
|
21
|
+
readonly token: {
|
|
22
|
+
readonly type: "string";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
40
25
|
};
|
|
41
|
-
|
|
26
|
+
readonly response: [{
|
|
27
|
+
readonly type: "object";
|
|
28
|
+
readonly properties: {
|
|
29
|
+
readonly _tag: {
|
|
30
|
+
readonly const: "Error";
|
|
31
|
+
};
|
|
32
|
+
readonly result: {
|
|
33
|
+
readonly const: undefined;
|
|
34
|
+
};
|
|
35
|
+
readonly error: {
|
|
36
|
+
readonly type: "object";
|
|
37
|
+
readonly required: readonly ["httpStatus", "code"];
|
|
38
|
+
readonly properties: {
|
|
39
|
+
readonly httpStatus: {
|
|
40
|
+
readonly enum: [403, 404, 400];
|
|
41
|
+
};
|
|
42
|
+
readonly code: {
|
|
43
|
+
readonly enum: ["RESOURCE_NOT_FOUND", "OWNERSHIP_ERROR", "INSECURE_OPERATOR", "MALFORMED_INPUT"];
|
|
44
|
+
};
|
|
45
|
+
readonly message: {
|
|
46
|
+
readonly type: "string";
|
|
47
|
+
};
|
|
48
|
+
readonly details: {
|
|
49
|
+
readonly type: "object";
|
|
50
|
+
readonly additionalProperties: true;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
}, {
|
|
56
|
+
readonly type: "object";
|
|
57
|
+
readonly properties: {
|
|
58
|
+
readonly _tag: {
|
|
59
|
+
readonly const: "Error";
|
|
60
|
+
};
|
|
61
|
+
readonly result: {
|
|
62
|
+
readonly const: undefined;
|
|
63
|
+
};
|
|
64
|
+
readonly error: {
|
|
65
|
+
readonly type: "object";
|
|
66
|
+
readonly required: readonly ["httpStatus", "code"];
|
|
67
|
+
readonly properties: {
|
|
68
|
+
readonly httpStatus: {
|
|
69
|
+
readonly enum: [404, 403, 401, 422];
|
|
70
|
+
};
|
|
71
|
+
readonly code: {
|
|
72
|
+
readonly enum: ["MALFORMED_INPUT", "INVALID_LINK", "INVALID_TOKEN", "USER_NOT_FOUND", "USER_NOT_ACTIVE"];
|
|
73
|
+
};
|
|
74
|
+
readonly message: {
|
|
75
|
+
readonly type: "string";
|
|
76
|
+
};
|
|
77
|
+
readonly details: {
|
|
78
|
+
readonly type: "object";
|
|
79
|
+
readonly additionalProperties: true;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}, {
|
|
85
|
+
readonly type: "object";
|
|
86
|
+
readonly properties: {
|
|
87
|
+
readonly _tag: {
|
|
88
|
+
readonly const: "Result";
|
|
89
|
+
};
|
|
90
|
+
readonly error: {
|
|
91
|
+
readonly const: undefined;
|
|
92
|
+
};
|
|
93
|
+
readonly result: {
|
|
94
|
+
readonly type: "object";
|
|
95
|
+
readonly properties: {};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
}];
|
|
99
|
+
};
|
|
100
|
+
export declare const redefinePassword: ContractToFunction<typeof redefinePasswordContract, Context<typeof description>>;
|
|
@@ -1,15 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.redefinePassword = exports.
|
|
3
|
+
exports.redefinePassword = exports.redefinePasswordContract = exports.RedefinePasswordError = void 0;
|
|
4
4
|
const core_1 = require("@aeriajs/core");
|
|
5
5
|
const types_1 = require("@aeriajs/types");
|
|
6
6
|
const bcrypt = require("bcryptjs");
|
|
7
|
-
exports.
|
|
7
|
+
exports.RedefinePasswordError = {
|
|
8
8
|
UserNotFound: 'USER_NOT_FOUND',
|
|
9
9
|
UserNotActive: 'USER_NOT_ACTIVE',
|
|
10
10
|
InvalidLink: 'INVALID_LINK',
|
|
11
11
|
InvalidToken: 'INVALID_TOKEN',
|
|
12
12
|
};
|
|
13
|
+
exports.redefinePasswordContract = (0, types_1.defineContract)({
|
|
14
|
+
payload: {
|
|
15
|
+
type: 'object',
|
|
16
|
+
required: [],
|
|
17
|
+
properties: {
|
|
18
|
+
userId: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
format: 'objectid',
|
|
21
|
+
},
|
|
22
|
+
password: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
},
|
|
25
|
+
token: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
response: [
|
|
31
|
+
types_1.functionSchemas.getError(),
|
|
32
|
+
(0, types_1.endpointErrorSchema)({
|
|
33
|
+
httpStatus: [
|
|
34
|
+
types_1.HTTPStatus.NotFound,
|
|
35
|
+
types_1.HTTPStatus.Forbidden,
|
|
36
|
+
types_1.HTTPStatus.Unauthorized,
|
|
37
|
+
types_1.HTTPStatus.UnprocessableContent,
|
|
38
|
+
],
|
|
39
|
+
code: [
|
|
40
|
+
types_1.ACError.MalformedInput,
|
|
41
|
+
exports.RedefinePasswordError.InvalidLink,
|
|
42
|
+
exports.RedefinePasswordError.InvalidToken,
|
|
43
|
+
exports.RedefinePasswordError.UserNotFound,
|
|
44
|
+
exports.RedefinePasswordError.UserNotActive,
|
|
45
|
+
],
|
|
46
|
+
}),
|
|
47
|
+
(0, types_1.resultSchema)({
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties: {},
|
|
50
|
+
}),
|
|
51
|
+
],
|
|
52
|
+
});
|
|
13
53
|
const redefinePassword = async (payload, context) => {
|
|
14
54
|
const { userId, token, password, } = payload;
|
|
15
55
|
if (!context.config.secret) {
|
|
@@ -17,7 +57,7 @@ const redefinePassword = async (payload, context) => {
|
|
|
17
57
|
}
|
|
18
58
|
if (!userId || !token) {
|
|
19
59
|
return context.error(types_1.HTTPStatus.NotFound, {
|
|
20
|
-
code: exports.
|
|
60
|
+
code: exports.RedefinePasswordError.InvalidLink,
|
|
21
61
|
});
|
|
22
62
|
}
|
|
23
63
|
const user = await context.collection.model.findOne({
|
|
@@ -30,18 +70,18 @@ const redefinePassword = async (payload, context) => {
|
|
|
30
70
|
});
|
|
31
71
|
if (!user) {
|
|
32
72
|
return context.error(types_1.HTTPStatus.NotFound, {
|
|
33
|
-
code: exports.
|
|
73
|
+
code: exports.RedefinePasswordError.UserNotFound,
|
|
34
74
|
});
|
|
35
75
|
}
|
|
36
76
|
if (!user.active) {
|
|
37
77
|
return context.error(types_1.HTTPStatus.Forbidden, {
|
|
38
|
-
code: exports.
|
|
78
|
+
code: exports.RedefinePasswordError.UserNotActive,
|
|
39
79
|
});
|
|
40
80
|
}
|
|
41
81
|
const decoded = await (0, core_1.decodeToken)(token, context.config.secret);
|
|
42
82
|
if (!decoded) {
|
|
43
83
|
return context.error(types_1.HTTPStatus.Unauthorized, {
|
|
44
|
-
code: exports.
|
|
84
|
+
code: exports.RedefinePasswordError.InvalidToken,
|
|
45
85
|
});
|
|
46
86
|
}
|
|
47
87
|
if (!password) {
|
|
@@ -1,13 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { decodeToken, ObjectId } from "@aeriajs/core";
|
|
3
|
-
import { Result, ACError, HTTPStatus } from "@aeriajs/types";
|
|
3
|
+
import { Result, ACError, HTTPStatus, resultSchema, functionSchemas, endpointErrorSchema, defineContract } from "@aeriajs/types";
|
|
4
4
|
import * as bcrypt from "bcryptjs";
|
|
5
|
-
export const
|
|
5
|
+
export const RedefinePasswordError = {
|
|
6
6
|
UserNotFound: "USER_NOT_FOUND",
|
|
7
7
|
UserNotActive: "USER_NOT_ACTIVE",
|
|
8
8
|
InvalidLink: "INVALID_LINK",
|
|
9
9
|
InvalidToken: "INVALID_TOKEN"
|
|
10
10
|
};
|
|
11
|
+
export const redefinePasswordContract = defineContract({
|
|
12
|
+
payload: {
|
|
13
|
+
type: "object",
|
|
14
|
+
required: [],
|
|
15
|
+
properties: {
|
|
16
|
+
userId: {
|
|
17
|
+
type: "string",
|
|
18
|
+
format: "objectid"
|
|
19
|
+
},
|
|
20
|
+
password: {
|
|
21
|
+
type: "string"
|
|
22
|
+
},
|
|
23
|
+
token: {
|
|
24
|
+
type: "string"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
response: [
|
|
29
|
+
functionSchemas.getError(),
|
|
30
|
+
endpointErrorSchema({
|
|
31
|
+
httpStatus: [
|
|
32
|
+
HTTPStatus.NotFound,
|
|
33
|
+
HTTPStatus.Forbidden,
|
|
34
|
+
HTTPStatus.Unauthorized,
|
|
35
|
+
HTTPStatus.UnprocessableContent
|
|
36
|
+
],
|
|
37
|
+
code: [
|
|
38
|
+
ACError.MalformedInput,
|
|
39
|
+
RedefinePasswordError.InvalidLink,
|
|
40
|
+
RedefinePasswordError.InvalidToken,
|
|
41
|
+
RedefinePasswordError.UserNotFound,
|
|
42
|
+
RedefinePasswordError.UserNotActive
|
|
43
|
+
]
|
|
44
|
+
}),
|
|
45
|
+
resultSchema({
|
|
46
|
+
type: "object",
|
|
47
|
+
properties: {}
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
});
|
|
11
51
|
export const redefinePassword = async (payload, context) => {
|
|
12
52
|
const {
|
|
13
53
|
userId,
|
|
@@ -19,7 +59,7 @@ export const redefinePassword = async (payload, context) => {
|
|
|
19
59
|
}
|
|
20
60
|
if (!userId || !token) {
|
|
21
61
|
return context.error(HTTPStatus.NotFound, {
|
|
22
|
-
code:
|
|
62
|
+
code: RedefinePasswordError.InvalidLink
|
|
23
63
|
});
|
|
24
64
|
}
|
|
25
65
|
const user = await context.collection.model.findOne({
|
|
@@ -32,18 +72,18 @@ export const redefinePassword = async (payload, context) => {
|
|
|
32
72
|
});
|
|
33
73
|
if (!user) {
|
|
34
74
|
return context.error(HTTPStatus.NotFound, {
|
|
35
|
-
code:
|
|
75
|
+
code: RedefinePasswordError.UserNotFound
|
|
36
76
|
});
|
|
37
77
|
}
|
|
38
78
|
if (!user.active) {
|
|
39
79
|
return context.error(HTTPStatus.Forbidden, {
|
|
40
|
-
code:
|
|
80
|
+
code: RedefinePasswordError.UserNotActive
|
|
41
81
|
});
|
|
42
82
|
}
|
|
43
83
|
const decoded = await decodeToken(token, context.config.secret);
|
|
44
84
|
if (!decoded) {
|
|
45
85
|
return context.error(HTTPStatus.Unauthorized, {
|
|
46
|
-
code:
|
|
86
|
+
code: RedefinePasswordError.InvalidToken
|
|
47
87
|
});
|
|
48
88
|
}
|
|
49
89
|
if (!password) {
|
|
@@ -22,8 +22,8 @@ declare const Payload: Partial<{} & Omit<Readonly<import("@aeriajs/types").Filte
|
|
|
22
22
|
};
|
|
23
23
|
}>> & {
|
|
24
24
|
roles: boolean;
|
|
25
|
-
collections: string[];
|
|
26
25
|
revalidate: boolean;
|
|
26
|
+
collections: string[];
|
|
27
27
|
noSerialize: boolean;
|
|
28
28
|
router: boolean;
|
|
29
29
|
}, never>>;
|
|
@@ -37,19 +37,45 @@ export declare const describe: (contextOrPayload: RouteContext | typeof Payload)
|
|
|
37
37
|
readonly result: undefined;
|
|
38
38
|
} | {
|
|
39
39
|
readonly _tag: "Error";
|
|
40
|
-
readonly error: ({
|
|
41
|
-
readonly
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
readonly error: Pick<{} & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
|
|
41
|
+
readonly httpStatus: {
|
|
42
|
+
readonly enum: [401];
|
|
43
|
+
};
|
|
44
|
+
readonly code: {
|
|
45
|
+
readonly enum: ["AUTHORIZATION_ERROR", "INVALID_CREDENTIALS", "INACTIVE_USER"];
|
|
46
|
+
};
|
|
47
|
+
readonly message: {
|
|
48
|
+
readonly type: "string";
|
|
49
|
+
};
|
|
50
|
+
readonly details: {
|
|
51
|
+
readonly type: "object";
|
|
52
|
+
readonly additionalProperties: true;
|
|
53
|
+
};
|
|
54
|
+
}>> & {
|
|
55
|
+
code: "AUTHORIZATION_ERROR" | "INVALID_CREDENTIALS" | "INACTIVE_USER";
|
|
47
56
|
httpStatus: 401;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
} & {
|
|
57
|
+
message: string;
|
|
58
|
+
details: any;
|
|
59
|
+
}, never>, "code" | "httpStatus"> & Partial<{} & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
|
|
60
|
+
readonly httpStatus: {
|
|
61
|
+
readonly enum: [401];
|
|
62
|
+
};
|
|
63
|
+
readonly code: {
|
|
64
|
+
readonly enum: ["AUTHORIZATION_ERROR", "INVALID_CREDENTIALS", "INACTIVE_USER"];
|
|
65
|
+
};
|
|
66
|
+
readonly message: {
|
|
67
|
+
readonly type: "string";
|
|
68
|
+
};
|
|
69
|
+
readonly details: {
|
|
70
|
+
readonly type: "object";
|
|
71
|
+
readonly additionalProperties: true;
|
|
72
|
+
};
|
|
73
|
+
}>> & {
|
|
74
|
+
code: "AUTHORIZATION_ERROR" | "INVALID_CREDENTIALS" | "INACTIVE_USER";
|
|
51
75
|
httpStatus: 401;
|
|
52
|
-
|
|
76
|
+
message: string;
|
|
77
|
+
details: any;
|
|
78
|
+
}, never>>;
|
|
53
79
|
readonly result: undefined;
|
|
54
80
|
} | {
|
|
55
81
|
readonly _tag: "Result";
|