@nexia/sdk 0.6.6 → 0.7.1

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.
@@ -0,0 +1,15 @@
1
+ export type ActionPlacement = 'resource' | 'inspector' | 'report' | 'dashboard' | 'palette' | 'agent';
2
+ export type ActionTargets = 'none' | 'one' | 'many';
3
+ /** Core supplies target selection when a placement has no current records. */
4
+ export interface NxActionsProps {
5
+ placement: ActionPlacement;
6
+ resourceKey?: string;
7
+ actionKeys?: readonly string[];
8
+ currentTargets?: ReadonlyArray<{
9
+ id: string;
10
+ label: string;
11
+ }>;
12
+ legalEntityPublicId?: string | null;
13
+ disabledKeys?: readonly string[];
14
+ onSuccess?: (actionKey: string, response: unknown) => void;
15
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -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, ResourceInspectorQueryProps, 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 {
@@ -145,6 +145,12 @@ export interface FavoriteButtonProps {
145
145
  size?: 'xs' | 'sm' | 'md';
146
146
  testId?: string;
147
147
  }
148
+ export interface OpenFileOptions {
149
+ /** Resolve an App GET endpoint returning { href } before opening the file. */
150
+ resolveHref?: boolean;
151
+ /** Show the authorized file in a separate browser window instead of saving it. */
152
+ preview?: boolean;
153
+ }
148
154
  export interface NexiaAppFrontendHostBindings {
149
155
  api: AxiosInstance;
150
156
  components: {
@@ -152,6 +158,7 @@ export interface NexiaAppFrontendHostBindings {
152
158
  InspectorAction: typeof InspectorAction;
153
159
  InspectorResourceActions: typeof InspectorResourceActions;
154
160
  NxAdaptiveSplit: typeof NxAdaptiveSplit;
161
+ NxActions: ComponentType<NxActionsProps>;
155
162
  NxActionButton: typeof NxActionButton;
156
163
  NxAlert: typeof NxAlert;
157
164
  NxButton: typeof NxButton;
@@ -194,6 +201,7 @@ export interface NexiaAppFrontendHostBindings {
194
201
  NxResourceTransferActions: ComponentType<NxResourceTransferActionsProps>;
195
202
  NxDatasetExportWorkspace: ComponentType<NxDatasetExportWorkspaceProps>;
196
203
  NxDatasetImportWorkspace: ComponentType<NxDatasetImportWorkspaceProps>;
204
+ NxInlineResourceCreate: ComponentType<NxInlineResourceCreateProps>;
197
205
  NxSpreadsheetEditor: ComponentType<NxSpreadsheetEditorProps>;
198
206
  NxSankey: typeof NxSankey;
199
207
  NxLoadingBlock: typeof NxLoadingBlock;
@@ -208,11 +216,13 @@ export interface NexiaAppFrontendHostBindings {
208
216
  NxRefreshControl: ComponentType<NxRefreshControlProps>;
209
217
  NxSearchField: typeof NxSearchField;
210
218
  NxSectionCard: typeof NxSectionCard;
219
+ NxSectionRow: typeof NxSectionRow;
211
220
  NxSectionStack: typeof NxSectionStack;
212
221
  NxResponsiveRegion: typeof NxResponsiveRegion;
213
222
  NxSelect: <TValue extends string | number>(props: NxSelectProps<TValue>) => ReactNode;
214
223
  NxStatCard: typeof NxStatCard;
215
224
  NxStatusBadge: typeof NxStatusBadge;
225
+ NxSwitch: typeof NxSwitch;
216
226
  NxTabNav: typeof NxTabNav;
217
227
  NxTextArea: typeof NxTextArea;
218
228
  NxTextInput: typeof NxTextInput;
@@ -220,6 +230,7 @@ export interface NexiaAppFrontendHostBindings {
220
230
  OperatingUnitManagementSurface: ComponentType<OperatingUnitManagementSurfaceProps>;
221
231
  OperatingUnitScopeField: typeof OperatingUnitScopeField;
222
232
  ResourceInspectorPanel: typeof ResourceInspectorPanel;
233
+ ResourceInspectorQuery: typeof ResourceInspectorQuery;
223
234
  ResourceInspectorStackHost: typeof ResourceInspectorStackHost;
224
235
  ResourceInspectorStackProvider: typeof ResourceInspectorStackProvider;
225
236
  ResourceInspectorState: typeof ResourceInspectorState;
@@ -286,6 +297,7 @@ export interface NexiaAppFrontendHostBindings {
286
297
  useWorkTabLabel: (label: string | null | undefined) => void;
287
298
  };
288
299
  runtime: {
300
+ openFile: (href: string, options?: OpenFileOptions) => Promise<void>;
289
301
  autoRegisterPackageSurfaces: (options: AutoRegisterPackageSurfacesOptions) => void;
290
302
  firstFieldError: (errors: FormFieldErrors | undefined, field: string) => string | null;
291
303
  keepPreviousResourceListData: <TData>(queryScope: readonly unknown[]) => (previousData: TData | undefined, previousQuery: {
@@ -312,11 +324,13 @@ export interface NexiaAppFrontendHostBindings {
312
324
  * Core calls this once before installed App entries execute.
313
325
  */
314
326
  export declare function configureNexiaAppFrontendHost(bindings: NexiaAppFrontendHostBindings): void;
327
+ /** The host retains authentication and file bytes outside an isolated App frame. */
328
+ export declare function openFile(href: string, options?: OpenFileOptions): Promise<void>;
315
329
  /** Axios-compatible host client carrying the active shell CSRF configuration. */
316
330
  export declare const api: AxiosInstance;
317
331
  /**
318
- * Polls Core's standard background-operation endpoint and cancels outstanding
319
- * waits when the owning surface unmounts.
332
+ * Polls Core's standard background-operation endpoint. By default unmounting
333
+ * cancels the wait; callers retaining a checkpoint can explicitly keep waiting.
320
334
  */
321
335
  export declare function useDataMigrationBackgroundOperation(): DataMigrationBackgroundOperationClient;
322
336
  export declare function AppRouteFrame(props: AppRouteFrameProps): ReactNode;
@@ -356,6 +370,7 @@ export declare function NxColumnPicker(props: NxColumnPickerProps): ReactNode;
356
370
  export declare function NxCombobox<TValue extends string | number>(props: NxComboboxProps<TValue>): ReactNode;
357
371
  export declare function NxOperatingUnitSelector(props: NxOperatingUnitSelectorProps): ReactNode;
358
372
  export declare function NxOrganizationTargetSelector(props: NxOrganizationTargetSelectorProps): ReactNode;
373
+ export declare function NxActions(props: NxActionsProps): ReactNode;
359
374
  export declare function NxDatePicker(props: NxDatePickerProps): ReactNode;
360
375
  export declare function NxDateRangePicker(props: NxDateRangePickerProps): ReactNode;
361
376
  export declare function NxDetailRow(props: NxDetailRowProps): ReactNode;
@@ -384,6 +399,7 @@ export declare function NxOrgChart(props: NxOrgChartProps): ReactNode;
384
399
  export declare function NxResourceImportDialog(props: NxResourceImportDialogProps): ReactNode;
385
400
  export declare function NxResourceTransferActions(props: NxResourceTransferActionsProps): ReactNode;
386
401
  export declare function NxDatasetImportWorkspace(props: NxDatasetImportWorkspaceProps): ReactNode;
402
+ export declare function NxInlineResourceCreate(props: NxInlineResourceCreateProps): ReactNode;
387
403
  export declare function NxDatasetExportWorkspace(props: NxDatasetExportWorkspaceProps): ReactNode;
388
404
  export declare function NxMissingRequiredReferencesAlert(props: NxMissingRequiredReferencesAlertProps): ReactNode;
389
405
  export declare function NxPageFrame(props: NxPageFrameProps): ReactNode;
@@ -391,6 +407,8 @@ export declare function NxResponsiveRegion(props: NxResponsiveRegionProps): Reac
391
407
  export declare function NxPagination(props: NxPaginationProps): ReactNode;
392
408
  export declare function NxSearchField(props: NxSearchFieldProps): ReactNode;
393
409
  export declare function NxSectionCard(props: NxSectionCardProps): ReactNode;
410
+ export declare function NxSectionRow(props: SectionRowProps): ReactNode;
411
+ export declare function NxSwitch(props: NxSwitchProps): ReactNode;
394
412
  export declare function NxSectionStack(props: NxSectionStackProps): ReactNode;
395
413
  export declare function NxSelect<TValue extends string | number>(props: NxSelectProps<TValue>): ReactNode;
396
414
  export declare function NxStatCard(props: NxStatCardProps): ReactNode;
@@ -401,6 +419,7 @@ export declare function NxTextInput(props: NxTextInputProps): ReactNode;
401
419
  export declare function NxTooltip(props: NxTooltipProps): ReactNode;
402
420
  export declare function OperatingUnitScopeField(props: OperatingUnitScopeFieldProps): ReactNode;
403
421
  export declare function OperatingUnitManagementSurface(props: OperatingUnitManagementSurfaceProps): ReactNode;
422
+ export declare function ResourceInspectorQuery<T>(props: ResourceInspectorQueryProps<T>): ReactNode;
404
423
  export declare function ResourceInspectorPanel(props: ResourceInspectorPanelProps): ReactNode;
405
424
  export declare function ResourceInspectorStackHost(props: ResourceInspectorStackHostProps): ReactNode;
406
425
  export declare function ResourceInspectorStackProvider(props: ResourceInspectorStackProviderProps): ReactNode;
@@ -573,14 +592,11 @@ export declare function useWorkTabLabel(label: string | null | undefined): void;
573
592
  export declare function useWorkSurfaceLabels(input: WorkSurfaceLabelInput): WorkSurfaceLabels;
574
593
  export declare function autoRegisterPackageSurfaces(options: AutoRegisterPackageSurfacesOptions): void;
575
594
  /**
576
- * Declares the filesystem-owned inspector registration set for an App entry.
577
- *
578
- * Vite evaluates an eager `import.meta.glob` before passing the modules here;
579
- * each generated registration module then registers its lazy inspector loader.
580
- * Keeping the convention in the SDK means an App never needs to maintain a
581
- * growing list of side-effect imports in its entry point.
595
+ * Retains legacy eager registration modules and registers optional resource
596
+ * contract `resourceInspector: { type, load }` declarations. Contracts contain
597
+ * lightweight metadata; implementations are loaded only by the registry.
582
598
  */
583
- export declare function autoRegisterPackageResourceInspectors(modules: Record<string, unknown>): void;
599
+ export declare function autoRegisterPackageResourceInspectors(modules: Record<string, unknown>, resourceContracts?: Record<string, unknown>): void;
584
600
  export declare function firstFieldError(errors: FormFieldErrors | undefined, field: string): string | null;
585
601
  export declare function withoutFieldError(errors: FormFieldErrors, field: string): FormFieldErrors;
586
602
  export declare function parseMutationFormError(input: MutationFormErrorInput): MutationFormError;
@@ -604,3 +620,4 @@ export declare const resourceCreateDestinationRegistry: Pick<ResourceCreateDesti
604
620
  export declare const resourceInspectorAdapterRegistry: ResourceInspectorAdapterRegistrar;
605
621
  /** Shared spreadsheet editor; the caller owns document persistence. */
606
622
  export declare function NxSpreadsheetEditor(props: NxSpreadsheetEditorProps): ReactNode;
623
+ import type { NxActionsProps } from './actions';
package/dist/host.js CHANGED
@@ -15,6 +15,10 @@ function host() {
15
15
  }
16
16
  return activeHost;
17
17
  }
18
+ /** The host retains authentication and file bytes outside an isolated App frame. */
19
+ export function openFile(href, options) {
20
+ return host().runtime.openFile(href, options);
21
+ }
18
22
  const apiProxyTarget = axios.create();
19
23
  /** Axios-compatible host client carrying the active shell CSRF configuration. */
20
24
  export const api = new Proxy(apiProxyTarget, {
@@ -64,15 +68,17 @@ function backgroundOperationClientPath(statusUrl) {
64
68
  return path;
65
69
  }
66
70
  /**
67
- * Polls Core's standard background-operation endpoint and cancels outstanding
68
- * waits when the owning surface unmounts.
71
+ * Polls Core's standard background-operation endpoint. By default unmounting
72
+ * cancels the wait; callers retaining a checkpoint can explicitly keep waiting.
69
73
  */
70
74
  export function useDataMigrationBackgroundOperation() {
71
75
  const activeControllers = useRef(new Set());
76
+ const backgroundControllers = useRef(new Set());
72
77
  useEffect(() => () => {
73
- for (const controller of activeControllers.current)
74
- controller.abort();
75
- activeControllers.current.clear();
78
+ for (const controller of activeControllers.current) {
79
+ if (!backgroundControllers.current.has(controller))
80
+ controller.abort();
81
+ }
76
82
  }, []);
77
83
  const cancelAll = useCallback(() => {
78
84
  for (const controller of activeControllers.current)
@@ -91,6 +97,8 @@ export function useDataMigrationBackgroundOperation() {
91
97
  else
92
98
  options.signal?.addEventListener('abort', abortFromCaller, { once: true });
93
99
  activeControllers.current.add(controller);
100
+ if (options.continueInBackground)
101
+ backgroundControllers.current.add(controller);
94
102
  try {
95
103
  for (;;) {
96
104
  const operation = (await api.get(backgroundOperationClientPath(statusUrl), { signal: controller.signal })).data;
@@ -101,6 +109,9 @@ export function useDataMigrationBackgroundOperation() {
101
109
  }
102
110
  return operation.result;
103
111
  }
112
+ if (operation.status === 'cancelled') {
113
+ throw new DOMException('Data migration analysis cancelled.', 'AbortError');
114
+ }
104
115
  if (operation.status === 'failed' || operation.status === 'unknown') {
105
116
  throw new Error(operationFailureMessage(operation));
106
117
  }
@@ -109,6 +120,7 @@ export function useDataMigrationBackgroundOperation() {
109
120
  }
110
121
  finally {
111
122
  activeControllers.current.delete(controller);
123
+ backgroundControllers.current.delete(controller);
112
124
  options.signal?.removeEventListener('abort', abortFromCaller);
113
125
  }
114
126
  }, []);
@@ -226,6 +238,9 @@ export function NxOperatingUnitSelector(props) {
226
238
  export function NxOrganizationTargetSelector(props) {
227
239
  return render(host().components.NxOrganizationTargetSelector, props);
228
240
  }
241
+ export function NxActions(props) {
242
+ return render(host().components.NxActions, props);
243
+ }
229
244
  export function NxDatePicker(props) {
230
245
  return render(host().components.NxDatePicker, props);
231
246
  }
@@ -302,6 +317,9 @@ export function NxResourceTransferActions(props) {
302
317
  export function NxDatasetImportWorkspace(props) {
303
318
  return render(host().components.NxDatasetImportWorkspace, props);
304
319
  }
320
+ export function NxInlineResourceCreate(props) {
321
+ return render(host().components.NxInlineResourceCreate, props);
322
+ }
305
323
  export function NxDatasetExportWorkspace(props) {
306
324
  return render(host().components.NxDatasetExportWorkspace, props);
307
325
  }
@@ -323,6 +341,12 @@ export function NxSearchField(props) {
323
341
  export function NxSectionCard(props) {
324
342
  return render(host().components.NxSectionCard, props);
325
343
  }
344
+ export function NxSectionRow(props) {
345
+ return render(host().components.NxSectionRow, props);
346
+ }
347
+ export function NxSwitch(props) {
348
+ return render(host().components.NxSwitch, props);
349
+ }
326
350
  export function NxSectionStack(props) {
327
351
  return render(host().components.NxSectionStack, props);
328
352
  }
@@ -353,6 +377,9 @@ export function OperatingUnitScopeField(props) {
353
377
  export function OperatingUnitManagementSurface(props) {
354
378
  return render(host().components.OperatingUnitManagementSurface, props);
355
379
  }
380
+ export function ResourceInspectorQuery(props) {
381
+ return render((host().components.ResourceInspectorQuery), props);
382
+ }
356
383
  export function ResourceInspectorPanel(props) {
357
384
  return render(host().components.ResourceInspectorPanel, props);
358
385
  }
@@ -710,19 +737,40 @@ export function autoRegisterPackageSurfaces(options) {
710
737
  host().runtime.autoRegisterPackageSurfaces(options);
711
738
  }
712
739
  /**
713
- * Declares the filesystem-owned inspector registration set for an App entry.
714
- *
715
- * Vite evaluates an eager `import.meta.glob` before passing the modules here;
716
- * each generated registration module then registers its lazy inspector loader.
717
- * Keeping the convention in the SDK means an App never needs to maintain a
718
- * growing list of side-effect imports in its entry point.
740
+ * Retains legacy eager registration modules and registers optional resource
741
+ * contract `resourceInspector: { type, load }` declarations. Contracts contain
742
+ * lightweight metadata; implementations are loaded only by the registry.
719
743
  */
720
- export function autoRegisterPackageResourceInspectors(modules) {
744
+ export function autoRegisterPackageResourceInspectors(modules, resourceContracts = {}) {
721
745
  const pattern = /^\.\/resources\/[^/]+\/inspector\/register-[^/]+-inspector\.ts$/;
722
746
  for (const path of Object.keys(modules)) {
723
- if (!pattern.test(path)) {
747
+ if (!pattern.test(path))
724
748
  throw new Error(`Invalid package inspector registration path [${path}].`);
749
+ }
750
+ const registrations = new Map();
751
+ for (const [path, module] of Object.entries(resourceContracts)) {
752
+ if (!/^\.\/resources\/[^/]+\/[a-zA-Z0-9-]+-resource-contract\.ts$/.test(path)
753
+ || module === null || typeof module !== 'object') {
754
+ throw new Error(`Invalid Inspector resource contract [${path}].`);
755
+ }
756
+ const declaration = module.resourceInspector;
757
+ if (declaration === undefined)
758
+ continue;
759
+ if (declaration === null || typeof declaration !== 'object') {
760
+ throw new Error(`Invalid Inspector declaration [${path}].`);
725
761
  }
762
+ const { type, load } = declaration;
763
+ if (typeof type !== 'string' || type.trim() !== type || type === '' || typeof load !== 'function'
764
+ || !Object.entries(module).some(([key, value]) => key.endsWith('ResourceType') && value === type)) {
765
+ throw new Error(`Invalid Inspector identity or loader [${path}].`);
766
+ }
767
+ if (registrations.has(type))
768
+ throw new Error(`Duplicate Inspector declaration [${type}].`);
769
+ registrations.set(type, load);
770
+ }
771
+ // Validate the complete new declaration set before mutating the registry.
772
+ for (const [type, load] of registrations) {
773
+ host().registries.resourceInspectorAdapterRegistry.register(type, load);
726
774
  }
727
775
  }
728
776
  export function firstFieldError(errors, field) {
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  export type { ResourceListFilterableEntry, ResourceListSchema, } from "./resources/resource-list";
2
2
  export { draftStringField } from './resources/draft-field';
3
3
  export { defineResourceInformationSchema, resourceInformationValue, } from "./resources/resource-information";
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";
4
+ export type { NxResourceInformationFormProps, NxResourceInformationViewProps, ResourceFormLegalEntity, ResourceFormBinding, ResourceFormSaved, AppFormSaveBinding, NxResourceFormLegalEntityFieldProps, ResourceInformationControlProjection, ResourceInformationControlSlot, ResourceInformationCustomProjection, ResourceInformationEditProjection, ResourceInformationEditRenderContext, ResourceInformationField, ResourceInformationFieldSpan, ResourceInformationMode, ResourceInformationReadOnlyProjection, ResourceInformationRequirement, ResourceInformationSchema, ResourceInformationSection, ResourceInformationTranslator, ResourceInformationValue, } from "./resources/resource-information";
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";
@@ -36,8 +36,9 @@ export type { ApprovalActor, ApprovalBodySnapshot, ApprovalBusinessFormControlle
36
36
  export { APPROVAL_STATES, APPROVAL_STEP_KINDS } from "./approval";
37
37
  export type { BpmnEditorDocument, BpmnEditorElement, BpmnEditorNodeType, BpmnEditorProcess, DmnEditorDocument, DmnEditorHitPolicy, DmnEditorInputClause, DmnEditorOutputClause, DmnEditorRule, DmnEditorValueType, ProcessUserTaskFormController, ProcessUserTaskFormRegistrar, ProcessUserTaskFormRegistration, ProcessUserTaskFormRegistry, ProcessUserTaskFormSlotPropsV1, ProcessUserTaskFormWidgetLoader, ProcessUserTaskResourceRef, } from "./process";
38
38
  export { DMN_EDITOR_HIT_POLICIES } from "./process";
39
- export type { AppRouteFrameProps, AppRoutePrefetchContext, AppRoutePrefetcher, AutoRegisterPackageSurfacesOptions, PackageSurfaceLoader, PackageSurfaceOverride, PackageSurfaceOverrideRegistration, FormFieldErrors, InspectorActionProps, InspectorResourceActionsProps, ListLocateRecord, MessageApi, MutationFormError, NxCanonicalRoutePaneProps, NxActionKind, NxIconButtonProps, NxComboboxOption, NxComboboxProps, NxRefreshControlProps, NxColumnBrowserLabels, NxColumnBrowserProps, NxColumnNode, NxColumnPickerLabels, NxColumnPickerProps, NxDatePickerLabels, NxDatePickerProps, NxDateRangePickerProps, NxDateRangeValue, NxDropdownMenuItem, NxHelpTooltipProps, InsightFilterControls, InsightFilterState, InsightQueryLike, InsightRangePreset, UseInsightFilterStateOptions, NxOverviewBandCard, NxSelectOption, NxStatDelta, NxStatDeltaDirection, NxStatDeltaTone, NxTabNavItem, NxTabNavProps, NxTooltipAlign, NxTooltipProps, NxTooltipSide, OpenResourceWorkTab, OpenResourceWorkTabOptions, ResourceCreateCompletion, ResourceCreateCompletionInput, ResourceCreateContinuationTarget, ResourceCreateReceiverRegistration, ResourceInspectorAdapter, ResourceInspectorAdapterLoader, ResourceInspectorAdapterProps, ResourceInspectorAdapterRegistry, ResourceInspectorPanelProps, ResourceInspectorStack, ResourceInspectorStackHostProps, ResourceInspectorStackProviderProps, ResourceInspectorStateProps, ResourceLinkProps, ResourceListFilters, ResourceListFilterValue, ResourceListFooterConfig, ResourceListParams, ResourceListParamsControls, ResourceListRefreshConfig, ResourceListToolbarConfig, ResourceListToolbarMoreMenuProps, ResourceListToolbarViewOption, ResourcePrimaryCellProps, ResourceActionDescriptor, ResourceRef, ResourceRowActionsMenuProps, ResourceStatusBadgeProps, ResourceTableColumn, ResourceTableAccess, ResourceTableDensity, ResourceTableProps, ResourceTableStyle, ResourceTableSummaryRow, ResourceTableSort, TabContextActionContext, TabContextActionRegistration, DraftFieldBinding, RegisterDraftActionOptions, TabContextActionResult, ResourceTextCellProps, ToastOptions, ToastSource, UseRegisterListLocateActionOptions, UseResourceListParamsOptions, WorkSectionProps, FavoriteTarget, WorkTabRef, WorkSurfaceAction, WorkSurfaceLabelInput, WorkSurfaceLabels, WorkSurfaceProps, } from "./shell";
39
+ export type { AppRouteFrameProps, AppRoutePrefetchContext, AppRoutePrefetcher, AutoRegisterPackageSurfacesOptions, PackageSurfaceLoader, PackageSurfaceOverride, PackageSurfaceOverrideRegistration, FormFieldErrors, InspectorActionProps, InspectorResourceActionsProps, ListLocateRecord, MessageApi, MutationFormError, NxCanonicalRoutePaneProps, NxActionKind, NxIconButtonProps, NxComboboxOption, NxComboboxProps, NxRefreshControlProps, NxColumnBrowserLabels, NxColumnBrowserProps, NxColumnNode, NxColumnPickerLabels, NxColumnPickerProps, NxDatePickerLabels, NxDatePickerProps, NxDateRangePickerProps, NxDateRangeValue, NxDropdownMenuItem, NxHelpTooltipProps, InsightFilterControls, InsightFilterState, InsightQueryLike, InsightRangePreset, UseInsightFilterStateOptions, NxOverviewBandCard, NxSelectOption, NxStatDelta, NxStatDeltaDirection, NxStatDeltaTone, NxTabNavItem, NxTabNavProps, NxTooltipAlign, NxTooltipProps, NxTooltipSide, OpenResourceWorkTab, OpenResourceWorkTabOptions, ResourceCreateCompletion, ResourceCreateCompletionInput, ResourceCreateContinuationTarget, ResourceCreateReceiverRegistration, ResourceInspectorAdapter, ResourceInspectorAdapterLoader, ResourceInspectorAdapterProps, ResourceInspectorQueryProps, ResourceInspectorAdapterRegistry, ResourceInspectorPanelProps, ResourceInspectorStack, ResourceInspectorStackHostProps, ResourceInspectorStackProviderProps, ResourceInspectorStateProps, ResourceLinkProps, ResourceListFilters, ResourceListFilterValue, ResourceListFooterConfig, ResourceListParams, ResourceListParamsControls, ResourceListRefreshConfig, ResourceListToolbarConfig, ResourceListToolbarMoreMenuProps, ResourceListToolbarViewOption, ResourcePrimaryCellProps, ResourceActionDescriptor, ResourceRef, ResourceRowActionsMenuProps, ResourceStatusBadgeProps, ResourceTableColumn, ResourceTableAccess, ResourceTableDensity, ResourceTableProps, ResourceTableStyle, ResourceTableSummaryRow, ResourceTableSort, TabContextActionContext, TabContextActionRegistration, DraftFieldBinding, RegisterDraftActionOptions, TabContextActionResult, ResourceTextCellProps, ToastOptions, ToastSource, UseRegisterListLocateActionOptions, UseResourceListParamsOptions, WorkSectionProps, FavoriteTarget, WorkTabRef, WorkSurfaceAction, WorkSurfaceLabelInput, WorkSurfaceLabels, WorkSurfaceProps, } from "./shell";
40
40
  export { FavoriteButton } from "./host";
41
41
  export type { FavoriteButtonProps } from "./host";
42
42
  export { createSpreadsheetWorkbook } from "./spreadsheet";
43
43
  export type { SpreadsheetWorkbook, SpreadsheetWorksheet, SpreadsheetCell, NxSpreadsheetEditorProps } from "./spreadsheet";
44
+ export type { ActionPlacement, ActionTargets, NxActionsProps } from './actions';
package/dist/process.d.ts CHANGED
@@ -61,7 +61,7 @@ export interface ProcessUserTaskFormController {
61
61
  /** Current widget validity; widgets re-register when this value changes. */
62
62
  readonly canSubmit: boolean;
63
63
  /** Build the App-owned input that Core forwards to the server-side handler. */
64
- buildInput: () => Record<string, unknown>;
64
+ buildInput: () => Record<string, unknown> | Promise<Record<string, unknown>>;
65
65
  }
66
66
  /** Versioned props for the closed `process.user_task.form` host slot. */
67
67
  export interface ProcessUserTaskFormSlotPropsV1 {
@@ -111,7 +111,7 @@ export function parseCompositionSpec(value) {
111
111
  if (sources.length === 1 && relationships.length !== 0)
112
112
  fail('relationship_not_allowed', 'relationships', 'Single-source Resource Composition cannot declare relationships.');
113
113
  const parsedRelationships = parseGraphRelationships(relationships, aliases);
114
- const timezone = identifier(root.timezone, 'timezone', /^[A-Za-z_]+(?:\/[A-Za-z_+-]+)+$/);
114
+ const timezone = identifier(root.timezone, 'timezone', /^(?:UTC|[A-Za-z_]+(?:\/[A-Za-z_+-]+)+)$/);
115
115
  const fields = boundedList(root.fields, 'fields').map((value, index) => {
116
116
  node(`fields.${index}`);
117
117
  const item = plainObject(value, `fields.${index}`);
@@ -122,7 +122,26 @@ export interface NxResourceInformationFormProps<TViewContext, TEditContext> {
122
122
  emptyValue: ReactNode;
123
123
  testIdPrefix?: string;
124
124
  }
125
+ export interface ResourceFormSaved {
126
+ action: "create" | "update";
127
+ /** Unmodified business response; decode it using the owning App contract. */
128
+ response: Readonly<Record<string, unknown>>;
129
+ submittedValues: Readonly<Record<string, unknown>>;
130
+ currentValues: Readonly<Record<string, unknown>>;
131
+ }
132
+ /** Explicit App action associated with a page form; grants no execution authority. */
133
+ export interface AppFormSaveBinding {
134
+ key: string;
135
+ /** Fixed record/scope arguments. Form fields must not overwrite these keys. */
136
+ arguments: Readonly<Record<string, unknown>>;
137
+ /** Decode the App response, preserve newer input, and refresh human-owned queries. */
138
+ onSaved: (result: Omit<ResourceFormSaved, "action">) => void | Promise<void>;
139
+ }
125
140
  export interface ResourceFormBinding {
141
+ /** Local identity for a form without a Resource. Requires explicit scopeKey; do not combine with resourceKey/resourceId/onSaved. */
142
+ formKey?: string;
143
+ /** Only for a formKey-based page; pairs an explicit server action with this form. */
144
+ saveAction?: AppFormSaveBinding;
126
145
  /** Omit identity inside a declared Resource route; the host supplies it. */
127
146
  resourceKey?: string;
128
147
  resourceId?: string | null;
@@ -130,6 +149,8 @@ export interface ResourceFormBinding {
130
149
  scopeKey?: string;
131
150
  effect: "draft" | "autosave";
132
151
  disabled?: boolean;
152
+ /** Host-confirmed external save for this mounted form; never performs a write. */
153
+ onSaved?: (result: ResourceFormSaved) => void | Promise<void>;
133
154
  /** Pure cross-field preflight; return rejected keys before any value writer runs. */
134
155
  validateBatch?: (values: Readonly<Record<string, unknown>>) => readonly string[];
135
156
  }
@@ -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
@@ -1,9 +1,9 @@
1
1
  import type { AnchorHTMLAttributes, ButtonHTMLAttributes, ComponentType, FieldsetHTMLAttributes, FormEvent, HTMLAttributes, InputHTMLAttributes, ReactElement, ReactNode, TextareaHTMLAttributes } from "react";
2
- import type { QueryClient } from "@tanstack/react-query";
2
+ import type { QueryClient, UseQueryResult } from "@tanstack/react-query";
3
3
  import type { PermissionsResponse } from "./context";
4
4
  import type { ResourcePickerRevalidation, ResourceReferenceIdentity } from "./resource-reference";
5
5
  import type { ResourceListSchema } from "./resources/resource-list";
6
- import type { ResourceFormBinding } from "./resources/resource-information";
6
+ import type { AppFormSaveBinding, ResourceFormBinding, ResourceFormSaved } from "./resources/resource-information";
7
7
  import type { ResourceTransferMeta } from "./resources/resource-transfer";
8
8
  /** A server-authorized, durable favorite identity. */
9
9
  export type FavoriteTarget = {
@@ -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;
@@ -193,6 +195,14 @@ export interface NxPaginationProps {
193
195
  disabled?: boolean;
194
196
  className?: string;
195
197
  }
198
+ /** Authorized query presentation shared by record Inspectors. */
199
+ export interface ResourceInspectorQueryProps<T> {
200
+ query: Pick<UseQueryResult<T>, "data" | "error" | "isError" | "isLoading" | "refetch">;
201
+ canView: (record: T) => boolean;
202
+ actions?: (record: T) => ReactNode;
203
+ children: (record: T) => ReactNode;
204
+ testId?: string;
205
+ }
196
206
  export interface ResourceInspectorPanelProps {
197
207
  testId?: string;
198
208
  badges?: ReactNode;
@@ -625,6 +635,26 @@ export interface NxCheckboxProps extends Omit<InputHTMLAttributes<HTMLInputEleme
625
635
  indeterminate?: boolean;
626
636
  label?: string;
627
637
  }
638
+ export interface NxSwitchProps {
639
+ inputSize?: "xs" | "sm" | "md";
640
+ label?: ReactNode;
641
+ checked?: boolean;
642
+ defaultChecked?: boolean;
643
+ disabled?: boolean;
644
+ className?: string;
645
+ id?: string;
646
+ name?: string;
647
+ value?: string;
648
+ required?: boolean;
649
+ "aria-label"?: string;
650
+ "aria-describedby"?: string;
651
+ onCheckedChange?: (checked: boolean) => void;
652
+ onChange?: (event: {
653
+ target: {
654
+ checked: boolean;
655
+ };
656
+ }) => void;
657
+ }
628
658
  export interface NxRadioGroupProps {
629
659
  name?: string;
630
660
  value?: string;
@@ -756,6 +786,8 @@ export interface NxFormFieldProps {
756
786
  /** Does not block Save; marks information needed before the resource is ready to use. */
757
787
  readinessRequired?: boolean;
758
788
  compact?: boolean;
789
+ /** Keep an editable field in the same label/value grid as NxDetailRow. */
790
+ layout?: "stack" | "row";
759
791
  className?: string;
760
792
  }
761
793
  export interface NxFormSectionProps {
@@ -846,6 +878,12 @@ export interface NxSectionCardProps {
846
878
  }
847
879
  /** Canonical vertical rhythm for sibling sections outside a route frame. */
848
880
  export type NxSectionStackProps = HTMLAttributes<HTMLDivElement>;
881
+ export interface SectionRowProps {
882
+ label: ReactNode;
883
+ description?: ReactNode;
884
+ children: ReactNode;
885
+ className?: string;
886
+ }
849
887
  export interface NxSelectOption<TValue extends string | number> {
850
888
  value: TValue;
851
889
  label: ReactNode;
@@ -1197,19 +1235,30 @@ export interface DraftFieldBinding {
1197
1235
  parse: (input: unknown) => unknown;
1198
1236
  apply: (value: unknown) => void;
1199
1237
  }
1200
- export interface RegisterDraftActionOptions {
1238
+ export type RegisterDraftActionOptions = {
1239
+ onSaved?: (result: ResourceFormSaved) => void | Promise<void>;
1201
1240
  actionType: string;
1202
1241
  label: string;
1203
1242
  description?: string;
1204
- resourceKey: string;
1205
- resourceId: string | null;
1206
1243
  /** Local form context identity (for example tenant and selected create owner); never grants authority. */
1207
1244
  scopeKey?: string;
1208
1245
  enabled: boolean;
1209
1246
  fields: Record<string, DraftFieldBinding>;
1210
1247
  /** Return invalid field keys for App-owned cross-field constraints, before any writer runs. */
1211
1248
  validateBatch?: (values: Readonly<Record<string, unknown>>) => readonly string[];
1212
- }
1249
+ } & ({
1250
+ resourceKey: string;
1251
+ resourceId: string | null;
1252
+ formKey?: never;
1253
+ saveAction?: never;
1254
+ } | {
1255
+ formKey: string;
1256
+ scopeKey: string;
1257
+ resourceKey?: never;
1258
+ resourceId?: never;
1259
+ onSaved?: never;
1260
+ saveAction?: AppFormSaveBinding;
1261
+ });
1213
1262
  export interface WorkSurfaceLabelInput {
1214
1263
  action: WorkSurfaceAction;
1215
1264
  resourceLabel: string;
@@ -1322,6 +1371,8 @@ export type PackageSurfaceLoader = () => Promise<{
1322
1371
  * surface is pulled into the package entry chunk and code-splitting is lost.
1323
1372
  */
1324
1373
  export interface PackageSurfaceOverrideRegistration {
1374
+ /** Explicit mode for a page without Resource route metadata; never grants API authority. */
1375
+ mode?: 'list' | 'read' | 'create' | 'edit';
1325
1376
  load: PackageSurfaceLoader;
1326
1377
  routePrefetcher?: AppRoutePrefetcher;
1327
1378
  }
@@ -1331,6 +1382,10 @@ export interface AutoRegisterPackageSurfacesOptions {
1331
1382
  appKey?: string;
1332
1383
  overview?: PackageSurfaceLoader;
1333
1384
  surfaces: Record<string, () => Promise<unknown>>;
1385
+ /** Lazy App-owned resource contract modules, keyed by their glob paths.
1386
+ * When supplied, it replaces the host's installed-contract lookup for this
1387
+ * registration, so isolated/revised Apps never mix installed metadata. */
1388
+ resourceContracts?: Record<string, () => Promise<unknown>>;
1334
1389
  overrides?: Record<string, PackageSurfaceOverride>;
1335
1390
  }
1336
1391
  export interface AppRoutePrefetchContext {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexia/sdk",
3
- "version": "0.6.6",
3
+ "version": "0.7.1",
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 scripts/organization-target-contract.mjs && node tests/ResourceInspectorRegistrationTest.mjs && node tests/SettingsPrimitivesTest.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",