@nvisy/sdk 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -1
- package/README.md +44 -21
- package/dist/auth/index.d.ts +7 -36
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +96 -174
- package/dist/auth/index.js.map +1 -1
- package/dist/client-yLrhST0r.d.ts +819 -0
- package/dist/client-yLrhST0r.d.ts.map +1 -0
- package/dist/config-BRQp8Cat.d.ts +83 -0
- package/dist/config-BRQp8Cat.d.ts.map +1 -0
- package/dist/datatypes/index.d.ts +2 -9
- package/dist/datatypes/index.js +0 -3
- package/dist/error-DmkKaDjI.js +199 -0
- package/dist/error-DmkKaDjI.js.map +1 -0
- package/dist/index-Cmm2g3SG.d.ts +11322 -0
- package/dist/index-Cmm2g3SG.d.ts.map +1 -0
- package/dist/index.d.ts +86 -98
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +279 -1472
- package/dist/index.js.map +1 -1
- package/dist/services/index.d.ts +2 -5
- package/dist/services/index.js +2 -1066
- package/dist/services-Dh0FMDzU.js +1040 -0
- package/dist/services-Dh0FMDzU.js.map +1 -0
- package/package.json +13 -13
- package/dist/auth-CncOz2vx.d.ts +0 -7420
- package/dist/client-DQRisDAK.d.ts +0 -808
- package/dist/config-L7FKq_q5.d.ts +0 -81
- package/dist/datatypes/index.js.map +0 -1
- package/dist/services/index.js.map +0 -1
- package/dist/workspace-BjdbMWsa.d.ts +0 -118
|
@@ -1,808 +0,0 @@
|
|
|
1
|
-
import { Client } from 'openapi-fetch';
|
|
2
|
-
import { C as ClientConfig } from './config-L7FKq_q5.js';
|
|
3
|
-
import { L as Login, A as AuthToken, S as Signup, p as paths } from './auth-CncOz2vx.js';
|
|
4
|
-
import { A as Account$1, U as UpdateAccount, aa as CursorPagination, c as ActivitiesPage, f as AnnotationsPage, d as Annotation, C as CreateAnnotation, e as UpdateAnnotation, l as ApiTokensPage, g as ApiToken, j as CreateApiToken, h as ApiTokenWithJWT, k as UpdateApiToken, p as CommentsPage, n as CreateComment, m as Comment, o as UpdateComment, s as DocumentsPage, D as Document, q as CreateDocument, r as UpdateDocument, F as File, L as ListFiles, z as FilesPage, t as UpdateFile, v as DownloadFiles, w as DeleteFiles, K as IntegrationsPage, I as Integration, B as CreateIntegration, E as UpdateIntegration, G as UpdateIntegrationCredentials, W as ListInvites, _ as InvitesPage, N as CreateInvite, M as Invite, R as ReplyInvite, O as GenerateInviteCode, Q as InviteCode, $ as Member, Z as InvitePreview, a1 as ListMembers, a3 as MembersPage, a0 as UpdateMember, a9 as NotificationsPage, a8 as UnreadStatus, ac as IntegrationRunsPage, ab as IntegrationRun, af as CheckHealth, ad as MonitorStatus, an as WebhooksPage, ag as Webhook, ah as CreateWebhook, ai as UpdateWebhook, aj as TestWebhook, ak as WebhookResult, as as WorkspacesPage, ao as Workspace, ap as CreateWorkspace, aq as UpdateWorkspace, a6 as NotificationSettings, a7 as UpdateNotificationSettings } from './workspace-BjdbMWsa.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Service for handling account operations
|
|
8
|
-
*/
|
|
9
|
-
declare class Account {
|
|
10
|
-
#private;
|
|
11
|
-
constructor(api: ApiClient);
|
|
12
|
-
/**
|
|
13
|
-
* Get the authenticated user's account details
|
|
14
|
-
* @returns Promise that resolves with the account details
|
|
15
|
-
* @throws {ApiError} if the request fails
|
|
16
|
-
*/
|
|
17
|
-
getAccount(): Promise<Account$1>;
|
|
18
|
-
/**
|
|
19
|
-
* Update the authenticated user's account details
|
|
20
|
-
* @param updates - Account update request
|
|
21
|
-
* @returns Promise that resolves with the updated account
|
|
22
|
-
* @throws {ApiError} if the request fails
|
|
23
|
-
*/
|
|
24
|
-
updateAccount(updates: UpdateAccount): Promise<Account$1>;
|
|
25
|
-
/**
|
|
26
|
-
* Delete the authenticated user's account
|
|
27
|
-
* @returns Promise that resolves when the account is deleted
|
|
28
|
-
* @throws {ApiError} if the request fails
|
|
29
|
-
*/
|
|
30
|
-
deleteAccount(): Promise<void>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Service for handling workspace activity operations
|
|
35
|
-
*/
|
|
36
|
-
declare class Activities {
|
|
37
|
-
#private;
|
|
38
|
-
constructor(api: ApiClient);
|
|
39
|
-
/**
|
|
40
|
-
* List activities for a workspace
|
|
41
|
-
* @param workspaceId - Workspace ID
|
|
42
|
-
* @param query - Optional pagination parameters (limit, after)
|
|
43
|
-
* @returns Promise that resolves with a paginated list of activities
|
|
44
|
-
* @throws {ApiError} if the request fails
|
|
45
|
-
*/
|
|
46
|
-
listActivities(workspaceId: string, query?: CursorPagination): Promise<ActivitiesPage>;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Service for handling file annotation operations
|
|
51
|
-
*/
|
|
52
|
-
declare class Annotations {
|
|
53
|
-
#private;
|
|
54
|
-
constructor(api: ApiClient);
|
|
55
|
-
/**
|
|
56
|
-
* List annotations for a file
|
|
57
|
-
* @param fileId - File ID
|
|
58
|
-
* @param query - Optional pagination parameters (limit, after)
|
|
59
|
-
* @returns Promise that resolves with a paginated list of annotations
|
|
60
|
-
* @throws {ApiError} if the request fails
|
|
61
|
-
*/
|
|
62
|
-
listAnnotations(fileId: string, query?: CursorPagination): Promise<AnnotationsPage>;
|
|
63
|
-
/**
|
|
64
|
-
* Get annotation details by ID
|
|
65
|
-
* @param annotationId - Annotation ID
|
|
66
|
-
* @returns Promise that resolves with the annotation details
|
|
67
|
-
* @throws {ApiError} if the request fails
|
|
68
|
-
*/
|
|
69
|
-
getAnnotation(annotationId: string): Promise<Annotation>;
|
|
70
|
-
/**
|
|
71
|
-
* Create a new annotation
|
|
72
|
-
* @param fileId - File ID
|
|
73
|
-
* @param annotation - Annotation creation request
|
|
74
|
-
* @returns Promise that resolves with the created annotation
|
|
75
|
-
* @throws {ApiError} if the request fails
|
|
76
|
-
*/
|
|
77
|
-
createAnnotation(fileId: string, annotation: CreateAnnotation): Promise<Annotation>;
|
|
78
|
-
/**
|
|
79
|
-
* Update an existing annotation
|
|
80
|
-
* @param annotationId - Annotation ID
|
|
81
|
-
* @param updates - Annotation update request
|
|
82
|
-
* @returns Promise that resolves with the updated annotation
|
|
83
|
-
* @throws {ApiError} if the request fails
|
|
84
|
-
*/
|
|
85
|
-
updateAnnotation(annotationId: string, updates: UpdateAnnotation): Promise<Annotation>;
|
|
86
|
-
/**
|
|
87
|
-
* Delete an annotation
|
|
88
|
-
* @param annotationId - Annotation ID
|
|
89
|
-
* @returns Promise that resolves when the annotation is deleted
|
|
90
|
-
* @throws {ApiError} if the request fails
|
|
91
|
-
*/
|
|
92
|
-
deleteAnnotation(annotationId: string): Promise<void>;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Service for handling API token operations
|
|
97
|
-
*/
|
|
98
|
-
declare class ApiTokens {
|
|
99
|
-
#private;
|
|
100
|
-
constructor(api: ApiClient);
|
|
101
|
-
/**
|
|
102
|
-
* List all API tokens for the authenticated account
|
|
103
|
-
* @param query - Optional pagination parameters (limit, after)
|
|
104
|
-
* @returns Promise that resolves with a paginated list of API tokens
|
|
105
|
-
* @throws {ApiError} if the request fails
|
|
106
|
-
*/
|
|
107
|
-
listApiTokens(query?: CursorPagination): Promise<ApiTokensPage>;
|
|
108
|
-
/**
|
|
109
|
-
* Get a specific API token by token ID
|
|
110
|
-
* @param tokenId - The token identifier
|
|
111
|
-
* @returns Promise that resolves with the API token details
|
|
112
|
-
* @throws {ApiError} if the request fails
|
|
113
|
-
*/
|
|
114
|
-
getApiToken(tokenId: string): Promise<ApiToken>;
|
|
115
|
-
/**
|
|
116
|
-
* Create a new API token
|
|
117
|
-
* @param token - Token creation request
|
|
118
|
-
* @returns Promise that resolves with the created token (includes JWT, shown only once)
|
|
119
|
-
* @throws {ApiError} if the request fails
|
|
120
|
-
*/
|
|
121
|
-
createApiToken(token: CreateApiToken): Promise<ApiTokenWithJWT>;
|
|
122
|
-
/**
|
|
123
|
-
* Update an existing API token
|
|
124
|
-
* @param tokenId - The token identifier
|
|
125
|
-
* @param updates - Token update request
|
|
126
|
-
* @returns Promise that resolves with the updated token
|
|
127
|
-
* @throws {ApiError} if the request fails
|
|
128
|
-
*/
|
|
129
|
-
updateApiToken(tokenId: string, updates: UpdateApiToken): Promise<ApiToken>;
|
|
130
|
-
/**
|
|
131
|
-
* Revoke an API token
|
|
132
|
-
* @param tokenId - The token identifier
|
|
133
|
-
* @returns Promise that resolves when the token is revoked
|
|
134
|
-
* @throws {ApiError} if the request fails
|
|
135
|
-
*/
|
|
136
|
-
revokeApiToken(tokenId: string): Promise<void>;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Service for handling authentication operations
|
|
141
|
-
*/
|
|
142
|
-
declare class Auth {
|
|
143
|
-
#private;
|
|
144
|
-
constructor(api: ApiClient);
|
|
145
|
-
/**
|
|
146
|
-
* Login with email and password
|
|
147
|
-
* @param credentials - Login credentials
|
|
148
|
-
* @returns Promise that resolves with the auth response containing access token
|
|
149
|
-
* @throws {ApiError} if the request fails
|
|
150
|
-
*/
|
|
151
|
-
loginAccount(credentials: Login): Promise<AuthToken>;
|
|
152
|
-
/**
|
|
153
|
-
* Sign up a new account
|
|
154
|
-
* @param credentials - Signup details
|
|
155
|
-
* @returns Promise that resolves with the auth response containing access token
|
|
156
|
-
* @throws {ApiError} if the request fails
|
|
157
|
-
*/
|
|
158
|
-
signupAccount(credentials: Signup): Promise<AuthToken>;
|
|
159
|
-
/**
|
|
160
|
-
* Logout and invalidate the current access token
|
|
161
|
-
* @returns Promise that resolves when logout is complete
|
|
162
|
-
* @throws {ApiError} if the request fails
|
|
163
|
-
*/
|
|
164
|
-
logoutAccount(): Promise<void>;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Service for handling file comment operations
|
|
169
|
-
*/
|
|
170
|
-
declare class Comments {
|
|
171
|
-
#private;
|
|
172
|
-
constructor(api: ApiClient);
|
|
173
|
-
/**
|
|
174
|
-
* List all comments on a file
|
|
175
|
-
* @param fileId - File ID
|
|
176
|
-
* @param query - Optional pagination parameters (limit, after)
|
|
177
|
-
* @returns Promise that resolves with a paginated list of comments
|
|
178
|
-
* @throws {ApiError} if the request fails
|
|
179
|
-
*/
|
|
180
|
-
listComments(fileId: string, query?: CursorPagination): Promise<CommentsPage>;
|
|
181
|
-
/**
|
|
182
|
-
* Create a new comment on a file
|
|
183
|
-
* @param fileId - File ID
|
|
184
|
-
* @param comment - Comment creation request
|
|
185
|
-
* @returns Promise that resolves with the created comment
|
|
186
|
-
* @throws {ApiError} if the request fails
|
|
187
|
-
*/
|
|
188
|
-
createComment(fileId: string, comment: CreateComment): Promise<Comment>;
|
|
189
|
-
/**
|
|
190
|
-
* Update a comment
|
|
191
|
-
* @param commentId - Comment ID
|
|
192
|
-
* @param updates - Comment update request
|
|
193
|
-
* @returns Promise that resolves with the updated comment
|
|
194
|
-
* @throws {ApiError} if the request fails
|
|
195
|
-
*/
|
|
196
|
-
updateComment(commentId: string, updates: UpdateComment): Promise<Comment>;
|
|
197
|
-
/**
|
|
198
|
-
* Delete a comment
|
|
199
|
-
* @param commentId - Comment ID
|
|
200
|
-
* @returns Promise that resolves when the comment is deleted
|
|
201
|
-
* @throws {ApiError} if the request fails
|
|
202
|
-
*/
|
|
203
|
-
deleteComment(commentId: string): Promise<void>;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Service for handling document operations
|
|
208
|
-
*/
|
|
209
|
-
declare class Documents {
|
|
210
|
-
#private;
|
|
211
|
-
constructor(api: ApiClient);
|
|
212
|
-
/**
|
|
213
|
-
* List documents in a workspace
|
|
214
|
-
* @param workspaceId - Workspace ID
|
|
215
|
-
* @param query - Optional pagination parameters (limit, after)
|
|
216
|
-
* @returns Promise that resolves with a paginated list of documents
|
|
217
|
-
* @throws {ApiError} if the request fails
|
|
218
|
-
*/
|
|
219
|
-
listDocuments(workspaceId: string, query?: CursorPagination): Promise<DocumentsPage>;
|
|
220
|
-
/**
|
|
221
|
-
* Get document details by ID
|
|
222
|
-
* @param documentId - Document ID
|
|
223
|
-
* @returns Promise that resolves with the document details
|
|
224
|
-
* @throws {ApiError} if the request fails
|
|
225
|
-
*/
|
|
226
|
-
getDocument(documentId: string): Promise<Document>;
|
|
227
|
-
/**
|
|
228
|
-
* Create a new document
|
|
229
|
-
* @param workspaceId - Workspace ID
|
|
230
|
-
* @param document - Document creation request
|
|
231
|
-
* @returns Promise that resolves with the created document
|
|
232
|
-
* @throws {ApiError} if the request fails
|
|
233
|
-
*/
|
|
234
|
-
createDocument(workspaceId: string, document: CreateDocument): Promise<Document>;
|
|
235
|
-
/**
|
|
236
|
-
* Update an existing document
|
|
237
|
-
* @param documentId - Document ID
|
|
238
|
-
* @param updates - Document update request
|
|
239
|
-
* @returns Promise that resolves with the updated document
|
|
240
|
-
* @throws {ApiError} if the request fails
|
|
241
|
-
*/
|
|
242
|
-
updateDocument(documentId: string, updates: UpdateDocument): Promise<Document>;
|
|
243
|
-
/**
|
|
244
|
-
* Delete a document
|
|
245
|
-
* @param documentId - Document ID
|
|
246
|
-
* @returns Promise that resolves when the document is deleted
|
|
247
|
-
* @throws {ApiError} if the request fails
|
|
248
|
-
*/
|
|
249
|
-
deleteDocument(documentId: string): Promise<void>;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Service for handling file operations
|
|
254
|
-
*/
|
|
255
|
-
declare class Files {
|
|
256
|
-
#private;
|
|
257
|
-
constructor(api: ApiClient);
|
|
258
|
-
/**
|
|
259
|
-
* Upload one or more files to a workspace
|
|
260
|
-
* @param workspaceId - Workspace ID
|
|
261
|
-
* @param files - File or array of files to upload
|
|
262
|
-
* @returns Promise that resolves with the uploaded file metadata
|
|
263
|
-
* @throws {ApiError} if the request fails
|
|
264
|
-
*/
|
|
265
|
-
uploadFiles(workspaceId: string, files: Blob | Blob[]): Promise<File[]>;
|
|
266
|
-
/**
|
|
267
|
-
* List files in a workspace
|
|
268
|
-
* @param workspaceId - Workspace ID
|
|
269
|
-
* @param query - Optional query parameters (formats, limit, after)
|
|
270
|
-
* @returns Promise that resolves with a paginated list of files
|
|
271
|
-
* @throws {ApiError} if the request fails
|
|
272
|
-
*/
|
|
273
|
-
listFiles(workspaceId: string, query?: ListFiles & CursorPagination): Promise<FilesPage>;
|
|
274
|
-
/**
|
|
275
|
-
* Get file metadata by ID
|
|
276
|
-
* @param fileId - File ID
|
|
277
|
-
* @returns Promise that resolves with the file metadata
|
|
278
|
-
* @throws {ApiError} if the request fails
|
|
279
|
-
*/
|
|
280
|
-
getFile(fileId: string): Promise<File>;
|
|
281
|
-
/**
|
|
282
|
-
* Download a file by ID
|
|
283
|
-
* @param fileId - File ID
|
|
284
|
-
* @returns Promise that resolves with the file response
|
|
285
|
-
* @throws {ApiError} if the request fails
|
|
286
|
-
*/
|
|
287
|
-
downloadFile(fileId: string): Promise<Response>;
|
|
288
|
-
/**
|
|
289
|
-
* Update a file's metadata
|
|
290
|
-
* @param fileId - File ID
|
|
291
|
-
* @param updates - File update request
|
|
292
|
-
* @returns Promise that resolves with the updated file
|
|
293
|
-
* @throws {ApiError} if the request fails
|
|
294
|
-
*/
|
|
295
|
-
updateFile(fileId: string, updates: UpdateFile): Promise<File>;
|
|
296
|
-
/**
|
|
297
|
-
* Delete a file
|
|
298
|
-
* @param fileId - File ID
|
|
299
|
-
* @returns Promise that resolves when the file is deleted
|
|
300
|
-
* @throws {ApiError} if the request fails
|
|
301
|
-
*/
|
|
302
|
-
deleteFile(fileId: string): Promise<void>;
|
|
303
|
-
/**
|
|
304
|
-
* Download files as an archive
|
|
305
|
-
* @param workspaceId - Workspace ID
|
|
306
|
-
* @param request - Download request with format and optional file IDs
|
|
307
|
-
* @returns Promise that resolves with the archive response
|
|
308
|
-
* @throws {ApiError} if the request fails
|
|
309
|
-
*/
|
|
310
|
-
downloadFiles(workspaceId: string, request: DownloadFiles): Promise<Response>;
|
|
311
|
-
/**
|
|
312
|
-
* Delete multiple files
|
|
313
|
-
* @param workspaceId - Workspace ID
|
|
314
|
-
* @param request - Delete request with file IDs
|
|
315
|
-
* @returns Promise that resolves when the files are deleted
|
|
316
|
-
* @throws {ApiError} if the request fails
|
|
317
|
-
*/
|
|
318
|
-
deleteFiles(workspaceId: string, request: DeleteFiles): Promise<void>;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* Service for handling integration operations
|
|
323
|
-
*/
|
|
324
|
-
declare class Integrations {
|
|
325
|
-
#private;
|
|
326
|
-
constructor(api: ApiClient);
|
|
327
|
-
/**
|
|
328
|
-
* List integrations for a workspace
|
|
329
|
-
* @param workspaceId - Workspace ID
|
|
330
|
-
* @param query - Optional pagination parameters (limit, after)
|
|
331
|
-
* @returns Promise that resolves with a paginated list of integrations
|
|
332
|
-
* @throws {ApiError} if the request fails
|
|
333
|
-
*/
|
|
334
|
-
listIntegrations(workspaceId: string, query?: CursorPagination): Promise<IntegrationsPage>;
|
|
335
|
-
/**
|
|
336
|
-
* Get integration details by ID
|
|
337
|
-
* @param integrationId - Integration ID
|
|
338
|
-
* @returns Promise that resolves with the integration details
|
|
339
|
-
* @throws {ApiError} if the request fails
|
|
340
|
-
*/
|
|
341
|
-
getIntegration(integrationId: string): Promise<Integration>;
|
|
342
|
-
/**
|
|
343
|
-
* Create a new integration
|
|
344
|
-
* @param workspaceId - Workspace ID
|
|
345
|
-
* @param integration - Integration creation request
|
|
346
|
-
* @returns Promise that resolves with the created integration
|
|
347
|
-
* @throws {ApiError} if the request fails
|
|
348
|
-
*/
|
|
349
|
-
createIntegration(workspaceId: string, integration: CreateIntegration): Promise<Integration>;
|
|
350
|
-
/**
|
|
351
|
-
* Update an existing integration
|
|
352
|
-
* @param integrationId - Integration ID
|
|
353
|
-
* @param updates - Integration update request
|
|
354
|
-
* @returns Promise that resolves with the updated integration
|
|
355
|
-
* @throws {ApiError} if the request fails
|
|
356
|
-
*/
|
|
357
|
-
updateIntegration(integrationId: string, updates: UpdateIntegration): Promise<Integration>;
|
|
358
|
-
/**
|
|
359
|
-
* Update integration credentials
|
|
360
|
-
* @param integrationId - Integration ID
|
|
361
|
-
* @param credentials - New credentials
|
|
362
|
-
* @returns Promise that resolves with the updated integration
|
|
363
|
-
* @throws {ApiError} if the request fails
|
|
364
|
-
*/
|
|
365
|
-
updateIntegrationCredentials(integrationId: string, credentials: UpdateIntegrationCredentials): Promise<Integration>;
|
|
366
|
-
/**
|
|
367
|
-
* Delete an integration
|
|
368
|
-
* @param integrationId - Integration ID
|
|
369
|
-
* @returns Promise that resolves when the integration is deleted
|
|
370
|
-
* @throws {ApiError} if the request fails
|
|
371
|
-
*/
|
|
372
|
-
deleteIntegration(integrationId: string): Promise<void>;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Service for handling workspace invitation operations
|
|
377
|
-
*/
|
|
378
|
-
declare class Invites {
|
|
379
|
-
#private;
|
|
380
|
-
constructor(api: ApiClient);
|
|
381
|
-
/**
|
|
382
|
-
* List all invitations for a workspace
|
|
383
|
-
* @param workspaceId - Workspace ID
|
|
384
|
-
* @param query - Optional query parameters (role, sortBy, order, limit, after)
|
|
385
|
-
* @returns Promise that resolves with a paginated list of invitations
|
|
386
|
-
* @throws {ApiError} if the request fails
|
|
387
|
-
*/
|
|
388
|
-
listInvites(workspaceId: string, query?: ListInvites & CursorPagination): Promise<InvitesPage>;
|
|
389
|
-
/**
|
|
390
|
-
* Send an invitation to join a workspace
|
|
391
|
-
* @param workspaceId - Workspace ID
|
|
392
|
-
* @param invite - Invitation request
|
|
393
|
-
* @returns Promise that resolves with the created invitation
|
|
394
|
-
* @throws {ApiError} if the request fails
|
|
395
|
-
*/
|
|
396
|
-
sendInvite(workspaceId: string, invite: CreateInvite): Promise<Invite>;
|
|
397
|
-
/**
|
|
398
|
-
* Cancel a pending invitation
|
|
399
|
-
* @param inviteId - Invite ID
|
|
400
|
-
* @returns Promise that resolves when the invitation is canceled
|
|
401
|
-
* @throws {ApiError} if the request fails
|
|
402
|
-
*/
|
|
403
|
-
cancelInvite(inviteId: string): Promise<void>;
|
|
404
|
-
/**
|
|
405
|
-
* Reply to an invitation (accept or decline)
|
|
406
|
-
* @param inviteId - Invite ID
|
|
407
|
-
* @param reply - Reply request
|
|
408
|
-
* @returns Promise that resolves with the updated invitation
|
|
409
|
-
* @throws {ApiError} if the request fails
|
|
410
|
-
*/
|
|
411
|
-
replyToInvite(inviteId: string, reply: ReplyInvite): Promise<Invite>;
|
|
412
|
-
/**
|
|
413
|
-
* Generate a shareable invite code for a workspace
|
|
414
|
-
* @param workspaceId - Workspace ID
|
|
415
|
-
* @param options - Invite code generation options
|
|
416
|
-
* @returns Promise that resolves with the generated invite code
|
|
417
|
-
* @throws {ApiError} if the request fails
|
|
418
|
-
*/
|
|
419
|
-
generateInviteCode(workspaceId: string, options: GenerateInviteCode): Promise<InviteCode>;
|
|
420
|
-
/**
|
|
421
|
-
* Reply to an invite code (accept or decline)
|
|
422
|
-
* @param inviteCode - The invite code
|
|
423
|
-
* @param reply - Optional reply request (defaults to accept if not provided)
|
|
424
|
-
* @returns Promise that resolves with the member details if accepted, null if declined
|
|
425
|
-
* @throws {ApiError} if the request fails
|
|
426
|
-
*/
|
|
427
|
-
replyToInviteCode(inviteCode: string, reply?: ReplyInvite | null): Promise<Member | null>;
|
|
428
|
-
/**
|
|
429
|
-
* Preview an invite code without joining
|
|
430
|
-
* @param inviteCode - The invite code
|
|
431
|
-
* @returns Promise that resolves with the invite preview details
|
|
432
|
-
* @throws {ApiError} if the request fails
|
|
433
|
-
*/
|
|
434
|
-
previewInvite(inviteCode: string): Promise<InvitePreview>;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
* Service for handling member operations
|
|
439
|
-
*/
|
|
440
|
-
declare class Members {
|
|
441
|
-
#private;
|
|
442
|
-
constructor(api: ApiClient);
|
|
443
|
-
/**
|
|
444
|
-
* List members of a workspace
|
|
445
|
-
* @param workspaceId - Workspace ID
|
|
446
|
-
* @param query - Optional query parameters (role, has2fa, sortBy, order, limit, after)
|
|
447
|
-
* @returns Promise that resolves with a paginated list of members
|
|
448
|
-
* @throws {ApiError} if the request fails
|
|
449
|
-
*/
|
|
450
|
-
listMembers(workspaceId: string, query?: ListMembers & CursorPagination): Promise<MembersPage>;
|
|
451
|
-
/**
|
|
452
|
-
* Get member details by account ID
|
|
453
|
-
* @param workspaceId - Workspace ID
|
|
454
|
-
* @param accountId - Account ID
|
|
455
|
-
* @returns Promise that resolves with the member details
|
|
456
|
-
* @throws {ApiError} if the request fails
|
|
457
|
-
*/
|
|
458
|
-
getMember(workspaceId: string, accountId: string): Promise<Member>;
|
|
459
|
-
/**
|
|
460
|
-
* Update a member's role
|
|
461
|
-
* @param workspaceId - Workspace ID
|
|
462
|
-
* @param accountId - Account ID
|
|
463
|
-
* @param updates - New role for the member
|
|
464
|
-
* @returns Promise that resolves with the updated member
|
|
465
|
-
* @throws {ApiError} if the request fails
|
|
466
|
-
*/
|
|
467
|
-
updateMember(workspaceId: string, accountId: string, updates: UpdateMember): Promise<Member>;
|
|
468
|
-
/**
|
|
469
|
-
* Remove a member from a workspace
|
|
470
|
-
* @param workspaceId - Workspace ID
|
|
471
|
-
* @param accountId - Account ID
|
|
472
|
-
* @returns Promise that resolves when the member is removed
|
|
473
|
-
* @throws {ApiError} if the request fails
|
|
474
|
-
*/
|
|
475
|
-
removeMember(workspaceId: string, accountId: string): Promise<void>;
|
|
476
|
-
/**
|
|
477
|
-
* Leave a workspace
|
|
478
|
-
* @param workspaceId - Workspace ID
|
|
479
|
-
* @returns Promise that resolves when the member has left
|
|
480
|
-
* @throws {ApiError} if the request fails
|
|
481
|
-
*/
|
|
482
|
-
leaveWorkspace(workspaceId: string): Promise<void>;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* Service for handling account notification operations
|
|
487
|
-
*/
|
|
488
|
-
declare class Notifications {
|
|
489
|
-
#private;
|
|
490
|
-
constructor(api: ApiClient);
|
|
491
|
-
/**
|
|
492
|
-
* List notifications for the authenticated account
|
|
493
|
-
* @param query - Optional pagination parameters (limit, after)
|
|
494
|
-
* @returns Promise that resolves with a paginated list of notifications
|
|
495
|
-
* @throws {ApiError} if the request fails
|
|
496
|
-
*/
|
|
497
|
-
listNotifications(query?: CursorPagination): Promise<NotificationsPage>;
|
|
498
|
-
/**
|
|
499
|
-
* Get the unread notifications count for the authenticated account
|
|
500
|
-
* @returns Promise that resolves with the unread status
|
|
501
|
-
* @throws {ApiError} if the request fails
|
|
502
|
-
*/
|
|
503
|
-
getUnreadNotificationsStatus(): Promise<UnreadStatus>;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* Service for handling integration run operations
|
|
508
|
-
*/
|
|
509
|
-
declare class Runs {
|
|
510
|
-
#private;
|
|
511
|
-
constructor(api: ApiClient);
|
|
512
|
-
/**
|
|
513
|
-
* List integration runs for a workspace
|
|
514
|
-
* @param workspaceId - Workspace ID
|
|
515
|
-
* @param query - Optional pagination parameters (limit, after)
|
|
516
|
-
* @returns Promise that resolves with a paginated list of integration runs
|
|
517
|
-
* @throws {ApiError} if the request fails
|
|
518
|
-
*/
|
|
519
|
-
listRuns(workspaceId: string, query?: CursorPagination): Promise<IntegrationRunsPage>;
|
|
520
|
-
/**
|
|
521
|
-
* Get integration run details by ID
|
|
522
|
-
* @param runId - Run ID
|
|
523
|
-
* @returns Promise that resolves with the integration run details
|
|
524
|
-
* @throws {ApiError} if the request fails
|
|
525
|
-
*/
|
|
526
|
-
getRun(runId: string): Promise<IntegrationRun>;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
/**
|
|
530
|
-
* Service for handling status and health check operations
|
|
531
|
-
*/
|
|
532
|
-
declare class Status {
|
|
533
|
-
#private;
|
|
534
|
-
constructor(api: ApiClient);
|
|
535
|
-
/**
|
|
536
|
-
* Check the health status of the API
|
|
537
|
-
* @param options - Health check options
|
|
538
|
-
* @returns Promise that resolves with the API health status
|
|
539
|
-
*/
|
|
540
|
-
checkHealth(options?: CheckHealth): Promise<MonitorStatus>;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* Service for handling webhook operations
|
|
545
|
-
*/
|
|
546
|
-
declare class Webhooks {
|
|
547
|
-
#private;
|
|
548
|
-
constructor(api: ApiClient);
|
|
549
|
-
/**
|
|
550
|
-
* List all webhooks in a workspace
|
|
551
|
-
* @param workspaceId - Workspace ID
|
|
552
|
-
* @param query - Optional pagination parameters (limit, after)
|
|
553
|
-
* @returns Promise that resolves with a paginated list of webhooks
|
|
554
|
-
* @throws {ApiError} if the request fails
|
|
555
|
-
*/
|
|
556
|
-
listWebhooks(workspaceId: string, query?: CursorPagination): Promise<WebhooksPage>;
|
|
557
|
-
/**
|
|
558
|
-
* Get a specific webhook by ID
|
|
559
|
-
* @param webhookId - Webhook ID
|
|
560
|
-
* @returns Promise that resolves with the webhook details
|
|
561
|
-
* @throws {ApiError} if the request fails
|
|
562
|
-
*/
|
|
563
|
-
getWebhook(webhookId: string): Promise<Webhook>;
|
|
564
|
-
/**
|
|
565
|
-
* Create a new webhook
|
|
566
|
-
* @param workspaceId - Workspace ID
|
|
567
|
-
* @param webhook - Webhook creation request
|
|
568
|
-
* @returns Promise that resolves with the created webhook
|
|
569
|
-
* @throws {ApiError} if the request fails
|
|
570
|
-
*/
|
|
571
|
-
createWebhook(workspaceId: string, webhook: CreateWebhook): Promise<Webhook>;
|
|
572
|
-
/**
|
|
573
|
-
* Update an existing webhook
|
|
574
|
-
* @param webhookId - Webhook ID
|
|
575
|
-
* @param updates - Webhook update request
|
|
576
|
-
* @returns Promise that resolves with the updated webhook
|
|
577
|
-
* @throws {ApiError} if the request fails
|
|
578
|
-
*/
|
|
579
|
-
updateWebhook(webhookId: string, updates: UpdateWebhook): Promise<Webhook>;
|
|
580
|
-
/**
|
|
581
|
-
* Delete a webhook
|
|
582
|
-
* @param webhookId - Webhook ID
|
|
583
|
-
* @returns Promise that resolves when the webhook is deleted
|
|
584
|
-
* @throws {ApiError} if the request fails
|
|
585
|
-
*/
|
|
586
|
-
deleteWebhook(webhookId: string): Promise<void>;
|
|
587
|
-
/**
|
|
588
|
-
* Test a webhook by sending a test payload
|
|
589
|
-
* @param webhookId - Webhook ID
|
|
590
|
-
* @param options - Test webhook options
|
|
591
|
-
* @returns Promise that resolves with the test result
|
|
592
|
-
* @throws {ApiError} if the request fails
|
|
593
|
-
*/
|
|
594
|
-
testWebhook(webhookId: string, options?: TestWebhook): Promise<WebhookResult>;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* Service for handling workspace operations
|
|
599
|
-
*/
|
|
600
|
-
declare class Workspaces {
|
|
601
|
-
#private;
|
|
602
|
-
constructor(api: ApiClient);
|
|
603
|
-
/**
|
|
604
|
-
* List all workspaces
|
|
605
|
-
* @param query - Optional pagination parameters (limit, after)
|
|
606
|
-
* @returns Promise that resolves with a paginated list of workspaces
|
|
607
|
-
* @throws {ApiError} if the request fails
|
|
608
|
-
*/
|
|
609
|
-
listWorkspaces(query?: CursorPagination): Promise<WorkspacesPage>;
|
|
610
|
-
/**
|
|
611
|
-
* Get workspace details by ID
|
|
612
|
-
* @param workspaceId - Workspace ID
|
|
613
|
-
* @returns Promise that resolves with the workspace details
|
|
614
|
-
* @throws {ApiError} if the request fails
|
|
615
|
-
*/
|
|
616
|
-
getWorkspace(workspaceId: string): Promise<Workspace>;
|
|
617
|
-
/**
|
|
618
|
-
* Create a new workspace
|
|
619
|
-
* @param workspace - Workspace creation request
|
|
620
|
-
* @returns Promise that resolves with the created workspace
|
|
621
|
-
* @throws {ApiError} if the request fails
|
|
622
|
-
*/
|
|
623
|
-
createWorkspace(workspace: CreateWorkspace): Promise<Workspace>;
|
|
624
|
-
/**
|
|
625
|
-
* Update an existing workspace
|
|
626
|
-
* @param workspaceId - Workspace ID
|
|
627
|
-
* @param updates - Workspace update request
|
|
628
|
-
* @returns Promise that resolves with the updated workspace
|
|
629
|
-
* @throws {ApiError} if the request fails
|
|
630
|
-
*/
|
|
631
|
-
updateWorkspace(workspaceId: string, updates: UpdateWorkspace): Promise<Workspace>;
|
|
632
|
-
/**
|
|
633
|
-
* Delete a workspace
|
|
634
|
-
* @param workspaceId - Workspace ID
|
|
635
|
-
* @returns Promise that resolves when the workspace is deleted
|
|
636
|
-
* @throws {ApiError} if the request fails
|
|
637
|
-
*/
|
|
638
|
-
deleteWorkspace(workspaceId: string): Promise<void>;
|
|
639
|
-
/**
|
|
640
|
-
* Get notification settings for the authenticated user in a workspace
|
|
641
|
-
* @param workspaceId - Workspace ID
|
|
642
|
-
* @returns Promise that resolves with the notification settings
|
|
643
|
-
* @throws {ApiError} if the request fails
|
|
644
|
-
*/
|
|
645
|
-
getNotificationSettings(workspaceId: string): Promise<NotificationSettings>;
|
|
646
|
-
/**
|
|
647
|
-
* Update notification settings for the authenticated user in a workspace
|
|
648
|
-
* @param workspaceId - Workspace ID
|
|
649
|
-
* @param settings - Notification settings update request
|
|
650
|
-
* @returns Promise that resolves with the updated notification settings
|
|
651
|
-
* @throws {ApiError} if the request fails
|
|
652
|
-
*/
|
|
653
|
-
updateNotificationSettings(workspaceId: string, settings: UpdateNotificationSettings): Promise<NotificationSettings>;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* @fileoverview Main client for the Nvisy SDK.
|
|
658
|
-
*
|
|
659
|
-
* This module exports the {@link Nvisy} class, which is the primary entry point
|
|
660
|
-
* for interacting with the Nvisy document processing API.
|
|
661
|
-
*
|
|
662
|
-
* @module client
|
|
663
|
-
*
|
|
664
|
-
* @example
|
|
665
|
-
* ```typescript
|
|
666
|
-
* const nvisy = new Nvisy({ apiToken: "your-api-token" });
|
|
667
|
-
* const account = await nvisy.account.getAccount();
|
|
668
|
-
* ```
|
|
669
|
-
*/
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* Typed openapi-fetch client for the Nvisy API.
|
|
673
|
-
*
|
|
674
|
-
* This type represents the low-level HTTP client configured with the Nvisy API schema.
|
|
675
|
-
* It's exposed via {@link Nvisy.api} for advanced use cases requiring direct API access.
|
|
676
|
-
*/
|
|
677
|
-
type ApiClient = Client<paths>;
|
|
678
|
-
/**
|
|
679
|
-
* Main client class for interacting with the Nvisy document processing API.
|
|
680
|
-
*
|
|
681
|
-
* @example
|
|
682
|
-
* ```typescript
|
|
683
|
-
* const nvisy = new Nvisy({ apiToken: "your-api-token" });
|
|
684
|
-
* const account = await nvisy.account.getAccount();
|
|
685
|
-
* const workspaces = await nvisy.workspaces.listWorkspaces();
|
|
686
|
-
* ```
|
|
687
|
-
*/
|
|
688
|
-
declare class Nvisy {
|
|
689
|
-
#private;
|
|
690
|
-
/**
|
|
691
|
-
* Creates a new Nvisy client instance.
|
|
692
|
-
*
|
|
693
|
-
* @param config - Configuration options with required `apiToken`
|
|
694
|
-
* @throws {NvisyError} If the API token is invalid
|
|
695
|
-
*
|
|
696
|
-
* @example
|
|
697
|
-
* ```typescript
|
|
698
|
-
* const nvisy = new Nvisy({
|
|
699
|
-
* apiToken: "your-api-token",
|
|
700
|
-
* baseUrl: "https://custom.api.nvisy.com",
|
|
701
|
-
* });
|
|
702
|
-
* const account = await nvisy.account.getAccount();
|
|
703
|
-
* ```
|
|
704
|
-
*/
|
|
705
|
-
constructor(config: ClientConfig);
|
|
706
|
-
/**
|
|
707
|
-
* Creates a new client with a different API token.
|
|
708
|
-
*
|
|
709
|
-
* Returns a new client instance with the new token. The original client
|
|
710
|
-
* remains unchanged. All other configuration (base URL, headers, etc.)
|
|
711
|
-
* is preserved in the new client.
|
|
712
|
-
*
|
|
713
|
-
* @param apiToken - The new API token
|
|
714
|
-
* @returns A new Nvisy instance with the new token
|
|
715
|
-
* @throws {NvisyError} If the API token is invalid
|
|
716
|
-
*
|
|
717
|
-
* @example
|
|
718
|
-
* ```typescript
|
|
719
|
-
* const nvisy = new Nvisy({ apiToken: "original-token" });
|
|
720
|
-
* const newNvisy = nvisy.withApiToken("new-token");
|
|
721
|
-
*
|
|
722
|
-
* // newNvisy uses the new token
|
|
723
|
-
* // nvisy still uses the original token
|
|
724
|
-
* ```
|
|
725
|
-
*/
|
|
726
|
-
withApiToken(apiToken: string): Nvisy;
|
|
727
|
-
/**
|
|
728
|
-
* The base URL used for API requests.
|
|
729
|
-
*
|
|
730
|
-
* @returns The configured base URL
|
|
731
|
-
*/
|
|
732
|
-
get baseUrl(): string;
|
|
733
|
-
/**
|
|
734
|
-
* The underlying openapi-fetch client for direct API access.
|
|
735
|
-
*
|
|
736
|
-
* Use this for advanced scenarios where you need direct access to the
|
|
737
|
-
* HTTP client, such as calling endpoints not covered by the service classes.
|
|
738
|
-
*
|
|
739
|
-
* @returns The configured ApiClient instance
|
|
740
|
-
*/
|
|
741
|
-
get api(): ApiClient;
|
|
742
|
-
/**
|
|
743
|
-
* Service for authentication operations (login, signup, logout).
|
|
744
|
-
*/
|
|
745
|
-
get auth(): Auth;
|
|
746
|
-
/**
|
|
747
|
-
* Service for API status and health checks.
|
|
748
|
-
*/
|
|
749
|
-
get status(): Status;
|
|
750
|
-
/**
|
|
751
|
-
* Service for managing the authenticated user's account.
|
|
752
|
-
*/
|
|
753
|
-
get account(): Account;
|
|
754
|
-
/**
|
|
755
|
-
* Service for viewing workspace activities.
|
|
756
|
-
*/
|
|
757
|
-
get activities(): Activities;
|
|
758
|
-
/**
|
|
759
|
-
* Service for managing file annotations.
|
|
760
|
-
*/
|
|
761
|
-
get annotations(): Annotations;
|
|
762
|
-
/**
|
|
763
|
-
* Service for managing API tokens.
|
|
764
|
-
*/
|
|
765
|
-
get apiTokens(): ApiTokens;
|
|
766
|
-
/**
|
|
767
|
-
* Service for managing file comments.
|
|
768
|
-
*/
|
|
769
|
-
get comments(): Comments;
|
|
770
|
-
/**
|
|
771
|
-
* Service for document operations.
|
|
772
|
-
*/
|
|
773
|
-
get documents(): Documents;
|
|
774
|
-
/**
|
|
775
|
-
* Service for file operations (upload, download, delete).
|
|
776
|
-
*/
|
|
777
|
-
get files(): Files;
|
|
778
|
-
/**
|
|
779
|
-
* Service for managing integrations.
|
|
780
|
-
*/
|
|
781
|
-
get integrations(): Integrations;
|
|
782
|
-
/**
|
|
783
|
-
* Service for managing workspace invitations.
|
|
784
|
-
*/
|
|
785
|
-
get invites(): Invites;
|
|
786
|
-
/**
|
|
787
|
-
* Service for managing workspace members.
|
|
788
|
-
*/
|
|
789
|
-
get members(): Members;
|
|
790
|
-
/**
|
|
791
|
-
* Service for managing notifications.
|
|
792
|
-
*/
|
|
793
|
-
get notifications(): Notifications;
|
|
794
|
-
/**
|
|
795
|
-
* Service for managing processing runs.
|
|
796
|
-
*/
|
|
797
|
-
get runs(): Runs;
|
|
798
|
-
/**
|
|
799
|
-
* Service for managing webhooks.
|
|
800
|
-
*/
|
|
801
|
-
get webhooks(): Webhooks;
|
|
802
|
-
/**
|
|
803
|
-
* Service for managing workspaces.
|
|
804
|
-
*/
|
|
805
|
-
get workspaces(): Workspaces;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
export { type ApiClient as A, Comments as C, Documents as D, Files as F, Integrations as I, Members as M, Nvisy as N, Runs as R, Status as S, Webhooks as W, Account as a, Activities as b, Annotations as c, ApiTokens as d, Auth as e, Invites as f, Notifications as g, Workspaces as h };
|