@nvisy/sdk 0.50.0 → 0.52.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 +90 -1
- package/dist/{client-ClO429Iv.d.ts → client-CSxuXX5e.d.ts} +377 -357
- package/dist/client-CSxuXX5e.d.ts.map +1 -0
- package/dist/datatypes/index.d.ts +2 -2
- package/dist/{error-DRb1GHg6.js → error-Bc6Sg_y-.js} +3 -3
- package/dist/{error-DRb1GHg6.js.map → error-Bc6Sg_y-.js.map} +1 -1
- package/dist/{errors-BoBDbzst.d.ts → errors-CcTfWeEE.d.ts} +2 -7
- package/dist/errors-CcTfWeEE.d.ts.map +1 -0
- package/dist/{errors-D2J3LbE-.js → errors-ChRSBkhj.js} +2 -9
- package/dist/errors-ChRSBkhj.js.map +1 -0
- package/dist/{index-QQU6h-4Y.d.ts → index-DmLbi0Gi.d.ts} +6656 -5203
- package/dist/index-DmLbi0Gi.d.ts.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +16 -21
- 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-DUixyxF2.js → services-Bt15MerP.js} +715 -668
- package/dist/services-Bt15MerP.js.map +1 -0
- package/dist/standalone/index.d.ts +4 -13
- package/dist/standalone/index.d.ts.map +1 -1
- package/dist/standalone/index.js +6 -7
- package/dist/standalone/index.js.map +1 -1
- package/dist/webhooks/index.d.ts +2 -2
- package/dist/webhooks/index.js +1 -1
- package/package.json +3 -3
- package/dist/client-ClO429Iv.d.ts.map +0 -1
- package/dist/errors-BoBDbzst.d.ts.map +0 -1
- package/dist/errors-D2J3LbE-.js.map +0 -1
- package/dist/index-QQU6h-4Y.d.ts.map +0 -1
- package/dist/services-DUixyxF2.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-CSxuXX5e.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/capabilities.ts","../src/services/connections.ts","../src/services/detections.ts","../src/services/documents.ts","../src/services/invites.ts","../src/services/members.ts","../src/services/notifications.ts","../src/services/pipelines.ts","../src/services/policies.ts","../src/services/providers.ts","../src/services/redactions.ts","../src/services/status.ts","../src/services/syncs.ts","../src/services/threads.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,oBAAoB,QAAQ;;;;;;;;EAc7C,aAAa,mBAAmB,QAAQ,OAAO,QAAQ;;;;;;;EAsBvD,aAAa,oBAAoB;;;;;;EAWjC,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,qBACA,QAAQ,+BAA+B,aAAa,mBAClD,QAAQ;;;;;;;;;EAkBL,iBACL,qBACA,QAAQ,+BACP,aACA,iCACC,QAAQ;;;;;;;cC3CC;;EAGA,YAAA,KAAK;;;;;;;EAUX,aAAa,sBAAsB,QAAQ;;;;;;;;EAiB3C,uBACL,qBACA,QAAQ,aACN,QAAQ;;;;;;;cC9BC;;EAGA,YAAA,KAAK;;;;;;;EAUX,cAAc,QAAQ,mBAAmB,QAAQ;;;;;;;EAajD,YAAY,kBAAkB,QAAQ;;;;;;;EAatC,eACL,OAAO,wBACL,QAAQ;;;;;;;;EAcL,eACL,iBACA,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AuditLog, $t as DetectionFailedParams, A as WorkspaceThreadEvent, Aa as TextLocation, Ai as ImageAuditKind, An as ExportFormat, Ao as WorkspaceActivityExportOptions, Ar as WorkspaceConnection, At as Waveform, B as CreateWorkspaceProvider, Ba as LayoutBlock, Bi as ImagePattern, Bn as ReviewStatus, Bo as OidcStartResponse, Br as ConnectorCapabilities, Bt as WorkspacePipeline, C as RenameWorkspaceThread, Ca as TextAuditKind, Ci as DocumentContext, Cn as WorkspaceInviteCode, Co as ProviderActivityParams, Cr as SyncDeletionPolicy, Ct as Predicate, D as WorkspaceThread, Da as TextEdit, Di as FreeformAttribution, Dn as Health, Do as ThreadCommentActivityParams, Dr as SyncTriggerType, Dt as TerminalFallback, E as WorkspaceComment, Ea as TextData, Ei as EntityCoRef, En as ComponentHealth, Eo as ThreadActivityParams, Er as SyncStatus, Et as TemplateOrigin, F as Language, Fa as TextRefinement, Fi as ImageHint, Fn as DocumentHash, Fo as AccountIdentities, Fr as WorkspaceConnectionsQuery, Ft as CreateWorkspacePipeline, G as UpdateWorkspaceProvider, Ga as TranscriptWord, Gi as MetadataEvent, Gn as CreateAdhocWorkspaceDetection, Gr as AccountDesktopToken, Gt as AccountMarkedReadStatus, H as ProviderConfig, Ha as Token, Hi as ImageRetag, Hn as WorkspaceDeletedDocuments, Ho as SetPassword, Hr as LabelCatalog, Ht as WorkspacePipelineSummary, I as LanguageProvenance, Ia as TextRetag, Ii as ImageLocation, In as DocumentKind, Io as AccountIdentity, Ir as WorkspacePickerToken, It as PipelineDefinition, J as WorkspaceProvidersQuery, Ja as AccountApiTokenPage, Ji as PatternEvent, Jn as DetectionMetadata, Jr as Signup, Jt as AccountUnreadStatus, K as WorkspaceProvider, Ka as Transcription, Ki as ModelEvent, Kn as CreateWorkspaceDetection, Kr as DesktopTokenRequest, Kt as AccountNotification, L as LanguageSpan, La as TimeSpan, Li as ImageManual, Ln as FormatToken, Lo as AccountRef, Lr as WorkspacePickerTokenRequest, Lt as PipelineStatus, M as WorkspaceThreadsQuery, Ma as TextMetadata, Mi as ImageData, Mn as ErrorResponse, Mo as WorkspaceActivityPage, Mr as WorkspaceConnectionSync, Mt as WorkspacePolicy, N as Confidence, Na as TextModel, Ni as ImageEdit, Nn as AssignWorkspaceReview, No as WorkspaceActivityParams, Nr as WorkspaceConnectionSyncPage, Nt as WorkspacePolicySummary, O as WorkspaceThreadEntry, Oa as TextEntity, Oi as ImageAdd, On as HealthStatus, Oo as WebhookActivityParams, Or as UnauthenticatedProvider, Ot as TextRedaction, P as CountryCode, Pa as TextPattern, Pi as ImageEntity, Pn as DeleteWorkspaceDocuments, Po as Account, Pr as WorkspaceConnectionVerification, Pt as WorkspacePolicySummaryPage, Q as ConfidenceThreshold, Qa as TokenExpiration, Qi as RasterMode, Qn as RedactionId, Qr as AudioAuditKind, Qt as DetectionCompletedParams, R as Languages, Ra as ArtifactSet, Ri as ImageMetadata, Rn as ListWorkspaceDocuments, Ro as Handle, Rr as WorkspaceSyncSchedule, Rt as PipelineTriggerType, S as OpenWorkspaceThread, Sa as TextAuditEvent, Si as Dimensions, Sn as WorkspaceInvite, So as PolicyActivityParams, Sr as StorageConfig, St as PolicyTemplate, T as UpdateWorkspaceComment, Ta as TextCoord, Ti as EditSet, Tn as WorkspaceInviteSent, To as ReviewActivityParams, Tr as SyncScheduleInput, Tt as TabularRedaction, U as ProviderId, Ua as Tokens, Ui as LeakProfile, Un as WorkspaceDocument, Uo as UpdateAccount, Ur as RecognizerCatalog, Ut as WorkspacePipelineSummaryPage, V as InferenceConfig, Va as LayoutWord, Vi as ImageRefinement, Vn as UpdateWorkspaceDocument, Vo as PublicAccount, Vr as FileProviders, Vt as WorkspacePipelineFilter, W as ProviderType, Wa as TranscriptSegment, Wi as ManualIntent, Wn as WorkspaceDocumentPage, Wr as RegisteredRecognizer, Wt as CursorPagination, X as ClampBucket, Xa as ApiTokenType, Xi as Polygon, Xn as DetectionStatusEvent, Xr as AudioAdd, Xt as ConnectionSyncCompletedParams, Y as AudioRedaction, Ya as AccountApiTokenWithJwt, Yi as Point, Yn as DetectionStatus, Yr as Attribution, Yt as CommentMentionedParams, Z as Color, Za as CreateAccountApiToken, Zi as RangeOfUint, Zn as RedactWorkspaceDetection, Zr as AudioAuditEvent, Zt as ConnectionSyncFailedParams, _ as WorkspaceWebhook, _a as TabularModel, _i as CodecParams, _n as InvitePreview, _o as DetectionActivityParams, _r as OAuthStartResponse, _t as PciPanRender, a as RetentionSettings, aa as SourceSpan, ai as AudioManual, an as UnreadCountEvent, ao as WorkspaceAnalytics, ar as AuthenticatedProvider, at as HipaaAccountNumbers, b as WorkspaceWebhookResult, ba as TabularRetag, bi as DecodedSpan, bn as ListWorkspaceInvites, bo as MemberActivityParams, br as S3Credentials, bt as PolicyKind, c as WorkspacePage, ca as TabularAuditEvent, ci as AudioPattern, cn as ListWorkspaceMembers, co as WorkspaceDetectionStatusEntry, cr as ConnectionId, ct as Label, d as CreateWorkspaceWebhook, da as TabularEdit, di as Audit, dn as WorkspaceMember, do as WorkspaceStorageAnalytics, dr as ExportWorkspaceFiles, dt as LabelRef, ea as Redaction, ei as AudioData, en as MemberJoinedParams, eo as ModelUsage, er as WorkspaceDetectionPage, et as CustomMatcher, f as TestWorkspaceWebhook, fa as TabularEntity, fi as AuditHash, fn as WorkspaceMemberPage, fo as WorkspaceStorageKindEntry, fr as FileServiceConfig, ft as LabelScope, g as WebhookStatus, ga as TabularMetadata, gi as CitedAttribution, gn as InviteExpiration, go as ConnectionActivityParams, gr as LlmConfig, gt as PciDssPart, h as WebhookId, ha as TabularManual, hi as Category, hn as GenerateWorkspaceInviteCode, ho as ActivityType, hr as ImportWorkspaceFiles, ht as ModalityRedactions, i as RetentionOverride, ia as SourceRef, ii as AudioLocation, in as ReviewAssignedParams, io as UsageReport, ir as WorkspaceRedactionResultPage, it as GdprSensitiveScope, j as WorkspaceThreadPage, ja as TextManual, ji as ImageAuditLog, jn as ExportQuery, jo as WorkspaceActivityFilterQuery, jr as WorkspaceConnectionPage, jt as WorkspacePoliciesQuery, k as WorkspaceThreadEntryPage, ka as TextHint, ki as ImageAuditEvent, kn as DateWindow, ko as WorkspaceActivity, kr as UpdateWorkspaceConnection, kt as UpdateWorkspacePolicy, l as WorkspaceRole, la as TabularAuditKind, li as AudioRefinement, ln as MemberSortField, lo as WorkspaceDetectionTimeSeries, lr as ConnectionType, lt as LabelEntry, m as WebhookEvent, ma as TabularLocation, mi as Calibration, mn as Direction, mo as ActivityPayload, mr as GcsCredentials, mt as LocalizedText, n as RasterPolicy, na as RuleMatch, ni as AudioEntity, nn as NotificationPayload, no as TokenCounts, nr as WorkspacePipelineDetectionsQuery, nt as DateStyle, o as UpdateWorkspace, oa as Suppress, oi as AudioMetadata, on as UpdateWorkspaceNotificationSettings, oo as WorkspaceDetectionAnalytics, or as AzureCredentials, ot as HipaaDeidMethod, p as UpdateWorkspaceWebhook, pa as TabularHint, pi as BoundingBox, pn as CreateWorkspaceInvite, po as WorkspaceUsageAnalytics, pr as FileServiceProvider, pt as LanguageTag, q as WorkspaceProviderPage, qa as AccountApiToken, qi as OperatorId, qn as DetectionId, qr as Login, qt as AccountNotificationPage, r as Retention, ra as Selection, ri as AudioHint, rn as RedactionCreatedParams, ro as Usage, rr as WorkspaceRedactionResult, rt as GdprArticle9Treatment, s as Workspace, sa as TabularAdd, si as AudioModel, sn as WorkspaceNotificationSettings, so as WorkspaceDetectionDayEntry, sr as ConnectionConfig, st as ImageRedaction, t as CreateWorkspace, ta as Report, ti as AudioEdit, tn as NotificationEvent, to as RecognizerId, tr as WorkspaceDetectionsQuery, tt as DateGranularity, u as WorkspaceSettings, ua as TabularAuditLog, ui as AudioRetag, un as UpdateWorkspaceMember, uo as WorkspaceModelUsageEntry, ur as CreateWorkspaceConnection, ut as LabelLocale, v as WorkspaceWebhookCreated, va as TabularPattern, vi as Conflict, vn as InviteSortField, vo as DocumentActivityParams, vr as OAuthTokens, vt as Policy, w as ThreadEventKind, wa as TextAuditLog, wi as Dpi, wn as WorkspaceInvitePage, wo as RedactionActivityParams, wr as SyncMode, wt as Sha2Algorithm, x as CreateWorkspaceComment, xa as TextAdd, xi as Deduplication, xn as ReplyWorkspaceInvite, xo as PipelineActivityParams, xr as StartFileServiceOAuth, xt as PolicyRule, y as WorkspaceWebhookPage, ya as TabularRefinement, yi as Contested, yn as InviteStatus, yo as InviteActivityParams, yr as PickedFile, yt as PolicyDraft, z as ScopeMetadata, za as Layout, zi as ImageModel, zn as ModalityToken, zo as IdentityProvider, zr as AuthCapabilities, zt as UpdateWorkspacePipeline } from "../index-DmLbi0Gi.js";
|
|
2
|
+
export type { Account, AccountApiToken, AccountApiTokenPage, AccountApiTokenWithJwt, AccountDesktopToken, AccountIdentities, AccountIdentity, AccountMarkedReadStatus, AccountNotification, AccountNotificationPage, AccountRef, AccountUnreadStatus, ActivityPayload, ActivityType, ApiTokenType, ArtifactSet, AssignWorkspaceReview, 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, 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, OpenWorkspaceThread, 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, RenameWorkspaceThread, ReplyWorkspaceInvite, Report, Retention, RetentionOverride, RetentionSettings, ReviewActivityParams, ReviewAssignedParams, 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, ThreadActivityParams, ThreadCommentActivityParams, ThreadEventKind, 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, WorkspaceRole, WorkspaceSettings, WorkspaceStorageAnalytics, WorkspaceStorageKindEntry, WorkspaceSyncSchedule, WorkspaceThread, WorkspaceThreadEntry, WorkspaceThreadEntryPage, WorkspaceThreadEvent, WorkspaceThreadPage, WorkspaceThreadsQuery, WorkspaceUsageAnalytics, WorkspaceWebhook, WorkspaceWebhookCreated, WorkspaceWebhookPage, WorkspaceWebhookResult };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as NvisyError, t as NvisyApiError } from "./errors-
|
|
1
|
+
import { n as NvisyError, t as NvisyApiError } from "./errors-ChRSBkhj.js";
|
|
2
2
|
|
|
3
3
|
//#region src/config.ts
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { n as NvisyError, t as NvisyApiError } from "./errors-D2J3LbE-.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.52.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-Bc6Sg_y-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-
|
|
1
|
+
{"version":3,"file":"error-Bc6Sg_y-.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 {
|
|
1
|
+
import { Mn as ErrorResponse } from "./index-DmLbi0Gi.js";
|
|
2
2
|
//#region src/errors.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Base error class for all Nvisy SDK errors.
|
|
@@ -60,11 +60,6 @@ declare class NvisyApiError extends NvisyError implements ErrorResponse {
|
|
|
60
60
|
* Human-readable error message safe for display to end users.
|
|
61
61
|
*/
|
|
62
62
|
readonly message: string;
|
|
63
|
-
/**
|
|
64
|
-
* The resource type that the error relates to (e.g., "account", "project").
|
|
65
|
-
* May be undefined if the error is not resource-specific.
|
|
66
|
-
*/
|
|
67
|
-
readonly resource?: string;
|
|
68
63
|
/**
|
|
69
64
|
* HTTP status code of the response (e.g., 400, 404, 500).
|
|
70
65
|
*/
|
|
@@ -114,4 +109,4 @@ declare class NvisyApiError extends NvisyError implements ErrorResponse {
|
|
|
114
109
|
}
|
|
115
110
|
//#endregion
|
|
116
111
|
export { NvisyError as n, NvisyApiError as t };
|
|
117
|
-
//# sourceMappingURL=errors-
|
|
112
|
+
//# sourceMappingURL=errors-CcTfWeEE.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors-CcTfWeEE.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"}
|
|
@@ -63,11 +63,6 @@ var NvisyApiError = class extends NvisyError {
|
|
|
63
63
|
*/
|
|
64
64
|
message;
|
|
65
65
|
/**
|
|
66
|
-
* The resource type that the error relates to (e.g., "account", "project").
|
|
67
|
-
* May be undefined if the error is not resource-specific.
|
|
68
|
-
*/
|
|
69
|
-
resource;
|
|
70
|
-
/**
|
|
71
66
|
* HTTP status code of the response (e.g., 400, 404, 500).
|
|
72
67
|
*/
|
|
73
68
|
statusCode;
|
|
@@ -81,7 +76,6 @@ var NvisyApiError = class extends NvisyError {
|
|
|
81
76
|
super(response.message);
|
|
82
77
|
this.name = response.name;
|
|
83
78
|
this.message = response.message;
|
|
84
|
-
this.resource = response.resource;
|
|
85
79
|
this.statusCode = statusCode;
|
|
86
80
|
}
|
|
87
81
|
/**
|
|
@@ -127,12 +121,11 @@ var NvisyApiError = class extends NvisyError {
|
|
|
127
121
|
toJSON() {
|
|
128
122
|
return {
|
|
129
123
|
name: this.name,
|
|
130
|
-
message: this.message
|
|
131
|
-
resource: this.resource
|
|
124
|
+
message: this.message
|
|
132
125
|
};
|
|
133
126
|
}
|
|
134
127
|
};
|
|
135
128
|
|
|
136
129
|
//#endregion
|
|
137
130
|
export { NvisyError as n, NvisyApiError as t };
|
|
138
|
-
//# sourceMappingURL=errors-
|
|
131
|
+
//# sourceMappingURL=errors-ChRSBkhj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors-ChRSBkhj.js","names":[],"sources":["../src/errors.ts"],"sourcesContent":["/**\n * @fileoverview Error types for the Nvisy SDK.\n *\n * This module defines the error hierarchy used throughout the SDK:\n * - {@link NvisyError} - Base error class for all SDK errors\n * - {@link NvisyApiError} - Errors returned by the Nvisy API (4xx/5xx responses)\n *\n * @module errors\n */\n\nimport type { ErrorResponse } from \"@/datatypes/index.js\";\n\n// Re-export ErrorResponse type for convenience\nexport type { ErrorResponse } from \"@/datatypes/index.js\";\n\n/**\n * Base error class for all Nvisy SDK errors.\n *\n * This class provides common functionality for all SDK errors.\n * It ensures proper error naming and stack traces.\n *\n * @example\n * ```typescript\n * try {\n * const client = new Client({ apiToken: \"\" });\n * } catch (error) {\n * if (error instanceof NvisyError) {\n * console.log(\"SDK error:\", error.message);\n * }\n * }\n * ```\n */\nexport class NvisyError extends Error {\n\t/**\n\t * The error class name.\n\t */\n\tpublic readonly name: string;\n\n\t/**\n\t * Creates a new NvisyError.\n\t *\n\t * @param message - The error message\n\t */\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = this.constructor.name;\n\t}\n}\n\n/**\n * Error thrown when the Nvisy API returns an error response.\n *\n * This error class wraps the API's {@link ErrorResponse} format and adds\n * the HTTP status code. It provides helper methods to categorize errors\n * and determine if they are retryable.\n *\n * @example\n * ```typescript\n * try {\n * await client.account.getAccount();\n * } catch (error) {\n * if (error instanceof NvisyApiError) {\n * console.log(`API Error: ${error.message}`);\n * console.log(`Status: ${error.statusCode}`);\n * if (error.isRetryable()) {\n * // Implement retry logic\n * }\n * }\n * }\n * ```\n */\nexport class NvisyApiError extends NvisyError implements ErrorResponse {\n\t/**\n\t * The error type identifier (e.g., \"ValidationError\", \"NotFoundError\").\n\t */\n\tpublic readonly name: string;\n\n\t/**\n\t * Human-readable error message safe for display to end users.\n\t */\n\tpublic readonly message: string;\n\n\t/**\n\t * HTTP status code of the response (e.g., 400, 404, 500).\n\t */\n\tpublic readonly statusCode: number;\n\n\t/**\n\t * Creates a new NvisyApiError from an API error response.\n\t *\n\t * @param response - The error response from the API\n\t * @param statusCode - The HTTP status code of the response\n\t */\n\tconstructor(response: ErrorResponse, statusCode: number) {\n\t\tsuper(response.message);\n\t\tthis.name = response.name;\n\t\tthis.message = response.message;\n\t\tthis.statusCode = statusCode;\n\t}\n\n\t/**\n\t * Checks if this is a client error (4xx status code).\n\t *\n\t * Client errors indicate problems with the request itself, such as\n\t * invalid input, missing authentication, or accessing non-existent resources.\n\t *\n\t * @returns True if the status code is in the 4xx range\n\t */\n\tisClientError(): boolean {\n\t\treturn this.statusCode >= 400 && this.statusCode < 500;\n\t}\n\n\t/**\n\t * Checks if this is a server error (5xx status code).\n\t *\n\t * Server errors indicate problems on the API side. These are typically\n\t * transient and may succeed if retried.\n\t *\n\t * @returns True if the status code is in the 5xx range\n\t */\n\tisServerError(): boolean {\n\t\treturn this.statusCode >= 500;\n\t}\n\n\t/**\n\t * Determines if this error is safe to retry.\n\t *\n\t * An error is considered retryable if it's a server error (5xx),\n\t * a request timeout (408), or rate limiting (429).\n\t *\n\t * @returns True if the request may succeed on retry\n\t */\n\tisRetryable(): boolean {\n\t\treturn (\n\t\t\tthis.statusCode >= 500 || // Server errors\n\t\t\tthis.statusCode === 408 || // Request timeout\n\t\t\tthis.statusCode === 429 // Rate limited\n\t\t);\n\t}\n\n\t/**\n\t * Converts the error to a plain {@link ErrorResponse} object.\n\t *\n\t * Useful for serialization or logging.\n\t *\n\t * @returns A plain object representation of the error\n\t */\n\ttoJSON(): ErrorResponse {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tmessage: this.message,\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgCA,IAAa,aAAb,cAAgC,MAAM;;;;CAIrC,AAAgB;;;;;;CAOhB,YAAY,SAAiB;EAC5B,MAAM,OAAO;EACb,KAAK,OAAO,KAAK,YAAY;CAC9B;AACD;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAa,gBAAb,cAAmC,WAAoC;;;;CAItE,AAAgB;;;;CAKhB,AAAgB;;;;CAKhB,AAAgB;;;;;;;CAQhB,YAAY,UAAyB,YAAoB;EACxD,MAAM,SAAS,OAAO;EACtB,KAAK,OAAO,SAAS;EACrB,KAAK,UAAU,SAAS;EACxB,KAAK,aAAa;CACnB;;;;;;;;;CAUA,gBAAyB;EACxB,OAAO,KAAK,cAAc,OAAO,KAAK,aAAa;CACpD;;;;;;;;;CAUA,gBAAyB;EACxB,OAAO,KAAK,cAAc;CAC3B;;;;;;;;;CAUA,cAAuB;EACtB,OACC,KAAK,cAAc,OACnB,KAAK,eAAe,OACpB,KAAK,eAAe;CAEtB;;;;;;;;CASA,SAAwB;EACvB,OAAO;GACN,MAAM,KAAK;GACX,SAAS,KAAK;EACf;CACD;AACD"}
|