@ifunny/ifunny-api-types 0.7.13 → 0.8.0
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/CHANGELOG.md +91 -431
- package/dist/rest/counters.js +3 -0
- package/dist/rest/counters.js.map +1 -0
- package/dist/rest/endpoints.js +2 -2
- package/dist/rest/endpoints.js.map +1 -1
- package/dist/{payloads/util.js → rest/feeds.js} +1 -1
- package/dist/rest/feeds.js.map +1 -0
- package/package.json +9 -8
- package/types/rest/counters.d.ts +10 -0
- package/types/rest/counters.d.ts.map +1 -0
- package/types/rest/endpoints.d.ts +2 -2
- package/types/rest/endpoints.d.ts.map +1 -1
- package/types/rest/feeds.d.ts +17 -0
- package/types/rest/feeds.d.ts.map +1 -0
- package/dist/index.d.ts +0 -376
- package/dist/index.d.ts.map +0 -1
- package/dist/payloads/post.js +0 -157
- package/dist/payloads/post.js.map +0 -1
- package/dist/payloads/util.js.map +0 -1
- package/dist/rest/post.js +0 -63
- package/dist/rest/post.js.map +0 -1
- package/dist/utils/errors.js +0 -48
- package/dist/utils/errors.js.map +0 -1
- package/types/payloads/post.d.ts +0 -542
- package/types/payloads/post.d.ts.map +0 -1
- package/types/payloads/util.d.ts +0 -18
- package/types/payloads/util.d.ts.map +0 -1
- package/types/rest/post.d.ts +0 -58
- package/types/rest/post.d.ts.map +0 -1
- package/types/utils/errors.d.ts +0 -89
- package/types/utils/errors.d.ts.map +0 -1
package/types/utils/errors.d.ts
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Thrown when trying to login with invalid email or password
|
|
3
|
-
*/
|
|
4
|
-
export interface RESTAPIError {
|
|
5
|
-
error: RESTAPIiFunnyError;
|
|
6
|
-
error_description: string;
|
|
7
|
-
status: 400 | 401 | 403 | 404 | 500;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* This is thrown when you need to solve a captcha to complete the request.
|
|
11
|
-
*/
|
|
12
|
-
export interface RESTAPICaptchaError extends RESTAPIError {
|
|
13
|
-
error: IFUNNY_ERRORS.CAPTCHA_REQUIRED;
|
|
14
|
-
error_description: "Human verification is required";
|
|
15
|
-
data: {
|
|
16
|
-
/**
|
|
17
|
-
* Open this url in any browser, solve it, then make the exact same request again.
|
|
18
|
-
*/
|
|
19
|
-
captcha_url: string;
|
|
20
|
-
type: CaptchaType;
|
|
21
|
-
};
|
|
22
|
-
status: 403;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Returned when an email is invalid
|
|
26
|
-
*/
|
|
27
|
-
export interface RESTAPIInvalidEmailError {
|
|
28
|
-
error: IFUNNY_ERRORS.INVALID_EMAIL;
|
|
29
|
-
error_description: string;
|
|
30
|
-
status: 403;
|
|
31
|
-
}
|
|
32
|
-
export interface RESTAPIEmailExistsError {
|
|
33
|
-
error: IFUNNY_ERRORS.EMAIL_EXISTS;
|
|
34
|
-
error_description: string;
|
|
35
|
-
status: 403;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Known captcha types
|
|
39
|
-
*/
|
|
40
|
-
declare enum CaptchaTypes {
|
|
41
|
-
FUN_CAPTCHA = "fun_captcha",
|
|
42
|
-
RECAPTCHA = "recaptcha"
|
|
43
|
-
}
|
|
44
|
-
declare type CaptchaType = `${CaptchaTypes}`;
|
|
45
|
-
/**
|
|
46
|
-
* Returns when the request throws an error.
|
|
47
|
-
*/
|
|
48
|
-
export declare type RESTAPIErrorResponse = RESTAPICaptchaError | RESTAPIInvalidEmailError | RESTAPIEmailExistsError | RESTAPIError;
|
|
49
|
-
/**
|
|
50
|
-
* Possible iFunny Errors
|
|
51
|
-
*/
|
|
52
|
-
export declare type RESTAPIiFunnyError = `${IFUNNY_ERRORS}`;
|
|
53
|
-
/**
|
|
54
|
-
* All known error types
|
|
55
|
-
*/
|
|
56
|
-
export declare enum IFUNNY_ERRORS {
|
|
57
|
-
ALREADY_REPUBLISHED = "already_republished",
|
|
58
|
-
ALREADY_SMILED = "already_smiled",
|
|
59
|
-
ALREADY_UNSMILED = "already_unsmiled",
|
|
60
|
-
BAD_REQUEST = "bad_request",
|
|
61
|
-
CAPTCHA_REQUIRED = "captcha_required",
|
|
62
|
-
CONTENT_WAS_DELETED = "content_was_deleted",
|
|
63
|
-
EMAIL_EXISTS = "email_exists",
|
|
64
|
-
EMAIL_NOT_CONFIRMED = "email_not_confirmed",
|
|
65
|
-
ENTITY_ABUSED = "entity_abused",
|
|
66
|
-
FORBIDDEN_FOR_BANNED = "forbidden_for_banned",
|
|
67
|
-
FORBIDDEN_FOR_DELETED = "forbidden_for_deactivated",
|
|
68
|
-
INVALID_CLIENT = "invalid_client",
|
|
69
|
-
INVALID_EMAIL = "invalid_email",
|
|
70
|
-
INVALID_GRANT = "invalid_grant",
|
|
71
|
-
NOT_REPUBLISHED = "not_republished",
|
|
72
|
-
NOT_SMILED = "not_smiled",
|
|
73
|
-
NOT_UNSMILED = "not_unsmiled",
|
|
74
|
-
PINNED_LIMIT_EXCEEDED = "profile_pins_to_many_pins_error",
|
|
75
|
-
PUBLISHING_TIMEOUT = "publishing_timeout",
|
|
76
|
-
QUERY_TOO_SHORT = "query_too_short",
|
|
77
|
-
ROOT_COMMENT_WAS_DELETED = "root_comment_was_deleted",
|
|
78
|
-
SOURCE_IS_UNAVAILABLE = "source_is_unavailable",
|
|
79
|
-
STOP_WORD = "content_tag_stopword",
|
|
80
|
-
TOO_MANY_UPPERCASE = "too_many_uppercase",
|
|
81
|
-
UNACCEPTABLE_SYMBOLS = "unacceptable_symbols",
|
|
82
|
-
UNAUTHORIZED = "unauthorized",
|
|
83
|
-
UNKNOWN_ERROR = "unknown_error",
|
|
84
|
-
UNKNOWN_SOURCE = "unknown_source",
|
|
85
|
-
VIDEO_IS_INVALID = "video_is_invalid",
|
|
86
|
-
YOU_ARE_BLOCKED = "you_are_blocked"
|
|
87
|
-
}
|
|
88
|
-
export {};
|
|
89
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@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