x-twitter-scraper 0.1.0 → 0.2.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 +22 -0
- package/README.md +5 -5
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account.d.mts +19 -0
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +19 -0
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js +20 -1
- package/resources/account.js.map +1 -1
- package/resources/account.mjs +20 -1
- package/resources/account.mjs.map +1 -1
- package/resources/api-keys.d.mts +20 -0
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +20 -0
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +20 -3
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +20 -3
- package/resources/api-keys.mjs.map +1 -1
- package/resources/compose.d.mts +28 -3
- package/resources/compose.d.mts.map +1 -1
- package/resources/compose.d.ts +28 -3
- package/resources/compose.d.ts.map +1 -1
- package/resources/compose.js +9 -0
- package/resources/compose.js.map +1 -1
- package/resources/compose.mjs +9 -0
- package/resources/compose.mjs.map +1 -1
- package/resources/credits.d.mts +12 -0
- package/resources/credits.d.mts.map +1 -1
- package/resources/credits.d.ts +12 -0
- package/resources/credits.d.ts.map +1 -1
- package/resources/credits.js +12 -0
- package/resources/credits.js.map +1 -1
- package/resources/credits.mjs +12 -0
- package/resources/credits.mjs.map +1 -1
- package/resources/drafts.d.mts +33 -0
- package/resources/drafts.d.mts.map +1 -1
- package/resources/drafts.d.ts +33 -0
- package/resources/drafts.d.ts.map +1 -1
- package/resources/drafts.js +24 -0
- package/resources/drafts.js.map +1 -1
- package/resources/drafts.mjs +24 -0
- package/resources/drafts.mjs.map +1 -1
- package/resources/draws.d.mts +46 -1
- package/resources/draws.d.mts.map +1 -1
- package/resources/draws.d.ts +46 -1
- package/resources/draws.d.ts.map +1 -1
- package/resources/draws.js +27 -0
- package/resources/draws.js.map +1 -1
- package/resources/draws.mjs +27 -0
- package/resources/draws.mjs.map +1 -1
- package/resources/events.d.mts +25 -1
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +25 -1
- package/resources/events.d.ts.map +1 -1
- package/resources/extractions.d.mts +74 -5
- package/resources/extractions.d.mts.map +1 -1
- package/resources/extractions.d.ts +74 -5
- package/resources/extractions.d.ts.map +1 -1
- package/resources/extractions.js +36 -0
- package/resources/extractions.js.map +1 -1
- package/resources/extractions.mjs +36 -0
- package/resources/extractions.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/integrations.d.mts +77 -0
- package/resources/integrations.d.mts.map +1 -1
- package/resources/integrations.d.ts +77 -0
- package/resources/integrations.d.ts.map +1 -1
- package/resources/integrations.js +47 -0
- package/resources/integrations.js.map +1 -1
- package/resources/integrations.mjs +47 -0
- package/resources/integrations.mjs.map +1 -1
- package/resources/monitors.d.mts +46 -0
- package/resources/monitors.d.mts.map +1 -1
- package/resources/monitors.d.ts +46 -0
- package/resources/monitors.d.ts.map +1 -1
- package/resources/monitors.js +31 -0
- package/resources/monitors.js.map +1 -1
- package/resources/monitors.mjs +31 -0
- package/resources/monitors.mjs.map +1 -1
- package/resources/radar.d.mts +4 -1
- package/resources/radar.d.mts.map +1 -1
- package/resources/radar.d.ts +4 -1
- package/resources/radar.d.ts.map +1 -1
- package/resources/shared.d.mts +12 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +12 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/styles.d.mts +63 -4
- package/resources/styles.d.mts.map +1 -1
- package/resources/styles.d.ts +63 -4
- package/resources/styles.d.ts.map +1 -1
- package/resources/styles.js +55 -8
- package/resources/styles.js.map +1 -1
- package/resources/styles.mjs +55 -8
- package/resources/styles.mjs.map +1 -1
- package/resources/support/tickets.d.mts +34 -0
- package/resources/support/tickets.d.mts.map +1 -1
- package/resources/support/tickets.d.ts +34 -0
- package/resources/support/tickets.d.ts.map +1 -1
- package/resources/support/tickets.js +34 -0
- package/resources/support/tickets.js.map +1 -1
- package/resources/support/tickets.mjs +34 -0
- package/resources/support/tickets.mjs.map +1 -1
- package/resources/trends.d.mts +4 -1
- package/resources/trends.d.mts.map +1 -1
- package/resources/trends.d.ts +4 -1
- package/resources/trends.d.ts.map +1 -1
- package/resources/trends.js +1 -1
- package/resources/trends.mjs +1 -1
- package/resources/webhooks.d.mts +54 -0
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +54 -0
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +36 -0
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +36 -0
- package/resources/webhooks.mjs.map +1 -1
- package/resources/x/accounts.d.mts +59 -3
- package/resources/x/accounts.d.mts.map +1 -1
- package/resources/x/accounts.d.ts +59 -3
- package/resources/x/accounts.d.ts.map +1 -1
- package/resources/x/accounts.js +55 -5
- package/resources/x/accounts.js.map +1 -1
- package/resources/x/accounts.mjs +55 -5
- package/resources/x/accounts.mjs.map +1 -1
- package/resources/x/bookmarks.d.mts +11 -1
- package/resources/x/bookmarks.d.mts.map +1 -1
- package/resources/x/bookmarks.d.ts +11 -1
- package/resources/x/bookmarks.d.ts.map +1 -1
- package/resources/x/bookmarks.js +10 -0
- package/resources/x/bookmarks.js.map +1 -1
- package/resources/x/bookmarks.mjs +10 -0
- package/resources/x/bookmarks.mjs.map +1 -1
- package/resources/x/communities/communities.d.mts +118 -11
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +118 -11
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js +45 -16
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs +45 -16
- package/resources/x/communities/communities.mjs.map +1 -1
- package/resources/x/communities/index.d.mts +1 -1
- package/resources/x/communities/index.d.mts.map +1 -1
- package/resources/x/communities/index.d.ts +1 -1
- package/resources/x/communities/index.d.ts.map +1 -1
- package/resources/x/communities/index.js.map +1 -1
- package/resources/x/communities/index.mjs.map +1 -1
- package/resources/x/communities/join.d.mts +18 -2
- package/resources/x/communities/join.d.mts.map +1 -1
- package/resources/x/communities/join.d.ts +18 -2
- package/resources/x/communities/join.d.ts.map +1 -1
- package/resources/x/communities/join.js +16 -0
- package/resources/x/communities/join.js.map +1 -1
- package/resources/x/communities/join.mjs +16 -0
- package/resources/x/communities/join.mjs.map +1 -1
- package/resources/x/communities/tweets.d.mts +28 -5
- package/resources/x/communities/tweets.d.mts.map +1 -1
- package/resources/x/communities/tweets.d.ts +28 -5
- package/resources/x/communities/tweets.d.ts.map +1 -1
- package/resources/x/communities/tweets.js +20 -6
- package/resources/x/communities/tweets.js.map +1 -1
- package/resources/x/communities/tweets.mjs +20 -6
- package/resources/x/communities/tweets.mjs.map +1 -1
- package/resources/x/dm.d.mts +19 -2
- package/resources/x/dm.d.mts.map +1 -1
- package/resources/x/dm.d.ts +19 -2
- package/resources/x/dm.d.ts.map +1 -1
- package/resources/x/dm.js +17 -0
- package/resources/x/dm.js.map +1 -1
- package/resources/x/dm.mjs +17 -0
- package/resources/x/dm.mjs.map +1 -1
- package/resources/x/followers.d.mts +8 -0
- package/resources/x/followers.d.mts.map +1 -1
- package/resources/x/followers.d.ts +8 -0
- package/resources/x/followers.d.ts.map +1 -1
- package/resources/x/followers.js +8 -0
- package/resources/x/followers.js.map +1 -1
- package/resources/x/followers.mjs +8 -0
- package/resources/x/followers.mjs.map +1 -1
- package/resources/x/index.d.mts +2 -2
- package/resources/x/index.d.mts.map +1 -1
- package/resources/x/index.d.ts +2 -2
- package/resources/x/index.d.ts.map +1 -1
- package/resources/x/index.js.map +1 -1
- package/resources/x/index.mjs.map +1 -1
- package/resources/x/lists.d.mts +27 -6
- package/resources/x/lists.d.mts.map +1 -1
- package/resources/x/lists.d.ts +27 -6
- package/resources/x/lists.d.ts.map +1 -1
- package/resources/x/lists.js +23 -16
- package/resources/x/lists.js.map +1 -1
- package/resources/x/lists.mjs +23 -16
- package/resources/x/lists.mjs.map +1 -1
- package/resources/x/media.d.mts +17 -1
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +17 -1
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/media.js +16 -0
- package/resources/x/media.js.map +1 -1
- package/resources/x/media.mjs +16 -0
- package/resources/x/media.mjs.map +1 -1
- package/resources/x/profile.d.mts +30 -3
- package/resources/x/profile.d.mts.map +1 -1
- package/resources/x/profile.d.ts +30 -3
- package/resources/x/profile.d.ts.map +1 -1
- package/resources/x/profile.js +27 -0
- package/resources/x/profile.js.map +1 -1
- package/resources/x/profile.mjs +27 -0
- package/resources/x/profile.mjs.map +1 -1
- package/resources/x/tweets/like.d.mts +18 -4
- package/resources/x/tweets/like.d.mts.map +1 -1
- package/resources/x/tweets/like.d.ts +18 -4
- package/resources/x/tweets/like.d.ts.map +1 -1
- package/resources/x/tweets/like.js +18 -4
- package/resources/x/tweets/like.js.map +1 -1
- package/resources/x/tweets/like.mjs +18 -4
- package/resources/x/tweets/like.mjs.map +1 -1
- package/resources/x/tweets/retweet.d.mts +18 -4
- package/resources/x/tweets/retweet.d.mts.map +1 -1
- package/resources/x/tweets/retweet.d.ts +18 -4
- package/resources/x/tweets/retweet.d.ts.map +1 -1
- package/resources/x/tweets/retweet.js +18 -4
- package/resources/x/tweets/retweet.js.map +1 -1
- package/resources/x/tweets/retweet.mjs +18 -4
- package/resources/x/tweets/retweet.mjs.map +1 -1
- package/resources/x/tweets/tweets.d.mts +146 -15
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +146 -15
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js +74 -10
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs +74 -10
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/users/follow.d.mts +19 -4
- package/resources/x/users/follow.d.mts.map +1 -1
- package/resources/x/users/follow.d.ts +19 -4
- package/resources/x/users/follow.d.ts.map +1 -1
- package/resources/x/users/follow.js +19 -4
- package/resources/x/users/follow.js.map +1 -1
- package/resources/x/users/follow.mjs +19 -4
- package/resources/x/users/follow.mjs.map +1 -1
- package/resources/x/users/users.d.mts +94 -21
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +94 -21
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js +78 -33
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs +78 -33
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/x.d.mts +42 -6
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +42 -6
- package/resources/x/x.d.ts.map +1 -1
- package/resources/x/x.js +21 -5
- package/resources/x/x.js.map +1 -1
- package/resources/x/x.mjs +21 -5
- package/resources/x/x.mjs.map +1 -1
- package/src/client.ts +2 -0
- package/src/resources/account.ts +20 -1
- package/src/resources/api-keys.ts +23 -3
- package/src/resources/compose.ts +32 -1
- package/src/resources/credits.ts +12 -0
- package/src/resources/drafts.ts +33 -0
- package/src/resources/draws.ts +46 -1
- package/src/resources/events.ts +25 -1
- package/src/resources/extractions.ts +74 -5
- package/src/resources/index.ts +1 -0
- package/src/resources/integrations.ts +77 -0
- package/src/resources/monitors.ts +46 -0
- package/src/resources/radar.ts +4 -1
- package/src/resources/shared.ts +12 -0
- package/src/resources/styles.ts +67 -8
- package/src/resources/support/tickets.ts +34 -0
- package/src/resources/trends.ts +4 -1
- package/src/resources/webhooks.ts +54 -0
- package/src/resources/x/accounts.ts +72 -7
- package/src/resources/x/bookmarks.ts +11 -1
- package/src/resources/x/communities/communities.ts +142 -26
- package/src/resources/x/communities/index.ts +1 -1
- package/src/resources/x/communities/join.ts +18 -2
- package/src/resources/x/communities/tweets.ts +41 -11
- package/src/resources/x/dm.ts +19 -2
- package/src/resources/x/followers.ts +8 -0
- package/src/resources/x/index.ts +2 -0
- package/src/resources/x/lists.ts +30 -22
- package/src/resources/x/media.ts +17 -1
- package/src/resources/x/profile.ts +30 -3
- package/src/resources/x/tweets/like.ts +20 -6
- package/src/resources/x/tweets/retweet.ts +20 -14
- package/src/resources/x/tweets/tweets.ts +157 -27
- package/src/resources/x/users/follow.ts +21 -10
- package/src/resources/x/users/users.ts +103 -52
- package/src/resources/x/x.ts +50 -8
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/monitors.d.ts
CHANGED
|
@@ -8,28 +8,65 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
8
8
|
export declare class Monitors extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Create monitor
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const monitor = await client.monitors.create({
|
|
15
|
+
* eventTypes: ['tweet.new', 'follower.gained'],
|
|
16
|
+
* username: 'elonmusk',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
11
19
|
*/
|
|
12
20
|
create(body: MonitorCreateParams, options?: RequestOptions): APIPromise<MonitorCreateResponse>;
|
|
13
21
|
/**
|
|
14
22
|
* Get monitor
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const monitor = await client.monitors.retrieve('id');
|
|
27
|
+
* ```
|
|
15
28
|
*/
|
|
16
29
|
retrieve(id: string, options?: RequestOptions): APIPromise<Monitor>;
|
|
17
30
|
/**
|
|
18
31
|
* Update monitor
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const monitor = await client.monitors.update('id', {
|
|
36
|
+
* eventTypes: ['tweet.new'],
|
|
37
|
+
* isActive: true,
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
19
40
|
*/
|
|
20
41
|
update(id: string, body: MonitorUpdateParams, options?: RequestOptions): APIPromise<Monitor>;
|
|
21
42
|
/**
|
|
22
43
|
* List monitors
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const monitors = await client.monitors.list();
|
|
48
|
+
* ```
|
|
23
49
|
*/
|
|
24
50
|
list(options?: RequestOptions): APIPromise<MonitorListResponse>;
|
|
25
51
|
/**
|
|
26
52
|
* Deactivate monitor
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const response = await client.monitors.deactivate('id');
|
|
57
|
+
* ```
|
|
27
58
|
*/
|
|
28
59
|
deactivate(id: string, options?: RequestOptions): APIPromise<MonitorDeactivateResponse>;
|
|
29
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Account monitor that tracks activity for a given X user.
|
|
63
|
+
*/
|
|
30
64
|
export interface Monitor {
|
|
31
65
|
id: string;
|
|
32
66
|
createdAt: string;
|
|
67
|
+
/**
|
|
68
|
+
* Array of event types to subscribe to.
|
|
69
|
+
*/
|
|
33
70
|
eventTypes: Array<Shared.EventType>;
|
|
34
71
|
isActive: boolean;
|
|
35
72
|
username: string;
|
|
@@ -38,6 +75,9 @@ export interface Monitor {
|
|
|
38
75
|
export interface MonitorCreateResponse {
|
|
39
76
|
id: string;
|
|
40
77
|
createdAt: string;
|
|
78
|
+
/**
|
|
79
|
+
* Array of event types to subscribe to.
|
|
80
|
+
*/
|
|
41
81
|
eventTypes: Array<Shared.EventType>;
|
|
42
82
|
username: string;
|
|
43
83
|
xUserId: string;
|
|
@@ -50,6 +90,9 @@ export interface MonitorDeactivateResponse {
|
|
|
50
90
|
success: true;
|
|
51
91
|
}
|
|
52
92
|
export interface MonitorCreateParams {
|
|
93
|
+
/**
|
|
94
|
+
* Array of event types to subscribe to.
|
|
95
|
+
*/
|
|
53
96
|
eventTypes: Array<Shared.EventType>;
|
|
54
97
|
/**
|
|
55
98
|
* X username (without @)
|
|
@@ -57,6 +100,9 @@ export interface MonitorCreateParams {
|
|
|
57
100
|
username: string;
|
|
58
101
|
}
|
|
59
102
|
export interface MonitorUpdateParams {
|
|
103
|
+
/**
|
|
104
|
+
* Array of event types to subscribe to.
|
|
105
|
+
*/
|
|
60
106
|
eventTypes?: Array<Shared.EventType>;
|
|
61
107
|
isActive?: boolean;
|
|
62
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitors.d.ts","sourceRoot":"","sources":["../src/resources/monitors.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"monitors.d.ts","sourceRoot":"","sources":["../src/resources/monitors.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAInE;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAI5F;;;;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K,OAAO,IAAI,OAAO,EACvB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
package/resources/monitors.js
CHANGED
|
@@ -10,30 +10,61 @@ const path_1 = require("../internal/utils/path.js");
|
|
|
10
10
|
class Monitors extends resource_1.APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* Create monitor
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const monitor = await client.monitors.create({
|
|
17
|
+
* eventTypes: ['tweet.new', 'follower.gained'],
|
|
18
|
+
* username: 'elonmusk',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
13
21
|
*/
|
|
14
22
|
create(body, options) {
|
|
15
23
|
return this._client.post('/monitors', { body, ...options });
|
|
16
24
|
}
|
|
17
25
|
/**
|
|
18
26
|
* Get monitor
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const monitor = await client.monitors.retrieve('id');
|
|
31
|
+
* ```
|
|
19
32
|
*/
|
|
20
33
|
retrieve(id, options) {
|
|
21
34
|
return this._client.get((0, path_1.path) `/monitors/${id}`, options);
|
|
22
35
|
}
|
|
23
36
|
/**
|
|
24
37
|
* Update monitor
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const monitor = await client.monitors.update('id', {
|
|
42
|
+
* eventTypes: ['tweet.new'],
|
|
43
|
+
* isActive: true,
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
25
46
|
*/
|
|
26
47
|
update(id, body, options) {
|
|
27
48
|
return this._client.patch((0, path_1.path) `/monitors/${id}`, { body, ...options });
|
|
28
49
|
}
|
|
29
50
|
/**
|
|
30
51
|
* List monitors
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const monitors = await client.monitors.list();
|
|
56
|
+
* ```
|
|
31
57
|
*/
|
|
32
58
|
list(options) {
|
|
33
59
|
return this._client.get('/monitors', options);
|
|
34
60
|
}
|
|
35
61
|
/**
|
|
36
62
|
* Deactivate monitor
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const response = await client.monitors.deactivate('id');
|
|
67
|
+
* ```
|
|
37
68
|
*/
|
|
38
69
|
deactivate(id, options) {
|
|
39
70
|
return this._client.delete((0, path_1.path) `/monitors/${id}`, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitors.js","sourceRoot":"","sources":["../src/resources/monitors.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC
|
|
1
|
+
{"version":3,"file":"monitors.js","sourceRoot":"","sources":["../src/resources/monitors.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CAAC,EAAU,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;CACF;AAlED,4BAkEC"}
|
package/resources/monitors.mjs
CHANGED
|
@@ -7,30 +7,61 @@ import { path } from "../internal/utils/path.mjs";
|
|
|
7
7
|
export class Monitors extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Create monitor
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const monitor = await client.monitors.create({
|
|
14
|
+
* eventTypes: ['tweet.new', 'follower.gained'],
|
|
15
|
+
* username: 'elonmusk',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
10
18
|
*/
|
|
11
19
|
create(body, options) {
|
|
12
20
|
return this._client.post('/monitors', { body, ...options });
|
|
13
21
|
}
|
|
14
22
|
/**
|
|
15
23
|
* Get monitor
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const monitor = await client.monitors.retrieve('id');
|
|
28
|
+
* ```
|
|
16
29
|
*/
|
|
17
30
|
retrieve(id, options) {
|
|
18
31
|
return this._client.get(path `/monitors/${id}`, options);
|
|
19
32
|
}
|
|
20
33
|
/**
|
|
21
34
|
* Update monitor
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const monitor = await client.monitors.update('id', {
|
|
39
|
+
* eventTypes: ['tweet.new'],
|
|
40
|
+
* isActive: true,
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
22
43
|
*/
|
|
23
44
|
update(id, body, options) {
|
|
24
45
|
return this._client.patch(path `/monitors/${id}`, { body, ...options });
|
|
25
46
|
}
|
|
26
47
|
/**
|
|
27
48
|
* List monitors
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const monitors = await client.monitors.list();
|
|
53
|
+
* ```
|
|
28
54
|
*/
|
|
29
55
|
list(options) {
|
|
30
56
|
return this._client.get('/monitors', options);
|
|
31
57
|
}
|
|
32
58
|
/**
|
|
33
59
|
* Deactivate monitor
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const response = await client.monitors.deactivate('id');
|
|
64
|
+
* ```
|
|
34
65
|
*/
|
|
35
66
|
deactivate(id, options) {
|
|
36
67
|
return this._client.delete(path `/monitors/${id}`, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitors.mjs","sourceRoot":"","sources":["../src/resources/monitors.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"monitors.mjs","sourceRoot":"","sources":["../src/resources/monitors.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,aAAa,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CAAC,EAAU,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;CACF"}
|
package/resources/radar.d.mts
CHANGED
|
@@ -10,6 +10,9 @@ export declare class Radar extends APIResource {
|
|
|
10
10
|
*/
|
|
11
11
|
retrieveTrendingTopics(query?: RadarRetrieveTrendingTopicsParams | null | undefined, options?: RequestOptions): APIPromise<RadarRetrieveTrendingTopicsResponse>;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Trending topic with score, category, source, and region.
|
|
15
|
+
*/
|
|
13
16
|
export interface RadarItem {
|
|
14
17
|
category: string;
|
|
15
18
|
publishedAt: string;
|
|
@@ -46,7 +49,7 @@ export interface RadarRetrieveTrendingTopicsParams {
|
|
|
46
49
|
* Source filter. One of: github, google_trends, hacker_news, polymarket, reddit,
|
|
47
50
|
* trustmrr, wikipedia
|
|
48
51
|
*/
|
|
49
|
-
source?:
|
|
52
|
+
source?: 'github' | 'google_trends' | 'hacker_news' | 'polymarket' | 'reddit' | 'trustmrr' | 'wikipedia';
|
|
50
53
|
}
|
|
51
54
|
export declare namespace Radar {
|
|
52
55
|
export { type RadarItem as RadarItem, type RadarRetrieveTrendingTopicsResponse as RadarRetrieveTrendingTopicsResponse, type RadarRetrieveTrendingTopicsParams as RadarRetrieveTrendingTopicsParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radar.d.mts","sourceRoot":"","sources":["../src/resources/radar.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,sBAAsB,CACpB,KAAK,GAAE,iCAAiC,GAAG,IAAI,GAAG,SAAc,EAChE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mCAAmC,CAAC;CAGnD;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IAEjB,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,MAAM,CAAC;IAEf,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,EAAE,MAAM,CAAC;IAEf,KAAK,EAAE,MAAM,CAAC;IAEd,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mCAAmC;IAClD,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAExB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,MAAM,CAAC,EAAE,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CAAmC,IAAI,mCAAmC,EAC/E,KAAK,iCAAiC,IAAI,iCAAiC,GAC5E,CAAC;CACH"}
|
package/resources/radar.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export declare class Radar extends APIResource {
|
|
|
10
10
|
*/
|
|
11
11
|
retrieveTrendingTopics(query?: RadarRetrieveTrendingTopicsParams | null | undefined, options?: RequestOptions): APIPromise<RadarRetrieveTrendingTopicsResponse>;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Trending topic with score, category, source, and region.
|
|
15
|
+
*/
|
|
13
16
|
export interface RadarItem {
|
|
14
17
|
category: string;
|
|
15
18
|
publishedAt: string;
|
|
@@ -46,7 +49,7 @@ export interface RadarRetrieveTrendingTopicsParams {
|
|
|
46
49
|
* Source filter. One of: github, google_trends, hacker_news, polymarket, reddit,
|
|
47
50
|
* trustmrr, wikipedia
|
|
48
51
|
*/
|
|
49
|
-
source?:
|
|
52
|
+
source?: 'github' | 'google_trends' | 'hacker_news' | 'polymarket' | 'reddit' | 'trustmrr' | 'wikipedia';
|
|
50
53
|
}
|
|
51
54
|
export declare namespace Radar {
|
|
52
55
|
export { type RadarItem as RadarItem, type RadarRetrieveTrendingTopicsResponse as RadarRetrieveTrendingTopicsResponse, type RadarRetrieveTrendingTopicsParams as RadarRetrieveTrendingTopicsParams, };
|
package/resources/radar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radar.d.ts","sourceRoot":"","sources":["../src/resources/radar.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,sBAAsB,CACpB,KAAK,GAAE,iCAAiC,GAAG,IAAI,GAAG,SAAc,EAChE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mCAAmC,CAAC;CAGnD;AAED,MAAM,WAAW,SA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d,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mCAAmC;IAClD,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAExB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,eAAe,GAAG,aAAa,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,CAAC;CAC1G;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,iCAAiC,IAAI,iCAAiC,GAC5E,CAAC;CACH"}
|
package/resources/shared.d.mts
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import * as TweetsAPI from "./x/tweets/tweets.mjs";
|
|
2
2
|
import * as UsersAPI from "./x/users/users.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Error response containing a machine-readable error code.
|
|
5
|
+
*/
|
|
3
6
|
export interface Error {
|
|
4
7
|
error: 'internal_error' | 'invalid_format' | 'invalid_id' | 'invalid_input' | 'invalid_params' | 'invalid_tool_type' | 'invalid_tweet_id' | 'invalid_tweet_url' | 'invalid_username' | 'missing_params' | 'missing_query' | 'monitor_already_exists' | 'monitor_limit_reached' | 'no_subscription' | 'not_found' | 'stream_registration_failed' | 'subscription_inactive' | 'tweet_not_found' | 'unauthenticated' | 'usage_limit_reached' | 'user_not_found' | 'webhook_inactive' | 'x_api_rate_limited' | 'x_api_unavailable' | 'x_api_unauthorized';
|
|
5
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Type of monitor event fired when account activity occurs.
|
|
11
|
+
*/
|
|
6
12
|
export type EventType = 'tweet.new' | 'tweet.reply' | 'tweet.retweet' | 'tweet.quote' | 'follower.gained' | 'follower.lost';
|
|
13
|
+
/**
|
|
14
|
+
* Paginated list of tweets with cursor-based navigation.
|
|
15
|
+
*/
|
|
7
16
|
export interface PaginatedTweets {
|
|
8
17
|
has_next_page: boolean;
|
|
9
18
|
next_cursor: string;
|
|
10
19
|
tweets: Array<TweetsAPI.SearchTweet>;
|
|
11
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Paginated list of user profiles with cursor-based navigation.
|
|
23
|
+
*/
|
|
12
24
|
export interface PaginatedUsers {
|
|
13
25
|
has_next_page: boolean;
|
|
14
26
|
next_cursor: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"OAEO,KAAK,SAAS;OACd,KAAK,QAAQ;AAEpB,MAAM,WAAW,KAAK;IACpB,KAAK,EACD,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,eAAe,GACf,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,mBAAmB,GACnB,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,wBAAwB,GACxB,uBAAuB,GACvB,iBAAiB,GACjB,WAAW,GACX,4BAA4B,GAC5B,uBAAuB,GACvB,iBAAiB,GACjB,iBAAiB,GACjB,qBAAqB,GACrB,gBAAgB,GAChB,kBAAkB,GAClB,oBAAoB,GACpB,mBAAmB,GACnB,oBAAoB,CAAC;CAC1B;AAED,MAAM,MAAM,SAAS,GACjB,WAAW,GACX,aAAa,GACb,eAAe,GACf,aAAa,GACb,iBAAiB,GACjB,eAAe,CAAC;AAEpB,MAAM,WAAW,eAA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,WAAW,CAAC,CAAC;CACpC"}
|
package/resources/shared.d.ts
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import * as TweetsAPI from "./x/tweets/tweets.js";
|
|
2
2
|
import * as UsersAPI from "./x/users/users.js";
|
|
3
|
+
/**
|
|
4
|
+
* Error response containing a machine-readable error code.
|
|
5
|
+
*/
|
|
3
6
|
export interface Error {
|
|
4
7
|
error: 'internal_error' | 'invalid_format' | 'invalid_id' | 'invalid_input' | 'invalid_params' | 'invalid_tool_type' | 'invalid_tweet_id' | 'invalid_tweet_url' | 'invalid_username' | 'missing_params' | 'missing_query' | 'monitor_already_exists' | 'monitor_limit_reached' | 'no_subscription' | 'not_found' | 'stream_registration_failed' | 'subscription_inactive' | 'tweet_not_found' | 'unauthenticated' | 'usage_limit_reached' | 'user_not_found' | 'webhook_inactive' | 'x_api_rate_limited' | 'x_api_unavailable' | 'x_api_unauthorized';
|
|
5
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Type of monitor event fired when account activity occurs.
|
|
11
|
+
*/
|
|
6
12
|
export type EventType = 'tweet.new' | 'tweet.reply' | 'tweet.retweet' | 'tweet.quote' | 'follower.gained' | 'follower.lost';
|
|
13
|
+
/**
|
|
14
|
+
* Paginated list of tweets with cursor-based navigation.
|
|
15
|
+
*/
|
|
7
16
|
export interface PaginatedTweets {
|
|
8
17
|
has_next_page: boolean;
|
|
9
18
|
next_cursor: string;
|
|
10
19
|
tweets: Array<TweetsAPI.SearchTweet>;
|
|
11
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Paginated list of user profiles with cursor-based navigation.
|
|
23
|
+
*/
|
|
12
24
|
export interface PaginatedUsers {
|
|
13
25
|
has_next_page: boolean;
|
|
14
26
|
next_cursor: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"OAEO,KAAK,SAAS;OACd,KAAK,QAAQ;AAEpB,MAAM,WAAW,KAAK;IACpB,KAAK,EACD,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,eAAe,GACf,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,mBAAmB,GACnB,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,wBAAwB,GACxB,uBAAuB,GACvB,iBAAiB,GACjB,WAAW,GACX,4BAA4B,GAC5B,uBAAuB,GACvB,iBAAiB,GACjB,iBAAiB,GACjB,qBAAqB,GACrB,gBAAgB,GAChB,kBAAkB,GAClB,oBAAoB,GACpB,mBAAmB,GACnB,oBAAoB,CAAC;CAC1B;AAED,MAAM,MAAM,SAAS,GACjB,WAAW,GACX,aAAa,GACb,eAAe,GACf,aAAa,GACb,iBAAiB,GACjB,eAAe,CAAC;AAEpB,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,OAAO,CAAC;IAEvB,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,OAAO,CAAC;IAEvB,WAAW,EAAE,MAAM,CAAC;IAEpB,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;CACpC"}
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"OAEO,KAAK,SAAS;OACd,KAAK,QAAQ;AAEpB;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,KAAK,EACD,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,eAAe,GACf,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,mBAAmB,GACnB,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,wBAAwB,GACxB,uBAAuB,GACvB,iBAAiB,GACjB,WAAW,GACX,4BAA4B,GAC5B,uBAAuB,GACvB,iBAAiB,GACjB,iBAAiB,GACjB,qBAAqB,GACrB,gBAAgB,GAChB,kBAAkB,GAClB,oBAAoB,GACpB,mBAAmB,GACnB,oBAAoB,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GACjB,WAAW,GACX,aAAa,GACb,eAAe,GACf,aAAa,GACb,iBAAiB,GACjB,eAAe,CAAC;AAEpB;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,OAAO,CAAC;IAEvB,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,OAAO,CAAC;IAEvB,WAAW,EAAE,MAAM,CAAC;IAEpB,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;CACpC"}
|
package/resources/styles.d.mts
CHANGED
|
@@ -7,33 +7,83 @@ import { RequestOptions } from "../internal/request-options.mjs";
|
|
|
7
7
|
export declare class Styles extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Get cached style profile
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const styleProfile = await client.styles.retrieve('id');
|
|
14
|
+
* ```
|
|
10
15
|
*/
|
|
11
|
-
retrieve(
|
|
16
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<StyleProfile>;
|
|
12
17
|
/**
|
|
13
18
|
* Save style profile with custom tweets
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const styleProfile = await client.styles.update('id', {
|
|
23
|
+
* label: 'Professional Voice',
|
|
24
|
+
* tweets: [
|
|
25
|
+
* {
|
|
26
|
+
* text: 'Excited to share our latest research findings.',
|
|
27
|
+
* },
|
|
28
|
+
* ],
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
14
31
|
*/
|
|
15
|
-
update(
|
|
32
|
+
update(id: string, body: StyleUpdateParams, options?: RequestOptions): APIPromise<StyleProfile>;
|
|
16
33
|
/**
|
|
17
34
|
* List cached style profiles
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const styles = await client.styles.list();
|
|
39
|
+
* ```
|
|
18
40
|
*/
|
|
19
41
|
list(options?: RequestOptions): APIPromise<StyleListResponse>;
|
|
20
42
|
/**
|
|
21
43
|
* Delete a style profile
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* await client.styles.delete('id');
|
|
48
|
+
* ```
|
|
22
49
|
*/
|
|
23
|
-
delete(
|
|
50
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
24
51
|
/**
|
|
25
52
|
* Analyze writing style from recent tweets
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const styleProfile = await client.styles.analyze({
|
|
57
|
+
* username: 'elonmusk',
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
26
60
|
*/
|
|
27
61
|
analyze(body: StyleAnalyzeParams, options?: RequestOptions): APIPromise<StyleProfile>;
|
|
28
62
|
/**
|
|
29
63
|
* Compare two style profiles
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const response = await client.styles.compare({
|
|
68
|
+
* username1: 'username1',
|
|
69
|
+
* username2: 'username2',
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
30
72
|
*/
|
|
31
73
|
compare(query: StyleCompareParams, options?: RequestOptions): APIPromise<StyleCompareResponse>;
|
|
32
74
|
/**
|
|
33
75
|
* Get engagement metrics for style tweets
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const response = await client.styles.getPerformance('id');
|
|
80
|
+
* ```
|
|
34
81
|
*/
|
|
35
|
-
getPerformance(
|
|
82
|
+
getPerformance(id: string, options?: RequestOptions): APIPromise<StyleGetPerformanceResponse>;
|
|
36
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Full style profile with sampled tweets used for tone analysis.
|
|
86
|
+
*/
|
|
37
87
|
export interface StyleProfile {
|
|
38
88
|
fetchedAt: string;
|
|
39
89
|
isOwnAccount: boolean;
|
|
@@ -49,6 +99,9 @@ export declare namespace StyleProfile {
|
|
|
49
99
|
createdAt?: string;
|
|
50
100
|
}
|
|
51
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Style profile summary with tweet count and ownership flag.
|
|
104
|
+
*/
|
|
52
105
|
export interface StyleProfileSummary {
|
|
53
106
|
fetchedAt: string;
|
|
54
107
|
isOwnAccount: boolean;
|
|
@@ -59,7 +112,13 @@ export interface StyleListResponse {
|
|
|
59
112
|
styles: Array<StyleProfileSummary>;
|
|
60
113
|
}
|
|
61
114
|
export interface StyleCompareResponse {
|
|
115
|
+
/**
|
|
116
|
+
* Full style profile with sampled tweets used for tone analysis.
|
|
117
|
+
*/
|
|
62
118
|
style1: StyleProfile;
|
|
119
|
+
/**
|
|
120
|
+
* Full style profile with sampled tweets used for tone analysis.
|
|
121
|
+
*/
|
|
63
122
|
style2: StyleProfile;
|
|
64
123
|
}
|
|
65
124
|
export interface StyleGetPerformanceResponse {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.mts","sourceRoot":"","sources":["../src/resources/styles.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"styles.d.mts","sourceRoot":"","sources":["../src/resources/styles.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,MA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M,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
package/resources/styles.d.ts
CHANGED
|
@@ -7,33 +7,83 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
7
7
|
export declare class Styles extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Get cached style profile
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const styleProfile = await client.styles.retrieve('id');
|
|
14
|
+
* ```
|
|
10
15
|
*/
|
|
11
|
-
retrieve(
|
|
16
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<StyleProfile>;
|
|
12
17
|
/**
|
|
13
18
|
* Save style profile with custom tweets
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const styleProfile = await client.styles.update('id', {
|
|
23
|
+
* label: 'Professional Voice',
|
|
24
|
+
* tweets: [
|
|
25
|
+
* {
|
|
26
|
+
* text: 'Excited to share our latest research findings.',
|
|
27
|
+
* },
|
|
28
|
+
* ],
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
14
31
|
*/
|
|
15
|
-
update(
|
|
32
|
+
update(id: string, body: StyleUpdateParams, options?: RequestOptions): APIPromise<StyleProfile>;
|
|
16
33
|
/**
|
|
17
34
|
* List cached style profiles
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const styles = await client.styles.list();
|
|
39
|
+
* ```
|
|
18
40
|
*/
|
|
19
41
|
list(options?: RequestOptions): APIPromise<StyleListResponse>;
|
|
20
42
|
/**
|
|
21
43
|
* Delete a style profile
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* await client.styles.delete('id');
|
|
48
|
+
* ```
|
|
22
49
|
*/
|
|
23
|
-
delete(
|
|
50
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
24
51
|
/**
|
|
25
52
|
* Analyze writing style from recent tweets
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const styleProfile = await client.styles.analyze({
|
|
57
|
+
* username: 'elonmusk',
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
26
60
|
*/
|
|
27
61
|
analyze(body: StyleAnalyzeParams, options?: RequestOptions): APIPromise<StyleProfile>;
|
|
28
62
|
/**
|
|
29
63
|
* Compare two style profiles
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const response = await client.styles.compare({
|
|
68
|
+
* username1: 'username1',
|
|
69
|
+
* username2: 'username2',
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
30
72
|
*/
|
|
31
73
|
compare(query: StyleCompareParams, options?: RequestOptions): APIPromise<StyleCompareResponse>;
|
|
32
74
|
/**
|
|
33
75
|
* Get engagement metrics for style tweets
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const response = await client.styles.getPerformance('id');
|
|
80
|
+
* ```
|
|
34
81
|
*/
|
|
35
|
-
getPerformance(
|
|
82
|
+
getPerformance(id: string, options?: RequestOptions): APIPromise<StyleGetPerformanceResponse>;
|
|
36
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Full style profile with sampled tweets used for tone analysis.
|
|
86
|
+
*/
|
|
37
87
|
export interface StyleProfile {
|
|
38
88
|
fetchedAt: string;
|
|
39
89
|
isOwnAccount: boolean;
|
|
@@ -49,6 +99,9 @@ export declare namespace StyleProfile {
|
|
|
49
99
|
createdAt?: string;
|
|
50
100
|
}
|
|
51
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Style profile summary with tweet count and ownership flag.
|
|
104
|
+
*/
|
|
52
105
|
export interface StyleProfileSummary {
|
|
53
106
|
fetchedAt: string;
|
|
54
107
|
isOwnAccount: boolean;
|
|
@@ -59,7 +112,13 @@ export interface StyleListResponse {
|
|
|
59
112
|
styles: Array<StyleProfileSummary>;
|
|
60
113
|
}
|
|
61
114
|
export interface StyleCompareResponse {
|
|
115
|
+
/**
|
|
116
|
+
* Full style profile with sampled tweets used for tone analysis.
|
|
117
|
+
*/
|
|
62
118
|
style1: StyleProfile;
|
|
119
|
+
/**
|
|
120
|
+
* Full style profile with sampled tweets used for tone analysis.
|
|
121
|
+
*/
|
|
63
122
|
style2: StyleProfile;
|
|
64
123
|
}
|
|
65
124
|
export interface StyleGetPerformanceResponse {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/resources/styles.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/resources/styles.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAIxE;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAA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