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