@nexia/sdk 0.8.19 → 0.8.21

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,9 @@
1
+ ---
2
+ status: published
3
+ version: 0.8.20
4
+ date: 2026-11-03
5
+ title: Background approval submissions
6
+ description: Queue existing App approval requests and track their receipt.
7
+ ---
8
+
9
+ React SDK 0.8.20 adds `queueApprovalRequest` to submit an existing App request for background approval and return a durable submission ID. Use a stable idempotency key and adopt the matching Core host before switching a form. A receipt confirms acceptance, not approval completion; existing submission contracts remain supported. See the [approval contracts guide](https://developers.nexia.to/docs/app-sdk-approval-contracts) and [SDK source](https://www.npmjs.com/package/@nexia/sdk/v/0.8.20).
@@ -0,0 +1,9 @@
1
+ ---
2
+ status: published
3
+ version: 0.8.20
4
+ date: 2026-11-03
5
+ title: 백그라운드 결재 상신
6
+ description: 기존 App 상신 요청을 접수하고 진행 상태를 확인합니다.
7
+ ---
8
+
9
+ React SDK 0.8.20은 기존 App 요청을 백그라운드 결재로 접수하고 영속 접수 ID를 반환하는 `queueApprovalRequest`를 추가합니다. 안정적인 멱등성 키를 사용하고 양식을 전환하기 전에 대응 Core 호스트를 적용하세요. 접수는 결재 완료를 뜻하지 않으며 기존 상신 계약도 유지됩니다. [전자결재 계약 안내](https://developers.nexia.to/docs/app-sdk-approval-contracts)와 [SDK 소스](https://www.npmjs.com/package/@nexia/sdk/v/0.8.20)를 참고하세요.
@@ -0,0 +1,9 @@
1
+ ---
2
+ status: published
3
+ version: 0.8.21
4
+ date: 2026-11-05
5
+ title: User-task form context
6
+ description: Show host-provided task context in process forms.
7
+ ---
8
+
9
+ Process form widgets can receive optional `taskContext`, including the current sequential work item. Existing widgets remain compatible. Treat it as display context and keep server-side authorization and validation. Adopt matching Core support before relying on the field. See the [Business Process contracts](https://developers.nexia.to/docs/app-sdk-business-process-contracts) and [npm package](https://www.npmjs.com/package/@nexia/sdk/v/0.8.21).
@@ -0,0 +1,9 @@
1
+ ---
2
+ status: published
3
+ version: 0.8.21
4
+ date: 2026-11-05
5
+ title: 사용자 작업 폼 컨텍스트
6
+ description: 프로세스 폼에서 호스트가 제공한 작업 컨텍스트를 표시합니다.
7
+ ---
8
+
9
+ 프로세스 폼 위젯은 현재 순차 작업 항목 등을 담은 선택적 `taskContext`를 받을 수 있습니다. 기존 위젯은 호환됩니다. 화면 표시용 컨텍스트로 사용하고 서버의 권한 및 입력 검사를 유지하세요. 이 필드에 의존하기 전에 대응 Core를 적용하세요. [업무 프로세스 계약](https://developers.nexia.to/ko/docs/app-sdk-business-process-contracts)과 [npm 패키지](https://www.npmjs.com/package/@nexia/sdk/v/0.8.21)를 참고하세요.
@@ -0,0 +1,6 @@
1
+ import { type AxiosInstance, type AxiosRequestConfig } from 'axios';
2
+ import type { ApprovalBusinessFormSubmitResult } from './approval';
3
+ /** Queue the whole App submission; the ordinary handler still owns business validation.
4
+ * Preserve the caller's idempotency key across ambiguous responses. Acceptance is not a case.
5
+ */
6
+ export declare function queueApprovalRequest(api: AxiosInstance, legalEntityPublicId: string, path: string, body: Record<string, unknown>, config?: AxiosRequestConfig, appDraftRef?: string | null): Promise<ApprovalBusinessFormSubmitResult>;
@@ -0,0 +1,15 @@
1
+ import axios, { AxiosHeaders } from 'axios';
2
+ /** Queue the whole App submission; the ordinary handler still owns business validation.
3
+ * Preserve the caller's idempotency key across ambiguous responses. Acceptance is not a case.
4
+ */
5
+ export async function queueApprovalRequest(api, legalEntityPublicId, path, body, config = {}, appDraftRef) {
6
+ const headerKey = config.headers instanceof AxiosHeaders
7
+ ? config.headers.get('Idempotency-Key')
8
+ : Object.entries(config.headers ?? {}).find(([name]) => name.toLowerCase() === 'idempotency-key')?.[1];
9
+ const key = headerKey ?? body.idempotency_key;
10
+ if (typeof key !== 'string' || !key)
11
+ throw new Error('Approval submission requires a stable idempotency key.');
12
+ const uri = axios.getUri({ url: path, baseURL: '/api', params: config.params });
13
+ const { data } = await api.post('/approval-submissions/requests', { uri, body, legal_entity_public_id: legalEntityPublicId, app_draft_ref: appDraftRef ?? null }, { headers: { 'Idempotency-Key': key } });
14
+ return { submissionId: data.submission.public_id };
15
+ }
package/dist/index.d.ts CHANGED
@@ -34,6 +34,7 @@ export { isRetryableHandoffFailure } from "./handoff-result";
34
34
  export type { HandoffResultState } from "./handoff-result";
35
35
  export type { ApprovalActor, ApprovalBodySnapshot, ApprovalBusinessFormController, ApprovalBusinessFormBinding, ApprovalBusinessFormDraftResult, ApprovalBusinessFormEntryMode, ApprovalBusinessFormRegistration, ApprovalBusinessFormRegistry, ApprovalBusinessFormSlotPropsV2, ApprovalBusinessFormSubmitError, ApprovalBusinessFormSubmitEnvelope, ApprovalBusinessFormSubmitResult, ApprovalBusinessFormSubject, ApprovalBusinessFormTemplate, ApprovalBusinessFormWidgetLoader, ApprovalCase, ApprovalCirculationRecipient, ApprovalDocument, ApprovalDocumentField, ApprovalDocumentSection, ApprovalDocumentView, ApprovalDrafterIdentity, ApprovalResourceSummary, ApprovalResourceSummaryField, ApprovalLineResolutionCategory, ApprovalLineResolutionError, ApprovalLineStages, ApprovalLineStep, ApprovalState, ApprovalStepKind, ApprovalStep, ApprovalSupplementalBodySnapshot, } from "./approval";
36
36
  export { APPROVAL_STATES, APPROVAL_STEP_KINDS } from "./approval";
37
+ export { queueApprovalRequest } from "./approval-request";
37
38
  export type { BpmnEditorDocument, BpmnEditorElement, BpmnEditorNodeType, BpmnEditorProcess, DmnEditorDocument, DmnEditorHitPolicy, DmnEditorInputClause, DmnEditorOutputClause, DmnEditorRule, DmnEditorValueType, ProcessUserTaskFormController, ProcessUserTaskFormRegistrar, ProcessUserTaskFormRegistration, ProcessUserTaskFormRegistry, ProcessUserTaskFormSlotPropsV1, ProcessUserTaskFormWidgetLoader, ProcessUserTaskResourceRef, } from "./process";
38
39
  export { DMN_EDITOR_HIT_POLICIES } from "./process";
39
40
  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";
package/dist/index.js CHANGED
@@ -17,6 +17,7 @@ export { HANDOFF_RESULT_STATES, isHandoffResultState, isRetryableFailure, } from
17
17
  /** @deprecated Use isRetryableFailure. */
18
18
  export { isRetryableHandoffFailure } from "./handoff-result.js";
19
19
  export { APPROVAL_STATES, APPROVAL_STEP_KINDS } from "./approval.js";
20
+ export { queueApprovalRequest } from "./approval-request.js";
20
21
  export { DMN_EDITOR_HIT_POLICIES } from "./process.js";
21
22
  export { FavoriteButton, NEXIA_READ_ONLY_HEADER } from "./host.js";
22
23
  export { createSpreadsheetWorkbook } from "./spreadsheet.js";
package/dist/process.d.ts CHANGED
@@ -75,6 +75,8 @@ export interface ProcessUserTaskFormSlotPropsV1 {
75
75
  stateVersion: number;
76
76
  };
77
77
  resourceRef: ProcessUserTaskResourceRef | null;
78
+ /** Read-only activity data frozen by the host at task activation. */
79
+ taskContext?: Record<string, unknown>;
78
80
  registerController: (controller: ProcessUserTaskFormController | null) => void;
79
81
  }
80
82
  export type ProcessUserTaskFormWidgetLoader = () => Promise<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexia/sdk",
3
- "version": "0.8.19",
3
+ "version": "0.8.21",
4
4
  "description": "Frontend contracts for Nexia App Packages",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -34,7 +34,7 @@
34
34
  "scripts": {
35
35
  "build": "node scripts/build.mjs",
36
36
  "prepack": "npm run build",
37
- "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 && node tests/AppServicesTest.mjs && node tests/AppStylesTest.mjs",
37
+ "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 && node tests/AppServicesTest.mjs && node tests/AppStylesTest.mjs && node --test tests/ApprovalRequestTest.mjs",
38
38
  "test:wire-values": "node tests/WireValuesTest.mjs",
39
39
  "typecheck": "tsc -p tsconfig.json --noEmit",
40
40
  "test:resource-composition": "pnpm run build && node tests/ResourceCompositionFrontendContractsTest.mjs",