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