@nvisy/sdk 0.54.0 → 0.56.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 +42 -1
- package/dist/datatypes/index.d.ts +2 -2
- package/dist/{errors-DShmkdjS.d.ts → errors-DeUtOGAV.d.ts} +2 -2
- package/dist/{errors-DShmkdjS.d.ts.map → errors-DeUtOGAV.d.ts.map} +1 -1
- package/dist/guest/index.d.ts +7 -10
- package/dist/guest/index.d.ts.map +1 -1
- package/dist/guest/index.js +6 -3
- package/dist/guest/index.js.map +1 -1
- package/dist/{http-BexRclA5.js → http-CmImjBaZ.js} +2 -2
- package/dist/http-CmImjBaZ.js.map +1 -0
- package/dist/{index-DzEtj1r2.d.ts → index-D2ihRMUe.d.ts} +642 -1226
- package/dist/index-D2ihRMUe.d.ts.map +1 -0
- package/dist/{index-DFbHT_eq.d.ts → index-tS6AFFSf.d.ts} +100 -143
- package/dist/index-tS6AFFSf.d.ts.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +19 -16
- 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-BMmcawiT.js → services-BnCYM6gZ.js} +102 -170
- package/dist/services-BnCYM6gZ.js.map +1 -0
- package/dist/webhooks/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/http-BexRclA5.js.map +0 -1
- package/dist/index-DFbHT_eq.d.ts.map +0 -1
- package/dist/index-DzEtj1r2.d.ts.map +0 -1
- package/dist/services-BMmcawiT.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,45 @@ and this project adheres to
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.56.0] - 2026-09-17
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Review discussion and lifecycle on the `reviews` service: `updateReview`
|
|
16
|
+
(rename), `deleteReview`, `addComment`, `updateComment`, `deleteComment`, and
|
|
17
|
+
`getEvents` (a review's lifecycle events). Comment and entry datatypes
|
|
18
|
+
(`WorkspaceComment`, `CreateWorkspaceComment`, `UpdateWorkspaceComment`,
|
|
19
|
+
`WorkspaceReviewEntry`, `WorkspaceReviewEntryPage`, `RenameWorkspaceReview`)
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Regenerated the API schema against the updated platform handlers
|
|
24
|
+
- **Breaking:** `reviews.getTimeline()` now returns a `WorkspaceReviewEntryPage`
|
|
25
|
+
(comments interleaved with lifecycle events) rather than an event page; a
|
|
26
|
+
review's events alone are available via `reviews.getEvents()`
|
|
27
|
+
|
|
28
|
+
### Removed
|
|
29
|
+
|
|
30
|
+
- **Breaking:** the standalone `threads` service and its datatypes
|
|
31
|
+
(`WorkspaceThread*`, `OpenWorkspaceThread`, `RenameWorkspaceThread`,
|
|
32
|
+
`ThreadEventKind`, and the thread activity payloads) — discussion is now
|
|
33
|
+
scoped to reviews via the comment methods above
|
|
34
|
+
|
|
35
|
+
## [0.55.0] - 2026-09-15
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- **Breaking:** the authenticated `Nvisy` client now authenticates explicitly
|
|
40
|
+
with either `apiToken` or `session: true` (mutually exclusive at the type
|
|
41
|
+
level). `session: true` uses the browser cookie session established by the
|
|
42
|
+
guest client's login / signup and sends credentialed requests automatically
|
|
43
|
+
(`credentials: "include"`). This restores driving the full authenticated API
|
|
44
|
+
from a browser session, which the 0.54.0 apiToken-required change had removed
|
|
45
|
+
- **Breaking:** the client config types are renamed for consistency:
|
|
46
|
+
`ClientConfig` / `NvisyConfig` → `NvisyOptions` (the authenticated client) and
|
|
47
|
+
`NvisyGuestOptions` (the guest client, transport-only). The `GuestConfig` alias
|
|
48
|
+
is removed — `NvisyGuest` takes `NvisyGuestOptions`
|
|
49
|
+
|
|
11
50
|
## [0.54.0] - 2026-09-15
|
|
12
51
|
|
|
13
52
|
### Added
|
|
@@ -1186,7 +1225,9 @@ redaction an independent resource. This release renames the SDK to match.
|
|
|
1186
1225
|
- Network error handling for timeouts, DNS resolution, and connection issues
|
|
1187
1226
|
- Configuration validation with detailed error messages
|
|
1188
1227
|
|
|
1189
|
-
[Unreleased]: https://github.com/nvisycom/sdk-ts/compare/v0.
|
|
1228
|
+
[Unreleased]: https://github.com/nvisycom/sdk-ts/compare/v0.56.0...HEAD
|
|
1229
|
+
[0.56.0]: https://github.com/nvisycom/sdk-ts/compare/v0.55.0...v0.56.0
|
|
1230
|
+
[0.55.0]: https://github.com/nvisycom/sdk-ts/compare/v0.54.0...v0.55.0
|
|
1190
1231
|
[0.54.0]: https://github.com/nvisycom/sdk-ts/compare/v0.53.0...v0.54.0
|
|
1191
1232
|
[0.53.0]: https://github.com/nvisycom/sdk-ts/compare/v0.52.0...v0.53.0
|
|
1192
1233
|
[0.52.0]: https://github.com/nvisycom/sdk-ts/compare/v0.51.0...v0.52.0
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export type { Account, AccountApiToken, AccountApiTokenPage, AccountApiTokenWithJwt, AccountDesktopToken, AccountIdentities, AccountIdentity, AccountMarkedReadStatus, AccountNotification, AccountNotificationPage, AccountRef, AccountUnreadStatus, ActivityPayload, ActivityType, ApiTokenType, ArtifactSet, Attribution, AudioAdd, AudioAuditEvent, AudioAuditKind, AudioAuditLog, AudioData, AudioEdit, AudioEntity, AudioHint, AudioLocation, AudioManual, AudioMetadata, AudioModel, AudioPattern, AudioRedaction, AudioRefinement, AudioRetag, Audit, AuditHash, AuthCapabilities, AuthenticatedProvider, AzureCredentials, BoundingBox, Calibration, Category, CitedAttribution, ClampBucket, CodecParams, Color, CommentMentionedParams, ComponentHealth, Confidence, ConfidenceThreshold, Conflict, ConnectionActivityParams, ConnectionConfig, ConnectionId, ConnectionSyncCompletedParams, ConnectionSyncFailedParams, ConnectionType, ConnectorCapabilities, Contested, CountryCode, CreateAccountApiToken, CreateAdhocWorkspaceDetection, CreateWorkspace, CreateWorkspaceComment, CreateWorkspaceConnection, CreateWorkspaceDetection, CreateWorkspaceInvite, CreateWorkspacePipeline, CreateWorkspacePolicy, CreateWorkspaceProvider, CreateWorkspaceReview, CreateWorkspaceWebhook, CursorPagination, CustomMatcher, DateGranularity, DateStyle, DateWindow, DecodedSpan, Deduplication, DeleteWorkspaceDocuments, DesktopTokenRequest, DetectionActivityParams, DetectionCompletedParams, DetectionFailedParams, DetectionId, DetectionMetadata, DetectionStatus, DetectionStatusEvent, Dimensions, Direction, DocumentActivityParams, DocumentContext, DocumentHash, DocumentKind, Dpi, EditSet, EntityCoRef, ErrorResponse, ExportFormat, ExportQuery, ExportWorkspaceFiles, FileProviders, FileServiceConfig, FileServiceProvider, FormatToken, FreeformAttribution, GcsCredentials, GdprArticle9Treatment, GdprSensitiveScope, GenerateWorkspaceInviteCode, Handle, Health, HealthStatus, HipaaAccountNumbers, HipaaDeidMethod, IdentityProvider, ImageAdd, ImageAuditEvent, ImageAuditKind, ImageAuditLog, ImageData, ImageEdit, ImageEntity, ImageHint, ImageLocation, ImageManual, ImageMetadata, ImageModel, ImagePattern, ImageRedaction, ImageRefinement, ImageRetag, ImportWorkspaceFiles, InferenceConfig, InviteActivityParams, InviteExpiration, InvitePreview, InviteSortField, InviteStatus, Label, LabelCatalog, LabelEntry, LabelLocale, LabelRef, LabelScope, Language, LanguageProvenance, LanguageSpan, LanguageTag, Languages, Layout, LayoutBlock, LayoutWord, LeakProfile, ListWorkspaceDocuments, ListWorkspaceInvites, ListWorkspaceMembers, LlmConfig, LocalizedText, Login, ManualIntent, MemberActivityParams, MemberJoinedParams, MemberSortField, MetadataEvent, ModalityRedactions, ModalityToken, ModelEvent, ModelUsage, NotificationEvent, NotificationPayload, OAuthStartResponse, OAuthTokens, OidcStartResponse,
|
|
1
|
+
import { $ as ConfidenceThreshold, $a as ModelUsage, $i as Redaction, $n as WorkspaceDetectionPage, $r as AudioData, $t as DetectionCompletedParams, A as RenameWorkspaceReview, Aa as TextManual, Ai as ImageAuditLog, An as DateWindow, Ao as WorkspaceActivityPage, Ar as WorkspaceConnectionPage, At as UpdateWorkspacePolicy, B as WorkspaceReviewsQuery, Ba as LayoutWord, Bi as ImageRefinement, Bn as UpdateWorkspaceDocument, Bo as SetPassword, Br as FileProviders, Bt as UpdateWorkspacePipeline, C as Language, Ca as TextAuditLog, Ci as Dpi, Cn as WorkspaceInvite, Co as RedactionActivityParams, Cr as SyncMode, Ct as PolicyTemplate, D as ScopeMetadata, Da as TextEntity, Di as ImageAdd, Dn as ComponentHealth, Do as WorkspaceActivity, Dr as UnauthenticatedProvider, Dt as TemplateOrigin, E as Languages, Ea as TextEdit, Ei as FreeformAttribution, En as WorkspaceInviteSent, Eo as WebhookActivityParams, Er as SyncTriggerType, Et as TabularRedaction, F as WorkspaceReviewEntry, Fa as TextRetag, Fi as ImageLocation, Fn as DocumentHash, Fo as AccountRef, Fr as WorkspacePickerToken, Ft as WorkspacePolicySummaryPage, G as ProviderType, Ga as Transcription, Gi as ModelEvent, Gn as CreateWorkspaceDetection, Gr as DesktopTokenRequest, Gt as CursorPagination, H as InferenceConfig, Ha as Tokens, Hi as LeakProfile, Hn as WorkspaceDocument, Hr as RecognizerCatalog, Ht as WorkspacePipelineFilter, I as WorkspaceReviewEntryPage, Ia as TimeSpan, Ii as ImageManual, In as DocumentKind, Io as Handle, Ir as WorkspacePickerTokenRequest, It as CreateWorkspacePipeline, J as WorkspaceProviderPage, Ja as AccountApiTokenWithJwt, Ji as Point, Jn as DetectionStatus, Jr as Attribution, Jt as AccountNotificationPage, K as UpdateWorkspaceProvider, Ka as AccountApiToken, Ki as OperatorId, Kn as DetectionId, Kr as Login, Kt as AccountMarkedReadStatus, L as WorkspaceReviewEvent, La as ArtifactSet, Li as ImageMetadata, Ln as FormatToken, Lo as IdentityProvider, Lr as WorkspaceSyncSchedule, Lt as PipelineDefinition, M as UpdateWorkspaceComment, Ma as TextModel, Mi as ImageEdit, Mn as ExportQuery, Mo as Account, Mr as WorkspaceConnectionSyncPage, Mt as WorkspacePoliciesQuery, N as WorkspaceComment, Na as TextPattern, Ni as ImageEntity, Nn as ErrorResponse, No as AccountIdentities, Nr as WorkspaceConnectionVerification, Nt as WorkspacePolicy, O as CreateWorkspaceComment, Oa as TextHint, Oi as ImageAuditEvent, On as Health, Oo as WorkspaceActivityExportOptions, Or as UpdateWorkspaceConnection, Ot as TerminalFallback, P as WorkspaceReview, Pa as TextRefinement, Pi as ImageHint, Pn as DeleteWorkspaceDocuments, Po as AccountIdentity, Pr as WorkspaceConnectionsQuery, Pt as WorkspacePolicySummary, Q as Color, Qa as UpdateAccountApiToken, Qi as Recognition, Qn as WorkspaceDetection, Qr as AudioAuditLog, Qt as ConnectionSyncFailedParams, R as WorkspaceReviewEventPage, Ra as Layout, Ri as ImageModel, Rn as ListWorkspaceDocuments, Ro as OidcStartResponse, Rr as AuthCapabilities, Rt as PipelineStatus, S as CountryCode, Sa as TextAuditKind, Si as DocumentContext, Sn as ReplyWorkspaceInvite, So as ProviderActivityParams, Sr as SyncDeletionPolicy, St as PolicyRule, T as LanguageSpan, Ta as TextData, Ti as EntityCoRef, Tn as WorkspaceInvitePage, To as ReviewCommentActivityParams, Tr as SyncStatus, Tt as Sha2Algorithm, U as ProviderConfig, Ua as TranscriptSegment, Ui as ManualIntent, Un as WorkspaceDocumentPage, Ur as RegisteredRecognizer, Ut as WorkspacePipelineSummary, V as CreateWorkspaceProvider, Va as Token, Vi as ImageRetag, Vn as WorkspaceDeletedDocuments, Vo as UpdateAccount, Vr as LabelCatalog, Vt as WorkspacePipeline, W as ProviderId, Wa as TranscriptWord, Wi as MetadataEvent, Wn as CreateAdhocWorkspaceDetection, Wr as AccountDesktopToken, Wt as WorkspacePipelineSummaryPage, X as AudioRedaction, Xa as CreateAccountApiToken, Xi as RangeOfUint, Xn as RedactWorkspaceDetection, Xr as AudioAuditEvent, Xt as CommentMentionedParams, Y as WorkspaceProvidersQuery, Ya as ApiTokenType, Yi as Polygon, Yn as DetectionStatusEvent, Yr as AudioAdd, Yt as AccountUnreadStatus, Z as ClampBucket, Za as TokenExpiration, Zi as RasterMode, Zn as RedactionId, Zr as AudioAuditKind, Zt as ConnectionSyncCompletedParams, _ as WorkspaceWebhook, _a as TabularPattern, _i as Conflict, _n as InviteExpiration, _o as DocumentActivityParams, _r as OAuthTokens, _t as PciDssPart, a as RetentionSettings, aa as Suppress, ai as AudioMetadata, an as ReviewAssignedParams, ao as WorkspaceDetectionAnalytics, ar as AzureCredentials, at as GdprSensitiveScope, b as WorkspaceWebhookResult, ba as TextAdd, bi as Deduplication, bn as InviteStatus, bo as PipelineActivityParams, br as StartFileServiceOAuth, bt as PolicyDraft, c as WorkspacePage, ca as TabularAuditKind, ci as AudioRefinement, cn as WorkspaceNotificationSettings, co as WorkspaceDetectionTimeSeries, cr as ConnectionType, ct as ImageRedaction, d as CreateWorkspaceWebhook, da as TabularEntity, di as AuditHash, dn as UpdateWorkspaceMember, do as WorkspaceStorageKindEntry, dr as FileServiceConfig, dt as LabelLocale, ea as Report, ei as AudioEdit, en as DetectionFailedParams, eo as RecognizerId, er as WorkspaceDetectionsQuery, et as CreateWorkspacePolicy, f as TestWorkspaceWebhook, fa as TabularHint, fi as BoundingBox, fn as WorkspaceMember, fo as WorkspaceUsageAnalytics, fr as FileServiceProvider, ft as LabelRef, g as WebhookStatus, ga as TabularModel, gi as CodecParams, gn as GenerateWorkspaceInviteCode, go as DetectionActivityParams, gr as OAuthStartResponse, gt as ModalityRedactions, h as WebhookId, ha as TabularMetadata, hi as CitedAttribution, hn as Direction, ho as ConnectionActivityParams, hr as LlmConfig, ht as LocalizedText, i as RetentionOverride, ia as SourceSpan, ii as AudioManual, in as RedactionCreatedParams, io as WorkspaceAnalytics, ir as AuthenticatedProvider, it as GdprArticle9Treatment, j as ReviewStatus, ja as TextMetadata, ji as ImageData, jn as ExportFormat, jo as WorkspaceActivityParams, jr as WorkspaceConnectionSync, jt as Waveform, k as CreateWorkspaceReview, ka as TextLocation, ki as ImageAuditKind, kn as HealthStatus, ko as WorkspaceActivityFilterQuery, kr as WorkspaceConnection, kt as TextRedaction, l as WorkspaceRole, la as TabularAuditLog, li as AudioRetag, ln as ListWorkspaceMembers, lo as WorkspaceModelUsageEntry, lr as CreateWorkspaceConnection, lt as Label, m as WebhookEvent, ma as TabularManual, mi as Category, mn as CreateWorkspaceInvite, mo as ActivityType, mr as ImportWorkspaceFiles, mt as LanguageTag, n as RasterPolicy, na as Selection, ni as AudioHint, nn as NotificationEvent, no as Usage, nr as WorkspaceRedactionResult, nt as DateGranularity, o as UpdateWorkspace, oa as TabularAdd, oi as AudioModel, on as UnreadCountEvent, oo as WorkspaceDetectionDayEntry, or as ConnectionConfig, ot as HipaaAccountNumbers, p as UpdateWorkspaceWebhook, pa as TabularLocation, pi as Calibration, pn as WorkspaceMemberPage, po as ActivityPayload, pr as GcsCredentials, pt as LabelScope, q as WorkspaceProvider, qa as AccountApiTokenPage, qi as PatternEvent, qn as DetectionMetadata, qr as Signup, qt as AccountNotification, r as Retention, ra as SourceRef, ri as AudioLocation, rn as NotificationPayload, ro as UsageReport, rr as WorkspaceRedactionResultPage, rt as DateStyle, s as Workspace, sa as TabularAuditEvent, si as AudioPattern, sn as UpdateWorkspaceNotificationSettings, so as WorkspaceDetectionStatusEntry, sr as ConnectionId, st as HipaaDeidMethod, t as CreateWorkspace, ta as RuleMatch, ti as AudioEntity, tn as MemberJoinedParams, to as TokenCounts, tr as WorkspacePipelineDetectionsQuery, tt as CustomMatcher, u as WorkspaceSettings, ua as TabularEdit, ui as Audit, un as MemberSortField, uo as WorkspaceStorageAnalytics, ur as ExportWorkspaceFiles, ut as LabelEntry, v as WorkspaceWebhookCreated, va as TabularRefinement, vi as Contested, vn as InvitePreview, vo as InviteActivityParams, vr as PickedFile, vt as PciPanRender, w as LanguageProvenance, wa as TextCoord, wi as EditSet, wn as WorkspaceInviteCode, wo as ReviewActivityParams, wr as SyncScheduleInput, wt as Predicate, x as Confidence, xa as TextAuditEvent, xi as Dimensions, xn as ListWorkspaceInvites, xo as PolicyActivityParams, xr as StorageConfig, xt as PolicyKind, y as WorkspaceWebhookPage, ya as TabularRetag, yi as DecodedSpan, yn as InviteSortField, yo as MemberActivityParams, yr as S3Credentials, yt as Policy, z as WorkspaceReviewPage, za as LayoutBlock, zi as ImagePattern, zn as ModalityToken, zo as PublicAccount, zr as ConnectorCapabilities, zt as PipelineTriggerType } from "../index-D2ihRMUe.js";
|
|
2
|
+
export type { Account, AccountApiToken, AccountApiTokenPage, AccountApiTokenWithJwt, AccountDesktopToken, AccountIdentities, AccountIdentity, AccountMarkedReadStatus, AccountNotification, AccountNotificationPage, AccountRef, AccountUnreadStatus, ActivityPayload, ActivityType, ApiTokenType, ArtifactSet, Attribution, AudioAdd, AudioAuditEvent, AudioAuditKind, AudioAuditLog, AudioData, AudioEdit, AudioEntity, AudioHint, AudioLocation, AudioManual, AudioMetadata, AudioModel, AudioPattern, AudioRedaction, AudioRefinement, AudioRetag, Audit, AuditHash, AuthCapabilities, AuthenticatedProvider, AzureCredentials, BoundingBox, Calibration, Category, CitedAttribution, ClampBucket, CodecParams, Color, CommentMentionedParams, ComponentHealth, Confidence, ConfidenceThreshold, Conflict, ConnectionActivityParams, ConnectionConfig, ConnectionId, ConnectionSyncCompletedParams, ConnectionSyncFailedParams, ConnectionType, ConnectorCapabilities, Contested, CountryCode, CreateAccountApiToken, CreateAdhocWorkspaceDetection, CreateWorkspace, CreateWorkspaceComment, CreateWorkspaceConnection, CreateWorkspaceDetection, CreateWorkspaceInvite, CreateWorkspacePipeline, CreateWorkspacePolicy, CreateWorkspaceProvider, CreateWorkspaceReview, CreateWorkspaceWebhook, CursorPagination, CustomMatcher, DateGranularity, DateStyle, DateWindow, DecodedSpan, Deduplication, DeleteWorkspaceDocuments, DesktopTokenRequest, DetectionActivityParams, DetectionCompletedParams, DetectionFailedParams, DetectionId, DetectionMetadata, DetectionStatus, DetectionStatusEvent, Dimensions, Direction, DocumentActivityParams, DocumentContext, DocumentHash, DocumentKind, Dpi, EditSet, EntityCoRef, ErrorResponse, ExportFormat, ExportQuery, ExportWorkspaceFiles, FileProviders, FileServiceConfig, FileServiceProvider, FormatToken, FreeformAttribution, GcsCredentials, GdprArticle9Treatment, GdprSensitiveScope, GenerateWorkspaceInviteCode, Handle, Health, HealthStatus, HipaaAccountNumbers, HipaaDeidMethod, IdentityProvider, ImageAdd, ImageAuditEvent, ImageAuditKind, ImageAuditLog, ImageData, ImageEdit, ImageEntity, ImageHint, ImageLocation, ImageManual, ImageMetadata, ImageModel, ImagePattern, ImageRedaction, ImageRefinement, ImageRetag, ImportWorkspaceFiles, InferenceConfig, InviteActivityParams, InviteExpiration, InvitePreview, InviteSortField, InviteStatus, Label, LabelCatalog, LabelEntry, LabelLocale, LabelRef, LabelScope, Language, LanguageProvenance, LanguageSpan, LanguageTag, Languages, Layout, LayoutBlock, LayoutWord, LeakProfile, ListWorkspaceDocuments, ListWorkspaceInvites, ListWorkspaceMembers, LlmConfig, LocalizedText, Login, ManualIntent, MemberActivityParams, MemberJoinedParams, MemberSortField, MetadataEvent, ModalityRedactions, ModalityToken, ModelEvent, ModelUsage, NotificationEvent, NotificationPayload, OAuthStartResponse, OAuthTokens, OidcStartResponse, OperatorId, PatternEvent, PciDssPart, PciPanRender, PickedFile, PipelineActivityParams, PipelineDefinition, PipelineStatus, PipelineTriggerType, Point, Policy, PolicyActivityParams, PolicyDraft, PolicyKind, PolicyRule, PolicyTemplate, Polygon, Predicate, ProviderActivityParams, ProviderConfig, ProviderId, ProviderType, PublicAccount, RangeOfUint, RasterMode, RasterPolicy, Recognition, RecognizerCatalog, RecognizerId, RedactWorkspaceDetection, Redaction, RedactionActivityParams, RedactionCreatedParams, RedactionId, RegisteredRecognizer, RenameWorkspaceReview, ReplyWorkspaceInvite, Report, Retention, RetentionOverride, RetentionSettings, ReviewActivityParams, ReviewAssignedParams, ReviewCommentActivityParams, ReviewStatus, RuleMatch, S3Credentials, ScopeMetadata, Selection, SetPassword, Sha2Algorithm, Signup, SourceRef, SourceSpan, StartFileServiceOAuth, StorageConfig, Suppress, SyncDeletionPolicy, SyncMode, SyncScheduleInput, SyncStatus, SyncTriggerType, TabularAdd, TabularAuditEvent, TabularAuditKind, TabularAuditLog, TabularEdit, TabularEntity, TabularHint, TabularLocation, TabularManual, TabularMetadata, TabularModel, TabularPattern, TabularRedaction, TabularRefinement, TabularRetag, TemplateOrigin, TerminalFallback, TestWorkspaceWebhook, TextAdd, TextAuditEvent, TextAuditKind, TextAuditLog, TextCoord, TextData, TextEdit, TextEntity, TextHint, TextLocation, TextManual, TextMetadata, TextModel, TextPattern, TextRedaction, TextRefinement, TextRetag, TimeSpan, Token, TokenCounts, TokenExpiration, Tokens, TranscriptSegment, TranscriptWord, Transcription, UnauthenticatedProvider, UnreadCountEvent, UpdateAccount, UpdateAccountApiToken, UpdateWorkspace, UpdateWorkspaceComment, UpdateWorkspaceConnection, UpdateWorkspaceDocument, UpdateWorkspaceMember, UpdateWorkspaceNotificationSettings, UpdateWorkspacePipeline, UpdateWorkspacePolicy, UpdateWorkspaceProvider, UpdateWorkspaceWebhook, Usage, UsageReport, Waveform, WebhookActivityParams, WebhookEvent, WebhookId, WebhookStatus, Workspace, WorkspaceActivity, WorkspaceActivityExportOptions, WorkspaceActivityFilterQuery, WorkspaceActivityPage, WorkspaceActivityParams, WorkspaceAnalytics, WorkspaceComment, WorkspaceConnection, WorkspaceConnectionPage, WorkspaceConnectionSync, WorkspaceConnectionSyncPage, WorkspaceConnectionVerification, WorkspaceConnectionsQuery, WorkspaceDeletedDocuments, WorkspaceDetection, WorkspaceDetectionAnalytics, WorkspaceDetectionDayEntry, WorkspaceDetectionPage, WorkspaceDetectionStatusEntry, WorkspaceDetectionTimeSeries, WorkspaceDetectionsQuery, WorkspaceDocument, WorkspaceDocumentPage, WorkspaceInvite, WorkspaceInviteCode, WorkspaceInvitePage, WorkspaceInviteSent, WorkspaceMember, WorkspaceMemberPage, WorkspaceModelUsageEntry, WorkspaceNotificationSettings, WorkspacePage, WorkspacePickerToken, WorkspacePickerTokenRequest, WorkspacePipeline, WorkspacePipelineDetectionsQuery, WorkspacePipelineFilter, WorkspacePipelineSummary, WorkspacePipelineSummaryPage, WorkspacePoliciesQuery, WorkspacePolicy, WorkspacePolicySummary, WorkspacePolicySummaryPage, WorkspaceProvider, WorkspaceProviderPage, WorkspaceProvidersQuery, WorkspaceRedactionResult, WorkspaceRedactionResultPage, WorkspaceReview, WorkspaceReviewEntry, WorkspaceReviewEntryPage, WorkspaceReviewEvent, WorkspaceReviewEventPage, WorkspaceReviewPage, WorkspaceReviewsQuery, WorkspaceRole, WorkspaceSettings, WorkspaceStorageAnalytics, WorkspaceStorageKindEntry, WorkspaceSyncSchedule, WorkspaceUsageAnalytics, WorkspaceWebhook, WorkspaceWebhookCreated, WorkspaceWebhookPage, WorkspaceWebhookResult };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Nn as ErrorResponse } from "./index-D2ihRMUe.js";
|
|
2
2
|
//#region src/errors.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Base error class for all Nvisy SDK errors.
|
|
@@ -109,4 +109,4 @@ declare class NvisyApiError extends NvisyError implements ErrorResponse {
|
|
|
109
109
|
}
|
|
110
110
|
//#endregion
|
|
111
111
|
export { NvisyError as n, NvisyApiError as t };
|
|
112
|
-
//# sourceMappingURL=errors-
|
|
112
|
+
//# sourceMappingURL=errors-DeUtOGAV.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors-
|
|
1
|
+
{"version":3,"file":"errors-DeUtOGAV.d.ts","names":[],"sources":["../src/errors.ts"],"mappings":";;;;;;;;;;;;;;;;;;;cAgCa,mBAAmB;;;;WAIf;;;;;;EAOJ,YAAA;;;;;;;;;;;;;;;;;;;;;;;;cA4BA,sBAAsB,sBAAsB;;;;WAIxC;;;;WAKA;;;;WAKA;;;;;;;EAQJ,YAAA,UAAU,eAAe;;;;;;;;;EAerC;;;;;;;;;EAYA;;;;;;;;;EAYA;;;;;;;;EAeA,UAAU"}
|
package/dist/guest/index.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { D as
|
|
1
|
+
import { D as NvisyGuestOptions, T as ApiClient, i as Status, m as GuestAuth, p as GuestCapabilities } from "../index-tS6AFFSf.js";
|
|
2
2
|
//#region src/guest/client.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Configuration for {@link NvisyGuest}. Same as {@link ClientConfig} but without
|
|
5
|
-
* `apiToken` — a guest client never authenticates with a bearer token. Pass
|
|
6
|
-
* `credentials: "include"` to send the session cookies set by login / signup.
|
|
7
|
-
*/
|
|
8
|
-
type GuestConfig = Omit<ClientConfig, "apiToken">;
|
|
9
3
|
/**
|
|
10
4
|
* Pre-auth Nvisy client. Wraps a token-less {@link ApiClient} and exposes the
|
|
11
|
-
* public surface: {@link GuestAuth}, {@link
|
|
5
|
+
* public surface: {@link GuestAuth}, {@link GuestCapabilities}, and
|
|
6
|
+
* {@link Status}. Configured with the shared {@link NvisyGuestOptions} (no auth); a
|
|
7
|
+
* guest client never sends a token. Pass `credentials: "include"` to send the
|
|
8
|
+
* session cookies set by login / signup on a cross-origin app.
|
|
12
9
|
*/
|
|
13
10
|
export declare class NvisyGuest {
|
|
14
11
|
#private;
|
|
@@ -18,7 +15,7 @@ export declare class NvisyGuest {
|
|
|
18
15
|
* @param config - Optional configuration (baseUrl, credentials, headers,
|
|
19
16
|
* userAgent, fetch)
|
|
20
17
|
*/
|
|
21
|
-
constructor(config?:
|
|
18
|
+
constructor(config?: NvisyGuestOptions);
|
|
22
19
|
/** The base URL used for API requests. */
|
|
23
20
|
get baseUrl(): string;
|
|
24
21
|
/** The underlying openapi-fetch client for direct API access. */
|
|
@@ -34,5 +31,5 @@ export declare class NvisyGuest {
|
|
|
34
31
|
get health(): Status;
|
|
35
32
|
}
|
|
36
33
|
//#endregion
|
|
37
|
-
export type {
|
|
34
|
+
export type { NvisyGuestOptions };
|
|
38
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/guest/client.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/guest/client.ts"],"mappings":";;;;;;;;;qBA+Ba;;;;;;;;EAaA,YAAA,SAAQ;;MAWhB;;MAKA,OAAO;;MAKP,QAAQ;;;;;MAQR,gBAAgB;;MAKhB,UAAU"}
|
package/dist/guest/index.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { n as resolveDefaults, t as createApiClient } from "../http-
|
|
2
|
-
import {
|
|
1
|
+
import { n as resolveDefaults, t as createApiClient } from "../http-CmImjBaZ.js";
|
|
2
|
+
import { i as Status, m as GuestAuth, p as GuestCapabilities } from "../services-BnCYM6gZ.js";
|
|
3
3
|
|
|
4
4
|
//#region src/guest/client.ts
|
|
5
5
|
/**
|
|
6
6
|
* Pre-auth Nvisy client. Wraps a token-less {@link ApiClient} and exposes the
|
|
7
|
-
* public surface: {@link GuestAuth}, {@link
|
|
7
|
+
* public surface: {@link GuestAuth}, {@link GuestCapabilities}, and
|
|
8
|
+
* {@link Status}. Configured with the shared {@link NvisyGuestOptions} (no auth); a
|
|
9
|
+
* guest client never sends a token. Pass `credentials: "include"` to send the
|
|
10
|
+
* session cookies set by login / signup on a cross-origin app.
|
|
8
11
|
*/
|
|
9
12
|
var NvisyGuest = class {
|
|
10
13
|
/** The resolved base URL. @internal */
|
package/dist/guest/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/guest/client.ts"],"sourcesContent":["/**\n * @fileoverview The pre-auth (\"guest\") Nvisy client.\n *\n * {@link NvisyGuest} exposes only the endpoints that work without an API token:\n * sign-in (login / signup / OIDC start), the deployment's auth capabilities, and\n * health checks. Use it to power a login screen before anyone has authenticated;\n * for the authenticated API, use {@link Nvisy} from `@nvisy/sdk`.\n *\n * @module guest\n *\n * @example\n * ```typescript\n * import { NvisyGuest } from \"@nvisy/sdk/guest\";\n *\n * const guest = new NvisyGuest({ baseUrl: \"https://api.nvisy.com\" });\n * const auth = await guest.capabilities.getAuthCapabilities();\n * await guest.auth.loginAccount({ identifier: \"user@example.com\", password: \"...\" });\n * ```\n */\n\nimport type {
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/guest/client.ts"],"sourcesContent":["/**\n * @fileoverview The pre-auth (\"guest\") Nvisy client.\n *\n * {@link NvisyGuest} exposes only the endpoints that work without an API token:\n * sign-in (login / signup / OIDC start), the deployment's auth capabilities, and\n * health checks. Use it to power a login screen before anyone has authenticated;\n * for the authenticated API, use {@link Nvisy} from `@nvisy/sdk`.\n *\n * @module guest\n *\n * @example\n * ```typescript\n * import { NvisyGuest } from \"@nvisy/sdk/guest\";\n *\n * const guest = new NvisyGuest({ baseUrl: \"https://api.nvisy.com\" });\n * const auth = await guest.capabilities.getAuthCapabilities();\n * await guest.auth.loginAccount({ identifier: \"user@example.com\", password: \"...\" });\n * ```\n */\n\nimport type { NvisyGuestOptions } from \"@/config.js\";\nimport { type ApiClient, createApiClient, resolveDefaults } from \"@/http.js\";\nimport { GuestAuth, GuestCapabilities, Status } from \"@/services/index.js\";\n\n/**\n * Pre-auth Nvisy client. Wraps a token-less {@link ApiClient} and exposes the\n * public surface: {@link GuestAuth}, {@link GuestCapabilities}, and\n * {@link Status}. Configured with the shared {@link NvisyGuestOptions} (no auth); a\n * guest client never sends a token. Pass `credentials: \"include\"` to send the\n * session cookies set by login / signup on a cross-origin app.\n */\nexport class NvisyGuest {\n\t/** The resolved base URL. @internal */\n\treadonly #baseUrl: string;\n\n\t/** The underlying openapi-fetch client instance. @internal */\n\treadonly #api: ApiClient;\n\n\t/**\n\t * Creates a new pre-auth Nvisy client (no API token).\n\t *\n\t * @param config - Optional configuration (baseUrl, credentials, headers,\n\t * userAgent, fetch)\n\t */\n\tconstructor(config: NvisyGuestOptions = {}) {\n\t\tconst resolved = resolveDefaults(config);\n\t\tthis.#baseUrl = resolved.baseUrl;\n\t\tthis.#api = createApiClient({\n\t\t\tcredentials: config.credentials,\n\t\t\tfetch: config.fetch,\n\t\t\t...resolved,\n\t\t});\n\t}\n\n\t/** The base URL used for API requests. */\n\tget baseUrl(): string {\n\t\treturn this.#baseUrl;\n\t}\n\n\t/** The underlying openapi-fetch client for direct API access. */\n\tget api(): ApiClient {\n\t\treturn this.#api;\n\t}\n\n\t/** Pre-auth sign-in: login, signup, and OIDC start. */\n\tget auth(): GuestAuth {\n\t\treturn new GuestAuth(this.#api);\n\t}\n\n\t/**\n\t * The pre-auth capabilities read: `getAuthCapabilities()`. The label /\n\t * recognizer / connector reads require an authenticated {@link Nvisy} client.\n\t */\n\tget capabilities(): GuestCapabilities {\n\t\treturn new GuestCapabilities(this.#api);\n\t}\n\n\t/** Health checks (liveness / readiness). */\n\tget health(): Status {\n\t\treturn new Status(this.#api);\n\t}\n}\n"],"mappings":";;;;;;;;;;;AA+BA,IAAa,aAAb,MAAwB;;CAEvB,AAAS;;CAGT,AAAS;;;;;;;CAQT,YAAY,SAA4B,CAAC,GAAG;EAC3C,MAAM,WAAW,gBAAgB,MAAM;EACvC,KAAK,WAAW,SAAS;EACzB,KAAK,OAAO,gBAAgB;GAC3B,aAAa,OAAO;GACpB,OAAO,OAAO;GACd,GAAG;EACJ,CAAC;CACF;;CAGA,IAAI,UAAkB;EACrB,OAAO,KAAK;CACb;;CAGA,IAAI,MAAiB;EACpB,OAAO,KAAK;CACb;;CAGA,IAAI,OAAkB;EACrB,OAAO,IAAI,UAAU,KAAK,IAAI;CAC/B;;;;;CAMA,IAAI,eAAkC;EACrC,OAAO,IAAI,kBAAkB,KAAK,IAAI;CACvC;;CAGA,IAAI,SAAiB;EACpB,OAAO,IAAI,OAAO,KAAK,IAAI;CAC5B;AACD"}
|
|
@@ -8,7 +8,7 @@ import createClient from "openapi-fetch";
|
|
|
8
8
|
* Injected from `package.json` at build time, so it always matches the
|
|
9
9
|
* published version. Used in the default user agent string.
|
|
10
10
|
*/
|
|
11
|
-
const VERSION = "0.
|
|
11
|
+
const VERSION = "0.56.0";
|
|
12
12
|
/**
|
|
13
13
|
* Default configuration values used when options are not explicitly provided.
|
|
14
14
|
*/
|
|
@@ -125,4 +125,4 @@ function resolveDefaults(config) {
|
|
|
125
125
|
|
|
126
126
|
//#endregion
|
|
127
127
|
export { VERSION as i, resolveDefaults as n, DEFAULTS as r, createApiClient as t };
|
|
128
|
-
//# sourceMappingURL=http-
|
|
128
|
+
//# sourceMappingURL=http-CmImjBaZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-CmImjBaZ.js","names":[],"sources":["../src/config.ts","../src/middleware/error.ts","../src/middleware/logging.ts","../src/http.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 * Options for the pre-auth {@link NvisyGuest} client — the transport settings\n * shared by every client, with no authentication. All fields are optional and\n * use sensible defaults.\n */\nexport interface NvisyGuestOptions {\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 * Merged over the default headers (Content-Type, User-Agent, and, for token\n\t * auth, Authorization). Custom headers take precedence on conflict.\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 * Credentials mode forwarded to `fetch`. Session auth sets this to\n\t * `\"include\"` automatically; set it here only to override the transport\n\t * behaviour (e.g. a same-origin app that wants a different mode).\n\t */\n\tcredentials?: RequestCredentials;\n\n\t/**\n\t * Enable logging for requests and responses.\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 * Configuration for the authenticated {@link Nvisy} client. Authenticate one of\n * two ways, chosen explicitly:\n *\n * - `apiToken` — send an API token as `Authorization: Bearer <token>`.\n * - `session: true` — use the browser cookie session established by the guest\n * client's `login` / `signup`; requests are sent credentialed\n * (`credentials: \"include\"`).\n *\n * The two are mutually exclusive.\n *\n * @example\n * ```typescript\n * // API token\n * new Nvisy({ apiToken: \"your-api-token\" });\n *\n * // Browser cookie session (after the guest client logged in)\n * new Nvisy({ session: true });\n * ```\n */\nexport type NvisyOptions = NvisyGuestOptions &\n\t({ apiToken: string; session?: never } | { session: true; apiToken?: never });\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","import type { Middleware } from \"openapi-fetch\";\n\n/**\n * Creates a logging middleware for debugging requests and responses.\n *\n * Logs request method, URL, response status, and timing to console.\n */\nexport function createLoggingMiddleware(): Middleware {\n\treturn {\n\t\tasync onRequest({ request }) {\n\t\t\tconst start = performance.now();\n\t\t\t(request as Request & { _startTime?: number })._startTime = start;\n\t\t\treturn request;\n\t\t},\n\n\t\tasync onResponse({ request, response }) {\n\t\t\tconst start =\n\t\t\t\t(request as Request & { _startTime?: number })._startTime ??\n\t\t\t\tperformance.now();\n\t\t\tconst duration = Math.round(performance.now() - start);\n\t\t\tconst url = new URL(request.url);\n\n\t\t\tconsole.log(\n\t\t\t\t`[nvisy] ${request.method} ${url.pathname} ${response.status} (${duration}ms)`,\n\t\t\t);\n\n\t\t\tif (!response.ok) {\n\t\t\t\tconst cloned = response.clone();\n\t\t\t\ttry {\n\t\t\t\t\tconst body = await cloned.json();\n\t\t\t\t\tconsole.error(\"[nvisy] Response:\", JSON.stringify(body, null, 2));\n\t\t\t\t} catch {\n\t\t\t\t\tconst text = await cloned.text();\n\t\t\t\t\tif (text) console.error(\"[nvisy] Response:\", text);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn response;\n\t\t},\n\n\t\tonError({ request, error }) {\n\t\t\tconst start =\n\t\t\t\t(request as Request & { _startTime?: number })._startTime ??\n\t\t\t\tperformance.now();\n\t\t\tconst duration = Math.round(performance.now() - start);\n\t\t\tconst url = new URL(request.url);\n\n\t\t\tconsole.error(\n\t\t\t\t`[nvisy] ${request.method} ${url.pathname} ERROR (${duration}ms):`,\n\t\t\t\terror instanceof Error ? error.message : error,\n\t\t\t);\n\t\t},\n\t};\n}\n","/**\n * @fileoverview Shared openapi-fetch client factory used by both the\n * authenticated {@link Nvisy} client and the pre-auth {@link NvisyGuest} client.\n *\n * @module http\n * @internal\n */\n\nimport createClient, { type Client as OpenApiClient } from \"openapi-fetch\";\nimport { DEFAULTS } from \"@/config.js\";\nimport {\n\tcreateLoggingMiddleware,\n\terrorMiddleware,\n} from \"@/middleware/index.js\";\nimport type { paths } from \"@/schema/api.js\";\n\n/** Typed openapi-fetch client for the Nvisy API. */\nexport type ApiClient = OpenApiClient<paths>;\n\n/** Resolved options for building an {@link ApiClient}. */\nexport interface ApiClientOptions {\n\t/** Bearer token to send as `Authorization`; omit for an unauthenticated client. */\n\tapiToken?: string;\n\t/** Base URL for the API. */\n\tbaseUrl: string;\n\t/** Custom headers merged over the defaults. */\n\theaders: Record<string, string>;\n\t/** User-agent string. */\n\tuserAgent: string;\n\t/** Credentials mode forwarded to `fetch` (e.g. `\"include\"` for cookies). */\n\tcredentials?: RequestCredentials;\n\t/** Whether to log requests/responses. */\n\twithLogging: boolean;\n\t/** Custom fetch implementation; `undefined` uses the global fetch. */\n\tfetch?: typeof globalThis.fetch;\n}\n\n/**\n * Build a configured openapi-fetch client. A bearer `Authorization` header is\n * sent only when `apiToken` is provided, so the same factory serves the\n * authenticated and guest clients.\n */\nexport function createApiClient(options: ApiClientOptions): ApiClient {\n\tconst headers: Record<string, string> = {\n\t\t\"Content-Type\": \"application/json\",\n\t\t\"User-Agent\": options.userAgent,\n\t\t// Send a bearer token only when configured; a guest client authenticates\n\t\t// with cookies (or not at all) instead.\n\t\t...(options.apiToken\n\t\t\t? { Authorization: `Bearer ${options.apiToken}` }\n\t\t\t: {}),\n\t\t...options.headers,\n\t};\n\n\tconst api = createClient<paths>({\n\t\tbaseUrl: options.baseUrl,\n\t\theaders,\n\t\t// `undefined` falls back to the global fetch inside openapi-fetch.\n\t\tfetch: options.fetch,\n\t\t// Omitted `credentials` uses the platform default.\n\t\t...(options.credentials ? { credentials: options.credentials } : {}),\n\t});\n\n\tif (options.withLogging) {\n\t\tapi.use(createLoggingMiddleware());\n\t}\n\n\tapi.use(errorMiddleware);\n\treturn api;\n}\n\n/** Apply the shared defaults (base URL, user agent) to a config's optionals. */\nexport function resolveDefaults<\n\tT extends {\n\t\tbaseUrl?: string;\n\t\theaders?: Record<string, string>;\n\t\tuserAgent?: string;\n\t\twithLogging?: boolean;\n\t},\n>(config: T) {\n\treturn {\n\t\tbaseUrl: config.baseUrl ?? DEFAULTS.BASE_URL,\n\t\theaders: config.headers ?? {},\n\t\tuserAgent: config.userAgent ?? DEFAULTS.USER_AGENT,\n\t\twithLogging: config.withLogging ?? false,\n\t};\n}\n"],"mappings":";;;;;;;;;;AAsBA,MAAa;;;;AAkFb,MAAa,WAAW;;;;CAIvB,UAAU;;;;CAKV,YAAY,gBAAgB;AAC7B;;;;;;;;AC1GA,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;;;;;;;;;ACjBA,SAAgB,0BAAsC;CACrD,OAAO;EACN,MAAM,UAAU,EAAE,WAAW;GAE5B,AAAC,QAA8C,aADjC,YAAY,IACsC;GAChE,OAAO;EACR;EAEA,MAAM,WAAW,EAAE,SAAS,YAAY;GACvC,MAAM,QACJ,QAA8C,cAC/C,YAAY,IAAI;GACjB,MAAM,WAAW,KAAK,MAAM,YAAY,IAAI,IAAI,KAAK;GACrD,MAAM,MAAM,IAAI,IAAI,QAAQ,GAAG;GAE/B,QAAQ,IACP,WAAW,QAAQ,OAAO,GAAG,IAAI,SAAS,GAAG,SAAS,OAAO,IAAI,SAAS,IAC3E;GAEA,IAAI,CAAC,SAAS,IAAI;IACjB,MAAM,SAAS,SAAS,MAAM;IAC9B,IAAI;KACH,MAAM,OAAO,MAAM,OAAO,KAAK;KAC/B,QAAQ,MAAM,qBAAqB,KAAK,UAAU,MAAM,MAAM,CAAC,CAAC;IACjE,QAAQ;KACP,MAAM,OAAO,MAAM,OAAO,KAAK;KAC/B,IAAI,MAAM,QAAQ,MAAM,qBAAqB,IAAI;IAClD;GACD;GAEA,OAAO;EACR;EAEA,QAAQ,EAAE,SAAS,SAAS;GAC3B,MAAM,QACJ,QAA8C,cAC/C,YAAY,IAAI;GACjB,MAAM,WAAW,KAAK,MAAM,YAAY,IAAI,IAAI,KAAK;GACrD,MAAM,MAAM,IAAI,IAAI,QAAQ,GAAG;GAE/B,QAAQ,MACP,WAAW,QAAQ,OAAO,GAAG,IAAI,SAAS,UAAU,SAAS,OAC7D,iBAAiB,QAAQ,MAAM,UAAU,KAC1C;EACD;CACD;AACD;;;;;;;;;;;;;;;;ACXA,SAAgB,gBAAgB,SAAsC;CACrE,MAAM,UAAkC;EACvC,gBAAgB;EAChB,cAAc,QAAQ;EAGtB,GAAI,QAAQ,WACT,EAAE,eAAe,UAAU,QAAQ,WAAW,IAC9C,CAAC;EACJ,GAAG,QAAQ;CACZ;CAEA,MAAM,MAAM,aAAoB;EAC/B,SAAS,QAAQ;EACjB;EAEA,OAAO,QAAQ;EAEf,GAAI,QAAQ,cAAc,EAAE,aAAa,QAAQ,YAAY,IAAI,CAAC;CACnE,CAAC;CAED,IAAI,QAAQ,aACX,IAAI,IAAI,wBAAwB,CAAC;CAGlC,IAAI,IAAI,eAAe;CACvB,OAAO;AACR;;AAGA,SAAgB,gBAOd,QAAW;CACZ,OAAO;EACN,SAAS,OAAO,WAAW,SAAS;EACpC,SAAS,OAAO,WAAW,CAAC;EAC5B,WAAW,OAAO,aAAa,SAAS;EACxC,aAAa,OAAO,eAAe;CACpC;AACD"}
|