@nvisy/sdk 0.46.0 → 0.47.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 +24 -0
- package/dist/{client-0oq7sASN.d.ts → client-pc1XUsBx.d.ts} +33 -17
- package/dist/client-pc1XUsBx.d.ts.map +1 -0
- package/dist/{config-BhUEqFOg.d.ts → config-BdAgnJlh.d.ts} +22 -12
- package/dist/config-BdAgnJlh.d.ts.map +1 -0
- package/dist/datatypes/index.d.ts +2 -2
- package/dist/{error-BeVSNpDg.js → error-CPo0Jl05.js} +2 -2
- package/dist/error-CPo0Jl05.js.map +1 -0
- package/dist/{errors-BLX8SuEm.d.ts → errors-Cht3LbX5.d.ts} +2 -2
- package/dist/{errors-BLX8SuEm.d.ts.map → errors-Cht3LbX5.d.ts.map} +1 -1
- package/dist/{index-uEHkixjD.d.ts → index-B-oR9rqQ.d.ts} +11 -33
- package/dist/{index-uEHkixjD.d.ts.map → index-B-oR9rqQ.d.ts.map} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +32 -13
- package/dist/index.js.map +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.js +1 -1
- package/dist/{services-BZFiiCXu.js → services-FV0hA89s.js} +18 -10
- package/dist/services-FV0hA89s.js.map +1 -0
- package/dist/standalone/index.d.ts +32 -31
- package/dist/standalone/index.d.ts.map +1 -1
- package/dist/standalone/index.js +33 -33
- package/dist/standalone/index.js.map +1 -1
- package/dist/webhooks/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/client-0oq7sASN.d.ts.map +0 -1
- package/dist/config-BhUEqFOg.d.ts.map +0 -1
- package/dist/error-BeVSNpDg.js.map +0 -1
- package/dist/services-BZFiiCXu.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,29 @@ and this project adheres to
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.47.0] - 2026-09-08
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- The `Nvisy` client supports cookie-based browser sessions: `apiToken` is now
|
|
16
|
+
optional, and a new `credentials` option (e.g. `"include"`) is forwarded to
|
|
17
|
+
`fetch` so the session cookies set by `login` / `signup` are sent. With no
|
|
18
|
+
`apiToken`, no `Authorization` header is sent
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Regenerated the API schema against the updated platform handlers
|
|
23
|
+
- **Breaking:** `auth.loginAccount()` / `auth.signupAccount()` and the standalone
|
|
24
|
+
`login` / `signup` now return `void`. Login and signup start a browser session
|
|
25
|
+
(they set HttpOnly session and CSRF cookies) instead of returning a token.
|
|
26
|
+
Programmatic clients should create an API token (via the api-tokens endpoint)
|
|
27
|
+
and pass it as `apiToken`
|
|
28
|
+
|
|
29
|
+
### Removed
|
|
30
|
+
|
|
31
|
+
- **Breaking:** the `AuthToken` datatype — login and signup no longer return a
|
|
32
|
+
token body
|
|
33
|
+
|
|
11
34
|
## [0.46.0] - 2026-09-08
|
|
12
35
|
|
|
13
36
|
### Added
|
|
@@ -964,6 +987,7 @@ redaction an independent resource. This release renames the SDK to match.
|
|
|
964
987
|
- Configuration validation with detailed error messages
|
|
965
988
|
|
|
966
989
|
[Unreleased]: https://github.com/nvisycom/sdk-ts/compare/v0.42.0...HEAD
|
|
990
|
+
[0.47.0]: https://github.com/nvisycom/sdk-ts/compare/v0.46.0...v0.47.0
|
|
967
991
|
[0.46.0]: https://github.com/nvisycom/sdk-ts/compare/v0.45.0...v0.46.0
|
|
968
992
|
[0.45.0]: https://github.com/nvisycom/sdk-ts/compare/v0.44.0...v0.45.0
|
|
969
993
|
[0.44.0]: https://github.com/nvisycom/sdk-ts/compare/v0.43.0...v0.44.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $n as Provider, $t as ListInvites, An as RedactionResult, Bn as ConnectionSyncPage, Bt as MemberPage, Cr as
|
|
2
|
-
import { t as ClientConfig } from "./config-
|
|
1
|
+
import { $n as Provider, $t as ListInvites, An as RedactionResult, Ba as ActivityExportOptions, Bn as ConnectionSyncPage, Br as Audit, Bt as MemberPage, Ca as UpdateApiToken, Cr as Login, Da as DetectionTimeSeries, Dn as PipelineDetectionsQuery, En as DetectionStatusEvent, Et as MarkedReadStatus, Fn as Connection, Ft as UnreadCountEvent, Ha as ActivityPage, Ht as UpdateMember, It as UnreadStatus, Jt as InvitePage, Kt as InviteCode, Lt as UpdateNotificationSettings, M as CreatePolicy, Mn as WorkspaceDetectionsQuery, Nt as NotificationSettings, On as RedactDetection, Qn as PickerToken, Ra as WorkspaceAnalytics, Rn as ConnectionPage, Rt as ListMembers, Un as CreateConnection, Ut as CreateInvite, Va as ActivityFilterQuery, Vn as ConnectionVerification, Wn as ExportFiles, Wt as GenerateInviteCode, Xt as InviteSent, Yn as OAuthStartResponse, Yt as InvitePreview, Z as Policy, _a as ApiToken, _n as ExportQuery, _r as SendChatMessage, ba as ApiTokenWithJWT, bn as CreateDetection, br as LabelCatalog, bt as UpdatePipeline, c as WorkspacePage, ca as ArtifactSet, co as PublicAccount, d as CreateWebhook, do as paths, dr as ChatMessage, en as ReplyInvite, f as TestWebhook, fn as ListFiles, ft as CreatePipeline, gr as CreateChatSession, gt as PipelineStatus, h as WebhookCreated, hn as DateWindow, hr as ChatToken, jn as RedactionResultPage, jt as NotificationPage, lo as SetPassword, m as Webhook, mn as UpdateFile, mr as ChatSessionPage, no as AccountIdentities, nt as PolicySummaryPage, o as UpdateWorkspace, on as DeletedFiles, oo as IdentityProvider, p as UpdateWebhook, pr as ChatSession, pt as Pipeline, qn as ImportFiles, rn as Health, s as Workspace, sn as File, so as OidcStartResponse, sr as SyncStatus, t as CreateWorkspace, to as Account$1, tr as StartFileServiceOAuth, un as FilePage, uo as UpdateAccount, ur as UpdateConnection, ut as UpdatePolicy, v as WebhookPage, va as ApiTokenPage, vr as ConnectorCatalog, vt as PipelineSummaryPage, wn as DetectionPage, wr as Signup, xa as CreateApiToken, xn as Detection, xr as RecognizerCatalog, xt as CursorPagination, y as WebhookResult, zn as ConnectionSync, zt as Member } from "./index-B-oR9rqQ.js";
|
|
2
|
+
import { t as ClientConfig } from "./config-BdAgnJlh.js";
|
|
3
3
|
import { Client } from "openapi-fetch";
|
|
4
4
|
//#region src/services/account.d.ts
|
|
5
5
|
/**
|
|
@@ -223,21 +223,31 @@ declare class Auth {
|
|
|
223
223
|
#private;
|
|
224
224
|
constructor(api: ApiClient);
|
|
225
225
|
/**
|
|
226
|
-
* Login with email and password
|
|
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
|
+
*
|
|
227
232
|
* @param credentials - Login credentials
|
|
228
|
-
* @returns Promise that resolves
|
|
233
|
+
* @returns Promise that resolves once the session is started
|
|
229
234
|
* @throws {ApiError} if the request fails
|
|
230
235
|
*/
|
|
231
|
-
loginAccount(credentials: Login): Promise<
|
|
236
|
+
loginAccount(credentials: Login): Promise<void>;
|
|
232
237
|
/**
|
|
233
|
-
* Sign up a new account
|
|
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
|
+
*
|
|
234
244
|
* @param credentials - Signup details
|
|
235
|
-
* @returns Promise that resolves
|
|
245
|
+
* @returns Promise that resolves once the session is started
|
|
236
246
|
* @throws {ApiError} if the request fails
|
|
237
247
|
*/
|
|
238
|
-
signupAccount(credentials: Signup): Promise<
|
|
248
|
+
signupAccount(credentials: Signup): Promise<void>;
|
|
239
249
|
/**
|
|
240
|
-
* Logout
|
|
250
|
+
* Logout, invalidating the current session and clearing its cookies.
|
|
241
251
|
* @returns Promise that resolves when logout is complete
|
|
242
252
|
* @throws {ApiError} if the request fails
|
|
243
253
|
*/
|
|
@@ -1199,19 +1209,25 @@ declare class Nvisy {
|
|
|
1199
1209
|
/**
|
|
1200
1210
|
* Creates a new Nvisy client instance.
|
|
1201
1211
|
*
|
|
1202
|
-
*
|
|
1203
|
-
*
|
|
1212
|
+
* Authenticate with an `apiToken` (bearer token) or, for a browser session
|
|
1213
|
+
* started by the standalone `login` / `signup`, with `credentials: "include"`
|
|
1214
|
+
* and no token.
|
|
1215
|
+
*
|
|
1216
|
+
* @param config - Configuration options; omit `apiToken` for a cookie session
|
|
1217
|
+
* @throws {NvisyError} If an `apiToken` is provided but invalid
|
|
1204
1218
|
*
|
|
1205
1219
|
* @example
|
|
1206
1220
|
* ```typescript
|
|
1207
|
-
*
|
|
1208
|
-
*
|
|
1209
|
-
*
|
|
1210
|
-
*
|
|
1221
|
+
* // API token
|
|
1222
|
+
* const nvisy = new Nvisy({ apiToken: "your-api-token" });
|
|
1223
|
+
*
|
|
1224
|
+
* // Browser session
|
|
1225
|
+
* const nvisy = new Nvisy({ credentials: "include" });
|
|
1226
|
+
*
|
|
1211
1227
|
* const account = await nvisy.account.getAccount();
|
|
1212
1228
|
* ```
|
|
1213
1229
|
*/
|
|
1214
|
-
constructor(config
|
|
1230
|
+
constructor(config?: ClientConfig);
|
|
1215
1231
|
/**
|
|
1216
1232
|
* Creates a new client with a different API token.
|
|
1217
1233
|
*
|
|
@@ -1331,4 +1347,4 @@ declare class Nvisy {
|
|
|
1331
1347
|
}
|
|
1332
1348
|
//#endregion
|
|
1333
1349
|
export { Account as S, Catalog as _, Syncs as a, Analytics as b, Policies as c, Members as d, Invites as f, Chat as g, Connections as h, Webhooks as i, Pipelines as l, Detections as m, Nvisy as n, Status as o, Files as p, Workspaces as r, Redactions as s, ApiClient as t, Notifications as u, Auth as v, Activities as x, ApiTokens as y };
|
|
1334
|
-
//# sourceMappingURL=client-
|
|
1350
|
+
//# sourceMappingURL=client-pc1XUsBx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-pc1XUsBx.d.ts","names":[],"sources":["../src/services/account.ts","../src/services/activities.ts","../src/services/analytics.ts","../src/services/api-tokens.ts","../src/services/auth.ts","../src/services/catalog.ts","../src/services/chat.ts","../src/services/connections.ts","../src/services/detections.ts","../src/services/files.ts","../src/services/invites.ts","../src/services/members.ts","../src/services/notifications.ts","../src/services/pipelines.ts","../src/services/policies.ts","../src/services/redactions.ts","../src/services/status.ts","../src/services/syncs.ts","../src/services/webhooks.ts","../src/services/workspaces.ts","../src/client.ts"],"mappings":";;;;;;;cAca;;EAGA,YAAA,KAAK;;;;;;EASX,cAAc,QAAQ;;;;;;;EAWtB,cAAc,SAAS,gBAAgB,QAAQ;;;;;;EAY/C,iBAAiB;;;;;;;EAUjB,iBAAiB,mBAAmB,QAAQ;;;;;;;;EAc5C,aAAa,kBAAkB,QAAQ,OAAO,QAAQ;;;;;;;EAsBtD,aAAa,mBAAmB;;;;;;EAWhC,kBAAkB,QAAQ;;;;;;;;;;;;EAgB1B,YAAY,SAAS,cAAc;;;;;;;;;EAYnC,kBAAkB;;;;;;;;;;;;;EAgBlB,aACL,UAAU,kBACV;IAAU;IAAsB;MAC9B,QAAQ;;;;;;;;;;EAgBL,eAAe,UAAU,mBAAmB;;;;;;;;;;;;;EAkB5C,OACL,UAAU,kBACV;IAAU;MACR,QAAQ;;;;;;;cClLC;;EAGA,YAAA,KAAK;;;;;;;;;EAYX,eACL,uBACA,QAAQ,sBAAsB,aAAa,mBACzC,QAAQ;;;;;;;;;EAkBL,iBACL,uBACA,QAAQ,sBAAsB,aAAa,wBACzC,QAAQ;;;;;;;cCzCC;;EAGA,YAAA,KAAK;;;;;;;EAUX,aAAa,wBAAwB,QAAQ;;;;;;;;EAiB7C,uBACL,uBACA,QAAQ,aACN,QAAQ;;;;;;;cC9BC;;EAGA,YAAA,KAAK;;;;;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YAAA,SAAQ;;;;;;;;;;;;;;;;;;;;;EA+GpB,aAAa,mBAAmB;;;;;;MAS5B;;;;;;;;;MAYA,OAAO;;;;MAOP,QAAQ;;;;MAOR,UAAU;;;;MAOV,WAAW;;;;MAOX,cAAc;;;;MAOd,aAAa;;;;MAOb,QAAQ;;;;MAOR,aAAa;;;;MAOb,eAAe;;;;MAOf,SAAS;;;;MAOT,aAAa;;;;MAOb,YAAY;;;;MAOZ,WAAW;;;;MAOX,WAAW;;;;MAOX,WAAW;;;;MAOX,iBAAiB;;;;MAOjB,cAAc;;;;MAOd,cAAc;;;;MAOd,SAAS;;;;MAOT,YAAY;;;;MAOZ,cAAc"}
|
|
@@ -17,26 +17,36 @@ declare const VERSION: string;
|
|
|
17
17
|
/**
|
|
18
18
|
* Configuration options for creating a Nvisy client.
|
|
19
19
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* Authenticate one of two ways: pass an `apiToken` (sent as a bearer token on
|
|
21
|
+
* every request), or use a browser session — sign in with the standalone
|
|
22
|
+
* `login` / `signup`, then set `credentials: "include"` so the session cookies
|
|
23
|
+
* are sent. All other fields are optional and use sensible defaults.
|
|
22
24
|
*
|
|
23
25
|
* @example
|
|
24
26
|
* ```typescript
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* };
|
|
30
|
-
* const client = new Client(config);
|
|
27
|
+
* // API token
|
|
28
|
+
* const client = new Client({ apiToken: "your-api-token" });
|
|
29
|
+
*
|
|
30
|
+
* // Browser session (after `login()` set the cookies)
|
|
31
|
+
* const client = new Client({ credentials: "include" });
|
|
31
32
|
* ```
|
|
32
33
|
*/
|
|
33
34
|
interface ClientConfig {
|
|
34
35
|
/**
|
|
35
|
-
* API token for authentication
|
|
36
|
+
* API token for authentication, sent as `Authorization: Bearer <token>`.
|
|
37
|
+
*
|
|
38
|
+
* Tokens can be obtained from the Nvisy dashboard or the api-tokens endpoint.
|
|
39
|
+
* Omit it to authenticate with a browser session instead (see `credentials`).
|
|
40
|
+
*/
|
|
41
|
+
apiToken?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Credentials mode for every request, forwarded to `fetch`.
|
|
36
44
|
*
|
|
37
|
-
*
|
|
45
|
+
* Set to `"include"` to send the session cookies established by the
|
|
46
|
+
* standalone `login` / `signup` (needed for cross-origin browser sessions).
|
|
47
|
+
* Defaults to the platform's `fetch` default when omitted.
|
|
38
48
|
*/
|
|
39
|
-
|
|
49
|
+
credentials?: RequestCredentials;
|
|
40
50
|
/**
|
|
41
51
|
* Base URL for the Nvisy API.
|
|
42
52
|
*
|
|
@@ -90,4 +100,4 @@ declare const DEFAULTS: {
|
|
|
90
100
|
};
|
|
91
101
|
//#endregion
|
|
92
102
|
export { DEFAULTS as n, VERSION as r, ClientConfig as t };
|
|
93
|
-
//# sourceMappingURL=config-
|
|
103
|
+
//# sourceMappingURL=config-BdAgnJlh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-BdAgnJlh.d.ts","names":[],"sources":["../src/config.ts"],"mappings":";;;;;;;;;;;;;;;cAsBa;;;;;;;;;;;;;;;;;;UAoBI;;;;;;;EAOhB;;;;;;;;EASA,cAAc;;;;;;EAOd;;;;;;;;EASA,UAAU;;;;;;EAOV;;;;;;;;EASA;;;;;;;;;EAUA,eAAe,WAAW;;;;;cAMd;;;;WAAA;;;;WAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as PolicyDraft, $a as
|
|
2
|
-
export type { Account, AccountIdentities, AccountIdentity, AccountRef, Activity, ActivityExportOptions, ActivityFilterQuery, ActivityPage, ActivityPayload, ActivityType, ApiToken, ApiTokenPage, ApiTokenType, ApiTokenWithJWT, ArtifactSet, Attribution, AudioAdd, AudioAuditEvent, AudioAuditKind, AudioAuditLog, AudioData, AudioEdit, AudioEntity, AudioHint, AudioLocation, AudioManual, AudioModel, AudioPattern, AudioRedaction, AudioRefinement, AudioRetag, Audit, AuditHash,
|
|
1
|
+
import { $ as PolicyDraft, $a as WebhookActivityParams, $i as TextEntity, $n as Provider, $r as Dpi, $t as ListInvites, A as Color, Aa as ProviderType, Ai as SourceRef, An as RedactionResult, Ar as AudioData, At as NotificationEvent, B as ImageRedaction, Ba as ActivityExportOptions, Bi as TabularLocation, Bn as ConnectionSyncPage, Br as Audit, Bt as MemberPage, C as Language, Ca as UpdateApiToken, Ci as Polygon, Cn as DetectionMetadata, Cr as Login, Ct as ConnectionSyncFailedParams, D as ScopeMetadata, Da as DetectionTimeSeries, Di as Report, Dn as PipelineDetectionsQuery, Dr as AudioAuditEvent, Dt as MemberInvitedParams, E as Languages, Ea as DetectionStatusEntry, Ei as Redaction, En as DetectionStatusEvent, Er as AudioAdd, Et as MarkedReadStatus, F as DateStyle, Fa as Usage, Fi as TabularAuditKind, Fn as Connection, Fr as AudioManual, Ft as UnreadCountEvent, G as LabelScope, Ga as ConnectionActivityParams, Gi as TabularRetag, Gn as FileServiceConfig, Gr as CitedAttribution, Gt as Invite, H as LabelEntry, Ha as ActivityPage, Hi as TabularModel, Hn as ConnectionsQuery, Hr as BoundingBox, Ht as UpdateMember, I as GdprArticle9Treatment, Ia as UsageAnalytics, Ii as TabularAuditLog, In as ConnectionConfig, Ir as AudioModel, It as UnreadStatus, J as ModalityRedactions, Ja as InviteActivityParams, Ji as TextAuditKind, Jn as LlmConfig, Jr as Contested, Jt as InvitePage, K as LanguageTag, Ka as DetectionActivityParams, Ki as TextAdd, Kn as GcsCredentials, Kr as CodecParams, Kt as InviteCode, L as GdprSensitiveScope, La as UsageReport, Li as TabularEdit, Ln as ConnectionId, Lr as AudioPattern, Lt as UpdateNotificationSettings, M as CreatePolicy, Ma as StorageAnalytics, Mi as Suppress, Mn as WorkspaceDetectionsQuery, Mr as AudioEntity, Mt as NotificationPayload, N as CustomMatcher, Na as StorageKindEntry, Ni as TabularAdd, Nn as AuthenticatedProvider, Nr as AudioHint, Nt as NotificationSettings, O as AudioRedaction, Oa as ModelUsage, Oi as RuleMatch, On as RedactDetection, Or as AudioAuditKind, Ot as MemberJoinedParams, P as DateGranularity, Pa as TokenCounts, Pi as TabularAuditEvent, Pn as AzureCredentials, Pr as AudioLocation, Pt as RedactionCreatedParams, Q as PolicyDefinition, Qa as RedactionActivityParams, Qi as TextEdit, Qn as PickerToken, Qr as DocumentContext, Qt as InviteStatus, R as HipaaAccountNumbers, Ra as WorkspaceAnalytics, Ri as TabularEntity, Rn as ConnectionPage, Rr as AudioRefinement, Rt as ListMembers, S as CountryCode, Sa as TokenExpiration, Si as Point, Sn as DetectionId, Sr as RegisteredRecognizer, St as ConnectionSyncCompletedParams, T as LanguageSpan, Ta as DetectionDayEntry, Ti as RasterMode, Tn as DetectionStatus, Tr as Attribution, Tt as DetectionFailedParams, U as LabelLocale, Ua as ActivityPayload, Ui as TabularPattern, Un as CreateConnection, Ur as Calibration, Ut as CreateInvite, V as Label, Va as ActivityFilterQuery, Vi as TabularManual, Vn as ConnectionVerification, Vr as AuditHash, Vt as MemberSortField, W as LabelRef, Wa as ActivityType, Wi as TabularRefinement, Wn as ExportFiles, Wr as Category, Wt as GenerateInviteCode, X as PciPanRender, Xa as PipelineActivityParams, Xi as TextCoord, Xn as OAuthTokens, Xr as Deduplication, Xt as InviteSent, Y as PciDssPart, Ya as MemberActivityParams, Yi as TextAuditLog, Yn as OAuthStartResponse, Yr as DecodedSpan, Yt as InvitePreview, Z as Policy, Za as PolicyActivityParams, Zi as TextData, Zn as PickedFile, Zr as Dimensions, Zt as InviteSortField, _ as WebhookId, _a as ApiToken, _i as LeakProfile, _n as ExportQuery, _r as SendChatMessage, _t as PipelineSummary, a as RetentionSettings, aa as TextRefinement, ai as ImageAuditKind, an as DeleteFiles, ao as Handle, ar as SyncSchedule, at as Sha2Algorithm, b as WebhookStatus, ba as ApiTokenWithJWT, bi as OperatorId, bn as CreateDetection, br as LabelCatalog, bt as UpdatePipeline, c as WorkspacePage, ca as ArtifactSet, ci as ImageEdit, cn as FileHash, co as PublicAccount, cr as SyncTriggerType, ct as TerminalFallback, d as CreateWebhook, da as LayoutWord, di as ImageLocation, dn as FormatToken, dr as ChatMessage, dt as Waveform, ea as TextHint, ei as EditSet, en as ReplyInvite, eo as WorkspaceActivityParams, er as S3Credentials, et as PolicyRule, f as TestWebhook, fa as Token, fi as ImageManual, fn as ListFiles, fr as ChatRole, ft as CreatePipeline, g as WebhookEvent, ga as Transcription, gi as ImageRetag, gn as ExportFormat, gr as CreateChatSession, gt as PipelineStatus, h as WebhookCreated, ha as TranscriptWord, hi as ImageRefinement, hn as DateWindow, hr as ChatToken, ht as PipelineFilter, i as RetentionOverride, ia as TextPattern, ii as ImageAuditEvent, in as HealthStatus, io as AccountRef, ir as SyncMode, it as Predicate, j as ConfidenceThreshold, ja as RecognizerId, ji as SourceSpan, jn as RedactionResultPage, jr as AudioEdit, jt as NotificationPage, k as ClampBucket, ka as ModelUsageEntry, ki as Selection, kn as RedactionId, kr as AudioAuditLog, kt as Notification, l as WorkspaceRole, la as Layout, li as ImageEntity, ln as FileKind, lo as SetPassword, lr as UnauthenticatedProvider, lt as TextRedaction, m as Webhook, ma as TranscriptSegment, mi as ImagePattern, mn as UpdateFile, mr as ChatSessionPage, mt as PipelineDefinition, n as RasterPolicy, na as TextManual, ni as FreeformAttribution, nn as ComponentHealth, no as AccountIdentities, nr as StorageConfig, nt as PolicySummaryPage, o as UpdateWorkspace, oa as TextRetag, oi as ImageAuditLog, on as DeletedFiles, oo as IdentityProvider, or as SyncScheduleInput, ot as TabularRedaction, p as UpdateWebhook, pa as Tokens, pi as ImageModel, pn as ModalityToken, pr as ChatSession, pt as Pipeline, q as LocalizedText, qa as FileActivityParams, qi as TextAuditEvent, qn as ImportFiles, qr as Conflict, qt as InviteExpiration, r as Retention, ra as TextModel, ri as ImageAdd, rn as Health, ro as AccountIdentity, rr as SyncDeletionPolicy, rt as PolicyTemplate, s as Workspace, sa as TimeSpan, si as ImageData, sn as File, so as OidcStartResponse, sr as SyncStatus, st as TemplateOrigin, t as CreateWorkspace, ta as TextLocation, ti as EntityCoRef, tn as SortOrder, to as Account, tr as StartFileServiceOAuth, tt as PolicySummary, u as WorkspaceSettings, ua as LayoutBlock, ui as ImageHint, un as FilePage, uo as UpdateAccount, ur as UpdateConnection, ut as UpdatePolicy, v as WebhookPage, va as ApiTokenPage, vi as ManualIntent, vn as ErrorResponse, vr as ConnectorCatalog, vt as PipelineSummaryPage, w as LanguageProvenance, wa as DetectionAnalytics, wi as RangeOfUint, wn as DetectionPage, wr as Signup, wt as DetectionCompletedParams, x as Confidence, xa as CreateApiToken, xi as PatternEvent, xn as Detection, xr as RecognizerCatalog, xt as CursorPagination, y as WebhookResult, ya as ApiTokenType, yi as ModelEvent, yn as ValidationErrorDetail, yr as FileProviders, yt as PipelineTriggerType, z as HipaaDeidMethod, za as Activity, zi as TabularHint, zn as ConnectionSync, zr as AudioRetag, zt as Member } from "../index-B-oR9rqQ.js";
|
|
2
|
+
export type { Account, AccountIdentities, AccountIdentity, AccountRef, Activity, ActivityExportOptions, ActivityFilterQuery, ActivityPage, ActivityPayload, ActivityType, ApiToken, ApiTokenPage, ApiTokenType, ApiTokenWithJWT, ArtifactSet, Attribution, AudioAdd, AudioAuditEvent, AudioAuditKind, AudioAuditLog, AudioData, AudioEdit, AudioEntity, AudioHint, AudioLocation, AudioManual, AudioModel, AudioPattern, AudioRedaction, AudioRefinement, AudioRetag, Audit, AuditHash, AuthenticatedProvider, AzureCredentials, BoundingBox, Calibration, Category, ChatMessage, ChatRole, ChatSession, ChatSessionPage, ChatToken, CitedAttribution, ClampBucket, CodecParams, Color, ComponentHealth, Confidence, ConfidenceThreshold, Conflict, Connection, ConnectionActivityParams, ConnectionConfig, ConnectionId, ConnectionPage, ConnectionSync, ConnectionSyncCompletedParams, ConnectionSyncFailedParams, ConnectionSyncPage, ConnectionVerification, ConnectionsQuery, ConnectorCatalog, Contested, CountryCode, CreateApiToken, CreateChatSession, CreateConnection, CreateDetection, CreateInvite, CreatePipeline, CreatePolicy, CreateWebhook, CreateWorkspace, CursorPagination, CustomMatcher, DateGranularity, DateStyle, DateWindow, DecodedSpan, Deduplication, DeleteFiles, DeletedFiles, Detection, DetectionActivityParams, DetectionAnalytics, DetectionCompletedParams, DetectionDayEntry, DetectionFailedParams, DetectionId, DetectionMetadata, DetectionPage, DetectionStatus, DetectionStatusEntry, DetectionStatusEvent, DetectionTimeSeries, Dimensions, DocumentContext, Dpi, EditSet, EntityCoRef, ErrorResponse, ExportFiles, ExportFormat, ExportQuery, File, FileActivityParams, FileHash, FileKind, FilePage, FileProviders, FileServiceConfig, FormatToken, FreeformAttribution, GcsCredentials, GdprArticle9Treatment, GdprSensitiveScope, GenerateInviteCode, Handle, Health, HealthStatus, HipaaAccountNumbers, HipaaDeidMethod, IdentityProvider, ImageAdd, ImageAuditEvent, ImageAuditKind, ImageAuditLog, ImageData, ImageEdit, ImageEntity, ImageHint, ImageLocation, ImageManual, ImageModel, ImagePattern, ImageRedaction, ImageRefinement, ImageRetag, ImportFiles, Invite, InviteActivityParams, InviteCode, InviteExpiration, InvitePage, InvitePreview, InviteSent, InviteSortField, InviteStatus, Label, LabelCatalog, LabelEntry, LabelLocale, LabelRef, LabelScope, Language, LanguageProvenance, LanguageSpan, LanguageTag, Languages, Layout, LayoutBlock, LayoutWord, LeakProfile, ListFiles, ListInvites, ListMembers, LlmConfig, LocalizedText, Login, ManualIntent, MarkedReadStatus, Member, MemberActivityParams, MemberInvitedParams, MemberJoinedParams, MemberPage, MemberSortField, ModalityRedactions, ModalityToken, ModelEvent, ModelUsage, ModelUsageEntry, Notification, NotificationEvent, NotificationPage, NotificationPayload, NotificationSettings, OAuthStartResponse, OAuthTokens, OidcStartResponse, OperatorId, PatternEvent, PciDssPart, PciPanRender, PickedFile, PickerToken, Pipeline, PipelineActivityParams, PipelineDefinition, PipelineDetectionsQuery, PipelineFilter, PipelineStatus, PipelineSummary, PipelineSummaryPage, PipelineTriggerType, Point, Policy, PolicyActivityParams, PolicyDefinition, PolicyDraft, PolicyRule, PolicySummary, PolicySummaryPage, PolicyTemplate, Polygon, Predicate, Provider, ProviderType, PublicAccount, RangeOfUint, RasterMode, RasterPolicy, RecognizerCatalog, RecognizerId, RedactDetection, Redaction, RedactionActivityParams, RedactionCreatedParams, RedactionId, RedactionResult, RedactionResultPage, RegisteredRecognizer, ReplyInvite, Report, Retention, RetentionOverride, RetentionSettings, RuleMatch, S3Credentials, ScopeMetadata, Selection, SendChatMessage, SetPassword, Sha2Algorithm, Signup, SortOrder, SourceRef, SourceSpan, StartFileServiceOAuth, StorageAnalytics, StorageConfig, StorageKindEntry, Suppress, SyncDeletionPolicy, SyncMode, SyncSchedule, SyncScheduleInput, SyncStatus, SyncTriggerType, TabularAdd, TabularAuditEvent, TabularAuditKind, TabularAuditLog, TabularEdit, TabularEntity, TabularHint, TabularLocation, TabularManual, TabularModel, TabularPattern, TabularRedaction, TabularRefinement, TabularRetag, TemplateOrigin, TerminalFallback, TestWebhook, TextAdd, TextAuditEvent, TextAuditKind, TextAuditLog, TextCoord, TextData, TextEdit, TextEntity, TextHint, TextLocation, TextManual, TextModel, TextPattern, TextRedaction, TextRefinement, TextRetag, TimeSpan, Token, TokenCounts, TokenExpiration, Tokens, TranscriptSegment, TranscriptWord, Transcription, UnauthenticatedProvider, UnreadCountEvent, UnreadStatus, UpdateAccount, UpdateApiToken, UpdateConnection, UpdateFile, UpdateMember, UpdateNotificationSettings, UpdatePipeline, UpdatePolicy, UpdateWebhook, UpdateWorkspace, Usage, UsageAnalytics, UsageReport, ValidationErrorDetail, Waveform, Webhook, WebhookActivityParams, WebhookCreated, WebhookEvent, WebhookId, WebhookPage, WebhookResult, WebhookStatus, Workspace, WorkspaceActivityParams, WorkspaceAnalytics, WorkspaceDetectionsQuery, WorkspacePage, WorkspaceRole, WorkspaceSettings };
|
|
@@ -7,7 +7,7 @@ import { n as NvisyError, t as NvisyApiError } from "./errors-BOLD8iC1.js";
|
|
|
7
7
|
* Injected from `package.json` at build time, so it always matches the
|
|
8
8
|
* published version. Used in the default user agent string.
|
|
9
9
|
*/
|
|
10
|
-
const VERSION = "0.
|
|
10
|
+
const VERSION = "0.47.0";
|
|
11
11
|
/**
|
|
12
12
|
* Default configuration values used when options are not explicitly provided.
|
|
13
13
|
*/
|
|
@@ -44,4 +44,4 @@ const errorMiddleware = {
|
|
|
44
44
|
|
|
45
45
|
//#endregion
|
|
46
46
|
export { DEFAULTS as n, VERSION as r, errorMiddleware as t };
|
|
47
|
-
//# sourceMappingURL=error-
|
|
47
|
+
//# sourceMappingURL=error-CPo0Jl05.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-CPo0Jl05.js","names":[],"sources":["../src/config.ts","../src/middleware/error.ts"],"sourcesContent":["/**\n * @fileoverview Configuration types and constants for the Nvisy SDK.\n *\n * This module provides configuration interfaces, default values, and environment\n * variable names used throughout the SDK.\n *\n * @module config\n */\n\n/**\n * Compile-time version token, replaced with the `package.json` version by the\n * build (see `tsdown.config.ts`). Declared so it type-checks; the `typeof`\n * guard below keeps it safe when the define isn't applied (tests, direct `tsc`).\n */\ndeclare const __SDK_VERSION__: string | undefined;\n\n/**\n * Current SDK version.\n *\n * Injected from `package.json` at build time, so it always matches the\n * published version. Used in the default user agent string.\n */\nexport const VERSION =\n\ttypeof __SDK_VERSION__ === \"string\" ? __SDK_VERSION__ : \"0.0.0-dev\";\n\n/**\n * Configuration options for creating a Nvisy client.\n *\n * Authenticate one of two ways: pass an `apiToken` (sent as a bearer token on\n * every request), or use a browser session — sign in with the standalone\n * `login` / `signup`, then set `credentials: \"include\"` so the session cookies\n * are sent. All other fields are optional and use sensible defaults.\n *\n * @example\n * ```typescript\n * // API token\n * const client = new Client({ apiToken: \"your-api-token\" });\n *\n * // Browser session (after `login()` set the cookies)\n * const client = new Client({ credentials: \"include\" });\n * ```\n */\nexport interface ClientConfig {\n\t/**\n\t * API token for authentication, sent as `Authorization: Bearer <token>`.\n\t *\n\t * Tokens can be obtained from the Nvisy dashboard or the api-tokens endpoint.\n\t * Omit it to authenticate with a browser session instead (see `credentials`).\n\t */\n\tapiToken?: string;\n\n\t/**\n\t * Credentials mode for every request, forwarded to `fetch`.\n\t *\n\t * Set to `\"include\"` to send the session cookies established by the\n\t * standalone `login` / `signup` (needed for cross-origin browser sessions).\n\t * Defaults to the platform's `fetch` default when omitted.\n\t */\n\tcredentials?: RequestCredentials;\n\n\t/**\n\t * Base URL for the Nvisy API.\n\t *\n\t * @default \"https://api.nvisy.com\"\n\t */\n\tbaseUrl?: string;\n\n\t/**\n\t * Custom headers to include with every request.\n\t *\n\t * These headers are merged with the default headers (Content-Type, User-Agent,\n\t * and Authorization). Custom headers take precedence over defaults if there\n\t * are conflicts.\n\t */\n\theaders?: Record<string, string>;\n\n\t/**\n\t * Custom user agent string to identify your application.\n\t *\n\t * @default \"@nvisy/sdk v.{version}\"\n\t */\n\tuserAgent?: string;\n\n\t/**\n\t * Enable logging for requests and responses.\n\t *\n\t * When enabled, logs request method, URL, status, and timing to console.\n\t *\n\t * @default false\n\t */\n\twithLogging?: boolean;\n\n\t/**\n\t * Custom fetch implementation used for every request. Must match the WHATWG\n\t * `fetch` signature. Defaults to the global `fetch`.\n\t *\n\t * Lets a host swap in a non-browser transport — e.g. a desktop (Tauri) app\n\t * passing `@tauri-apps/plugin-http`'s `fetch`, which performs the request in\n\t * the native process and so is not subject to browser CORS.\n\t */\n\tfetch?: typeof globalThis.fetch;\n}\n\n/**\n * Default configuration values used when options are not explicitly provided.\n */\nexport const DEFAULTS = {\n\t/**\n\t * Default base URL for the Nvisy API.\n\t */\n\tBASE_URL: \"https://api.nvisy.com\",\n\n\t/**\n\t * Default user agent string.\n\t */\n\tUSER_AGENT: `@nvisy/sdk v.${VERSION}`,\n} as const;\n","import type { Middleware } from \"openapi-fetch\";\nimport type { ErrorResponse } from \"@/datatypes/index.js\";\nimport { NvisyApiError, NvisyError } from \"@/errors.js\";\n\n/**\n * Middleware that automatically throws NvisyApiError for error responses.\n * This replaces the need for manual checks in services.\n */\nexport const errorMiddleware: Middleware = {\n\tasync onResponse({ response }) {\n\t\tif (!response.ok) {\n\t\t\tconst error = (await response.clone().json()) as ErrorResponse;\n\t\t\tthrow new NvisyApiError(error, response.status);\n\t\t}\n\t\treturn response;\n\t},\n\n\tonError({ error }) {\n\t\t// Wrap fetch errors (network failures, CORS, etc.) in NvisyError\n\t\tif (error instanceof Error) {\n\t\t\tthrow new NvisyError(error.message);\n\t\t}\n\t\tthrow new NvisyError(\"An unknown network error occurred\");\n\t},\n};\n"],"mappings":";;;;;;;;;AAsBA,MAAa;;;;AAoFb,MAAa,WAAW;;;;CAIvB,UAAU;;;;CAKV,YAAY,gBAAgB;AAC7B;;;;;;;;AC5GA,MAAa,kBAA8B;CAC1C,MAAM,WAAW,EAAE,YAAY;EAC9B,IAAI,CAAC,SAAS,IAAI;GACjB,MAAM,QAAS,MAAM,SAAS,MAAM,CAAC,CAAC,KAAK;GAC3C,MAAM,IAAI,cAAc,OAAO,SAAS,MAAM;EAC/C;EACA,OAAO;CACR;CAEA,QAAQ,EAAE,SAAS;EAElB,IAAI,iBAAiB,OACpB,MAAM,IAAI,WAAW,MAAM,OAAO;EAEnC,MAAM,IAAI,WAAW,mCAAmC;CACzD;AACD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { vn as ErrorResponse } from "./index-
|
|
1
|
+
import { vn as ErrorResponse } from "./index-B-oR9rqQ.js";
|
|
2
2
|
//#region src/errors.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Base error class for all Nvisy SDK errors.
|
|
@@ -124,4 +124,4 @@ declare class NvisyApiError extends NvisyError implements ErrorResponse {
|
|
|
124
124
|
}
|
|
125
125
|
//#endregion
|
|
126
126
|
export { NvisyError as n, NvisyApiError as t };
|
|
127
|
-
//# sourceMappingURL=errors-
|
|
127
|
+
//# sourceMappingURL=errors-Cht3LbX5.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors-
|
|
1
|
+
{"version":3,"file":"errors-Cht3LbX5.d.ts","names":[],"sources":["../src/errors.ts"],"mappings":";;;;;;;;;;;;;;;;;;;cAgCa,mBAAmB;;;;WAIf;;;;;;EAOJ,YAAA;;;;;;;;;;;;;;;;;;;;;;;;cA4BA,sBAAsB,sBAAsB;;;;WAIxC;;;;WAKA;;;;;WAMA;;;;;WAMA;;;;;WAMA,aAAa;;;;WAKb;;;;;;;EAQJ,YAAA,UAAU,eAAe;;;;;;;;;EAkBrC;;;;;;;;;EAYA;;;;;;;;;EAYA;;;;;;;;EAeA,UAAU"}
|
|
@@ -9846,7 +9846,7 @@ interface paths {
|
|
|
9846
9846
|
put?: never;
|
|
9847
9847
|
/**
|
|
9848
9848
|
* Login
|
|
9849
|
-
* @description Authenticates a user and
|
|
9849
|
+
* @description Authenticates a user and starts a browser session: sets an HttpOnly session cookie and a CSRF cookie, returning no body. (Programmatic clients authenticate with an API token created via the tokens endpoint, not this one.)
|
|
9850
9850
|
*/
|
|
9851
9851
|
post: {
|
|
9852
9852
|
parameters: {
|
|
@@ -9862,14 +9862,12 @@ interface paths {
|
|
|
9862
9862
|
};
|
|
9863
9863
|
};
|
|
9864
9864
|
responses: {
|
|
9865
|
-
/** @description
|
|
9866
|
-
|
|
9865
|
+
/** @description no content */
|
|
9866
|
+
204: {
|
|
9867
9867
|
headers: {
|
|
9868
9868
|
[name: string]: unknown;
|
|
9869
9869
|
};
|
|
9870
|
-
content
|
|
9871
|
-
"application/json": components["schemas"]["AuthToken"];
|
|
9872
|
-
};
|
|
9870
|
+
content?: never;
|
|
9873
9871
|
};
|
|
9874
9872
|
/**
|
|
9875
9873
|
* @description HTTP error response representation with security-conscious design.
|
|
@@ -9938,7 +9936,7 @@ interface paths {
|
|
|
9938
9936
|
put?: never;
|
|
9939
9937
|
/**
|
|
9940
9938
|
* Signup
|
|
9941
|
-
* @description Creates a new account and
|
|
9939
|
+
* @description Creates a new account and starts a browser session: sets an HttpOnly session cookie and a CSRF cookie, returning no body.
|
|
9942
9940
|
*/
|
|
9943
9941
|
post: {
|
|
9944
9942
|
parameters: {
|
|
@@ -9954,14 +9952,12 @@ interface paths {
|
|
|
9954
9952
|
};
|
|
9955
9953
|
};
|
|
9956
9954
|
responses: {
|
|
9957
|
-
/** @description
|
|
9958
|
-
|
|
9955
|
+
/** @description no content */
|
|
9956
|
+
204: {
|
|
9959
9957
|
headers: {
|
|
9960
9958
|
[name: string]: unknown;
|
|
9961
9959
|
};
|
|
9962
|
-
content
|
|
9963
|
-
"application/json": components["schemas"]["AuthToken"];
|
|
9964
|
-
};
|
|
9960
|
+
content?: never;
|
|
9965
9961
|
};
|
|
9966
9962
|
/**
|
|
9967
9963
|
* @description HTTP error response representation with security-conscious design.
|
|
@@ -10030,7 +10026,7 @@ interface paths {
|
|
|
10030
10026
|
put?: never;
|
|
10031
10027
|
/**
|
|
10032
10028
|
* Logout
|
|
10033
|
-
* @description Invalidates the current
|
|
10029
|
+
* @description Invalidates the current session and clears session cookies.
|
|
10034
10030
|
*/
|
|
10035
10031
|
post: {
|
|
10036
10032
|
parameters: {
|
|
@@ -11365,23 +11361,6 @@ interface components {
|
|
|
11365
11361
|
* [`AuditEvent`]: crate::entity::audit::AuditEvent
|
|
11366
11362
|
*/
|
|
11367
11363
|
AuditHash: string;
|
|
11368
|
-
/** @description Response returned after successful authentication (login/signup). */
|
|
11369
|
-
AuthToken: {
|
|
11370
|
-
/** @description The JWT API token for authentication. */
|
|
11371
|
-
apiToken: string;
|
|
11372
|
-
/**
|
|
11373
|
-
* Format: date-time
|
|
11374
|
-
* @description Timestamp when the token expires.
|
|
11375
|
-
*/
|
|
11376
|
-
expiresAt: string;
|
|
11377
|
-
/**
|
|
11378
|
-
* Format: date-time
|
|
11379
|
-
* @description Timestamp when the token was issued.
|
|
11380
|
-
*/
|
|
11381
|
-
issuedAt: string;
|
|
11382
|
-
/** @description Handle of the authenticated account. */
|
|
11383
|
-
username: components["schemas"]["Handle"];
|
|
11384
|
-
};
|
|
11385
11364
|
/**
|
|
11386
11365
|
* @description Configuration for a provider reached with an API key (OpenAI, Anthropic).
|
|
11387
11366
|
*
|
|
@@ -17932,7 +17911,6 @@ type TabularRetag = Schemas$18["TabularRetag"];
|
|
|
17932
17911
|
type Schemas$17 = components["schemas"];
|
|
17933
17912
|
type Login = Schemas$17["Login"];
|
|
17934
17913
|
type Signup = Schemas$17["Signup"];
|
|
17935
|
-
type AuthToken = Schemas$17["AuthToken"];
|
|
17936
17914
|
//#endregion
|
|
17937
17915
|
//#region src/datatypes/catalog.d.ts
|
|
17938
17916
|
type Schemas$16 = components["schemas"];
|
|
@@ -18172,5 +18150,5 @@ type Retention = Schemas["Retention"];
|
|
|
18172
18150
|
type RetentionSettings = Schemas["RetentionSettings"];
|
|
18173
18151
|
type RetentionOverride = Schemas["RetentionOverride"];
|
|
18174
18152
|
//#endregion
|
|
18175
|
-
export { PolicyDraft as $,
|
|
18176
|
-
//# sourceMappingURL=index-
|
|
18153
|
+
export { PolicyDraft as $, WebhookActivityParams as $a, TextEntity as $i, Provider as $n, Dpi as $r, ListInvites as $t, Color as A, ProviderType as Aa, SourceRef as Ai, RedactionResult as An, AudioData as Ar, NotificationEvent as At, ImageRedaction as B, ActivityExportOptions as Ba, TabularLocation as Bi, ConnectionSyncPage as Bn, Audit as Br, MemberPage as Bt, Language as C, UpdateApiToken as Ca, Polygon as Ci, DetectionMetadata as Cn, Login as Cr, ConnectionSyncFailedParams as Ct, ScopeMetadata as D, DetectionTimeSeries as Da, Report as Di, PipelineDetectionsQuery as Dn, AudioAuditEvent as Dr, MemberInvitedParams as Dt, Languages as E, DetectionStatusEntry as Ea, Redaction as Ei, DetectionStatusEvent as En, AudioAdd as Er, MarkedReadStatus as Et, DateStyle as F, Usage as Fa, TabularAuditKind as Fi, Connection as Fn, AudioManual as Fr, UnreadCountEvent as Ft, LabelScope as G, ConnectionActivityParams as Ga, TabularRetag as Gi, FileServiceConfig as Gn, CitedAttribution as Gr, Invite as Gt, LabelEntry as H, ActivityPage as Ha, TabularModel as Hi, ConnectionsQuery as Hn, BoundingBox as Hr, UpdateMember as Ht, GdprArticle9Treatment as I, UsageAnalytics as Ia, TabularAuditLog as Ii, ConnectionConfig as In, AudioModel as Ir, UnreadStatus as It, ModalityRedactions as J, InviteActivityParams as Ja, TextAuditKind as Ji, LlmConfig as Jn, Contested as Jr, InvitePage as Jt, LanguageTag as K, DetectionActivityParams as Ka, TextAdd as Ki, GcsCredentials as Kn, CodecParams as Kr, InviteCode as Kt, GdprSensitiveScope as L, UsageReport as La, TabularEdit as Li, ConnectionId as Ln, AudioPattern as Lr, UpdateNotificationSettings as Lt, CreatePolicy as M, StorageAnalytics as Ma, Suppress as Mi, WorkspaceDetectionsQuery as Mn, AudioEntity as Mr, NotificationPayload as Mt, CustomMatcher as N, StorageKindEntry as Na, TabularAdd as Ni, AuthenticatedProvider as Nn, AudioHint as Nr, NotificationSettings as Nt, AudioRedaction as O, ModelUsage as Oa, RuleMatch as Oi, RedactDetection as On, AudioAuditKind as Or, MemberJoinedParams as Ot, DateGranularity as P, TokenCounts as Pa, TabularAuditEvent as Pi, AzureCredentials as Pn, AudioLocation as Pr, RedactionCreatedParams as Pt, PolicyDefinition as Q, RedactionActivityParams as Qa, TextEdit as Qi, PickerToken as Qn, DocumentContext as Qr, InviteStatus as Qt, HipaaAccountNumbers as R, WorkspaceAnalytics as Ra, TabularEntity as Ri, ConnectionPage as Rn, AudioRefinement as Rr, ListMembers as Rt, CountryCode as S, TokenExpiration as Sa, Point as Si, DetectionId as Sn, RegisteredRecognizer as Sr, ConnectionSyncCompletedParams as St, LanguageSpan as T, DetectionDayEntry as Ta, RasterMode as Ti, DetectionStatus as Tn, Attribution as Tr, DetectionFailedParams as Tt, LabelLocale as U, ActivityPayload as Ua, TabularPattern as Ui, CreateConnection as Un, Calibration as Ur, CreateInvite as Ut, Label as V, ActivityFilterQuery as Va, TabularManual as Vi, ConnectionVerification as Vn, AuditHash as Vr, MemberSortField as Vt, LabelRef as W, ActivityType as Wa, TabularRefinement as Wi, ExportFiles as Wn, Category as Wr, GenerateInviteCode as Wt, PciPanRender as X, PipelineActivityParams as Xa, TextCoord as Xi, OAuthTokens as Xn, Deduplication as Xr, InviteSent as Xt, PciDssPart as Y, MemberActivityParams as Ya, TextAuditLog as Yi, OAuthStartResponse as Yn, DecodedSpan as Yr, InvitePreview as Yt, Policy as Z, PolicyActivityParams as Za, TextData as Zi, PickedFile as Zn, Dimensions as Zr, InviteSortField as Zt, WebhookId as _, ApiToken as _a, LeakProfile as _i, ExportQuery as _n, SendChatMessage as _r, PipelineSummary as _t, RetentionSettings as a, TextRefinement as aa, ImageAuditKind as ai, DeleteFiles as an, Handle as ao, SyncSchedule as ar, Sha2Algorithm as at, WebhookStatus as b, ApiTokenWithJWT as ba, OperatorId as bi, CreateDetection as bn, LabelCatalog as br, UpdatePipeline as bt, WorkspacePage as c, ArtifactSet as ca, ImageEdit as ci, FileHash as cn, PublicAccount as co, SyncTriggerType as cr, TerminalFallback as ct, CreateWebhook as d, LayoutWord as da, ImageLocation as di, FormatToken as dn, paths as do, ChatMessage as dr, Waveform as dt, TextHint as ea, EditSet as ei, ReplyInvite as en, WorkspaceActivityParams as eo, S3Credentials as er, PolicyRule as et, TestWebhook as f, Token as fa, ImageManual as fi, ListFiles as fn, ChatRole as fr, CreatePipeline as ft, WebhookEvent as g, Transcription as ga, ImageRetag as gi, ExportFormat as gn, CreateChatSession as gr, PipelineStatus as gt, WebhookCreated as h, TranscriptWord as ha, ImageRefinement as hi, DateWindow as hn, ChatToken as hr, PipelineFilter as ht, RetentionOverride as i, TextPattern as ia, ImageAuditEvent as ii, HealthStatus as in, AccountRef as io, SyncMode as ir, Predicate as it, ConfidenceThreshold as j, RecognizerId as ja, SourceSpan as ji, RedactionResultPage as jn, AudioEdit as jr, NotificationPage as jt, ClampBucket as k, ModelUsageEntry as ka, Selection as ki, RedactionId as kn, AudioAuditLog as kr, Notification as kt, WorkspaceRole as l, Layout as la, ImageEntity as li, FileKind as ln, SetPassword as lo, UnauthenticatedProvider as lr, TextRedaction as lt, Webhook as m, TranscriptSegment as ma, ImagePattern as mi, UpdateFile as mn, ChatSessionPage as mr, PipelineDefinition as mt, RasterPolicy as n, TextManual as na, FreeformAttribution as ni, ComponentHealth as nn, AccountIdentities as no, StorageConfig as nr, PolicySummaryPage as nt, UpdateWorkspace as o, TextRetag as oa, ImageAuditLog as oi, DeletedFiles as on, IdentityProvider as oo, SyncScheduleInput as or, TabularRedaction as ot, UpdateWebhook as p, Tokens as pa, ImageModel as pi, ModalityToken as pn, ChatSession as pr, Pipeline as pt, LocalizedText as q, FileActivityParams as qa, TextAuditEvent as qi, ImportFiles as qn, Conflict as qr, InviteExpiration as qt, Retention as r, TextModel as ra, ImageAdd as ri, Health as rn, AccountIdentity as ro, SyncDeletionPolicy as rr, PolicyTemplate as rt, Workspace as s, TimeSpan as sa, ImageData as si, File as sn, OidcStartResponse as so, SyncStatus as sr, TemplateOrigin as st, CreateWorkspace as t, TextLocation as ta, EntityCoRef as ti, SortOrder as tn, Account as to, StartFileServiceOAuth as tr, PolicySummary as tt, WorkspaceSettings as u, LayoutBlock as ua, ImageHint as ui, FilePage as un, UpdateAccount as uo, UpdateConnection as ur, UpdatePolicy as ut, WebhookPage as v, ApiTokenPage as va, ManualIntent as vi, ErrorResponse as vn, ConnectorCatalog as vr, PipelineSummaryPage as vt, LanguageProvenance as w, DetectionAnalytics as wa, RangeOfUint as wi, DetectionPage as wn, Signup as wr, DetectionCompletedParams as wt, Confidence as x, CreateApiToken as xa, PatternEvent as xi, Detection as xn, RecognizerCatalog as xr, CursorPagination as xt, WebhookResult as y, ApiTokenType as ya, ModelEvent as yi, ValidationErrorDetail as yn, FileProviders as yr, PipelineTriggerType as yt, HipaaDeidMethod as z, Activity as za, TabularHint as zi, ConnectionSync as zn, AudioRetag as zr, Member as zt };
|
|
18154
|
+
//# sourceMappingURL=index-B-oR9rqQ.d.ts.map
|