@fnlb-project/shared 1.0.3 → 1.0.5
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/errors/index.d.ts +81 -24
- package/dist/errors/index.js +1 -1
- package/dist/types/index.d.ts +45 -108
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
package/dist/errors/index.d.ts
CHANGED
|
@@ -1,10 +1,91 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
+
declare enum GeneralErrorCodes {
|
|
4
|
+
GenericUnknown = "net.fnlb.errors.generic.unknown",
|
|
5
|
+
GenericInternalError = "net.fnlb.errors.generic.internal_error",
|
|
6
|
+
GenericValidationFailed = "net.fnlb.errors.generic.validation_failed",
|
|
7
|
+
GenericParseFailed = "net.fnlb.errors.generic.parse_failed",
|
|
8
|
+
GenericNotFound = "net.fnlb.errors.generic.not_found",
|
|
9
|
+
CommonInvalidRequest = "net.fnlb.errors.common.invalid_request",
|
|
10
|
+
CommonUnableToProcessRequest = "net.fnlb.errors.common.unable_to_process_request",
|
|
11
|
+
CommonInvalidFieldsLength = "net.fnlb.errors.common.invalid_body_fields_length",
|
|
12
|
+
CommonRateLimitExceeded = "net.fnlb.errors.common.rate_limit_exceeded",
|
|
13
|
+
CommonUnableToSaveToDatabase = "net.fnlb.errors.common.unable_to_save_to_database",
|
|
14
|
+
AuthInvalidToken = "net.fnlb.errors.auth.invalid_token",
|
|
15
|
+
AuthInvalidAPIToken = "net.fnlb.errors.auth.invalid_api_token",
|
|
16
|
+
AuthInvalidCaptchaToken = "net.fnlb.errors.auth.invalid_captcha_token",
|
|
17
|
+
AuthUnauthorized = "net.fnlb.errors.auth.unauthorized",
|
|
18
|
+
AuthUserBanned = "net.fnlb.errors.auth.user_banned",
|
|
19
|
+
Oauth2InvalidCode = "net.fnlb.errors.oauth2.invalid_code",
|
|
20
|
+
Oauth2InvalidScope = "net.fnlb.errors.oauth2.invalid_scope",
|
|
21
|
+
Oauth2TokenInvalid = "net.fnlb.errors.oauth2.token_invalid",
|
|
22
|
+
Oauth2UnableToFetchUser = "net.fnlb.errors.oauth2.unable_to_fetch_user",
|
|
23
|
+
Oauth2UnableToFetchConnections = "net.fnlb.errors.oauth2.unable_to_fetch_connections",
|
|
24
|
+
Oauth2UserWithoutConnection = "net.fnlb.errors.oauth2.user_without_connection",
|
|
25
|
+
Oauth2ConnectionNotVerified = "net.fnlb.errors.oauth2.connection_not_verified",
|
|
26
|
+
ReleaseNotFound = "net.fnlb.errors.release.no_release_found",
|
|
27
|
+
ReleaseVersionAlreadyExists = "net.fnlb.errors.release.version_already_exists"
|
|
28
|
+
}
|
|
29
|
+
declare enum InputErrorCodes {
|
|
30
|
+
LoginInvalidCredentials = "net.fnlb.errors.login.invalid_credentials",
|
|
31
|
+
LoginInvalidEmail = "net.fnlb.errors.login.invalid_email",
|
|
32
|
+
LoginInvalidOrUsedEmail = "net.fnlb.errors.login.invalid_or_used_email"
|
|
33
|
+
}
|
|
34
|
+
export type ErrorCodes = GeneralErrorCodes | InputErrorCodes;
|
|
35
|
+
declare const ErrorCodes: {
|
|
36
|
+
readonly LoginInvalidCredentials: InputErrorCodes.LoginInvalidCredentials;
|
|
37
|
+
readonly LoginInvalidEmail: InputErrorCodes.LoginInvalidEmail;
|
|
38
|
+
readonly LoginInvalidOrUsedEmail: InputErrorCodes.LoginInvalidOrUsedEmail;
|
|
39
|
+
readonly GenericUnknown: GeneralErrorCodes.GenericUnknown;
|
|
40
|
+
readonly GenericInternalError: GeneralErrorCodes.GenericInternalError;
|
|
41
|
+
readonly GenericValidationFailed: GeneralErrorCodes.GenericValidationFailed;
|
|
42
|
+
readonly GenericParseFailed: GeneralErrorCodes.GenericParseFailed;
|
|
43
|
+
readonly GenericNotFound: GeneralErrorCodes.GenericNotFound;
|
|
44
|
+
readonly CommonInvalidRequest: GeneralErrorCodes.CommonInvalidRequest;
|
|
45
|
+
readonly CommonUnableToProcessRequest: GeneralErrorCodes.CommonUnableToProcessRequest;
|
|
46
|
+
readonly CommonInvalidFieldsLength: GeneralErrorCodes.CommonInvalidFieldsLength;
|
|
47
|
+
readonly CommonRateLimitExceeded: GeneralErrorCodes.CommonRateLimitExceeded;
|
|
48
|
+
readonly CommonUnableToSaveToDatabase: GeneralErrorCodes.CommonUnableToSaveToDatabase;
|
|
49
|
+
readonly AuthInvalidToken: GeneralErrorCodes.AuthInvalidToken;
|
|
50
|
+
readonly AuthInvalidAPIToken: GeneralErrorCodes.AuthInvalidAPIToken;
|
|
51
|
+
readonly AuthInvalidCaptchaToken: GeneralErrorCodes.AuthInvalidCaptchaToken;
|
|
52
|
+
readonly AuthUnauthorized: GeneralErrorCodes.AuthUnauthorized;
|
|
53
|
+
readonly AuthUserBanned: GeneralErrorCodes.AuthUserBanned;
|
|
54
|
+
readonly Oauth2InvalidCode: GeneralErrorCodes.Oauth2InvalidCode;
|
|
55
|
+
readonly Oauth2InvalidScope: GeneralErrorCodes.Oauth2InvalidScope;
|
|
56
|
+
readonly Oauth2TokenInvalid: GeneralErrorCodes.Oauth2TokenInvalid;
|
|
57
|
+
readonly Oauth2UnableToFetchUser: GeneralErrorCodes.Oauth2UnableToFetchUser;
|
|
58
|
+
readonly Oauth2UnableToFetchConnections: GeneralErrorCodes.Oauth2UnableToFetchConnections;
|
|
59
|
+
readonly Oauth2UserWithoutConnection: GeneralErrorCodes.Oauth2UserWithoutConnection;
|
|
60
|
+
readonly Oauth2ConnectionNotVerified: GeneralErrorCodes.Oauth2ConnectionNotVerified;
|
|
61
|
+
readonly ReleaseNotFound: GeneralErrorCodes.ReleaseNotFound;
|
|
62
|
+
readonly ReleaseVersionAlreadyExists: GeneralErrorCodes.ReleaseVersionAlreadyExists;
|
|
63
|
+
};
|
|
3
64
|
declare enum ErrorTypes {
|
|
4
65
|
General = "general",
|
|
5
66
|
Input = "input"
|
|
6
67
|
}
|
|
7
68
|
declare const errorMap: {
|
|
69
|
+
readonly "net.fnlb.errors.generic.unknown": {
|
|
70
|
+
readonly type: ErrorTypes.General;
|
|
71
|
+
readonly message: "An unknown error occurred. This may be due to an unexpected condition in the server.";
|
|
72
|
+
};
|
|
73
|
+
readonly "net.fnlb.errors.generic.internal_error": {
|
|
74
|
+
readonly type: ErrorTypes.General;
|
|
75
|
+
readonly message: "An internal server error occurred. This may be due to an unhandled exception. Please try again.";
|
|
76
|
+
};
|
|
77
|
+
readonly "net.fnlb.errors.generic.validation_failed": {
|
|
78
|
+
readonly type: ErrorTypes.General;
|
|
79
|
+
readonly message: "Validation of the request data failed.";
|
|
80
|
+
};
|
|
81
|
+
readonly "net.fnlb.errors.generic.parse_failed": {
|
|
82
|
+
readonly type: ErrorTypes.General;
|
|
83
|
+
readonly message: "The request could not be parsed. This may be due to a malformed input or an unsupported data format.";
|
|
84
|
+
};
|
|
85
|
+
readonly "net.fnlb.errors.generic.not_found": {
|
|
86
|
+
readonly type: ErrorTypes.General;
|
|
87
|
+
readonly message: "The requested resource does not exist.";
|
|
88
|
+
};
|
|
8
89
|
readonly "net.fnlb.errors.common.invalid_request": {
|
|
9
90
|
readonly type: ErrorTypes.General;
|
|
10
91
|
readonly message: "The request is not valid.";
|
|
@@ -94,30 +175,6 @@ declare const errorMap: {
|
|
|
94
175
|
readonly message: "Release version already exists.";
|
|
95
176
|
};
|
|
96
177
|
};
|
|
97
|
-
declare enum ErrorCodes {
|
|
98
|
-
CommonInvalidRequest = "net.fnlb.errors.common.invalid_request",
|
|
99
|
-
CommonUnableToProcessRequest = "net.fnlb.errors.common.unable_to_process_request",
|
|
100
|
-
CommonInvalidFieldsLength = "net.fnlb.errors.common.invalid_body_fields_length",
|
|
101
|
-
CommonRateLimitExceeded = "net.fnlb.errors.common.rate_limit_exceeded",
|
|
102
|
-
CommonUnableToSaveToDatabase = "net.fnlb.errors.common.unable_to_save_to_database",
|
|
103
|
-
AuthInvalidToken = "net.fnlb.errors.auth.invalid_token",
|
|
104
|
-
AuthInvalidAPIToken = "net.fnlb.errors.auth.invalid_api_token",
|
|
105
|
-
AuthInvalidCaptchaToken = "net.fnlb.errors.auth.invalid_captcha_token",
|
|
106
|
-
AuthUnauthorized = "net.fnlb.errors.auth.unauthorized",
|
|
107
|
-
AuthUserBanned = "net.fnlb.errors.auth.user_banned",
|
|
108
|
-
LoginInvalidCredentials = "net.fnlb.errors.login.invalid_credentials",
|
|
109
|
-
LoginInvalidEmail = "net.fnlb.errors.login.invalid_email",
|
|
110
|
-
LoginInvalidOrUsedEmail = "net.fnlb.errors.login.invalid_or_used_email",
|
|
111
|
-
Oauth2InvalidCode = "net.fnlb.errors.oauth2.invalid_code",
|
|
112
|
-
Oauth2InvalidScope = "net.fnlb.errors.oauth2.invalid_scope",
|
|
113
|
-
Oauth2TokenInvalid = "net.fnlb.errors.oauth2.token_invalid",
|
|
114
|
-
Oauth2UnableToFetchUser = "net.fnlb.errors.oauth2.unable_to_fetch_user",
|
|
115
|
-
Oauth2UnableToFetchConnections = "net.fnlb.errors.oauth2.unable_to_fetch_connections",
|
|
116
|
-
Oauth2UserWithoutConnection = "net.fnlb.errors.oauth2.user_without_connection",
|
|
117
|
-
Oauth2ConnectionNotVerified = "net.fnlb.errors.oauth2.connection_not_verified",
|
|
118
|
-
ReleaseNotFound = "net.fnlb.errors.release.no_release_found",
|
|
119
|
-
ReleaseVersionAlreadyExists = "net.fnlb.errors.release.version_already_exists"
|
|
120
|
-
}
|
|
121
178
|
export declare abstract class ErrorHandler {
|
|
122
179
|
static getError<T extends ErrorCodes>(error: T): (typeof errorMap)[T];
|
|
123
180
|
}
|
package/dist/errors/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var t;((n)=>{n.GenericUnknown="net.fnlb.errors.generic.unknown";n.GenericInternalError="net.fnlb.errors.generic.internal_error";n.GenericValidationFailed="net.fnlb.errors.generic.validation_failed";n.GenericParseFailed="net.fnlb.errors.generic.parse_failed";n.GenericNotFound="net.fnlb.errors.generic.not_found";n.CommonInvalidRequest="net.fnlb.errors.common.invalid_request";n.CommonUnableToProcessRequest="net.fnlb.errors.common.unable_to_process_request";n.CommonInvalidFieldsLength="net.fnlb.errors.common.invalid_body_fields_length";n.CommonRateLimitExceeded="net.fnlb.errors.common.rate_limit_exceeded";n.CommonUnableToSaveToDatabase="net.fnlb.errors.common.unable_to_save_to_database";n.AuthInvalidToken="net.fnlb.errors.auth.invalid_token";n.AuthInvalidAPIToken="net.fnlb.errors.auth.invalid_api_token";n.AuthInvalidCaptchaToken="net.fnlb.errors.auth.invalid_captcha_token";n.AuthUnauthorized="net.fnlb.errors.auth.unauthorized";n.AuthUserBanned="net.fnlb.errors.auth.user_banned";n.Oauth2InvalidCode="net.fnlb.errors.oauth2.invalid_code";n.Oauth2InvalidScope="net.fnlb.errors.oauth2.invalid_scope";n.Oauth2TokenInvalid="net.fnlb.errors.oauth2.token_invalid";n.Oauth2UnableToFetchUser="net.fnlb.errors.oauth2.unable_to_fetch_user";n.Oauth2UnableToFetchConnections="net.fnlb.errors.oauth2.unable_to_fetch_connections";n.Oauth2UserWithoutConnection="net.fnlb.errors.oauth2.user_without_connection";n.Oauth2ConnectionNotVerified="net.fnlb.errors.oauth2.connection_not_verified";n.ReleaseNotFound="net.fnlb.errors.release.no_release_found";n.ReleaseVersionAlreadyExists="net.fnlb.errors.release.version_already_exists"})(t||={});var o;((a)=>{a.LoginInvalidCredentials="net.fnlb.errors.login.invalid_credentials";a.LoginInvalidEmail="net.fnlb.errors.login.invalid_email";a.LoginInvalidOrUsedEmail="net.fnlb.errors.login.invalid_or_used_email"})(o||={});var e={...t,...o};var i={[e.GenericUnknown]:{type:"general",message:"An unknown error occurred. This may be due to an unexpected condition in the server."},[e.GenericInternalError]:{type:"general",message:"An internal server error occurred. This may be due to an unhandled exception. Please try again."},[e.GenericValidationFailed]:{type:"general",message:"Validation of the request data failed."},[e.GenericParseFailed]:{type:"general",message:"The request could not be parsed. This may be due to a malformed input or an unsupported data format."},[e.GenericNotFound]:{type:"general",message:"The requested resource does not exist."},[e.CommonInvalidRequest]:{type:"general",message:"The request is not valid."},[e.CommonUnableToProcessRequest]:{type:"general",message:"Unable to process the request. Please try again."},[e.CommonInvalidFieldsLength]:{type:"general",message:"The body fields have an invalid length."},[e.CommonRateLimitExceeded]:{type:"general",message:"You are being rate limited."},[e.CommonUnableToSaveToDatabase]:{type:"general",message:"Unable to save changes. Please check all fields."},[e.AuthInvalidToken]:{type:"general",message:"Invalid token provided."},[e.AuthInvalidAPIToken]:{type:"general",message:"Invalid API token provided."},[e.AuthInvalidCaptchaToken]:{type:"general",message:"Sorry, the captcha was not resolved correctly. Please try again."},[e.AuthUnauthorized]:{type:"general",message:"You are not authorized to perform this action."},[e.AuthUserBanned]:{type:"general",message:"Your account is banned from the service."},[e.LoginInvalidCredentials]:{type:"input",message:"The email or password is incorrect"},[e.LoginInvalidEmail]:{type:"input",message:"The email is invalid."},[e.LoginInvalidOrUsedEmail]:{type:"input",message:"The email is invalid or is already used."},[e.Oauth2InvalidCode]:{type:"general",message:"Unable to verify your request at this moment. Please try again later."},[e.Oauth2InvalidScope]:{type:"general",message:"Invalid scope provided."},[e.Oauth2TokenInvalid]:{type:"general",message:"Unable to verify Oauth2 token. Please try again later."},[e.Oauth2UnableToFetchUser]:{type:"general",message:"Unable to obtain user information. Please try again later."},[e.Oauth2UnableToFetchConnections]:{type:"general",message:"Unable to obtain user connections. Please try again later."},[e.Oauth2UserWithoutConnection]:{type:"general",message:"User does not have connections. Please try again later."},[e.Oauth2ConnectionNotVerified]:{type:"general",message:"User does have a connection, but the connection is not verified. Please try again later."},[e.ReleaseNotFound]:{type:"general",message:"Sorry, no release found. Please try again later."},[e.ReleaseVersionAlreadyExists]:{type:"general",message:"Release version already exists."}};class r{static getError(s){return i[s]}}export{r as ErrorHandler};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -46,101 +46,12 @@ export declare enum CategoryConfigTriggerAction {
|
|
|
46
46
|
Blacklist = 10,
|
|
47
47
|
Whitelist = 11
|
|
48
48
|
}
|
|
49
|
-
export declare enum
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
readonly type: ErrorTypes.General;
|
|
56
|
-
readonly message: "The request is not valid.";
|
|
57
|
-
};
|
|
58
|
-
readonly "net.fnlb.errors.common.unable_to_process_request": {
|
|
59
|
-
readonly type: ErrorTypes.General;
|
|
60
|
-
readonly message: "Unable to process the request. Please try again.";
|
|
61
|
-
};
|
|
62
|
-
readonly "net.fnlb.errors.common.invalid_body_fields_length": {
|
|
63
|
-
readonly type: ErrorTypes.General;
|
|
64
|
-
readonly message: "The body fields have an invalid length.";
|
|
65
|
-
};
|
|
66
|
-
readonly "net.fnlb.errors.common.rate_limit_exceeded": {
|
|
67
|
-
readonly type: ErrorTypes.General;
|
|
68
|
-
readonly message: "You are being rate limited.";
|
|
69
|
-
};
|
|
70
|
-
readonly "net.fnlb.errors.common.unable_to_save_to_database": {
|
|
71
|
-
readonly type: ErrorTypes.General;
|
|
72
|
-
readonly message: "Unable to save changes. Please check all fields.";
|
|
73
|
-
};
|
|
74
|
-
readonly "net.fnlb.errors.auth.invalid_token": {
|
|
75
|
-
readonly type: ErrorTypes.General;
|
|
76
|
-
readonly message: "Invalid token provided.";
|
|
77
|
-
};
|
|
78
|
-
readonly "net.fnlb.errors.auth.invalid_api_token": {
|
|
79
|
-
readonly type: ErrorTypes.General;
|
|
80
|
-
readonly message: "Invalid API token provided.";
|
|
81
|
-
};
|
|
82
|
-
readonly "net.fnlb.errors.auth.invalid_captcha_token": {
|
|
83
|
-
readonly type: ErrorTypes.General;
|
|
84
|
-
readonly message: "Sorry, the captcha was not resolved correctly. Please try again.";
|
|
85
|
-
};
|
|
86
|
-
readonly "net.fnlb.errors.auth.unauthorized": {
|
|
87
|
-
readonly type: ErrorTypes.General;
|
|
88
|
-
readonly message: "You are not authorized to perform this action.";
|
|
89
|
-
};
|
|
90
|
-
readonly "net.fnlb.errors.auth.user_banned": {
|
|
91
|
-
readonly type: ErrorTypes.General;
|
|
92
|
-
readonly message: "Your account is banned from the service.";
|
|
93
|
-
};
|
|
94
|
-
readonly "net.fnlb.errors.login.invalid_credentials": {
|
|
95
|
-
readonly type: ErrorTypes.Input;
|
|
96
|
-
readonly message: "The email or password is incorrect";
|
|
97
|
-
};
|
|
98
|
-
readonly "net.fnlb.errors.login.invalid_email": {
|
|
99
|
-
readonly type: ErrorTypes.Input;
|
|
100
|
-
readonly message: "The email is invalid.";
|
|
101
|
-
};
|
|
102
|
-
readonly "net.fnlb.errors.login.invalid_or_used_email": {
|
|
103
|
-
readonly type: ErrorTypes.Input;
|
|
104
|
-
readonly message: "The email is invalid or is already used.";
|
|
105
|
-
};
|
|
106
|
-
readonly "net.fnlb.errors.oauth2.invalid_code": {
|
|
107
|
-
readonly type: ErrorTypes.General;
|
|
108
|
-
readonly message: "Unable to verify your request at this moment. Please try again later.";
|
|
109
|
-
};
|
|
110
|
-
readonly "net.fnlb.errors.oauth2.invalid_scope": {
|
|
111
|
-
readonly type: ErrorTypes.General;
|
|
112
|
-
readonly message: "Invalid scope provided.";
|
|
113
|
-
};
|
|
114
|
-
readonly "net.fnlb.errors.oauth2.token_invalid": {
|
|
115
|
-
readonly type: ErrorTypes.General;
|
|
116
|
-
readonly message: "Unable to verify Oauth2 token. Please try again later.";
|
|
117
|
-
};
|
|
118
|
-
readonly "net.fnlb.errors.oauth2.unable_to_fetch_user": {
|
|
119
|
-
readonly type: ErrorTypes.General;
|
|
120
|
-
readonly message: "Unable to obtain user information. Please try again later.";
|
|
121
|
-
};
|
|
122
|
-
readonly "net.fnlb.errors.oauth2.unable_to_fetch_connections": {
|
|
123
|
-
readonly type: ErrorTypes.General;
|
|
124
|
-
readonly message: "Unable to obtain user connections. Please try again later.";
|
|
125
|
-
};
|
|
126
|
-
readonly "net.fnlb.errors.oauth2.user_without_connection": {
|
|
127
|
-
readonly type: ErrorTypes.General;
|
|
128
|
-
readonly message: "User does not have connections. Please try again later.";
|
|
129
|
-
};
|
|
130
|
-
readonly "net.fnlb.errors.oauth2.connection_not_verified": {
|
|
131
|
-
readonly type: ErrorTypes.General;
|
|
132
|
-
readonly message: "User does have a connection, but the connection is not verified. Please try again later.";
|
|
133
|
-
};
|
|
134
|
-
readonly "net.fnlb.errors.release.no_release_found": {
|
|
135
|
-
readonly type: ErrorTypes.General;
|
|
136
|
-
readonly message: "Sorry, no release found. Please try again later.";
|
|
137
|
-
};
|
|
138
|
-
readonly "net.fnlb.errors.release.version_already_exists": {
|
|
139
|
-
readonly type: ErrorTypes.General;
|
|
140
|
-
readonly message: "Release version already exists.";
|
|
141
|
-
};
|
|
142
|
-
};
|
|
143
|
-
export declare enum ErrorCodes {
|
|
49
|
+
export declare enum GeneralErrorCodes {
|
|
50
|
+
GenericUnknown = "net.fnlb.errors.generic.unknown",
|
|
51
|
+
GenericInternalError = "net.fnlb.errors.generic.internal_error",
|
|
52
|
+
GenericValidationFailed = "net.fnlb.errors.generic.validation_failed",
|
|
53
|
+
GenericParseFailed = "net.fnlb.errors.generic.parse_failed",
|
|
54
|
+
GenericNotFound = "net.fnlb.errors.generic.not_found",
|
|
144
55
|
CommonInvalidRequest = "net.fnlb.errors.common.invalid_request",
|
|
145
56
|
CommonUnableToProcessRequest = "net.fnlb.errors.common.unable_to_process_request",
|
|
146
57
|
CommonInvalidFieldsLength = "net.fnlb.errors.common.invalid_body_fields_length",
|
|
@@ -151,9 +62,6 @@ export declare enum ErrorCodes {
|
|
|
151
62
|
AuthInvalidCaptchaToken = "net.fnlb.errors.auth.invalid_captcha_token",
|
|
152
63
|
AuthUnauthorized = "net.fnlb.errors.auth.unauthorized",
|
|
153
64
|
AuthUserBanned = "net.fnlb.errors.auth.user_banned",
|
|
154
|
-
LoginInvalidCredentials = "net.fnlb.errors.login.invalid_credentials",
|
|
155
|
-
LoginInvalidEmail = "net.fnlb.errors.login.invalid_email",
|
|
156
|
-
LoginInvalidOrUsedEmail = "net.fnlb.errors.login.invalid_or_used_email",
|
|
157
65
|
Oauth2InvalidCode = "net.fnlb.errors.oauth2.invalid_code",
|
|
158
66
|
Oauth2InvalidScope = "net.fnlb.errors.oauth2.invalid_scope",
|
|
159
67
|
Oauth2TokenInvalid = "net.fnlb.errors.oauth2.token_invalid",
|
|
@@ -164,22 +72,51 @@ export declare enum ErrorCodes {
|
|
|
164
72
|
ReleaseNotFound = "net.fnlb.errors.release.no_release_found",
|
|
165
73
|
ReleaseVersionAlreadyExists = "net.fnlb.errors.release.version_already_exists"
|
|
166
74
|
}
|
|
167
|
-
export
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
export type
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
75
|
+
export declare enum InputErrorCodes {
|
|
76
|
+
LoginInvalidCredentials = "net.fnlb.errors.login.invalid_credentials",
|
|
77
|
+
LoginInvalidEmail = "net.fnlb.errors.login.invalid_email",
|
|
78
|
+
LoginInvalidOrUsedEmail = "net.fnlb.errors.login.invalid_or_used_email"
|
|
79
|
+
}
|
|
80
|
+
export type ErrorCodes = GeneralErrorCodes | InputErrorCodes;
|
|
81
|
+
export declare const ErrorCodes: {
|
|
82
|
+
readonly LoginInvalidCredentials: InputErrorCodes.LoginInvalidCredentials;
|
|
83
|
+
readonly LoginInvalidEmail: InputErrorCodes.LoginInvalidEmail;
|
|
84
|
+
readonly LoginInvalidOrUsedEmail: InputErrorCodes.LoginInvalidOrUsedEmail;
|
|
85
|
+
readonly GenericUnknown: GeneralErrorCodes.GenericUnknown;
|
|
86
|
+
readonly GenericInternalError: GeneralErrorCodes.GenericInternalError;
|
|
87
|
+
readonly GenericValidationFailed: GeneralErrorCodes.GenericValidationFailed;
|
|
88
|
+
readonly GenericParseFailed: GeneralErrorCodes.GenericParseFailed;
|
|
89
|
+
readonly GenericNotFound: GeneralErrorCodes.GenericNotFound;
|
|
90
|
+
readonly CommonInvalidRequest: GeneralErrorCodes.CommonInvalidRequest;
|
|
91
|
+
readonly CommonUnableToProcessRequest: GeneralErrorCodes.CommonUnableToProcessRequest;
|
|
92
|
+
readonly CommonInvalidFieldsLength: GeneralErrorCodes.CommonInvalidFieldsLength;
|
|
93
|
+
readonly CommonRateLimitExceeded: GeneralErrorCodes.CommonRateLimitExceeded;
|
|
94
|
+
readonly CommonUnableToSaveToDatabase: GeneralErrorCodes.CommonUnableToSaveToDatabase;
|
|
95
|
+
readonly AuthInvalidToken: GeneralErrorCodes.AuthInvalidToken;
|
|
96
|
+
readonly AuthInvalidAPIToken: GeneralErrorCodes.AuthInvalidAPIToken;
|
|
97
|
+
readonly AuthInvalidCaptchaToken: GeneralErrorCodes.AuthInvalidCaptchaToken;
|
|
98
|
+
readonly AuthUnauthorized: GeneralErrorCodes.AuthUnauthorized;
|
|
99
|
+
readonly AuthUserBanned: GeneralErrorCodes.AuthUserBanned;
|
|
100
|
+
readonly Oauth2InvalidCode: GeneralErrorCodes.Oauth2InvalidCode;
|
|
101
|
+
readonly Oauth2InvalidScope: GeneralErrorCodes.Oauth2InvalidScope;
|
|
102
|
+
readonly Oauth2TokenInvalid: GeneralErrorCodes.Oauth2TokenInvalid;
|
|
103
|
+
readonly Oauth2UnableToFetchUser: GeneralErrorCodes.Oauth2UnableToFetchUser;
|
|
104
|
+
readonly Oauth2UnableToFetchConnections: GeneralErrorCodes.Oauth2UnableToFetchConnections;
|
|
105
|
+
readonly Oauth2UserWithoutConnection: GeneralErrorCodes.Oauth2UserWithoutConnection;
|
|
106
|
+
readonly Oauth2ConnectionNotVerified: GeneralErrorCodes.Oauth2ConnectionNotVerified;
|
|
107
|
+
readonly ReleaseNotFound: GeneralErrorCodes.ReleaseNotFound;
|
|
108
|
+
readonly ReleaseVersionAlreadyExists: GeneralErrorCodes.ReleaseVersionAlreadyExists;
|
|
109
|
+
};
|
|
177
110
|
export declare enum ErrorInputTypes {
|
|
178
111
|
Username = "username",
|
|
179
112
|
Email = "email",
|
|
180
113
|
Password = "password",
|
|
181
114
|
Shared = "shared"
|
|
182
115
|
}
|
|
116
|
+
export declare enum ErrorTypes {
|
|
117
|
+
General = "general",
|
|
118
|
+
Input = "input"
|
|
119
|
+
}
|
|
183
120
|
export declare enum Locales {
|
|
184
121
|
Default = "en",
|
|
185
122
|
De = "de",
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var d;((m)=>{m[m.Public=0]="Public";m[m.Private=1]="Private"})(d||={});var v;((_)=>{_[_.Offline=0]="Offline";_[_.Booting=1]="Booting";_[_.Available=2]="Available";_[_.Busy=3]="Busy";_[_.Disconnected=4]="Disconnected"})(v||={});var x;((u)=>{u.Win="WIN";u.Mac="MAC";u.Psn="PSN";u.Xbl="XBL";u.Swt="SWT";u.Ios="IOS";u.And="AND";u.Ps5="PS5";u.Xsx="XSX"})(x||={});var f;((m)=>{m[m.Public=0]="Public";m[m.Private=1]="Private"})(f||={});var p;((e)=>{e[e.Equals=0]="Equals";e[e.Includes=1]="Includes";e[e.StartsWith=2]="StartsWith";e[e.EndsWith=3]="EndsWith"})(p||={});var U;((n)=>{n[n.ChatBan=0]="ChatBan";n[n.Kick=1]="Kick";n[n.Block=2]="Block";n[n.RemoveFriend=3]="RemoveFriend";n[n.AddFriend=4]="AddFriend";n[n.Promote=5]="Promote";n[n.Copy=6]="Copy";n[n.Mimic=7]="Mimic";n[n.Hide=8]="Hide";n[n.Show=9]="Show";n[n.Blacklist=10]="Blacklist";n[n.Whitelist=11]="Whitelist"})(U||={});var h;((l)=>{l.GenericUnknown="net.fnlb.errors.generic.unknown";l.GenericInternalError="net.fnlb.errors.generic.internal_error";l.GenericValidationFailed="net.fnlb.errors.generic.validation_failed";l.GenericParseFailed="net.fnlb.errors.generic.parse_failed";l.GenericNotFound="net.fnlb.errors.generic.not_found";l.CommonInvalidRequest="net.fnlb.errors.common.invalid_request";l.CommonUnableToProcessRequest="net.fnlb.errors.common.unable_to_process_request";l.CommonInvalidFieldsLength="net.fnlb.errors.common.invalid_body_fields_length";l.CommonRateLimitExceeded="net.fnlb.errors.common.rate_limit_exceeded";l.CommonUnableToSaveToDatabase="net.fnlb.errors.common.unable_to_save_to_database";l.AuthInvalidToken="net.fnlb.errors.auth.invalid_token";l.AuthInvalidAPIToken="net.fnlb.errors.auth.invalid_api_token";l.AuthInvalidCaptchaToken="net.fnlb.errors.auth.invalid_captcha_token";l.AuthUnauthorized="net.fnlb.errors.auth.unauthorized";l.AuthUserBanned="net.fnlb.errors.auth.user_banned";l.Oauth2InvalidCode="net.fnlb.errors.oauth2.invalid_code";l.Oauth2InvalidScope="net.fnlb.errors.oauth2.invalid_scope";l.Oauth2TokenInvalid="net.fnlb.errors.oauth2.token_invalid";l.Oauth2UnableToFetchUser="net.fnlb.errors.oauth2.unable_to_fetch_user";l.Oauth2UnableToFetchConnections="net.fnlb.errors.oauth2.unable_to_fetch_connections";l.Oauth2UserWithoutConnection="net.fnlb.errors.oauth2.user_without_connection";l.Oauth2ConnectionNotVerified="net.fnlb.errors.oauth2.connection_not_verified";l.ReleaseNotFound="net.fnlb.errors.release.no_release_found";l.ReleaseVersionAlreadyExists="net.fnlb.errors.release.version_already_exists"})(h||={});var s;((a)=>{a.LoginInvalidCredentials="net.fnlb.errors.login.invalid_credentials";a.LoginInvalidEmail="net.fnlb.errors.login.invalid_email";a.LoginInvalidOrUsedEmail="net.fnlb.errors.login.invalid_or_used_email"})(s||={});var c={...h,...s};var k;((e)=>{e.Username="username";e.Email="email";e.Password="password";e.Shared="shared"})(k||={});var t;((m)=>{m.General="general";m.Input="input"})(t||={});var I;((b)=>{b.Default="en";b.De="de";b.Es="es";b.Fr="fr";b.It="it";b.Pl="pl";b.Pt="pt";b.Tr="tr"})(I||={});export{I as Locales,s as InputErrorCodes,h as GeneralErrorCodes,t as ErrorTypes,k as ErrorInputTypes,c as ErrorCodes,p as CategoryConfigTriggerStringDetectionMethod,U as CategoryConfigTriggerAction,x as CategoryConfigSupportedPlatforms,f as CategoryConfigPartyPrivacy,d as BotTypes,v as BotStatus};
|