@moh-sso/config 0.0.0-stage → 1.4.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/README.md +20 -2
- package/dist/_types/packages/config/src/appMeta.d.ts +3 -0
- package/dist/_types/packages/config/src/index.d.ts +6 -0
- package/dist/_types/packages/config/src/lib/constants/api.constants.d.ts +178 -0
- package/dist/_types/packages/config/src/lib/constants/document-templates.d.ts +11 -0
- package/dist/_types/packages/config/src/lib/errors/errorMessages.d.ts +2 -0
- package/dist/_types/packages/config/src/lib/errors/errorSeverity.d.ts +3 -0
- package/dist/_types/packages/config/src/lib/errors/errorTypes.d.ts +1 -0
- package/dist/_types/packages/types/src/index.d.ts +6 -0
- package/dist/_types/packages/types/src/types/announcement-summary.types.d.ts +16 -0
- package/dist/_types/packages/types/src/types/client-role.types.d.ts +6 -0
- package/dist/_types/packages/types/src/types/client.types.d.ts +46 -0
- package/dist/_types/packages/types/src/types/document-processing.types.d.ts +1 -0
- package/dist/_types/packages/types/src/types/notifications.types.d.ts +96 -0
- package/dist/_types/packages/types/src/types/system-navigation.types.d.ts +18 -0
- package/dist/_types/packages/ui/src/accessibility/index.d.ts +1 -0
- package/dist/_types/packages/ui/src/accessibility/useFocusTrap.d.ts +10 -0
- package/dist/_types/packages/ui/src/branding/BuildMeta.d.ts +6 -0
- package/dist/_types/packages/ui/src/branding/PublicFooter.d.ts +6 -0
- package/dist/_types/packages/ui/src/branding/index.d.ts +2 -0
- package/dist/_types/packages/ui/src/data-display/DataTablePagination.d.ts +12 -0
- package/dist/_types/packages/ui/src/data-display/DataTableShell.d.ts +35 -0
- package/dist/_types/packages/ui/src/data-display/RowActionsCell.d.ts +7 -0
- package/dist/_types/packages/ui/src/data-display/TableEmptyState.d.ts +8 -0
- package/dist/_types/packages/ui/src/data-display/TableStatusTag.d.ts +8 -0
- package/dist/_types/packages/ui/src/data-display/index.d.ts +5 -0
- package/dist/_types/packages/ui/src/feedback/comingsoon/ComingSoon.d.ts +7 -0
- package/dist/_types/packages/ui/src/feedback/emptystate/EmptyState.d.ts +15 -0
- package/dist/_types/packages/ui/src/feedback/errorstate/ErrorState.d.ts +14 -0
- package/dist/_types/packages/ui/src/feedback/errorstate/MicrofrontendErrorBoundary.d.ts +16 -0
- package/dist/_types/packages/ui/src/feedback/index.d.ts +5 -0
- package/dist/_types/packages/ui/src/feedback/loadingstate/LoadingState.d.ts +5 -0
- package/dist/_types/packages/ui/src/forms/CaseFormsGrid.d.ts +1 -0
- package/dist/_types/packages/ui/src/forms/index.d.ts +1 -0
- package/dist/_types/packages/ui/src/index.d.ts +16 -0
- package/dist/_types/packages/ui/src/layout/PageShell/PageShell.d.ts +9 -0
- package/dist/_types/packages/ui/src/layout/SectionCard/SectionCard.d.ts +11 -0
- package/dist/_types/packages/ui/src/layout/index.d.ts +2 -0
- package/dist/_types/packages/ui/src/navigation/appmenu/AppGridContent.d.ts +12 -0
- package/dist/_types/packages/ui/src/navigation/appmenu/AppMenu.component.d.ts +6 -0
- package/dist/_types/packages/ui/src/navigation/appmenu/AppMenuItem.component.d.ts +13 -0
- package/dist/_types/packages/ui/src/navigation/appmenu/appMenuGroups.d.ts +11 -0
- package/dist/_types/packages/ui/src/navigation/breadcrumbs/AppBreadcrumbs.d.ts +12 -0
- package/dist/_types/packages/ui/src/navigation/breadcrumbs/BreadcrumbBar.d.ts +10 -0
- package/dist/_types/packages/ui/src/navigation/index.d.ts +2 -0
- package/dist/_types/packages/ui/src/navigation/sidenav/ClientSideNav.d.ts +14 -0
- package/dist/_types/packages/ui/src/notifications/FormInlineAlert.d.ts +7 -0
- package/dist/_types/packages/ui/src/notifications/NotificationsPanel.d.ts +14 -0
- package/dist/_types/packages/ui/src/notifications/index.d.ts +4 -0
- package/dist/_types/packages/ui/src/notifications/toast/ToastProvider.d.ts +20 -0
- package/dist/_types/packages/ui/src/notifications/toast/useToast.d.ts +20 -0
- package/dist/_types/packages/ui/src/overlays/header-panel/ReusableHeaderPanel.d.ts +17 -0
- package/dist/_types/packages/ui/src/overlays/header-panel/header-panel.context.d.ts +23 -0
- package/dist/_types/packages/ui/src/overlays/index.d.ts +4 -0
- package/dist/_types/packages/ui/src/overlays/modal/ReusableModal.d.ts +20 -0
- package/dist/_types/packages/ui/src/overlays/modal/modal.context.d.ts +14 -0
- package/dist/_types/packages/ui/src/shell/ExternalAppHeader.d.ts +22 -0
- package/dist/_types/packages/ui/src/shell/PublicHeader.component.d.ts +8 -0
- package/dist/_types/packages/ui/src/shell/UserHeader.component.d.ts +17 -0
- package/dist/_types/packages/ui/src/shell/index.d.ts +5 -0
- package/dist/_types/packages/ui/src/theme/ThemeProvider.d.ts +8 -0
- package/dist/_types/packages/ui/src/theme/index.d.ts +1 -0
- package/dist/_types/packages/ui/src/utils/severity.d.ts +22 -0
- package/dist/_types/packages/ui/src/utils/status.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +310 -0
- package/package.json +33 -4
package/README.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Config Package
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@moh-sso/config` contains shared frontend configuration helpers and constants.
|
|
4
|
+
|
|
5
|
+
## Responsibilities
|
|
6
|
+
|
|
7
|
+
- Provide runtime and build-time configuration access.
|
|
8
|
+
- Keep shared constants in one package.
|
|
9
|
+
- Support shell and app configuration without importing shell internals.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { API } from "@moh-sso/config";
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Development
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm run build -w @moh-sso/config
|
|
21
|
+
```
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
export declare const API: {
|
|
2
|
+
readonly serviceBase: any;
|
|
3
|
+
readonly root: string;
|
|
4
|
+
readonly version: "v1";
|
|
5
|
+
readonly base: string;
|
|
6
|
+
readonly build: {
|
|
7
|
+
readonly version: () => string;
|
|
8
|
+
};
|
|
9
|
+
readonly auth: {
|
|
10
|
+
readonly base: `${string}/auth`;
|
|
11
|
+
readonly login: () => string;
|
|
12
|
+
readonly launch: () => string;
|
|
13
|
+
readonly callback: () => string;
|
|
14
|
+
readonly refresh: () => string;
|
|
15
|
+
readonly logout: () => string;
|
|
16
|
+
readonly me: () => string;
|
|
17
|
+
};
|
|
18
|
+
readonly healthContexts: {
|
|
19
|
+
readonly mine: () => string;
|
|
20
|
+
readonly explanation: (contextId: string) => string;
|
|
21
|
+
readonly select: () => string;
|
|
22
|
+
readonly admin: () => string;
|
|
23
|
+
readonly userAssignments: (userId: string) => string;
|
|
24
|
+
readonly groupAssignments: (groupId: string) => string;
|
|
25
|
+
};
|
|
26
|
+
readonly clients: {
|
|
27
|
+
readonly base: `${string}/clients`;
|
|
28
|
+
readonly list: () => string;
|
|
29
|
+
readonly byId: (id: string) => string;
|
|
30
|
+
readonly create: () => string;
|
|
31
|
+
readonly delete: (id: string) => string;
|
|
32
|
+
readonly update: (id: string) => string;
|
|
33
|
+
readonly roles: {
|
|
34
|
+
readonly list: (clientId: string) => string;
|
|
35
|
+
readonly create: (clientId: string) => string;
|
|
36
|
+
readonly delete: (clientId: string, role: string) => string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly users: {
|
|
40
|
+
readonly base: `${string}/users`;
|
|
41
|
+
readonly list: () => string;
|
|
42
|
+
readonly byId: (id: string) => string;
|
|
43
|
+
readonly create: () => string;
|
|
44
|
+
readonly delete: (id: string) => string;
|
|
45
|
+
readonly update: (id: string) => string;
|
|
46
|
+
readonly resetPassword: (id: string) => string;
|
|
47
|
+
};
|
|
48
|
+
readonly visualizer: {
|
|
49
|
+
readonly themes: () => string;
|
|
50
|
+
readonly theme: () => string;
|
|
51
|
+
readonly hierarchy: () => string;
|
|
52
|
+
readonly dataValues: () => string;
|
|
53
|
+
readonly datasets: () => string;
|
|
54
|
+
readonly dataElements: () => string;
|
|
55
|
+
};
|
|
56
|
+
readonly issue: {
|
|
57
|
+
readonly list: () => string;
|
|
58
|
+
};
|
|
59
|
+
readonly dataValidation: {
|
|
60
|
+
readonly dqa: {
|
|
61
|
+
readonly tables: {
|
|
62
|
+
readonly list: () => string;
|
|
63
|
+
readonly upsert: () => string;
|
|
64
|
+
readonly remove: (tableId: string) => string;
|
|
65
|
+
};
|
|
66
|
+
readonly columns: (table: string) => string;
|
|
67
|
+
readonly rules: {
|
|
68
|
+
readonly list: (tableId?: string) => string;
|
|
69
|
+
readonly upsert: () => string;
|
|
70
|
+
readonly compile: () => string;
|
|
71
|
+
readonly mapping: {
|
|
72
|
+
readonly preview: () => string;
|
|
73
|
+
readonly apply: () => string;
|
|
74
|
+
};
|
|
75
|
+
readonly remove: (tableId: string, code: string) => string;
|
|
76
|
+
};
|
|
77
|
+
readonly run: () => string;
|
|
78
|
+
readonly schedules: {
|
|
79
|
+
readonly create: () => string;
|
|
80
|
+
readonly list: (status?: string) => string;
|
|
81
|
+
readonly cancel: (scheduleId: number | string) => string;
|
|
82
|
+
};
|
|
83
|
+
readonly runs: {
|
|
84
|
+
readonly list: (tableId?: string) => string;
|
|
85
|
+
readonly flags: (runId: number | string, severity?: string) => string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly admin: {
|
|
90
|
+
readonly base: `${string}/admin`;
|
|
91
|
+
readonly users: {
|
|
92
|
+
readonly list: () => string;
|
|
93
|
+
readonly byId: (id: string) => string;
|
|
94
|
+
readonly create: () => string;
|
|
95
|
+
readonly update: (id: string) => string;
|
|
96
|
+
readonly delete: (id: string) => string;
|
|
97
|
+
readonly toggle: (id: string) => string;
|
|
98
|
+
readonly resetPassword: (id: string) => string;
|
|
99
|
+
readonly passwordResetEmail: (id: string) => string;
|
|
100
|
+
readonly import: {
|
|
101
|
+
readonly preview: () => string;
|
|
102
|
+
readonly execute: () => string;
|
|
103
|
+
readonly job: (jobId: string) => string;
|
|
104
|
+
readonly errorsCsv: (jobId: string) => string;
|
|
105
|
+
readonly templateCsv: () => string;
|
|
106
|
+
};
|
|
107
|
+
readonly clientRoles: {
|
|
108
|
+
readonly list: (userId: string, clientId: string) => string;
|
|
109
|
+
readonly update: (userId: string) => string;
|
|
110
|
+
readonly assign: (userId: string, clientId: string) => string;
|
|
111
|
+
readonly remove: (userId: string, clientId: string, role: string) => string;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
readonly metrics: {
|
|
115
|
+
readonly overview: () => string;
|
|
116
|
+
readonly system: {
|
|
117
|
+
readonly countUsers: () => string;
|
|
118
|
+
readonly countDisabledUsers: () => string;
|
|
119
|
+
readonly activeToday: () => string;
|
|
120
|
+
readonly activeThisWeek: () => string;
|
|
121
|
+
readonly loginTrend: () => string;
|
|
122
|
+
readonly loginTrendRange: () => string;
|
|
123
|
+
};
|
|
124
|
+
readonly security: {
|
|
125
|
+
readonly failedLogins: () => string;
|
|
126
|
+
readonly failedLoginsRange: () => string;
|
|
127
|
+
readonly suspiciousLogins: () => string;
|
|
128
|
+
};
|
|
129
|
+
readonly clients: {
|
|
130
|
+
readonly count: () => string;
|
|
131
|
+
readonly mostAccessed: () => string;
|
|
132
|
+
readonly loginCount: () => string;
|
|
133
|
+
readonly activeToday: () => string;
|
|
134
|
+
};
|
|
135
|
+
readonly users: {
|
|
136
|
+
readonly newRange: () => string;
|
|
137
|
+
readonly newTrend: () => string;
|
|
138
|
+
readonly neverLoggedIn: () => string;
|
|
139
|
+
readonly lastLogin: (userId: string) => string;
|
|
140
|
+
readonly clientUsage: (userId: string) => string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
readonly audit: {
|
|
144
|
+
readonly base: `${string}/admin/audit-logs`;
|
|
145
|
+
readonly list: () => string;
|
|
146
|
+
readonly actions: () => string;
|
|
147
|
+
readonly byId: (id: string) => string;
|
|
148
|
+
readonly metrics: {
|
|
149
|
+
readonly overview: () => string;
|
|
150
|
+
readonly failedLoginsByDay: () => string;
|
|
151
|
+
readonly topFailureIps: () => string;
|
|
152
|
+
};
|
|
153
|
+
readonly export: () => string;
|
|
154
|
+
};
|
|
155
|
+
readonly notifications: {
|
|
156
|
+
readonly base: `${string}/admin/notifications`;
|
|
157
|
+
readonly notify: () => string;
|
|
158
|
+
readonly list: () => string;
|
|
159
|
+
readonly byId: (id: string) => string;
|
|
160
|
+
readonly markAsRead: (id: string) => string;
|
|
161
|
+
readonly delete: (id: string) => string;
|
|
162
|
+
readonly count: () => string;
|
|
163
|
+
readonly countUnread: () => string;
|
|
164
|
+
readonly deleteOld: () => string;
|
|
165
|
+
readonly deliveries: (id: string) => string;
|
|
166
|
+
readonly deliveryList: () => string;
|
|
167
|
+
readonly deliveryMetrics: () => string;
|
|
168
|
+
readonly deliveryById: (deliveryId: string) => string;
|
|
169
|
+
readonly retryDelivery: (deliveryId: string) => string;
|
|
170
|
+
readonly cancelDelivery: (deliveryId: string) => string;
|
|
171
|
+
readonly testSms: () => string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
readonly notifications: {
|
|
175
|
+
readonly preferences: () => string;
|
|
176
|
+
};
|
|
177
|
+
readonly health: () => string;
|
|
178
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DocumentProcessType } from "../../../../types/src/index.js";
|
|
2
|
+
export type StandardTemplateKey = "" | "district_status" | "facility_metrics" | "alerts" | "lab_results";
|
|
3
|
+
export type StandardTemplate = {
|
|
4
|
+
key: Exclude<StandardTemplateKey, "">;
|
|
5
|
+
label: string;
|
|
6
|
+
requiredHeaders: string[];
|
|
7
|
+
optionalHeaders?: string[];
|
|
8
|
+
allowedExtensions: string[];
|
|
9
|
+
suggestedProcessType?: DocumentProcessType;
|
|
10
|
+
};
|
|
11
|
+
export declare const STANDARD_TEMPLATES: StandardTemplate[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type BackendErrorCode = "CLIENT_ALREADY_EXISTS" | "USER_ALREADY_EXISTS" | "INVALID_CLIENT_ID" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "CLIENT_DISABLED" | "USER_DISABLED" | "RATE_LIMITED" | "INTERNAL_ERROR";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./types/announcement-summary.types";
|
|
2
|
+
export * from "./types/client-role.types";
|
|
3
|
+
export * from "./types/client.types";
|
|
4
|
+
export * from "./types/document-processing.types";
|
|
5
|
+
export * from "./types/notifications.types";
|
|
6
|
+
export * from "./types/system-navigation.types";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type AnnouncementLevel = "INFO" | "SUCCESS" | "WARNING" | "CRITICAL";
|
|
2
|
+
export type AnnouncementStatus = "DRAFT" | "SCHEDULED" | "PUBLISHED" | "ARCHIVED";
|
|
3
|
+
export type Announcement = {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
message: string;
|
|
7
|
+
summary: string | null;
|
|
8
|
+
level: AnnouncementLevel;
|
|
9
|
+
tag: string | null;
|
|
10
|
+
link_url?: string | null;
|
|
11
|
+
link_label?: string | null;
|
|
12
|
+
status: AnnouncementStatus;
|
|
13
|
+
publish_at: string | null;
|
|
14
|
+
expires_at: string | null;
|
|
15
|
+
is_pinned?: boolean;
|
|
16
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ClientRole } from "./client-role.types";
|
|
2
|
+
export interface Client {
|
|
3
|
+
id: string;
|
|
4
|
+
clientId: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
publicClient: boolean;
|
|
10
|
+
rootUrl?: string;
|
|
11
|
+
baseUrl?: string;
|
|
12
|
+
redirectUris: string[];
|
|
13
|
+
webOrigins?: string[];
|
|
14
|
+
roles?: ClientRole[];
|
|
15
|
+
attributes?: ClientAttributes;
|
|
16
|
+
createdAt?: string;
|
|
17
|
+
updatedAt?: string;
|
|
18
|
+
}
|
|
19
|
+
export type ClientAttributes = Record<string, string | undefined>;
|
|
20
|
+
export interface CreateClientPayload {
|
|
21
|
+
clientId: string;
|
|
22
|
+
name: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
icon?: string;
|
|
25
|
+
publicClient?: boolean;
|
|
26
|
+
enabled?: boolean;
|
|
27
|
+
rootUrl?: string;
|
|
28
|
+
baseUrl?: string;
|
|
29
|
+
redirectUris?: string[];
|
|
30
|
+
webOrigins?: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface UpdateClientPayload {
|
|
33
|
+
name?: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
icon?: string;
|
|
36
|
+
publicClient?: boolean;
|
|
37
|
+
enabled?: boolean;
|
|
38
|
+
rootUrl?: string;
|
|
39
|
+
baseUrl?: string;
|
|
40
|
+
redirectUris?: string[];
|
|
41
|
+
webOrigins?: string[];
|
|
42
|
+
}
|
|
43
|
+
export type ClientsState = {
|
|
44
|
+
items: Client[];
|
|
45
|
+
activeClientId: string | null;
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DocumentProcessType = "SURVEILLANCE_CSV_IMPORT" | "CSV_IMPORT" | "EXCEL_IMPORT" | "FHIR_IMPORT" | "USER_BULK_IMPORT" | "SURVEILLANCE_EXCEL_IMPORT" | "FACILITY_IMPORT" | "LAB_RESULT_IMPORT" | "INVENTORY_IMPORT" | "HISTORICAL_BACKFILL_IMPORT" | "DRY_RUN_IMPORT" | "ETL_IMPORT" | "ARCHIVE_IMPORT" | "IMAGE_PROCESSING" | "DOCUMENT_EXTRACTION" | "NO_OP_UPLOAD";
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { Severity } from "../../../ui/src/index.js";
|
|
2
|
+
export type Notification = {
|
|
3
|
+
id: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
title: string;
|
|
6
|
+
message: string;
|
|
7
|
+
severity: Severity;
|
|
8
|
+
target_role?: string;
|
|
9
|
+
client_id?: string;
|
|
10
|
+
user_id?: string;
|
|
11
|
+
metadata?: Record<string, unknown>;
|
|
12
|
+
created_at: string;
|
|
13
|
+
read: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type GetNotificationsParams = {
|
|
16
|
+
unread?: boolean;
|
|
17
|
+
limit?: number;
|
|
18
|
+
offset?: number;
|
|
19
|
+
};
|
|
20
|
+
export type NotificationDeliveryStatus = "PENDING" | "PROCESSING" | "SENT" | "FAILED" | "RETRY" | "CANCELLED";
|
|
21
|
+
export type NotificationDelivery = {
|
|
22
|
+
id: string;
|
|
23
|
+
notification_id: string;
|
|
24
|
+
channel: string;
|
|
25
|
+
status: NotificationDeliveryStatus | string;
|
|
26
|
+
recipient?: Record<string, unknown>;
|
|
27
|
+
template_name?: string;
|
|
28
|
+
template_data?: Record<string, unknown>;
|
|
29
|
+
payload?: Record<string, unknown>;
|
|
30
|
+
scheduled_at?: string;
|
|
31
|
+
locked_at?: string;
|
|
32
|
+
sent_at?: string;
|
|
33
|
+
attempts: number;
|
|
34
|
+
max_attempts: number;
|
|
35
|
+
last_error?: string;
|
|
36
|
+
provider?: string;
|
|
37
|
+
provider_message_id?: string;
|
|
38
|
+
provider_status?: string;
|
|
39
|
+
provider_metadata?: Record<string, unknown>;
|
|
40
|
+
created_at: string;
|
|
41
|
+
updated_at: string;
|
|
42
|
+
};
|
|
43
|
+
export type NotificationDeliveryListParams = {
|
|
44
|
+
channel?: "in_app" | "email" | "sms" | "webhook" | string;
|
|
45
|
+
status?: NotificationDeliveryStatus | string;
|
|
46
|
+
search?: string;
|
|
47
|
+
limit?: number;
|
|
48
|
+
offset?: number;
|
|
49
|
+
};
|
|
50
|
+
export type NotificationDeliveryList = {
|
|
51
|
+
items: NotificationDelivery[];
|
|
52
|
+
total: number;
|
|
53
|
+
limit: number;
|
|
54
|
+
offset: number;
|
|
55
|
+
};
|
|
56
|
+
export type NotificationDeliveryMetric = {
|
|
57
|
+
channel: string;
|
|
58
|
+
provider?: string;
|
|
59
|
+
total: number;
|
|
60
|
+
pending: number;
|
|
61
|
+
processing: number;
|
|
62
|
+
sent: number;
|
|
63
|
+
failed: number;
|
|
64
|
+
retry: number;
|
|
65
|
+
cancelled: number;
|
|
66
|
+
avg_processing_seconds: number;
|
|
67
|
+
};
|
|
68
|
+
export type NotificationDeliveryMetrics = {
|
|
69
|
+
items: NotificationDeliveryMetric[];
|
|
70
|
+
};
|
|
71
|
+
export type TestSMSRequest = {
|
|
72
|
+
to: string;
|
|
73
|
+
message: string;
|
|
74
|
+
};
|
|
75
|
+
export type TestSMSResponse = {
|
|
76
|
+
notification_id: string;
|
|
77
|
+
status: string;
|
|
78
|
+
};
|
|
79
|
+
export type NotificationPreferences = {
|
|
80
|
+
user_id: string;
|
|
81
|
+
email_enabled: boolean;
|
|
82
|
+
sms_enabled: boolean;
|
|
83
|
+
phone_number?: string;
|
|
84
|
+
phone_verified: boolean;
|
|
85
|
+
quiet_hours_start?: string;
|
|
86
|
+
quiet_hours_end?: string;
|
|
87
|
+
created_at?: string;
|
|
88
|
+
updated_at?: string;
|
|
89
|
+
};
|
|
90
|
+
export type UpdateNotificationPreferencesRequest = {
|
|
91
|
+
email_enabled?: boolean;
|
|
92
|
+
sms_enabled?: boolean;
|
|
93
|
+
phone_number?: string;
|
|
94
|
+
quiet_hours_start?: string;
|
|
95
|
+
quiet_hours_end?: string;
|
|
96
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type NavigationLaunchMode = "internal" | "new_tab" | "same_tab";
|
|
2
|
+
export interface SystemNavigationItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
path?: string;
|
|
6
|
+
permission?: string;
|
|
7
|
+
requiredPermissions?: string[];
|
|
8
|
+
requiredAnyPermissions?: string[];
|
|
9
|
+
order?: number;
|
|
10
|
+
icon?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
/** Optional launcher category; otherwise inherits the system category. */
|
|
13
|
+
category?: string;
|
|
14
|
+
displayInLauncher?: boolean;
|
|
15
|
+
displayInSideNav?: boolean;
|
|
16
|
+
launchMode?: NavigationLaunchMode;
|
|
17
|
+
children?: SystemNavigationItem[];
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useFocusTrap } from "./useFocusTrap";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
type FocusTrapOptions = {
|
|
3
|
+
active: boolean;
|
|
4
|
+
containerRef: RefObject<HTMLElement | null>;
|
|
5
|
+
restoreFocus?: boolean;
|
|
6
|
+
initialFocusRef?: RefObject<HTMLElement | HTMLButtonElement | null>;
|
|
7
|
+
initialFocusSelector?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function useFocusTrap({ active, containerRef, restoreFocus, initialFocusRef, initialFocusSelector, }: FocusTrapOptions): void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type FooterVersionInfo = {
|
|
2
|
+
frontendVersion?: string;
|
|
3
|
+
backendVersion?: string;
|
|
4
|
+
backendUnavailable?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function PublicFooter({ frontendVersion, backendVersion, backendUnavailable, }?: FooterVersionInfo): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type DataTablePaginationProps = {
|
|
2
|
+
page: number;
|
|
3
|
+
pageSize: number;
|
|
4
|
+
totalItems: number;
|
|
5
|
+
pageSizes?: number[];
|
|
6
|
+
onChange: (pagination: {
|
|
7
|
+
page: number;
|
|
8
|
+
pageSize: number;
|
|
9
|
+
}) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function DataTablePagination({ page, pageSize, totalItems, pageSizes, onChange, }: DataTablePaginationProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type DataTableHeader = {
|
|
3
|
+
key: string;
|
|
4
|
+
header: string;
|
|
5
|
+
};
|
|
6
|
+
type DataTableShellProps<T> = {
|
|
7
|
+
title: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
rows: T[];
|
|
10
|
+
headers: DataTableHeader[];
|
|
11
|
+
getRowId: (row: T) => string;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
isFetching?: boolean;
|
|
14
|
+
loadingDescription?: string;
|
|
15
|
+
tableState?: ReactNode;
|
|
16
|
+
emptyTitle?: string;
|
|
17
|
+
emptyDescription?: string;
|
|
18
|
+
emptyActions?: ReactNode;
|
|
19
|
+
searchValue?: string;
|
|
20
|
+
resultsDescription?: string;
|
|
21
|
+
searchPlaceholder?: string;
|
|
22
|
+
onSearch?: (value: string) => void;
|
|
23
|
+
toolbarActions?: ReactNode;
|
|
24
|
+
topContent?: ReactNode;
|
|
25
|
+
filters?: ReactNode;
|
|
26
|
+
bulkActions?: ReactNode;
|
|
27
|
+
children: (args: {
|
|
28
|
+
rows: Array<T & {
|
|
29
|
+
id: string;
|
|
30
|
+
}>;
|
|
31
|
+
headers: DataTableHeader[];
|
|
32
|
+
}) => ReactNode;
|
|
33
|
+
};
|
|
34
|
+
export declare function DataTableShell<T extends object>({ title, description, rows, headers, getRowId, isLoading, isFetching, searchValue, searchPlaceholder, onSearch, resultsDescription, toolbarActions, loadingDescription, tableState, emptyTitle, emptyDescription, emptyActions, filters, topContent, bulkActions, children, }: DataTableShellProps<T>): import("react").JSX.Element;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
type TableEmptyStateProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
actions?: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare function TableEmptyState({ title, description, actions }: TableEmptyStateProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type TagKind = "red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "gray" | "cool-gray" | "warm-gray" | "high-contrast" | "outline";
|
|
2
|
+
type TableStatusTagProps = {
|
|
3
|
+
status: string;
|
|
4
|
+
kind?: TagKind;
|
|
5
|
+
mapStatusToKind?: (status: string) => TagKind;
|
|
6
|
+
};
|
|
7
|
+
export declare function TableStatusTag({ status, kind, mapStatusToKind }: TableStatusTagProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { DataTableShell, type DataTableHeader } from "./DataTableShell";
|
|
2
|
+
export { DataTablePagination } from "./DataTablePagination";
|
|
3
|
+
export { RowActionsCell } from "./RowActionsCell";
|
|
4
|
+
export { TableEmptyState } from "./TableEmptyState";
|
|
5
|
+
export { TableStatusTag } from "./TableStatusTag";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface EmptyStateProps {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
primaryAction?: {
|
|
5
|
+
label: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
icon?: React.ElementType;
|
|
8
|
+
};
|
|
9
|
+
secondaryAction?: {
|
|
10
|
+
label: string;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare function EmptyState({ title, description, primaryAction, secondaryAction, }: EmptyStateProps): import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface ErrorStateProps {
|
|
2
|
+
title?: string;
|
|
3
|
+
description: string;
|
|
4
|
+
primaryAction?: {
|
|
5
|
+
label: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
};
|
|
8
|
+
secondaryAction?: {
|
|
9
|
+
label: string;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare function ErrorState({ title, description, primaryAction, secondaryAction, }: ErrorStateProps): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
appName: string;
|
|
5
|
+
}
|
|
6
|
+
interface State {
|
|
7
|
+
hasError: boolean;
|
|
8
|
+
error: Error | null;
|
|
9
|
+
}
|
|
10
|
+
export declare class MicrofrontendErrorBoundary extends Component<Props, State> {
|
|
11
|
+
state: State;
|
|
12
|
+
static getDerivedStateFromError(error: Error): State;
|
|
13
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
14
|
+
render(): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ComingSoon } from "./comingsoon/ComingSoon";
|
|
2
|
+
export { EmptyState } from "./emptystate/EmptyState";
|
|
3
|
+
export { ErrorState } from "./errorstate/ErrorState";
|
|
4
|
+
export { MicrofrontendErrorBoundary } from "./errorstate/MicrofrontendErrorBoundary";
|
|
5
|
+
export { LoadingState } from "./loadingstate/LoadingState";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function CaseFormsGrid(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CaseFormsGrid } from "./CaseFormsGrid";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./forms";
|
|
2
|
+
export * from "./feedback";
|
|
3
|
+
export * from "./layout";
|
|
4
|
+
export * from "./data-display";
|
|
5
|
+
export * from "./branding";
|
|
6
|
+
export * from "./shell";
|
|
7
|
+
export * from "./overlays";
|
|
8
|
+
export * from "./notifications";
|
|
9
|
+
export * from "./accessibility";
|
|
10
|
+
export { default as AppGridContent } from "./navigation/appmenu/AppGridContent";
|
|
11
|
+
export { default as AppMenu } from "./navigation/appmenu/AppMenu.component";
|
|
12
|
+
export { ClientSideNav, hasVisibleClientSideNav } from "./navigation/sidenav/ClientSideNav";
|
|
13
|
+
export * from "./utils/severity";
|
|
14
|
+
export * from "./utils/status";
|
|
15
|
+
export * from "./theme";
|
|
16
|
+
export * from "./navigation";
|