rettiwt-api 6.1.0 → 6.1.2
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/models/data/Notification.js +12 -14
- package/dist/models/data/Notification.js.map +1 -1
- package/dist/services/public/FetcherService.js +2 -2
- package/dist/services/public/FetcherService.js.map +1 -1
- package/dist/types/raw/base/Notification.d.ts +35 -33
- package/dist/types/raw/user/Notifications.d.ts +379 -93
- package/package.json +2 -2
- package/src/models/data/Notification.ts +14 -18
- package/src/services/public/FetcherService.ts +1 -1
- package/src/types/raw/base/Notification.ts +35 -36
- package/src/types/raw/user/Notifications.ts +412 -88
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Notification = void 0;
|
|
4
4
|
const Notification_1 = require("../../enums/Notification");
|
|
5
|
-
const Notification_2 = require("../../enums/raw/Notification");
|
|
6
5
|
const JsonUtils_1 = require("../../helper/JsonUtils");
|
|
7
6
|
/**
|
|
8
7
|
* The details of a single notification.
|
|
@@ -24,15 +23,15 @@ class Notification {
|
|
|
24
23
|
constructor(notification) {
|
|
25
24
|
this._raw = { ...notification };
|
|
26
25
|
// Getting the original notification type
|
|
27
|
-
const notificationType =
|
|
28
|
-
this.from = notification.template
|
|
29
|
-
? notification.template.
|
|
26
|
+
const notificationType = notification.notification_icon.toString();
|
|
27
|
+
this.from = notification.template.from_users
|
|
28
|
+
? notification.template.from_users.map((item) => item.user_results.result.rest_id)
|
|
30
29
|
: [];
|
|
31
30
|
this.id = notification.id;
|
|
32
|
-
this.message = notification.
|
|
33
|
-
this.receivedAt = new Date(
|
|
34
|
-
this.target = notification.template
|
|
35
|
-
? notification.template.
|
|
31
|
+
this.message = notification.rich_message.text;
|
|
32
|
+
this.receivedAt = new Date(notification.timestamp_ms).toISOString();
|
|
33
|
+
this.target = notification.template.target_objects
|
|
34
|
+
? notification.template.target_objects.map((item) => item.tweet_results.result.rest_id)
|
|
36
35
|
: [];
|
|
37
36
|
this.type = notificationType
|
|
38
37
|
? Notification_1.NotificationType[notificationType]
|
|
@@ -51,12 +50,11 @@ class Notification {
|
|
|
51
50
|
*/
|
|
52
51
|
static list(response) {
|
|
53
52
|
const notifications = [];
|
|
54
|
-
// Extracting
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
53
|
+
// Extracting the matching data
|
|
54
|
+
const extract = (0, JsonUtils_1.findByFilter)(response, '__typename', 'TimelineNotification');
|
|
55
|
+
// Deserializing valid data
|
|
56
|
+
for (const item of extract) {
|
|
57
|
+
notifications.push(new Notification(item));
|
|
60
58
|
}
|
|
61
59
|
return notifications;
|
|
62
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../../src/models/data/Notification.ts"],"names":[],"mappings":";;;AAAA,2DAA4D;AAC5D
|
|
1
|
+
{"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../../src/models/data/Notification.ts"],"names":[],"mappings":";;;AAAA,2DAA4D;AAC5D,sDAAsD;AAItD;;;;GAIG;AACH,MAAa,YAAY;IACxB,oCAAoC;IACnB,IAAI,CAAmB;IAEjC,IAAI,CAAW;IACf,EAAE,CAAS;IACX,OAAO,CAAS;IAChB,UAAU,CAAS;IACnB,MAAM,CAAW;IACjB,IAAI,CAAoB;IAE/B;;OAEG;IACH,YAAmB,YAA8B;QAChD,IAAI,CAAC,IAAI,GAAG,EAAE,GAAG,YAAY,EAAE,CAAC;QAEhC,yCAAyC;QACzC,MAAM,gBAAgB,GAAG,YAAY,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC;QAEnE,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,QAAQ,CAAC,UAAU;YAC3C,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,YAA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,CAAC,EAAE;YACX,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;SACf,CAAC;IACH,CAAC;CACD;AAzED,oCAyEC"}
|
|
@@ -37,7 +37,7 @@ exports.FetcherService = void 0;
|
|
|
37
37
|
const axios_1 = __importStar(require("axios"));
|
|
38
38
|
const cookiejar_1 = require("cookiejar");
|
|
39
39
|
const jsdom_1 = require("jsdom");
|
|
40
|
-
const
|
|
40
|
+
const x_client_transaction_id_1 = require("x-client-transaction-id");
|
|
41
41
|
const Groups_1 = require("../../collections/Groups");
|
|
42
42
|
const Requests_1 = require("../../collections/Requests");
|
|
43
43
|
const Api_1 = require("../../enums/Api");
|
|
@@ -121,7 +121,7 @@ class FetcherService {
|
|
|
121
121
|
// Get the X homepage HTML document (using utility function)
|
|
122
122
|
const document = await this._handleXMigration();
|
|
123
123
|
// Create and initialize ClientTransaction instance
|
|
124
|
-
const transaction = await
|
|
124
|
+
const transaction = await x_client_transaction_id_1.ClientTransaction.create(document);
|
|
125
125
|
// Getting the URL path excluding all params
|
|
126
126
|
const path = new URL(url).pathname.split('?')[0].trim();
|
|
127
127
|
// Generating the transaction ID
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetcherService.js","sourceRoot":"","sources":["../../../src/services/public/FetcherService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4C;AAC5C,yCAAmC;AACnC,iCAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"FetcherService.js","sourceRoot":"","sources":["../../../src/services/public/FetcherService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4C;AAC5C,yCAAmC;AACnC,iCAA8B;AAC9B,qEAA4D;AAE5D,qDAAkH;AAClH,yDAAsD;AACt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AAI,EAAE,EAAE,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;oBAC5E,GAAG,MAAM,CAAC,OAAO;iBACjB,CAAC;gBAEF,sBAAsB;gBACtB,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;gBAEnB,6BAA6B;gBAC7B,OAAO,CAAC,MAAM,IAAA,eAAK,EAAI,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;YACtC,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACd,8BAA8B;gBAC9B,IAAI,IAAA,oBAAY,EAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;oBAC7C,KAAK,GAAG,GAAG,CAAC;oBACZ,SAAS;gBACV,CAAC;gBACD,gCAAgC;qBAC3B,CAAC;oBACL,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;oBAC/B,MAAM,GAAG,CAAC;gBACX,CAAC;YACF,CAAC;oBAAS,CAAC;gBACV,0CAA0C;gBAC1C,KAAK,EAAE,CAAC;YACT,CAAC;QACF,CAAC,QAAQ,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;QAEzC,oEAAoE;QACpE,MAAM,KAAK,CAAC;IACb,CAAC;CACD;AA9TD,wCA8TC"}
|
|
@@ -1,53 +1,55 @@
|
|
|
1
1
|
import { RawNotificationType } from '../../../enums/raw/Notification';
|
|
2
|
+
import { IDataResult } from '../composite/DataResult';
|
|
3
|
+
import { ITweet } from './Tweet';
|
|
4
|
+
import { IUser } from './User';
|
|
2
5
|
/**
|
|
3
6
|
* Represents the raw data of a single Notification.
|
|
4
7
|
*
|
|
5
8
|
* @public
|
|
6
9
|
*/
|
|
7
10
|
export interface INotification {
|
|
11
|
+
itemType: string;
|
|
12
|
+
__typename: string;
|
|
8
13
|
id: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
template:
|
|
14
|
+
notification_icon: RawNotificationType;
|
|
15
|
+
rich_message: INotificationRichMessage;
|
|
16
|
+
notification_url: INotificationUrl;
|
|
17
|
+
template: INoticiationTemplate;
|
|
18
|
+
timestamp_ms: string;
|
|
13
19
|
}
|
|
14
|
-
export interface
|
|
15
|
-
id: RawNotificationType;
|
|
16
|
-
}
|
|
17
|
-
export interface INotificationMessage {
|
|
18
|
-
text: string;
|
|
19
|
-
entities: INotificationMessageEntity[];
|
|
20
|
+
export interface INotificationRichMessage {
|
|
20
21
|
rtl: boolean;
|
|
22
|
+
text: string;
|
|
23
|
+
entities: INotificationEntity[];
|
|
21
24
|
}
|
|
22
|
-
export interface
|
|
25
|
+
export interface INotificationEntity {
|
|
23
26
|
fromIndex: number;
|
|
24
27
|
toIndex: number;
|
|
25
|
-
|
|
28
|
+
ref: INotificationEntityRef;
|
|
26
29
|
}
|
|
27
|
-
export interface
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export interface INotificationUserActions {
|
|
31
|
-
targetObjects: INotificationTargetObject[];
|
|
32
|
-
fromUsers: INotificationFromUser[];
|
|
33
|
-
additionalContext: INotificationAdditionalContext;
|
|
34
|
-
}
|
|
35
|
-
export interface INotificationTargetObject {
|
|
36
|
-
tweet: INotificationTweet;
|
|
30
|
+
export interface INotificationEntityRef {
|
|
31
|
+
type: string;
|
|
32
|
+
user_results: IDataResult<IUser>;
|
|
37
33
|
}
|
|
38
|
-
export interface
|
|
39
|
-
|
|
34
|
+
export interface INotificationUrl {
|
|
35
|
+
url: string;
|
|
36
|
+
urlType: string;
|
|
37
|
+
urtEndpointOptions?: INotificationUrtEndpointOptions;
|
|
40
38
|
}
|
|
41
|
-
export interface
|
|
42
|
-
|
|
39
|
+
export interface INotificationUrtEndpointOptions {
|
|
40
|
+
cacheId: string;
|
|
41
|
+
title: string;
|
|
43
42
|
}
|
|
44
|
-
export interface
|
|
45
|
-
|
|
43
|
+
export interface INoticiationTemplate {
|
|
44
|
+
__typename: string;
|
|
45
|
+
target_objects: INotificationTargetObject[];
|
|
46
|
+
from_users: INotificationFromUser[];
|
|
46
47
|
}
|
|
47
|
-
export interface
|
|
48
|
-
|
|
48
|
+
export interface INotificationTargetObject {
|
|
49
|
+
__typename: string;
|
|
50
|
+
tweet_results: IDataResult<ITweet>;
|
|
49
51
|
}
|
|
50
|
-
export interface
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
export interface INotificationFromUser {
|
|
53
|
+
__typename: string;
|
|
54
|
+
user_results: IDataResult<IUser>;
|
|
53
55
|
}
|