x-twitter-scraper 0.3.1 → 0.3.3
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 +16 -0
- package/README.md +8 -5
- package/package.json +16 -16
- package/resources/x/accounts.d.mts +10 -10
- package/resources/x/accounts.d.ts +10 -10
- package/src/resources/x/accounts.ts +10 -10
- 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/integrations.d.mts +0 -192
- package/resources/integrations.d.mts.map +0 -1
- package/resources/integrations.d.ts +0 -192
- package/resources/integrations.d.ts.map +0 -1
- package/resources/integrations.js +0 -102
- package/resources/integrations.js.map +0 -1
- package/resources/integrations.mjs +0 -98
- package/resources/integrations.mjs.map +0 -1
- package/src/resources/integrations.ts +0 -260
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.3 (2026-05-10)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.3.2...v0.3.3](https://github.com/Xquik-dev/x-twitter-scraper-typescript/compare/v0.3.2...v0.3.3)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* include bug tracker metadata in the npm package
|
|
10
|
+
|
|
11
|
+
## 0.3.2 (2026-05-05)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.3.1...v0.3.2](https://github.com/Xquik-dev/x-twitter-scraper-typescript/compare/v0.3.1...v0.3.2)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* remove stale integrations resource from the TypeScript SDK package
|
|
18
|
+
|
|
3
19
|
## 0.3.1 (2026-05-05)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v0.3.0...v0.3.1](https://github.com/Xquik-dev/x-twitter-scraper-typescript/compare/v0.3.0...v0.3.1)
|
package/README.md
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# X (Twitter) Scraper TypeScript SDK: Tweet Search, Profile Tweets, Followers & Posting
|
|
2
|
+
|
|
3
|
+
[](https://deepwiki.com/Xquik-dev/x-twitter-scraper-typescript)
|
|
4
|
+
<a href="https://nothumansearch.ai/site/xquik.com" target="_blank" rel="noopener"><img src="https://nothumansearch.ai/badge/xquik.com.svg" alt="NHS Agentic Readiness Score" height="28"></a>
|
|
2
5
|
|
|
3
6
|
[>)](https://npmjs.org/package/x-twitter-scraper) 
|
|
4
7
|
|
|
5
|
-
Xquik TypeScript SDK for the X (Twitter) Scraper API
|
|
8
|
+
Xquik TypeScript SDK for the X (Twitter) Scraper API, a Twitter API SDK and X API alternative for typed tweet search, advanced Twitter search queries, profile tweets, user lookup, follower export, media download, media upload, monitoring, webhooks, MCP, and posting automation.
|
|
6
9
|
|
|
7
|
-
Use it to search tweets,
|
|
10
|
+
Use it to get tweets from profiles, search tweets by keyword or operator query, send tweets, post replies, like, repost, follow, DM, run giveaway draws, and connect AI agents to X data without maintaining scraping infrastructure.
|
|
8
11
|
|
|
9
12
|
[SDK API](api.md) | [REST API Docs](https://docs.xquik.com/api-reference/overview) | [OpenAPI Spec](https://xquik.com/openapi.json) | [Webhooks](https://docs.xquik.com/api-reference/webhooks/create) | [MCP Server](https://xquik.com/mcp) | [Python SDK](https://github.com/Xquik-dev/x-twitter-scraper-python)
|
|
10
13
|
|
|
11
14
|
It is generated with [Stainless](https://www.stainless.com/).
|
|
12
15
|
|
|
13
|
-
## Tweet Search & User Lookup
|
|
16
|
+
## Tweet Search, Profile Tweets & User Lookup
|
|
14
17
|
|
|
15
|
-
Build TypeScript services that search tweets, fetch user profiles, check follower relationships, download media, and inspect timeline data through one typed REST client.
|
|
18
|
+
Build TypeScript services that search tweets, get tweets from profiles, fetch user profiles, check follower relationships, export followers, download media, and inspect timeline data through one typed REST client.
|
|
16
19
|
|
|
17
20
|
## Real-Time Monitoring & Webhooks
|
|
18
21
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-twitter-scraper",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Official TypeScript SDK for the Xquik X (Twitter) Scraper API, webhooks, monitoring, and agent workflows",
|
|
5
5
|
"author": "X Twitter Scraper <support@xquik.com>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"type": "commonjs",
|
|
9
9
|
"homepage": "https://docs.xquik.com/sdks/typescript",
|
|
10
|
-
"repository":
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/Xquik-dev/x-twitter-scraper-typescript.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/Xquik-dev/x-twitter-scraper-typescript/issues"
|
|
16
|
+
},
|
|
11
17
|
"keywords": [
|
|
12
18
|
"x-api",
|
|
13
19
|
"twitter-api",
|
|
@@ -23,7 +29,6 @@
|
|
|
23
29
|
"social-media-api"
|
|
24
30
|
],
|
|
25
31
|
"license": "Apache-2.0",
|
|
26
|
-
"packageManager": "pnpm@10.30.1",
|
|
27
32
|
"files": [
|
|
28
33
|
"**/*"
|
|
29
34
|
],
|
|
@@ -31,23 +36,10 @@
|
|
|
31
36
|
"publishConfig": {
|
|
32
37
|
"access": "public"
|
|
33
38
|
},
|
|
34
|
-
"scripts": {
|
|
35
|
-
"test": "./scripts/test",
|
|
36
|
-
"build": "./scripts/build",
|
|
37
|
-
"format": "./scripts/format",
|
|
38
|
-
"tsn": "ts-node -r tsconfig-paths/register",
|
|
39
|
-
"lint": "./scripts/lint",
|
|
40
|
-
"fix": "./scripts/format"
|
|
41
|
-
},
|
|
42
39
|
"dependencies": {},
|
|
43
40
|
"overrides": {
|
|
44
41
|
"minimatch": "^9.0.5"
|
|
45
42
|
},
|
|
46
|
-
"pnpm": {
|
|
47
|
-
"overrides": {
|
|
48
|
-
"minimatch": "^9.0.5"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
43
|
"resolutions": {
|
|
52
44
|
"minimatch": "^9.0.5"
|
|
53
45
|
},
|
|
@@ -160,5 +152,13 @@
|
|
|
160
152
|
"./version.mjs": {
|
|
161
153
|
"default": "./version.mjs"
|
|
162
154
|
}
|
|
155
|
+
},
|
|
156
|
+
"scripts": {
|
|
157
|
+
"test": "./scripts/test",
|
|
158
|
+
"build": "./scripts/build",
|
|
159
|
+
"format": "./scripts/format",
|
|
160
|
+
"tsn": "ts-node -r tsconfig-paths/register",
|
|
161
|
+
"lint": "./scripts/lint",
|
|
162
|
+
"fix": "./scripts/format"
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -104,8 +104,8 @@ export interface XAccountDetail {
|
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* Sanitized X account summary returned by connect and reauth. Includes an optional
|
|
107
|
-
* `loginCountry` field surfaced only when the
|
|
108
|
-
*
|
|
107
|
+
* `loginCountry` field surfaced only when the selected login region was
|
|
108
|
+
* temporarily unavailable and the login used a one-time US session for this
|
|
109
109
|
* one-time action. Future activity continues to use the selected `proxy_country`;
|
|
110
110
|
* the field is omitted on normal logins.
|
|
111
111
|
*/
|
|
@@ -117,9 +117,9 @@ export interface AccountCreateResponse {
|
|
|
117
117
|
xUserId: string;
|
|
118
118
|
xUsername: string;
|
|
119
119
|
/**
|
|
120
|
-
* ISO-3166-1 alpha-2 country code of the
|
|
121
|
-
* login. Present only when the US fallback was triggered because
|
|
122
|
-
*
|
|
120
|
+
* ISO-3166-1 alpha-2 country code of the login service session used for this
|
|
121
|
+
* login. Present only when the US fallback was triggered because the selected
|
|
122
|
+
* login region was temporarily unavailable. Omitted otherwise.
|
|
123
123
|
*/
|
|
124
124
|
loginCountry?: string;
|
|
125
125
|
}
|
|
@@ -137,8 +137,8 @@ export interface AccountBulkRetryResponse {
|
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
139
139
|
* Sanitized X account summary returned by connect and reauth. Includes an optional
|
|
140
|
-
* `loginCountry` field surfaced only when the
|
|
141
|
-
*
|
|
140
|
+
* `loginCountry` field surfaced only when the selected login region was
|
|
141
|
+
* temporarily unavailable and the login used a one-time US session for this
|
|
142
142
|
* one-time action. Future activity continues to use the selected `proxy_country`;
|
|
143
143
|
* the field is omitted on normal logins.
|
|
144
144
|
*/
|
|
@@ -150,9 +150,9 @@ export interface AccountReauthResponse {
|
|
|
150
150
|
xUserId: string;
|
|
151
151
|
xUsername: string;
|
|
152
152
|
/**
|
|
153
|
-
* ISO-3166-1 alpha-2 country code of the
|
|
154
|
-
* login. Present only when the US fallback was triggered because
|
|
155
|
-
*
|
|
153
|
+
* ISO-3166-1 alpha-2 country code of the login service session used for this
|
|
154
|
+
* login. Present only when the US fallback was triggered because the selected
|
|
155
|
+
* login region was temporarily unavailable. Omitted otherwise.
|
|
156
156
|
*/
|
|
157
157
|
loginCountry?: string;
|
|
158
158
|
}
|
|
@@ -104,8 +104,8 @@ export interface XAccountDetail {
|
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* Sanitized X account summary returned by connect and reauth. Includes an optional
|
|
107
|
-
* `loginCountry` field surfaced only when the
|
|
108
|
-
*
|
|
107
|
+
* `loginCountry` field surfaced only when the selected login region was
|
|
108
|
+
* temporarily unavailable and the login used a one-time US session for this
|
|
109
109
|
* one-time action. Future activity continues to use the selected `proxy_country`;
|
|
110
110
|
* the field is omitted on normal logins.
|
|
111
111
|
*/
|
|
@@ -117,9 +117,9 @@ export interface AccountCreateResponse {
|
|
|
117
117
|
xUserId: string;
|
|
118
118
|
xUsername: string;
|
|
119
119
|
/**
|
|
120
|
-
* ISO-3166-1 alpha-2 country code of the
|
|
121
|
-
* login. Present only when the US fallback was triggered because
|
|
122
|
-
*
|
|
120
|
+
* ISO-3166-1 alpha-2 country code of the login service session used for this
|
|
121
|
+
* login. Present only when the US fallback was triggered because the selected
|
|
122
|
+
* login region was temporarily unavailable. Omitted otherwise.
|
|
123
123
|
*/
|
|
124
124
|
loginCountry?: string;
|
|
125
125
|
}
|
|
@@ -137,8 +137,8 @@ export interface AccountBulkRetryResponse {
|
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
139
139
|
* Sanitized X account summary returned by connect and reauth. Includes an optional
|
|
140
|
-
* `loginCountry` field surfaced only when the
|
|
141
|
-
*
|
|
140
|
+
* `loginCountry` field surfaced only when the selected login region was
|
|
141
|
+
* temporarily unavailable and the login used a one-time US session for this
|
|
142
142
|
* one-time action. Future activity continues to use the selected `proxy_country`;
|
|
143
143
|
* the field is omitted on normal logins.
|
|
144
144
|
*/
|
|
@@ -150,9 +150,9 @@ export interface AccountReauthResponse {
|
|
|
150
150
|
xUserId: string;
|
|
151
151
|
xUsername: string;
|
|
152
152
|
/**
|
|
153
|
-
* ISO-3166-1 alpha-2 country code of the
|
|
154
|
-
* login. Present only when the US fallback was triggered because
|
|
155
|
-
*
|
|
153
|
+
* ISO-3166-1 alpha-2 country code of the login service session used for this
|
|
154
|
+
* login. Present only when the US fallback was triggered because the selected
|
|
155
|
+
* login region was temporarily unavailable. Omitted otherwise.
|
|
156
156
|
*/
|
|
157
157
|
loginCountry?: string;
|
|
158
158
|
}
|
|
@@ -141,8 +141,8 @@ export interface XAccountDetail {
|
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
143
|
* Sanitized X account summary returned by connect and reauth. Includes an optional
|
|
144
|
-
* `loginCountry` field surfaced only when the
|
|
145
|
-
*
|
|
144
|
+
* `loginCountry` field surfaced only when the selected login region was
|
|
145
|
+
* temporarily unavailable and the login used a one-time US session for this
|
|
146
146
|
* one-time action. Future activity continues to use the selected `proxy_country`;
|
|
147
147
|
* the field is omitted on normal logins.
|
|
148
148
|
*/
|
|
@@ -160,9 +160,9 @@ export interface AccountCreateResponse {
|
|
|
160
160
|
xUsername: string;
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
|
-
* ISO-3166-1 alpha-2 country code of the
|
|
164
|
-
* login. Present only when the US fallback was triggered because
|
|
165
|
-
*
|
|
163
|
+
* ISO-3166-1 alpha-2 country code of the login service session used for this
|
|
164
|
+
* login. Present only when the US fallback was triggered because the selected
|
|
165
|
+
* login region was temporarily unavailable. Omitted otherwise.
|
|
166
166
|
*/
|
|
167
167
|
loginCountry?: string;
|
|
168
168
|
}
|
|
@@ -184,8 +184,8 @@ export interface AccountBulkRetryResponse {
|
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
186
|
* Sanitized X account summary returned by connect and reauth. Includes an optional
|
|
187
|
-
* `loginCountry` field surfaced only when the
|
|
188
|
-
*
|
|
187
|
+
* `loginCountry` field surfaced only when the selected login region was
|
|
188
|
+
* temporarily unavailable and the login used a one-time US session for this
|
|
189
189
|
* one-time action. Future activity continues to use the selected `proxy_country`;
|
|
190
190
|
* the field is omitted on normal logins.
|
|
191
191
|
*/
|
|
@@ -203,9 +203,9 @@ export interface AccountReauthResponse {
|
|
|
203
203
|
xUsername: string;
|
|
204
204
|
|
|
205
205
|
/**
|
|
206
|
-
* ISO-3166-1 alpha-2 country code of the
|
|
207
|
-
* login. Present only when the US fallback was triggered because
|
|
208
|
-
*
|
|
206
|
+
* ISO-3166-1 alpha-2 country code of the login service session used for this
|
|
207
|
+
* login. Present only when the US fallback was triggered because the selected
|
|
208
|
+
* login region was temporarily unavailable. Omitted otherwise.
|
|
209
209
|
*/
|
|
210
210
|
loginCountry?: string;
|
|
211
211
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.3.
|
|
1
|
+
export const VERSION = '0.3.3'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.3.
|
|
1
|
+
export declare const VERSION = "0.3.3";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.3.
|
|
1
|
+
export declare const VERSION = "0.3.3";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.3.
|
|
1
|
+
export const VERSION = '0.3.3'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import * as Shared from "./shared.mjs";
|
|
3
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Push notification integrations (Telegram)
|
|
7
|
-
*/
|
|
8
|
-
export declare class Integrations extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Create integration
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const integration = await client.integrations.create({
|
|
15
|
-
* config: { chatId: '-1001234567890' },
|
|
16
|
-
* eventTypes: ['tweet.new', 'follower.gained'],
|
|
17
|
-
* name: 'My Telegram Bot',
|
|
18
|
-
* type: 'telegram',
|
|
19
|
-
* });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
create(body: IntegrationCreateParams, options?: RequestOptions): APIPromise<Integration>;
|
|
23
|
-
/**
|
|
24
|
-
* Get integration details
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const integration = await client.integrations.retrieve(
|
|
29
|
-
* 'id',
|
|
30
|
-
* );
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<Integration>;
|
|
34
|
-
/**
|
|
35
|
-
* Update integration
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* const integration = await client.integrations.update('id', {
|
|
40
|
-
* isActive: true,
|
|
41
|
-
* name: 'My Telegram Bot',
|
|
42
|
-
* });
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
update(id: string, body: IntegrationUpdateParams, options?: RequestOptions): APIPromise<Integration>;
|
|
46
|
-
/**
|
|
47
|
-
* List integrations
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* const integrations = await client.integrations.list();
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
list(options?: RequestOptions): APIPromise<IntegrationListResponse>;
|
|
55
|
-
/**
|
|
56
|
-
* Delete integration
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* const integration = await client.integrations.delete('id');
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
delete(id: string, options?: RequestOptions): APIPromise<IntegrationDeleteResponse>;
|
|
64
|
-
/**
|
|
65
|
-
* List integration delivery history
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```ts
|
|
69
|
-
* const response = await client.integrations.listDeliveries(
|
|
70
|
-
* 'id',
|
|
71
|
-
* );
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
listDeliveries(id: string, query?: IntegrationListDeliveriesParams | null | undefined, options?: RequestOptions): APIPromise<IntegrationListDeliveriesResponse>;
|
|
75
|
-
/**
|
|
76
|
-
* Send test delivery
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* ```ts
|
|
80
|
-
* const response = await client.integrations.sendTest('id');
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
sendTest(id: string, options?: RequestOptions): APIPromise<IntegrationSendTestResponse>;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Third-party integration (e.g. Telegram) subscribed to monitor events.
|
|
87
|
-
*/
|
|
88
|
-
export interface Integration {
|
|
89
|
-
id: string;
|
|
90
|
-
/**
|
|
91
|
-
* Integration config — shape varies by type (JSON)
|
|
92
|
-
*/
|
|
93
|
-
config: {
|
|
94
|
-
[key: string]: unknown;
|
|
95
|
-
};
|
|
96
|
-
createdAt: string;
|
|
97
|
-
/**
|
|
98
|
-
* Array of event types to subscribe to.
|
|
99
|
-
*/
|
|
100
|
-
eventTypes: Array<Shared.EventType>;
|
|
101
|
-
isActive: boolean;
|
|
102
|
-
name: string;
|
|
103
|
-
type: 'telegram';
|
|
104
|
-
/**
|
|
105
|
-
* Event filter rules (JSON)
|
|
106
|
-
*/
|
|
107
|
-
filters?: {
|
|
108
|
-
[key: string]: unknown;
|
|
109
|
-
};
|
|
110
|
-
messageTemplate?: string;
|
|
111
|
-
scopeAllMonitors?: boolean;
|
|
112
|
-
silentPush?: boolean;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Integration delivery attempt record with status and retry count.
|
|
116
|
-
*/
|
|
117
|
-
export interface IntegrationDelivery {
|
|
118
|
-
id: string;
|
|
119
|
-
attempts: number;
|
|
120
|
-
createdAt: string;
|
|
121
|
-
eventType: string;
|
|
122
|
-
status: string;
|
|
123
|
-
deliveredAt?: string;
|
|
124
|
-
lastError?: string;
|
|
125
|
-
lastStatusCode?: number;
|
|
126
|
-
sourceId?: string;
|
|
127
|
-
sourceType?: string;
|
|
128
|
-
}
|
|
129
|
-
export interface IntegrationListResponse {
|
|
130
|
-
integrations: Array<Integration>;
|
|
131
|
-
}
|
|
132
|
-
export interface IntegrationDeleteResponse {
|
|
133
|
-
success: true;
|
|
134
|
-
}
|
|
135
|
-
export interface IntegrationListDeliveriesResponse {
|
|
136
|
-
deliveries: Array<IntegrationDelivery>;
|
|
137
|
-
}
|
|
138
|
-
export interface IntegrationSendTestResponse {
|
|
139
|
-
success: true;
|
|
140
|
-
}
|
|
141
|
-
export interface IntegrationCreateParams {
|
|
142
|
-
/**
|
|
143
|
-
* Integration config (e.g. Telegram chatId)
|
|
144
|
-
*/
|
|
145
|
-
config: IntegrationCreateParams.Config;
|
|
146
|
-
/**
|
|
147
|
-
* Array of event types to subscribe to.
|
|
148
|
-
*/
|
|
149
|
-
eventTypes: Array<Shared.EventType>;
|
|
150
|
-
name: string;
|
|
151
|
-
type: 'telegram';
|
|
152
|
-
}
|
|
153
|
-
export declare namespace IntegrationCreateParams {
|
|
154
|
-
/**
|
|
155
|
-
* Integration config (e.g. Telegram chatId)
|
|
156
|
-
*/
|
|
157
|
-
interface Config {
|
|
158
|
-
chatId: string;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
export interface IntegrationUpdateParams {
|
|
162
|
-
/**
|
|
163
|
-
* Array of event types to subscribe to.
|
|
164
|
-
*/
|
|
165
|
-
eventTypes?: Array<Shared.EventType>;
|
|
166
|
-
/**
|
|
167
|
-
* Event filter rules (JSON)
|
|
168
|
-
*/
|
|
169
|
-
filters?: {
|
|
170
|
-
[key: string]: unknown;
|
|
171
|
-
};
|
|
172
|
-
isActive?: boolean;
|
|
173
|
-
/**
|
|
174
|
-
* Custom message template (JSON)
|
|
175
|
-
*/
|
|
176
|
-
messageTemplate?: {
|
|
177
|
-
[key: string]: unknown;
|
|
178
|
-
};
|
|
179
|
-
name?: string;
|
|
180
|
-
scopeAllMonitors?: boolean;
|
|
181
|
-
silentPush?: boolean;
|
|
182
|
-
}
|
|
183
|
-
export interface IntegrationListDeliveriesParams {
|
|
184
|
-
/**
|
|
185
|
-
* Maximum number of items to return (1-100, default 50)
|
|
186
|
-
*/
|
|
187
|
-
limit?: number;
|
|
188
|
-
}
|
|
189
|
-
export declare namespace Integrations {
|
|
190
|
-
export { type Integration as Integration, type IntegrationDelivery as IntegrationDelivery, type IntegrationListResponse as IntegrationListResponse, type IntegrationDeleteResponse as IntegrationDeleteResponse, type IntegrationListDeliveriesResponse as IntegrationListDeliveriesResponse, type IntegrationSendTestResponse as IntegrationSendTestResponse, type IntegrationCreateParams as IntegrationCreateParams, type IntegrationUpdateParams as IntegrationUpdateParams, type IntegrationListDeliveriesParams as IntegrationListDeliveriesParams, };
|
|
191
|
-
}
|
|
192
|
-
//# sourceMappingURL=integrations.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.d.mts","sourceRoot":"","sources":["../src/resources/integrations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIxF;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIvE;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIpG;;;;;;;OAOG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAInE;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,yBAAyB,CAAC;IAInF;;;;;;;;;OASG;IACH,cAAc,CACZ,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,+BAA+B,GAAG,IAAI,GAAG,SAAc,EAC9D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;IAIhD;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;CAGxF;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;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
|
|
1
|
-
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import * as Shared from "./shared.js";
|
|
3
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
4
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
-
/**
|
|
6
|
-
* Push notification integrations (Telegram)
|
|
7
|
-
*/
|
|
8
|
-
export declare class Integrations extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Create integration
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const integration = await client.integrations.create({
|
|
15
|
-
* config: { chatId: '-1001234567890' },
|
|
16
|
-
* eventTypes: ['tweet.new', 'follower.gained'],
|
|
17
|
-
* name: 'My Telegram Bot',
|
|
18
|
-
* type: 'telegram',
|
|
19
|
-
* });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
create(body: IntegrationCreateParams, options?: RequestOptions): APIPromise<Integration>;
|
|
23
|
-
/**
|
|
24
|
-
* Get integration details
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const integration = await client.integrations.retrieve(
|
|
29
|
-
* 'id',
|
|
30
|
-
* );
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<Integration>;
|
|
34
|
-
/**
|
|
35
|
-
* Update integration
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* const integration = await client.integrations.update('id', {
|
|
40
|
-
* isActive: true,
|
|
41
|
-
* name: 'My Telegram Bot',
|
|
42
|
-
* });
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
update(id: string, body: IntegrationUpdateParams, options?: RequestOptions): APIPromise<Integration>;
|
|
46
|
-
/**
|
|
47
|
-
* List integrations
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* const integrations = await client.integrations.list();
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
list(options?: RequestOptions): APIPromise<IntegrationListResponse>;
|
|
55
|
-
/**
|
|
56
|
-
* Delete integration
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* const integration = await client.integrations.delete('id');
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
delete(id: string, options?: RequestOptions): APIPromise<IntegrationDeleteResponse>;
|
|
64
|
-
/**
|
|
65
|
-
* List integration delivery history
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```ts
|
|
69
|
-
* const response = await client.integrations.listDeliveries(
|
|
70
|
-
* 'id',
|
|
71
|
-
* );
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
listDeliveries(id: string, query?: IntegrationListDeliveriesParams | null | undefined, options?: RequestOptions): APIPromise<IntegrationListDeliveriesResponse>;
|
|
75
|
-
/**
|
|
76
|
-
* Send test delivery
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* ```ts
|
|
80
|
-
* const response = await client.integrations.sendTest('id');
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
sendTest(id: string, options?: RequestOptions): APIPromise<IntegrationSendTestResponse>;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Third-party integration (e.g. Telegram) subscribed to monitor events.
|
|
87
|
-
*/
|
|
88
|
-
export interface Integration {
|
|
89
|
-
id: string;
|
|
90
|
-
/**
|
|
91
|
-
* Integration config — shape varies by type (JSON)
|
|
92
|
-
*/
|
|
93
|
-
config: {
|
|
94
|
-
[key: string]: unknown;
|
|
95
|
-
};
|
|
96
|
-
createdAt: string;
|
|
97
|
-
/**
|
|
98
|
-
* Array of event types to subscribe to.
|
|
99
|
-
*/
|
|
100
|
-
eventTypes: Array<Shared.EventType>;
|
|
101
|
-
isActive: boolean;
|
|
102
|
-
name: string;
|
|
103
|
-
type: 'telegram';
|
|
104
|
-
/**
|
|
105
|
-
* Event filter rules (JSON)
|
|
106
|
-
*/
|
|
107
|
-
filters?: {
|
|
108
|
-
[key: string]: unknown;
|
|
109
|
-
};
|
|
110
|
-
messageTemplate?: string;
|
|
111
|
-
scopeAllMonitors?: boolean;
|
|
112
|
-
silentPush?: boolean;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Integration delivery attempt record with status and retry count.
|
|
116
|
-
*/
|
|
117
|
-
export interface IntegrationDelivery {
|
|
118
|
-
id: string;
|
|
119
|
-
attempts: number;
|
|
120
|
-
createdAt: string;
|
|
121
|
-
eventType: string;
|
|
122
|
-
status: string;
|
|
123
|
-
deliveredAt?: string;
|
|
124
|
-
lastError?: string;
|
|
125
|
-
lastStatusCode?: number;
|
|
126
|
-
sourceId?: string;
|
|
127
|
-
sourceType?: string;
|
|
128
|
-
}
|
|
129
|
-
export interface IntegrationListResponse {
|
|
130
|
-
integrations: Array<Integration>;
|
|
131
|
-
}
|
|
132
|
-
export interface IntegrationDeleteResponse {
|
|
133
|
-
success: true;
|
|
134
|
-
}
|
|
135
|
-
export interface IntegrationListDeliveriesResponse {
|
|
136
|
-
deliveries: Array<IntegrationDelivery>;
|
|
137
|
-
}
|
|
138
|
-
export interface IntegrationSendTestResponse {
|
|
139
|
-
success: true;
|
|
140
|
-
}
|
|
141
|
-
export interface IntegrationCreateParams {
|
|
142
|
-
/**
|
|
143
|
-
* Integration config (e.g. Telegram chatId)
|
|
144
|
-
*/
|
|
145
|
-
config: IntegrationCreateParams.Config;
|
|
146
|
-
/**
|
|
147
|
-
* Array of event types to subscribe to.
|
|
148
|
-
*/
|
|
149
|
-
eventTypes: Array<Shared.EventType>;
|
|
150
|
-
name: string;
|
|
151
|
-
type: 'telegram';
|
|
152
|
-
}
|
|
153
|
-
export declare namespace IntegrationCreateParams {
|
|
154
|
-
/**
|
|
155
|
-
* Integration config (e.g. Telegram chatId)
|
|
156
|
-
*/
|
|
157
|
-
interface Config {
|
|
158
|
-
chatId: string;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
export interface IntegrationUpdateParams {
|
|
162
|
-
/**
|
|
163
|
-
* Array of event types to subscribe to.
|
|
164
|
-
*/
|
|
165
|
-
eventTypes?: Array<Shared.EventType>;
|
|
166
|
-
/**
|
|
167
|
-
* Event filter rules (JSON)
|
|
168
|
-
*/
|
|
169
|
-
filters?: {
|
|
170
|
-
[key: string]: unknown;
|
|
171
|
-
};
|
|
172
|
-
isActive?: boolean;
|
|
173
|
-
/**
|
|
174
|
-
* Custom message template (JSON)
|
|
175
|
-
*/
|
|
176
|
-
messageTemplate?: {
|
|
177
|
-
[key: string]: unknown;
|
|
178
|
-
};
|
|
179
|
-
name?: string;
|
|
180
|
-
scopeAllMonitors?: boolean;
|
|
181
|
-
silentPush?: boolean;
|
|
182
|
-
}
|
|
183
|
-
export interface IntegrationListDeliveriesParams {
|
|
184
|
-
/**
|
|
185
|
-
* Maximum number of items to return (1-100, default 50)
|
|
186
|
-
*/
|
|
187
|
-
limit?: number;
|
|
188
|
-
}
|
|
189
|
-
export declare namespace Integrations {
|
|
190
|
-
export { type Integration as Integration, type IntegrationDelivery as IntegrationDelivery, type IntegrationListResponse as IntegrationListResponse, type IntegrationDeleteResponse as IntegrationDeleteResponse, type IntegrationListDeliveriesResponse as IntegrationListDeliveriesResponse, type IntegrationSendTestResponse as IntegrationSendTestResponse, type IntegrationCreateParams as IntegrationCreateParams, type IntegrationUpdateParams as IntegrationUpdateParams, type IntegrationListDeliveriesParams as IntegrationListDeliveriesParams, };
|
|
191
|
-
}
|
|
192
|
-
//# sourceMappingURL=integrations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../src/resources/integrations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,YAAa,SAAQ,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AAW,uBAAuB;IACtC;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAErC;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAErC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,eAAe,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE7C,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Integrations = void 0;
|
|
5
|
-
const resource_1 = require("../core/resource.js");
|
|
6
|
-
const path_1 = require("../internal/utils/path.js");
|
|
7
|
-
/**
|
|
8
|
-
* Push notification integrations (Telegram)
|
|
9
|
-
*/
|
|
10
|
-
class Integrations extends resource_1.APIResource {
|
|
11
|
-
/**
|
|
12
|
-
* Create integration
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const integration = await client.integrations.create({
|
|
17
|
-
* config: { chatId: '-1001234567890' },
|
|
18
|
-
* eventTypes: ['tweet.new', 'follower.gained'],
|
|
19
|
-
* name: 'My Telegram Bot',
|
|
20
|
-
* type: 'telegram',
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
create(body, options) {
|
|
25
|
-
return this._client.post('/integrations', { body, ...options });
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Get integration details
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* const integration = await client.integrations.retrieve(
|
|
33
|
-
* 'id',
|
|
34
|
-
* );
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
retrieve(id, options) {
|
|
38
|
-
return this._client.get((0, path_1.path) `/integrations/${id}`, options);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Update integration
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```ts
|
|
45
|
-
* const integration = await client.integrations.update('id', {
|
|
46
|
-
* isActive: true,
|
|
47
|
-
* name: 'My Telegram Bot',
|
|
48
|
-
* });
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
update(id, body, options) {
|
|
52
|
-
return this._client.patch((0, path_1.path) `/integrations/${id}`, { body, ...options });
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* List integrations
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* ```ts
|
|
59
|
-
* const integrations = await client.integrations.list();
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
|
-
list(options) {
|
|
63
|
-
return this._client.get('/integrations', options);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Delete integration
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```ts
|
|
70
|
-
* const integration = await client.integrations.delete('id');
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
|
-
delete(id, options) {
|
|
74
|
-
return this._client.delete((0, path_1.path) `/integrations/${id}`, options);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* List integration delivery history
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* ```ts
|
|
81
|
-
* const response = await client.integrations.listDeliveries(
|
|
82
|
-
* 'id',
|
|
83
|
-
* );
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
|
-
listDeliveries(id, query = {}, options) {
|
|
87
|
-
return this._client.get((0, path_1.path) `/integrations/${id}/deliveries`, { query, ...options });
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Send test delivery
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* ```ts
|
|
94
|
-
* const response = await client.integrations.sendTest('id');
|
|
95
|
-
* ```
|
|
96
|
-
*/
|
|
97
|
-
sendTest(id, options) {
|
|
98
|
-
return this._client.post((0, path_1.path) `/integrations/${id}/test`, options);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
exports.Integrations = Integrations;
|
|
102
|
-
//# sourceMappingURL=integrations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.js","sourceRoot":"","sources":["../src/resources/integrations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,iBAAiB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,IAA6B,EAAE,OAAwB;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,iBAAiB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,iBAAiB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACH,cAAc,CACZ,EAAU,EACV,QAA4D,EAAE,EAC9D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,iBAAiB,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,iBAAiB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF;AApGD,oCAoGC"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../core/resource.mjs";
|
|
3
|
-
import { path } from "../internal/utils/path.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* Push notification integrations (Telegram)
|
|
6
|
-
*/
|
|
7
|
-
export class Integrations extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Create integration
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const integration = await client.integrations.create({
|
|
14
|
-
* config: { chatId: '-1001234567890' },
|
|
15
|
-
* eventTypes: ['tweet.new', 'follower.gained'],
|
|
16
|
-
* name: 'My Telegram Bot',
|
|
17
|
-
* type: 'telegram',
|
|
18
|
-
* });
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
create(body, options) {
|
|
22
|
-
return this._client.post('/integrations', { body, ...options });
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Get integration details
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```ts
|
|
29
|
-
* const integration = await client.integrations.retrieve(
|
|
30
|
-
* 'id',
|
|
31
|
-
* );
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
retrieve(id, options) {
|
|
35
|
-
return this._client.get(path `/integrations/${id}`, options);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Update integration
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* ```ts
|
|
42
|
-
* const integration = await client.integrations.update('id', {
|
|
43
|
-
* isActive: true,
|
|
44
|
-
* name: 'My Telegram Bot',
|
|
45
|
-
* });
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
update(id, body, options) {
|
|
49
|
-
return this._client.patch(path `/integrations/${id}`, { body, ...options });
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* List integrations
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```ts
|
|
56
|
-
* const integrations = await client.integrations.list();
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
list(options) {
|
|
60
|
-
return this._client.get('/integrations', options);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Delete integration
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* ```ts
|
|
67
|
-
* const integration = await client.integrations.delete('id');
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
delete(id, options) {
|
|
71
|
-
return this._client.delete(path `/integrations/${id}`, options);
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* List integration delivery history
|
|
75
|
-
*
|
|
76
|
-
* @example
|
|
77
|
-
* ```ts
|
|
78
|
-
* const response = await client.integrations.listDeliveries(
|
|
79
|
-
* 'id',
|
|
80
|
-
* );
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
listDeliveries(id, query = {}, options) {
|
|
84
|
-
return this._client.get(path `/integrations/${id}/deliveries`, { query, ...options });
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Send test delivery
|
|
88
|
-
*
|
|
89
|
-
* @example
|
|
90
|
-
* ```ts
|
|
91
|
-
* const response = await client.integrations.sendTest('id');
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
sendTest(id, options) {
|
|
95
|
-
return this._client.post(path `/integrations/${id}/test`, options);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
//# sourceMappingURL=integrations.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.mjs","sourceRoot":"","sources":["../src/resources/integrations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,iBAAiB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,IAA6B,EAAE,OAAwB;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,iBAAiB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,iBAAiB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACH,cAAc,CACZ,EAAU,EACV,QAA4D,EAAE,EAC9D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,iBAAiB,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,iBAAiB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF"}
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../core/resource';
|
|
4
|
-
import * as Shared from './shared';
|
|
5
|
-
import { APIPromise } from '../core/api-promise';
|
|
6
|
-
import { RequestOptions } from '../internal/request-options';
|
|
7
|
-
import { path } from '../internal/utils/path';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Push notification integrations (Telegram)
|
|
11
|
-
*/
|
|
12
|
-
export class Integrations extends APIResource {
|
|
13
|
-
/**
|
|
14
|
-
* Create integration
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```ts
|
|
18
|
-
* const integration = await client.integrations.create({
|
|
19
|
-
* config: { chatId: '-1001234567890' },
|
|
20
|
-
* eventTypes: ['tweet.new', 'follower.gained'],
|
|
21
|
-
* name: 'My Telegram Bot',
|
|
22
|
-
* type: 'telegram',
|
|
23
|
-
* });
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
create(body: IntegrationCreateParams, options?: RequestOptions): APIPromise<Integration> {
|
|
27
|
-
return this._client.post('/integrations', { body, ...options });
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Get integration details
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```ts
|
|
35
|
-
* const integration = await client.integrations.retrieve(
|
|
36
|
-
* 'id',
|
|
37
|
-
* );
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<Integration> {
|
|
41
|
-
return this._client.get(path`/integrations/${id}`, options);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Update integration
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```ts
|
|
49
|
-
* const integration = await client.integrations.update('id', {
|
|
50
|
-
* isActive: true,
|
|
51
|
-
* name: 'My Telegram Bot',
|
|
52
|
-
* });
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
update(id: string, body: IntegrationUpdateParams, options?: RequestOptions): APIPromise<Integration> {
|
|
56
|
-
return this._client.patch(path`/integrations/${id}`, { body, ...options });
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* List integrations
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```ts
|
|
64
|
-
* const integrations = await client.integrations.list();
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
list(options?: RequestOptions): APIPromise<IntegrationListResponse> {
|
|
68
|
-
return this._client.get('/integrations', options);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Delete integration
|
|
73
|
-
*
|
|
74
|
-
* @example
|
|
75
|
-
* ```ts
|
|
76
|
-
* const integration = await client.integrations.delete('id');
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
delete(id: string, options?: RequestOptions): APIPromise<IntegrationDeleteResponse> {
|
|
80
|
-
return this._client.delete(path`/integrations/${id}`, options);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* List integration delivery history
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```ts
|
|
88
|
-
* const response = await client.integrations.listDeliveries(
|
|
89
|
-
* 'id',
|
|
90
|
-
* );
|
|
91
|
-
* ```
|
|
92
|
-
*/
|
|
93
|
-
listDeliveries(
|
|
94
|
-
id: string,
|
|
95
|
-
query: IntegrationListDeliveriesParams | null | undefined = {},
|
|
96
|
-
options?: RequestOptions,
|
|
97
|
-
): APIPromise<IntegrationListDeliveriesResponse> {
|
|
98
|
-
return this._client.get(path`/integrations/${id}/deliveries`, { query, ...options });
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Send test delivery
|
|
103
|
-
*
|
|
104
|
-
* @example
|
|
105
|
-
* ```ts
|
|
106
|
-
* const response = await client.integrations.sendTest('id');
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
|
-
sendTest(id: string, options?: RequestOptions): APIPromise<IntegrationSendTestResponse> {
|
|
110
|
-
return this._client.post(path`/integrations/${id}/test`, options);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Third-party integration (e.g. Telegram) subscribed to monitor events.
|
|
116
|
-
*/
|
|
117
|
-
export interface Integration {
|
|
118
|
-
id: string;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Integration config — shape varies by type (JSON)
|
|
122
|
-
*/
|
|
123
|
-
config: { [key: string]: unknown };
|
|
124
|
-
|
|
125
|
-
createdAt: string;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Array of event types to subscribe to.
|
|
129
|
-
*/
|
|
130
|
-
eventTypes: Array<Shared.EventType>;
|
|
131
|
-
|
|
132
|
-
isActive: boolean;
|
|
133
|
-
|
|
134
|
-
name: string;
|
|
135
|
-
|
|
136
|
-
type: 'telegram';
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Event filter rules (JSON)
|
|
140
|
-
*/
|
|
141
|
-
filters?: { [key: string]: unknown };
|
|
142
|
-
|
|
143
|
-
messageTemplate?: string;
|
|
144
|
-
|
|
145
|
-
scopeAllMonitors?: boolean;
|
|
146
|
-
|
|
147
|
-
silentPush?: boolean;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Integration delivery attempt record with status and retry count.
|
|
152
|
-
*/
|
|
153
|
-
export interface IntegrationDelivery {
|
|
154
|
-
id: string;
|
|
155
|
-
|
|
156
|
-
attempts: number;
|
|
157
|
-
|
|
158
|
-
createdAt: string;
|
|
159
|
-
|
|
160
|
-
eventType: string;
|
|
161
|
-
|
|
162
|
-
status: string;
|
|
163
|
-
|
|
164
|
-
deliveredAt?: string;
|
|
165
|
-
|
|
166
|
-
lastError?: string;
|
|
167
|
-
|
|
168
|
-
lastStatusCode?: number;
|
|
169
|
-
|
|
170
|
-
sourceId?: string;
|
|
171
|
-
|
|
172
|
-
sourceType?: string;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export interface IntegrationListResponse {
|
|
176
|
-
integrations: Array<Integration>;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export interface IntegrationDeleteResponse {
|
|
180
|
-
success: true;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export interface IntegrationListDeliveriesResponse {
|
|
184
|
-
deliveries: Array<IntegrationDelivery>;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export interface IntegrationSendTestResponse {
|
|
188
|
-
success: true;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export interface IntegrationCreateParams {
|
|
192
|
-
/**
|
|
193
|
-
* Integration config (e.g. Telegram chatId)
|
|
194
|
-
*/
|
|
195
|
-
config: IntegrationCreateParams.Config;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Array of event types to subscribe to.
|
|
199
|
-
*/
|
|
200
|
-
eventTypes: Array<Shared.EventType>;
|
|
201
|
-
|
|
202
|
-
name: string;
|
|
203
|
-
|
|
204
|
-
type: 'telegram';
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
export namespace IntegrationCreateParams {
|
|
208
|
-
/**
|
|
209
|
-
* Integration config (e.g. Telegram chatId)
|
|
210
|
-
*/
|
|
211
|
-
export interface Config {
|
|
212
|
-
chatId: string;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export interface IntegrationUpdateParams {
|
|
217
|
-
/**
|
|
218
|
-
* Array of event types to subscribe to.
|
|
219
|
-
*/
|
|
220
|
-
eventTypes?: Array<Shared.EventType>;
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Event filter rules (JSON)
|
|
224
|
-
*/
|
|
225
|
-
filters?: { [key: string]: unknown };
|
|
226
|
-
|
|
227
|
-
isActive?: boolean;
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Custom message template (JSON)
|
|
231
|
-
*/
|
|
232
|
-
messageTemplate?: { [key: string]: unknown };
|
|
233
|
-
|
|
234
|
-
name?: string;
|
|
235
|
-
|
|
236
|
-
scopeAllMonitors?: boolean;
|
|
237
|
-
|
|
238
|
-
silentPush?: boolean;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export interface IntegrationListDeliveriesParams {
|
|
242
|
-
/**
|
|
243
|
-
* Maximum number of items to return (1-100, default 50)
|
|
244
|
-
*/
|
|
245
|
-
limit?: number;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export declare namespace Integrations {
|
|
249
|
-
export {
|
|
250
|
-
type Integration as Integration,
|
|
251
|
-
type IntegrationDelivery as IntegrationDelivery,
|
|
252
|
-
type IntegrationListResponse as IntegrationListResponse,
|
|
253
|
-
type IntegrationDeleteResponse as IntegrationDeleteResponse,
|
|
254
|
-
type IntegrationListDeliveriesResponse as IntegrationListDeliveriesResponse,
|
|
255
|
-
type IntegrationSendTestResponse as IntegrationSendTestResponse,
|
|
256
|
-
type IntegrationCreateParams as IntegrationCreateParams,
|
|
257
|
-
type IntegrationUpdateParams as IntegrationUpdateParams,
|
|
258
|
-
type IntegrationListDeliveriesParams as IntegrationListDeliveriesParams,
|
|
259
|
-
};
|
|
260
|
-
}
|