@nivaro/sdk 0.2.5 → 0.2.6

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/dist/index.d.ts CHANGED
@@ -3,8 +3,16 @@ interface Command<TResult> {
3
3
  readonly _path: string;
4
4
  readonly _params?: Record<string, unknown>;
5
5
  readonly _body?: unknown;
6
+ /** Cancels the request when it aborts (never serialized; see withSignal). */
7
+ readonly _signal?: AbortSignal;
6
8
  readonly _phantom?: TResult;
7
9
  }
10
+ /**
11
+ * The same command, cancelled when `signal` aborts — e.g. TanStack Query's queryFn signal, so a
12
+ * report widget whose filters changed stops waiting for the answer to the old filters (the
13
+ * server then drops it from its read queue). Without a signal the command is returned as is.
14
+ */
15
+ declare function withSignal<T>(command: Command<T>, signal: AbortSignal | null | undefined): Command<T>;
8
16
 
9
17
  /**
10
18
  * Administration commands: roles & policies (RBAC/RLS), user management +
@@ -8912,4 +8920,4 @@ declare function submitFormItem(collection: string, values: Record<string, unkno
8912
8920
  data: Record<string, unknown>;
8913
8921
  }>;
8914
8922
 
8915
- export { type AccessAudit, type AccessAuditFinding, type AccessAuditRun, type AccessAuditSubject, type AccessReason, type ActivityEntry, type ActivityQuery, type ActivityReportQuery, type ActivityReportRow, type ActivityReportSummary, type Addendum, type AddendumStatus, type AggregateQuery, type AggregateRow, type AiChatTraceEntry, type AiCollectionSettings, type AiColumnMapping, type AiDuplicateMatch, type AiQueryFilter, type AiQueryResult, type AiReviewFinding, type AiViolation, type AlertDefinition, type AlertLogEntry, type AlertSubscription, type AnomalyDefinition, type AnomalyRule, type ApiAnalyticsBucket, type ApiAnalyticsCollection, type ApiAnalyticsPath, type ApiAnalyticsSummary, type ApiErrorLog, type ApiKey, type ApiKeyScope, type ApprovalBrief, type ApprovalChain, type ApprovalChainStep, type ApprovalDecision, type ApprovalInstance, type ApprovalInstanceDetail, type ApprovalStatus, type ApprovalStepInput, type AtRiskCondition, type AtRiskOp, type AtRiskResult, type AtRiskRule, type AtRiskSummaryEntry, type AttributeDefinition, type AttributeValue, type BatchRead, type BatchReadResult, type BlackoutDate, type BoolFilterOps, type CMSCollection, type CascadeFilterRule, type ChangeOrder, type ChaosWhatIfAnswer, type ChatChannel, type ChatChannelMember, type ChatDirectoryChannel, type ChatMessage, type ChatPin, type ChatReaction, type ChatRoomKind, type ChatRoomSummary, type ChatRoomType, type ChatSearchHit, type CollectionLayout, type CollectionLayoutType, type CollectionPresetSummary, type Command, type Comment, type CommentVersion, type ConfigSnapshot, type ConfigTableClassification, type ContentBundle, type ContentExportFormat, type ContentExportOptions, type CoverageGapItem, type CoverageGapOwner, type CoverageGapReport, type CpuProfileSummary, type CronJob, type CustomQuery, type CustomQueryCatalogEntry, type Dashboard, type DashboardFilter, type DashboardWidget, type DashboardWidgetData, type DashboardWidgetType, type DataQualityRule, type DataQualityRuleResult, type DataQualityRuleType, type DataQualityRun, type DataQualitySeverity, type DeadLetter, type DmvResult, type DraftPublishConfig, type DraftStatus, type DryRunReport, EDITOR_NOTE_MAX, type ErpSubmission, type ErpSubmissionStatus, type ExpensiveStatement, type ExtensionManifest, type ExternalApi, type ExternalApiEndpoint, type ExternalApiSchema, type ExternalApiSlotContext, type ExternalApiSpecImportResult, type ExternalApiTestResult, type FieldChangeEntry, type FieldCondition, type FieldConfig, type FieldDependencyConfig, type FieldFilter, type FieldGroup, type FieldTranslations, type FieldVisibilityRules, type FieldWatch, type FileRecord, type FileUploadResult, type FileUsageEntry, type Filter, type FlowReplayResult, type FlowRun, type FlowTestStep, type FormFieldDescriptor, type FormFieldRelation, type FormGroupDescriptor, type FormLockCondition, type FormSchema, type FormValidationRule, type FormVisibilityRule, GROUP_PATCH_KEYS, type GlobalSearchRecord, type GlobalSearchResults, type GraphQLResponse, type GroupPatch, type GroupRow, type HealthDetailed, type HelpVideo, type HelpVideoClick, type HelpVideoContext, type HelpVideoDownloadUrls, type HelpVideoFinalizedUpload, type HelpVideoProgress, type HelpVideoUploadSession, type HelpVideoVersion, type HelpVideoVisibility, type HelpVideoWalkStep, type HelpVideoWhatsNew, type HierarchyConfigDef, type HierarchyFlatNode, type HierarchyLevelDef, type HierarchyNestedNode, type IDFilterOps, type ISODate, type ImportDefinition, type ImportJob, type ImportParseResponse, type ImportPreview, type ImportPreviewDiff, type ImportTemplateSummary, type InfrastructureSummaryTool, type InstanceOwner, type InstanceToolEntry, type IntegrationApiHealth, type InternalWidget, type Issue, type IssueSeverity, type IssueStatus, type IssueSummary, type ItemLock, type ItemWriteMeta, type JobRegistryCron, type JobRun, LAYOUT_PATCH_KEYS, type LastTouch, type LayoutAssignment, type LayoutBundle, type LayoutDescription, type LayoutFieldExplanation, type LayoutGroup, type LayoutOp, type LayoutOverviewRow, type LayoutPatch, type LayoutPickReason, type LayoutProposal, type LayoutRow, type LayoutVersion, type ListResponse, type ManagedUser, type McpCapabilities, type McpToolsConfig, type MetricAlertRule, type MetricAlertSubscription, type MetricDefinition, type MyTask, type MyWorkOwnedEntry, type MyWorkSla, type MyWorkSummary, type NamedMcpToolConfig, type NivaroClient, type NivaroClientOptions, type NivaroExtensionPlugin, type NivaroRealtime, type NivaroRuntime, type NotificationItem, type NotificationPage, type NotificationSubscription, type NumberFilterOps, type OmniSearchHit, type OnlinePresenceConfig, type OnlinePresenceUser, PLACEMENT_PATCH_KEYS, type Page, type PageLayout, type PageSlotKey, type PageWidget, type PdfTemplate, type PermissionSimulation, type PersistedQuery, type PickerExclusionStatus, type PipelineFlowEdge, type PipelineFlowState, type PipelineImpactResult, type PipelineOwnerGroup, type PipelineOwnerGroupUser, type PipelineSimulation, type PipelineState, type PipelineVersionEntry, type PlacementKey, type PlacementPatch, type PlacementRow, type PluginSlots, type Policy, type PoolStats, type PreflightCheck, type PreflightReport, type PreflightSeverity, type PresenceClient, type PresenceOptions, type PresenceSession, type PresenceSessionInfo, type PresenceViewer, type ProjectedPlacement, type PromotionApplyResult, type PromotionPreview, type Query, type Queue, type QueueColumnPrefs, type QueueCondition, type QueueDetail, type QueueDisplayConfig, type QueueItem, type QueueItemsResult, type QueueOwner, type QueueRowClickMode, type QueueScope, type QueueSource, type QueueSourceType, type QueueStats, type QueueTrendPoint, type QueueView, type QueueViewKind, type QueueWorkloadRow, READ_MANY_MAX, type ReadyReport, type RealtimeEvent, type RecordGraphEdge, type RecordGraphNode, type RecordLink, type RecordLinkType, type RecordTemplate, type RecordViewRecap, type RegisteredAction, type RelatedCommentEntry, type RelationFilter, type RelationOption, type ReportAlert, type ReportAlertCondition, type ReportAlertLogEntry, type ReportAnnotation, type ReportColumnFormat, type ReportDateRange, type ReportDef, type ReportEntityFilter, type ReportFilterPreset, type ReportQueryColumn, type ReportQueryWidgetConfig, type ReportSnapshotEntry, type ReportSubscription, type ReportTemplateEntry, type ReportVersionEntry, type ReportWidget, type ReportWidgetConfig, type ReportWidgetData, type ReportWidgetPreset, type ReportWidgetType, type RequestTrace, type ResolvedOwner, type RetentionPolicy, type RetentionRun, type RetentionRunResult, type Revision, type Role, type Rule, type RuntimeStats, type SavedView, type ScheduledChange, type ScheduledReport, type ScopeDimension, type ScopeDimensionInfo, type SemanticSearchMatch, type SessionRecording, type SessionReplayMasking, type ShareLink, type SlaBatchStatus, type SlaRule, type SlaStatus, type StagedImportRun, type StagedImportStats, type StringFilterOps, type SubRow, type SubRowTemplate, type SupportTicket, type SupportTicketDetail, type SupportTicketStatus, type SyncJob, type Task, type TaskDoneWhenRule, type TaskPriority, type TaskStatus, type TimelineEvent, type TraceSpan, type TrafficSnapshot, type TrafficSnapshotEntity, type TreeFlatNode, type TreeNestedNode, type TreeNodeConfig, type TreePermission, type TreePermissionAction, type UUID, type UserActivityEntry, type UserActivitySummary, type UserScopesInfo, type ViewSubscription, type VirtualCollection, type Webhook, type WebhookDelivery, type WhichLayoutForm, type WidgetFeed, type WorkflowBinding, type WorkflowHistoryEntry, type WorkflowInstance, type WorkflowInstanceData, type WorkflowState, type WorkflowTransition, type Workspace, type WorkspaceQuotas, type WorkspaceTemplate, type WorkspaceUsage, _and, _contains, _ends_with, _eq, _gt, _gte, _in, _lt, _lte, _ncontains, _neq, _nin, _nnull, _none, _null, _or, _some, _starts_with, abandonHelpVideoUpload, acquireItemLock, activateLayout, addChatChannelMember, addInstanceOwner, addSubRow, aggregateItems, aiBrief, aiBuildReport, aiChat, aiCheckDuplicates, aiGenerate, aiMapColumns, aiQuery, aiReportFilters, aiReview, aiSummarize, aiValidate, appendSessionRecordingEvents, applyContentBundle, applyHelpVideoPackageImport, applyRecordTemplate, applySubRowTemplate, approveAddendum, approveAiProposal, archiveHelpVideo, asc, backupExportPath, batchPickerExclusionStatus, bulkPickerExclusion, callExternalApi, callExternalApiEndpoint, callInstanceTool, cancelScheduledChange, cancelStagedImport, captureCpuProfile, cascadeFieldDependencies, chaosWhatIf, checkBlackoutDate, claimQueueItem, claimSupportTicket, claimTask, clearTraces, cloneItem, cloneLayout, cloneReport, compareConfigSnapshot, completeTask, copyReportWidget, createAccessAudit, createAddendum, createAlertDefinition, createAlertSubscription, createAnomalyRule, createApiKey, createApprovalChain, createAtRiskRule, createAttributeDefinition, createBlackoutDate, createChatChannel, createChatRoomType, createCollectionLayout, createComment, createDataQualityRule, createExternalApi, createExternalApiEndpoint, createFieldGroup, createFieldWatch, createGroupDm, createHelpVideo, createHierarchyConfig, createImportDefinition, createImportJob, createImportJobFromUrl, createInternalWidget, createIssue, createItem, createMetricAlertRule, createNivaro, createNotification, createNotificationSubscription, createPage, createPdfTemplate, createPersistedQuery, createPresence, createQueue, createQueueView, createRealtime, createRecordLink, createRecordTemplate, createReport, createReportAlert, createReportAnnotation, createReportFromTemplate, createReportSnapshot, createReportWidgetPreset, createRetentionPolicy, createRole, createRolePolicy, createRule, createSavedView, createScheduledChange, createScheduledReport, createShareLink, createSlaRule, createSubRowTemplate, createSyncJob, createTask, createTreePermission, createUser, createViewSubscription, createVirtualCollection, createWebhook, createWidgetFeed, createWorkspace, createWorkspaceTemplate, decideApproval, deleteAccessAudit, deleteAddendum, deleteAlertDefinition, deleteAlertSubscription, deleteAnomalyRule, deleteApiKey, deleteApprovalChain, deleteAtRiskRule, deleteAttributeDefinition, deleteBlackoutDate, deleteChatMessage, deleteCollectionLayout, deleteComment, deleteDataQualityRule, deleteExternalApi, deleteExternalApiEndpoint, deleteExternalApiSchema, deleteFieldGroup, deleteFieldTranslations, deleteFieldWatch, deleteFile, deleteHierarchyConfig, deleteImportJob, deleteInternalWidget, deleteIssue, deleteItem, deleteMetricAlertRule, deleteNotification, deleteNotificationSubscription, deletePage, deletePdfTemplate, deletePersistedQuery, deleteQueue, deleteQueueView, deleteRecordLink, deleteRecordTemplate, deleteReport, deleteReportAlert, deleteReportAnnotation, deleteReportFilterPreset, deleteReportSnapshot, deleteReportTemplate, deleteReportWidgetPreset, deleteRetentionPolicy, deleteRole, deleteRolePolicy, deleteRule, deleteSavedView, deleteScheduledReport, deleteSessionRecording, deleteSlaRule, deleteSubRow, deleteSubRowTemplate, deleteSyncJob, deleteTask, deleteTreePermission, deleteUser, deleteViewSubscription, deleteVirtualCollection, deleteWebhook, deleteWidgetFeed, deleteWorkspace, deleteWorkspaceTemplate, deployImportProcedure, desc, describeLayoutForm, diffLayoutVersion, disableTwoFactor, discardHelpVideoPackageImport, drillReportRow, editChatMessage, endSessionRecording, evaluateAlerts, evaluateAtRisk, evaluateFieldDefaults, evaluateFieldLock, evaluateFieldRules, evaluateFieldVisibility, excludeFromPicker, excludeFromPickers, executeBulkAction, executeCustomQuery, executeImportTemplate, executeItemAction, executeScheduledChange, explainLayout, explainLayoutField, explainRecordAccess, explainReportTrend, exportBlueprint, exportConfigSnapshot, exportContent, exportContentBundle, exportHelpVideoPackage, exportSchemaSnapshot, fetchFormSchema, fileDownloadPath, fileTransformPath, finalizeHelpVideoUpload, generateToken, generateUserToken, getAlertDefinition, getAttributeValues, getBrunoCollection, getCommentHistory, getExternalApi, getExternalApiEndpoint, getFieldTranslations, getFlowRun, getLocales, getOpenApi, getPickerExclusionStatus, getPostmanCollection, getPresence, getRetentionPolicy, getSlaRule, getSlaStatus, getTranslations, getTypes, getWebhook, globalSearch, heartbeatItemLock, helpVideosFor, importExternalApiSpec, importSchemaSnapshot, includeInPicker, includeInPickers, installBlueprint, installCollectionPreset, invokeInternalWidgetAction, isPageSlot, joinChatRoom, leaveChatRoom, listAccessAuditRuns, listAccessAudits, listActiveAtRiskRules, listActivePresence, listAddendums, listAlertDefinitions, listAlertSubscriptions, listAllNotificationSubscriptions, listAnomalyDefinitions, listAnomalyRules, listApiKeys, listApprovalChains, listApprovalInstances, listAtRiskRules, listAttributeDefinitions, listBlackoutDates, listBulkActions, listChangeOrders, listChatChannelMembers, listChatMessages, listChatPins, listChatRoles, listChatRoomTypes, listChatRooms, listCollectionPresets, listCollectionRecordTemplates, listComments, listCronJobs, listCustomQueries, listCustomQueryCatalog, listDashboards, listDataQualityRules, listDataQualityRuns, listDeadLetters, listExternalApiEndpoints, listExternalApiSchemas, listExternalApis, listFieldGroups, listFieldWatches, listFiles, listFlowRuns, listHelpVideoPages, listHelpVideoVersions, listHelpVideos, listHierarchyConfigs, listImportDefinitionVersions, listImportDefinitions, listImportJobs, listImportTemplates, listInstanceTools, listInternalWidgetPlacements, listInternalWidgets, listIssues, listItemActions, listItemScheduledChanges, listJobRuns, listLayoutVersions, listMetricAlertRules, listMetricAlertSubscriptions, listMetricDefinitions, listMyHelpVideoUploads, listMyTasks, listNotificationSubscriptions, listNotifications, listOrphanFiles, listPages, listPdfTemplates, listPersistedQueries, listPinnedItems, listPipelineVersions, listQueueViews, listQueues, listRecordLinks, listRecordTemplates, listRegisteredExtensions, listRegisteredFlowOperations, listRegisteredFlowTriggers, listRelatedComments, listReportAlerts, listReportAnnotations, listReportFilterPresets, listReportSnapshots, listReportTemplates, listReportVersions, listReportWidgetPresets, listReports, listRequestedTasks, listRetentionPolicies, listRetentionRuns, listRolePolicies, listRoleUsers, listRoles, listRules, listSavedViews, listScheduledChanges, listScheduledReports, listScopeDimensions, listSessionRecordings, listShareLinks, listSlaRules, listStagedImports, listSubRowTemplates, listSubRows, listSupportTickets, listSyncJobs, listTasks, listTeamTasks, listThroughputCollections, listTraces, listTreePermissions, listViewSubscriptions, listVirtualCollections, listWebhookDeliveries, listWebhooks, listWidgetFeeds, listWorkspaceTemplates, listWorkspaces, markAllNotificationsRead, markChatRoomRead, markNotificationRead, markNotificationsRead, moveTreeNode, nudgeTask, omniSearch, openHelpVideoPackageImport, openHelpVideoUpload, presignFileUpload, previewContentBundle, previewHelpVideoPackageImport, previewImportJob, previewReportWidget, projectFieldConfig, proposeLayoutOps, publishHelpVideo, publishItem, queryVirtualCollection, readAccessAuditFindings, readActiveLayout, readActivity, readActivityReportSummary, readAddendum, readAiSettings, readAlertLog, readAllStateOwners, readAnomalyLog, readApiAnalyticsErrors, readApiAnalyticsSummary, readApiAnalyticsTimeseries, readApiAnalyticsTopCollections, readApiAnalyticsTopPaths, readApiKey, readApprovalBrief, readApprovalChain, readAtRiskSummary, readBackupManifest, readChatConfig, readChatDirectory, readChatPeerRead, readCollection, readCollectionLayout, readCollectionLayouts, readCollections, readConfigInventory, readCoverageGaps, readDashboard, readDashboardWidgetData, readDataQualityRun, readDbPool, readDetailLayout, readDistinctValues, readDraftPublishConfig, readErpSubmissionHistory, readExpensiveSql, readFieldChangeHistory, readFieldConfig, readFieldImpact, readFieldWatch, readFileMeta, readFileUsage, readFilesByIds, readHealthDetailed, readHelpVideo, readHelpVideoAnalytics, readHelpVideoDownloadLink, readHelpVideoDraft, readHelpVideoWalk, readHierarchyConfig, readHierarchyNodeAncestors, readHierarchyNodeChildren, readHierarchyNodes, readHierarchyTree, readImportJob, readImportProcedure, readInfrastructureSummary, readInstanceOwners, readInstanceRoster, readIntegrationHealth, readInternalWidget, readIssue, readIssueSummary, readItem, readItemLock, readItemLockConfig, readItems, readJobRegistry, readLastTouch, readLayoutAssignments, readLayoutBundle, readLayoutDrift, readLayoutGroups, readLayoutOverview, readLayoutProposals, readLayoutVersion, readMany, readMcpCapabilities, readMcpToolsConfig, readMe, readMetricAlertLog, readMyScopes, readMyWork, readNotificationCount, readNotificationSubscriptionStats, readOnlinePresence, readOwnerGroups, readPage, readPageWidgetData, readPdfTemplate, readPersistedQuery, readPickerExclusion, readPickerExclusions, readPipelineFlowMap, readPipelineReplay, readPipelineTemplate, readPipelineTemplates, readPipelineVersion, readPreflight, readQueue, readQueueCollectionStates, readQueueColumnPrefs, readQueueItems, readQueueTrends, readQueueWorkload, readReadiness, readRecordGraph, readRelationOptions, readReport, readReportAlertLog, readReportAlertsLog, readReportFilterOptions, readReportFiring, readReportSnapshot, readReportSubscription, readReportUsage, readReportWidgetData, readRequiredHelpVideos, readRevision, readRevisions, readRole, readRuntimeStats, readScopeDimensionCoverage, readSessionRecordingEvents, readSettings, readSingleton, readSlaStatusBatch, readStagedImport, readStagedImportStats, readStateOwnerGroups, readStateOwners, readStateOwnersBatch, readSupportTicket, readSyncJob, readTask, readTaskCounts, readTaskHistory, readThroughputReport, readTimeline, readTrace, readTrafficSnapshot, readTreeAncestors, readTreeChildren, readTreeConfig, readTreeDescendants, readTreeNested, readTreeNodes, readTwoFactorStatus, readUnreadNotificationCount, readUser, readUserActivity, readUserActivitySummary, readUserCard, readUserScopes, readUsers, readWorkflowBindings, readWorkflowInstance, readWorkflowInstances, readWorkspace, readWorkspaceUsage, rebuildTreePaths, recordHelpVideoProgress, registerHelpVideoPage, rehearseCreateItem, reindexSemanticSearch, rejectAddendum, rejectAiProposal, releaseItemLock, releaseQueueItem, rematerializeQueue, removeChatChannelMember, removeInstanceOwner, renderInternalWidget, renderPdfTemplate, reorderFieldGroups, reorderSubRows, reorderTreeSiblings, replaceSubRows, replayActivityEvent, replayFlow, replySupportTicket, reportClientError, requestRecordAccess, requeueStagedImport, rerecordHelpVideo, rerenderHelpVideo, resetReportCache, resolveLayoutProposal, resolveReportAlert, restoreHelpVideoVersion, restoreImportDefinitionVersion, restoreLayoutVersion, restorePipelineVersion, restoreReportVersion, retryDeadLetter, retryErpSubmission, retryWebhookDelivery, revokeApiKey, revokeShareLink, revokeToken, revokeUserToken, rollbackRevision, rotateWidgetFeedToken, runAccessAudit, runActivityReport, runActivityReportCsv, runCronJob, runDataQuality, runRetentionPolicy, runScheduledReport, runSyncJob, saveHelpVideoDraft, saveMcpToolsConfig, saveMyScopeDefaults, saveReportFilterPreset, saveReportTemplate, saveReportWidgets, saveUserScope, searchChatMessages, semanticSearch, sendBulkNotification, sendChatMessage, sendTestMail, sessionRecordingEnabled, setHelpVideoContexts, setHelpVideoRequirements, setMyDelegate, setQueueDefaultView, setReportSubscription, setSupportTicketStatus, setTranslations, setupTwoFactor, simulatePermissions, simulatePipeline, simulatePipelineImpact, startApproval, startMasquerade, startSessionRecording, startWorkflow, stopMasquerade, submitAddendum, submitFormItem, submitItemForReview, submitLayoutOps, submitToErp, subscribeFieldWatch, subscribeMetricAlert, suggestImportValidation, suggestQueueLabels, switchWorkspace, testExternalApi, testFlow, testWebhook, toggleChatPin, toggleChatReaction, togglePinnedItem, toggleReportAlert, touchRecordView, transitionWorkflow, unpublishHelpVideo, unpublishItem, unsubscribeFieldWatch, unsubscribeMetricAlert, updateAccessAudit, updateAddendum, updateAiSettings, updateAlertDefinition, updateAnomalyLogEntry, updateAnomalyRule, updateApiKey, updateApprovalChain, updateAtRiskRule, updateAttributeDefinition, updateAttributeValues, updateChatChannel, updateChatRoom, updateChatRoomType, updateCollectionLayout, updateComment, updateDataQualityRule, updateDraftPublishConfig, updateErpSubmissionStatus, updateExternalApi, updateExternalApiEndpoint, updateFieldConfig, updateFieldGroup, updateFieldWatch, updateFileMeta, updateHelpVideo, updateHierarchyConfig, updateImportDefinition, updateInternalWidget, updateIssue, updateItem, updateItemLockConfig, updateLayoutAssignments, updateLayoutUngroupedSort, updateMe, updateMetricAlertRule, updateMetricAlertSubscription, updateNotificationSubscription, updatePage, updatePdfTemplate, updatePersistedQuery, updateQueue, updateQueueSources, updateQueueView, updateRecordTemplate, updateReport, updateReportAlert, updateReportWidgetPreset, updateRetentionPolicy, updateRole, updateRolePolicy, updateRoleUiPermissions, updateRule, updateSavedView, updateScheduledReport, updateSettings, updateSingleton, updateSlaRule, updateSyncJob, updateTask, updateTreePermission, updateUser, updateVirtualCollection, updateWebhook, updateWidgetFeed, updateWorkflowBinding, updateWorkspace, validateVirtualCollectionSql, verifyTwoFactor, whichLayoutForm };
8923
+ export { type AccessAudit, type AccessAuditFinding, type AccessAuditRun, type AccessAuditSubject, type AccessReason, type ActivityEntry, type ActivityQuery, type ActivityReportQuery, type ActivityReportRow, type ActivityReportSummary, type Addendum, type AddendumStatus, type AggregateQuery, type AggregateRow, type AiChatTraceEntry, type AiCollectionSettings, type AiColumnMapping, type AiDuplicateMatch, type AiQueryFilter, type AiQueryResult, type AiReviewFinding, type AiViolation, type AlertDefinition, type AlertLogEntry, type AlertSubscription, type AnomalyDefinition, type AnomalyRule, type ApiAnalyticsBucket, type ApiAnalyticsCollection, type ApiAnalyticsPath, type ApiAnalyticsSummary, type ApiErrorLog, type ApiKey, type ApiKeyScope, type ApprovalBrief, type ApprovalChain, type ApprovalChainStep, type ApprovalDecision, type ApprovalInstance, type ApprovalInstanceDetail, type ApprovalStatus, type ApprovalStepInput, type AtRiskCondition, type AtRiskOp, type AtRiskResult, type AtRiskRule, type AtRiskSummaryEntry, type AttributeDefinition, type AttributeValue, type BatchRead, type BatchReadResult, type BlackoutDate, type BoolFilterOps, type CMSCollection, type CascadeFilterRule, type ChangeOrder, type ChaosWhatIfAnswer, type ChatChannel, type ChatChannelMember, type ChatDirectoryChannel, type ChatMessage, type ChatPin, type ChatReaction, type ChatRoomKind, type ChatRoomSummary, type ChatRoomType, type ChatSearchHit, type CollectionLayout, type CollectionLayoutType, type CollectionPresetSummary, type Command, type Comment, type CommentVersion, type ConfigSnapshot, type ConfigTableClassification, type ContentBundle, type ContentExportFormat, type ContentExportOptions, type CoverageGapItem, type CoverageGapOwner, type CoverageGapReport, type CpuProfileSummary, type CronJob, type CustomQuery, type CustomQueryCatalogEntry, type Dashboard, type DashboardFilter, type DashboardWidget, type DashboardWidgetData, type DashboardWidgetType, type DataQualityRule, type DataQualityRuleResult, type DataQualityRuleType, type DataQualityRun, type DataQualitySeverity, type DeadLetter, type DmvResult, type DraftPublishConfig, type DraftStatus, type DryRunReport, EDITOR_NOTE_MAX, type ErpSubmission, type ErpSubmissionStatus, type ExpensiveStatement, type ExtensionManifest, type ExternalApi, type ExternalApiEndpoint, type ExternalApiSchema, type ExternalApiSlotContext, type ExternalApiSpecImportResult, type ExternalApiTestResult, type FieldChangeEntry, type FieldCondition, type FieldConfig, type FieldDependencyConfig, type FieldFilter, type FieldGroup, type FieldTranslations, type FieldVisibilityRules, type FieldWatch, type FileRecord, type FileUploadResult, type FileUsageEntry, type Filter, type FlowReplayResult, type FlowRun, type FlowTestStep, type FormFieldDescriptor, type FormFieldRelation, type FormGroupDescriptor, type FormLockCondition, type FormSchema, type FormValidationRule, type FormVisibilityRule, GROUP_PATCH_KEYS, type GlobalSearchRecord, type GlobalSearchResults, type GraphQLResponse, type GroupPatch, type GroupRow, type HealthDetailed, type HelpVideo, type HelpVideoClick, type HelpVideoContext, type HelpVideoDownloadUrls, type HelpVideoFinalizedUpload, type HelpVideoProgress, type HelpVideoUploadSession, type HelpVideoVersion, type HelpVideoVisibility, type HelpVideoWalkStep, type HelpVideoWhatsNew, type HierarchyConfigDef, type HierarchyFlatNode, type HierarchyLevelDef, type HierarchyNestedNode, type IDFilterOps, type ISODate, type ImportDefinition, type ImportJob, type ImportParseResponse, type ImportPreview, type ImportPreviewDiff, type ImportTemplateSummary, type InfrastructureSummaryTool, type InstanceOwner, type InstanceToolEntry, type IntegrationApiHealth, type InternalWidget, type Issue, type IssueSeverity, type IssueStatus, type IssueSummary, type ItemLock, type ItemWriteMeta, type JobRegistryCron, type JobRun, LAYOUT_PATCH_KEYS, type LastTouch, type LayoutAssignment, type LayoutBundle, type LayoutDescription, type LayoutFieldExplanation, type LayoutGroup, type LayoutOp, type LayoutOverviewRow, type LayoutPatch, type LayoutPickReason, type LayoutProposal, type LayoutRow, type LayoutVersion, type ListResponse, type ManagedUser, type McpCapabilities, type McpToolsConfig, type MetricAlertRule, type MetricAlertSubscription, type MetricDefinition, type MyTask, type MyWorkOwnedEntry, type MyWorkSla, type MyWorkSummary, type NamedMcpToolConfig, type NivaroClient, type NivaroClientOptions, type NivaroExtensionPlugin, type NivaroRealtime, type NivaroRuntime, type NotificationItem, type NotificationPage, type NotificationSubscription, type NumberFilterOps, type OmniSearchHit, type OnlinePresenceConfig, type OnlinePresenceUser, PLACEMENT_PATCH_KEYS, type Page, type PageLayout, type PageSlotKey, type PageWidget, type PdfTemplate, type PermissionSimulation, type PersistedQuery, type PickerExclusionStatus, type PipelineFlowEdge, type PipelineFlowState, type PipelineImpactResult, type PipelineOwnerGroup, type PipelineOwnerGroupUser, type PipelineSimulation, type PipelineState, type PipelineVersionEntry, type PlacementKey, type PlacementPatch, type PlacementRow, type PluginSlots, type Policy, type PoolStats, type PreflightCheck, type PreflightReport, type PreflightSeverity, type PresenceClient, type PresenceOptions, type PresenceSession, type PresenceSessionInfo, type PresenceViewer, type ProjectedPlacement, type PromotionApplyResult, type PromotionPreview, type Query, type Queue, type QueueColumnPrefs, type QueueCondition, type QueueDetail, type QueueDisplayConfig, type QueueItem, type QueueItemsResult, type QueueOwner, type QueueRowClickMode, type QueueScope, type QueueSource, type QueueSourceType, type QueueStats, type QueueTrendPoint, type QueueView, type QueueViewKind, type QueueWorkloadRow, READ_MANY_MAX, type ReadyReport, type RealtimeEvent, type RecordGraphEdge, type RecordGraphNode, type RecordLink, type RecordLinkType, type RecordTemplate, type RecordViewRecap, type RegisteredAction, type RelatedCommentEntry, type RelationFilter, type RelationOption, type ReportAlert, type ReportAlertCondition, type ReportAlertLogEntry, type ReportAnnotation, type ReportColumnFormat, type ReportDateRange, type ReportDef, type ReportEntityFilter, type ReportFilterPreset, type ReportQueryColumn, type ReportQueryWidgetConfig, type ReportSnapshotEntry, type ReportSubscription, type ReportTemplateEntry, type ReportVersionEntry, type ReportWidget, type ReportWidgetConfig, type ReportWidgetData, type ReportWidgetPreset, type ReportWidgetType, type RequestTrace, type ResolvedOwner, type RetentionPolicy, type RetentionRun, type RetentionRunResult, type Revision, type Role, type Rule, type RuntimeStats, type SavedView, type ScheduledChange, type ScheduledReport, type ScopeDimension, type ScopeDimensionInfo, type SemanticSearchMatch, type SessionRecording, type SessionReplayMasking, type ShareLink, type SlaBatchStatus, type SlaRule, type SlaStatus, type StagedImportRun, type StagedImportStats, type StringFilterOps, type SubRow, type SubRowTemplate, type SupportTicket, type SupportTicketDetail, type SupportTicketStatus, type SyncJob, type Task, type TaskDoneWhenRule, type TaskPriority, type TaskStatus, type TimelineEvent, type TraceSpan, type TrafficSnapshot, type TrafficSnapshotEntity, type TreeFlatNode, type TreeNestedNode, type TreeNodeConfig, type TreePermission, type TreePermissionAction, type UUID, type UserActivityEntry, type UserActivitySummary, type UserScopesInfo, type ViewSubscription, type VirtualCollection, type Webhook, type WebhookDelivery, type WhichLayoutForm, type WidgetFeed, type WorkflowBinding, type WorkflowHistoryEntry, type WorkflowInstance, type WorkflowInstanceData, type WorkflowState, type WorkflowTransition, type Workspace, type WorkspaceQuotas, type WorkspaceTemplate, type WorkspaceUsage, _and, _contains, _ends_with, _eq, _gt, _gte, _in, _lt, _lte, _ncontains, _neq, _nin, _nnull, _none, _null, _or, _some, _starts_with, abandonHelpVideoUpload, acquireItemLock, activateLayout, addChatChannelMember, addInstanceOwner, addSubRow, aggregateItems, aiBrief, aiBuildReport, aiChat, aiCheckDuplicates, aiGenerate, aiMapColumns, aiQuery, aiReportFilters, aiReview, aiSummarize, aiValidate, appendSessionRecordingEvents, applyContentBundle, applyHelpVideoPackageImport, applyRecordTemplate, applySubRowTemplate, approveAddendum, approveAiProposal, archiveHelpVideo, asc, backupExportPath, batchPickerExclusionStatus, bulkPickerExclusion, callExternalApi, callExternalApiEndpoint, callInstanceTool, cancelScheduledChange, cancelStagedImport, captureCpuProfile, cascadeFieldDependencies, chaosWhatIf, checkBlackoutDate, claimQueueItem, claimSupportTicket, claimTask, clearTraces, cloneItem, cloneLayout, cloneReport, compareConfigSnapshot, completeTask, copyReportWidget, createAccessAudit, createAddendum, createAlertDefinition, createAlertSubscription, createAnomalyRule, createApiKey, createApprovalChain, createAtRiskRule, createAttributeDefinition, createBlackoutDate, createChatChannel, createChatRoomType, createCollectionLayout, createComment, createDataQualityRule, createExternalApi, createExternalApiEndpoint, createFieldGroup, createFieldWatch, createGroupDm, createHelpVideo, createHierarchyConfig, createImportDefinition, createImportJob, createImportJobFromUrl, createInternalWidget, createIssue, createItem, createMetricAlertRule, createNivaro, createNotification, createNotificationSubscription, createPage, createPdfTemplate, createPersistedQuery, createPresence, createQueue, createQueueView, createRealtime, createRecordLink, createRecordTemplate, createReport, createReportAlert, createReportAnnotation, createReportFromTemplate, createReportSnapshot, createReportWidgetPreset, createRetentionPolicy, createRole, createRolePolicy, createRule, createSavedView, createScheduledChange, createScheduledReport, createShareLink, createSlaRule, createSubRowTemplate, createSyncJob, createTask, createTreePermission, createUser, createViewSubscription, createVirtualCollection, createWebhook, createWidgetFeed, createWorkspace, createWorkspaceTemplate, decideApproval, deleteAccessAudit, deleteAddendum, deleteAlertDefinition, deleteAlertSubscription, deleteAnomalyRule, deleteApiKey, deleteApprovalChain, deleteAtRiskRule, deleteAttributeDefinition, deleteBlackoutDate, deleteChatMessage, deleteCollectionLayout, deleteComment, deleteDataQualityRule, deleteExternalApi, deleteExternalApiEndpoint, deleteExternalApiSchema, deleteFieldGroup, deleteFieldTranslations, deleteFieldWatch, deleteFile, deleteHierarchyConfig, deleteImportJob, deleteInternalWidget, deleteIssue, deleteItem, deleteMetricAlertRule, deleteNotification, deleteNotificationSubscription, deletePage, deletePdfTemplate, deletePersistedQuery, deleteQueue, deleteQueueView, deleteRecordLink, deleteRecordTemplate, deleteReport, deleteReportAlert, deleteReportAnnotation, deleteReportFilterPreset, deleteReportSnapshot, deleteReportTemplate, deleteReportWidgetPreset, deleteRetentionPolicy, deleteRole, deleteRolePolicy, deleteRule, deleteSavedView, deleteScheduledReport, deleteSessionRecording, deleteSlaRule, deleteSubRow, deleteSubRowTemplate, deleteSyncJob, deleteTask, deleteTreePermission, deleteUser, deleteViewSubscription, deleteVirtualCollection, deleteWebhook, deleteWidgetFeed, deleteWorkspace, deleteWorkspaceTemplate, deployImportProcedure, desc, describeLayoutForm, diffLayoutVersion, disableTwoFactor, discardHelpVideoPackageImport, drillReportRow, editChatMessage, endSessionRecording, evaluateAlerts, evaluateAtRisk, evaluateFieldDefaults, evaluateFieldLock, evaluateFieldRules, evaluateFieldVisibility, excludeFromPicker, excludeFromPickers, executeBulkAction, executeCustomQuery, executeImportTemplate, executeItemAction, executeScheduledChange, explainLayout, explainLayoutField, explainRecordAccess, explainReportTrend, exportBlueprint, exportConfigSnapshot, exportContent, exportContentBundle, exportHelpVideoPackage, exportSchemaSnapshot, fetchFormSchema, fileDownloadPath, fileTransformPath, finalizeHelpVideoUpload, generateToken, generateUserToken, getAlertDefinition, getAttributeValues, getBrunoCollection, getCommentHistory, getExternalApi, getExternalApiEndpoint, getFieldTranslations, getFlowRun, getLocales, getOpenApi, getPickerExclusionStatus, getPostmanCollection, getPresence, getRetentionPolicy, getSlaRule, getSlaStatus, getTranslations, getTypes, getWebhook, globalSearch, heartbeatItemLock, helpVideosFor, importExternalApiSpec, importSchemaSnapshot, includeInPicker, includeInPickers, installBlueprint, installCollectionPreset, invokeInternalWidgetAction, isPageSlot, joinChatRoom, leaveChatRoom, listAccessAuditRuns, listAccessAudits, listActiveAtRiskRules, listActivePresence, listAddendums, listAlertDefinitions, listAlertSubscriptions, listAllNotificationSubscriptions, listAnomalyDefinitions, listAnomalyRules, listApiKeys, listApprovalChains, listApprovalInstances, listAtRiskRules, listAttributeDefinitions, listBlackoutDates, listBulkActions, listChangeOrders, listChatChannelMembers, listChatMessages, listChatPins, listChatRoles, listChatRoomTypes, listChatRooms, listCollectionPresets, listCollectionRecordTemplates, listComments, listCronJobs, listCustomQueries, listCustomQueryCatalog, listDashboards, listDataQualityRules, listDataQualityRuns, listDeadLetters, listExternalApiEndpoints, listExternalApiSchemas, listExternalApis, listFieldGroups, listFieldWatches, listFiles, listFlowRuns, listHelpVideoPages, listHelpVideoVersions, listHelpVideos, listHierarchyConfigs, listImportDefinitionVersions, listImportDefinitions, listImportJobs, listImportTemplates, listInstanceTools, listInternalWidgetPlacements, listInternalWidgets, listIssues, listItemActions, listItemScheduledChanges, listJobRuns, listLayoutVersions, listMetricAlertRules, listMetricAlertSubscriptions, listMetricDefinitions, listMyHelpVideoUploads, listMyTasks, listNotificationSubscriptions, listNotifications, listOrphanFiles, listPages, listPdfTemplates, listPersistedQueries, listPinnedItems, listPipelineVersions, listQueueViews, listQueues, listRecordLinks, listRecordTemplates, listRegisteredExtensions, listRegisteredFlowOperations, listRegisteredFlowTriggers, listRelatedComments, listReportAlerts, listReportAnnotations, listReportFilterPresets, listReportSnapshots, listReportTemplates, listReportVersions, listReportWidgetPresets, listReports, listRequestedTasks, listRetentionPolicies, listRetentionRuns, listRolePolicies, listRoleUsers, listRoles, listRules, listSavedViews, listScheduledChanges, listScheduledReports, listScopeDimensions, listSessionRecordings, listShareLinks, listSlaRules, listStagedImports, listSubRowTemplates, listSubRows, listSupportTickets, listSyncJobs, listTasks, listTeamTasks, listThroughputCollections, listTraces, listTreePermissions, listViewSubscriptions, listVirtualCollections, listWebhookDeliveries, listWebhooks, listWidgetFeeds, listWorkspaceTemplates, listWorkspaces, markAllNotificationsRead, markChatRoomRead, markNotificationRead, markNotificationsRead, moveTreeNode, nudgeTask, omniSearch, openHelpVideoPackageImport, openHelpVideoUpload, presignFileUpload, previewContentBundle, previewHelpVideoPackageImport, previewImportJob, previewReportWidget, projectFieldConfig, proposeLayoutOps, publishHelpVideo, publishItem, queryVirtualCollection, readAccessAuditFindings, readActiveLayout, readActivity, readActivityReportSummary, readAddendum, readAiSettings, readAlertLog, readAllStateOwners, readAnomalyLog, readApiAnalyticsErrors, readApiAnalyticsSummary, readApiAnalyticsTimeseries, readApiAnalyticsTopCollections, readApiAnalyticsTopPaths, readApiKey, readApprovalBrief, readApprovalChain, readAtRiskSummary, readBackupManifest, readChatConfig, readChatDirectory, readChatPeerRead, readCollection, readCollectionLayout, readCollectionLayouts, readCollections, readConfigInventory, readCoverageGaps, readDashboard, readDashboardWidgetData, readDataQualityRun, readDbPool, readDetailLayout, readDistinctValues, readDraftPublishConfig, readErpSubmissionHistory, readExpensiveSql, readFieldChangeHistory, readFieldConfig, readFieldImpact, readFieldWatch, readFileMeta, readFileUsage, readFilesByIds, readHealthDetailed, readHelpVideo, readHelpVideoAnalytics, readHelpVideoDownloadLink, readHelpVideoDraft, readHelpVideoWalk, readHierarchyConfig, readHierarchyNodeAncestors, readHierarchyNodeChildren, readHierarchyNodes, readHierarchyTree, readImportJob, readImportProcedure, readInfrastructureSummary, readInstanceOwners, readInstanceRoster, readIntegrationHealth, readInternalWidget, readIssue, readIssueSummary, readItem, readItemLock, readItemLockConfig, readItems, readJobRegistry, readLastTouch, readLayoutAssignments, readLayoutBundle, readLayoutDrift, readLayoutGroups, readLayoutOverview, readLayoutProposals, readLayoutVersion, readMany, readMcpCapabilities, readMcpToolsConfig, readMe, readMetricAlertLog, readMyScopes, readMyWork, readNotificationCount, readNotificationSubscriptionStats, readOnlinePresence, readOwnerGroups, readPage, readPageWidgetData, readPdfTemplate, readPersistedQuery, readPickerExclusion, readPickerExclusions, readPipelineFlowMap, readPipelineReplay, readPipelineTemplate, readPipelineTemplates, readPipelineVersion, readPreflight, readQueue, readQueueCollectionStates, readQueueColumnPrefs, readQueueItems, readQueueTrends, readQueueWorkload, readReadiness, readRecordGraph, readRelationOptions, readReport, readReportAlertLog, readReportAlertsLog, readReportFilterOptions, readReportFiring, readReportSnapshot, readReportSubscription, readReportUsage, readReportWidgetData, readRequiredHelpVideos, readRevision, readRevisions, readRole, readRuntimeStats, readScopeDimensionCoverage, readSessionRecordingEvents, readSettings, readSingleton, readSlaStatusBatch, readStagedImport, readStagedImportStats, readStateOwnerGroups, readStateOwners, readStateOwnersBatch, readSupportTicket, readSyncJob, readTask, readTaskCounts, readTaskHistory, readThroughputReport, readTimeline, readTrace, readTrafficSnapshot, readTreeAncestors, readTreeChildren, readTreeConfig, readTreeDescendants, readTreeNested, readTreeNodes, readTwoFactorStatus, readUnreadNotificationCount, readUser, readUserActivity, readUserActivitySummary, readUserCard, readUserScopes, readUsers, readWorkflowBindings, readWorkflowInstance, readWorkflowInstances, readWorkspace, readWorkspaceUsage, rebuildTreePaths, recordHelpVideoProgress, registerHelpVideoPage, rehearseCreateItem, reindexSemanticSearch, rejectAddendum, rejectAiProposal, releaseItemLock, releaseQueueItem, rematerializeQueue, removeChatChannelMember, removeInstanceOwner, renderInternalWidget, renderPdfTemplate, reorderFieldGroups, reorderSubRows, reorderTreeSiblings, replaceSubRows, replayActivityEvent, replayFlow, replySupportTicket, reportClientError, requestRecordAccess, requeueStagedImport, rerecordHelpVideo, rerenderHelpVideo, resetReportCache, resolveLayoutProposal, resolveReportAlert, restoreHelpVideoVersion, restoreImportDefinitionVersion, restoreLayoutVersion, restorePipelineVersion, restoreReportVersion, retryDeadLetter, retryErpSubmission, retryWebhookDelivery, revokeApiKey, revokeShareLink, revokeToken, revokeUserToken, rollbackRevision, rotateWidgetFeedToken, runAccessAudit, runActivityReport, runActivityReportCsv, runCronJob, runDataQuality, runRetentionPolicy, runScheduledReport, runSyncJob, saveHelpVideoDraft, saveMcpToolsConfig, saveMyScopeDefaults, saveReportFilterPreset, saveReportTemplate, saveReportWidgets, saveUserScope, searchChatMessages, semanticSearch, sendBulkNotification, sendChatMessage, sendTestMail, sessionRecordingEnabled, setHelpVideoContexts, setHelpVideoRequirements, setMyDelegate, setQueueDefaultView, setReportSubscription, setSupportTicketStatus, setTranslations, setupTwoFactor, simulatePermissions, simulatePipeline, simulatePipelineImpact, startApproval, startMasquerade, startSessionRecording, startWorkflow, stopMasquerade, submitAddendum, submitFormItem, submitItemForReview, submitLayoutOps, submitToErp, subscribeFieldWatch, subscribeMetricAlert, suggestImportValidation, suggestQueueLabels, switchWorkspace, testExternalApi, testFlow, testWebhook, toggleChatPin, toggleChatReaction, togglePinnedItem, toggleReportAlert, touchRecordView, transitionWorkflow, unpublishHelpVideo, unpublishItem, unsubscribeFieldWatch, unsubscribeMetricAlert, updateAccessAudit, updateAddendum, updateAiSettings, updateAlertDefinition, updateAnomalyLogEntry, updateAnomalyRule, updateApiKey, updateApprovalChain, updateAtRiskRule, updateAttributeDefinition, updateAttributeValues, updateChatChannel, updateChatRoom, updateChatRoomType, updateCollectionLayout, updateComment, updateDataQualityRule, updateDraftPublishConfig, updateErpSubmissionStatus, updateExternalApi, updateExternalApiEndpoint, updateFieldConfig, updateFieldGroup, updateFieldWatch, updateFileMeta, updateHelpVideo, updateHierarchyConfig, updateImportDefinition, updateInternalWidget, updateIssue, updateItem, updateItemLockConfig, updateLayoutAssignments, updateLayoutUngroupedSort, updateMe, updateMetricAlertRule, updateMetricAlertSubscription, updateNotificationSubscription, updatePage, updatePdfTemplate, updatePersistedQuery, updateQueue, updateQueueSources, updateQueueView, updateRecordTemplate, updateReport, updateReportAlert, updateReportWidgetPreset, updateRetentionPolicy, updateRole, updateRolePolicy, updateRoleUiPermissions, updateRule, updateSavedView, updateScheduledReport, updateSettings, updateSingleton, updateSlaRule, updateSyncJob, updateTask, updateTreePermission, updateUser, updateVirtualCollection, updateWebhook, updateWidgetFeed, updateWorkflowBinding, updateWorkspace, validateVirtualCollectionSql, verifyTwoFactor, whichLayoutForm, withSignal };
package/dist/index.js CHANGED
@@ -2,6 +2,9 @@
2
2
  function cmd(method, path, params, body) {
3
3
  return { _method: method, _path: path, _params: params, _body: body };
4
4
  }
5
+ function withSignal(command, signal) {
6
+ return signal ? { ...command, _signal: signal } : command;
7
+ }
5
8
 
6
9
  // src/commands/admin.ts
7
10
  function listRoles() {
@@ -2627,42 +2630,54 @@ function createNivaro(url, options = {}) {
2627
2630
  const timed = command._method === "GET" && timeoutMs > 0;
2628
2631
  const ctrl = timed ? new AbortController() : null;
2629
2632
  const timer = ctrl ? setTimeout(() => ctrl.abort(), timeoutMs) : null;
2630
- let res;
2633
+ const callerSignal = command._signal;
2634
+ const onCallerAbort = () => ctrl?.abort();
2635
+ if (callerSignal && ctrl) {
2636
+ if (callerSignal.aborted) ctrl.abort();
2637
+ else callerSignal.addEventListener("abort", onCallerAbort, { once: true });
2638
+ }
2639
+ const signal = ctrl ? ctrl.signal : callerSignal;
2631
2640
  try {
2632
- res = await fetcher(`${baseUrl}/api${command._path}${qs}`, {
2633
- method: command._method,
2634
- headers: authHeaders(),
2635
- credentials: credentialsMode(),
2636
- body: command._body != null ? JSON.stringify(command._body) : void 0,
2637
- ...ctrl ? { signal: ctrl.signal } : {}
2638
- });
2639
- } catch (e) {
2640
- if (ctrl?.signal.aborted)
2641
- throw Object.assign(new Error(`Request timed out after ${timeoutMs / 1e3}s`), {
2642
- name: "TimeoutError"
2641
+ let res;
2642
+ try {
2643
+ res = await fetcher(`${baseUrl}/api${command._path}${qs}`, {
2644
+ method: command._method,
2645
+ headers: authHeaders(),
2646
+ credentials: credentialsMode(),
2647
+ body: command._body != null ? JSON.stringify(command._body) : void 0,
2648
+ ...signal ? { signal } : {}
2643
2649
  });
2644
- throw e;
2645
- } finally {
2646
- if (timer) clearTimeout(timer);
2647
- }
2648
- if (command._method === "DELETE" && res.status === 204) {
2649
- return void 0;
2650
- }
2651
- if (!res.ok) {
2652
- const err = await res.json().catch(() => ({ error: res.statusText }));
2653
- throw Object.assign(new Error(err.error ?? res.statusText), {
2654
- status: res.status,
2655
- response: err
2656
- });
2657
- }
2658
- const contentType = res.headers.get("content-type") ?? "";
2659
- if (!contentType.includes("application/json")) {
2660
- if (contentType.includes("application/pdf") || contentType.includes("application/octet-stream")) {
2661
- return await res.arrayBuffer();
2650
+ } catch (e) {
2651
+ if (callerSignal?.aborted) throw e;
2652
+ if (ctrl?.signal.aborted)
2653
+ throw Object.assign(new Error(`Request timed out after ${timeoutMs / 1e3}s`), {
2654
+ name: "TimeoutError"
2655
+ });
2656
+ throw e;
2657
+ } finally {
2658
+ if (timer) clearTimeout(timer);
2659
+ }
2660
+ if (command._method === "DELETE" && res.status === 204) {
2661
+ return void 0;
2662
2662
  }
2663
- return await res.text();
2663
+ if (!res.ok) {
2664
+ const err = await res.json().catch(() => ({ error: res.statusText }));
2665
+ throw Object.assign(new Error(err.error ?? res.statusText), {
2666
+ status: res.status,
2667
+ response: err
2668
+ });
2669
+ }
2670
+ const contentType = res.headers.get("content-type") ?? "";
2671
+ if (!contentType.includes("application/json")) {
2672
+ if (contentType.includes("application/pdf") || contentType.includes("application/octet-stream")) {
2673
+ return await res.arrayBuffer();
2674
+ }
2675
+ return await res.text();
2676
+ }
2677
+ return await res.json();
2678
+ } finally {
2679
+ callerSignal?.removeEventListener("abort", onCallerAbort);
2664
2680
  }
2665
- return res.json();
2666
2681
  }
2667
2682
  async function upload(file, opts = {}) {
2668
2683
  const fd = new FormData();
@@ -3698,5 +3713,6 @@ export {
3698
3713
  updateWorkspace,
3699
3714
  validateVirtualCollectionSql,
3700
3715
  verifyTwoFactor,
3701
- whichLayoutForm
3716
+ whichLayoutForm,
3717
+ withSignal
3702
3718
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nivaro/sdk",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "TypeScript SDK for Nivaro CMS — typed REST client, GraphQL, realtime subscriptions, and presence.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -50,7 +50,7 @@
50
50
  "scripts": {
51
51
  "build": "tsup src/index.ts --format esm --dts --out-dir dist",
52
52
  "dev": "tsup src/index.ts --format esm --dts --out-dir dist --watch",
53
- "test": "node --test bin/lib/*.test.mjs"
53
+ "test": "node --test bin/lib/*.test.mjs test/*.test.mjs"
54
54
  },
55
55
  "dependencies": {
56
56
  "socket.io-client": "^4.8.4"