mindupload 1.5.1
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/LICENSE +21 -0
- package/README.md +186 -0
- package/dist/index.cjs +478 -0
- package/dist/index.d.cts +557 -0
- package/dist/index.d.ts +557 -0
- package/dist/index.js +443 -0
- package/package.json +64 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
declare const DEFAULT_BASE_URL = "https://partner.mindupload.app";
|
|
2
|
+
/** A response envelope. `success` and `error_message` are always present; any
|
|
3
|
+
* other field the API returns is available by its documented (snake_case) name. */
|
|
4
|
+
interface Result {
|
|
5
|
+
success: boolean;
|
|
6
|
+
error_message?: string | null;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
interface ClientOptions {
|
|
10
|
+
/** Your partner key. A server-side secret — never ship it to a browser. */
|
|
11
|
+
partnerKey: string;
|
|
12
|
+
baseUrl?: string;
|
|
13
|
+
/** Default locale sent with every call (per-call `preferredLanguage` overrides). */
|
|
14
|
+
preferredLanguage?: string;
|
|
15
|
+
timeoutMs?: number;
|
|
16
|
+
/** Retries on 429 / 5xx / network errors, with backoff. Default 2. */
|
|
17
|
+
maxRetries?: number;
|
|
18
|
+
userAgent?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Transport, retry, and error handling shared by every operation. */
|
|
21
|
+
declare class MindUploadBase {
|
|
22
|
+
protected readonly partnerKey: string;
|
|
23
|
+
protected readonly baseUrl: string;
|
|
24
|
+
protected readonly preferredLanguage?: string;
|
|
25
|
+
protected readonly timeoutMs: number;
|
|
26
|
+
protected readonly maxRetries: number;
|
|
27
|
+
protected readonly userAgent: string;
|
|
28
|
+
private readonly fetchFn;
|
|
29
|
+
constructor(options: ClientOptions);
|
|
30
|
+
protected request(operation: string, params: Record<string, unknown>): Promise<Result>;
|
|
31
|
+
private timeoutSignal;
|
|
32
|
+
private errorFor;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface CreateCloneParams {
|
|
36
|
+
preferredLanguage?: string;
|
|
37
|
+
username?: string;
|
|
38
|
+
password?: string;
|
|
39
|
+
codename?: string;
|
|
40
|
+
nickname?: string;
|
|
41
|
+
gender?: string;
|
|
42
|
+
avatarId?: string;
|
|
43
|
+
acceptChatroomInvitationByOthers?: boolean;
|
|
44
|
+
}
|
|
45
|
+
interface GetClonesParams {
|
|
46
|
+
preferredLanguage?: string;
|
|
47
|
+
username?: string;
|
|
48
|
+
password?: string;
|
|
49
|
+
}
|
|
50
|
+
interface UpdateCloneParams {
|
|
51
|
+
preferredLanguage?: string;
|
|
52
|
+
username?: string;
|
|
53
|
+
password?: string;
|
|
54
|
+
codename?: string;
|
|
55
|
+
nickname?: string;
|
|
56
|
+
gender?: string;
|
|
57
|
+
avatarId?: string;
|
|
58
|
+
acceptChatroomInvitationByOthers?: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface GetQuotaParams {
|
|
61
|
+
preferredLanguage?: string;
|
|
62
|
+
username?: string;
|
|
63
|
+
}
|
|
64
|
+
interface CheckUsernameParams {
|
|
65
|
+
preferredLanguage?: string;
|
|
66
|
+
username?: string;
|
|
67
|
+
}
|
|
68
|
+
interface LoginParams {
|
|
69
|
+
preferredLanguage?: string;
|
|
70
|
+
username?: string;
|
|
71
|
+
password?: string;
|
|
72
|
+
}
|
|
73
|
+
interface LogoutParams {
|
|
74
|
+
preferredLanguage?: string;
|
|
75
|
+
username?: string;
|
|
76
|
+
password?: string;
|
|
77
|
+
}
|
|
78
|
+
interface RegisterParams {
|
|
79
|
+
preferredLanguage?: string;
|
|
80
|
+
username?: string;
|
|
81
|
+
password?: string;
|
|
82
|
+
email?: string;
|
|
83
|
+
emailVerificationCode?: string;
|
|
84
|
+
firstName?: string;
|
|
85
|
+
lastName?: string;
|
|
86
|
+
nickname?: string;
|
|
87
|
+
gender?: string;
|
|
88
|
+
birthDate?: number;
|
|
89
|
+
phoneNumber?: string;
|
|
90
|
+
avatarId?: string;
|
|
91
|
+
acceptChatroomInvitationByOthers?: boolean;
|
|
92
|
+
}
|
|
93
|
+
interface CheckChatroomUpdatesParams {
|
|
94
|
+
preferredLanguage?: string;
|
|
95
|
+
username?: string;
|
|
96
|
+
password?: string;
|
|
97
|
+
chatrooms?: Record<string, unknown>[];
|
|
98
|
+
}
|
|
99
|
+
interface CreateChatroomParams {
|
|
100
|
+
preferredLanguage?: string;
|
|
101
|
+
username?: string;
|
|
102
|
+
password?: string;
|
|
103
|
+
chatroomName?: string;
|
|
104
|
+
isPublic?: boolean;
|
|
105
|
+
avatarId?: string;
|
|
106
|
+
soulmateCheckEnabled?: boolean;
|
|
107
|
+
}
|
|
108
|
+
interface CreateChatroomMembershipParams {
|
|
109
|
+
preferredLanguage?: string;
|
|
110
|
+
username?: string;
|
|
111
|
+
password?: string;
|
|
112
|
+
chatroomId?: string;
|
|
113
|
+
inviteeUsername?: string;
|
|
114
|
+
inviteeCodename?: string;
|
|
115
|
+
adminLevel?: string;
|
|
116
|
+
}
|
|
117
|
+
interface CreateChatroomMessageParams {
|
|
118
|
+
preferredLanguage?: string;
|
|
119
|
+
username?: string;
|
|
120
|
+
password?: string;
|
|
121
|
+
chatroomId?: string;
|
|
122
|
+
text?: string;
|
|
123
|
+
}
|
|
124
|
+
interface GetChatroomMembershipParams {
|
|
125
|
+
preferredLanguage?: string;
|
|
126
|
+
page?: number;
|
|
127
|
+
pageSize?: number;
|
|
128
|
+
sortBy?: string;
|
|
129
|
+
sortOrder?: number;
|
|
130
|
+
useCursorPagination?: boolean;
|
|
131
|
+
cursorValue?: string;
|
|
132
|
+
cursorId?: string;
|
|
133
|
+
username?: string;
|
|
134
|
+
password?: string;
|
|
135
|
+
chatroomId?: string;
|
|
136
|
+
}
|
|
137
|
+
interface GetChatroomMessagesParams {
|
|
138
|
+
preferredLanguage?: string;
|
|
139
|
+
page?: number;
|
|
140
|
+
pageSize?: number;
|
|
141
|
+
sortBy?: string;
|
|
142
|
+
sortOrder?: number;
|
|
143
|
+
useCursorPagination?: boolean;
|
|
144
|
+
cursorValue?: string;
|
|
145
|
+
cursorId?: string;
|
|
146
|
+
username?: string;
|
|
147
|
+
password?: string;
|
|
148
|
+
chatroomId?: string;
|
|
149
|
+
sinceValue?: number;
|
|
150
|
+
sinceId?: string;
|
|
151
|
+
}
|
|
152
|
+
interface GetChatroomsParams {
|
|
153
|
+
preferredLanguage?: string;
|
|
154
|
+
page?: number;
|
|
155
|
+
pageSize?: number;
|
|
156
|
+
sortBy?: string;
|
|
157
|
+
sortOrder?: number;
|
|
158
|
+
useCursorPagination?: boolean;
|
|
159
|
+
cursorValue?: string;
|
|
160
|
+
cursorId?: string;
|
|
161
|
+
username?: string;
|
|
162
|
+
password?: string;
|
|
163
|
+
getPublic?: boolean;
|
|
164
|
+
getPrivate?: boolean;
|
|
165
|
+
}
|
|
166
|
+
interface GetChatParams {
|
|
167
|
+
preferredLanguage?: string;
|
|
168
|
+
page?: number;
|
|
169
|
+
pageSize?: number;
|
|
170
|
+
sortBy?: string;
|
|
171
|
+
sortOrder?: number;
|
|
172
|
+
useCursorPagination?: boolean;
|
|
173
|
+
cursorValue?: string;
|
|
174
|
+
cursorId?: string;
|
|
175
|
+
username?: string;
|
|
176
|
+
password?: string;
|
|
177
|
+
codename?: string;
|
|
178
|
+
}
|
|
179
|
+
interface RagParams {
|
|
180
|
+
preferredLanguage?: string;
|
|
181
|
+
username?: string;
|
|
182
|
+
password?: string;
|
|
183
|
+
codename?: string;
|
|
184
|
+
text?: string;
|
|
185
|
+
chatroomId?: string;
|
|
186
|
+
}
|
|
187
|
+
interface TriggerSocialParams {
|
|
188
|
+
preferredLanguage?: string;
|
|
189
|
+
username?: string;
|
|
190
|
+
password?: string;
|
|
191
|
+
membershipId?: string;
|
|
192
|
+
chatroomId?: string;
|
|
193
|
+
}
|
|
194
|
+
interface GetMindClusterParams {
|
|
195
|
+
preferredLanguage?: string;
|
|
196
|
+
username?: string;
|
|
197
|
+
password?: string;
|
|
198
|
+
codename?: string;
|
|
199
|
+
nodeId?: string;
|
|
200
|
+
textsOffset?: number;
|
|
201
|
+
textsPageSize?: number;
|
|
202
|
+
forceRebuild?: boolean;
|
|
203
|
+
}
|
|
204
|
+
interface GetSoulmateReportParams {
|
|
205
|
+
preferredLanguage?: string;
|
|
206
|
+
username?: string;
|
|
207
|
+
password?: string;
|
|
208
|
+
myCloneId?: string;
|
|
209
|
+
otherCloneId?: string;
|
|
210
|
+
chatroomId?: string;
|
|
211
|
+
}
|
|
212
|
+
interface AbortMultipartUploadParams {
|
|
213
|
+
preferredLanguage?: string;
|
|
214
|
+
username?: string;
|
|
215
|
+
password?: string;
|
|
216
|
+
r2Key?: string;
|
|
217
|
+
uploadId?: string;
|
|
218
|
+
}
|
|
219
|
+
interface CancelUploadParams {
|
|
220
|
+
preferredLanguage?: string;
|
|
221
|
+
username?: string;
|
|
222
|
+
password?: string;
|
|
223
|
+
r2Key?: string;
|
|
224
|
+
}
|
|
225
|
+
interface CompleteMultipartUploadParams {
|
|
226
|
+
preferredLanguage?: string;
|
|
227
|
+
username?: string;
|
|
228
|
+
password?: string;
|
|
229
|
+
r2Key?: string;
|
|
230
|
+
uploadId?: string;
|
|
231
|
+
parts?: Record<string, unknown>[];
|
|
232
|
+
}
|
|
233
|
+
interface ListUploadPartsParams {
|
|
234
|
+
preferredLanguage?: string;
|
|
235
|
+
username?: string;
|
|
236
|
+
password?: string;
|
|
237
|
+
r2Key?: string;
|
|
238
|
+
uploadId?: string;
|
|
239
|
+
}
|
|
240
|
+
interface RequestMultipartUploadParams {
|
|
241
|
+
preferredLanguage?: string;
|
|
242
|
+
username?: string;
|
|
243
|
+
password?: string;
|
|
244
|
+
filename?: string;
|
|
245
|
+
contentType?: string;
|
|
246
|
+
fileSizeBytes?: number;
|
|
247
|
+
mediaType?: string;
|
|
248
|
+
hasThumbnail?: boolean;
|
|
249
|
+
}
|
|
250
|
+
interface RequestUploadUrlParams {
|
|
251
|
+
preferredLanguage?: string;
|
|
252
|
+
username?: string;
|
|
253
|
+
password?: string;
|
|
254
|
+
filename?: string;
|
|
255
|
+
contentType?: string;
|
|
256
|
+
fileSizeBytes?: number;
|
|
257
|
+
mediaType?: string;
|
|
258
|
+
hasThumbnail?: boolean;
|
|
259
|
+
}
|
|
260
|
+
interface SignUploadPartParams {
|
|
261
|
+
preferredLanguage?: string;
|
|
262
|
+
username?: string;
|
|
263
|
+
password?: string;
|
|
264
|
+
r2Key?: string;
|
|
265
|
+
uploadId?: string;
|
|
266
|
+
partNumber?: number;
|
|
267
|
+
}
|
|
268
|
+
interface SignUploadPartsBatchParams {
|
|
269
|
+
preferredLanguage?: string;
|
|
270
|
+
username?: string;
|
|
271
|
+
password?: string;
|
|
272
|
+
r2Key?: string;
|
|
273
|
+
uploadId?: string;
|
|
274
|
+
partNumbers?: number[];
|
|
275
|
+
}
|
|
276
|
+
interface CreateTextParams {
|
|
277
|
+
preferredLanguage?: string;
|
|
278
|
+
username?: string;
|
|
279
|
+
password?: string;
|
|
280
|
+
codename?: string;
|
|
281
|
+
cloneId?: string;
|
|
282
|
+
text?: string;
|
|
283
|
+
type?: string;
|
|
284
|
+
}
|
|
285
|
+
interface GetTextsParams {
|
|
286
|
+
preferredLanguage?: string;
|
|
287
|
+
page?: number;
|
|
288
|
+
pageSize?: number;
|
|
289
|
+
sortBy?: string;
|
|
290
|
+
sortOrder?: number;
|
|
291
|
+
useCursorPagination?: boolean;
|
|
292
|
+
cursorValue?: string;
|
|
293
|
+
cursorId?: string;
|
|
294
|
+
username?: string;
|
|
295
|
+
password?: string;
|
|
296
|
+
codename?: string;
|
|
297
|
+
type?: string;
|
|
298
|
+
}
|
|
299
|
+
interface GetUserParams {
|
|
300
|
+
preferredLanguage?: string;
|
|
301
|
+
username?: string;
|
|
302
|
+
password?: string;
|
|
303
|
+
}
|
|
304
|
+
interface UpdateUserParams {
|
|
305
|
+
preferredLanguage?: string;
|
|
306
|
+
username?: string;
|
|
307
|
+
password?: string;
|
|
308
|
+
email?: string;
|
|
309
|
+
emailVerificationCode?: string;
|
|
310
|
+
firstName?: string;
|
|
311
|
+
lastName?: string;
|
|
312
|
+
nickname?: string;
|
|
313
|
+
gender?: string;
|
|
314
|
+
birthDate?: number;
|
|
315
|
+
phoneNumber?: string;
|
|
316
|
+
avatarId?: string;
|
|
317
|
+
acceptChatroomInvitationByOthers?: boolean;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Client for the Mind Upload partner API. Create one with your partner key,
|
|
321
|
+
* then call any operation. Every method resolves to a {@link Result} and
|
|
322
|
+
* rejects with a {@link MindUploadError} subclass on failure.
|
|
323
|
+
*/
|
|
324
|
+
declare class MindUpload extends MindUploadBase {
|
|
325
|
+
/** Create a new AI consciousness for the user.
|
|
326
|
+
*
|
|
327
|
+
* Response fields: success, error_message.
|
|
328
|
+
* @see https://docs.mindupload.app
|
|
329
|
+
*/
|
|
330
|
+
createClone(params?: CreateCloneParams): Promise<Result>;
|
|
331
|
+
/** List the user's AI consciousnesses.
|
|
332
|
+
*
|
|
333
|
+
* Response fields: success, error_message, clones.
|
|
334
|
+
* @see https://docs.mindupload.app
|
|
335
|
+
*/
|
|
336
|
+
getClones(params?: GetClonesParams): Promise<Result>;
|
|
337
|
+
/** Update an AI consciousness's profile.
|
|
338
|
+
*
|
|
339
|
+
* Response fields: success, error_message.
|
|
340
|
+
* @see https://docs.mindupload.app
|
|
341
|
+
*/
|
|
342
|
+
updateClone(params?: UpdateCloneParams): Promise<Result>;
|
|
343
|
+
/** Check your partner API rate limits, credit caps, and current usage.
|
|
344
|
+
*
|
|
345
|
+
* Response fields: success, error_message, per_user_rate_limit_per_min, per_user_daily_credit_cap, partner_rate_limit_per_min, partner_daily_credit_cap, max_users, registered_users, partner_requests_last_minute, partner_credit_spends_last_day, user, user_requests_last_minute, user_credit_spends_last_day, credit_spending_tasks, operation_duration_ms.
|
|
346
|
+
* @see https://docs.mindupload.app
|
|
347
|
+
*/
|
|
348
|
+
getQuota(params?: GetQuotaParams): Promise<Result>;
|
|
349
|
+
/** Check whether a username is still available before registering.
|
|
350
|
+
*
|
|
351
|
+
* Response fields: success, error_message, exists, disabled, rate_limited, flood_window, wait_seconds, operation_duration_ms.
|
|
352
|
+
* @see https://docs.mindupload.app
|
|
353
|
+
*/
|
|
354
|
+
checkUsername(params?: CheckUsernameParams): Promise<Result>;
|
|
355
|
+
/** Sign a user in and receive a session token (JWT) for subsequent calls.
|
|
356
|
+
*
|
|
357
|
+
* Response fields: success, error_message, jwt, decrypted_user.
|
|
358
|
+
* @see https://docs.mindupload.app
|
|
359
|
+
*/
|
|
360
|
+
login(params?: LoginParams): Promise<Result>;
|
|
361
|
+
/** End the current user session.
|
|
362
|
+
*
|
|
363
|
+
* Response fields: success, error_message, revoked, operation_duration_ms.
|
|
364
|
+
* @see https://docs.mindupload.app
|
|
365
|
+
*/
|
|
366
|
+
logout(params?: LogoutParams): Promise<Result>;
|
|
367
|
+
/** Create a user account on your platform.
|
|
368
|
+
*
|
|
369
|
+
* Response fields: success, error_message, jwt, decrypted_user.
|
|
370
|
+
* @see https://docs.mindupload.app
|
|
371
|
+
*/
|
|
372
|
+
register(params?: RegisterParams): Promise<Result>;
|
|
373
|
+
/** Cheaply poll whether the user's chatrooms have new activity.
|
|
374
|
+
*
|
|
375
|
+
* Response fields: success, error_message, server_time, poll_config, chatrooms.
|
|
376
|
+
* @see https://docs.mindupload.app
|
|
377
|
+
*/
|
|
378
|
+
checkChatroomUpdates(params?: CheckChatroomUpdatesParams): Promise<Result>;
|
|
379
|
+
/** Create a chatroom.
|
|
380
|
+
*
|
|
381
|
+
* Response fields: success, error_message, chatroom_id.
|
|
382
|
+
* @see https://docs.mindupload.app
|
|
383
|
+
*/
|
|
384
|
+
createChatroom(params?: CreateChatroomParams): Promise<Result>;
|
|
385
|
+
/** Invite a user or an AI consciousness into a chatroom.
|
|
386
|
+
*
|
|
387
|
+
* Response fields: success, error_message, membership_id.
|
|
388
|
+
* @see https://docs.mindupload.app
|
|
389
|
+
*/
|
|
390
|
+
createChatroomMembership(params?: CreateChatroomMembershipParams): Promise<Result>;
|
|
391
|
+
/** Send a message to a chatroom.
|
|
392
|
+
*
|
|
393
|
+
* Response fields: success, error_message, message_id.
|
|
394
|
+
* @see https://docs.mindupload.app
|
|
395
|
+
*/
|
|
396
|
+
createChatroomMessage(params?: CreateChatroomMessageParams): Promise<Result>;
|
|
397
|
+
/** List the members of a chatroom the user belongs to.
|
|
398
|
+
*
|
|
399
|
+
* Response fields: success, error_message, total_count, page, page_size, total_pages, has_next, has_prev, next_cursor_value, next_cursor_id, memberships.
|
|
400
|
+
* @see https://docs.mindupload.app
|
|
401
|
+
*/
|
|
402
|
+
getChatroomMembership(params?: GetChatroomMembershipParams): Promise<Result>;
|
|
403
|
+
/** Fetch messages from a chatroom the user belongs to.
|
|
404
|
+
*
|
|
405
|
+
* Response fields: success, error_message, total_count, page, page_size, total_pages, has_next, has_prev, next_cursor_value, next_cursor_id, messages, media_thumbnails, since_overflow.
|
|
406
|
+
* @see https://docs.mindupload.app
|
|
407
|
+
*/
|
|
408
|
+
getChatroomMessages(params?: GetChatroomMessagesParams): Promise<Result>;
|
|
409
|
+
/** List the chatrooms the user belongs to.
|
|
410
|
+
*
|
|
411
|
+
* Response fields: success, error_message, total_count, page, page_size, total_pages, has_next, has_prev, next_cursor_value, next_cursor_id, chatrooms.
|
|
412
|
+
* @see https://docs.mindupload.app
|
|
413
|
+
*/
|
|
414
|
+
getChatrooms(params?: GetChatroomsParams): Promise<Result>;
|
|
415
|
+
/** Fetch the one-on-one conversation history with an AI consciousness.
|
|
416
|
+
*
|
|
417
|
+
* Response fields: success, error_message, total_count, page, page_size, total_pages, has_next, has_prev, next_cursor_value, next_cursor_id, chats, media_thumbnails.
|
|
418
|
+
* @see https://docs.mindupload.app
|
|
419
|
+
*/
|
|
420
|
+
getChat(params?: GetChatParams): Promise<Result>;
|
|
421
|
+
/** Send a message to an AI consciousness and receive its reply.
|
|
422
|
+
*
|
|
423
|
+
* Response fields: success, error_message, response_text, clone_nickname, consolidation_summary, consolidation_count, consolidation_dispatched.
|
|
424
|
+
* @see https://docs.mindupload.app
|
|
425
|
+
*/
|
|
426
|
+
rag(params?: RagParams): Promise<Result>;
|
|
427
|
+
/** Have an AI consciousness proactively join the conversation in a chatroom.
|
|
428
|
+
*
|
|
429
|
+
* Response fields: success, error_message, response_text, chatroom_digests_count, chatroom_digests_summary, consolidation_summary, consolidation_count, consolidation_dispatched.
|
|
430
|
+
* @see https://docs.mindupload.app
|
|
431
|
+
*/
|
|
432
|
+
triggerSocial(params?: TriggerSocialParams): Promise<Result>;
|
|
433
|
+
/** Fetch the mind-graph visualization data of an AI consciousness.
|
|
434
|
+
*
|
|
435
|
+
* Response fields: success, error_message, root_node_id, node, children, texts, total_texts, texts_offset, has_more_texts, is_building.
|
|
436
|
+
* @see https://docs.mindupload.app
|
|
437
|
+
*/
|
|
438
|
+
getMindCluster(params?: GetMindClusterParams): Promise<Result>;
|
|
439
|
+
/** Generate or fetch the compatibility report between two chatroom members.
|
|
440
|
+
*
|
|
441
|
+
* Response fields: success, error_message, report, report_generated_at, is_generating, charged.
|
|
442
|
+
* @see https://docs.mindupload.app
|
|
443
|
+
*/
|
|
444
|
+
getSoulmateReport(params?: GetSoulmateReportParams): Promise<Result>;
|
|
445
|
+
/** Cancel a multipart upload and discard its parts.
|
|
446
|
+
*
|
|
447
|
+
* Response fields: success, error_message.
|
|
448
|
+
* @see https://docs.mindupload.app
|
|
449
|
+
*/
|
|
450
|
+
abortMultipartUpload(params?: AbortMultipartUploadParams): Promise<Result>;
|
|
451
|
+
/** Cancel a pending upload.
|
|
452
|
+
*
|
|
453
|
+
* Response fields: success, error_message.
|
|
454
|
+
* @see https://docs.mindupload.app
|
|
455
|
+
*/
|
|
456
|
+
cancelUpload(params?: CancelUploadParams): Promise<Result>;
|
|
457
|
+
/** Finish a multipart upload.
|
|
458
|
+
*
|
|
459
|
+
* Response fields: success, error_message, media_url.
|
|
460
|
+
* @see https://docs.mindupload.app
|
|
461
|
+
*/
|
|
462
|
+
completeMultipartUpload(params?: CompleteMultipartUploadParams): Promise<Result>;
|
|
463
|
+
/** List the parts already uploaded in a multipart upload.
|
|
464
|
+
*
|
|
465
|
+
* Response fields: success, error_message, parts.
|
|
466
|
+
* @see https://docs.mindupload.app
|
|
467
|
+
*/
|
|
468
|
+
listUploadParts(params?: ListUploadPartsParams): Promise<Result>;
|
|
469
|
+
/** Start a large-file upload in multiple parts.
|
|
470
|
+
*
|
|
471
|
+
* Response fields: success, error_message, upload_id, r2_key, media_url, signed_media_url, thumbnail_r2_key, thumbnail_presigned_url, signed_thumbnail_url, message.
|
|
472
|
+
* @see https://docs.mindupload.app
|
|
473
|
+
*/
|
|
474
|
+
requestMultipartUpload(params?: RequestMultipartUploadParams): Promise<Result>;
|
|
475
|
+
/** Request an upload slot and a signed viewing link for a media attachment.
|
|
476
|
+
*
|
|
477
|
+
* Response fields: success, error_message, r2_key, presigned_url, media_url, signed_media_url, thumbnail_r2_key, thumbnail_presigned_url, signed_thumbnail_url, message.
|
|
478
|
+
* @see https://docs.mindupload.app
|
|
479
|
+
*/
|
|
480
|
+
requestUploadUrl(params?: RequestUploadUrlParams): Promise<Result>;
|
|
481
|
+
/** Get the signed link for one part of a multipart upload.
|
|
482
|
+
*
|
|
483
|
+
* Response fields: success, error_message, presigned_url.
|
|
484
|
+
* @see https://docs.mindupload.app
|
|
485
|
+
*/
|
|
486
|
+
signUploadPart(params?: SignUploadPartParams): Promise<Result>;
|
|
487
|
+
/** Get signed links for several parts of a multipart upload at once.
|
|
488
|
+
*
|
|
489
|
+
* Response fields: success, error_message, presigned_urls.
|
|
490
|
+
* @see https://docs.mindupload.app
|
|
491
|
+
*/
|
|
492
|
+
signUploadPartsBatch(params?: SignUploadPartsBatchParams): Promise<Result>;
|
|
493
|
+
/** Upload a memory or persona entry to an AI consciousness.
|
|
494
|
+
*
|
|
495
|
+
* Response fields: success, error_message, cluster_label, cluster_modified_count.
|
|
496
|
+
* @see https://docs.mindupload.app
|
|
497
|
+
*/
|
|
498
|
+
createText(params?: CreateTextParams): Promise<Result>;
|
|
499
|
+
/** List the memories and persona entries uploaded to an AI consciousness.
|
|
500
|
+
*
|
|
501
|
+
* Response fields: success, error_message, total_count, page, page_size, total_pages, has_next, has_prev, next_cursor_value, next_cursor_id, texts.
|
|
502
|
+
* @see https://docs.mindupload.app
|
|
503
|
+
*/
|
|
504
|
+
getTexts(params?: GetTextsParams): Promise<Result>;
|
|
505
|
+
/** Fetch the signed-in user's profile.
|
|
506
|
+
*
|
|
507
|
+
* Response fields: success, error_message, jwt, decrypted_user.
|
|
508
|
+
* @see https://docs.mindupload.app
|
|
509
|
+
*/
|
|
510
|
+
getUser(params?: GetUserParams): Promise<Result>;
|
|
511
|
+
/** Update the signed-in user's profile.
|
|
512
|
+
*
|
|
513
|
+
* Response fields: success, error_message.
|
|
514
|
+
* @see https://docs.mindupload.app
|
|
515
|
+
*/
|
|
516
|
+
updateUser(params?: UpdateUserParams): Promise<Result>;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
interface ErrorOptions {
|
|
520
|
+
operation?: string;
|
|
521
|
+
response?: Result;
|
|
522
|
+
}
|
|
523
|
+
interface ApiErrorOptions extends ErrorOptions {
|
|
524
|
+
status: number;
|
|
525
|
+
}
|
|
526
|
+
interface RateLimitOptions extends ApiErrorOptions {
|
|
527
|
+
retryAfter?: number;
|
|
528
|
+
}
|
|
529
|
+
/** Base class for every Mind Upload error — one `catch` handles them all. */
|
|
530
|
+
declare class MindUploadError extends Error {
|
|
531
|
+
readonly operation?: string;
|
|
532
|
+
readonly response?: Result;
|
|
533
|
+
constructor(message: string, options?: ErrorOptions);
|
|
534
|
+
}
|
|
535
|
+
/** The API returned an error HTTP status (or an unexpected response). */
|
|
536
|
+
declare class ApiError extends MindUploadError {
|
|
537
|
+
readonly status: number;
|
|
538
|
+
constructor(message: string, options: ApiErrorOptions);
|
|
539
|
+
}
|
|
540
|
+
/** The partner key was missing, malformed, or rejected (HTTP 401). */
|
|
541
|
+
declare class AuthenticationError extends ApiError {
|
|
542
|
+
constructor(message: string, options: ApiErrorOptions);
|
|
543
|
+
}
|
|
544
|
+
/** A rate limit or credit cap was hit (HTTP 429). */
|
|
545
|
+
declare class RateLimitError extends ApiError {
|
|
546
|
+
/** Server-advised wait in seconds, when provided. */
|
|
547
|
+
readonly retryAfter?: number;
|
|
548
|
+
constructor(message: string, options: RateLimitOptions);
|
|
549
|
+
}
|
|
550
|
+
/** The API could not be reached (DNS, TLS, timeout, or network failure). */
|
|
551
|
+
declare class MindUploadConnectionError extends MindUploadError {
|
|
552
|
+
constructor(message: string, options?: ErrorOptions);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
declare const VERSION = "1.5.1";
|
|
556
|
+
|
|
557
|
+
export { type AbortMultipartUploadParams, ApiError, type ApiErrorOptions, AuthenticationError, type CancelUploadParams, type CheckChatroomUpdatesParams, type CheckUsernameParams, type ClientOptions, type CompleteMultipartUploadParams, type CreateChatroomMembershipParams, type CreateChatroomMessageParams, type CreateChatroomParams, type CreateCloneParams, type CreateTextParams, DEFAULT_BASE_URL, type ErrorOptions, type GetChatParams, type GetChatroomMembershipParams, type GetChatroomMessagesParams, type GetChatroomsParams, type GetClonesParams, type GetMindClusterParams, type GetQuotaParams, type GetSoulmateReportParams, type GetTextsParams, type GetUserParams, type ListUploadPartsParams, type LoginParams, type LogoutParams, MindUpload, MindUploadBase, MindUploadConnectionError, MindUploadError, type RagParams, RateLimitError, type RateLimitOptions, type RegisterParams, type RequestMultipartUploadParams, type RequestUploadUrlParams, type Result, type SignUploadPartParams, type SignUploadPartsBatchParams, type TriggerSocialParams, type UpdateCloneParams, type UpdateUserParams, VERSION };
|