rettiwt-api 2.4.2 → 2.5.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/.eslintrc.js +5 -0
- package/.github/workflows/documentation.yml +1 -1
- package/.github/workflows/publish.yml +1 -1
- package/.prettierrc +1 -1
- package/README.md +69 -19
- package/dist/Rettiwt.d.ts +7 -4
- package/dist/Rettiwt.js +4 -2
- package/dist/Rettiwt.js.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/Auth.d.ts +2 -1
- package/dist/commands/Auth.js +10 -17
- package/dist/commands/Auth.js.map +1 -1
- package/dist/commands/Tweet.js +36 -3
- package/dist/commands/Tweet.js.map +1 -1
- package/dist/enums/{ApiErrors.js → Api.js} +1 -1
- package/dist/enums/Api.js.map +1 -0
- package/dist/enums/Http.d.ts +68 -0
- package/dist/enums/Http.js +73 -0
- package/dist/enums/Http.js.map +1 -0
- package/dist/enums/Logging.d.ts +1 -0
- package/dist/enums/Logging.js +1 -0
- package/dist/enums/Logging.js.map +1 -1
- package/dist/index.d.ts +15 -14
- package/dist/index.js +21 -17
- package/dist/index.js.map +1 -1
- package/dist/models/{public → data}/CursoredData.d.ts +5 -3
- package/dist/models/{public → data}/CursoredData.js +1 -0
- package/dist/models/data/CursoredData.js.map +1 -0
- package/dist/{types/public → models/data}/List.d.ts +8 -1
- package/dist/models/data/List.js.map +1 -0
- package/dist/models/data/Media.d.ts +14 -0
- package/dist/models/data/Media.js +19 -0
- package/dist/models/data/Media.js.map +1 -0
- package/dist/{types/public → models/data}/Tweet.d.ts +26 -8
- package/dist/models/{public → data}/Tweet.js +4 -0
- package/dist/models/data/Tweet.js.map +1 -0
- package/dist/{types/public → models/data}/User.d.ts +8 -1
- package/dist/models/data/User.js.map +1 -0
- package/dist/models/errors/ApiError.d.ts +17 -0
- package/dist/models/errors/ApiError.js +42 -0
- package/dist/models/errors/ApiError.js.map +1 -0
- package/dist/models/errors/HttpError.d.ts +17 -0
- package/dist/models/errors/HttpError.js +42 -0
- package/dist/models/errors/HttpError.js.map +1 -0
- package/dist/models/errors/RettiwtError.d.ts +8 -0
- package/dist/models/errors/RettiwtError.js +34 -0
- package/dist/models/errors/RettiwtError.js.map +1 -0
- package/dist/models/errors/TimeoutError.d.ts +14 -0
- package/dist/models/errors/TimeoutError.js +39 -0
- package/dist/models/errors/TimeoutError.js.map +1 -0
- package/dist/services/internal/ErrorService.d.ts +85 -0
- package/dist/services/internal/ErrorService.js +144 -0
- package/dist/services/internal/ErrorService.js.map +1 -0
- package/dist/services/internal/FetcherService.d.ts +22 -24
- package/dist/services/internal/FetcherService.js +79 -59
- package/dist/services/internal/FetcherService.js.map +1 -1
- package/dist/services/public/AuthService.d.ts +66 -0
- package/dist/services/public/AuthService.js +160 -0
- package/dist/services/public/AuthService.js.map +1 -0
- package/dist/services/public/TweetService.d.ts +27 -8
- package/dist/services/public/TweetService.js +40 -5
- package/dist/services/public/TweetService.js.map +1 -1
- package/dist/services/public/UserService.d.ts +5 -5
- package/dist/services/public/UserService.js.map +1 -1
- package/dist/types/ErrorHandler.d.ts +13 -0
- package/dist/types/{public/User.js → ErrorHandler.js} +1 -1
- package/dist/types/ErrorHandler.js.map +1 -0
- package/dist/types/RettiwtConfig.d.ts +32 -0
- package/dist/types/RettiwtConfig.js.map +1 -0
- package/dist/types/args/TweetMediaArgs.d.ts +15 -0
- package/dist/types/{public/CursoredData.js → args/TweetMediaArgs.js} +1 -1
- package/dist/types/args/TweetMediaArgs.js.map +1 -0
- package/package.json +5 -5
- package/src/Rettiwt.ts +10 -5
- package/src/cli.ts +1 -1
- package/src/commands/Auth.ts +5 -16
- package/src/commands/Tweet.ts +56 -3
- package/src/enums/Http.ts +68 -0
- package/src/enums/Logging.ts +1 -0
- package/src/index.ts +23 -18
- package/src/models/{public → data}/CursoredData.ts +6 -5
- package/src/models/{public → data}/List.ts +14 -4
- package/src/models/data/Media.ts +19 -0
- package/src/models/{public → data}/Tweet.ts +39 -5
- package/src/models/{public → data}/User.ts +28 -4
- package/src/models/errors/ApiError.ts +24 -0
- package/src/models/errors/HttpError.ts +24 -0
- package/src/models/errors/RettiwtError.ts +12 -0
- package/src/models/errors/TimeoutError.ts +18 -0
- package/src/services/internal/ErrorService.ts +158 -0
- package/src/services/internal/FetcherService.ts +94 -80
- package/src/services/public/AuthService.ts +97 -0
- package/src/services/public/TweetService.ts +45 -10
- package/src/services/public/UserService.ts +7 -5
- package/src/types/ErrorHandler.ts +13 -0
- package/src/types/RettiwtConfig.ts +40 -0
- package/src/types/args/TweetMediaArgs.ts +16 -0
- package/dist/enums/ApiErrors.js.map +0 -1
- package/dist/enums/HTTP.d.ts +0 -17
- package/dist/enums/HTTP.js +0 -22
- package/dist/enums/HTTP.js.map +0 -1
- package/dist/models/internal/RettiwtConfig.d.ts +0 -18
- package/dist/models/internal/RettiwtConfig.js +0 -24
- package/dist/models/internal/RettiwtConfig.js.map +0 -1
- package/dist/models/public/CursoredData.js.map +0 -1
- package/dist/models/public/List.d.ts +0 -22
- package/dist/models/public/List.js.map +0 -1
- package/dist/models/public/Tweet.d.ts +0 -62
- package/dist/models/public/Tweet.js.map +0 -1
- package/dist/models/public/User.d.ts +0 -29
- package/dist/models/public/User.js.map +0 -1
- package/dist/types/internal/RettiwtConfig.d.ts +0 -15
- package/dist/types/internal/RettiwtConfig.js.map +0 -1
- package/dist/types/public/CursoredData.d.ts +0 -22
- package/dist/types/public/CursoredData.js.map +0 -1
- package/dist/types/public/List.js +0 -3
- package/dist/types/public/List.js.map +0 -1
- package/dist/types/public/Tweet.js +0 -3
- package/dist/types/public/Tweet.js.map +0 -1
- package/dist/types/public/User.js.map +0 -1
- package/src/enums/HTTP.ts +0 -17
- package/src/models/internal/RettiwtConfig.ts +0 -26
- package/src/types/internal/RettiwtConfig.ts +0 -18
- package/src/types/public/CursoredData.ts +0 -24
- package/src/types/public/List.ts +0 -27
- package/src/types/public/Tweet.ts +0 -86
- package/src/types/public/User.ts +0 -48
- /package/dist/enums/{ApiErrors.d.ts → Api.d.ts} +0 -0
- /package/dist/models/{public → data}/List.js +0 -0
- /package/dist/models/{public → data}/User.js +0 -0
- /package/dist/types/{internal/RettiwtConfig.js → RettiwtConfig.js} +0 -0
- /package/src/enums/{ApiErrors.ts → Api.ts} +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EHttpStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The different types of http status codes
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
var EHttpStatus;
|
|
10
|
+
(function (EHttpStatus) {
|
|
11
|
+
EHttpStatus[EHttpStatus["CONTINUE"] = 100] = "CONTINUE";
|
|
12
|
+
EHttpStatus[EHttpStatus["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS";
|
|
13
|
+
EHttpStatus[EHttpStatus["PROCESSING"] = 102] = "PROCESSING";
|
|
14
|
+
EHttpStatus[EHttpStatus["OK"] = 200] = "OK";
|
|
15
|
+
EHttpStatus[EHttpStatus["CREATED"] = 201] = "CREATED";
|
|
16
|
+
EHttpStatus[EHttpStatus["ACCEPTED"] = 202] = "ACCEPTED";
|
|
17
|
+
EHttpStatus[EHttpStatus["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION";
|
|
18
|
+
EHttpStatus[EHttpStatus["NO_CONTENT"] = 204] = "NO_CONTENT";
|
|
19
|
+
EHttpStatus[EHttpStatus["RESET_CONTENT"] = 205] = "RESET_CONTENT";
|
|
20
|
+
EHttpStatus[EHttpStatus["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT";
|
|
21
|
+
EHttpStatus[EHttpStatus["MULTI_STATUS"] = 207] = "MULTI_STATUS";
|
|
22
|
+
EHttpStatus[EHttpStatus["ALREADY_REPORTED"] = 208] = "ALREADY_REPORTED";
|
|
23
|
+
EHttpStatus[EHttpStatus["IM_USED"] = 226] = "IM_USED";
|
|
24
|
+
EHttpStatus[EHttpStatus["MULTIPLE_CHOICES"] = 300] = "MULTIPLE_CHOICES";
|
|
25
|
+
EHttpStatus[EHttpStatus["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY";
|
|
26
|
+
EHttpStatus[EHttpStatus["FOUND"] = 302] = "FOUND";
|
|
27
|
+
EHttpStatus[EHttpStatus["SEE_OTHER"] = 303] = "SEE_OTHER";
|
|
28
|
+
EHttpStatus[EHttpStatus["NOT_MODIFIED"] = 304] = "NOT_MODIFIED";
|
|
29
|
+
EHttpStatus[EHttpStatus["USE_PROXY"] = 305] = "USE_PROXY";
|
|
30
|
+
EHttpStatus[EHttpStatus["SWITCH_PROXY"] = 306] = "SWITCH_PROXY";
|
|
31
|
+
EHttpStatus[EHttpStatus["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT";
|
|
32
|
+
EHttpStatus[EHttpStatus["PERMANENT_REDIRECT"] = 308] = "PERMANENT_REDIRECT";
|
|
33
|
+
EHttpStatus[EHttpStatus["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
|
34
|
+
EHttpStatus[EHttpStatus["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
|
|
35
|
+
EHttpStatus[EHttpStatus["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
|
|
36
|
+
EHttpStatus[EHttpStatus["FORBIDDEN"] = 403] = "FORBIDDEN";
|
|
37
|
+
EHttpStatus[EHttpStatus["NOT_FOUND"] = 404] = "NOT_FOUND";
|
|
38
|
+
EHttpStatus[EHttpStatus["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
|
|
39
|
+
EHttpStatus[EHttpStatus["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
|
|
40
|
+
EHttpStatus[EHttpStatus["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED";
|
|
41
|
+
EHttpStatus[EHttpStatus["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
|
|
42
|
+
EHttpStatus[EHttpStatus["CONFLICT"] = 409] = "CONFLICT";
|
|
43
|
+
EHttpStatus[EHttpStatus["GONE"] = 410] = "GONE";
|
|
44
|
+
EHttpStatus[EHttpStatus["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED";
|
|
45
|
+
EHttpStatus[EHttpStatus["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
|
|
46
|
+
EHttpStatus[EHttpStatus["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
|
|
47
|
+
EHttpStatus[EHttpStatus["URI_TOO_LONG"] = 414] = "URI_TOO_LONG";
|
|
48
|
+
EHttpStatus[EHttpStatus["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
|
|
49
|
+
EHttpStatus[EHttpStatus["RANGE_NOT_SATISFIABLE"] = 416] = "RANGE_NOT_SATISFIABLE";
|
|
50
|
+
EHttpStatus[EHttpStatus["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED";
|
|
51
|
+
EHttpStatus[EHttpStatus["I_AM_A_TEAPOT"] = 418] = "I_AM_A_TEAPOT";
|
|
52
|
+
EHttpStatus[EHttpStatus["MISDIRECTED_REQUEST"] = 421] = "MISDIRECTED_REQUEST";
|
|
53
|
+
EHttpStatus[EHttpStatus["UNPROCESSABLE_ENTITY"] = 422] = "UNPROCESSABLE_ENTITY";
|
|
54
|
+
EHttpStatus[EHttpStatus["LOCKED"] = 423] = "LOCKED";
|
|
55
|
+
EHttpStatus[EHttpStatus["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY";
|
|
56
|
+
EHttpStatus[EHttpStatus["UPGRADE_REQUIRED"] = 426] = "UPGRADE_REQUIRED";
|
|
57
|
+
EHttpStatus[EHttpStatus["PRECONDITION_REQUIRED"] = 428] = "PRECONDITION_REQUIRED";
|
|
58
|
+
EHttpStatus[EHttpStatus["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
|
59
|
+
EHttpStatus[EHttpStatus["REQUEST_HEADER_FIELDS_TOO_LARGE"] = 431] = "REQUEST_HEADER_FIELDS_TOO_LARGE";
|
|
60
|
+
EHttpStatus[EHttpStatus["UNAVAILABLE_FOR_LEGAL_REASONS"] = 451] = "UNAVAILABLE_FOR_LEGAL_REASONS";
|
|
61
|
+
EHttpStatus[EHttpStatus["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
|
62
|
+
EHttpStatus[EHttpStatus["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
|
|
63
|
+
EHttpStatus[EHttpStatus["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
|
|
64
|
+
EHttpStatus[EHttpStatus["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
|
|
65
|
+
EHttpStatus[EHttpStatus["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
|
|
66
|
+
EHttpStatus[EHttpStatus["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED";
|
|
67
|
+
EHttpStatus[EHttpStatus["VARIANT_ALSO_NEGOTIATES"] = 506] = "VARIANT_ALSO_NEGOTIATES";
|
|
68
|
+
EHttpStatus[EHttpStatus["INSUFFICIENT_STORAGE"] = 507] = "INSUFFICIENT_STORAGE";
|
|
69
|
+
EHttpStatus[EHttpStatus["LOOP_DETECTED"] = 508] = "LOOP_DETECTED";
|
|
70
|
+
EHttpStatus[EHttpStatus["NOT_EXTENDED"] = 510] = "NOT_EXTENDED";
|
|
71
|
+
EHttpStatus[EHttpStatus["NETWORK_AUTHENTICATION_REQUIRED"] = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
|
|
72
|
+
})(EHttpStatus || (exports.EHttpStatus = EHttpStatus = {}));
|
|
73
|
+
//# sourceMappingURL=Http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Http.js","sourceRoot":"","sources":["../../src/enums/Http.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,WA8DX;AA9DD,WAAY,WAAW;IACtB,uDAAc,CAAA;IACd,6EAAyB,CAAA;IACzB,2DAAgB,CAAA;IAChB,2CAAQ,CAAA;IACR,qDAAa,CAAA;IACb,uDAAc,CAAA;IACd,iGAAmC,CAAA;IACnC,2DAAgB,CAAA;IAChB,iEAAmB,CAAA;IACnB,qEAAqB,CAAA;IACrB,+DAAkB,CAAA;IAClB,uEAAsB,CAAA;IACtB,qDAAa,CAAA;IACb,uEAAsB,CAAA;IACtB,yEAAuB,CAAA;IACvB,iDAAW,CAAA;IACX,yDAAe,CAAA;IACf,+DAAkB,CAAA;IAClB,yDAAe,CAAA;IACf,+DAAkB,CAAA;IAClB,2EAAwB,CAAA;IACxB,2EAAwB,CAAA;IACxB,6DAAiB,CAAA;IACjB,+DAAkB,CAAA;IAClB,uEAAsB,CAAA;IACtB,yDAAe,CAAA;IACf,yDAAe,CAAA;IACf,2EAAwB,CAAA;IACxB,mEAAoB,CAAA;IACpB,iGAAmC,CAAA;IACnC,qEAAqB,CAAA;IACrB,uDAAc,CAAA;IACd,+CAAU,CAAA;IACV,qEAAqB,CAAA;IACrB,6EAAyB,CAAA;IACzB,yEAAuB,CAAA;IACvB,+DAAkB,CAAA;IAClB,mFAA4B,CAAA;IAC5B,iFAA2B,CAAA;IAC3B,2EAAwB,CAAA;IACxB,iEAAmB,CAAA;IACnB,6EAAyB,CAAA;IACzB,+EAA0B,CAAA;IAC1B,mDAAY,CAAA;IACZ,yEAAuB,CAAA;IACvB,uEAAsB,CAAA;IACtB,iFAA2B,CAAA;IAC3B,yEAAuB,CAAA;IACvB,qGAAqC,CAAA;IACrC,iGAAmC,CAAA;IACnC,iFAA2B,CAAA;IAC3B,qEAAqB,CAAA;IACrB,6DAAiB,CAAA;IACjB,6EAAyB,CAAA;IACzB,qEAAqB,CAAA;IACrB,2FAAgC,CAAA;IAChC,qFAA6B,CAAA;IAC7B,+EAA0B,CAAA;IAC1B,iEAAmB,CAAA;IACnB,+DAAkB,CAAA;IAClB,qGAAqC,CAAA;AACtC,CAAC,EA9DW,WAAW,2BAAX,WAAW,QA8DtB"}
|
package/dist/enums/Logging.d.ts
CHANGED
package/dist/enums/Logging.js
CHANGED
|
@@ -10,6 +10,7 @@ var ELogActions;
|
|
|
10
10
|
(function (ELogActions) {
|
|
11
11
|
ELogActions["FETCH"] = "FETCH";
|
|
12
12
|
ELogActions["POST"] = "POST";
|
|
13
|
+
ELogActions["UPLOAD"] = "UPLOAD";
|
|
13
14
|
ELogActions["EXTRACT"] = "EXTRACT";
|
|
14
15
|
ELogActions["DESERIALIZE"] = "DESERIALIZE";
|
|
15
16
|
ELogActions["AUTHORIZATION"] = "AUTHORIZATION";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logging.js","sourceRoot":"","sources":["../../src/enums/Logging.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"Logging.js","sourceRoot":"","sources":["../../src/enums/Logging.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,WAOX;AAPD,WAAY,WAAW;IACtB,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,0CAA2B,CAAA;IAC3B,8CAA+B,CAAA;AAChC,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
export * from './Rettiwt';
|
|
2
|
-
export * from './enums/ApiErrors';
|
|
3
|
-
export * from './enums/HTTP';
|
|
4
|
-
export * from './enums/Logging';
|
|
5
|
-
export * from './models/internal/RettiwtConfig';
|
|
6
|
-
export * from './models/public/CursoredData';
|
|
7
|
-
export * from './models/public/List';
|
|
8
|
-
export * from './models/public/Tweet';
|
|
9
|
-
export * from './models/public/User';
|
|
10
2
|
export { TweetFilter } from 'rettiwt-core';
|
|
3
|
+
export * from './enums/Api';
|
|
4
|
+
export * from './enums/Http';
|
|
5
|
+
export * from './enums/Logging';
|
|
6
|
+
export * from './models/errors/ApiError';
|
|
7
|
+
export * from './models/errors/HttpError';
|
|
8
|
+
export * from './models/errors/RettiwtError';
|
|
9
|
+
export * from './models/data/CursoredData';
|
|
10
|
+
export * from './models/data/List';
|
|
11
|
+
export * from './models/data/Tweet';
|
|
12
|
+
export * from './models/data/User';
|
|
13
|
+
export * from './services/internal/ErrorService';
|
|
11
14
|
export * from './services/internal/FetcherService';
|
|
12
15
|
export * from './services/internal/LogService';
|
|
16
|
+
export * from './services/public/AuthService';
|
|
13
17
|
export * from './services/public/TweetService';
|
|
14
18
|
export * from './services/public/UserService';
|
|
15
|
-
export * from './types/
|
|
16
|
-
export * from './types/
|
|
17
|
-
export * from './types/
|
|
18
|
-
export * from './types/public/Tweet';
|
|
19
|
-
export * from './types/public/User';
|
|
20
|
-
export { ITweetFilter } from 'rettiwt-core';
|
|
19
|
+
export * from './types/args/TweetMediaArgs';
|
|
20
|
+
export * from './types/RettiwtConfig';
|
|
21
|
+
export * from './types/ErrorHandler';
|
package/dist/index.js
CHANGED
|
@@ -17,27 +17,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.TweetFilter = void 0;
|
|
18
18
|
// MAIN
|
|
19
19
|
__exportStar(require("./Rettiwt"), exports);
|
|
20
|
-
//
|
|
21
|
-
__exportStar(require("./enums/ApiErrors"), exports);
|
|
22
|
-
__exportStar(require("./enums/HTTP"), exports);
|
|
23
|
-
__exportStar(require("./enums/Logging"), exports);
|
|
24
|
-
// Exporting models
|
|
25
|
-
__exportStar(require("./models/internal/RettiwtConfig"), exports);
|
|
26
|
-
__exportStar(require("./models/public/CursoredData"), exports);
|
|
27
|
-
__exportStar(require("./models/public/List"), exports);
|
|
28
|
-
__exportStar(require("./models/public/Tweet"), exports);
|
|
29
|
-
__exportStar(require("./models/public/User"), exports);
|
|
20
|
+
// EXTERNAL
|
|
30
21
|
var rettiwt_core_1 = require("rettiwt-core");
|
|
31
22
|
Object.defineProperty(exports, "TweetFilter", { enumerable: true, get: function () { return rettiwt_core_1.TweetFilter; } });
|
|
32
|
-
//
|
|
23
|
+
// ENUMS
|
|
24
|
+
__exportStar(require("./enums/Api"), exports);
|
|
25
|
+
__exportStar(require("./enums/Http"), exports);
|
|
26
|
+
__exportStar(require("./enums/Logging"), exports);
|
|
27
|
+
// ERROR MODELS
|
|
28
|
+
__exportStar(require("./models/errors/ApiError"), exports);
|
|
29
|
+
__exportStar(require("./models/errors/HttpError"), exports);
|
|
30
|
+
__exportStar(require("./models/errors/RettiwtError"), exports);
|
|
31
|
+
// DATA MODELS
|
|
32
|
+
__exportStar(require("./models/data/CursoredData"), exports);
|
|
33
|
+
__exportStar(require("./models/data/List"), exports);
|
|
34
|
+
__exportStar(require("./models/data/Tweet"), exports);
|
|
35
|
+
__exportStar(require("./models/data/User"), exports);
|
|
36
|
+
// SERVICES
|
|
37
|
+
__exportStar(require("./services/internal/ErrorService"), exports);
|
|
33
38
|
__exportStar(require("./services/internal/FetcherService"), exports);
|
|
34
39
|
__exportStar(require("./services/internal/LogService"), exports);
|
|
40
|
+
__exportStar(require("./services/public/AuthService"), exports);
|
|
35
41
|
__exportStar(require("./services/public/TweetService"), exports);
|
|
36
42
|
__exportStar(require("./services/public/UserService"), exports);
|
|
37
|
-
//
|
|
38
|
-
__exportStar(require("./types/
|
|
39
|
-
__exportStar(require("./types/
|
|
40
|
-
__exportStar(require("./types/
|
|
41
|
-
__exportStar(require("./types/public/Tweet"), exports);
|
|
42
|
-
__exportStar(require("./types/public/User"), exports);
|
|
43
|
+
// TYPES
|
|
44
|
+
__exportStar(require("./types/args/TweetMediaArgs"), exports);
|
|
45
|
+
__exportStar(require("./types/RettiwtConfig"), exports);
|
|
46
|
+
__exportStar(require("./types/ErrorHandler"), exports);
|
|
43
47
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAO;AACP,4CAA0B;AAE1B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAO;AACP,4CAA0B;AAE1B,WAAW;AACX,6CAA2C;AAAlC,2GAAA,WAAW,OAAA;AAEpB,QAAQ;AACR,8CAA4B;AAC5B,+CAA6B;AAC7B,kDAAgC;AAEhC,eAAe;AACf,2DAAyC;AACzC,4DAA0C;AAC1C,+DAA6C;AAE7C,cAAc;AACd,6DAA2C;AAC3C,qDAAmC;AACnC,sDAAoC;AACpC,qDAAmC;AAEnC,WAAW;AACX,mEAAiD;AACjD,qEAAmD;AACnD,iEAA+C;AAC/C,gEAA8C;AAC9C,iEAA+C;AAC/C,gEAA8C;AAE9C,QAAQ;AACR,8DAA4C;AAC5C,wDAAsC;AACtC,uDAAqC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Tweet } from './Tweet';
|
|
2
2
|
import { User } from './User';
|
|
3
|
-
import { ICursor, ICursoredData } from '../../types/public/CursoredData';
|
|
4
3
|
/**
|
|
5
4
|
* The data that us fetched batch-wise along with a cursor.
|
|
6
5
|
*
|
|
@@ -8,8 +7,10 @@ import { ICursor, ICursoredData } from '../../types/public/CursoredData';
|
|
|
8
7
|
*
|
|
9
8
|
* @public
|
|
10
9
|
*/
|
|
11
|
-
export declare class CursoredData<T extends Tweet | User>
|
|
10
|
+
export declare class CursoredData<T extends Tweet | User> {
|
|
11
|
+
/** The list of data of the given type. */
|
|
12
12
|
list: T[];
|
|
13
|
+
/** The cursor to the next batch of data. */
|
|
13
14
|
next: Cursor;
|
|
14
15
|
/**
|
|
15
16
|
* @param list - The list of data item to store.
|
|
@@ -22,7 +23,8 @@ export declare class CursoredData<T extends Tweet | User> implements ICursoredDa
|
|
|
22
23
|
*
|
|
23
24
|
* @public
|
|
24
25
|
*/
|
|
25
|
-
export declare class Cursor
|
|
26
|
+
export declare class Cursor {
|
|
27
|
+
/** The cursor string. */
|
|
26
28
|
value: string;
|
|
27
29
|
/**
|
|
28
30
|
* Initializes a new cursor from the given cursor string.
|
|
@@ -16,6 +16,7 @@ var CursoredData = /** @class */ (function () {
|
|
|
16
16
|
function CursoredData(list, next) {
|
|
17
17
|
if (list === void 0) { list = []; }
|
|
18
18
|
if (next === void 0) { next = ''; }
|
|
19
|
+
/** The list of data of the given type. */
|
|
19
20
|
this.list = [];
|
|
20
21
|
this.list = list;
|
|
21
22
|
this.next = new Cursor(next);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CursoredData.js","sourceRoot":"","sources":["../../../src/models/data/CursoredData.ts"],"names":[],"mappings":";;;AAIA;;;;;;GAMG;AACH;IAOC;;;OAGG;IACH,sBAAmB,IAAc,EAAE,IAAiB;QAAjC,qBAAA,EAAA,SAAc;QAAE,qBAAA,EAAA,SAAiB;QAVpD,0CAA0C;QACnC,SAAI,GAAQ,EAAE,CAAC;QAUrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IACF,mBAAC;AAAD,CAAC,AAfD,IAeC;AAfY,oCAAY;AAiBzB;;;;GAIG;AACH;IAIC;;;;OAIG;IACH,gBAAmB,SAAiB;QACnC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;IACxB,CAAC;IACF,aAAC;AAAD,CAAC,AAZD,IAYC;AAZY,wBAAM"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { IList as IRawList } from 'rettiwt-core';
|
|
1
2
|
/**
|
|
2
3
|
* The details of a single Twitter List.
|
|
3
4
|
*
|
|
4
5
|
* @public
|
|
5
6
|
*/
|
|
6
|
-
export
|
|
7
|
+
export declare class List {
|
|
7
8
|
/** The rest id of the list. */
|
|
8
9
|
id: string;
|
|
9
10
|
/** The name of the list. */
|
|
@@ -18,4 +19,10 @@ export interface IList {
|
|
|
18
19
|
subscriberCount: number;
|
|
19
20
|
/** The rest id of the user who created the list. */
|
|
20
21
|
createdBy: string;
|
|
22
|
+
/**
|
|
23
|
+
* Initializes a new Tweet List from the given raw list data.
|
|
24
|
+
*
|
|
25
|
+
* @param list - list The raw tweet list data.
|
|
26
|
+
*/
|
|
27
|
+
constructor(list: IRawList);
|
|
21
28
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/models/data/List.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH;IAsBC;;;;OAIG;IACH,cAAmB,IAAc;QAChC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;QACzD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC;QACrC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAC7C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;IAC9C,CAAC;IACF,WAAC;AAAD,CAAC,AApCD,IAoCC;AApCY,oBAAI"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IMediaUploadInitializeResponse } from 'rettiwt-core';
|
|
2
|
+
/**
|
|
3
|
+
* The details of a single media file.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class Media {
|
|
8
|
+
/** The id of the media. */
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* @param media - The raw media data.
|
|
12
|
+
*/
|
|
13
|
+
constructor(media: IMediaUploadInitializeResponse);
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Media = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The details of a single media file.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
var Media = /** @class */ (function () {
|
|
10
|
+
/**
|
|
11
|
+
* @param media - The raw media data.
|
|
12
|
+
*/
|
|
13
|
+
function Media(media) {
|
|
14
|
+
this.id = media.media_id_string;
|
|
15
|
+
}
|
|
16
|
+
return Media;
|
|
17
|
+
}());
|
|
18
|
+
exports.Media = Media;
|
|
19
|
+
//# sourceMappingURL=Media.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Media.js","sourceRoot":"","sources":["../../../src/models/data/Media.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH;IAIC;;OAEG;IACH,eAAmB,KAAqC;QACvD,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,eAAe,CAAC;IACjC,CAAC;IACF,YAAC;AAAD,CAAC,AAVD,IAUC;AAVY,sBAAK"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { EMediaType } from 'rettiwt-core';
|
|
2
|
-
import {
|
|
1
|
+
import { ITweet as IRawTweet, IEntities as IRawTweetEntities, IExtendedMedia as IRawExtendedMedia, EMediaType } from 'rettiwt-core';
|
|
2
|
+
import { User } from './User';
|
|
3
3
|
/**
|
|
4
4
|
* The details of a single Tweet.
|
|
5
5
|
*
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export declare class Tweet {
|
|
9
9
|
/** The rest id of the tweet. */
|
|
10
10
|
id: string;
|
|
11
11
|
/** The details of the user who made the tweet. */
|
|
12
|
-
tweetBy:
|
|
12
|
+
tweetBy: User;
|
|
13
13
|
/** The date and time of creation of the tweet, in UTC string format. */
|
|
14
14
|
createdAt: string;
|
|
15
15
|
/** Additional tweet entities like urls, mentions, etc. */
|
|
16
|
-
entities:
|
|
16
|
+
entities: TweetEntities;
|
|
17
17
|
/** The urls of the media contents of the tweet (if any). */
|
|
18
|
-
media:
|
|
18
|
+
media: TweetMedia[];
|
|
19
19
|
/** The rest id of the tweet which is quoted in the tweet. */
|
|
20
20
|
quoted: string;
|
|
21
21
|
/** The full text content of the tweet. */
|
|
@@ -36,28 +36,46 @@ export interface ITweet {
|
|
|
36
36
|
viewCount: number;
|
|
37
37
|
/** The number of bookmarks of a tweet. */
|
|
38
38
|
bookmarkCount: number;
|
|
39
|
+
/**
|
|
40
|
+
* Initializes a new Tweet from the given raw tweet data.
|
|
41
|
+
*
|
|
42
|
+
* @param tweet - The raw tweet data.
|
|
43
|
+
*/
|
|
44
|
+
constructor(tweet: IRawTweet);
|
|
39
45
|
}
|
|
40
46
|
/**
|
|
41
47
|
* The different types parsed entities like urls, media, mentions, hashtags, etc.
|
|
42
48
|
*
|
|
43
49
|
* @public
|
|
44
50
|
*/
|
|
45
|
-
export
|
|
51
|
+
export declare class TweetEntities {
|
|
46
52
|
/** The list of hashtags mentioned in the tweet. */
|
|
47
53
|
hashtags: string[];
|
|
48
54
|
/** The list of urls mentioned in the tweet. */
|
|
49
55
|
urls: string[];
|
|
50
56
|
/** The list of IDs of users mentioned in the tweet. */
|
|
51
57
|
mentionedUsers: string[];
|
|
58
|
+
/**
|
|
59
|
+
* Initializes the TweetEntities from the raw tweet entities.
|
|
60
|
+
*
|
|
61
|
+
* @param entities - The raw tweet entities.
|
|
62
|
+
*/
|
|
63
|
+
constructor(entities: IRawTweetEntities);
|
|
52
64
|
}
|
|
53
65
|
/**
|
|
54
66
|
* A single media content.
|
|
55
67
|
*
|
|
56
68
|
* @public
|
|
57
69
|
*/
|
|
58
|
-
export
|
|
70
|
+
export declare class TweetMedia {
|
|
59
71
|
/** The type of media. */
|
|
60
72
|
type: EMediaType;
|
|
61
73
|
/** The direct URL to the media. */
|
|
62
74
|
url: string;
|
|
75
|
+
/**
|
|
76
|
+
* Initializes the TweetMedia from the raw tweet media.
|
|
77
|
+
*
|
|
78
|
+
* @param media - The raw tweet media.
|
|
79
|
+
*/
|
|
80
|
+
constructor(media: IRawExtendedMedia);
|
|
63
81
|
}
|
|
@@ -51,8 +51,11 @@ var TweetEntities = /** @class */ (function () {
|
|
|
51
51
|
* @param entities - The raw tweet entities.
|
|
52
52
|
*/
|
|
53
53
|
function TweetEntities(entities) {
|
|
54
|
+
/** The list of hashtags mentioned in the tweet. */
|
|
54
55
|
this.hashtags = [];
|
|
56
|
+
/** The list of urls mentioned in the tweet. */
|
|
55
57
|
this.urls = [];
|
|
58
|
+
/** The list of IDs of users mentioned in the tweet. */
|
|
56
59
|
this.mentionedUsers = [];
|
|
57
60
|
// Extracting user mentions
|
|
58
61
|
if (entities.user_mentions) {
|
|
@@ -93,6 +96,7 @@ var TweetMedia = /** @class */ (function () {
|
|
|
93
96
|
function TweetMedia(media) {
|
|
94
97
|
var _this = this;
|
|
95
98
|
var _a, _b;
|
|
99
|
+
/** The direct URL to the media. */
|
|
96
100
|
this.url = '';
|
|
97
101
|
this.type = media.type;
|
|
98
102
|
// If the media is a photo
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tweet.js","sourceRoot":"","sources":["../../../src/models/data/Tweet.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { IUser as IRawUser } from 'rettiwt-core';
|
|
1
2
|
/**
|
|
2
3
|
* The details of a single user.
|
|
3
4
|
*
|
|
4
5
|
* @public
|
|
5
6
|
*/
|
|
6
|
-
export
|
|
7
|
+
export declare class User {
|
|
7
8
|
/** The rest id of the user. */
|
|
8
9
|
id: string;
|
|
9
10
|
/** The username/screenname of the user. */
|
|
@@ -32,4 +33,10 @@ export interface IUser {
|
|
|
32
33
|
profileBanner: string;
|
|
33
34
|
/** The url of the profile image. */
|
|
34
35
|
profileImage: string;
|
|
36
|
+
/**
|
|
37
|
+
* Initializes a new User from the given raw user data.
|
|
38
|
+
*
|
|
39
|
+
* @param user - The raw user data.
|
|
40
|
+
*/
|
|
41
|
+
constructor(user: IRawUser);
|
|
35
42
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/models/data/User.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH;IA2CC;;;;OAIG;IACH,cAAmB,IAAc;QAChC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACxC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QAC3C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;QACvC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;QACpD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;QAClD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;QACjD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;QAChD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;QACvD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;QACpD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC;IACzD,CAAC;IACF,WAAC;AAAD,CAAC,AAhED,IAgEC;AAhEY,oBAAI"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RettiwtError } from './RettiwtError';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an error that is thrown by Twitter API.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class ApiError extends RettiwtError {
|
|
8
|
+
/** The error code thrown by Twitter API. */
|
|
9
|
+
code: number;
|
|
10
|
+
/**
|
|
11
|
+
* Initializes a new ApiError based on the given error details.
|
|
12
|
+
*
|
|
13
|
+
* @param errorCode - The error code thrown by Twitter API.
|
|
14
|
+
* @param message - Any additional error message.
|
|
15
|
+
*/
|
|
16
|
+
constructor(errorCode: number, message?: string);
|
|
17
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ApiError = void 0;
|
|
19
|
+
// ERRORS
|
|
20
|
+
var RettiwtError_1 = require("./RettiwtError");
|
|
21
|
+
/**
|
|
22
|
+
* Represents an error that is thrown by Twitter API.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
var ApiError = /** @class */ (function (_super) {
|
|
27
|
+
__extends(ApiError, _super);
|
|
28
|
+
/**
|
|
29
|
+
* Initializes a new ApiError based on the given error details.
|
|
30
|
+
*
|
|
31
|
+
* @param errorCode - The error code thrown by Twitter API.
|
|
32
|
+
* @param message - Any additional error message.
|
|
33
|
+
*/
|
|
34
|
+
function ApiError(errorCode, message) {
|
|
35
|
+
var _this = _super.call(this, message) || this;
|
|
36
|
+
_this.code = errorCode;
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
return ApiError;
|
|
40
|
+
}(RettiwtError_1.RettiwtError));
|
|
41
|
+
exports.ApiError = ApiError;
|
|
42
|
+
//# sourceMappingURL=ApiError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiError.js","sourceRoot":"","sources":["../../../src/models/errors/ApiError.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAS;AACT,+CAA8C;AAE9C;;;;GAIG;AACH;IAA8B,4BAAY;IAIzC;;;;;OAKG;IACH,kBAAmB,SAAiB,EAAE,OAAgB;QAAtD,YACC,kBAAM,OAAO,CAAC,SAGd;QADA,KAAI,CAAC,IAAI,GAAG,SAAS,CAAC;;IACvB,CAAC;IACF,eAAC;AAAD,CAAC,AAfD,CAA8B,2BAAY,GAezC;AAfY,4BAAQ"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RettiwtError } from './RettiwtError';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an HTTP error that occues while making a request to Twitter API.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class HttpError extends RettiwtError {
|
|
8
|
+
/** The HTTP status code. */
|
|
9
|
+
status: number;
|
|
10
|
+
/**
|
|
11
|
+
* Initializes a new HttpError based on the given error details.
|
|
12
|
+
*
|
|
13
|
+
* @param httpStatus - The HTTP status code received upon making the request
|
|
14
|
+
* @param message - Any additional error message.
|
|
15
|
+
*/
|
|
16
|
+
constructor(httpStatus: number, message?: string);
|
|
17
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.HttpError = void 0;
|
|
19
|
+
// ERRORS
|
|
20
|
+
var RettiwtError_1 = require("./RettiwtError");
|
|
21
|
+
/**
|
|
22
|
+
* Represents an HTTP error that occues while making a request to Twitter API.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
var HttpError = /** @class */ (function (_super) {
|
|
27
|
+
__extends(HttpError, _super);
|
|
28
|
+
/**
|
|
29
|
+
* Initializes a new HttpError based on the given error details.
|
|
30
|
+
*
|
|
31
|
+
* @param httpStatus - The HTTP status code received upon making the request
|
|
32
|
+
* @param message - Any additional error message.
|
|
33
|
+
*/
|
|
34
|
+
function HttpError(httpStatus, message) {
|
|
35
|
+
var _this = _super.call(this, message) || this;
|
|
36
|
+
_this.status = httpStatus;
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
return HttpError;
|
|
40
|
+
}(RettiwtError_1.RettiwtError));
|
|
41
|
+
exports.HttpError = HttpError;
|
|
42
|
+
//# sourceMappingURL=HttpError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../../src/models/errors/HttpError.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAS;AACT,+CAA8C;AAE9C;;;;GAIG;AACH;IAA+B,6BAAY;IAI1C;;;;;OAKG;IACH,mBAAmB,UAAkB,EAAE,OAAgB;QAAvD,YACC,kBAAM,OAAO,CAAC,SAGd;QADA,KAAI,CAAC,MAAM,GAAG,UAAU,CAAC;;IAC1B,CAAC;IACF,gBAAC;AAAD,CAAC,AAfD,CAA+B,2BAAY,GAe1C;AAfY,8BAAS"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.RettiwtError = void 0;
|
|
19
|
+
/**
|
|
20
|
+
* Represents an error that arises inside the package.
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
var RettiwtError = /** @class */ (function (_super) {
|
|
25
|
+
__extends(RettiwtError, _super);
|
|
26
|
+
function RettiwtError(message) {
|
|
27
|
+
var _this = _super.call(this, message) || this;
|
|
28
|
+
Object.setPrototypeOf(_this, RettiwtError.prototype);
|
|
29
|
+
return _this;
|
|
30
|
+
}
|
|
31
|
+
return RettiwtError;
|
|
32
|
+
}(Error));
|
|
33
|
+
exports.RettiwtError = RettiwtError;
|
|
34
|
+
//# sourceMappingURL=RettiwtError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RettiwtError.js","sourceRoot":"","sources":["../../../src/models/errors/RettiwtError.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH;IAAkC,gCAAK;IACtC,sBAAmB,OAAgB;QAAnC,YACC,kBAAM,OAAO,CAAC,SAGd;QADA,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;;IACrD,CAAC;IACF,mBAAC;AAAD,CAAC,AAND,CAAkC,KAAK,GAMtC;AANY,oCAAY"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RettiwtError } from './RettiwtError';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an HTTP error that occues while making a request to Twitter API.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class TimeoutError extends RettiwtError {
|
|
8
|
+
/**
|
|
9
|
+
* Initializes a new TimeoutError based on the given error details.
|
|
10
|
+
*
|
|
11
|
+
* @param message - Error message with the configured timeout.
|
|
12
|
+
*/
|
|
13
|
+
constructor(message?: string);
|
|
14
|
+
}
|