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