@selfhelp/shared 1.6.0 → 1.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.
- package/CHANGELOG.md +47 -0
- package/dist/index.d.mts +96 -3
- package/dist/index.d.ts +96 -3
- package/dist/index.js +9 -1
- package/dist/index.mjs +9 -1
- package/dist/plugin-sdk/index.d.mts +1 -1
- package/dist/plugin-sdk/index.d.ts +1 -1
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.d.ts +2 -2
- package/dist/{styles.registry-0MsmyRmF.d.mts → styles.registry-B147FVHY.d.mts} +32 -1
- package/dist/{styles.registry-CtpsJ4gS.d.ts → styles.registry-D49K8F5z.d.ts} +32 -1
- package/package.json +1 -1
- package/src/types/api/__tests__/system.test.ts +96 -0
- package/src/types/api/system.ts +66 -0
- package/src/types/index.ts +1 -0
- package/src/types/styles/auth.ts +1 -1
- package/src/types/styles/error.ts +44 -0
- package/src/types/styles/forms.ts +33 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,53 @@ All notable changes to `@selfhelp/shared` will be documented in this file.
|
|
|
9
9
|
|
|
10
10
|
This project follows semantic versioning.
|
|
11
11
|
|
|
12
|
+
## v1.7.0
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Error-page style contracts in a new `styles/error.ts` (re-exported from the
|
|
17
|
+
package root): `INoAccessStyle` (the 403 `no-access` / `no-access-guest`
|
|
18
|
+
pages), `INotFoundStyle` (the 404 page) and `IMissingStyle`. Each carries the
|
|
19
|
+
shared `title` / `message` / `button_label` (plus `login_label` /
|
|
20
|
+
`show_login` for the access-denied variants) copy fields and the
|
|
21
|
+
`mantine_color` / `mantine_radius` / `mantine_shadow` /
|
|
22
|
+
`mantine_button_variant` / `show_icon` presentation fields that the new
|
|
23
|
+
styled system error pages render.
|
|
24
|
+
- `IShowUserInputStyle` + `IShowUserInputEntry` (`styles/forms.ts`): the
|
|
25
|
+
contract for the new **showUserInput** style, which renders a form's
|
|
26
|
+
collected entries as a table. It covers the data-table feature flags
|
|
27
|
+
(`dt_sortable` / `dt_searching` / `dt_paginate` / `dt_info` /
|
|
28
|
+
`dt_default_order_column` / `dt_default_order_dir`), `csv_export`,
|
|
29
|
+
`delete_entry` with translatable `delete_modal_title` / `delete_modal_body`,
|
|
30
|
+
column remapping via `fields_map`, `own_entries_only` / `show_timestamp`, the
|
|
31
|
+
full `mantine_table_*` styling set, and the `entries` array — where each row
|
|
32
|
+
exposes `record_id`, `id_users` and the per-row `_can_delete` flag the
|
|
33
|
+
renderer uses to show a trash icon only for rows the current user may delete.
|
|
34
|
+
|
|
35
|
+
## v1.6.1
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- Frontend-only update contracts (the frontend ships independently of the core,
|
|
40
|
+
so an instance on the newest core can still move to a newer compatible
|
|
41
|
+
frontend): the `SYSTEM_ENDPOINTS.UPDATE_FRONTEND_RELEASES` /
|
|
42
|
+
`UPDATE_FRONTEND_PREFLIGHT` / `UPDATE_FRONTEND_REQUEST` path constants, the
|
|
43
|
+
`TUpdateKind = 'core' | 'frontend'` discriminator, `IFrontendUpdateRequest`
|
|
44
|
+
(`target_version` + `preflight_id` — no `accepted_migration_risk`, a frontend
|
|
45
|
+
swap is stateless), `IFrontendUpdateRequestResponse` (carries
|
|
46
|
+
`kind: 'frontend'` + `target_frontend_version`), and the
|
|
47
|
+
`IFrontendUpdateReleases(Response)` / `IFrontendUpdatePreflight(Response)`
|
|
48
|
+
aliases (the frontend reuses the core releases/preflight shapes).
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- `IUpdateStatus` gains two **required** fields: `kind` (`TUpdateKind`) and
|
|
53
|
+
`target_frontend_version` (`string | null`), so the status UI can label a
|
|
54
|
+
frontend-only operation correctly. Additive but required in the response (the
|
|
55
|
+
backend schema `responses/admin/update_status.json` requires both); consumers'
|
|
56
|
+
fixtures/mocks must add them (`kind: 'core'`, `target_frontend_version: null`
|
|
57
|
+
for a core/idle status).
|
|
58
|
+
|
|
12
59
|
## v1.6.0
|
|
13
60
|
|
|
14
61
|
### Added
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY,
|
|
1
|
+
import { f as IStyleWithSpacing, h as IContentField, T as TStyleName } from './styles.registry-B147FVHY.mjs';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, i as IAccordionItemStyle, j as IAccordionStyle, k as IActionIconStyle, l as IAlertStyle, m as IAspectRatioStyle, n as IAudioStyle, o as IAvatarStyle, p as IBackgroundImageStyle, q as IBadgeStyle, r as IBaseStyle, s as IBlockquoteStyle, t as IBoxStyle, u as IButtonStyle, v as ICardSegmentStyle, w as ICardStyle, x as ICarouselStyle, y as ICenterStyle, z as ICheckboxStyle, A as IChipStyle, C as ICodeStyle, D as IColorInputStyle, E as IColorPickerStyle, F as IComboboxStyle, G as IContainerStyle, H as IDatePickerStyle, J as IDividerStyle, K as IEntryListStyle, L as IEntryRecordDeleteStyle, M as IEntryRecordStyle, N as IFieldsetStyle, O as IFigureStyle, P as IFileInputStyle, Q as IFlexStyle, R as IFormLogStyle, U as IFormRecordStyle, V as IFormStyle, W as IGridColumnStyle, X as IGridStyle, Y as IGroupStyle, Z as IHighlightStyle, $ as IHtmlTagStyle, a0 as IImageStyle, a1 as IIndicatorStyle, a2 as IInputStyle, a3 as IKbdStyle, a4 as ILinkStyle, a5 as IListItemStyle, a6 as IListStyle, a7 as ILoginStyle, a8 as ILoopStyle, a9 as INotificationStyle, aa as INumberInputStyle, ab as IPaperStyle, a as IPluginStyleRegistryEntry, ac as IProfileStyle, ad as IProgressRootStyle, ae as IProgressSectionStyle, af as IProgressStyle, ag as IRadioStyle, ah as IRangeSliderStyle, ai as IRatingStyle, aj as IRegisterStyle, ak as IResetPasswordStyle, al as IRichTextEditorStyle, am as IScrollAreaStyle, an as ISegmentedControlStyle, ao as ISelectStyle, ap as IShowUserInputEntry, aq as IShowUserInputStyle, ar as ISimpleGridStyle, as as ISliderStyle, at as ISpaceStyle, au as ISpoilerStyle, av as IStackStyle, I as IStyleRegistryEntry, aw as ISwitchStyle, ax as ITabStyle, ay as ITabsStyle, az as ITextInputStyle, aA as ITextStyle, aB as ITextareaStyle, aC as IThemeIconStyle, aD as ITimelineStyle, aE as ITitleStyle, aF as ITwoFactorAuthStyle, aG as ITypographyStyle, aH as IUnknownStyle, aI as IValidateStyle, aJ as IVideoStyle, S as STYLE_REGISTRY, aK as TMantineAccordionChevronPosition, aL as TMantineAccordionDisableChevronRotation, aM as TMantineAccordionLoop, aN as TMantineAccordionMultiple, aO as TMantineBorder, aP as TMantineCardShadow, aQ as TMantineCheckboxLabelPosition, aR as TMantineCols, aS as TMantineDividerVariant, aT as TMantineGap, aU as TMantineGridOffset, aV as TMantineGridOrder, aW as TMantineHeight, aX as TMantineIconSize, aY as TMantineImageFit, aZ as TMantineLineClamp, a_ as TMantineListCenter, a$ as TMantineListStyleType, b0 as TMantineListType, b1 as TMantineListWithPadding, b2 as TMantinePaperShadow, b3 as TMantineProgressTransition, b4 as TMantineScrollAreaSize, b5 as TMantineScrollAreaType, b6 as TMantineTextAlign, b7 as TMantineTextDecoration, b8 as TMantineTextFontStyle, b9 as TMantineTextFontWeight, ba as TMantineTextInherit, bb as TMantineTextInputVariant, bc as TMantineTextSpan, bd as TMantineTextTransform, be as TMantineTextTruncate, bf as TMantineTextVariant, bg as TMantineTextareaAutosize, bh as TMantineTextareaResize, bi as TMantineTextareaVariant, bj as TMantineTimelineAlign, bk as TMantineTitleLineClamp, bl as TMantineTitleTextWrap, bm as TMantineTranslatable, bn as TMantineUseInputWrapper, bo as TMantineWidth, bp as TStyle, b as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, c as _resetPluginStyleRegistry, e as extendStyleRegistry, g as getMergedStyleRegistry, d as getPluginStyleRegistry } from './styles.registry-B147FVHY.mjs';
|
|
3
3
|
export { s as TMantineAccordionVariant, v as TMantineActionIconLoading, d as TMantineAlign, w as TMantineAllowNextClicks, x as TMantineAllowStepClick, y as TMantineAspectRatio, z as TMantineAutoContrast, o as TMantineAvatarVariant, n as TMantineBadgeVariant, A as TMantineBlock, B as TMantineCenterInline, C as TMantineChecked, D as TMantineChipChecked, E as TMantineChipMultiple, p as TMantineChipVariant, F as TMantineClampBehavior, G as TMantineCodeBlock, i as TMantineColor, H as TMantineColorFormat, I as TMantineColorInputSwatches, J as TMantineColorPickerSwatches, K as TMantineColorPickerSwatchesPerRow, L as TMantineCompact, M as TMantineContainerFluid, e as TMantineDirection, N as TMantineDisabled, k as TMantineFieldsetVariant, O as TMantineFileAccept, P as TMantineFileInputMultiple, Q as TMantineFluid, R as TMantineFullWidth, S as TMantineGridGrow, U as TMantineGridOverflow, g as TMantineGridSpan, V as TMantineGroupGrow, W as TMantineGroupWrap, X as TMantineGrow, Y as TMantineHighlight, q as TMantineIndicatorPosition, Z as TMantineInline, _ as TMantineIsLink, c as TMantineJustify, $ as TMantineKbdSize, a0 as TMantineLoading, a1 as TMantineMultiple, a2 as TMantineNotificationWithCloseButton, a3 as TMantineNumberInputDecimalScale, a4 as TMantineOpenInNewTab, h as TMantineOrientation, a5 as TMantineProcessing, T as TMantineRadius, a6 as TMantineRangeSliderMarks, a7 as TMantineRatingCount, a8 as TMantineRatingFractions, a9 as TMantineRatingReadonly, aa as TMantineReadonly, a as TMantineSize, ab as TMantineSpaceHorizontal, b as TMantineSpacing, l as TMantineSpoilerMaxHeight, ac as TMantineSwatches, ad as TMantineTabDisabled, t as TMantineTabsVariant, r as TMantineThemeIconVariant, u as TMantineTimelineLineVariant, j as TMantineTitleOrder, ae as TMantineUseMantineStyle, m as TMantineVariant, af as TMantineWithCloseButton, ag as TMantineWithIcon, f as TMantineWrap } from './common-B96dASgu.mjs';
|
|
4
4
|
export { TAnyStyleName, TPluginStyleImplMap, TStyleImplMap, getRegistryEntry, getRegistryEntryAny, getStylePluginId, isKnownStyleName, isRegisteredStyleName } from './registry/index.mjs';
|
|
5
5
|
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, TCanonicalColor, TCanonicalRadius, TCanonicalSpacing, colorToHex, radiusToPx, sizeToFontPx, spacingToPx } from './theme/index.mjs';
|
|
6
6
|
export { sharedTailwindExtend, sharedTailwindPreset } from './theme/tailwind.mjs';
|
|
7
7
|
|
|
8
|
+
interface INoAccessStyle extends IStyleWithSpacing {
|
|
9
|
+
style_name: 'noAccess';
|
|
10
|
+
title?: IContentField<string>;
|
|
11
|
+
message?: IContentField<string>;
|
|
12
|
+
button_label?: IContentField<string>;
|
|
13
|
+
login_label?: IContentField<string>;
|
|
14
|
+
show_login?: IContentField<string>;
|
|
15
|
+
mantine_color?: IContentField<string>;
|
|
16
|
+
mantine_radius?: IContentField<string>;
|
|
17
|
+
mantine_shadow?: IContentField<string>;
|
|
18
|
+
mantine_button_variant?: IContentField<string>;
|
|
19
|
+
show_icon?: IContentField<string>;
|
|
20
|
+
}
|
|
21
|
+
interface INotFoundStyle extends IStyleWithSpacing {
|
|
22
|
+
style_name: 'notFound';
|
|
23
|
+
title?: IContentField<string>;
|
|
24
|
+
message?: IContentField<string>;
|
|
25
|
+
button_label?: IContentField<string>;
|
|
26
|
+
login_label?: IContentField<string>;
|
|
27
|
+
mantine_color?: IContentField<string>;
|
|
28
|
+
mantine_radius?: IContentField<string>;
|
|
29
|
+
mantine_shadow?: IContentField<string>;
|
|
30
|
+
mantine_button_variant?: IContentField<string>;
|
|
31
|
+
show_icon?: IContentField<string>;
|
|
32
|
+
}
|
|
33
|
+
interface IMissingStyle extends IStyleWithSpacing {
|
|
34
|
+
style_name: 'missing';
|
|
35
|
+
title?: IContentField<string>;
|
|
36
|
+
message?: IContentField<string>;
|
|
37
|
+
button_label?: IContentField<string>;
|
|
38
|
+
mantine_color?: IContentField<string>;
|
|
39
|
+
mantine_radius?: IContentField<string>;
|
|
40
|
+
mantine_shadow?: IContentField<string>;
|
|
41
|
+
mantine_button_variant?: IContentField<string>;
|
|
42
|
+
show_icon?: IContentField<string>;
|
|
43
|
+
}
|
|
44
|
+
|
|
8
45
|
/**
|
|
9
46
|
* Comprehensive page type system, single source of truth for both apps.
|
|
10
47
|
*/
|
|
@@ -391,7 +428,12 @@ declare const SYSTEM_ENDPOINTS: {
|
|
|
391
428
|
readonly UPDATE_REQUEST: "/cms-api/v1/admin/system/update/request";
|
|
392
429
|
readonly UPDATE_STATUS: "/cms-api/v1/admin/system/update/status";
|
|
393
430
|
readonly UPDATE_RELEASES: "/cms-api/v1/admin/system/update/releases";
|
|
431
|
+
readonly UPDATE_FRONTEND_RELEASES: "/cms-api/v1/admin/system/update/frontend/releases";
|
|
432
|
+
readonly UPDATE_FRONTEND_PREFLIGHT: "/cms-api/v1/admin/system/update/frontend/preflight";
|
|
433
|
+
readonly UPDATE_FRONTEND_REQUEST: "/cms-api/v1/admin/system/update/frontend/request";
|
|
394
434
|
};
|
|
435
|
+
/** Discriminates a core (full-stack) update from a frontend-only update. */
|
|
436
|
+
type TUpdateKind = 'core' | 'frontend';
|
|
395
437
|
interface ISystemInstalledPlugin {
|
|
396
438
|
id: string;
|
|
397
439
|
version: string;
|
|
@@ -637,7 +679,19 @@ interface IUpdateStatus {
|
|
|
637
679
|
instance_id: string;
|
|
638
680
|
operation_id: string;
|
|
639
681
|
status: TUpdateOperationStatus;
|
|
682
|
+
/**
|
|
683
|
+
* Whether the latest operation is a full-stack core update or a frontend-only
|
|
684
|
+
* update. `idle` (no operation yet) reports `core`. Lets the status UI label a
|
|
685
|
+
* frontend swap correctly instead of implying a core upgrade.
|
|
686
|
+
*/
|
|
687
|
+
kind: TUpdateKind;
|
|
640
688
|
target_version: string;
|
|
689
|
+
/**
|
|
690
|
+
* The frontend version a `frontend`-kind operation targets; `null` for a
|
|
691
|
+
* core operation (the manager resolves the compatible frontend itself) and
|
|
692
|
+
* for the synthetic `idle` status.
|
|
693
|
+
*/
|
|
694
|
+
target_frontend_version: string | null;
|
|
641
695
|
progress_percent: number;
|
|
642
696
|
steps: IUpdateStep[];
|
|
643
697
|
requested_at: string;
|
|
@@ -651,6 +705,45 @@ type IUpdateRequestResponse = IBaseApiResponse<{
|
|
|
651
705
|
instance_id: string;
|
|
652
706
|
status: TUpdateOperationStatus;
|
|
653
707
|
}>;
|
|
708
|
+
/**
|
|
709
|
+
* POST /admin/system/update/frontend/request — request a FRONTEND-only update
|
|
710
|
+
* for THIS instance. Like {@link IUpdateRequest} it carries no `instance_id`
|
|
711
|
+
* (the backend derives + verifies it), but it also omits
|
|
712
|
+
* `accepted_migration_risk`/`typed_confirmation`: a frontend swap is stateless,
|
|
713
|
+
* so there is no destructive migration to confirm. The SelfHelp Manager
|
|
714
|
+
* re-resolves the signed frontend release and is the final authority on
|
|
715
|
+
* compatibility before it swaps the container.
|
|
716
|
+
*/
|
|
717
|
+
interface IFrontendUpdateRequest {
|
|
718
|
+
target_version: string;
|
|
719
|
+
preflight_id: string;
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* GET /admin/system/update/frontend/releases — frontend versions published in
|
|
723
|
+
* the official registry (newest first). Reuses {@link IUpdateReleases}:
|
|
724
|
+
* `current_version` is the instance's installed frontend version and
|
|
725
|
+
* `available: false` means the registry was unreachable (fall back to manual
|
|
726
|
+
* entry). Aliased for call-site clarity.
|
|
727
|
+
*/
|
|
728
|
+
type IFrontendUpdateReleases = IUpdateReleases;
|
|
729
|
+
type IFrontendUpdateReleasesResponse = IUpdateReleasesResponse;
|
|
730
|
+
/**
|
|
731
|
+
* GET /admin/system/update/frontend/preflight — lightweight compatibility
|
|
732
|
+
* verdict for a frontend-only target. Reuses {@link IUpdatePreflight}; the
|
|
733
|
+
* frontend is stateless so `database.destructive`/`requires_backup` are always
|
|
734
|
+
* false and the authoritative frontend ⇄ core + signature checks are deferred to
|
|
735
|
+
* the manager. Aliased for call-site clarity.
|
|
736
|
+
*/
|
|
737
|
+
type IFrontendUpdatePreflight = IUpdatePreflight;
|
|
738
|
+
type IFrontendUpdatePreflightResponse = IUpdatePreflightResponse;
|
|
739
|
+
/** POST /admin/system/update/frontend/request — accepted frontend-update record. */
|
|
740
|
+
type IFrontendUpdateRequestResponse = IBaseApiResponse<{
|
|
741
|
+
operation_id: string;
|
|
742
|
+
instance_id: string;
|
|
743
|
+
status: TUpdateOperationStatus;
|
|
744
|
+
kind: 'frontend';
|
|
745
|
+
target_frontend_version: string;
|
|
746
|
+
}>;
|
|
654
747
|
|
|
655
748
|
/**
|
|
656
749
|
* Cross-repo SelfHelp distribution contracts: registry index + release metadata
|
|
@@ -1353,4 +1446,4 @@ declare function transformPageData(apiPage: IRawPage): IPageItem;
|
|
|
1353
1446
|
*/
|
|
1354
1447
|
declare function transformPagesData(pages: IRawPage[] | null | undefined): IPageItem[];
|
|
1355
1448
|
|
|
1356
|
-
export { API_VERSION_PREFIX, type AdvisoryAffected, type AdvisoryFeed, type AdvisorySeverity, type BackupManifest, CLASS_PATTERNS, CLASS_REMAP, CLIENT_TYPE_MOBILE, CLIENT_TYPE_MOBILE_AND_WEB, CLIENT_TYPE_WEB, COLOR_NAMES, type CheckSeverity, type CompatibilityRules, type CoreRelease, type DatabaseMigrationMetadata, ENDPOINTS, type FrontendRelease, HEADER_CLIENT_TYPE, type IApiError, type IApiMeta, type IAssetSource, type IBaseApiResponse, type IBasePageInfo, type IBasePageSection, type IClassPattern, type IClassRemap, type ICompatibilityError, type IConditionContext, IContentField, type IEvaluatedCondition, type IForgotPasswordRequest, type IForgotPasswordResponse, type IFormDeleteRequest, type IFormDeleteResponse, type IFormResultLegacyFields, type IFormSubmitData, type IFormSubmitRequest, type IFormSubmitResponse, type IFormUpdateData, type IFormUpdateRequest, type IFormUpdateResponse, type IGetPageResponse, type IGetPagesResponse, type IJwtPayload, type ILanguage, type ILanguageItem, type ILanguagePreference, type ILanguagePreferenceUpdateResponse, type ILanguagesResponse, type ILoginRequest, type ILoginSuccessData, type ILoginSuccessResponse, type ILogoutSuccessResponse, type IMaintenanceSetRequest, type IMeta, type IPageAccessTypeInfo, type IPageContent, type IPageField, type IPageFieldTranslation, type IPageFieldsData, type IPageItem, type IPageSectionWithFields, type IPageSectionsData, type IRefreshRequest, type IRefreshSuccessResponse, type IResetPasswordRequest, type IResetPasswordResponse, type ISpacingValue, type ISystemAdvisories, type ISystemAdvisoriesResponse, type ISystemAdvisory, type ISystemAdvisoryAffected, type ISystemHealth, type ISystemHealthComponent, type ISystemHealthResponse, type ISystemInstalledPlugin, type ISystemMaintenance, type ISystemMaintenanceResponse, type ISystemVersion, type ISystemVersionResponse, type ITwoFactorRequiredData, type ITwoFactorRequiredResponse, type ITwoFactorVerifyRequest, type ITwoFactorVerifySuccessResponse, type IUpdatePreflight, type IUpdatePreflightCheck, type IUpdatePreflightOption, type IUpdatePreflightResponse, type IUpdateRelease, type IUpdateReleases, type IUpdateReleasesResponse, type IUpdateRequest, type IUpdateRequestResponse, type IUpdateStatus, type IUpdateStatusManager, type IUpdateStatusResponse, type IUpdateStep, type IUserData, type IUserDataResponse, type ImageRef, type InstalledPlugin, type InstanceImages, type InstanceLock, type InstanceManifest, type InstanceMode, type InstanceResourceConfig, type InstanceRouting, type InstanceStatus, type InstanceVersions, type InventoryInstanceEntry, LITERAL_CLASSES, type LockPluginEntry, type LockServiceEntry, PERMISSIONS, type PluginRelease, type PreflightCheck, type PreflightOption, type PreflightStatus, RELEASE_CHANNELS, type RegistryIndex, type RegistryReleaseRef, type ReleaseChannel, type RuntimeServicePolicy, type RuntimeServiceRange, SIZE_VALUES, SPACING_VALUES, SYSTEM_ENDPOINTS, type SchedulerRelease, type SecurityAdvisory, type ServerInventory, type ServiceBackendCompatibility, type SignatureBlock, type SupportBundleMeta, type TCalcedValues, type TClassDecision, type TClientType, type TPermission, type TPlatform, TStyleName, type TSystemAdvisorySeverity, type TSystemComponentStatus, type TSystemDeployment, type TSystemHealthOverall, type TUpdateCheckSeverity, type TUpdateOperationStatus, type TUpdatePreflightStatus, type TrustLevel, type TrustedKey, type TrustedKeysFile, type UpdatePreflightResult, type WorkerRelease, buildConditionContext, classifyClass, classifyClassString, evaluateCondition, findRemap, parseSpacing, replaceCalcedValues, resolveAssetSources, resolveAssetUrl, spacingToClasses, transformPageData, transformPagesData };
|
|
1449
|
+
export { API_VERSION_PREFIX, type AdvisoryAffected, type AdvisoryFeed, type AdvisorySeverity, type BackupManifest, CLASS_PATTERNS, CLASS_REMAP, CLIENT_TYPE_MOBILE, CLIENT_TYPE_MOBILE_AND_WEB, CLIENT_TYPE_WEB, COLOR_NAMES, type CheckSeverity, type CompatibilityRules, type CoreRelease, type DatabaseMigrationMetadata, ENDPOINTS, type FrontendRelease, HEADER_CLIENT_TYPE, type IApiError, type IApiMeta, type IAssetSource, type IBaseApiResponse, type IBasePageInfo, type IBasePageSection, type IClassPattern, type IClassRemap, type ICompatibilityError, type IConditionContext, IContentField, type IEvaluatedCondition, type IForgotPasswordRequest, type IForgotPasswordResponse, type IFormDeleteRequest, type IFormDeleteResponse, type IFormResultLegacyFields, type IFormSubmitData, type IFormSubmitRequest, type IFormSubmitResponse, type IFormUpdateData, type IFormUpdateRequest, type IFormUpdateResponse, type IFrontendUpdatePreflight, type IFrontendUpdatePreflightResponse, type IFrontendUpdateReleases, type IFrontendUpdateReleasesResponse, type IFrontendUpdateRequest, type IFrontendUpdateRequestResponse, type IGetPageResponse, type IGetPagesResponse, type IJwtPayload, type ILanguage, type ILanguageItem, type ILanguagePreference, type ILanguagePreferenceUpdateResponse, type ILanguagesResponse, type ILoginRequest, type ILoginSuccessData, type ILoginSuccessResponse, type ILogoutSuccessResponse, type IMaintenanceSetRequest, type IMeta, type IMissingStyle, type INoAccessStyle, type INotFoundStyle, type IPageAccessTypeInfo, type IPageContent, type IPageField, type IPageFieldTranslation, type IPageFieldsData, type IPageItem, type IPageSectionWithFields, type IPageSectionsData, type IRefreshRequest, type IRefreshSuccessResponse, type IResetPasswordRequest, type IResetPasswordResponse, type ISpacingValue, IStyleWithSpacing, type ISystemAdvisories, type ISystemAdvisoriesResponse, type ISystemAdvisory, type ISystemAdvisoryAffected, type ISystemHealth, type ISystemHealthComponent, type ISystemHealthResponse, type ISystemInstalledPlugin, type ISystemMaintenance, type ISystemMaintenanceResponse, type ISystemVersion, type ISystemVersionResponse, type ITwoFactorRequiredData, type ITwoFactorRequiredResponse, type ITwoFactorVerifyRequest, type ITwoFactorVerifySuccessResponse, type IUpdatePreflight, type IUpdatePreflightCheck, type IUpdatePreflightOption, type IUpdatePreflightResponse, type IUpdateRelease, type IUpdateReleases, type IUpdateReleasesResponse, type IUpdateRequest, type IUpdateRequestResponse, type IUpdateStatus, type IUpdateStatusManager, type IUpdateStatusResponse, type IUpdateStep, type IUserData, type IUserDataResponse, type ImageRef, type InstalledPlugin, type InstanceImages, type InstanceLock, type InstanceManifest, type InstanceMode, type InstanceResourceConfig, type InstanceRouting, type InstanceStatus, type InstanceVersions, type InventoryInstanceEntry, LITERAL_CLASSES, type LockPluginEntry, type LockServiceEntry, PERMISSIONS, type PluginRelease, type PreflightCheck, type PreflightOption, type PreflightStatus, RELEASE_CHANNELS, type RegistryIndex, type RegistryReleaseRef, type ReleaseChannel, type RuntimeServicePolicy, type RuntimeServiceRange, SIZE_VALUES, SPACING_VALUES, SYSTEM_ENDPOINTS, type SchedulerRelease, type SecurityAdvisory, type ServerInventory, type ServiceBackendCompatibility, type SignatureBlock, type SupportBundleMeta, type TCalcedValues, type TClassDecision, type TClientType, type TPermission, type TPlatform, TStyleName, type TSystemAdvisorySeverity, type TSystemComponentStatus, type TSystemDeployment, type TSystemHealthOverall, type TUpdateCheckSeverity, type TUpdateKind, type TUpdateOperationStatus, type TUpdatePreflightStatus, type TrustLevel, type TrustedKey, type TrustedKeysFile, type UpdatePreflightResult, type WorkerRelease, buildConditionContext, classifyClass, classifyClassString, evaluateCondition, findRemap, parseSpacing, replaceCalcedValues, resolveAssetSources, resolveAssetUrl, spacingToClasses, transformPageData, transformPagesData };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY,
|
|
1
|
+
import { f as IStyleWithSpacing, h as IContentField, T as TStyleName } from './styles.registry-D49K8F5z.js';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, i as IAccordionItemStyle, j as IAccordionStyle, k as IActionIconStyle, l as IAlertStyle, m as IAspectRatioStyle, n as IAudioStyle, o as IAvatarStyle, p as IBackgroundImageStyle, q as IBadgeStyle, r as IBaseStyle, s as IBlockquoteStyle, t as IBoxStyle, u as IButtonStyle, v as ICardSegmentStyle, w as ICardStyle, x as ICarouselStyle, y as ICenterStyle, z as ICheckboxStyle, A as IChipStyle, C as ICodeStyle, D as IColorInputStyle, E as IColorPickerStyle, F as IComboboxStyle, G as IContainerStyle, H as IDatePickerStyle, J as IDividerStyle, K as IEntryListStyle, L as IEntryRecordDeleteStyle, M as IEntryRecordStyle, N as IFieldsetStyle, O as IFigureStyle, P as IFileInputStyle, Q as IFlexStyle, R as IFormLogStyle, U as IFormRecordStyle, V as IFormStyle, W as IGridColumnStyle, X as IGridStyle, Y as IGroupStyle, Z as IHighlightStyle, $ as IHtmlTagStyle, a0 as IImageStyle, a1 as IIndicatorStyle, a2 as IInputStyle, a3 as IKbdStyle, a4 as ILinkStyle, a5 as IListItemStyle, a6 as IListStyle, a7 as ILoginStyle, a8 as ILoopStyle, a9 as INotificationStyle, aa as INumberInputStyle, ab as IPaperStyle, a as IPluginStyleRegistryEntry, ac as IProfileStyle, ad as IProgressRootStyle, ae as IProgressSectionStyle, af as IProgressStyle, ag as IRadioStyle, ah as IRangeSliderStyle, ai as IRatingStyle, aj as IRegisterStyle, ak as IResetPasswordStyle, al as IRichTextEditorStyle, am as IScrollAreaStyle, an as ISegmentedControlStyle, ao as ISelectStyle, ap as IShowUserInputEntry, aq as IShowUserInputStyle, ar as ISimpleGridStyle, as as ISliderStyle, at as ISpaceStyle, au as ISpoilerStyle, av as IStackStyle, I as IStyleRegistryEntry, aw as ISwitchStyle, ax as ITabStyle, ay as ITabsStyle, az as ITextInputStyle, aA as ITextStyle, aB as ITextareaStyle, aC as IThemeIconStyle, aD as ITimelineStyle, aE as ITitleStyle, aF as ITwoFactorAuthStyle, aG as ITypographyStyle, aH as IUnknownStyle, aI as IValidateStyle, aJ as IVideoStyle, S as STYLE_REGISTRY, aK as TMantineAccordionChevronPosition, aL as TMantineAccordionDisableChevronRotation, aM as TMantineAccordionLoop, aN as TMantineAccordionMultiple, aO as TMantineBorder, aP as TMantineCardShadow, aQ as TMantineCheckboxLabelPosition, aR as TMantineCols, aS as TMantineDividerVariant, aT as TMantineGap, aU as TMantineGridOffset, aV as TMantineGridOrder, aW as TMantineHeight, aX as TMantineIconSize, aY as TMantineImageFit, aZ as TMantineLineClamp, a_ as TMantineListCenter, a$ as TMantineListStyleType, b0 as TMantineListType, b1 as TMantineListWithPadding, b2 as TMantinePaperShadow, b3 as TMantineProgressTransition, b4 as TMantineScrollAreaSize, b5 as TMantineScrollAreaType, b6 as TMantineTextAlign, b7 as TMantineTextDecoration, b8 as TMantineTextFontStyle, b9 as TMantineTextFontWeight, ba as TMantineTextInherit, bb as TMantineTextInputVariant, bc as TMantineTextSpan, bd as TMantineTextTransform, be as TMantineTextTruncate, bf as TMantineTextVariant, bg as TMantineTextareaAutosize, bh as TMantineTextareaResize, bi as TMantineTextareaVariant, bj as TMantineTimelineAlign, bk as TMantineTitleLineClamp, bl as TMantineTitleTextWrap, bm as TMantineTranslatable, bn as TMantineUseInputWrapper, bo as TMantineWidth, bp as TStyle, b as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, c as _resetPluginStyleRegistry, e as extendStyleRegistry, g as getMergedStyleRegistry, d as getPluginStyleRegistry } from './styles.registry-D49K8F5z.js';
|
|
3
3
|
export { s as TMantineAccordionVariant, v as TMantineActionIconLoading, d as TMantineAlign, w as TMantineAllowNextClicks, x as TMantineAllowStepClick, y as TMantineAspectRatio, z as TMantineAutoContrast, o as TMantineAvatarVariant, n as TMantineBadgeVariant, A as TMantineBlock, B as TMantineCenterInline, C as TMantineChecked, D as TMantineChipChecked, E as TMantineChipMultiple, p as TMantineChipVariant, F as TMantineClampBehavior, G as TMantineCodeBlock, i as TMantineColor, H as TMantineColorFormat, I as TMantineColorInputSwatches, J as TMantineColorPickerSwatches, K as TMantineColorPickerSwatchesPerRow, L as TMantineCompact, M as TMantineContainerFluid, e as TMantineDirection, N as TMantineDisabled, k as TMantineFieldsetVariant, O as TMantineFileAccept, P as TMantineFileInputMultiple, Q as TMantineFluid, R as TMantineFullWidth, S as TMantineGridGrow, U as TMantineGridOverflow, g as TMantineGridSpan, V as TMantineGroupGrow, W as TMantineGroupWrap, X as TMantineGrow, Y as TMantineHighlight, q as TMantineIndicatorPosition, Z as TMantineInline, _ as TMantineIsLink, c as TMantineJustify, $ as TMantineKbdSize, a0 as TMantineLoading, a1 as TMantineMultiple, a2 as TMantineNotificationWithCloseButton, a3 as TMantineNumberInputDecimalScale, a4 as TMantineOpenInNewTab, h as TMantineOrientation, a5 as TMantineProcessing, T as TMantineRadius, a6 as TMantineRangeSliderMarks, a7 as TMantineRatingCount, a8 as TMantineRatingFractions, a9 as TMantineRatingReadonly, aa as TMantineReadonly, a as TMantineSize, ab as TMantineSpaceHorizontal, b as TMantineSpacing, l as TMantineSpoilerMaxHeight, ac as TMantineSwatches, ad as TMantineTabDisabled, t as TMantineTabsVariant, r as TMantineThemeIconVariant, u as TMantineTimelineLineVariant, j as TMantineTitleOrder, ae as TMantineUseMantineStyle, m as TMantineVariant, af as TMantineWithCloseButton, ag as TMantineWithIcon, f as TMantineWrap } from './common-B96dASgu.js';
|
|
4
4
|
export { TAnyStyleName, TPluginStyleImplMap, TStyleImplMap, getRegistryEntry, getRegistryEntryAny, getStylePluginId, isKnownStyleName, isRegisteredStyleName } from './registry/index.js';
|
|
5
5
|
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, TCanonicalColor, TCanonicalRadius, TCanonicalSpacing, colorToHex, radiusToPx, sizeToFontPx, spacingToPx } from './theme/index.js';
|
|
6
6
|
export { sharedTailwindExtend, sharedTailwindPreset } from './theme/tailwind.js';
|
|
7
7
|
|
|
8
|
+
interface INoAccessStyle extends IStyleWithSpacing {
|
|
9
|
+
style_name: 'noAccess';
|
|
10
|
+
title?: IContentField<string>;
|
|
11
|
+
message?: IContentField<string>;
|
|
12
|
+
button_label?: IContentField<string>;
|
|
13
|
+
login_label?: IContentField<string>;
|
|
14
|
+
show_login?: IContentField<string>;
|
|
15
|
+
mantine_color?: IContentField<string>;
|
|
16
|
+
mantine_radius?: IContentField<string>;
|
|
17
|
+
mantine_shadow?: IContentField<string>;
|
|
18
|
+
mantine_button_variant?: IContentField<string>;
|
|
19
|
+
show_icon?: IContentField<string>;
|
|
20
|
+
}
|
|
21
|
+
interface INotFoundStyle extends IStyleWithSpacing {
|
|
22
|
+
style_name: 'notFound';
|
|
23
|
+
title?: IContentField<string>;
|
|
24
|
+
message?: IContentField<string>;
|
|
25
|
+
button_label?: IContentField<string>;
|
|
26
|
+
login_label?: IContentField<string>;
|
|
27
|
+
mantine_color?: IContentField<string>;
|
|
28
|
+
mantine_radius?: IContentField<string>;
|
|
29
|
+
mantine_shadow?: IContentField<string>;
|
|
30
|
+
mantine_button_variant?: IContentField<string>;
|
|
31
|
+
show_icon?: IContentField<string>;
|
|
32
|
+
}
|
|
33
|
+
interface IMissingStyle extends IStyleWithSpacing {
|
|
34
|
+
style_name: 'missing';
|
|
35
|
+
title?: IContentField<string>;
|
|
36
|
+
message?: IContentField<string>;
|
|
37
|
+
button_label?: IContentField<string>;
|
|
38
|
+
mantine_color?: IContentField<string>;
|
|
39
|
+
mantine_radius?: IContentField<string>;
|
|
40
|
+
mantine_shadow?: IContentField<string>;
|
|
41
|
+
mantine_button_variant?: IContentField<string>;
|
|
42
|
+
show_icon?: IContentField<string>;
|
|
43
|
+
}
|
|
44
|
+
|
|
8
45
|
/**
|
|
9
46
|
* Comprehensive page type system, single source of truth for both apps.
|
|
10
47
|
*/
|
|
@@ -391,7 +428,12 @@ declare const SYSTEM_ENDPOINTS: {
|
|
|
391
428
|
readonly UPDATE_REQUEST: "/cms-api/v1/admin/system/update/request";
|
|
392
429
|
readonly UPDATE_STATUS: "/cms-api/v1/admin/system/update/status";
|
|
393
430
|
readonly UPDATE_RELEASES: "/cms-api/v1/admin/system/update/releases";
|
|
431
|
+
readonly UPDATE_FRONTEND_RELEASES: "/cms-api/v1/admin/system/update/frontend/releases";
|
|
432
|
+
readonly UPDATE_FRONTEND_PREFLIGHT: "/cms-api/v1/admin/system/update/frontend/preflight";
|
|
433
|
+
readonly UPDATE_FRONTEND_REQUEST: "/cms-api/v1/admin/system/update/frontend/request";
|
|
394
434
|
};
|
|
435
|
+
/** Discriminates a core (full-stack) update from a frontend-only update. */
|
|
436
|
+
type TUpdateKind = 'core' | 'frontend';
|
|
395
437
|
interface ISystemInstalledPlugin {
|
|
396
438
|
id: string;
|
|
397
439
|
version: string;
|
|
@@ -637,7 +679,19 @@ interface IUpdateStatus {
|
|
|
637
679
|
instance_id: string;
|
|
638
680
|
operation_id: string;
|
|
639
681
|
status: TUpdateOperationStatus;
|
|
682
|
+
/**
|
|
683
|
+
* Whether the latest operation is a full-stack core update or a frontend-only
|
|
684
|
+
* update. `idle` (no operation yet) reports `core`. Lets the status UI label a
|
|
685
|
+
* frontend swap correctly instead of implying a core upgrade.
|
|
686
|
+
*/
|
|
687
|
+
kind: TUpdateKind;
|
|
640
688
|
target_version: string;
|
|
689
|
+
/**
|
|
690
|
+
* The frontend version a `frontend`-kind operation targets; `null` for a
|
|
691
|
+
* core operation (the manager resolves the compatible frontend itself) and
|
|
692
|
+
* for the synthetic `idle` status.
|
|
693
|
+
*/
|
|
694
|
+
target_frontend_version: string | null;
|
|
641
695
|
progress_percent: number;
|
|
642
696
|
steps: IUpdateStep[];
|
|
643
697
|
requested_at: string;
|
|
@@ -651,6 +705,45 @@ type IUpdateRequestResponse = IBaseApiResponse<{
|
|
|
651
705
|
instance_id: string;
|
|
652
706
|
status: TUpdateOperationStatus;
|
|
653
707
|
}>;
|
|
708
|
+
/**
|
|
709
|
+
* POST /admin/system/update/frontend/request — request a FRONTEND-only update
|
|
710
|
+
* for THIS instance. Like {@link IUpdateRequest} it carries no `instance_id`
|
|
711
|
+
* (the backend derives + verifies it), but it also omits
|
|
712
|
+
* `accepted_migration_risk`/`typed_confirmation`: a frontend swap is stateless,
|
|
713
|
+
* so there is no destructive migration to confirm. The SelfHelp Manager
|
|
714
|
+
* re-resolves the signed frontend release and is the final authority on
|
|
715
|
+
* compatibility before it swaps the container.
|
|
716
|
+
*/
|
|
717
|
+
interface IFrontendUpdateRequest {
|
|
718
|
+
target_version: string;
|
|
719
|
+
preflight_id: string;
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* GET /admin/system/update/frontend/releases — frontend versions published in
|
|
723
|
+
* the official registry (newest first). Reuses {@link IUpdateReleases}:
|
|
724
|
+
* `current_version` is the instance's installed frontend version and
|
|
725
|
+
* `available: false` means the registry was unreachable (fall back to manual
|
|
726
|
+
* entry). Aliased for call-site clarity.
|
|
727
|
+
*/
|
|
728
|
+
type IFrontendUpdateReleases = IUpdateReleases;
|
|
729
|
+
type IFrontendUpdateReleasesResponse = IUpdateReleasesResponse;
|
|
730
|
+
/**
|
|
731
|
+
* GET /admin/system/update/frontend/preflight — lightweight compatibility
|
|
732
|
+
* verdict for a frontend-only target. Reuses {@link IUpdatePreflight}; the
|
|
733
|
+
* frontend is stateless so `database.destructive`/`requires_backup` are always
|
|
734
|
+
* false and the authoritative frontend ⇄ core + signature checks are deferred to
|
|
735
|
+
* the manager. Aliased for call-site clarity.
|
|
736
|
+
*/
|
|
737
|
+
type IFrontendUpdatePreflight = IUpdatePreflight;
|
|
738
|
+
type IFrontendUpdatePreflightResponse = IUpdatePreflightResponse;
|
|
739
|
+
/** POST /admin/system/update/frontend/request — accepted frontend-update record. */
|
|
740
|
+
type IFrontendUpdateRequestResponse = IBaseApiResponse<{
|
|
741
|
+
operation_id: string;
|
|
742
|
+
instance_id: string;
|
|
743
|
+
status: TUpdateOperationStatus;
|
|
744
|
+
kind: 'frontend';
|
|
745
|
+
target_frontend_version: string;
|
|
746
|
+
}>;
|
|
654
747
|
|
|
655
748
|
/**
|
|
656
749
|
* Cross-repo SelfHelp distribution contracts: registry index + release metadata
|
|
@@ -1353,4 +1446,4 @@ declare function transformPageData(apiPage: IRawPage): IPageItem;
|
|
|
1353
1446
|
*/
|
|
1354
1447
|
declare function transformPagesData(pages: IRawPage[] | null | undefined): IPageItem[];
|
|
1355
1448
|
|
|
1356
|
-
export { API_VERSION_PREFIX, type AdvisoryAffected, type AdvisoryFeed, type AdvisorySeverity, type BackupManifest, CLASS_PATTERNS, CLASS_REMAP, CLIENT_TYPE_MOBILE, CLIENT_TYPE_MOBILE_AND_WEB, CLIENT_TYPE_WEB, COLOR_NAMES, type CheckSeverity, type CompatibilityRules, type CoreRelease, type DatabaseMigrationMetadata, ENDPOINTS, type FrontendRelease, HEADER_CLIENT_TYPE, type IApiError, type IApiMeta, type IAssetSource, type IBaseApiResponse, type IBasePageInfo, type IBasePageSection, type IClassPattern, type IClassRemap, type ICompatibilityError, type IConditionContext, IContentField, type IEvaluatedCondition, type IForgotPasswordRequest, type IForgotPasswordResponse, type IFormDeleteRequest, type IFormDeleteResponse, type IFormResultLegacyFields, type IFormSubmitData, type IFormSubmitRequest, type IFormSubmitResponse, type IFormUpdateData, type IFormUpdateRequest, type IFormUpdateResponse, type IGetPageResponse, type IGetPagesResponse, type IJwtPayload, type ILanguage, type ILanguageItem, type ILanguagePreference, type ILanguagePreferenceUpdateResponse, type ILanguagesResponse, type ILoginRequest, type ILoginSuccessData, type ILoginSuccessResponse, type ILogoutSuccessResponse, type IMaintenanceSetRequest, type IMeta, type IPageAccessTypeInfo, type IPageContent, type IPageField, type IPageFieldTranslation, type IPageFieldsData, type IPageItem, type IPageSectionWithFields, type IPageSectionsData, type IRefreshRequest, type IRefreshSuccessResponse, type IResetPasswordRequest, type IResetPasswordResponse, type ISpacingValue, type ISystemAdvisories, type ISystemAdvisoriesResponse, type ISystemAdvisory, type ISystemAdvisoryAffected, type ISystemHealth, type ISystemHealthComponent, type ISystemHealthResponse, type ISystemInstalledPlugin, type ISystemMaintenance, type ISystemMaintenanceResponse, type ISystemVersion, type ISystemVersionResponse, type ITwoFactorRequiredData, type ITwoFactorRequiredResponse, type ITwoFactorVerifyRequest, type ITwoFactorVerifySuccessResponse, type IUpdatePreflight, type IUpdatePreflightCheck, type IUpdatePreflightOption, type IUpdatePreflightResponse, type IUpdateRelease, type IUpdateReleases, type IUpdateReleasesResponse, type IUpdateRequest, type IUpdateRequestResponse, type IUpdateStatus, type IUpdateStatusManager, type IUpdateStatusResponse, type IUpdateStep, type IUserData, type IUserDataResponse, type ImageRef, type InstalledPlugin, type InstanceImages, type InstanceLock, type InstanceManifest, type InstanceMode, type InstanceResourceConfig, type InstanceRouting, type InstanceStatus, type InstanceVersions, type InventoryInstanceEntry, LITERAL_CLASSES, type LockPluginEntry, type LockServiceEntry, PERMISSIONS, type PluginRelease, type PreflightCheck, type PreflightOption, type PreflightStatus, RELEASE_CHANNELS, type RegistryIndex, type RegistryReleaseRef, type ReleaseChannel, type RuntimeServicePolicy, type RuntimeServiceRange, SIZE_VALUES, SPACING_VALUES, SYSTEM_ENDPOINTS, type SchedulerRelease, type SecurityAdvisory, type ServerInventory, type ServiceBackendCompatibility, type SignatureBlock, type SupportBundleMeta, type TCalcedValues, type TClassDecision, type TClientType, type TPermission, type TPlatform, TStyleName, type TSystemAdvisorySeverity, type TSystemComponentStatus, type TSystemDeployment, type TSystemHealthOverall, type TUpdateCheckSeverity, type TUpdateOperationStatus, type TUpdatePreflightStatus, type TrustLevel, type TrustedKey, type TrustedKeysFile, type UpdatePreflightResult, type WorkerRelease, buildConditionContext, classifyClass, classifyClassString, evaluateCondition, findRemap, parseSpacing, replaceCalcedValues, resolveAssetSources, resolveAssetUrl, spacingToClasses, transformPageData, transformPagesData };
|
|
1449
|
+
export { API_VERSION_PREFIX, type AdvisoryAffected, type AdvisoryFeed, type AdvisorySeverity, type BackupManifest, CLASS_PATTERNS, CLASS_REMAP, CLIENT_TYPE_MOBILE, CLIENT_TYPE_MOBILE_AND_WEB, CLIENT_TYPE_WEB, COLOR_NAMES, type CheckSeverity, type CompatibilityRules, type CoreRelease, type DatabaseMigrationMetadata, ENDPOINTS, type FrontendRelease, HEADER_CLIENT_TYPE, type IApiError, type IApiMeta, type IAssetSource, type IBaseApiResponse, type IBasePageInfo, type IBasePageSection, type IClassPattern, type IClassRemap, type ICompatibilityError, type IConditionContext, IContentField, type IEvaluatedCondition, type IForgotPasswordRequest, type IForgotPasswordResponse, type IFormDeleteRequest, type IFormDeleteResponse, type IFormResultLegacyFields, type IFormSubmitData, type IFormSubmitRequest, type IFormSubmitResponse, type IFormUpdateData, type IFormUpdateRequest, type IFormUpdateResponse, type IFrontendUpdatePreflight, type IFrontendUpdatePreflightResponse, type IFrontendUpdateReleases, type IFrontendUpdateReleasesResponse, type IFrontendUpdateRequest, type IFrontendUpdateRequestResponse, type IGetPageResponse, type IGetPagesResponse, type IJwtPayload, type ILanguage, type ILanguageItem, type ILanguagePreference, type ILanguagePreferenceUpdateResponse, type ILanguagesResponse, type ILoginRequest, type ILoginSuccessData, type ILoginSuccessResponse, type ILogoutSuccessResponse, type IMaintenanceSetRequest, type IMeta, type IMissingStyle, type INoAccessStyle, type INotFoundStyle, type IPageAccessTypeInfo, type IPageContent, type IPageField, type IPageFieldTranslation, type IPageFieldsData, type IPageItem, type IPageSectionWithFields, type IPageSectionsData, type IRefreshRequest, type IRefreshSuccessResponse, type IResetPasswordRequest, type IResetPasswordResponse, type ISpacingValue, IStyleWithSpacing, type ISystemAdvisories, type ISystemAdvisoriesResponse, type ISystemAdvisory, type ISystemAdvisoryAffected, type ISystemHealth, type ISystemHealthComponent, type ISystemHealthResponse, type ISystemInstalledPlugin, type ISystemMaintenance, type ISystemMaintenanceResponse, type ISystemVersion, type ISystemVersionResponse, type ITwoFactorRequiredData, type ITwoFactorRequiredResponse, type ITwoFactorVerifyRequest, type ITwoFactorVerifySuccessResponse, type IUpdatePreflight, type IUpdatePreflightCheck, type IUpdatePreflightOption, type IUpdatePreflightResponse, type IUpdateRelease, type IUpdateReleases, type IUpdateReleasesResponse, type IUpdateRequest, type IUpdateRequestResponse, type IUpdateStatus, type IUpdateStatusManager, type IUpdateStatusResponse, type IUpdateStep, type IUserData, type IUserDataResponse, type ImageRef, type InstalledPlugin, type InstanceImages, type InstanceLock, type InstanceManifest, type InstanceMode, type InstanceResourceConfig, type InstanceRouting, type InstanceStatus, type InstanceVersions, type InventoryInstanceEntry, LITERAL_CLASSES, type LockPluginEntry, type LockServiceEntry, PERMISSIONS, type PluginRelease, type PreflightCheck, type PreflightOption, type PreflightStatus, RELEASE_CHANNELS, type RegistryIndex, type RegistryReleaseRef, type ReleaseChannel, type RuntimeServicePolicy, type RuntimeServiceRange, SIZE_VALUES, SPACING_VALUES, SYSTEM_ENDPOINTS, type SchedulerRelease, type SecurityAdvisory, type ServerInventory, type ServiceBackendCompatibility, type SignatureBlock, type SupportBundleMeta, type TCalcedValues, type TClassDecision, type TClientType, type TPermission, type TPlatform, TStyleName, type TSystemAdvisorySeverity, type TSystemComponentStatus, type TSystemDeployment, type TSystemHealthOverall, type TUpdateCheckSeverity, type TUpdateKind, type TUpdateOperationStatus, type TUpdatePreflightStatus, type TrustLevel, type TrustedKey, type TrustedKeysFile, type UpdatePreflightResult, type WorkerRelease, buildConditionContext, classifyClass, classifyClassString, evaluateCondition, findRemap, parseSpacing, replaceCalcedValues, resolveAssetSources, resolveAssetUrl, spacingToClasses, transformPageData, transformPagesData };
|
package/dist/index.js
CHANGED
|
@@ -147,7 +147,15 @@ var SYSTEM_ENDPOINTS = {
|
|
|
147
147
|
UPDATE_PREFLIGHT: `${SYSTEM_PREFIX}/update/preflight`,
|
|
148
148
|
UPDATE_REQUEST: `${SYSTEM_PREFIX}/update/request`,
|
|
149
149
|
UPDATE_STATUS: `${SYSTEM_PREFIX}/update/status`,
|
|
150
|
-
UPDATE_RELEASES: `${SYSTEM_PREFIX}/update/releases
|
|
150
|
+
UPDATE_RELEASES: `${SYSTEM_PREFIX}/update/releases`,
|
|
151
|
+
// Frontend-only update flow. The frontend ships independently of the core,
|
|
152
|
+
// so an instance already on the newest core can still move to a newer
|
|
153
|
+
// compatible frontend. These reuse the core preflight/releases response
|
|
154
|
+
// shapes; the request body omits `accepted_migration_risk` (a frontend swap
|
|
155
|
+
// is stateless — no destructive migration, no backup).
|
|
156
|
+
UPDATE_FRONTEND_RELEASES: `${SYSTEM_PREFIX}/update/frontend/releases`,
|
|
157
|
+
UPDATE_FRONTEND_PREFLIGHT: `${SYSTEM_PREFIX}/update/frontend/preflight`,
|
|
158
|
+
UPDATE_FRONTEND_REQUEST: `${SYSTEM_PREFIX}/update/frontend/request`
|
|
151
159
|
};
|
|
152
160
|
|
|
153
161
|
// src/types/distribution.ts
|
package/dist/index.mjs
CHANGED
|
@@ -60,7 +60,15 @@ var SYSTEM_ENDPOINTS = {
|
|
|
60
60
|
UPDATE_PREFLIGHT: `${SYSTEM_PREFIX}/update/preflight`,
|
|
61
61
|
UPDATE_REQUEST: `${SYSTEM_PREFIX}/update/request`,
|
|
62
62
|
UPDATE_STATUS: `${SYSTEM_PREFIX}/update/status`,
|
|
63
|
-
UPDATE_RELEASES: `${SYSTEM_PREFIX}/update/releases
|
|
63
|
+
UPDATE_RELEASES: `${SYSTEM_PREFIX}/update/releases`,
|
|
64
|
+
// Frontend-only update flow. The frontend ships independently of the core,
|
|
65
|
+
// so an instance already on the newest core can still move to a newer
|
|
66
|
+
// compatible frontend. These reuse the core preflight/releases response
|
|
67
|
+
// shapes; the request body omits `accepted_migration_risk` (a frontend swap
|
|
68
|
+
// is stateless — no destructive migration, no backup).
|
|
69
|
+
UPDATE_FRONTEND_RELEASES: `${SYSTEM_PREFIX}/update/frontend/releases`,
|
|
70
|
+
UPDATE_FRONTEND_PREFLIGHT: `${SYSTEM_PREFIX}/update/frontend/preflight`,
|
|
71
|
+
UPDATE_FRONTEND_REQUEST: `${SYSTEM_PREFIX}/update/frontend/request`
|
|
64
72
|
};
|
|
65
73
|
|
|
66
74
|
// src/types/distribution.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { I as IPluginManifest, a as IPluginManifestAdminPage, b as IPluginManifestApiRoute, c as IPluginManifestAsset, d as IPluginManifestCapability, e as IPluginManifestCompatibility, f as IPluginManifestConflict, g as IPluginManifestDataAccess, h as IPluginManifestDependency, i as IPluginManifestExternalHost, j as IPluginManifestFeatureFlag, k as IPluginManifestHealth, l as IPluginManifestLookupExtension, m as IPluginManifestMobile, n as IPluginManifestPermission, o as IPluginManifestRealtimeTopic, p as IPluginManifestScheduledJob, q as IPluginManifestSecurity, r as IPluginManifestStyle, s as IPluginManifestTrustLevel } from '../manifest-C8sBTLJb.mjs';
|
|
2
|
-
import { I as IStyleRegistryEntry } from '../styles.registry-
|
|
2
|
+
import { I as IStyleRegistryEntry } from '../styles.registry-B147FVHY.mjs';
|
|
3
3
|
import '../common-B96dASgu.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { I as IPluginManifest, a as IPluginManifestAdminPage, b as IPluginManifestApiRoute, c as IPluginManifestAsset, d as IPluginManifestCapability, e as IPluginManifestCompatibility, f as IPluginManifestConflict, g as IPluginManifestDataAccess, h as IPluginManifestDependency, i as IPluginManifestExternalHost, j as IPluginManifestFeatureFlag, k as IPluginManifestHealth, l as IPluginManifestLookupExtension, m as IPluginManifestMobile, n as IPluginManifestPermission, o as IPluginManifestRealtimeTopic, p as IPluginManifestScheduledJob, q as IPluginManifestSecurity, r as IPluginManifestStyle, s as IPluginManifestTrustLevel } from '../manifest-C8sBTLJb.js';
|
|
2
|
-
import { I as IStyleRegistryEntry } from '../styles.registry-
|
|
2
|
+
import { I as IStyleRegistryEntry } from '../styles.registry-D49K8F5z.js';
|
|
3
3
|
import '../common-B96dASgu.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry } from '../styles.registry-
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY, S as STYLE_REGISTRY, b as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, c as _resetPluginStyleRegistry, e as extendStyleRegistry, g as getMergedStyleRegistry, d as getPluginStyleRegistry } from '../styles.registry-
|
|
1
|
+
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry } from '../styles.registry-B147FVHY.mjs';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, S as STYLE_REGISTRY, b as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, c as _resetPluginStyleRegistry, e as extendStyleRegistry, g as getMergedStyleRegistry, d as getPluginStyleRegistry } from '../styles.registry-B147FVHY.mjs';
|
|
3
3
|
import '../common-B96dASgu.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/registry/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry } from '../styles.registry-
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY, S as STYLE_REGISTRY, b as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, c as _resetPluginStyleRegistry, e as extendStyleRegistry, g as getMergedStyleRegistry, d as getPluginStyleRegistry } from '../styles.registry-
|
|
1
|
+
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry } from '../styles.registry-D49K8F5z.js';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, S as STYLE_REGISTRY, b as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, c as _resetPluginStyleRegistry, e as extendStyleRegistry, g as getMergedStyleRegistry, d as getPluginStyleRegistry } from '../styles.registry-D49K8F5z.js';
|
|
3
3
|
import '../common-B96dASgu.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1027,6 +1027,37 @@ interface IProgressSectionStyle extends IBaseStyle {
|
|
|
1027
1027
|
mantine_tooltip_position?: IContentField<string>;
|
|
1028
1028
|
use_mantine_style?: IContentField<string>;
|
|
1029
1029
|
}
|
|
1030
|
+
interface IShowUserInputEntry {
|
|
1031
|
+
record_id: number;
|
|
1032
|
+
id_users: number;
|
|
1033
|
+
_can_delete?: boolean;
|
|
1034
|
+
[key: string]: unknown;
|
|
1035
|
+
}
|
|
1036
|
+
interface IShowUserInputStyle extends IBaseStyle {
|
|
1037
|
+
style_name: 'showUserInput';
|
|
1038
|
+
own_entries_only?: IContentField<string>;
|
|
1039
|
+
show_timestamp?: IContentField<string>;
|
|
1040
|
+
dt_sortable?: IContentField<string>;
|
|
1041
|
+
dt_searching?: IContentField<string>;
|
|
1042
|
+
dt_paginate?: IContentField<string>;
|
|
1043
|
+
dt_info?: IContentField<string>;
|
|
1044
|
+
dt_default_order_column?: IContentField<string>;
|
|
1045
|
+
dt_default_order_dir?: IContentField<string>;
|
|
1046
|
+
csv_export?: IContentField<string>;
|
|
1047
|
+
delete_entry?: IContentField<string>;
|
|
1048
|
+
fields_map?: IContentField<string>;
|
|
1049
|
+
delete_modal_title?: IContentField<string>;
|
|
1050
|
+
delete_modal_body?: IContentField<string>;
|
|
1051
|
+
mantine_spacing_margin_padding?: IContentField<string>;
|
|
1052
|
+
mantine_table_striped?: IContentField<string>;
|
|
1053
|
+
mantine_table_highlight_on_hover?: IContentField<string>;
|
|
1054
|
+
mantine_table_with_table_border?: IContentField<string>;
|
|
1055
|
+
mantine_table_with_column_borders?: IContentField<string>;
|
|
1056
|
+
mantine_table_with_row_borders?: IContentField<string>;
|
|
1057
|
+
mantine_table_sticky_header?: IContentField<string>;
|
|
1058
|
+
mantine_table_caption_side?: IContentField<string>;
|
|
1059
|
+
entries?: IShowUserInputEntry[];
|
|
1060
|
+
}
|
|
1030
1061
|
|
|
1031
1062
|
type TMantineAccordionMultiple = '0' | '1';
|
|
1032
1063
|
type TMantineAccordionChevronPosition = 'left' | 'right';
|
|
@@ -2320,4 +2351,4 @@ declare function getPluginStyleRegistry(): Record<string, IPluginStyleRegistryEn
|
|
|
2320
2351
|
*/
|
|
2321
2352
|
declare function _resetPluginStyleRegistry(): void;
|
|
2322
2353
|
|
|
2323
|
-
export { type
|
|
2354
|
+
export { type IHtmlTagStyle as $, type IChipStyle as A, BASE_STYLE_REGISTRY as B, type ICodeStyle as C, type IColorInputStyle as D, type IColorPickerStyle as E, type IComboboxStyle as F, type IContainerStyle as G, type IDatePickerStyle as H, type IStyleRegistryEntry as I, type IDividerStyle as J, type IEntryListStyle as K, type IEntryRecordDeleteStyle as L, type IEntryRecordStyle as M, type IFieldsetStyle as N, type IFigureStyle as O, type IFileInputStyle as P, type IFlexStyle as Q, type IFormLogStyle as R, STYLE_REGISTRY as S, type TStyleName as T, type IFormRecordStyle as U, type IFormStyle as V, type IGridColumnStyle as W, type IGridStyle as X, type IGroupStyle as Y, type IHighlightStyle as Z, type _AssertRegistryMatchesStyleName as _, type IPluginStyleRegistryEntry as a, type TMantineListStyleType as a$, type IImageStyle as a0, type IIndicatorStyle as a1, type IInputStyle as a2, type IKbdStyle as a3, type ILinkStyle as a4, type IListItemStyle as a5, type IListStyle as a6, type ILoginStyle as a7, type ILoopStyle as a8, type INotificationStyle as a9, type ITextStyle as aA, type ITextareaStyle as aB, type IThemeIconStyle as aC, type ITimelineStyle as aD, type ITitleStyle as aE, type ITwoFactorAuthStyle as aF, type ITypographyStyle as aG, type IUnknownStyle as aH, type IValidateStyle as aI, type IVideoStyle as aJ, type TMantineAccordionChevronPosition as aK, type TMantineAccordionDisableChevronRotation as aL, type TMantineAccordionLoop as aM, type TMantineAccordionMultiple as aN, type TMantineBorder as aO, type TMantineCardShadow as aP, type TMantineCheckboxLabelPosition as aQ, type TMantineCols as aR, type TMantineDividerVariant as aS, type TMantineGap as aT, type TMantineGridOffset as aU, type TMantineGridOrder as aV, type TMantineHeight as aW, type TMantineIconSize as aX, type TMantineImageFit as aY, type TMantineLineClamp as aZ, type TMantineListCenter as a_, type INumberInputStyle as aa, type IPaperStyle as ab, type IProfileStyle as ac, type IProgressRootStyle as ad, type IProgressSectionStyle as ae, type IProgressStyle as af, type IRadioStyle as ag, type IRangeSliderStyle as ah, type IRatingStyle as ai, type IRegisterStyle as aj, type IResetPasswordStyle as ak, type IRichTextEditorStyle as al, type IScrollAreaStyle as am, type ISegmentedControlStyle as an, type ISelectStyle as ao, type IShowUserInputEntry as ap, type IShowUserInputStyle as aq, type ISimpleGridStyle as ar, type ISliderStyle as as, type ISpaceStyle as at, type ISpoilerStyle as au, type IStackStyle as av, type ISwitchStyle as aw, type ITabStyle as ax, type ITabsStyle as ay, type ITextInputStyle as az, type TStyleRegistryKey as b, type TMantineListType as b0, type TMantineListWithPadding as b1, type TMantinePaperShadow as b2, type TMantineProgressTransition as b3, type TMantineScrollAreaSize as b4, type TMantineScrollAreaType as b5, type TMantineTextAlign as b6, type TMantineTextDecoration as b7, type TMantineTextFontStyle as b8, type TMantineTextFontWeight as b9, type TMantineTextInherit as ba, type TMantineTextInputVariant as bb, type TMantineTextSpan as bc, type TMantineTextTransform as bd, type TMantineTextTruncate as be, type TMantineTextVariant as bf, type TMantineTextareaAutosize as bg, type TMantineTextareaResize as bh, type TMantineTextareaVariant as bi, type TMantineTimelineAlign as bj, type TMantineTitleLineClamp as bk, type TMantineTitleTextWrap as bl, type TMantineTranslatable as bm, type TMantineUseInputWrapper as bn, type TMantineWidth as bo, type TStyle as bp, _resetPluginStyleRegistry as c, getPluginStyleRegistry as d, extendStyleRegistry as e, type IStyleWithSpacing as f, getMergedStyleRegistry as g, type IContentField as h, type IAccordionItemStyle as i, type IAccordionStyle as j, type IActionIconStyle as k, type IAlertStyle as l, type IAspectRatioStyle as m, type IAudioStyle as n, type IAvatarStyle as o, type IBackgroundImageStyle as p, type IBadgeStyle as q, type IBaseStyle as r, type IBlockquoteStyle as s, type IBoxStyle as t, type IButtonStyle as u, type ICardSegmentStyle as v, type ICardStyle as w, type ICarouselStyle as x, type ICenterStyle as y, type ICheckboxStyle as z };
|
|
@@ -1027,6 +1027,37 @@ interface IProgressSectionStyle extends IBaseStyle {
|
|
|
1027
1027
|
mantine_tooltip_position?: IContentField<string>;
|
|
1028
1028
|
use_mantine_style?: IContentField<string>;
|
|
1029
1029
|
}
|
|
1030
|
+
interface IShowUserInputEntry {
|
|
1031
|
+
record_id: number;
|
|
1032
|
+
id_users: number;
|
|
1033
|
+
_can_delete?: boolean;
|
|
1034
|
+
[key: string]: unknown;
|
|
1035
|
+
}
|
|
1036
|
+
interface IShowUserInputStyle extends IBaseStyle {
|
|
1037
|
+
style_name: 'showUserInput';
|
|
1038
|
+
own_entries_only?: IContentField<string>;
|
|
1039
|
+
show_timestamp?: IContentField<string>;
|
|
1040
|
+
dt_sortable?: IContentField<string>;
|
|
1041
|
+
dt_searching?: IContentField<string>;
|
|
1042
|
+
dt_paginate?: IContentField<string>;
|
|
1043
|
+
dt_info?: IContentField<string>;
|
|
1044
|
+
dt_default_order_column?: IContentField<string>;
|
|
1045
|
+
dt_default_order_dir?: IContentField<string>;
|
|
1046
|
+
csv_export?: IContentField<string>;
|
|
1047
|
+
delete_entry?: IContentField<string>;
|
|
1048
|
+
fields_map?: IContentField<string>;
|
|
1049
|
+
delete_modal_title?: IContentField<string>;
|
|
1050
|
+
delete_modal_body?: IContentField<string>;
|
|
1051
|
+
mantine_spacing_margin_padding?: IContentField<string>;
|
|
1052
|
+
mantine_table_striped?: IContentField<string>;
|
|
1053
|
+
mantine_table_highlight_on_hover?: IContentField<string>;
|
|
1054
|
+
mantine_table_with_table_border?: IContentField<string>;
|
|
1055
|
+
mantine_table_with_column_borders?: IContentField<string>;
|
|
1056
|
+
mantine_table_with_row_borders?: IContentField<string>;
|
|
1057
|
+
mantine_table_sticky_header?: IContentField<string>;
|
|
1058
|
+
mantine_table_caption_side?: IContentField<string>;
|
|
1059
|
+
entries?: IShowUserInputEntry[];
|
|
1060
|
+
}
|
|
1030
1061
|
|
|
1031
1062
|
type TMantineAccordionMultiple = '0' | '1';
|
|
1032
1063
|
type TMantineAccordionChevronPosition = 'left' | 'right';
|
|
@@ -2320,4 +2351,4 @@ declare function getPluginStyleRegistry(): Record<string, IPluginStyleRegistryEn
|
|
|
2320
2351
|
*/
|
|
2321
2352
|
declare function _resetPluginStyleRegistry(): void;
|
|
2322
2353
|
|
|
2323
|
-
export { type
|
|
2354
|
+
export { type IHtmlTagStyle as $, type IChipStyle as A, BASE_STYLE_REGISTRY as B, type ICodeStyle as C, type IColorInputStyle as D, type IColorPickerStyle as E, type IComboboxStyle as F, type IContainerStyle as G, type IDatePickerStyle as H, type IStyleRegistryEntry as I, type IDividerStyle as J, type IEntryListStyle as K, type IEntryRecordDeleteStyle as L, type IEntryRecordStyle as M, type IFieldsetStyle as N, type IFigureStyle as O, type IFileInputStyle as P, type IFlexStyle as Q, type IFormLogStyle as R, STYLE_REGISTRY as S, type TStyleName as T, type IFormRecordStyle as U, type IFormStyle as V, type IGridColumnStyle as W, type IGridStyle as X, type IGroupStyle as Y, type IHighlightStyle as Z, type _AssertRegistryMatchesStyleName as _, type IPluginStyleRegistryEntry as a, type TMantineListStyleType as a$, type IImageStyle as a0, type IIndicatorStyle as a1, type IInputStyle as a2, type IKbdStyle as a3, type ILinkStyle as a4, type IListItemStyle as a5, type IListStyle as a6, type ILoginStyle as a7, type ILoopStyle as a8, type INotificationStyle as a9, type ITextStyle as aA, type ITextareaStyle as aB, type IThemeIconStyle as aC, type ITimelineStyle as aD, type ITitleStyle as aE, type ITwoFactorAuthStyle as aF, type ITypographyStyle as aG, type IUnknownStyle as aH, type IValidateStyle as aI, type IVideoStyle as aJ, type TMantineAccordionChevronPosition as aK, type TMantineAccordionDisableChevronRotation as aL, type TMantineAccordionLoop as aM, type TMantineAccordionMultiple as aN, type TMantineBorder as aO, type TMantineCardShadow as aP, type TMantineCheckboxLabelPosition as aQ, type TMantineCols as aR, type TMantineDividerVariant as aS, type TMantineGap as aT, type TMantineGridOffset as aU, type TMantineGridOrder as aV, type TMantineHeight as aW, type TMantineIconSize as aX, type TMantineImageFit as aY, type TMantineLineClamp as aZ, type TMantineListCenter as a_, type INumberInputStyle as aa, type IPaperStyle as ab, type IProfileStyle as ac, type IProgressRootStyle as ad, type IProgressSectionStyle as ae, type IProgressStyle as af, type IRadioStyle as ag, type IRangeSliderStyle as ah, type IRatingStyle as ai, type IRegisterStyle as aj, type IResetPasswordStyle as ak, type IRichTextEditorStyle as al, type IScrollAreaStyle as am, type ISegmentedControlStyle as an, type ISelectStyle as ao, type IShowUserInputEntry as ap, type IShowUserInputStyle as aq, type ISimpleGridStyle as ar, type ISliderStyle as as, type ISpaceStyle as at, type ISpoilerStyle as au, type IStackStyle as av, type ISwitchStyle as aw, type ITabStyle as ax, type ITabsStyle as ay, type ITextInputStyle as az, type TStyleRegistryKey as b, type TMantineListType as b0, type TMantineListWithPadding as b1, type TMantinePaperShadow as b2, type TMantineProgressTransition as b3, type TMantineScrollAreaSize as b4, type TMantineScrollAreaType as b5, type TMantineTextAlign as b6, type TMantineTextDecoration as b7, type TMantineTextFontStyle as b8, type TMantineTextFontWeight as b9, type TMantineTextInherit as ba, type TMantineTextInputVariant as bb, type TMantineTextSpan as bc, type TMantineTextTransform as bd, type TMantineTextTruncate as be, type TMantineTextVariant as bf, type TMantineTextareaAutosize as bg, type TMantineTextareaResize as bh, type TMantineTextareaVariant as bi, type TMantineTimelineAlign as bj, type TMantineTitleLineClamp as bk, type TMantineTitleTextWrap as bl, type TMantineTranslatable as bm, type TMantineUseInputWrapper as bn, type TMantineWidth as bo, type TStyle as bp, _resetPluginStyleRegistry as c, getPluginStyleRegistry as d, extendStyleRegistry as e, type IStyleWithSpacing as f, getMergedStyleRegistry as g, type IContentField as h, type IAccordionItemStyle as i, type IAccordionStyle as j, type IActionIconStyle as k, type IAlertStyle as l, type IAspectRatioStyle as m, type IAudioStyle as n, type IAvatarStyle as o, type IBackgroundImageStyle as p, type IBadgeStyle as q, type IBaseStyle as r, type IBlockquoteStyle as s, type IBoxStyle as t, type IButtonStyle as u, type ICardSegmentStyle as v, type ICardStyle as w, type ICarouselStyle as x, type ICenterStyle as y, type ICheckboxStyle as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selfhelp/shared",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Shared TypeScript package for SelfHelp web frontend and mobile app: style registry, types, API contracts, Mantine theme tokens, condition + interpolation engines, CMS class allow-list.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
import { describe, expect, it } from 'vitest';
|
|
7
7
|
import { SYSTEM_ENDPOINTS } from '../system';
|
|
8
8
|
import type {
|
|
9
|
+
IFrontendUpdatePreflight,
|
|
10
|
+
IFrontendUpdateReleases,
|
|
11
|
+
IFrontendUpdateRequest,
|
|
12
|
+
IFrontendUpdateRequestResponse,
|
|
9
13
|
IMaintenanceSetRequest,
|
|
10
14
|
ISystemAdvisories,
|
|
11
15
|
ISystemAdvisoriesResponse,
|
|
@@ -19,6 +23,7 @@ import type {
|
|
|
19
23
|
IUpdateStatus,
|
|
20
24
|
IUpdateStatusResponse,
|
|
21
25
|
TSystemAdvisorySeverity,
|
|
26
|
+
TUpdateKind,
|
|
22
27
|
TUpdateOperationStatus,
|
|
23
28
|
} from '../system';
|
|
24
29
|
|
|
@@ -38,6 +43,13 @@ describe('system maintenance contracts', () => {
|
|
|
38
43
|
expect(SYSTEM_ENDPOINTS.UPDATE_PREFLIGHT).toBe('/cms-api/v1/admin/system/update/preflight');
|
|
39
44
|
expect(SYSTEM_ENDPOINTS.UPDATE_REQUEST).toBe('/cms-api/v1/admin/system/update/request');
|
|
40
45
|
expect(SYSTEM_ENDPOINTS.UPDATE_STATUS).toBe('/cms-api/v1/admin/system/update/status');
|
|
46
|
+
expect(SYSTEM_ENDPOINTS.UPDATE_RELEASES).toBe('/cms-api/v1/admin/system/update/releases');
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('exposes the frontend-only update endpoints under update/frontend', () => {
|
|
50
|
+
expect(SYSTEM_ENDPOINTS.UPDATE_FRONTEND_RELEASES).toBe('/cms-api/v1/admin/system/update/frontend/releases');
|
|
51
|
+
expect(SYSTEM_ENDPOINTS.UPDATE_FRONTEND_PREFLIGHT).toBe('/cms-api/v1/admin/system/update/frontend/preflight');
|
|
52
|
+
expect(SYSTEM_ENDPOINTS.UPDATE_FRONTEND_REQUEST).toBe('/cms-api/v1/admin/system/update/frontend/request');
|
|
41
53
|
});
|
|
42
54
|
|
|
43
55
|
it('advisories model the registry feed filtered to installed components', () => {
|
|
@@ -168,7 +180,9 @@ describe('system maintenance contracts', () => {
|
|
|
168
180
|
instance_id: 'inst-a',
|
|
169
181
|
operation_id: 'op-001',
|
|
170
182
|
status: 'running',
|
|
183
|
+
kind: 'core',
|
|
171
184
|
target_version: '1.5.0',
|
|
185
|
+
target_frontend_version: null,
|
|
172
186
|
progress_percent: 42,
|
|
173
187
|
steps: [{ name: 'backup', status: 'succeeded' }],
|
|
174
188
|
requested_at: '2026-06-08T00:00:00Z',
|
|
@@ -231,7 +245,9 @@ describe('system maintenance contracts', () => {
|
|
|
231
245
|
instance_id: 'inst-a',
|
|
232
246
|
operation_id: 'op-term',
|
|
233
247
|
status: s,
|
|
248
|
+
kind: 'core',
|
|
234
249
|
target_version: '8.0.1',
|
|
250
|
+
target_frontend_version: null,
|
|
235
251
|
progress_percent: 100,
|
|
236
252
|
steps: [],
|
|
237
253
|
requested_at: '2026-06-08T00:00:00Z',
|
|
@@ -271,7 +287,9 @@ describe('system maintenance contracts', () => {
|
|
|
271
287
|
instance_id: 'inst-a',
|
|
272
288
|
operation_id: 'op-001',
|
|
273
289
|
status: 'succeeded',
|
|
290
|
+
kind: 'core',
|
|
274
291
|
target_version: '8.0.1',
|
|
292
|
+
target_frontend_version: null,
|
|
275
293
|
progress_percent: 100,
|
|
276
294
|
steps: [{ name: 'migrate', status: 'succeeded' }],
|
|
277
295
|
requested_at: '2026-06-08T00:00:00Z',
|
|
@@ -284,4 +302,82 @@ describe('system maintenance contracts', () => {
|
|
|
284
302
|
expect(requested.status).toBe(202);
|
|
285
303
|
expect(statusResponse.data.status).toBe('succeeded');
|
|
286
304
|
});
|
|
305
|
+
|
|
306
|
+
it('frontend-only update request omits instance_id AND the destructive-migration risk fields', () => {
|
|
307
|
+
// A frontend swap is stateless: there is no destructive migration to
|
|
308
|
+
// confirm, so — unlike IUpdateRequest — the frontend request body has no
|
|
309
|
+
// `accepted_migration_risk`/`typed_confirmation`, and (like every update
|
|
310
|
+
// request) no `instance_id` (the backend derives + verifies it).
|
|
311
|
+
const req: IFrontendUpdateRequest = { target_version: '0.1.7', preflight_id: 'fe-pf-001' };
|
|
312
|
+
const keys = Object.keys(req);
|
|
313
|
+
expect(keys).not.toContain('instance_id');
|
|
314
|
+
expect(keys).not.toContain('accepted_migration_risk');
|
|
315
|
+
expect(keys).not.toContain('typed_confirmation');
|
|
316
|
+
expect(keys.sort()).toEqual(['preflight_id', 'target_version']);
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
it('frontend releases + preflight reuse the core shapes but the preflight is never destructive', () => {
|
|
320
|
+
const releases: IFrontendUpdateReleases = {
|
|
321
|
+
available: true,
|
|
322
|
+
current_version: '0.1.5',
|
|
323
|
+
releases: [
|
|
324
|
+
{ version: '0.1.7', channel: 'stable', blocked: false },
|
|
325
|
+
{ version: '0.1.5', channel: 'stable', blocked: false },
|
|
326
|
+
],
|
|
327
|
+
};
|
|
328
|
+
const preflight: IFrontendUpdatePreflight = {
|
|
329
|
+
preflight_id: 'fe-pf-001',
|
|
330
|
+
status: 'ok',
|
|
331
|
+
instance_id: 'inst-a',
|
|
332
|
+
current_version: '0.1.5',
|
|
333
|
+
target_version: '0.1.7',
|
|
334
|
+
checks: [{ code: 'resource', severity: 'info', message: 'Manager performs the authoritative checks.' }],
|
|
335
|
+
options: [{ type: 'frontend', version: '0.1.7', label: 'SelfHelp frontend 0.1.7' }],
|
|
336
|
+
// The frontend is stateless: a swap is never destructive and needs no backup.
|
|
337
|
+
database: { destructive: false, requires_backup: false, manual_confirmation_required: false },
|
|
338
|
+
rollback: { automatic_before_migrations: true, automatic_after_destructive_migrations: true },
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
expect(releases.releases[0]?.version).toBe('0.1.7');
|
|
342
|
+
expect(preflight.database.destructive).toBe(false);
|
|
343
|
+
expect(preflight.database.requires_backup).toBe(false);
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
it('a frontend-kind status/response carries the targeted frontend version', () => {
|
|
347
|
+
const kinds: TUpdateKind[] = ['core', 'frontend'];
|
|
348
|
+
expect(kinds).toEqual(['core', 'frontend']);
|
|
349
|
+
|
|
350
|
+
const status: IUpdateStatus = {
|
|
351
|
+
instance_id: 'inst-a',
|
|
352
|
+
operation_id: 'op-fe-1',
|
|
353
|
+
status: 'update_running',
|
|
354
|
+
kind: 'frontend',
|
|
355
|
+
target_version: '0.1.7',
|
|
356
|
+
target_frontend_version: '0.1.7',
|
|
357
|
+
progress_percent: 50,
|
|
358
|
+
steps: [{ name: 'pull', status: 'succeeded' }],
|
|
359
|
+
requested_at: '2026-06-15T00:00:00Z',
|
|
360
|
+
updated_at: '2026-06-15T00:01:00Z',
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
const accepted: IFrontendUpdateRequestResponse = {
|
|
364
|
+
status: 202,
|
|
365
|
+
message: 'Accepted',
|
|
366
|
+
error: null,
|
|
367
|
+
logged_in: true,
|
|
368
|
+
meta: { version: 'v1', timestamp: '2026-06-15T00:00:00Z' },
|
|
369
|
+
data: {
|
|
370
|
+
operation_id: 'op-fe-1',
|
|
371
|
+
instance_id: 'inst-a',
|
|
372
|
+
status: 'requested',
|
|
373
|
+
kind: 'frontend',
|
|
374
|
+
target_frontend_version: '0.1.7',
|
|
375
|
+
},
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
expect(status.kind).toBe('frontend');
|
|
379
|
+
expect(status.target_frontend_version).toBe('0.1.7');
|
|
380
|
+
expect(accepted.data.kind).toBe('frontend');
|
|
381
|
+
expect(accepted.data.target_frontend_version).toBe('0.1.7');
|
|
382
|
+
});
|
|
287
383
|
});
|
package/src/types/api/system.ts
CHANGED
|
@@ -27,8 +27,19 @@ export const SYSTEM_ENDPOINTS = {
|
|
|
27
27
|
UPDATE_REQUEST: `${SYSTEM_PREFIX}/update/request`,
|
|
28
28
|
UPDATE_STATUS: `${SYSTEM_PREFIX}/update/status`,
|
|
29
29
|
UPDATE_RELEASES: `${SYSTEM_PREFIX}/update/releases`,
|
|
30
|
+
// Frontend-only update flow. The frontend ships independently of the core,
|
|
31
|
+
// so an instance already on the newest core can still move to a newer
|
|
32
|
+
// compatible frontend. These reuse the core preflight/releases response
|
|
33
|
+
// shapes; the request body omits `accepted_migration_risk` (a frontend swap
|
|
34
|
+
// is stateless — no destructive migration, no backup).
|
|
35
|
+
UPDATE_FRONTEND_RELEASES: `${SYSTEM_PREFIX}/update/frontend/releases`,
|
|
36
|
+
UPDATE_FRONTEND_PREFLIGHT: `${SYSTEM_PREFIX}/update/frontend/preflight`,
|
|
37
|
+
UPDATE_FRONTEND_REQUEST: `${SYSTEM_PREFIX}/update/frontend/request`,
|
|
30
38
|
} as const;
|
|
31
39
|
|
|
40
|
+
/** Discriminates a core (full-stack) update from a frontend-only update. */
|
|
41
|
+
export type TUpdateKind = 'core' | 'frontend';
|
|
42
|
+
|
|
32
43
|
export interface ISystemInstalledPlugin {
|
|
33
44
|
id: string;
|
|
34
45
|
version: string;
|
|
@@ -321,7 +332,19 @@ export interface IUpdateStatus {
|
|
|
321
332
|
instance_id: string;
|
|
322
333
|
operation_id: string;
|
|
323
334
|
status: TUpdateOperationStatus;
|
|
335
|
+
/**
|
|
336
|
+
* Whether the latest operation is a full-stack core update or a frontend-only
|
|
337
|
+
* update. `idle` (no operation yet) reports `core`. Lets the status UI label a
|
|
338
|
+
* frontend swap correctly instead of implying a core upgrade.
|
|
339
|
+
*/
|
|
340
|
+
kind: TUpdateKind;
|
|
324
341
|
target_version: string;
|
|
342
|
+
/**
|
|
343
|
+
* The frontend version a `frontend`-kind operation targets; `null` for a
|
|
344
|
+
* core operation (the manager resolves the compatible frontend itself) and
|
|
345
|
+
* for the synthetic `idle` status.
|
|
346
|
+
*/
|
|
347
|
+
target_frontend_version: string | null;
|
|
325
348
|
progress_percent: number;
|
|
326
349
|
steps: IUpdateStep[];
|
|
327
350
|
requested_at: string;
|
|
@@ -336,3 +359,46 @@ export type IUpdateRequestResponse = IBaseApiResponse<{
|
|
|
336
359
|
instance_id: string;
|
|
337
360
|
status: TUpdateOperationStatus;
|
|
338
361
|
}>;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* POST /admin/system/update/frontend/request — request a FRONTEND-only update
|
|
365
|
+
* for THIS instance. Like {@link IUpdateRequest} it carries no `instance_id`
|
|
366
|
+
* (the backend derives + verifies it), but it also omits
|
|
367
|
+
* `accepted_migration_risk`/`typed_confirmation`: a frontend swap is stateless,
|
|
368
|
+
* so there is no destructive migration to confirm. The SelfHelp Manager
|
|
369
|
+
* re-resolves the signed frontend release and is the final authority on
|
|
370
|
+
* compatibility before it swaps the container.
|
|
371
|
+
*/
|
|
372
|
+
export interface IFrontendUpdateRequest {
|
|
373
|
+
target_version: string;
|
|
374
|
+
preflight_id: string;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* GET /admin/system/update/frontend/releases — frontend versions published in
|
|
379
|
+
* the official registry (newest first). Reuses {@link IUpdateReleases}:
|
|
380
|
+
* `current_version` is the instance's installed frontend version and
|
|
381
|
+
* `available: false` means the registry was unreachable (fall back to manual
|
|
382
|
+
* entry). Aliased for call-site clarity.
|
|
383
|
+
*/
|
|
384
|
+
export type IFrontendUpdateReleases = IUpdateReleases;
|
|
385
|
+
export type IFrontendUpdateReleasesResponse = IUpdateReleasesResponse;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* GET /admin/system/update/frontend/preflight — lightweight compatibility
|
|
389
|
+
* verdict for a frontend-only target. Reuses {@link IUpdatePreflight}; the
|
|
390
|
+
* frontend is stateless so `database.destructive`/`requires_backup` are always
|
|
391
|
+
* false and the authoritative frontend ⇄ core + signature checks are deferred to
|
|
392
|
+
* the manager. Aliased for call-site clarity.
|
|
393
|
+
*/
|
|
394
|
+
export type IFrontendUpdatePreflight = IUpdatePreflight;
|
|
395
|
+
export type IFrontendUpdatePreflightResponse = IUpdatePreflightResponse;
|
|
396
|
+
|
|
397
|
+
/** POST /admin/system/update/frontend/request — accepted frontend-update record. */
|
|
398
|
+
export type IFrontendUpdateRequestResponse = IBaseApiResponse<{
|
|
399
|
+
operation_id: string;
|
|
400
|
+
instance_id: string;
|
|
401
|
+
status: TUpdateOperationStatus;
|
|
402
|
+
kind: 'frontend';
|
|
403
|
+
target_frontend_version: string;
|
|
404
|
+
}>;
|
package/src/types/index.ts
CHANGED
package/src/types/styles/auth.ts
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
import type { IContentField, IStyleWithSpacing } from './base';
|
|
6
|
+
|
|
7
|
+
export interface INoAccessStyle extends IStyleWithSpacing {
|
|
8
|
+
style_name: 'noAccess';
|
|
9
|
+
title?: IContentField<string>;
|
|
10
|
+
message?: IContentField<string>;
|
|
11
|
+
button_label?: IContentField<string>;
|
|
12
|
+
login_label?: IContentField<string>;
|
|
13
|
+
show_login?: IContentField<string>;
|
|
14
|
+
mantine_color?: IContentField<string>;
|
|
15
|
+
mantine_radius?: IContentField<string>;
|
|
16
|
+
mantine_shadow?: IContentField<string>;
|
|
17
|
+
mantine_button_variant?: IContentField<string>;
|
|
18
|
+
show_icon?: IContentField<string>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface INotFoundStyle extends IStyleWithSpacing {
|
|
22
|
+
style_name: 'notFound';
|
|
23
|
+
title?: IContentField<string>;
|
|
24
|
+
message?: IContentField<string>;
|
|
25
|
+
button_label?: IContentField<string>;
|
|
26
|
+
login_label?: IContentField<string>;
|
|
27
|
+
mantine_color?: IContentField<string>;
|
|
28
|
+
mantine_radius?: IContentField<string>;
|
|
29
|
+
mantine_shadow?: IContentField<string>;
|
|
30
|
+
mantine_button_variant?: IContentField<string>;
|
|
31
|
+
show_icon?: IContentField<string>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface IMissingStyle extends IStyleWithSpacing {
|
|
35
|
+
style_name: 'missing';
|
|
36
|
+
title?: IContentField<string>;
|
|
37
|
+
message?: IContentField<string>;
|
|
38
|
+
button_label?: IContentField<string>;
|
|
39
|
+
mantine_color?: IContentField<string>;
|
|
40
|
+
mantine_radius?: IContentField<string>;
|
|
41
|
+
mantine_shadow?: IContentField<string>;
|
|
42
|
+
mantine_button_variant?: IContentField<string>;
|
|
43
|
+
show_icon?: IContentField<string>;
|
|
44
|
+
}
|
|
@@ -437,3 +437,36 @@ export interface IProgressSectionStyle extends IBaseStyle {
|
|
|
437
437
|
mantine_tooltip_position?: IContentField<string>;
|
|
438
438
|
use_mantine_style?: IContentField<string>;
|
|
439
439
|
}
|
|
440
|
+
|
|
441
|
+
export interface IShowUserInputEntry {
|
|
442
|
+
record_id: number;
|
|
443
|
+
id_users: number;
|
|
444
|
+
_can_delete?: boolean;
|
|
445
|
+
[key: string]: unknown;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export interface IShowUserInputStyle extends IBaseStyle {
|
|
449
|
+
style_name: 'showUserInput';
|
|
450
|
+
own_entries_only?: IContentField<string>;
|
|
451
|
+
show_timestamp?: IContentField<string>;
|
|
452
|
+
dt_sortable?: IContentField<string>;
|
|
453
|
+
dt_searching?: IContentField<string>;
|
|
454
|
+
dt_paginate?: IContentField<string>;
|
|
455
|
+
dt_info?: IContentField<string>;
|
|
456
|
+
dt_default_order_column?: IContentField<string>;
|
|
457
|
+
dt_default_order_dir?: IContentField<string>;
|
|
458
|
+
csv_export?: IContentField<string>;
|
|
459
|
+
delete_entry?: IContentField<string>;
|
|
460
|
+
fields_map?: IContentField<string>;
|
|
461
|
+
delete_modal_title?: IContentField<string>;
|
|
462
|
+
delete_modal_body?: IContentField<string>;
|
|
463
|
+
mantine_spacing_margin_padding?: IContentField<string>;
|
|
464
|
+
mantine_table_striped?: IContentField<string>;
|
|
465
|
+
mantine_table_highlight_on_hover?: IContentField<string>;
|
|
466
|
+
mantine_table_with_table_border?: IContentField<string>;
|
|
467
|
+
mantine_table_with_column_borders?: IContentField<string>;
|
|
468
|
+
mantine_table_with_row_borders?: IContentField<string>;
|
|
469
|
+
mantine_table_sticky_header?: IContentField<string>;
|
|
470
|
+
mantine_table_caption_side?: IContentField<string>;
|
|
471
|
+
entries?: IShowUserInputEntry[];
|
|
472
|
+
}
|