itd-api 0.0.6 → 0.0.8
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/README.md +20 -0
- package/dist/{chunk-K7NBFQEE.cjs → chunk-ATCZ4T2K.cjs} +1130 -987
- package/dist/chunk-ATCZ4T2K.cjs.map +1 -0
- package/dist/{chunk-CCRQI3ON.js → chunk-JIYN33FG.js} +1127 -988
- package/dist/chunk-JIYN33FG.js.map +1 -0
- package/dist/{index-CDGXKy8r.d.cts → index-Duh31Wnx.d.cts} +591 -443
- package/dist/{index-CDGXKy8r.d.ts → index-Duh31Wnx.d.ts} +591 -443
- package/dist/index.cjs +101 -85
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/node.cjs +128 -91
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +30 -9
- package/dist/node.js.map +1 -1
- package/package.json +8 -4
- package/dist/chunk-CCRQI3ON.js.map +0 -1
- package/dist/chunk-K7NBFQEE.cjs.map +0 -1
package/dist/node.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkATCZ4T2K_cjs = require('./chunk-ATCZ4T2K.cjs');
|
|
4
4
|
|
|
5
5
|
// src/node.ts
|
|
6
6
|
var nodeFileReader = async (path) => {
|
|
@@ -10,6 +10,11 @@ var nodeFileReader = async (path) => {
|
|
|
10
10
|
};
|
|
11
11
|
var FileTokenStorage = class {
|
|
12
12
|
#path;
|
|
13
|
+
/**
|
|
14
|
+
* Цепочка записей: сохранения идут строго по одному, конкурентные `set` не
|
|
15
|
+
* перемешиваются. Ошибка одной записи цепочку не рвёт.
|
|
16
|
+
*/
|
|
17
|
+
#writing = Promise.resolve();
|
|
13
18
|
/** @param path путь к файлу сессии. Добавьте его в `.gitignore`. */
|
|
14
19
|
constructor(path) {
|
|
15
20
|
this.#path = path;
|
|
@@ -24,11 +29,28 @@ var FileTokenStorage = class {
|
|
|
24
29
|
return null;
|
|
25
30
|
}
|
|
26
31
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
set(session) {
|
|
33
|
+
this.#writing = this.#writing.then(
|
|
34
|
+
() => this.#write(session),
|
|
35
|
+
() => this.#write(session)
|
|
36
|
+
);
|
|
37
|
+
return this.#writing;
|
|
38
|
+
}
|
|
39
|
+
async #write(session) {
|
|
40
|
+
const { writeFile, rename, unlink } = await import('fs/promises');
|
|
41
|
+
const pid = typeof process !== "undefined" ? process.pid : 0;
|
|
42
|
+
const temporary = `${this.#path}.${pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
43
|
+
try {
|
|
44
|
+
await writeFile(temporary, JSON.stringify(session, null, 2), {
|
|
45
|
+
encoding: "utf8",
|
|
46
|
+
mode: 384
|
|
47
|
+
});
|
|
48
|
+
await rename(temporary, this.#path);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
await unlink(temporary).catch(() => {
|
|
51
|
+
});
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
32
54
|
}
|
|
33
55
|
async clear() {
|
|
34
56
|
try {
|
|
@@ -38,10 +60,9 @@ var FileTokenStorage = class {
|
|
|
38
60
|
}
|
|
39
61
|
}
|
|
40
62
|
};
|
|
41
|
-
var ItdClient2 = class extends
|
|
63
|
+
var ItdClient2 = class extends chunkATCZ4T2K_cjs.ItdClient {
|
|
42
64
|
constructor(options = {}) {
|
|
43
|
-
super(options);
|
|
44
|
-
this.setFileReader(nodeFileReader);
|
|
65
|
+
super(options, { fileReader: nodeFileReader });
|
|
45
66
|
}
|
|
46
67
|
};
|
|
47
68
|
function createClient(options = {}) {
|
|
@@ -50,331 +71,347 @@ function createClient(options = {}) {
|
|
|
50
71
|
|
|
51
72
|
Object.defineProperty(exports, "ALLOWED_MIME_TYPES", {
|
|
52
73
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkATCZ4T2K_cjs.ALLOWED_MIME_TYPES; }
|
|
54
75
|
});
|
|
55
76
|
Object.defineProperty(exports, "AUDIO_MIME_TYPES", {
|
|
56
77
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkATCZ4T2K_cjs.AUDIO_MIME_TYPES; }
|
|
58
79
|
});
|
|
59
80
|
Object.defineProperty(exports, "AUTH_FLAG_COOKIE", {
|
|
60
81
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkATCZ4T2K_cjs.AUTH_FLAG_COOKIE; }
|
|
62
83
|
});
|
|
63
84
|
Object.defineProperty(exports, "AUTH_PATHS", {
|
|
64
85
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkATCZ4T2K_cjs.AUTH_PATHS; }
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "AccessType", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function () { return chunkATCZ4T2K_cjs.AccessType; }
|
|
66
91
|
});
|
|
67
92
|
Object.defineProperty(exports, "AttachmentType", {
|
|
68
93
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkATCZ4T2K_cjs.AttachmentType; }
|
|
70
95
|
});
|
|
71
96
|
Object.defineProperty(exports, "CommentSort", {
|
|
72
97
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkATCZ4T2K_cjs.CommentSort; }
|
|
74
99
|
});
|
|
75
100
|
Object.defineProperty(exports, "DEFAULT_BASE_URL", {
|
|
76
101
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkATCZ4T2K_cjs.DEFAULT_BASE_URL; }
|
|
78
103
|
});
|
|
79
104
|
Object.defineProperty(exports, "DEFAULT_TIMEOUT", {
|
|
80
105
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkATCZ4T2K_cjs.DEFAULT_TIMEOUT; }
|
|
82
107
|
});
|
|
83
108
|
Object.defineProperty(exports, "DEFAULT_USER_AGENT", {
|
|
84
109
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkATCZ4T2K_cjs.DEFAULT_USER_AGENT; }
|
|
86
111
|
});
|
|
87
112
|
Object.defineProperty(exports, "DEVICE_ID_HEADER", {
|
|
88
113
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkATCZ4T2K_cjs.DEVICE_ID_HEADER; }
|
|
90
115
|
});
|
|
91
116
|
Object.defineProperty(exports, "DetectedRuntime", {
|
|
92
117
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkATCZ4T2K_cjs.DetectedRuntime; }
|
|
94
119
|
});
|
|
95
120
|
Object.defineProperty(exports, "FeedTab", {
|
|
96
121
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkATCZ4T2K_cjs.FeedTab; }
|
|
98
123
|
});
|
|
99
124
|
Object.defineProperty(exports, "IMAGE_MIME_TYPES", {
|
|
100
125
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkATCZ4T2K_cjs.IMAGE_MIME_TYPES; }
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(exports, "InteractionType", {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: function () { return chunkATCZ4T2K_cjs.InteractionType; }
|
|
102
131
|
});
|
|
103
132
|
Object.defineProperty(exports, "ItdAbortError", {
|
|
104
133
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdAbortError; }
|
|
106
135
|
});
|
|
107
136
|
Object.defineProperty(exports, "ItdApiError", {
|
|
108
137
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdApiError; }
|
|
110
139
|
});
|
|
111
140
|
Object.defineProperty(exports, "ItdApiErrorKind", {
|
|
112
141
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdApiErrorKind; }
|
|
114
143
|
});
|
|
115
144
|
Object.defineProperty(exports, "ItdAuthError", {
|
|
116
145
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdAuthError; }
|
|
118
147
|
});
|
|
119
148
|
Object.defineProperty(exports, "ItdConfigError", {
|
|
120
149
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdConfigError; }
|
|
122
151
|
});
|
|
123
152
|
Object.defineProperty(exports, "ItdConflictError", {
|
|
124
153
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
154
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdConflictError; }
|
|
126
155
|
});
|
|
127
156
|
Object.defineProperty(exports, "ItdError", {
|
|
128
157
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
158
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdError; }
|
|
130
159
|
});
|
|
131
160
|
Object.defineProperty(exports, "ItdErrorCode", {
|
|
132
161
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
162
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdErrorCode; }
|
|
134
163
|
});
|
|
135
164
|
Object.defineProperty(exports, "ItdErrorKind", {
|
|
136
165
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
166
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdErrorKind; }
|
|
138
167
|
});
|
|
139
168
|
Object.defineProperty(exports, "ItdForbiddenError", {
|
|
140
169
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
170
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdForbiddenError; }
|
|
142
171
|
});
|
|
143
172
|
Object.defineProperty(exports, "ItdNetworkError", {
|
|
144
173
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
174
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdNetworkError; }
|
|
146
175
|
});
|
|
147
176
|
Object.defineProperty(exports, "ItdNotFoundError", {
|
|
148
177
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
178
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdNotFoundError; }
|
|
150
179
|
});
|
|
151
180
|
Object.defineProperty(exports, "ItdPhoneVerificationError", {
|
|
152
181
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
182
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdPhoneVerificationError; }
|
|
154
183
|
});
|
|
155
184
|
Object.defineProperty(exports, "ItdRateLimitError", {
|
|
156
185
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
186
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdRateLimitError; }
|
|
158
187
|
});
|
|
159
188
|
Object.defineProperty(exports, "ItdRealtime", {
|
|
160
189
|
enumerable: true,
|
|
161
|
-
get: function () { return
|
|
190
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdRealtime; }
|
|
162
191
|
});
|
|
163
192
|
Object.defineProperty(exports, "ItdServerError", {
|
|
164
193
|
enumerable: true,
|
|
165
|
-
get: function () { return
|
|
194
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdServerError; }
|
|
166
195
|
});
|
|
167
196
|
Object.defineProperty(exports, "ItdTimeoutError", {
|
|
168
197
|
enumerable: true,
|
|
169
|
-
get: function () { return
|
|
198
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdTimeoutError; }
|
|
170
199
|
});
|
|
171
200
|
Object.defineProperty(exports, "ItdValidationError", {
|
|
172
201
|
enumerable: true,
|
|
173
|
-
get: function () { return
|
|
202
|
+
get: function () { return chunkATCZ4T2K_cjs.ItdValidationError; }
|
|
174
203
|
});
|
|
175
204
|
Object.defineProperty(exports, "LIBRARY_VERSION", {
|
|
176
205
|
enumerable: true,
|
|
177
|
-
get: function () { return
|
|
206
|
+
get: function () { return chunkATCZ4T2K_cjs.LIBRARY_VERSION; }
|
|
178
207
|
});
|
|
179
208
|
Object.defineProperty(exports, "LikesVisibility", {
|
|
180
209
|
enumerable: true,
|
|
181
|
-
get: function () { return
|
|
210
|
+
get: function () { return chunkATCZ4T2K_cjs.LikesVisibility; }
|
|
182
211
|
});
|
|
183
212
|
Object.defineProperty(exports, "LocalStorageTokenStorage", {
|
|
184
213
|
enumerable: true,
|
|
185
|
-
get: function () { return
|
|
214
|
+
get: function () { return chunkATCZ4T2K_cjs.LocalStorageTokenStorage; }
|
|
186
215
|
});
|
|
187
216
|
Object.defineProperty(exports, "MAX_RECONNECT_ATTEMPTS", {
|
|
188
217
|
enumerable: true,
|
|
189
|
-
get: function () { return
|
|
218
|
+
get: function () { return chunkATCZ4T2K_cjs.MAX_RECONNECT_ATTEMPTS; }
|
|
190
219
|
});
|
|
191
220
|
Object.defineProperty(exports, "MemoryTokenStorage", {
|
|
192
221
|
enumerable: true,
|
|
193
|
-
get: function () { return
|
|
222
|
+
get: function () { return chunkATCZ4T2K_cjs.MemoryTokenStorage; }
|
|
194
223
|
});
|
|
195
224
|
Object.defineProperty(exports, "NOTIFICATION_TYPE_ALIASES", {
|
|
196
225
|
enumerable: true,
|
|
197
|
-
get: function () { return
|
|
226
|
+
get: function () { return chunkATCZ4T2K_cjs.NOTIFICATION_TYPE_ALIASES; }
|
|
198
227
|
});
|
|
199
228
|
Object.defineProperty(exports, "NotificationType", {
|
|
200
229
|
enumerable: true,
|
|
201
|
-
get: function () { return
|
|
230
|
+
get: function () { return chunkATCZ4T2K_cjs.NotificationType; }
|
|
202
231
|
});
|
|
203
232
|
Object.defineProperty(exports, "OAuthProvider", {
|
|
204
233
|
enumerable: true,
|
|
205
|
-
get: function () { return
|
|
234
|
+
get: function () { return chunkATCZ4T2K_cjs.OAuthProvider; }
|
|
206
235
|
});
|
|
207
236
|
Object.defineProperty(exports, "PaginationMode", {
|
|
208
237
|
enumerable: true,
|
|
209
|
-
get: function () { return
|
|
238
|
+
get: function () { return chunkATCZ4T2K_cjs.PaginationMode; }
|
|
210
239
|
});
|
|
211
240
|
Object.defineProperty(exports, "Paginator", {
|
|
212
241
|
enumerable: true,
|
|
213
|
-
get: function () { return
|
|
242
|
+
get: function () { return chunkATCZ4T2K_cjs.Paginator; }
|
|
214
243
|
});
|
|
215
244
|
Object.defineProperty(exports, "RECONNECT_BACKOFF", {
|
|
216
245
|
enumerable: true,
|
|
217
|
-
get: function () { return
|
|
246
|
+
get: function () { return chunkATCZ4T2K_cjs.RECONNECT_BACKOFF; }
|
|
218
247
|
});
|
|
219
248
|
Object.defineProperty(exports, "RECONNECT_JITTER", {
|
|
220
249
|
enumerable: true,
|
|
221
|
-
get: function () { return
|
|
250
|
+
get: function () { return chunkATCZ4T2K_cjs.RECONNECT_JITTER; }
|
|
222
251
|
});
|
|
223
252
|
Object.defineProperty(exports, "REFRESH_COOKIE", {
|
|
224
253
|
enumerable: true,
|
|
225
|
-
get: function () { return
|
|
254
|
+
get: function () { return chunkATCZ4T2K_cjs.REFRESH_COOKIE; }
|
|
226
255
|
});
|
|
227
256
|
Object.defineProperty(exports, "REFRESH_COOKIE_PATH", {
|
|
228
257
|
enumerable: true,
|
|
229
|
-
get: function () { return
|
|
258
|
+
get: function () { return chunkATCZ4T2K_cjs.REFRESH_COOKIE_PATH; }
|
|
230
259
|
});
|
|
231
260
|
Object.defineProperty(exports, "RealtimeStatus", {
|
|
232
261
|
enumerable: true,
|
|
233
|
-
get: function () { return
|
|
262
|
+
get: function () { return chunkATCZ4T2K_cjs.RealtimeStatus; }
|
|
234
263
|
});
|
|
235
264
|
Object.defineProperty(exports, "RealtimeTransportKind", {
|
|
236
265
|
enumerable: true,
|
|
237
|
-
get: function () { return
|
|
266
|
+
get: function () { return chunkATCZ4T2K_cjs.RealtimeTransportKind; }
|
|
238
267
|
});
|
|
239
268
|
Object.defineProperty(exports, "ReportReason", {
|
|
240
269
|
enumerable: true,
|
|
241
|
-
get: function () { return
|
|
270
|
+
get: function () { return chunkATCZ4T2K_cjs.ReportReason; }
|
|
242
271
|
});
|
|
243
272
|
Object.defineProperty(exports, "ReportTargetType", {
|
|
244
273
|
enumerable: true,
|
|
245
|
-
get: function () { return
|
|
274
|
+
get: function () { return chunkATCZ4T2K_cjs.ReportTargetType; }
|
|
246
275
|
});
|
|
247
276
|
Object.defineProperty(exports, "RuntimeMode", {
|
|
248
277
|
enumerable: true,
|
|
249
|
-
get: function () { return
|
|
278
|
+
get: function () { return chunkATCZ4T2K_cjs.RuntimeMode; }
|
|
250
279
|
});
|
|
251
280
|
Object.defineProperty(exports, "STREAM_PATH", {
|
|
252
281
|
enumerable: true,
|
|
253
|
-
get: function () { return
|
|
282
|
+
get: function () { return chunkATCZ4T2K_cjs.STREAM_PATH; }
|
|
254
283
|
});
|
|
255
284
|
Object.defineProperty(exports, "SignInStatus", {
|
|
256
285
|
enumerable: true,
|
|
257
|
-
get: function () { return
|
|
286
|
+
get: function () { return chunkATCZ4T2K_cjs.SignInStatus; }
|
|
258
287
|
});
|
|
259
288
|
Object.defineProperty(exports, "SpanType", {
|
|
260
289
|
enumerable: true,
|
|
261
|
-
get: function () { return
|
|
290
|
+
get: function () { return chunkATCZ4T2K_cjs.SpanType; }
|
|
262
291
|
});
|
|
263
292
|
Object.defineProperty(exports, "TURNSTILE_SITE_KEY", {
|
|
264
293
|
enumerable: true,
|
|
265
|
-
get: function () { return
|
|
294
|
+
get: function () { return chunkATCZ4T2K_cjs.TURNSTILE_SITE_KEY; }
|
|
266
295
|
});
|
|
267
296
|
Object.defineProperty(exports, "UnauthorizedStreamError", {
|
|
268
297
|
enumerable: true,
|
|
269
|
-
get: function () { return
|
|
298
|
+
get: function () { return chunkATCZ4T2K_cjs.UnauthorizedStreamError; }
|
|
270
299
|
});
|
|
271
300
|
Object.defineProperty(exports, "VIDEO_MIME_TYPES", {
|
|
272
301
|
enumerable: true,
|
|
273
|
-
get: function () { return
|
|
302
|
+
get: function () { return chunkATCZ4T2K_cjs.VIDEO_MIME_TYPES; }
|
|
303
|
+
});
|
|
304
|
+
Object.defineProperty(exports, "ViewReason", {
|
|
305
|
+
enumerable: true,
|
|
306
|
+
get: function () { return chunkATCZ4T2K_cjs.ViewReason; }
|
|
307
|
+
});
|
|
308
|
+
Object.defineProperty(exports, "ViewSource", {
|
|
309
|
+
enumerable: true,
|
|
310
|
+
get: function () { return chunkATCZ4T2K_cjs.ViewSource; }
|
|
274
311
|
});
|
|
275
312
|
Object.defineProperty(exports, "WallAccess", {
|
|
276
313
|
enumerable: true,
|
|
277
|
-
get: function () { return
|
|
314
|
+
get: function () { return chunkATCZ4T2K_cjs.WallAccess; }
|
|
278
315
|
});
|
|
279
316
|
Object.defineProperty(exports, "canonicalNotificationType", {
|
|
280
317
|
enumerable: true,
|
|
281
|
-
get: function () { return
|
|
318
|
+
get: function () { return chunkATCZ4T2K_cjs.canonicalNotificationType; }
|
|
282
319
|
});
|
|
283
320
|
Object.defineProperty(exports, "comment", {
|
|
284
321
|
enumerable: true,
|
|
285
|
-
get: function () { return
|
|
322
|
+
get: function () { return chunkATCZ4T2K_cjs.comment; }
|
|
286
323
|
});
|
|
287
324
|
Object.defineProperty(exports, "createTokenStorage", {
|
|
288
325
|
enumerable: true,
|
|
289
|
-
get: function () { return
|
|
326
|
+
get: function () { return chunkATCZ4T2K_cjs.createTokenStorage; }
|
|
290
327
|
});
|
|
291
328
|
Object.defineProperty(exports, "formatNotificationText", {
|
|
292
329
|
enumerable: true,
|
|
293
|
-
get: function () { return
|
|
330
|
+
get: function () { return chunkATCZ4T2K_cjs.formatNotificationText; }
|
|
294
331
|
});
|
|
295
332
|
Object.defineProperty(exports, "isBuilder", {
|
|
296
333
|
enumerable: true,
|
|
297
|
-
get: function () { return
|
|
334
|
+
get: function () { return chunkATCZ4T2K_cjs.isBuilder; }
|
|
298
335
|
});
|
|
299
336
|
Object.defineProperty(exports, "isItdApiError", {
|
|
300
337
|
enumerable: true,
|
|
301
|
-
get: function () { return
|
|
338
|
+
get: function () { return chunkATCZ4T2K_cjs.isItdApiError; }
|
|
302
339
|
});
|
|
303
340
|
Object.defineProperty(exports, "isItdAuthError", {
|
|
304
341
|
enumerable: true,
|
|
305
|
-
get: function () { return
|
|
342
|
+
get: function () { return chunkATCZ4T2K_cjs.isItdAuthError; }
|
|
306
343
|
});
|
|
307
344
|
Object.defineProperty(exports, "isItdConflictError", {
|
|
308
345
|
enumerable: true,
|
|
309
|
-
get: function () { return
|
|
346
|
+
get: function () { return chunkATCZ4T2K_cjs.isItdConflictError; }
|
|
310
347
|
});
|
|
311
348
|
Object.defineProperty(exports, "isItdError", {
|
|
312
349
|
enumerable: true,
|
|
313
|
-
get: function () { return
|
|
350
|
+
get: function () { return chunkATCZ4T2K_cjs.isItdError; }
|
|
314
351
|
});
|
|
315
352
|
Object.defineProperty(exports, "isItdForbiddenError", {
|
|
316
353
|
enumerable: true,
|
|
317
|
-
get: function () { return
|
|
354
|
+
get: function () { return chunkATCZ4T2K_cjs.isItdForbiddenError; }
|
|
318
355
|
});
|
|
319
356
|
Object.defineProperty(exports, "isItdNotFoundError", {
|
|
320
357
|
enumerable: true,
|
|
321
|
-
get: function () { return
|
|
358
|
+
get: function () { return chunkATCZ4T2K_cjs.isItdNotFoundError; }
|
|
322
359
|
});
|
|
323
360
|
Object.defineProperty(exports, "isItdPhoneVerificationError", {
|
|
324
361
|
enumerable: true,
|
|
325
|
-
get: function () { return
|
|
362
|
+
get: function () { return chunkATCZ4T2K_cjs.isItdPhoneVerificationError; }
|
|
326
363
|
});
|
|
327
364
|
Object.defineProperty(exports, "isItdRateLimitError", {
|
|
328
365
|
enumerable: true,
|
|
329
|
-
get: function () { return
|
|
366
|
+
get: function () { return chunkATCZ4T2K_cjs.isItdRateLimitError; }
|
|
330
367
|
});
|
|
331
368
|
Object.defineProperty(exports, "isItdServerError", {
|
|
332
369
|
enumerable: true,
|
|
333
|
-
get: function () { return
|
|
370
|
+
get: function () { return chunkATCZ4T2K_cjs.isItdServerError; }
|
|
334
371
|
});
|
|
335
372
|
Object.defineProperty(exports, "isItdValidationError", {
|
|
336
373
|
enumerable: true,
|
|
337
|
-
get: function () { return
|
|
374
|
+
get: function () { return chunkATCZ4T2K_cjs.isItdValidationError; }
|
|
338
375
|
});
|
|
339
376
|
Object.defineProperty(exports, "isKnownNotificationType", {
|
|
340
377
|
enumerable: true,
|
|
341
|
-
get: function () { return
|
|
378
|
+
get: function () { return chunkATCZ4T2K_cjs.isKnownNotificationType; }
|
|
342
379
|
});
|
|
343
380
|
Object.defineProperty(exports, "isMyProfile", {
|
|
344
381
|
enumerable: true,
|
|
345
|
-
get: function () { return
|
|
382
|
+
get: function () { return chunkATCZ4T2K_cjs.isMyProfile; }
|
|
346
383
|
});
|
|
347
384
|
Object.defineProperty(exports, "normalizeNotification", {
|
|
348
385
|
enumerable: true,
|
|
349
|
-
get: function () { return
|
|
386
|
+
get: function () { return chunkATCZ4T2K_cjs.normalizeNotification; }
|
|
350
387
|
});
|
|
351
388
|
Object.defineProperty(exports, "poll", {
|
|
352
389
|
enumerable: true,
|
|
353
|
-
get: function () { return
|
|
390
|
+
get: function () { return chunkATCZ4T2K_cjs.poll; }
|
|
354
391
|
});
|
|
355
392
|
Object.defineProperty(exports, "post", {
|
|
356
393
|
enumerable: true,
|
|
357
|
-
get: function () { return
|
|
394
|
+
get: function () { return chunkATCZ4T2K_cjs.post; }
|
|
358
395
|
});
|
|
359
396
|
Object.defineProperty(exports, "readNotificationEvent", {
|
|
360
397
|
enumerable: true,
|
|
361
|
-
get: function () { return
|
|
398
|
+
get: function () { return chunkATCZ4T2K_cjs.readNotificationEvent; }
|
|
362
399
|
});
|
|
363
400
|
Object.defineProperty(exports, "readUnreadCountEvent", {
|
|
364
401
|
enumerable: true,
|
|
365
|
-
get: function () { return
|
|
402
|
+
get: function () { return chunkATCZ4T2K_cjs.readUnreadCountEvent; }
|
|
366
403
|
});
|
|
367
404
|
Object.defineProperty(exports, "report", {
|
|
368
405
|
enumerable: true,
|
|
369
|
-
get: function () { return
|
|
406
|
+
get: function () { return chunkATCZ4T2K_cjs.report; }
|
|
370
407
|
});
|
|
371
408
|
Object.defineProperty(exports, "resolveNotificationUrl", {
|
|
372
409
|
enumerable: true,
|
|
373
|
-
get: function () { return
|
|
410
|
+
get: function () { return chunkATCZ4T2K_cjs.resolveNotificationUrl; }
|
|
374
411
|
});
|
|
375
412
|
Object.defineProperty(exports, "toDate", {
|
|
376
413
|
enumerable: true,
|
|
377
|
-
get: function () { return
|
|
414
|
+
get: function () { return chunkATCZ4T2K_cjs.toDate; }
|
|
378
415
|
});
|
|
379
416
|
exports.FileTokenStorage = FileTokenStorage;
|
|
380
417
|
exports.ItdClient = ItdClient2;
|
package/dist/node.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/node.ts"],"names":["ItdClient"],"mappings":";;;;;AAgCO,IAAM,cAAA,GAA6B,OAAO,IAAA,KAAS;AACxD,EAAA,MAAM,EAAE,QAAA,EAAS,GAAI,MAAM,OAAO,aAAkB,CAAA;AACpD,EAAA,MAAM,EAAE,QAAA,EAAS,GAAI,MAAM,OAAO,MAAW,CAAA;AAE7C,EAAA,OAAO,EAAE,IAAA,EAAM,IAAI,UAAA,CAAW,MAAM,QAAA,CAAS,IAAI,CAAC,CAAA,EAAG,QAAA,EAAU,QAAA,CAAS,IAAI,CAAA,EAAE;AAChF;AAkBO,IAAM,mBAAN,MAA+C;AAAA,EAC3C,KAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/node.ts"],"names":["ItdClient"],"mappings":";;;;;AAgCO,IAAM,cAAA,GAA6B,OAAO,IAAA,KAAS;AACxD,EAAA,MAAM,EAAE,QAAA,EAAS,GAAI,MAAM,OAAO,aAAkB,CAAA;AACpD,EAAA,MAAM,EAAE,QAAA,EAAS,GAAI,MAAM,OAAO,MAAW,CAAA;AAE7C,EAAA,OAAO,EAAE,IAAA,EAAM,IAAI,UAAA,CAAW,MAAM,QAAA,CAAS,IAAI,CAAC,CAAA,EAAG,QAAA,EAAU,QAAA,CAAS,IAAI,CAAA,EAAE;AAChF;AAkBO,IAAM,mBAAN,MAA+C;AAAA,EAC3C,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKT,QAAA,GAA0B,QAAQ,OAAA,EAAQ;AAAA;AAAA,EAG1C,YAAY,IAAA,EAAc;AACxB,IAAA,IAAA,CAAK,KAAA,GAAQ,IAAA;AAAA,EACf;AAAA,EAEA,MAAM,GAAA,GAAkC;AACtC,IAAA,IAAI;AACF,MAAA,MAAM,EAAE,QAAA,EAAS,GAAI,MAAM,OAAO,aAAkB,CAAA;AACpD,MAAA,MAAM,GAAA,GAAM,MAAM,QAAA,CAAS,IAAA,CAAK,OAAO,MAAM,CAAA;AAC7C,MAAA,MAAM,MAAA,GAAkB,IAAA,CAAK,KAAA,CAAM,GAAG,CAAA;AAEtC,MAAA,OAAO,OAAO,MAAA,KAAW,QAAA,IAAY,MAAA,KAAW,OAAQ,MAAA,GAAwB,IAAA;AAAA,IAClF,CAAA,CAAA,MAAQ;AAEN,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,EACF;AAAA,EAEA,IAAI,OAAA,EAAoC;AACtC,IAAA,IAAA,CAAK,QAAA,GAAW,KAAK,QAAA,CAAS,IAAA;AAAA,MAC5B,MAAM,IAAA,CAAK,MAAA,CAAO,OAAO,CAAA;AAAA,MACzB,MAAM,IAAA,CAAK,MAAA,CAAO,OAAO;AAAA,KAC3B;AACA,IAAA,OAAO,IAAA,CAAK,QAAA;AAAA,EACd;AAAA,EAEA,MAAM,OAAO,OAAA,EAAoC;AAC/C,IAAA,MAAM,EAAE,SAAA,EAAW,MAAA,EAAQ,QAAO,GAAI,MAAM,OAAO,aAAkB,CAAA;AAIrE,IAAA,MAAM,GAAA,GAAM,OAAO,OAAA,KAAY,WAAA,GAAc,QAAQ,GAAA,GAAM,CAAA;AAC3D,IAAA,MAAM,SAAA,GAAY,CAAA,EAAG,IAAA,CAAK,KAAK,IAAI,GAAG,CAAA,CAAA,EAAI,IAAA,CAAK,MAAA,GAAS,QAAA,CAAS,EAAE,CAAA,CAAE,KAAA,CAAM,CAAC,CAAC,CAAA,IAAA,CAAA;AAE7E,IAAA,IAAI;AACF,MAAA,MAAM,UAAU,SAAA,EAAW,IAAA,CAAK,UAAU,OAAA,EAAS,IAAA,EAAM,CAAC,CAAA,EAAG;AAAA,QAC3D,QAAA,EAAU,MAAA;AAAA,QACV,IAAA,EAAM;AAAA,OACP,CAAA;AACD,MAAA,MAAM,MAAA,CAAO,SAAA,EAAW,IAAA,CAAK,KAAK,CAAA;AAAA,IACpC,SAAS,KAAA,EAAO;AACd,MAAA,MAAM,MAAA,CAAO,SAAS,CAAA,CAAE,KAAA,CAAM,MAAM;AAAA,MAAC,CAAC,CAAA;AACtC,MAAA,MAAM,KAAA;AAAA,IACR;AAAA,EACF;AAAA,EAEA,MAAM,KAAA,GAAuB;AAC3B,IAAA,IAAI;AACF,MAAA,MAAM,EAAE,EAAA,EAAG,GAAI,MAAM,OAAO,aAAkB,CAAA;AAC9C,MAAA,MAAM,GAAG,IAAA,CAAK,KAAA,EAAO,EAAE,KAAA,EAAO,MAAM,CAAA;AAAA,IACtC,CAAA,CAAA,MAAQ;AAAA,IAER;AAAA,EACF;AACF;AAQO,IAAMA,UAAAA,GAAN,cAAwBA,2BAAA,CAAW;AAAA,EACxC,WAAA,CAAY,OAAA,GAA4B,EAAC,EAAG;AAG1C,IAAA,KAAA,CAAM,OAAA,EAAS,EAAE,UAAA,EAAY,cAAA,EAAgB,CAAA;AAAA,EAC/C;AACF;AAGO,SAAS,YAAA,CAAa,OAAA,GAA4B,EAAC,EAAc;AACtE,EAAA,OAAO,IAAIA,WAAU,OAAO,CAAA;AAC9B","file":"node.cjs","sourcesContent":["/**\n * `itd-api/node` — то же, что `itd-api`, плюс работа с файловой системой.\n *\n * Импортируйте эту точку входа в Node, Bun и Deno: клиент отсюда умеет загружать файлы\n * по пути (`attach('./photo.jpg')`), а `FileTokenStorage` сохраняет сессию между запусками.\n * В основном бандле работы с файлами нет намеренно — иначе браузерные сборщики пытались бы\n * разрешить `node:fs`.\n *\n * @example\n * ```ts\n * import { ItdClient, FileTokenStorage } from 'itd-api/node';\n *\n * // Когда сессия уже сохранена, `auth` не нужен — токен возьмётся из хранилища.\n * const itd = new ItdClient({ storage: new FileTokenStorage('./.itd-session.json') });\n *\n * await itd.posts.create((p) => p.content('привет').attach('./photo.jpg'));\n * ```\n *\n * @packageDocumentation\n */\n\nimport { ItdClient as BaseClient } from './client.js';\nimport type { ItdSession, TokenStorage } from './core/storage.js';\nimport type { FileReader } from './resources/files.js';\nimport type { ItdClientOptions } from './types/options.js';\n\n/**\n * Читает файл с диска для загрузки.\n *\n * Модуль `node:fs` подключается динамически, поэтому импорт этой точки входа не тянет\n * его в браузерные сборки.\n */\nexport const nodeFileReader: FileReader = async (path) => {\n const { readFile } = await import('node:fs/promises');\n const { basename } = await import('node:path');\n\n return { data: new Uint8Array(await readFile(path)), filename: basename(path) };\n};\n\n/**\n * Хранит сессию в файле.\n *\n * Нужна долгоживущим процессам: без неё бот при каждом запуске входит заново — а вход\n * требует решённой капчи, да и серия входов подряд может привести к временной блокировке\n * аккаунта. С сохранённой сессией опция `auth` не нужна вовсе.\n *\n * Файл создаётся с правами `0600` (чтение и запись только владельцу) — в нём лежат токены.\n * Запись идёт через временный файл с последующим переименованием, поэтому падение процесса\n * посреди сохранения не оставит повреждённую сессию.\n *\n * @example\n * ```ts\n * const itd = new ItdClient({ storage: new FileTokenStorage('./.itd-session.json') });\n * ```\n */\nexport class FileTokenStorage implements TokenStorage {\n readonly #path: string;\n /**\n * Цепочка записей: сохранения идут строго по одному, конкурентные `set` не\n * перемешиваются. Ошибка одной записи цепочку не рвёт.\n */\n #writing: Promise<void> = Promise.resolve();\n\n /** @param path путь к файлу сессии. Добавьте его в `.gitignore`. */\n constructor(path: string) {\n this.#path = path;\n }\n\n async get(): Promise<ItdSession | null> {\n try {\n const { readFile } = await import('node:fs/promises');\n const raw = await readFile(this.#path, 'utf8');\n const parsed: unknown = JSON.parse(raw);\n\n return typeof parsed === 'object' && parsed !== null ? (parsed as ItdSession) : null;\n } catch {\n // Файла нет или он повреждён — считаем, что сессии не было.\n return null;\n }\n }\n\n set(session: ItdSession): Promise<void> {\n this.#writing = this.#writing.then(\n () => this.#write(session),\n () => this.#write(session),\n );\n return this.#writing;\n }\n\n async #write(session: ItdSession): Promise<void> {\n const { writeFile, rename, unlink } = await import('node:fs/promises');\n\n // Временный файл уникален на процесс и вызов — иначе параллельные записи (в том числе\n // из разных процессов) делят один `.tmp`.\n const pid = typeof process !== 'undefined' ? process.pid : 0;\n const temporary = `${this.#path}.${pid}.${Math.random().toString(36).slice(2)}.tmp`;\n\n try {\n await writeFile(temporary, JSON.stringify(session, null, 2), {\n encoding: 'utf8',\n mode: 0o600,\n });\n await rename(temporary, this.#path);\n } catch (error) {\n await unlink(temporary).catch(() => {});\n throw error;\n }\n }\n\n async clear(): Promise<void> {\n try {\n const { rm } = await import('node:fs/promises');\n await rm(this.#path, { force: true });\n } catch {\n // Удалять нечего — это не ошибка.\n }\n }\n}\n\n/**\n * Клиент API итд.com с поддержкой файловой системы.\n *\n * Отличается от базового только тем, что умеет читать файлы по пути:\n * `attach('./photo.jpg')` и `itd.files.upload('./video.mp4')` работают сразу.\n */\nexport class ItdClient extends BaseClient {\n constructor(options: ItdClientOptions = {}) {\n // Чтение файлов передаётся скрытым параметром конструктора, а не мутацией уже\n // собранного клиента: так объект работоспособен сразу и не меняется после создания.\n super(options, { fileReader: nodeFileReader });\n }\n}\n\n/** Создаёт {@link ItdClient} с поддержкой файловой системы. */\nexport function createClient(options: ItdClientOptions = {}): ItdClient {\n return new ItdClient(options);\n}\n\n// Всё остальное — билдеры, типы, ошибки, перечисления — доступно отсюда же,\n// чтобы в Node хватало одного импорта. Объявленные выше имена перекрывают одноимённые.\nexport * from './index.js';\n"]}
|
package/dist/node.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TokenStorage, I as ItdSession, a as ItdClient$1, b as ItdClientOptions, F as FileReader } from './index-
|
|
2
|
-
export { A as ALLOWED_MIME_TYPES, c as AUDIO_MIME_TYPES, d as AUTH_FLAG_COOKIE, e as AUTH_PATHS, f as
|
|
1
|
+
import { T as TokenStorage, I as ItdSession, a as ItdClient$1, b as ItdClientOptions, F as FileReader } from './index-Duh31Wnx.cjs';
|
|
2
|
+
export { A as ALLOWED_MIME_TYPES, c as AUDIO_MIME_TYPES, d as AUTH_FLAG_COOKIE, e as AUTH_PATHS, f as AccessType, g as Actor, h as AllowedMimeType, i as Announcement, j as AnnouncementButton, k as Attachment, l as AttachmentType, m as AudioMimeType, n as AuthInput, o as AuthResource, p as Author, B as BuilderInput, C as CaptchaCredentials, q as ChangelogEntry, r as Clan, s as ClientHooks, t as Comment, u as CommentBuilder, v as CommentInput, w as CommentReplyTo, x as CommentSort, y as CommentsParams, z as CommentsResource, D as CreateCommentInput, E as CreatePollInput, G as CreatePostInput, H as CreateReportInput, J as Credentials, K as CredentialsAuth, L as DEFAULT_BASE_URL, M as DEFAULT_TIMEOUT, N as DEFAULT_USER_AGENT, O as DEVICE_ID_HEADER, P as DetectedRuntime, Q as DwellEntry, R as ErrorContextHook, S as FeedParams, U as FeedTab, V as FileInput, W as FilesResource, X as FollowResult, Y as ForgotPasswordInput, Z as Hashtag, _ as HashtagPostsParams, $ as HashtagsResource, a0 as IMAGE_MIME_TYPES, a1 as ImageMimeType, a2 as InteractionEntry, a3 as InteractionType, a4 as IsoDate, a5 as ItdAbortError, a6 as ItdApiError, a7 as ItdApiErrorInit, a8 as ItdApiErrorKind, a9 as ItdAuthError, aa as ItdBuilder, ab as ItdConfigError, ac as ItdConflictError, ad as ItdError, ae as ItdErrorCode, af as ItdErrorKind, ag as ItdFieldErrors, ah as ItdForbiddenError, ai as ItdNetworkError, aj as ItdNotFoundError, ak as ItdPhoneVerificationError, al as ItdPlugin, am as ItdRateLimitError, an as ItdRealtime, ao as ItdServerError, ap as ItdTimeoutError, aq as ItdValidationError, ar as LIBRARY_VERSION, as as LikeResult, at as LikesVisibility, au as Listener, av as LocalStorageTokenStorage, aw as Logger, ax as Loose, ay as MAX_RECONNECT_ATTEMPTS, az as MemoryTokenStorage, aA as MyProfile, aB as NOTIFICATION_TYPE_ALIASES, aC as Notification, aD as NotificationEvent, aE as NotificationListParams, aF as NotificationSettings, aG as NotificationType, aH as NotificationsResource, aI as OAuthProvider, aJ as Page, aK as PageState, aL as PaginationMode, aM as Paginator, aN as PaymentMethod, aO as Pin, aP as PinPostResult, aQ as PinsResult, aR as PlatformResource, aS as PluginContext, aT as Poll, aU as PollBuilder, aV as PollInput, aW as PollOption, aX as PollTransportOptions, aY as Portal, aZ as Post, a_ as PostBuilder, a$ as PostInput, b0 as PostStats, b1 as PostsResource, b2 as PrivacySettings, b3 as Profile, b4 as PublicProfile, b5 as RECONNECT_BACKOFF, b6 as RECONNECT_JITTER, b7 as REFRESH_COOKIE, b8 as REFRESH_COOKIE_PATH, b9 as RateLimitOptions, ba as RawRequestOptions, bb as RealtimeEvents, bc as RealtimeOptions, bd as RealtimeStatus, be as RealtimeTransport, bf as RealtimeTransportKind, bg as ReconnectOptions, bh as RepliesParams, bi as Report, bj as ReportBuilder, bk as ReportInput, bl as ReportReason, bm as ReportTargetType, bn as ReportsResource, bo as RequestContext, bp as RequestOptions, bq as ResetPasswordInput, br as ResponseContext, bs as RetryContext, bt as RetryOptions, bu as RuntimeMode, bv as STREAM_PATH, bw as SearchResource, bx as SearchResult, by as Session, bz as SignInResult, bA as SignInStatus, bB as Span, bC as SpanType, bD as SseTransportOptions, bE as Subscription, bF as SubscriptionResource, bG as SubscriptionState, bH as TURNSTILE_SITE_KEY, bI as TelemetryOptions, bJ as TelemetryResource, bK as Transformer, bL as TransportContext, bM as TransportEvent, bN as UnauthorizedStreamError, bO as Unsubscribe, bP as UpdateNotificationSettingsInput, bQ as UpdatePrivacyInput, bR as UpdateProfileInput, bS as UploadOptions, bT as UploadedFile, bU as UserId, bV as UserListParams, bW as UserPostsParams, bX as UserRef, bY as UserSummary, bZ as UsersResource, b_ as VIDEO_MIME_TYPES, b$ as VerificationResource, c0 as VerificationStatus, c1 as VideoMimeType, c2 as ViewReason, c3 as ViewSource, c4 as WallAccess, c5 as canonicalNotificationType, c6 as comment, c7 as createTokenStorage, c8 as formatNotificationText, c9 as isBuilder, ca as isItdApiError, cb as isItdAuthError, cc as isItdConflictError, cd as isItdError, ce as isItdForbiddenError, cf as isItdNotFoundError, cg as isItdPhoneVerificationError, ch as isItdRateLimitError, ci as isItdServerError, cj as isItdValidationError, ck as isKnownNotificationType, cl as isMyProfile, cm as normalizeNotification, cn as poll, co as post, cp as readNotificationEvent, cq as readUnreadCountEvent, cr as report, cs as resolveNotificationUrl, ct as toDate } from './index-Duh31Wnx.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `itd-api/node` — то же, что `itd-api`, плюс работа с файловой системой.
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TokenStorage, I as ItdSession, a as ItdClient$1, b as ItdClientOptions, F as FileReader } from './index-
|
|
2
|
-
export { A as ALLOWED_MIME_TYPES, c as AUDIO_MIME_TYPES, d as AUTH_FLAG_COOKIE, e as AUTH_PATHS, f as
|
|
1
|
+
import { T as TokenStorage, I as ItdSession, a as ItdClient$1, b as ItdClientOptions, F as FileReader } from './index-Duh31Wnx.js';
|
|
2
|
+
export { A as ALLOWED_MIME_TYPES, c as AUDIO_MIME_TYPES, d as AUTH_FLAG_COOKIE, e as AUTH_PATHS, f as AccessType, g as Actor, h as AllowedMimeType, i as Announcement, j as AnnouncementButton, k as Attachment, l as AttachmentType, m as AudioMimeType, n as AuthInput, o as AuthResource, p as Author, B as BuilderInput, C as CaptchaCredentials, q as ChangelogEntry, r as Clan, s as ClientHooks, t as Comment, u as CommentBuilder, v as CommentInput, w as CommentReplyTo, x as CommentSort, y as CommentsParams, z as CommentsResource, D as CreateCommentInput, E as CreatePollInput, G as CreatePostInput, H as CreateReportInput, J as Credentials, K as CredentialsAuth, L as DEFAULT_BASE_URL, M as DEFAULT_TIMEOUT, N as DEFAULT_USER_AGENT, O as DEVICE_ID_HEADER, P as DetectedRuntime, Q as DwellEntry, R as ErrorContextHook, S as FeedParams, U as FeedTab, V as FileInput, W as FilesResource, X as FollowResult, Y as ForgotPasswordInput, Z as Hashtag, _ as HashtagPostsParams, $ as HashtagsResource, a0 as IMAGE_MIME_TYPES, a1 as ImageMimeType, a2 as InteractionEntry, a3 as InteractionType, a4 as IsoDate, a5 as ItdAbortError, a6 as ItdApiError, a7 as ItdApiErrorInit, a8 as ItdApiErrorKind, a9 as ItdAuthError, aa as ItdBuilder, ab as ItdConfigError, ac as ItdConflictError, ad as ItdError, ae as ItdErrorCode, af as ItdErrorKind, ag as ItdFieldErrors, ah as ItdForbiddenError, ai as ItdNetworkError, aj as ItdNotFoundError, ak as ItdPhoneVerificationError, al as ItdPlugin, am as ItdRateLimitError, an as ItdRealtime, ao as ItdServerError, ap as ItdTimeoutError, aq as ItdValidationError, ar as LIBRARY_VERSION, as as LikeResult, at as LikesVisibility, au as Listener, av as LocalStorageTokenStorage, aw as Logger, ax as Loose, ay as MAX_RECONNECT_ATTEMPTS, az as MemoryTokenStorage, aA as MyProfile, aB as NOTIFICATION_TYPE_ALIASES, aC as Notification, aD as NotificationEvent, aE as NotificationListParams, aF as NotificationSettings, aG as NotificationType, aH as NotificationsResource, aI as OAuthProvider, aJ as Page, aK as PageState, aL as PaginationMode, aM as Paginator, aN as PaymentMethod, aO as Pin, aP as PinPostResult, aQ as PinsResult, aR as PlatformResource, aS as PluginContext, aT as Poll, aU as PollBuilder, aV as PollInput, aW as PollOption, aX as PollTransportOptions, aY as Portal, aZ as Post, a_ as PostBuilder, a$ as PostInput, b0 as PostStats, b1 as PostsResource, b2 as PrivacySettings, b3 as Profile, b4 as PublicProfile, b5 as RECONNECT_BACKOFF, b6 as RECONNECT_JITTER, b7 as REFRESH_COOKIE, b8 as REFRESH_COOKIE_PATH, b9 as RateLimitOptions, ba as RawRequestOptions, bb as RealtimeEvents, bc as RealtimeOptions, bd as RealtimeStatus, be as RealtimeTransport, bf as RealtimeTransportKind, bg as ReconnectOptions, bh as RepliesParams, bi as Report, bj as ReportBuilder, bk as ReportInput, bl as ReportReason, bm as ReportTargetType, bn as ReportsResource, bo as RequestContext, bp as RequestOptions, bq as ResetPasswordInput, br as ResponseContext, bs as RetryContext, bt as RetryOptions, bu as RuntimeMode, bv as STREAM_PATH, bw as SearchResource, bx as SearchResult, by as Session, bz as SignInResult, bA as SignInStatus, bB as Span, bC as SpanType, bD as SseTransportOptions, bE as Subscription, bF as SubscriptionResource, bG as SubscriptionState, bH as TURNSTILE_SITE_KEY, bI as TelemetryOptions, bJ as TelemetryResource, bK as Transformer, bL as TransportContext, bM as TransportEvent, bN as UnauthorizedStreamError, bO as Unsubscribe, bP as UpdateNotificationSettingsInput, bQ as UpdatePrivacyInput, bR as UpdateProfileInput, bS as UploadOptions, bT as UploadedFile, bU as UserId, bV as UserListParams, bW as UserPostsParams, bX as UserRef, bY as UserSummary, bZ as UsersResource, b_ as VIDEO_MIME_TYPES, b$ as VerificationResource, c0 as VerificationStatus, c1 as VideoMimeType, c2 as ViewReason, c3 as ViewSource, c4 as WallAccess, c5 as canonicalNotificationType, c6 as comment, c7 as createTokenStorage, c8 as formatNotificationText, c9 as isBuilder, ca as isItdApiError, cb as isItdAuthError, cc as isItdConflictError, cd as isItdError, ce as isItdForbiddenError, cf as isItdNotFoundError, cg as isItdPhoneVerificationError, ch as isItdRateLimitError, ci as isItdServerError, cj as isItdValidationError, ck as isKnownNotificationType, cl as isMyProfile, cm as normalizeNotification, cn as poll, co as post, cp as readNotificationEvent, cq as readUnreadCountEvent, cr as report, cs as resolveNotificationUrl, ct as toDate } from './index-Duh31Wnx.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `itd-api/node` — то же, что `itd-api`, плюс работа с файловой системой.
|