@nexia/sdk 0.6.6 → 0.7.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.
@@ -3,7 +3,7 @@ export type DataMigrationRunStatus = 'processing' | 'completed' | 'completed_wit
3
3
  /** Host-owned asynchronous operation returned by migration analysis/apply APIs. */
4
4
  export interface DataMigrationBackgroundOperation<TResult = Readonly<Record<string, unknown>>> {
5
5
  ticket: string;
6
- status: 'processing' | 'completed' | 'failed' | 'unknown';
6
+ status: 'processing' | 'completed' | 'failed' | 'cancelled' | 'unknown';
7
7
  result?: TResult;
8
8
  errors?: string[];
9
9
  validation_errors?: Record<string, string[]>;
@@ -19,6 +19,8 @@ export interface DataMigrationOperationAccepted {
19
19
  export interface DataMigrationOperationWaitOptions {
20
20
  statusUrl?: string;
21
21
  signal?: AbortSignal;
22
+ /** Keep an already submitted operation observable across route unmounts. */
23
+ continueInBackground?: boolean;
22
24
  onProgress?: (progress: number, phase: string | null) => void;
23
25
  }
24
26
  export interface DataMigrationBackgroundOperationClient {
@@ -62,10 +64,25 @@ export declare function dataMigrationRunPublicId(result: unknown): string | null
62
64
  export interface DataMigrationStageCompletion {
63
65
  runPublicId: string;
64
66
  }
67
+ /** Transient progress from an App-owned migration stage to the host choice list. */
68
+ export interface DataMigrationStageActivityUpdate {
69
+ attemptId: string;
70
+ phase: 'analyzing' | 'review_ready' | 'importing' | 'attention' | 'cancelled' | 'completed';
71
+ ticket?: string | null;
72
+ }
65
73
  /** App-owned stage rendered inside the host-owned data migration workspace. */
66
74
  export interface DataMigrationStageProps {
67
75
  providerKey: string;
76
+ /** Host-selected draft identity; a new value starts a separate file upload. */
77
+ draftKey?: string;
78
+ /** Actor-owned server operation selected by the host when reopening a stage. */
79
+ resumeOperation?: {
80
+ ticket: string;
81
+ kind: 'review' | 'import';
82
+ attemptId?: string;
83
+ };
68
84
  onCompleted: (completion: DataMigrationStageCompletion) => void;
85
+ onActivityChange?: (activity: DataMigrationStageActivityUpdate) => void;
69
86
  }
70
87
  export type DataMigrationStageLoader = () => Promise<{
71
88
  default: ComponentType<DataMigrationStageProps>;
@@ -103,6 +120,17 @@ export interface DataMigrationStageRegistration {
103
120
  requiredPermissions?: readonly string[];
104
121
  permissionMode?: 'all' | 'any';
105
122
  prerequisiteStageIds?: readonly string[];
123
+ /** Ordered schema column keys shown in the host's saved-result table. */
124
+ resultColumnKeys?: readonly string[];
125
+ /** Provider-specific file preparation instructions, owned by the registering App. */
126
+ fileGuideSteps?: readonly {
127
+ titleKey: string;
128
+ sections?: readonly {
129
+ titleKey: string;
130
+ descriptionKey: string;
131
+ }[];
132
+ noteKey?: string;
133
+ }[];
106
134
  loader: DataMigrationStageLoader;
107
135
  }
108
136
  /** App-facing capability. Inspection and composition remain host-owned. */
package/dist/host.d.ts CHANGED
@@ -5,21 +5,21 @@ import type { ApprovalBusinessFormRegistrar, ApprovalBusinessFormRegistry } from
5
5
  import type { ContextQueryResult, PermissionsQueryResult } from './context';
6
6
  import type { DataMigrationBackgroundOperationClient, DataMigrationRegistrar, DataMigrationRegistry } from './data-migration';
7
7
  import type { ProcessUserTaskFormRegistrar, ProcessUserTaskFormRegistry } from './process';
8
- import type { AppRouteFrameProps, AutoRegisterPackageSurfacesOptions, FormFieldErrors, InspectorActionProps, InspectorResourceActionsProps, MessageApi, MutationFormError, NxAdaptiveSplitProps, NxActionButtonProps, NxAlertProps, NxButtonProps, NxLinkButtonProps, NxIconButtonProps, NxIconLinkProps, NxCanonicalRoutePaneProps, NxCheckboxProps, NxColumnBrowserProps, NxColumnPickerProps, NxComboboxProps, NxDatePickerProps, NxDateRangePickerProps, NxDetailRowProps, NxEmptyViewProps, NxFieldGroupProps, NxFieldLegendProps, NxFieldsetProps, NxFileDropzoneProps, NxFormFieldProps, NxFormSectionProps, NxDropdownMenuProps, NxInsightFilterBarProps, NxInsightSurfaceProps, NxHelpTooltipProps, NxOverviewBandProps, InsightFilterControls, UseInsightFilterStateOptions, NxLoadingBlockProps, NxModalDialogProps, NxOrgChartProps, NxMissingRequiredReferencesAlertProps, NxPageFrameProps, NxPaginationProps, NxRadioGroupProps, NxRadioProps, NxRefreshControlProps, NxSearchFieldProps, NxSectionCardProps, NxSectionStackProps, NxResponsiveRegionProps, NxSelectProps, NxStatCardProps, NxStatusBadgeProps, NxTabNavProps, NxTextAreaProps, NxTextInputProps, NxTooltipProps, OpenResourceWorkTab, ResourceCreateCompletion, ResourceCreateReceiverRegistration, ResourceInspectorAdapterRegistry, ResourceInspectorAdapterRegistrar, ResourceInspectorPanelProps, ResourceInspectorStackHostProps, ResourceInspectorStackProviderProps, ResourceInspectorStateProps, ResourceLinkProps, ResourceListParams, ResourceListParamsControls, ResourceListToolbarMoreMenuProps, ResourcePrimaryCellProps, ResourceRowActionsMenuProps, ResourceStatusBadgeProps, ResourceTableProps, ResourceTableSort, ResourceTextCellProps, UseRegisterListLocateActionOptions, UseResourceListParamsOptions, TabContextActionRegistration, RegisterDraftActionOptions, ToastOptions, WorkSectionProps, FavoriteTarget, WorkSurfaceLabelInput, WorkSurfaceLabels, WorkSurfaceProps } from './shell';
8
+ import type { AppRouteFrameProps, AutoRegisterPackageSurfacesOptions, FormFieldErrors, InspectorActionProps, InspectorResourceActionsProps, MessageApi, MutationFormError, NxAdaptiveSplitProps, NxActionButtonProps, NxAlertProps, NxButtonProps, NxLinkButtonProps, NxIconButtonProps, NxIconLinkProps, NxCanonicalRoutePaneProps, NxCheckboxProps, NxColumnBrowserProps, NxColumnPickerProps, NxComboboxProps, NxDatePickerProps, NxDateRangePickerProps, NxDetailRowProps, NxEmptyViewProps, NxFieldGroupProps, NxFieldLegendProps, NxFieldsetProps, NxFileDropzoneProps, NxFormFieldProps, NxFormSectionProps, NxDropdownMenuProps, NxInsightFilterBarProps, NxInsightSurfaceProps, NxHelpTooltipProps, NxOverviewBandProps, InsightFilterControls, UseInsightFilterStateOptions, NxLoadingBlockProps, NxModalDialogProps, NxOrgChartProps, NxMissingRequiredReferencesAlertProps, NxPageFrameProps, NxPaginationProps, NxRadioGroupProps, NxRadioProps, NxRefreshControlProps, NxSearchFieldProps, NxSectionCardProps, SectionRowProps, NxSectionStackProps, NxResponsiveRegionProps, NxSelectProps, NxStatCardProps, NxStatusBadgeProps, NxSwitchProps, NxTabNavProps, NxTextAreaProps, NxTextInputProps, NxTooltipProps, OpenResourceWorkTab, ResourceCreateCompletion, ResourceCreateReceiverRegistration, ResourceInspectorAdapterRegistry, ResourceInspectorAdapterRegistrar, ResourceInspectorPanelProps, ResourceInspectorStackHostProps, ResourceInspectorStackProviderProps, ResourceInspectorStateProps, ResourceLinkProps, ResourceListParams, ResourceListParamsControls, ResourceListToolbarMoreMenuProps, ResourcePrimaryCellProps, ResourceRowActionsMenuProps, ResourceStatusBadgeProps, ResourceTableProps, ResourceTableSort, ResourceTextCellProps, UseRegisterListLocateActionOptions, UseResourceListParamsOptions, TabContextActionRegistration, RegisterDraftActionOptions, ToastOptions, WorkSectionProps, FavoriteTarget, WorkSurfaceLabelInput, WorkSurfaceLabels, WorkSurfaceProps } from './shell';
9
9
  import type { AgentComponentRenderer, AttachmentDeleteResult, AttachmentQueryResult, AttachmentUploadOptions, AttachmentUploadResult, ApprovalRoutePoliciesQueryResult, ApprovalSharedLinesQueryResult, DashboardWidgetAutoHeightRef, LegalEntityMemberListParams, LegalEntityMemberQueryResult, LegalEntityApplicabilityQueryResult, LegalEntityQueryResult, MediaUploadResult, OperatingUnitQueryResult, OperatingUnitQueryScope, OperatingUnitScopeFieldProps, OperatingUnitScopeResult, OperatingUnitSelectionResult, PartyListParams, PartyQueryResult, TrustedAssetListParams, TrustedAssetsQueryResult, UploadFileClient } from './platform';
10
10
  import type { NxOrganizationTargetSelectorProps, NxOperatingUnitSelectorProps, OrganizationListScopeMode, OrganizationListScopeResult, OrganizationTargetQuery, OrganizationTargetQueryResult } from './organization-target';
11
11
  import type { NxCalendarProps, NxResourceSchedulerProps, ResourceBoardProps, ResourceScheduleProps } from './resources/resource-projections';
12
- import type { NxDatasetExportWorkspaceProps, NxDatasetImportWorkspaceProps, NxResourceImportDialogProps, NxResourceTransferActionsProps } from './resources/resource-transfer';
12
+ import type { NxDatasetExportWorkspaceProps, NxDatasetImportWorkspaceProps, NxInlineResourceCreateProps, NxResourceImportDialogProps, NxResourceTransferActionsProps } from './resources/resource-transfer';
13
13
  import type { NxResourceInformationFormProps, NxResourceFormLegalEntityFieldProps, NxResourceInformationViewProps } from './resources/resource-information';
14
14
  import type { SignatureAuthenticationMethodSelectorProps, SignatureInvitationChannelSelectorProps, SignatureRequestPreparationEditorProps, SignatureRequestPreparationExactPreviewProps, SignatureRequestPreparationPlacementEditorProps, SignatureSingleRequestDialogProps } from './signature';
15
15
  import type { ResourceProjectionChangeSubscription } from './resource-reference';
16
16
  import type { ResourceCreateDestinationRegistry } from './resource-create-destination';
17
17
  export type { ResourceProjectionChangeSubscription } from './resource-reference';
18
18
  /** Host-only visual component prop contracts. App packages import these from ./host. */
19
- export type { AppRoutePrefetchContext, AppRoutePrefetcher, AutoRegisterPackageSurfacesOptions, PackageSurfaceLoader, PackageSurfaceOverride, PackageSurfaceOverrideRegistration, NxAdaptiveSplitAsideWidth, NxAdaptiveSplitBreakpoint, NxAdaptiveSplitDensity, NxAdaptiveSplitProps, NxActionButtonProps, NxAlertProps, NxButtonProps, NxLinkButtonProps, NxIconButtonProps, NxIconLinkProps, NxCanonicalRoutePaneProps, NxCheckboxProps, NxColumnBrowserLabels, NxColumnBrowserProps, NxColumnNode, NxColumnPickerLabels, NxColumnPickerProps, NxComboboxProps, NxDatePickerProps, NxDateRangePickerProps, NxDetailRowProps, NxDropdownMenuProps, NxEmptyViewProps, NxFieldGroupProps, NxFieldLegendProps, NxFieldsetProps, NxFileDropzoneProps, NxFormFieldProps, NxFormSectionProps, NxInsightFilterBarProps, NxInsightSurfaceProps, NxHelpTooltipProps, NxLoadingBlockProps, NxModalDialogProps, NxOrgChartItem, NxOrgChartLabels, NxOrgChartMember, NxOrgChartProps, NxMissingRequiredReferencesAlertProps, NxOverviewBandProps, NxPageFrameProps, NxRadioGroupProps, NxRadioProps, NxRefreshControlProps, NxResponsiveRegionProps, ResourceListToolbarMoreMenuProps, NxSearchFieldProps, NxSectionCardProps, NxSectionStackProps, NxSelectProps, NxStatCardProps, NxStatusBadgeProps, NxTabNavItem, NxTabNavProps, NxTextAreaProps, NxTextInputProps, NxTooltipProps, ResourceListRefreshConfig, ResourceTableDensity, ResourceTableStyle, ResourceTableSummaryRow, } from './shell';
19
+ export type { AppRoutePrefetchContext, AppRoutePrefetcher, AutoRegisterPackageSurfacesOptions, PackageSurfaceLoader, PackageSurfaceOverride, PackageSurfaceOverrideRegistration, NxAdaptiveSplitAsideWidth, NxAdaptiveSplitBreakpoint, NxAdaptiveSplitDensity, NxAdaptiveSplitProps, NxActionButtonProps, NxAlertProps, NxButtonProps, NxLinkButtonProps, NxIconButtonProps, NxIconLinkProps, NxCanonicalRoutePaneProps, NxCheckboxProps, NxColumnBrowserLabels, NxColumnBrowserProps, NxColumnNode, NxColumnPickerLabels, NxColumnPickerProps, NxComboboxProps, NxDatePickerProps, NxDateRangePickerProps, NxDetailRowProps, NxDropdownMenuProps, NxEmptyViewProps, NxFieldGroupProps, NxFieldLegendProps, NxFieldsetProps, NxFileDropzoneProps, NxFormFieldProps, NxFormSectionProps, NxInsightFilterBarProps, NxInsightSurfaceProps, NxHelpTooltipProps, NxLoadingBlockProps, NxModalDialogProps, NxOrgChartItem, NxOrgChartLabels, NxOrgChartMember, NxOrgChartProps, NxMissingRequiredReferencesAlertProps, NxOverviewBandProps, NxPageFrameProps, NxRadioGroupProps, NxRadioProps, NxRefreshControlProps, NxResponsiveRegionProps, ResourceListToolbarMoreMenuProps, NxSearchFieldProps, NxSectionCardProps, SectionRowProps, NxSectionStackProps, NxSelectProps, NxStatCardProps, NxStatusBadgeProps, NxSwitchProps, NxTabNavItem, NxTabNavProps, NxTextAreaProps, NxTextInputProps, NxTooltipProps, ResourceListRefreshConfig, ResourceTableDensity, ResourceTableStyle, ResourceTableSummaryRow, } from './shell';
20
20
  export type { NxResourceInformationFormProps, NxResourceFormLegalEntityFieldProps, NxResourceInformationViewProps, ResourceInformationControlProjection, ResourceInformationControlSlot, ResourceInformationCustomProjection, ResourceInformationEditProjection, ResourceInformationEditRenderContext, ResourceInformationField, ResourceInformationFieldSpan, ResourceInformationMode, ResourceInformationReadOnlyProjection, ResourceInformationRequirement, ResourceInformationSchema, ResourceInformationSection, ResourceInformationTranslator, ResourceInformationValue, } from './resources/resource-information';
21
21
  export type { NxCalendarActionBinding, NxCalendarActionCommand, NxCalendarActionResult, NxCalendarInteraction, NxCalendarOccurrence, NxCalendarProps, NxCalendarRange, NxCalendarSelection, NxCalendarTemporalRange, NxCalendarView, NxResourceSchedulerActionBinding, NxResourceSchedulerActionCommand, NxResourceSchedulerActionResult, NxResourceSchedulerInteraction, NxResourceSchedulerOccurrence, NxResourceSchedulerProps, NxResourceSchedulerResource, NxResourceSchedulerSelection, NxResourceSchedulerView, ResourceBoardCard, ResourceBoardLabels, ResourceBoardLane, ResourceBoardLoadState, ResourceBoardMoveCommand, ResourceBoardMutationResult, ResourceBoardProjection, ResourceBoardProps, ResourceBoardSummaryField, ResourceProjectionReference, ResourceScheduleActionBinding, ResourceScheduleActionCommand, ResourceScheduleDatePair, ResourceScheduleDateSemantics, ResourceScheduleDependency, ResourceScheduleDependencyType, ResourceScheduleInteraction, ResourceScheduleItem, ResourceScheduleItemType, ResourceScheduleLoadState, ResourceScheduleMutationResult, ResourceScheduleProjection, ResourceScheduleProps, ResourceScheduleTimeUnit, ResourceScheduleView, } from './resources/resource-projections';
22
- export type { DatasetImportConfirmationSummary, NxDatasetExportWorkspaceProps, NxDatasetImportWorkspaceProps, NxResourceImportDialogProps, NxResourceTransferActionsProps, } from './resources/resource-transfer';
22
+ export type { DatasetImportConfirmationSummary, NxDatasetExportWorkspaceProps, NxDatasetImportWorkspaceProps, NxInlineResourceCreateProps, NxResourceImportDialogProps, NxResourceTransferActionsProps, } from './resources/resource-transfer';
23
23
  export { projectSignatureCapabilityCatalog, signatureCapabilityIdentity, } from './signature';
24
24
  export type { SignatureAuthenticationCapability, SignatureAuthenticationMethod, SignatureAuthenticationMethodSelectorProps, SignatureCapability, SignatureCapabilityCatalog, SignatureCapabilityKind, SignatureCapabilityStatus, SignatureCapabilityUnavailableReason, SignatureInvitationCapability, SignatureInvitationChannel, SignatureInvitationChannelSelectorProps, SignatureRequestPreparationDocument, SignatureRequestPreparationEditorPreparation, SignatureRequestPreparationEditorProps, SignatureRequestPreparationDataSourceCard, SignatureRequestPreparationEditPolicy, SignatureRequestPreparationExactPreviewPreparation, SignatureRequestPreparationExactPreviewProps, SignatureRequestPreparationInputDefinition, SignatureRequestPreparationInputKind, SignatureRequestPreparationInputValueAuthority, SignatureRequestPreparationPlacementEditorProps, SignatureRequestPreparationPlacementElement, SignatureRequestPreparationPlacementFormElement, SignatureRequestPreparationPlacementFormKind, SignatureRequestPreparationPlacementImageAsset, SignatureRequestPreparationPlacementImageElement, SignatureRequestPreparationPlacementParticipant, SignatureRequestPreparationPlacementStaticCheckboxElement, SignatureRequestPreparationPlacementDataSourceElement, SignatureRequestPreparationPlacementStaticTextElement, SignatureRequestPreparationRect, SignatureRequestPreparationRenderStatus, SignatureRequestPreparationStatus, SignatureRequestPreparationTextElement, SignatureRoutingCapability, SignatureRoutingMode, SignatureTemporalDisplayPart, SignatureSingleRequestDialogProps, SignatureSingleRequestParticipant, SignatureSingleRequestParticipantAssignmentSource, SignatureSingleRequestParticipantCandidate, SignatureSingleRequestParticipantSubmission, SignatureSingleRequestPreparationReference, SignatureSingleRequestSubmission, } from './signature';
25
25
  export interface NxBarChartProps {
@@ -194,6 +194,7 @@ export interface NexiaAppFrontendHostBindings {
194
194
  NxResourceTransferActions: ComponentType<NxResourceTransferActionsProps>;
195
195
  NxDatasetExportWorkspace: ComponentType<NxDatasetExportWorkspaceProps>;
196
196
  NxDatasetImportWorkspace: ComponentType<NxDatasetImportWorkspaceProps>;
197
+ NxInlineResourceCreate: ComponentType<NxInlineResourceCreateProps>;
197
198
  NxSpreadsheetEditor: ComponentType<NxSpreadsheetEditorProps>;
198
199
  NxSankey: typeof NxSankey;
199
200
  NxLoadingBlock: typeof NxLoadingBlock;
@@ -208,11 +209,13 @@ export interface NexiaAppFrontendHostBindings {
208
209
  NxRefreshControl: ComponentType<NxRefreshControlProps>;
209
210
  NxSearchField: typeof NxSearchField;
210
211
  NxSectionCard: typeof NxSectionCard;
212
+ NxSectionRow: typeof NxSectionRow;
211
213
  NxSectionStack: typeof NxSectionStack;
212
214
  NxResponsiveRegion: typeof NxResponsiveRegion;
213
215
  NxSelect: <TValue extends string | number>(props: NxSelectProps<TValue>) => ReactNode;
214
216
  NxStatCard: typeof NxStatCard;
215
217
  NxStatusBadge: typeof NxStatusBadge;
218
+ NxSwitch: typeof NxSwitch;
216
219
  NxTabNav: typeof NxTabNav;
217
220
  NxTextArea: typeof NxTextArea;
218
221
  NxTextInput: typeof NxTextInput;
@@ -315,8 +318,8 @@ export declare function configureNexiaAppFrontendHost(bindings: NexiaAppFrontend
315
318
  /** Axios-compatible host client carrying the active shell CSRF configuration. */
316
319
  export declare const api: AxiosInstance;
317
320
  /**
318
- * Polls Core's standard background-operation endpoint and cancels outstanding
319
- * waits when the owning surface unmounts.
321
+ * Polls Core's standard background-operation endpoint. By default unmounting
322
+ * cancels the wait; callers retaining a checkpoint can explicitly keep waiting.
320
323
  */
321
324
  export declare function useDataMigrationBackgroundOperation(): DataMigrationBackgroundOperationClient;
322
325
  export declare function AppRouteFrame(props: AppRouteFrameProps): ReactNode;
@@ -384,6 +387,7 @@ export declare function NxOrgChart(props: NxOrgChartProps): ReactNode;
384
387
  export declare function NxResourceImportDialog(props: NxResourceImportDialogProps): ReactNode;
385
388
  export declare function NxResourceTransferActions(props: NxResourceTransferActionsProps): ReactNode;
386
389
  export declare function NxDatasetImportWorkspace(props: NxDatasetImportWorkspaceProps): ReactNode;
390
+ export declare function NxInlineResourceCreate(props: NxInlineResourceCreateProps): ReactNode;
387
391
  export declare function NxDatasetExportWorkspace(props: NxDatasetExportWorkspaceProps): ReactNode;
388
392
  export declare function NxMissingRequiredReferencesAlert(props: NxMissingRequiredReferencesAlertProps): ReactNode;
389
393
  export declare function NxPageFrame(props: NxPageFrameProps): ReactNode;
@@ -391,6 +395,8 @@ export declare function NxResponsiveRegion(props: NxResponsiveRegionProps): Reac
391
395
  export declare function NxPagination(props: NxPaginationProps): ReactNode;
392
396
  export declare function NxSearchField(props: NxSearchFieldProps): ReactNode;
393
397
  export declare function NxSectionCard(props: NxSectionCardProps): ReactNode;
398
+ export declare function NxSectionRow(props: SectionRowProps): ReactNode;
399
+ export declare function NxSwitch(props: NxSwitchProps): ReactNode;
394
400
  export declare function NxSectionStack(props: NxSectionStackProps): ReactNode;
395
401
  export declare function NxSelect<TValue extends string | number>(props: NxSelectProps<TValue>): ReactNode;
396
402
  export declare function NxStatCard(props: NxStatCardProps): ReactNode;
package/dist/host.js CHANGED
@@ -64,15 +64,17 @@ function backgroundOperationClientPath(statusUrl) {
64
64
  return path;
65
65
  }
66
66
  /**
67
- * Polls Core's standard background-operation endpoint and cancels outstanding
68
- * waits when the owning surface unmounts.
67
+ * Polls Core's standard background-operation endpoint. By default unmounting
68
+ * cancels the wait; callers retaining a checkpoint can explicitly keep waiting.
69
69
  */
70
70
  export function useDataMigrationBackgroundOperation() {
71
71
  const activeControllers = useRef(new Set());
72
+ const backgroundControllers = useRef(new Set());
72
73
  useEffect(() => () => {
73
- for (const controller of activeControllers.current)
74
- controller.abort();
75
- activeControllers.current.clear();
74
+ for (const controller of activeControllers.current) {
75
+ if (!backgroundControllers.current.has(controller))
76
+ controller.abort();
77
+ }
76
78
  }, []);
77
79
  const cancelAll = useCallback(() => {
78
80
  for (const controller of activeControllers.current)
@@ -91,6 +93,8 @@ export function useDataMigrationBackgroundOperation() {
91
93
  else
92
94
  options.signal?.addEventListener('abort', abortFromCaller, { once: true });
93
95
  activeControllers.current.add(controller);
96
+ if (options.continueInBackground)
97
+ backgroundControllers.current.add(controller);
94
98
  try {
95
99
  for (;;) {
96
100
  const operation = (await api.get(backgroundOperationClientPath(statusUrl), { signal: controller.signal })).data;
@@ -101,6 +105,9 @@ export function useDataMigrationBackgroundOperation() {
101
105
  }
102
106
  return operation.result;
103
107
  }
108
+ if (operation.status === 'cancelled') {
109
+ throw new DOMException('Data migration analysis cancelled.', 'AbortError');
110
+ }
104
111
  if (operation.status === 'failed' || operation.status === 'unknown') {
105
112
  throw new Error(operationFailureMessage(operation));
106
113
  }
@@ -109,6 +116,7 @@ export function useDataMigrationBackgroundOperation() {
109
116
  }
110
117
  finally {
111
118
  activeControllers.current.delete(controller);
119
+ backgroundControllers.current.delete(controller);
112
120
  options.signal?.removeEventListener('abort', abortFromCaller);
113
121
  }
114
122
  }, []);
@@ -302,6 +310,9 @@ export function NxResourceTransferActions(props) {
302
310
  export function NxDatasetImportWorkspace(props) {
303
311
  return render(host().components.NxDatasetImportWorkspace, props);
304
312
  }
313
+ export function NxInlineResourceCreate(props) {
314
+ return render(host().components.NxInlineResourceCreate, props);
315
+ }
305
316
  export function NxDatasetExportWorkspace(props) {
306
317
  return render(host().components.NxDatasetExportWorkspace, props);
307
318
  }
@@ -323,6 +334,12 @@ export function NxSearchField(props) {
323
334
  export function NxSectionCard(props) {
324
335
  return render(host().components.NxSectionCard, props);
325
336
  }
337
+ export function NxSectionRow(props) {
338
+ return render(host().components.NxSectionRow, props);
339
+ }
340
+ export function NxSwitch(props) {
341
+ return render(host().components.NxSwitch, props);
342
+ }
326
343
  export function NxSectionStack(props) {
327
344
  return render(host().components.NxSectionStack, props);
328
345
  }
package/dist/index.d.ts CHANGED
@@ -2,10 +2,10 @@ export type { ResourceListFilterableEntry, ResourceListSchema, } from "./resourc
2
2
  export { draftStringField } from './resources/draft-field';
3
3
  export { defineResourceInformationSchema, resourceInformationValue, } from "./resources/resource-information";
4
4
  export type { NxResourceInformationFormProps, NxResourceInformationViewProps, ResourceFormLegalEntity, ResourceFormBinding, NxResourceFormLegalEntityFieldProps, ResourceInformationControlProjection, ResourceInformationControlSlot, ResourceInformationCustomProjection, ResourceInformationEditProjection, ResourceInformationEditRenderContext, ResourceInformationField, ResourceInformationFieldSpan, ResourceInformationMode, ResourceInformationReadOnlyProjection, ResourceInformationRequirement, ResourceInformationSchema, ResourceInformationSection, ResourceInformationTranslator, ResourceInformationValue, } from "./resources/resource-information";
5
- export type { DatasetImportConfirmationSummary, ResourceImportPreview, ResourceImportPreviewRow, ResourceImportResponse, ResourceImportRun, ResourceImportRunStatus, ResourceImportSummary, ResourceTransferFormat, ResourceTransferMessage, ResourceTransferMeta, NxResourceImportDialogProps, NxResourceTransferActionsProps, NxDatasetImportWorkspaceProps, NxDatasetExportWorkspaceProps, } from "./resources/resource-transfer";
5
+ export type { DatasetImportConfirmationSummary, DatasetImportPlanChoice, DatasetImportPlanSection, ResourceImportPreview, ResourceImportPreviewRow, ResourceImportResponse, ResourceImportRun, ResourceImportRunStatus, ResourceImportSummary, ResourceTransferFormat, ResourceTransferMessage, ResourceTransferMeta, NxResourceImportDialogProps, NxResourceTransferActionsProps, NxDatasetImportWorkspaceProps, NxInlineResourceCreateProps, NxDatasetExportWorkspaceProps, } from "./resources/resource-transfer";
6
6
  export type { NxCalendarActionBinding, NxCalendarActionCommand, NxCalendarActionResult, NxCalendarInteraction, NxCalendarOccurrence, NxCalendarProps, NxCalendarRange, NxCalendarSelection, NxCalendarTemporalRange, NxCalendarView, NxResourceSchedulerActionBinding, NxResourceSchedulerActionCommand, NxResourceSchedulerActionResult, NxResourceSchedulerInteraction, NxResourceSchedulerOccurrence, NxResourceSchedulerProps, NxResourceSchedulerResource, NxResourceSchedulerSelection, NxResourceSchedulerView, ResourceBoardCard, ResourceBoardLabels, ResourceBoardLane, ResourceBoardLoadState, ResourceBoardMoveCommand, ResourceBoardMutationResult, ResourceBoardProjection, ResourceBoardProps, ResourceBoardSummaryField, ResourceProjectionReference, ResourceScheduleActionBinding, ResourceScheduleActionCommand, ResourceScheduleDatePair, ResourceScheduleDateSemantics, ResourceScheduleDependency, ResourceScheduleDependencyType, ResourceScheduleInteraction, ResourceScheduleItem, ResourceScheduleItemType, ResourceScheduleLoadState, ResourceScheduleMutationResult, ResourceScheduleProjection, ResourceScheduleProps, ResourceScheduleTimeUnit, ResourceScheduleView, } from "./resources/resource-projections";
7
7
  export type { ContextQueryResult, ContextResponse, LegalEntityContext, PermissionsQueryResult, PermissionsResponse, TenantContext, UserContext, WorkspaceContext, } from "./context";
8
- export type { DataMigrationBackgroundOperation, DataMigrationBackgroundOperationClient, DataMigrationOperationAccepted, DataMigrationOperationWaitOptions, DataMigrationProviderRegistration, DataMigrationRegistrar, DataMigrationRegistry, DataMigrationRun, DataMigrationRunStatus, DataMigrationSessionCheckpointStore, DataMigrationStageCompletion, DataMigrationStageLoader, DataMigrationStageProps, DataMigrationStageRegistration, DataMigrationTargetRegistration, } from "./data-migration";
8
+ export type { DataMigrationBackgroundOperation, DataMigrationBackgroundOperationClient, DataMigrationOperationAccepted, DataMigrationOperationWaitOptions, DataMigrationProviderRegistration, DataMigrationRegistrar, DataMigrationRegistry, DataMigrationRun, DataMigrationRunStatus, DataMigrationSessionCheckpointStore, DataMigrationStageCompletion, DataMigrationStageActivityUpdate, DataMigrationStageLoader, DataMigrationStageProps, DataMigrationStageRegistration, DataMigrationTargetRegistration, } from "./data-migration";
9
9
  export { createDataMigrationSessionCheckpointStore, dataMigrationUploadAccept, dataMigrationRunPublicId, isDataMigrationOperationAccepted, } from "./data-migration";
10
10
  export { projectSignatureCapabilityCatalog, signatureCapabilityIdentity, } from "./signature";
11
11
  export type { SignatureDocumentDataBinding, SignatureDocumentDataCandidate, SignatureDocumentDataCardinality, SignatureDocumentDataClassification, SignatureDocumentDataCompatibleSourceBinding, SignatureDocumentDataContractDescriptor, SignatureDocumentDataFieldDescriptor, SignatureDocumentDataFieldMapping, SignatureDocumentDataFieldType, SignatureDocumentDataFixedSourceBinding, SignatureDocumentDataFormatter, SignatureDocumentDataLookupMode, SignatureDocumentDataResourceRef, SignatureDocumentDataSourceCatalog, SignatureDocumentDataSourceCatalogEntry, SignatureDocumentDataSourceDescriptor, SignatureDocumentDataSourceResolution, SignatureDocumentDataStatus, SignatureAuthenticationCapability, SignatureAuthenticationMethod, SignatureAuthenticationMethodSelectorProps, SignatureCapability, SignatureCapabilityCatalog, SignatureCapabilityKind, SignatureCapabilityStatus, SignatureCapabilityUnavailableReason, SignatureInvitationCapability, SignatureInvitationChannel, SignatureInvitationChannelSelectorProps, SignatureRequestPreparationDocument, SignatureRequestPreparationEditorPreparation, SignatureRequestPreparationEditorProps, SignatureRequestPreparationDataSourceCard, SignatureRequestPreparationEditPolicy, SignatureRequestPreparationExactPreviewPreparation, SignatureRequestPreparationExactPreviewProps, SignatureRequestPreparationInputDefinition, SignatureRequestPreparationInputKind, SignatureRequestPreparationInputValueAuthority, SignatureRequestPreparationPlacementEditorProps, SignatureRequestPreparationPlacementElement, SignatureRequestPreparationPlacementFormElement, SignatureRequestPreparationPlacementFormKind, SignatureRequestPreparationPlacementImageAsset, SignatureRequestPreparationPlacementImageElement, SignatureRequestPreparationPlacementParticipant, SignatureRequestPreparationPlacementStaticCheckboxElement, SignatureRequestPreparationPlacementDataSourceElement, SignatureRequestPreparationPlacementStaticTextElement, SignatureRequestPreparationRect, SignatureRequestPreparationRenderStatus, SignatureRequestPreparationStatus, SignatureRequestPreparationTextElement, SignatureRoutingCapability, SignatureRoutingMode, SignatureTemporalDisplayPart, SignatureSingleRequestDialogProps, SignatureSingleRequestParticipant, SignatureSingleRequestParticipantAssignmentSource, SignatureSingleRequestParticipantCandidate, SignatureSingleRequestParticipantSubmission, SignatureSingleRequestPreparationReference, SignatureSingleRequestSubmission, } from "./signature";
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import type { ResourceCreateContinuationTarget } from "../shell";
2
+ import type { ResourceCreateCompletionInput, ResourceCreateContinuationTarget } from "../shell";
3
3
  /** Lifecycle states returned by resource import endpoints. */
4
4
  export type ResourceImportRunStatus = "queued" | "processing" | "completed" | "completed_with_errors" | "failed";
5
5
  export type ResourceTransferFormat = "csv" | "xlsx" | "txt" | "json" | string;
@@ -130,12 +130,23 @@ export interface DatasetImportConfirmationSummary {
130
130
  willUpdate: number;
131
131
  willReject: number;
132
132
  }
133
+ /** Host-rendered create form that returns to its import preview after saving. */
134
+ export interface NxInlineResourceCreateProps {
135
+ route: string;
136
+ title: string;
137
+ progress?: {
138
+ current: number;
139
+ total: number;
140
+ };
141
+ onClose: () => void;
142
+ onCreated: (input: ResourceCreateCompletionInput) => void;
143
+ }
133
144
  /** Shared mapped-dataset import workspace for App management destinations. */
134
145
  export interface NxDatasetImportWorkspaceProps {
135
146
  sourceProfileKey?: string;
136
147
  showSourceSelector?: boolean;
137
148
  resourceKey: string;
138
- /** App-owned reference review above the shared editable preview. */
149
+ /** App-owned reference review within the shared import flow. */
139
150
  renderReferenceReview?: (context: {
140
151
  rows: Array<{
141
152
  line: number;
@@ -150,15 +161,55 @@ export interface NxDatasetImportWorkspaceProps {
150
161
  message_key?: string;
151
162
  }>;
152
163
  }>;
164
+ /** App-reported reference issues covering the entire batch, including rows outside the preview sample. */
165
+ referenceIssues?: Array<{
166
+ issue: {
167
+ kind: string;
168
+ field: string;
169
+ value: string;
170
+ reference_kind?: string;
171
+ reference_value?: string;
172
+ label_key?: string;
173
+ message_key?: string;
174
+ };
175
+ count: number;
176
+ }>;
153
177
  busy: boolean;
154
178
  recheck: () => void;
155
179
  /** Open an offered reference editor after preserving the import draft. */
156
180
  createReference: (kind: string, seed: string) => void;
181
+ /** Configure several references of one kind in sequence without leaving the preview. */
182
+ createReferences: (items: Array<{
183
+ kind: string;
184
+ seed: string;
185
+ }>) => void;
157
186
  /** Apply edits to source rows and rerun the existing validation pipeline. */
158
187
  applyChanges: (changes: Record<string, Record<string, string | null>>) => Promise<void>;
159
188
  }) => ReactNode;
189
+ /** Place reference setup before the preview, after its plan choices, or below the complete preview. */
190
+ referenceReviewPlacement?: "before_preview" | "after_plan" | "after_preview";
191
+ /** App-owned presentation of plan choices, while Core retains preview and commit decisions. */
192
+ renderPlanChoices?: (context: {
193
+ /** Authorized target of the current import preview. */
194
+ legalEntityPublicId?: string | null;
195
+ referenceIssues?: Parameters<NonNullable<NxDatasetImportWorkspaceProps["renderReferenceReview"]>>[0]["referenceIssues"];
196
+ choices: DatasetImportPlanChoice[];
197
+ sections: DatasetImportPlanSection[];
198
+ values: Record<string, unknown>;
199
+ /** Decisions used for the plan currently shown, before local edits. */
200
+ analyzedValues: Record<string, unknown>;
201
+ onChange: (key: string, value: string) => void;
202
+ busy: boolean;
203
+ previewIsCurrent: boolean;
204
+ /** Reanalyze the uploaded file with the current App rules. */
205
+ recheck: () => void;
206
+ }) => ReactNode;
207
+ /** Use with renderPlanChoices when the App presents its own decision summary. */
208
+ hidePlanSections?: boolean;
160
209
  /** Allowed display values, keyed by import column. Domain lookup remains App-owned. */
161
210
  cellOptions?: Record<string, string[]>;
211
+ /** Allow source-row correction controls in the preview. Defaults to true. */
212
+ allowRowEditing?: boolean;
162
213
  inlineEditing?: boolean;
163
214
  onCompleted?: (result: Record<string, unknown>) => void | Promise<void>;
164
215
  /** Called when an ordinary Resource Transfer import has been accepted by the queue. */
@@ -176,11 +227,19 @@ export interface NxDatasetImportWorkspaceProps {
176
227
  processingLabel?: string;
177
228
  /** App-owned title for domain-specific apply semantics; Core supplies only counts. */
178
229
  confirmationTitle?: (summary: DatasetImportConfirmationSummary) => string;
230
+ /** Promote a multiple-choice decision to a selection dialog, then confirm its normalized selection before applying. */
231
+ confirmationSelection?: {
232
+ decisionKey: string;
233
+ title: string;
234
+ confirmTitle: (selectedValues: string[]) => string;
235
+ };
179
236
  testIdPrefix?: string;
180
237
  /** App-owned canonical create actions for reference issues reported by its pipeline. */
181
238
  referenceCreateActions?: Record<string, {
182
239
  label: string;
183
- onCreate: (seed: string) => void;
240
+ onCreate: (seed: string, legalEntityPublicId?: string) => void;
241
+ /** Reuse the owning create route inside the import review instead of changing Work Tabs. */
242
+ inlineRoute?: (seed: string, legalEntityPublicId?: string) => string;
184
243
  continuation: ResourceCreateContinuationTarget;
185
244
  }>;
186
245
  /** Keep stable App-owned decisions while a contextual reference create is completed and rechecked. */
@@ -188,6 +247,29 @@ export interface NxDatasetImportWorkspaceProps {
188
247
  /** Drop submitted decisions that the refreshed App plan no longer offers. */
189
248
  retainOnlyOfferedDecisions?: boolean;
190
249
  }
250
+ export interface DatasetImportPlanChoice {
251
+ type: "choice";
252
+ key: string;
253
+ label_key: string;
254
+ label_params: Record<string, string | number>;
255
+ default_value?: string | null;
256
+ presentation?: "select" | "checkbox";
257
+ options: Array<{
258
+ value: string;
259
+ label_key: string;
260
+ label_params: Record<string, string | number>;
261
+ }>;
262
+ }
263
+ export interface DatasetImportPlanSection {
264
+ heading_key: string | null;
265
+ heading_params: Record<string, string | number>;
266
+ items: Array<{
267
+ label_key: string;
268
+ label_params: Record<string, string | number>;
269
+ count: number | null;
270
+ existing: boolean;
271
+ }>;
272
+ }
191
273
  /** Shared export workspace for an App-contributed dataset. */
192
274
  export interface NxDatasetExportWorkspaceProps {
193
275
  resourceKey: string;
package/dist/shell.d.ts CHANGED
@@ -43,6 +43,8 @@ export interface ResourceCreateCompletion {
43
43
  /** Cancel a contextual create flow; returns true when the host returned to its origin. */
44
44
  cancel: () => boolean;
45
45
  isContextual: boolean;
46
+ /** The create form is rendered over its caller and can open another inline form. */
47
+ isInline?: boolean;
46
48
  }
47
49
  export interface ResourceCreateReceiverRegistration {
48
50
  target: ResourceCreateContinuationTarget;
@@ -625,6 +627,26 @@ export interface NxCheckboxProps extends Omit<InputHTMLAttributes<HTMLInputEleme
625
627
  indeterminate?: boolean;
626
628
  label?: string;
627
629
  }
630
+ export interface NxSwitchProps {
631
+ inputSize?: "xs" | "sm" | "md";
632
+ label?: ReactNode;
633
+ checked?: boolean;
634
+ defaultChecked?: boolean;
635
+ disabled?: boolean;
636
+ className?: string;
637
+ id?: string;
638
+ name?: string;
639
+ value?: string;
640
+ required?: boolean;
641
+ "aria-label"?: string;
642
+ "aria-describedby"?: string;
643
+ onCheckedChange?: (checked: boolean) => void;
644
+ onChange?: (event: {
645
+ target: {
646
+ checked: boolean;
647
+ };
648
+ }) => void;
649
+ }
628
650
  export interface NxRadioGroupProps {
629
651
  name?: string;
630
652
  value?: string;
@@ -846,6 +868,12 @@ export interface NxSectionCardProps {
846
868
  }
847
869
  /** Canonical vertical rhythm for sibling sections outside a route frame. */
848
870
  export type NxSectionStackProps = HTMLAttributes<HTMLDivElement>;
871
+ export interface SectionRowProps {
872
+ label: ReactNode;
873
+ description?: ReactNode;
874
+ children: ReactNode;
875
+ className?: string;
876
+ }
849
877
  export interface NxSelectOption<TValue extends string | number> {
850
878
  value: TValue;
851
879
  label: ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexia/sdk",
3
- "version": "0.6.6",
3
+ "version": "0.7.0",
4
4
  "description": "Frontend contracts for Nexia App Packages",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -31,7 +31,7 @@
31
31
  "scripts": {
32
32
  "build": "node scripts/build.mjs",
33
33
  "prepack": "npm run build",
34
- "test": "npm run build && node tests/WireValuesTest.mjs && node tests/ResourceCompositionFrontendContractsTest.mjs && node scripts/organization-target-contract.mjs",
34
+ "test": "npm run build && node tests/WireValuesTest.mjs && node tests/ResourceCompositionFrontendContractsTest.mjs && node tests/SettingsPrimitivesTest.mjs && node scripts/organization-target-contract.mjs",
35
35
  "test:wire-values": "node tests/WireValuesTest.mjs",
36
36
  "typecheck": "tsc -p tsconfig.json --noEmit",
37
37
  "test:resource-composition": "pnpm run build && node tests/ResourceCompositionFrontendContractsTest.mjs",