@nvisy/sdk 0.52.0 → 0.54.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 +56 -1
- package/dist/datatypes/index.d.ts +2 -2
- package/dist/{errors-CcTfWeEE.d.ts → errors-DShmkdjS.d.ts} +2 -2
- package/dist/{errors-CcTfWeEE.d.ts.map → errors-DShmkdjS.d.ts.map} +1 -1
- package/dist/guest/index.d.ts +38 -0
- package/dist/guest/index.d.ts.map +1 -0
- package/dist/guest/index.js +56 -0
- package/dist/guest/index.js.map +1 -0
- package/dist/http-BexRclA5.js +128 -0
- package/dist/http-BexRclA5.js.map +1 -0
- package/dist/{client-CSxuXX5e.d.ts → index-DFbHT_eq.d.ts} +443 -221
- package/dist/index-DFbHT_eq.d.ts.map +1 -0
- package/dist/{index-DmLbi0Gi.d.ts → index-DzEtj1r2.d.ts} +1837 -762
- package/dist/index-DzEtj1r2.d.ts.map +1 -0
- package/dist/index.d.ts +3 -4
- package/dist/index.js +28 -117
- package/dist/index.js.map +1 -1
- package/dist/services/index.d.ts +2 -2
- package/dist/services/index.js +2 -2
- package/dist/{services-Bt15MerP.js → services-BMmcawiT.js} +268 -73
- package/dist/services-BMmcawiT.js.map +1 -0
- package/dist/webhooks/index.d.ts +2 -2
- package/package.json +4 -4
- package/dist/client-CSxuXX5e.d.ts.map +0 -1
- package/dist/config-BdAgnJlh.d.ts +0 -103
- package/dist/config-BdAgnJlh.d.ts.map +0 -1
- package/dist/error-Bc6Sg_y-.js +0 -47
- package/dist/error-Bc6Sg_y-.js.map +0 -1
- package/dist/index-DmLbi0Gi.d.ts.map +0 -1
- package/dist/services-Bt15MerP.js.map +0 -1
- package/dist/standalone/index.d.ts +0 -117
- package/dist/standalone/index.d.ts.map +0 -1
- package/dist/standalone/index.js +0 -153
- package/dist/standalone/index.js.map +0 -1
|
@@ -1,6 +1,271 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { t as ClientConfig } from "./config-BdAgnJlh.js";
|
|
1
|
+
import { $ as WorkspaceProvider, $a as AccountApiTokenPage, $r as Signup, An as WorkspaceInviteCode, B as CreateWorkspaceReview, Bo as AccountIdentities, C as RenameWorkspaceThread, D as WorkspaceThread, Dn as ListWorkspaceInvites, E as WorkspaceComment, Er as StartFileServiceOAuth, Fo as WorkspaceActivityExportOptions, Fr as WorkspaceConnection, G as WorkspaceReviewPage, Go as OidcStartResponse, Gr as ConnectorCapabilities, H as WorkspaceReview, Hr as WorkspacePickerTokenRequest, Ht as CreateWorkspacePipeline, In as DateWindow, Io as WorkspaceActivityFilterQuery, Ir as WorkspaceConnectionPage, It as UpdateWorkspacePolicy, Jn as WorkspaceDocument, Jo as UpdateAccount, Jr as RecognizerCatalog, K as WorkspaceReviewsQuery, Kn as UpdateWorkspaceDocument, Ko as PublicAccount, Kt as UpdateWorkspacePipeline, Lo as WorkspaceActivityPage, Lr as WorkspaceConnectionSync, M as WorkspaceThreadsQuery, Mn as WorkspaceInviteSent, On as ReplyWorkspaceInvite, Pn as Health, Pr as UpdateWorkspaceConnection, Q as UpdateWorkspaceProvider, Qa as AccountApiToken, Qr as Login, Qt as AccountMarkedReadStatus, Rn as ExportQuery, Rr as WorkspaceConnectionSyncPage, Rt as WorkspacePoliciesQuery, S as OpenWorkspaceThread, Sn as GenerateWorkspaceInviteCode, Sr as OAuthStartResponse, T as UpdateWorkspaceComment, Ua as ArtifactSet, Vr as WorkspacePickerToken, Vt as WorkspacePolicySummaryPage, W as WorkspaceReviewEventPage, Wn as ListWorkspaceDocuments, Wo as IdentityProvider, Wr as AuthCapabilities, Wt as PipelineStatus, Xn as CreateAdhocWorkspaceDetection, Xr as AccountDesktopToken, Xt as WorkspacePipelineSummaryPage, Yn as WorkspaceDocumentPage, Yo as paths, Zn as CreateWorkspaceDetection, Zr as DesktopTokenRequest, Zt as CursorPagination, _ as WorkspaceWebhook, _n as UpdateWorkspaceMember, ar as WorkspaceDetectionPage, b as WorkspaceWebhookResult, bn as CreateWorkspaceInvite, br as ImportWorkspaceFiles, c as WorkspacePage, cr as WorkspaceRedactionResult, d as CreateWorkspaceWebhook, en as AccountNotificationPage, eo as AccountApiTokenWithJwt, et as WorkspaceProviderPage, f as TestWorkspaceWebhook, fn as UnreadCountEvent, gi as Audit, gr as ExportWorkspaceFiles, hn as ListWorkspaceMembers, hr as CreateWorkspaceConnection, io as UpdateAccountApiToken, ir as WorkspaceDetection, j as WorkspaceThreadPage, jn as WorkspaceInvitePage, jr as SyncStatus, k as WorkspaceThreadEntryPage, lr as WorkspaceRedactionResultPage, mn as WorkspaceNotificationSettings, mo as WorkspaceDetectionTimeSeries, no as CreateAccountApiToken, nr as RedactWorkspaceDetection, o as UpdateWorkspace, or as WorkspaceDetectionsQuery, ot as CreateWorkspacePolicy, p as UpdateWorkspaceWebhook, pn as UpdateWorkspaceNotificationSettings, q as CreateWorkspaceProvider, qn as WorkspaceDeletedDocuments, qo as SetPassword, qr as LabelCatalog, qt as WorkspacePipeline, s as Workspace, sr as WorkspacePipelineDetectionsQuery, t as CreateWorkspace, tn as AccountUnreadStatus, tr as DetectionStatusEvent, tt as WorkspaceProvidersQuery, uo as WorkspaceAnalytics, v as WorkspaceWebhookCreated, vn as WorkspaceMember, vr as FileServiceProvider, wn as InvitePreview, x as CreateWorkspaceComment, y as WorkspaceWebhookPage, yn as WorkspaceMemberPage, zo as Account$1, zr as WorkspaceConnectionVerification, zt as WorkspacePolicy } from "./index-DzEtj1r2.js";
|
|
3
2
|
import { Client } from "openapi-fetch";
|
|
3
|
+
//#region src/config.d.ts
|
|
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
|
+
* Injected from `package.json` at build time, so it always matches the
|
|
16
|
+
* published version. Used in the default user agent string.
|
|
17
|
+
*/
|
|
18
|
+
declare const VERSION: string;
|
|
19
|
+
/**
|
|
20
|
+
* Configuration for a Nvisy client. The authenticated {@link Nvisy} client
|
|
21
|
+
* requires `apiToken`; the pre-auth `NvisyGuest` client (`@nvisy/sdk/guest`)
|
|
22
|
+
* uses the same fields minus `apiToken`. All other fields are optional and use
|
|
23
|
+
* sensible defaults.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const nvisy = new Nvisy({ apiToken: "your-api-token" });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
interface ClientConfig {
|
|
31
|
+
/**
|
|
32
|
+
* API token for authentication, sent as `Authorization: Bearer <token>`.
|
|
33
|
+
*
|
|
34
|
+
* Tokens can be obtained from the Nvisy dashboard or the api-tokens endpoint.
|
|
35
|
+
* Required by the authenticated {@link Nvisy} client; omitted by the guest
|
|
36
|
+
* client (which authenticates with a cookie session, if any — see
|
|
37
|
+
* `credentials`).
|
|
38
|
+
*/
|
|
39
|
+
apiToken?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Credentials mode for every request, forwarded to `fetch`.
|
|
42
|
+
*
|
|
43
|
+
* Set to `"include"` to send the session cookies established by the guest
|
|
44
|
+
* client's `login` / `signup` (needed for cross-origin browser sessions).
|
|
45
|
+
* Defaults to the platform's `fetch` default when omitted.
|
|
46
|
+
*/
|
|
47
|
+
credentials?: RequestCredentials;
|
|
48
|
+
/**
|
|
49
|
+
* Base URL for the Nvisy API.
|
|
50
|
+
*
|
|
51
|
+
* @default "https://api.nvisy.com"
|
|
52
|
+
*/
|
|
53
|
+
baseUrl?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Custom headers to include with every request.
|
|
56
|
+
*
|
|
57
|
+
* These headers are merged with the default headers (Content-Type, User-Agent,
|
|
58
|
+
* and Authorization). Custom headers take precedence over defaults if there
|
|
59
|
+
* are conflicts.
|
|
60
|
+
*/
|
|
61
|
+
headers?: Record<string, string>;
|
|
62
|
+
/**
|
|
63
|
+
* Custom user agent string to identify your application.
|
|
64
|
+
*
|
|
65
|
+
* @default "@nvisy/sdk v.{version}"
|
|
66
|
+
*/
|
|
67
|
+
userAgent?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Enable logging for requests and responses.
|
|
70
|
+
*
|
|
71
|
+
* When enabled, logs request method, URL, status, and timing to console.
|
|
72
|
+
*
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
withLogging?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Custom fetch implementation used for every request. Must match the WHATWG
|
|
78
|
+
* `fetch` signature. Defaults to the global `fetch`.
|
|
79
|
+
*
|
|
80
|
+
* Lets a host swap in a non-browser transport — e.g. a desktop (Tauri) app
|
|
81
|
+
* passing `@tauri-apps/plugin-http`'s `fetch`, which performs the request in
|
|
82
|
+
* the native process and so is not subject to browser CORS.
|
|
83
|
+
*/
|
|
84
|
+
fetch?: typeof globalThis.fetch;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Configuration for the authenticated {@link Nvisy} client: {@link ClientConfig}
|
|
88
|
+
* with a required `apiToken`.
|
|
89
|
+
*/
|
|
90
|
+
type NvisyConfig = ClientConfig & {
|
|
91
|
+
apiToken: string;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Default configuration values used when options are not explicitly provided.
|
|
95
|
+
*/
|
|
96
|
+
declare const DEFAULTS: {
|
|
97
|
+
/**
|
|
98
|
+
* Default base URL for the Nvisy API.
|
|
99
|
+
*/
|
|
100
|
+
readonly BASE_URL: "https://api.nvisy.com";
|
|
101
|
+
/**
|
|
102
|
+
* Default user agent string.
|
|
103
|
+
*/
|
|
104
|
+
readonly USER_AGENT: `@nvisy/sdk v.${string}`;
|
|
105
|
+
};
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/http.d.ts
|
|
108
|
+
/** Typed openapi-fetch client for the Nvisy API. */
|
|
109
|
+
type ApiClient = Client<paths>;
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/client.d.ts
|
|
112
|
+
/**
|
|
113
|
+
* Main client class for interacting with the Nvisy document processing API.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```typescript
|
|
117
|
+
* const nvisy = new Nvisy({ apiToken: "your-api-token" });
|
|
118
|
+
* const account = await nvisy.account.getAccount();
|
|
119
|
+
* const workspaces = await nvisy.workspaces.listWorkspaces();
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
declare class Nvisy {
|
|
123
|
+
#private;
|
|
124
|
+
/**
|
|
125
|
+
* Creates a new authenticated Nvisy client.
|
|
126
|
+
*
|
|
127
|
+
* Requires an `apiToken` (sent as `Authorization: Bearer <token>`). For the
|
|
128
|
+
* pre-auth surface (login / signup / OIDC start, auth capabilities, health),
|
|
129
|
+
* use {@link NvisyGuest} from `@nvisy/sdk/guest`.
|
|
130
|
+
*
|
|
131
|
+
* @param config - Configuration options with a required `apiToken`
|
|
132
|
+
* @throws {NvisyError} If the API token is missing or invalid
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```typescript
|
|
136
|
+
* const nvisy = new Nvisy({ apiToken: "your-api-token" });
|
|
137
|
+
* const account = await nvisy.account.getAccount();
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
constructor(config: NvisyConfig);
|
|
141
|
+
/**
|
|
142
|
+
* Creates a new client with a different API token.
|
|
143
|
+
*
|
|
144
|
+
* Returns a new client instance with the new token. The original client
|
|
145
|
+
* remains unchanged. All other configuration (base URL, headers, etc.)
|
|
146
|
+
* is preserved in the new client.
|
|
147
|
+
*
|
|
148
|
+
* @param apiToken - The new API token
|
|
149
|
+
* @returns A new Nvisy instance with the new token
|
|
150
|
+
* @throws {NvisyError} If the API token is invalid
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```typescript
|
|
154
|
+
* const nvisy = new Nvisy({ apiToken: "original-token" });
|
|
155
|
+
* const newNvisy = nvisy.withApiToken("new-token");
|
|
156
|
+
*
|
|
157
|
+
* // newNvisy uses the new token
|
|
158
|
+
* // nvisy still uses the original token
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
withApiToken(apiToken: string): Nvisy;
|
|
162
|
+
/**
|
|
163
|
+
* The base URL used for API requests.
|
|
164
|
+
*
|
|
165
|
+
* @returns The configured base URL
|
|
166
|
+
*/
|
|
167
|
+
get baseUrl(): string;
|
|
168
|
+
/**
|
|
169
|
+
* The underlying openapi-fetch client for direct API access.
|
|
170
|
+
*
|
|
171
|
+
* Use this for advanced scenarios where you need direct access to the
|
|
172
|
+
* HTTP client, such as calling endpoints not covered by the service classes.
|
|
173
|
+
*
|
|
174
|
+
* @returns The configured ApiClient instance
|
|
175
|
+
*/
|
|
176
|
+
get api(): ApiClient;
|
|
177
|
+
/**
|
|
178
|
+
* Service for authenticated auth operations (logout, desktop token). Pre-auth
|
|
179
|
+
* sign-in lives on {@link NvisyGuest}.
|
|
180
|
+
*/
|
|
181
|
+
get auth(): Auth;
|
|
182
|
+
/**
|
|
183
|
+
* Service for API status and health checks.
|
|
184
|
+
*/
|
|
185
|
+
get status(): Status;
|
|
186
|
+
/**
|
|
187
|
+
* Service for managing the authenticated user's account.
|
|
188
|
+
*/
|
|
189
|
+
get account(): Account;
|
|
190
|
+
/**
|
|
191
|
+
* Service for viewing workspace activities.
|
|
192
|
+
*/
|
|
193
|
+
get activities(): Activities;
|
|
194
|
+
/**
|
|
195
|
+
* Service for workspace analytics.
|
|
196
|
+
*/
|
|
197
|
+
get analytics(): Analytics;
|
|
198
|
+
/**
|
|
199
|
+
* Service for managing API tokens.
|
|
200
|
+
*/
|
|
201
|
+
get apiTokens(): ApiTokens;
|
|
202
|
+
/**
|
|
203
|
+
* Service for managing connections.
|
|
204
|
+
*/
|
|
205
|
+
get connections(): Connections;
|
|
206
|
+
/**
|
|
207
|
+
* Service for document operations (upload, download, delete, review).
|
|
208
|
+
*/
|
|
209
|
+
get documents(): Documents;
|
|
210
|
+
/**
|
|
211
|
+
* Service for discussion threads and comments.
|
|
212
|
+
*/
|
|
213
|
+
get threads(): Threads;
|
|
214
|
+
/**
|
|
215
|
+
* Service for managing pipelines.
|
|
216
|
+
*/
|
|
217
|
+
get pipelines(): Pipelines;
|
|
218
|
+
/**
|
|
219
|
+
* Service for managing policies.
|
|
220
|
+
*/
|
|
221
|
+
get policies(): Policies;
|
|
222
|
+
/**
|
|
223
|
+
* Service for managing a workspace's inference providers.
|
|
224
|
+
*/
|
|
225
|
+
get providers(): Providers;
|
|
226
|
+
/**
|
|
227
|
+
* Service for reading the deployment's capabilities (labels, recognizers,
|
|
228
|
+
* connectors, auth methods).
|
|
229
|
+
*/
|
|
230
|
+
get capabilities(): Capabilities;
|
|
231
|
+
/**
|
|
232
|
+
* Service for managing workspace invitations.
|
|
233
|
+
*/
|
|
234
|
+
get invites(): Invites;
|
|
235
|
+
/**
|
|
236
|
+
* Service for managing workspace members.
|
|
237
|
+
*/
|
|
238
|
+
get members(): Members;
|
|
239
|
+
/**
|
|
240
|
+
* Service for managing notifications.
|
|
241
|
+
*/
|
|
242
|
+
get notifications(): Notifications;
|
|
243
|
+
/**
|
|
244
|
+
* Service for pipeline detections and their redactions.
|
|
245
|
+
*/
|
|
246
|
+
get detections(): Detections;
|
|
247
|
+
/**
|
|
248
|
+
* Service for workspace redactions.
|
|
249
|
+
*/
|
|
250
|
+
get redactions(): Redactions;
|
|
251
|
+
/**
|
|
252
|
+
* Service for document reviews (assigning documents to reviewers).
|
|
253
|
+
*/
|
|
254
|
+
get reviews(): Reviews;
|
|
255
|
+
/**
|
|
256
|
+
* Service for managing connection syncs.
|
|
257
|
+
*/
|
|
258
|
+
get syncs(): Syncs;
|
|
259
|
+
/**
|
|
260
|
+
* Service for managing webhooks.
|
|
261
|
+
*/
|
|
262
|
+
get webhooks(): Webhooks;
|
|
263
|
+
/**
|
|
264
|
+
* Service for managing workspaces.
|
|
265
|
+
*/
|
|
266
|
+
get workspaces(): Workspaces;
|
|
267
|
+
}
|
|
268
|
+
//#endregion
|
|
4
269
|
//#region src/services/account.d.ts
|
|
5
270
|
/**
|
|
6
271
|
* Service for handling account operations
|
|
@@ -217,56 +482,19 @@ declare class ApiTokens {
|
|
|
217
482
|
//#endregion
|
|
218
483
|
//#region src/services/auth.d.ts
|
|
219
484
|
/**
|
|
220
|
-
*
|
|
485
|
+
* Authenticated auth operations: ending the current session and minting a
|
|
486
|
+
* desktop token from it. Pre-auth sign-in (login / signup / OIDC start) lives on
|
|
487
|
+
* the guest client ({@link NvisyGuest}).
|
|
221
488
|
*/
|
|
222
489
|
declare class Auth {
|
|
223
490
|
#private;
|
|
224
491
|
constructor(api: ApiClient);
|
|
225
|
-
/**
|
|
226
|
-
* Login with email and password, starting a browser session.
|
|
227
|
-
*
|
|
228
|
-
* Sets HttpOnly session and CSRF cookies; returns no body. Programmatic
|
|
229
|
-
* clients should instead create an API token via {@link ApiTokens} and pass
|
|
230
|
-
* it as `apiToken` when constructing the client.
|
|
231
|
-
*
|
|
232
|
-
* @param credentials - Login credentials
|
|
233
|
-
* @returns Promise that resolves once the session is started
|
|
234
|
-
* @throws {ApiError} if the request fails
|
|
235
|
-
*/
|
|
236
|
-
loginAccount(credentials: Login): Promise<void>;
|
|
237
|
-
/**
|
|
238
|
-
* Sign up a new account, starting a browser session.
|
|
239
|
-
*
|
|
240
|
-
* Sets HttpOnly session and CSRF cookies; returns no body. Programmatic
|
|
241
|
-
* clients should instead create an API token via {@link ApiTokens} and pass
|
|
242
|
-
* it as `apiToken` when constructing the client.
|
|
243
|
-
*
|
|
244
|
-
* @param credentials - Signup details
|
|
245
|
-
* @returns Promise that resolves once the session is started
|
|
246
|
-
* @throws {ApiError} if the request fails
|
|
247
|
-
*/
|
|
248
|
-
signupAccount(credentials: Signup): Promise<void>;
|
|
249
492
|
/**
|
|
250
493
|
* Logout, invalidating the current session and clearing its cookies.
|
|
251
494
|
* @returns Promise that resolves when logout is complete
|
|
252
495
|
* @throws {ApiError} if the request fails
|
|
253
496
|
*/
|
|
254
497
|
logoutAccount(): Promise<void>;
|
|
255
|
-
/**
|
|
256
|
-
* Begin an OpenID Connect sign-in with a provider.
|
|
257
|
-
*
|
|
258
|
-
* Returns the provider authorize URL to redirect the user to; on consent the
|
|
259
|
-
* provider redirects to the callback, which signs the user in. Also available
|
|
260
|
-
* as the standalone `startOidcSignIn` for use without a client.
|
|
261
|
-
*
|
|
262
|
-
* @param provider - The identity provider to sign in with
|
|
263
|
-
* @param query - Optional frontend URL to return to once done
|
|
264
|
-
* @returns Promise that resolves with the provider authorize URL
|
|
265
|
-
* @throws {ApiError} if the request fails
|
|
266
|
-
*/
|
|
267
|
-
startOidcSignIn(provider: IdentityProvider, query?: {
|
|
268
|
-
redirectUri?: string;
|
|
269
|
-
}): Promise<OidcStartResponse>;
|
|
270
498
|
/**
|
|
271
499
|
* Mint a long-lived native-app token for a desktop app.
|
|
272
500
|
*
|
|
@@ -572,7 +800,7 @@ declare class Detections {
|
|
|
572
800
|
//#endregion
|
|
573
801
|
//#region src/services/documents.d.ts
|
|
574
802
|
/**
|
|
575
|
-
* Service for handling document operations
|
|
803
|
+
* Service for handling document operations.
|
|
576
804
|
*/
|
|
577
805
|
declare class Documents {
|
|
578
806
|
#private;
|
|
@@ -640,23 +868,77 @@ declare class Documents {
|
|
|
640
868
|
* @throws {ApiError} if the request fails
|
|
641
869
|
*/
|
|
642
870
|
deleteDocuments(workspaceId: string, documentIds: string[]): Promise<WorkspaceDeletedDocuments>;
|
|
871
|
+
}
|
|
872
|
+
//#endregion
|
|
873
|
+
//#region src/services/guest-auth.d.ts
|
|
874
|
+
/**
|
|
875
|
+
* Pre-auth authentication operations, reachable without an API token: starting
|
|
876
|
+
* a browser session (login / signup) and beginning an OIDC sign-in. Exposed on
|
|
877
|
+
* the guest client ({@link NvisyGuest}).
|
|
878
|
+
*/
|
|
879
|
+
declare class GuestAuth {
|
|
880
|
+
#private;
|
|
881
|
+
constructor(api: ApiClient);
|
|
643
882
|
/**
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
*
|
|
883
|
+
* Login with email and password, starting a browser session.
|
|
884
|
+
*
|
|
885
|
+
* Sets HttpOnly session and CSRF cookies; returns no body. For a programmatic
|
|
886
|
+
* client, create an API token instead and pass it as `apiToken` when
|
|
887
|
+
* constructing a {@link Nvisy} client.
|
|
888
|
+
*
|
|
889
|
+
* @param credentials - Login credentials
|
|
890
|
+
* @returns Promise that resolves once the session is started
|
|
891
|
+
* @throws {ApiError} if the request fails
|
|
892
|
+
*/
|
|
893
|
+
loginAccount(credentials: Login): Promise<void>;
|
|
894
|
+
/**
|
|
895
|
+
* Sign up a new account, starting a browser session.
|
|
896
|
+
*
|
|
897
|
+
* Sets HttpOnly session and CSRF cookies; returns no body. For a programmatic
|
|
898
|
+
* client, create an API token instead and pass it as `apiToken` when
|
|
899
|
+
* constructing a {@link Nvisy} client.
|
|
900
|
+
*
|
|
901
|
+
* @param credentials - Signup details
|
|
902
|
+
* @returns Promise that resolves once the session is started
|
|
649
903
|
* @throws {ApiError} if the request fails
|
|
650
904
|
*/
|
|
651
|
-
|
|
905
|
+
signupAccount(credentials: Signup): Promise<void>;
|
|
652
906
|
/**
|
|
653
|
-
*
|
|
654
|
-
*
|
|
655
|
-
*
|
|
656
|
-
*
|
|
907
|
+
* Begin an OpenID Connect sign-in with a provider.
|
|
908
|
+
*
|
|
909
|
+
* Returns the provider authorize URL to redirect the user to; on consent the
|
|
910
|
+
* provider redirects to the callback, which signs the user in.
|
|
911
|
+
*
|
|
912
|
+
* @param provider - The identity provider to sign in with
|
|
913
|
+
* @param query - Optional frontend URL to return to once done
|
|
914
|
+
* @returns Promise that resolves with the provider authorize URL
|
|
915
|
+
* @throws {ApiError} if the request fails
|
|
916
|
+
*/
|
|
917
|
+
startOidcSignIn(provider: IdentityProvider, query?: {
|
|
918
|
+
redirectUri?: string;
|
|
919
|
+
}): Promise<OidcStartResponse>;
|
|
920
|
+
}
|
|
921
|
+
//#endregion
|
|
922
|
+
//#region src/services/guest-capabilities.d.ts
|
|
923
|
+
/**
|
|
924
|
+
* The pre-auth subset of the deployment's capabilities: the sign-in methods it
|
|
925
|
+
* offers. The label / recognizer / connector capability reads require an
|
|
926
|
+
* authenticated client and live on {@link Capabilities}.
|
|
927
|
+
*/
|
|
928
|
+
declare class GuestCapabilities {
|
|
929
|
+
#private;
|
|
930
|
+
constructor(api: ApiClient);
|
|
931
|
+
/**
|
|
932
|
+
* Get the deployment's available sign-in methods.
|
|
933
|
+
*
|
|
934
|
+
* Public: reports whether password sign-in is enabled and which OIDC
|
|
935
|
+
* providers are configured, so a login screen can render the right buttons
|
|
936
|
+
* before anyone signs in.
|
|
937
|
+
*
|
|
938
|
+
* @returns Promise that resolves with the auth capabilities.
|
|
657
939
|
* @throws {ApiError} if the request fails
|
|
658
940
|
*/
|
|
659
|
-
|
|
941
|
+
getAuthCapabilities(): Promise<AuthCapabilities>;
|
|
660
942
|
}
|
|
661
943
|
//#endregion
|
|
662
944
|
//#region src/services/invites.d.ts
|
|
@@ -1012,6 +1294,111 @@ declare class Redactions {
|
|
|
1012
1294
|
getReview(workspaceId: string, redactionId: string): Promise<Audit>;
|
|
1013
1295
|
}
|
|
1014
1296
|
//#endregion
|
|
1297
|
+
//#region src/services/reviews.d.ts
|
|
1298
|
+
/**
|
|
1299
|
+
* Service for document reviews: assigning a document to a reviewer and tracking
|
|
1300
|
+
* the review through its lifecycle, with a timeline of events.
|
|
1301
|
+
*/
|
|
1302
|
+
declare class Reviews {
|
|
1303
|
+
#private;
|
|
1304
|
+
constructor(api: ApiClient);
|
|
1305
|
+
/**
|
|
1306
|
+
* List the reviews on a document, most recent first.
|
|
1307
|
+
* @param workspaceId - Workspace id
|
|
1308
|
+
* @param documentId - Document ID
|
|
1309
|
+
* @returns Promise that resolves with the document's reviews
|
|
1310
|
+
* @throws {ApiError} if the request fails
|
|
1311
|
+
*/
|
|
1312
|
+
listForDocument(workspaceId: string, documentId: string): Promise<WorkspaceReview[]>;
|
|
1313
|
+
/**
|
|
1314
|
+
* Open a review on a document.
|
|
1315
|
+
* @param workspaceId - Workspace id
|
|
1316
|
+
* @param documentId - Document ID
|
|
1317
|
+
* @param review - Review creation request
|
|
1318
|
+
* @returns Promise that resolves with the created review
|
|
1319
|
+
* @throws {ApiError} if the request fails
|
|
1320
|
+
*/
|
|
1321
|
+
createForDocument(workspaceId: string, documentId: string, review: CreateWorkspaceReview): Promise<WorkspaceReview>;
|
|
1322
|
+
/**
|
|
1323
|
+
* List a workspace's reviews.
|
|
1324
|
+
* @param workspaceId - Workspace id
|
|
1325
|
+
* @param query - Optional pagination and filters (assignee, documentId,
|
|
1326
|
+
* reviewStatus, limit, after)
|
|
1327
|
+
* @returns Promise that resolves with a paginated list of reviews
|
|
1328
|
+
* @throws {ApiError} if the request fails
|
|
1329
|
+
*/
|
|
1330
|
+
listReviews(workspaceId: string, query?: CursorPagination & WorkspaceReviewsQuery): Promise<WorkspaceReviewPage>;
|
|
1331
|
+
/**
|
|
1332
|
+
* Get review details by ID.
|
|
1333
|
+
* @param workspaceId - Workspace id
|
|
1334
|
+
* @param reviewId - Review ID
|
|
1335
|
+
* @returns Promise that resolves with the review details
|
|
1336
|
+
* @throws {ApiError} if the request fails
|
|
1337
|
+
*/
|
|
1338
|
+
getReview(workspaceId: string, reviewId: string): Promise<WorkspaceReview>;
|
|
1339
|
+
/**
|
|
1340
|
+
* Assign a reviewer to a review (idempotent).
|
|
1341
|
+
* @param workspaceId - Workspace id
|
|
1342
|
+
* @param reviewId - Review ID
|
|
1343
|
+
* @param accountId - Account id of the reviewer to assign
|
|
1344
|
+
* @returns Promise that resolves with the updated review
|
|
1345
|
+
* @throws {ApiError} if the request fails
|
|
1346
|
+
*/
|
|
1347
|
+
assignReviewer(workspaceId: string, reviewId: string, accountId: string): Promise<WorkspaceReview>;
|
|
1348
|
+
/**
|
|
1349
|
+
* Remove a reviewer from a review.
|
|
1350
|
+
* @param workspaceId - Workspace id
|
|
1351
|
+
* @param reviewId - Review ID
|
|
1352
|
+
* @param accountId - Account id of the reviewer to remove
|
|
1353
|
+
* @returns Promise that resolves with the updated review
|
|
1354
|
+
* @throws {ApiError} if the request fails
|
|
1355
|
+
*/
|
|
1356
|
+
unassignReviewer(workspaceId: string, reviewId: string, accountId: string): Promise<WorkspaceReview>;
|
|
1357
|
+
/**
|
|
1358
|
+
* Verify (resolve) a review.
|
|
1359
|
+
* @param workspaceId - Workspace id
|
|
1360
|
+
* @param reviewId - Review ID
|
|
1361
|
+
* @returns Promise that resolves with the updated review
|
|
1362
|
+
* @throws {ApiError} if the request fails
|
|
1363
|
+
*/
|
|
1364
|
+
verifyReview(workspaceId: string, reviewId: string): Promise<WorkspaceReview>;
|
|
1365
|
+
/**
|
|
1366
|
+
* Reopen a resolved review.
|
|
1367
|
+
* @param workspaceId - Workspace id
|
|
1368
|
+
* @param reviewId - Review ID
|
|
1369
|
+
* @returns Promise that resolves with the updated review
|
|
1370
|
+
* @throws {ApiError} if the request fails
|
|
1371
|
+
*/
|
|
1372
|
+
reopenReview(workspaceId: string, reviewId: string): Promise<WorkspaceReview>;
|
|
1373
|
+
/**
|
|
1374
|
+
* Get a review's timeline: the events in its life.
|
|
1375
|
+
* @param workspaceId - Workspace id
|
|
1376
|
+
* @param reviewId - Review ID
|
|
1377
|
+
* @param query - Optional pagination (limit, after)
|
|
1378
|
+
* @returns Promise that resolves with a paginated list of review events
|
|
1379
|
+
* @throws {ApiError} if the request fails
|
|
1380
|
+
*/
|
|
1381
|
+
getTimeline(workspaceId: string, reviewId: string, query?: CursorPagination): Promise<WorkspaceReviewEventPage>;
|
|
1382
|
+
/**
|
|
1383
|
+
* Link a detection to a review (idempotent).
|
|
1384
|
+
* @param workspaceId - Workspace id
|
|
1385
|
+
* @param reviewId - Review ID
|
|
1386
|
+
* @param detectionId - Detection ID
|
|
1387
|
+
* @returns Promise that resolves with the updated review
|
|
1388
|
+
* @throws {ApiError} if the request fails
|
|
1389
|
+
*/
|
|
1390
|
+
linkDetection(workspaceId: string, reviewId: string, detectionId: string): Promise<WorkspaceReview>;
|
|
1391
|
+
/**
|
|
1392
|
+
* Link a redaction to a review (idempotent).
|
|
1393
|
+
* @param workspaceId - Workspace id
|
|
1394
|
+
* @param reviewId - Review ID
|
|
1395
|
+
* @param redactionId - Redaction ID
|
|
1396
|
+
* @returns Promise that resolves with the updated review
|
|
1397
|
+
* @throws {ApiError} if the request fails
|
|
1398
|
+
*/
|
|
1399
|
+
linkRedaction(workspaceId: string, reviewId: string, redactionId: string): Promise<WorkspaceReview>;
|
|
1400
|
+
}
|
|
1401
|
+
//#endregion
|
|
1015
1402
|
//#region src/services/status.d.ts
|
|
1016
1403
|
/**
|
|
1017
1404
|
* Service for handling status and health check operations
|
|
@@ -1336,170 +1723,5 @@ declare class Workspaces {
|
|
|
1336
1723
|
deleteAvatar(workspaceId: string): Promise<void>;
|
|
1337
1724
|
}
|
|
1338
1725
|
//#endregion
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
* Typed openapi-fetch client for the Nvisy API.
|
|
1342
|
-
*
|
|
1343
|
-
* This type represents the low-level HTTP client configured with the Nvisy API schema.
|
|
1344
|
-
* It's exposed via {@link Nvisy.api} for advanced use cases requiring direct API access.
|
|
1345
|
-
*/
|
|
1346
|
-
type ApiClient = Client<paths>;
|
|
1347
|
-
/**
|
|
1348
|
-
* Main client class for interacting with the Nvisy document processing API.
|
|
1349
|
-
*
|
|
1350
|
-
* @example
|
|
1351
|
-
* ```typescript
|
|
1352
|
-
* const nvisy = new Nvisy({ apiToken: "your-api-token" });
|
|
1353
|
-
* const account = await nvisy.account.getAccount();
|
|
1354
|
-
* const workspaces = await nvisy.workspaces.listWorkspaces();
|
|
1355
|
-
* ```
|
|
1356
|
-
*/
|
|
1357
|
-
declare class Nvisy {
|
|
1358
|
-
#private;
|
|
1359
|
-
/**
|
|
1360
|
-
* Creates a new Nvisy client instance.
|
|
1361
|
-
*
|
|
1362
|
-
* Authenticate with an `apiToken` (bearer token) or, for a browser session
|
|
1363
|
-
* started by the standalone `login` / `signup`, with `credentials: "include"`
|
|
1364
|
-
* and no token.
|
|
1365
|
-
*
|
|
1366
|
-
* @param config - Configuration options; omit `apiToken` for a cookie session
|
|
1367
|
-
* @throws {NvisyError} If an `apiToken` is provided but invalid
|
|
1368
|
-
*
|
|
1369
|
-
* @example
|
|
1370
|
-
* ```typescript
|
|
1371
|
-
* // API token
|
|
1372
|
-
* const nvisy = new Nvisy({ apiToken: "your-api-token" });
|
|
1373
|
-
*
|
|
1374
|
-
* // Browser session
|
|
1375
|
-
* const nvisy = new Nvisy({ credentials: "include" });
|
|
1376
|
-
*
|
|
1377
|
-
* const account = await nvisy.account.getAccount();
|
|
1378
|
-
* ```
|
|
1379
|
-
*/
|
|
1380
|
-
constructor(config?: ClientConfig);
|
|
1381
|
-
/**
|
|
1382
|
-
* Creates a new client with a different API token.
|
|
1383
|
-
*
|
|
1384
|
-
* Returns a new client instance with the new token. The original client
|
|
1385
|
-
* remains unchanged. All other configuration (base URL, headers, etc.)
|
|
1386
|
-
* is preserved in the new client.
|
|
1387
|
-
*
|
|
1388
|
-
* @param apiToken - The new API token
|
|
1389
|
-
* @returns A new Nvisy instance with the new token
|
|
1390
|
-
* @throws {NvisyError} If the API token is invalid
|
|
1391
|
-
*
|
|
1392
|
-
* @example
|
|
1393
|
-
* ```typescript
|
|
1394
|
-
* const nvisy = new Nvisy({ apiToken: "original-token" });
|
|
1395
|
-
* const newNvisy = nvisy.withApiToken("new-token");
|
|
1396
|
-
*
|
|
1397
|
-
* // newNvisy uses the new token
|
|
1398
|
-
* // nvisy still uses the original token
|
|
1399
|
-
* ```
|
|
1400
|
-
*/
|
|
1401
|
-
withApiToken(apiToken: string): Nvisy;
|
|
1402
|
-
/**
|
|
1403
|
-
* The base URL used for API requests.
|
|
1404
|
-
*
|
|
1405
|
-
* @returns The configured base URL
|
|
1406
|
-
*/
|
|
1407
|
-
get baseUrl(): string;
|
|
1408
|
-
/**
|
|
1409
|
-
* The underlying openapi-fetch client for direct API access.
|
|
1410
|
-
*
|
|
1411
|
-
* Use this for advanced scenarios where you need direct access to the
|
|
1412
|
-
* HTTP client, such as calling endpoints not covered by the service classes.
|
|
1413
|
-
*
|
|
1414
|
-
* @returns The configured ApiClient instance
|
|
1415
|
-
*/
|
|
1416
|
-
get api(): ApiClient;
|
|
1417
|
-
/**
|
|
1418
|
-
* Service for authentication operations (login, signup, logout).
|
|
1419
|
-
*/
|
|
1420
|
-
get auth(): Auth;
|
|
1421
|
-
/**
|
|
1422
|
-
* Service for API status and health checks.
|
|
1423
|
-
*/
|
|
1424
|
-
get status(): Status;
|
|
1425
|
-
/**
|
|
1426
|
-
* Service for managing the authenticated user's account.
|
|
1427
|
-
*/
|
|
1428
|
-
get account(): Account;
|
|
1429
|
-
/**
|
|
1430
|
-
* Service for viewing workspace activities.
|
|
1431
|
-
*/
|
|
1432
|
-
get activities(): Activities;
|
|
1433
|
-
/**
|
|
1434
|
-
* Service for workspace analytics.
|
|
1435
|
-
*/
|
|
1436
|
-
get analytics(): Analytics;
|
|
1437
|
-
/**
|
|
1438
|
-
* Service for managing API tokens.
|
|
1439
|
-
*/
|
|
1440
|
-
get apiTokens(): ApiTokens;
|
|
1441
|
-
/**
|
|
1442
|
-
* Service for managing connections.
|
|
1443
|
-
*/
|
|
1444
|
-
get connections(): Connections;
|
|
1445
|
-
/**
|
|
1446
|
-
* Service for document operations (upload, download, delete, review).
|
|
1447
|
-
*/
|
|
1448
|
-
get documents(): Documents;
|
|
1449
|
-
/**
|
|
1450
|
-
* Service for discussion threads and comments.
|
|
1451
|
-
*/
|
|
1452
|
-
get threads(): Threads;
|
|
1453
|
-
/**
|
|
1454
|
-
* Service for managing pipelines.
|
|
1455
|
-
*/
|
|
1456
|
-
get pipelines(): Pipelines;
|
|
1457
|
-
/**
|
|
1458
|
-
* Service for managing policies.
|
|
1459
|
-
*/
|
|
1460
|
-
get policies(): Policies;
|
|
1461
|
-
/**
|
|
1462
|
-
* Service for managing a workspace's inference providers.
|
|
1463
|
-
*/
|
|
1464
|
-
get providers(): Providers;
|
|
1465
|
-
/**
|
|
1466
|
-
* Service for reading the deployment's capabilities (labels, recognizers,
|
|
1467
|
-
* connectors, auth methods).
|
|
1468
|
-
*/
|
|
1469
|
-
get capabilities(): Capabilities;
|
|
1470
|
-
/**
|
|
1471
|
-
* Service for managing workspace invitations.
|
|
1472
|
-
*/
|
|
1473
|
-
get invites(): Invites;
|
|
1474
|
-
/**
|
|
1475
|
-
* Service for managing workspace members.
|
|
1476
|
-
*/
|
|
1477
|
-
get members(): Members;
|
|
1478
|
-
/**
|
|
1479
|
-
* Service for managing notifications.
|
|
1480
|
-
*/
|
|
1481
|
-
get notifications(): Notifications;
|
|
1482
|
-
/**
|
|
1483
|
-
* Service for pipeline detections and their redactions.
|
|
1484
|
-
*/
|
|
1485
|
-
get detections(): Detections;
|
|
1486
|
-
/**
|
|
1487
|
-
* Service for workspace redactions.
|
|
1488
|
-
*/
|
|
1489
|
-
get redactions(): Redactions;
|
|
1490
|
-
/**
|
|
1491
|
-
* Service for managing connection syncs.
|
|
1492
|
-
*/
|
|
1493
|
-
get syncs(): Syncs;
|
|
1494
|
-
/**
|
|
1495
|
-
* Service for managing webhooks.
|
|
1496
|
-
*/
|
|
1497
|
-
get webhooks(): Webhooks;
|
|
1498
|
-
/**
|
|
1499
|
-
* Service for managing workspaces.
|
|
1500
|
-
*/
|
|
1501
|
-
get workspaces(): Workspaces;
|
|
1502
|
-
}
|
|
1503
|
-
//#endregion
|
|
1504
|
-
export { Account as C, Activities as S, Connections as _, Threads as a, ApiTokens as b, Redactions as c, Pipelines as d, Notifications as f, Detections as g, Documents as h, Webhooks as i, Providers as l, Invites as m, Nvisy as n, Syncs as o, Members as p, Workspaces as r, Status as s, ApiClient as t, Policies as u, Capabilities as v, Analytics as x, Auth as y };
|
|
1505
|
-
//# sourceMappingURL=client-CSxuXX5e.d.ts.map
|
|
1726
|
+
export { Activities as C, ClientConfig as D, ApiClient as E, DEFAULTS as O, Analytics as S, Nvisy as T, Detections as _, Status as a, Auth as b, Providers as c, Notifications as d, Members as f, Documents as g, GuestAuth as h, Syncs as i, VERSION as k, Policies as l, GuestCapabilities as m, Webhooks as n, Reviews as o, Invites as p, Threads as r, Redactions as s, Workspaces as t, Pipelines as u, Connections as v, Account as w, ApiTokens as x, Capabilities as y };
|
|
1727
|
+
//# sourceMappingURL=index-DFbHT_eq.d.ts.map
|