@elevasis/ui 2.73.0 → 2.75.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/dist/api/index.js +3 -3
- package/dist/app/index.d.ts +58 -0
- package/dist/app/index.js +9 -10
- package/dist/auth/index.js +5 -6
- package/dist/charts/index.js +5 -6
- package/dist/chunk-2GIJBHZT.js +60 -0
- package/dist/{chunk-Z4ICFQXG.js → chunk-2ZRY3ARL.js} +1 -1
- package/dist/{chunk-5B2ZFO44.js → chunk-3H5DIJN7.js} +1 -1
- package/dist/{chunk-LZT2H2MA.js → chunk-47YJVIZE.js} +36 -43
- package/dist/{chunk-3TS5U5BL.js → chunk-5RH6NYZH.js} +1 -1
- package/dist/chunk-5SLRGUC4.js +224 -0
- package/dist/{chunk-JYBJMVNY.js → chunk-5VF5LPYS.js} +1 -1
- package/dist/{chunk-SWKAH2YM.js → chunk-6BJ5HMMC.js} +282 -553
- package/dist/{chunk-NI37YNRP.js → chunk-7OOFMEX6.js} +11 -5
- package/dist/{chunk-IBCEAVB2.js → chunk-A2SB32YV.js} +65 -5
- package/dist/{chunk-CJ2232PQ.js → chunk-CRPH5AAB.js} +1 -1
- package/dist/chunk-D3XXPCCK.js +69 -0
- package/dist/chunk-DMSTDZCJ.js +305 -0
- package/dist/chunk-DTEGVSJ6.js +645 -0
- package/dist/chunk-DVAOCHIF.js +165 -0
- package/dist/chunk-G7O4CBMC.js +231 -0
- package/dist/{chunk-IGBPWD6S.js → chunk-GDTK33QT.js} +5 -3
- package/dist/chunk-ICHDIVQO.js +54 -0
- package/dist/{chunk-U2H3TIHD.js → chunk-IYATYH5I.js} +2 -52
- package/dist/chunk-L3NBMLRN.js +49 -0
- package/dist/{chunk-LEPYXLJ2.js → chunk-LFLM723H.js} +1 -1
- package/dist/chunk-M6VAZAQW.js +45 -0
- package/dist/{chunk-AJOVWB47.js → chunk-MLHZUN2X.js} +6 -3
- package/dist/chunk-N6K2Q5BM.js +393 -0
- package/dist/chunk-NMHQAYZU.js +439 -0
- package/dist/chunk-NYIIRZSA.js +286 -0
- package/dist/{chunk-ETN3TTRT.js → chunk-OGHTJKBV.js} +115 -8
- package/dist/{chunk-M7WWRZ5Z.js → chunk-QFGNRKIE.js} +1 -78
- package/dist/chunk-QFS2GZMV.js +515 -0
- package/dist/{chunk-OCVSPAKM.js → chunk-SB3IHM5Y.js} +1150 -4346
- package/dist/{chunk-4CW2C5BD.js → chunk-SEYOVNS5.js} +1 -1
- package/dist/chunk-SN7X5N2A.js +116 -0
- package/dist/{chunk-PQ4B62HH.js → chunk-TX3UHDL5.js} +2 -2
- package/dist/chunk-VM2OWOXL.js +24 -0
- package/dist/{chunk-ZDKPHFTH.js → chunk-VWGCURZF.js} +5 -3
- package/dist/chunk-WDBNW44Z.js +49 -0
- package/dist/chunk-YQQ5GRUR.js +21 -0
- package/dist/{chunk-NHNTX6ZL.js → chunk-ZG6YJUT4.js} +3 -2
- package/dist/components/index.d.ts +228 -6
- package/dist/components/index.js +321 -35
- package/dist/components/navigation/index.js +6 -7
- package/dist/features/auth/index.d.ts +78 -2
- package/dist/features/auth/index.js +18 -9
- package/dist/features/clients/index.js +7 -7
- package/dist/features/content/index.d.ts +226 -5
- package/dist/features/content/index.js +270 -19
- package/dist/features/crm/index.d.ts +58 -0
- package/dist/features/crm/index.js +10 -8
- package/dist/features/dashboard/index.js +9 -8
- package/dist/features/delivery/index.d.ts +58 -0
- package/dist/features/delivery/index.js +23 -7
- package/dist/features/knowledge/index.js +5 -6
- package/dist/features/lead-gen/index.d.ts +9 -15
- package/dist/features/lead-gen/index.js +12 -8
- package/dist/features/monitoring/index.js +11 -9
- package/dist/features/monitoring/requests/index.js +8 -7
- package/dist/features/operations/index.js +15 -11
- package/dist/features/public-agent-chat/index.js +3 -1
- package/dist/features/settings/index.d.ts +66 -3
- package/dist/features/settings/index.js +9 -8
- package/dist/hooks/access/index.js +5 -6
- package/dist/hooks/delivery/index.d.ts +58 -0
- package/dist/hooks/delivery/index.js +3 -2
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +1 -1
- package/dist/hooks/published.d.ts +181 -5
- package/dist/hooks/published.js +22 -6
- package/dist/initialization/index.d.ts +58 -0
- package/dist/knowledge/index.js +167 -11
- package/dist/{knowledge-search-index-RZLIVWPJ.js → knowledge-search-index-6GQK55IQ.js} +1 -1
- package/dist/layout/index.js +8 -9
- package/dist/profile/index.d.ts +58 -0
- package/dist/provider/index.d.ts +77 -1
- package/dist/provider/index.js +5 -6
- package/dist/provider/published.d.ts +105 -1
- package/dist/provider/published.js +5 -6
- package/dist/test-utils/index.d.ts +16 -5
- package/dist/test-utils/index.js +17 -18
- package/dist/types/index.d.ts +73 -1
- package/dist/utils/index.d.ts +83 -3
- package/dist/utils/index.js +1 -1
- package/package.json +10 -5
- package/dist/chunk-6M6OLGQY.js +0 -36
- package/dist/chunk-MKH2KOAO.js +0 -39
- package/dist/hooks/index.css +0 -659
- package/dist/hooks/index.d.ts +0 -14073
- package/dist/hooks/index.js +0 -27
- package/dist/supabase/index.d.ts +0 -7118
- package/dist/supabase/index.js +0 -3
- package/dist/typeform/index.d.ts +0 -462
- package/dist/typeform/index.js +0 -2051
- package/dist/typeform/schemas.d.ts +0 -67
- package/dist/typeform/schemas.js +0 -2
|
@@ -176,15 +176,26 @@ interface OrgOsUiRouteContractOptions {
|
|
|
176
176
|
mode?: OrgOsUiRouteContractMode;
|
|
177
177
|
/**
|
|
178
178
|
* Route paths whose route file — or an ancestor layout route — wraps the page
|
|
179
|
-
* in an `AccessGuard`. Supply this to enable the `unguarded-
|
|
179
|
+
* in an `AccessGuard`. Supply this to enable the `unguarded-route` check.
|
|
180
180
|
*
|
|
181
|
-
* Omitted means the
|
|
182
|
-
*
|
|
183
|
-
* caller that can resolve route files should
|
|
181
|
+
* Omitted means the guard check does not run. A System's route is reachable
|
|
182
|
+
* by direct URL regardless of its lifecycle or whether it is currently
|
|
183
|
+
* surfaced in navigation, so a caller that can resolve route files should
|
|
184
|
+
* always pass this.
|
|
184
185
|
*/
|
|
185
186
|
guardedRoutePaths?: Iterable<string>;
|
|
187
|
+
/**
|
|
188
|
+
* Explicit, named opt-out from the `unguarded-route` check for System paths
|
|
189
|
+
* that are intentionally reachable without an `AccessGuard` (a public or
|
|
190
|
+
* unauthenticated surface, for example). Each entry must be a normalized
|
|
191
|
+
* route path already present in `routePaths`/`routeTreeSource` — this is
|
|
192
|
+
* not a way to silence a path that simply has not been checked. Keep this
|
|
193
|
+
* empty unless a route genuinely should not be guarded; do not use it to
|
|
194
|
+
* paper over a route a guard was forgotten on.
|
|
195
|
+
*/
|
|
196
|
+
publiclyReachableRoutePaths?: Iterable<string>;
|
|
186
197
|
}
|
|
187
|
-
type OrgOsUiRouteContractIssueKind = 'missing-system' | 'missing-route' | 'unguarded-
|
|
198
|
+
type OrgOsUiRouteContractIssueKind = 'missing-system' | 'missing-route' | 'unguarded-route';
|
|
188
199
|
interface OrgOsUiRouteContractIssue {
|
|
189
200
|
target: OrgOsUiRouteContractTarget;
|
|
190
201
|
kind: OrgOsUiRouteContractIssueKind;
|
package/dist/test-utils/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import { server, handlers } from '../chunk-7XKCG5CT.js';
|
|
|
2
2
|
export { handlers, server } from '../chunk-7XKCG5CT.js';
|
|
3
3
|
import { mockWorkOSUser, mockUseAuth, mockUnauthenticatedUser, mockAuthenticatedUser, mockAuthLoading, createMockUseAuth } from '../chunk-N7U24M2J.js';
|
|
4
4
|
export { createMockUseAuth, mockAuthLoading, mockAuthenticatedUser, mockUnauthenticatedUser, mockUseAuth, mockWorkOSUser } from '../chunk-N7U24M2J.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import { ApiClientProvider } from '../chunk-
|
|
5
|
+
import '../chunk-3H5DIJN7.js';
|
|
6
|
+
import { ApiClientProvider } from '../chunk-ZG6YJUT4.js';
|
|
7
7
|
import '../chunk-DD3CCMCZ.js';
|
|
8
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-A2SB32YV.js';
|
|
9
9
|
import '../chunk-Y6I3IC45.js';
|
|
10
10
|
import '../chunk-6SSQGWK7.js';
|
|
11
11
|
import { ElevasisServiceProvider } from '../chunk-BI5VDO2K.js';
|
|
@@ -179,19 +179,15 @@ function getOrgOsRouteContractSystems(organizationModel) {
|
|
|
179
179
|
const { systems } = organizationModel;
|
|
180
180
|
const arraySystems = systems.systems;
|
|
181
181
|
if (Array.isArray(arraySystems)) {
|
|
182
|
-
return arraySystems
|
|
183
|
-
...system,
|
|
184
|
-
betaByAncestry: system.lifecycle === "beta"
|
|
185
|
-
}));
|
|
182
|
+
return arraySystems;
|
|
186
183
|
}
|
|
187
184
|
const result = [];
|
|
188
|
-
const visit = (entries, prefix = ""
|
|
185
|
+
const visit = (entries, prefix = "") => {
|
|
189
186
|
for (const [key, system] of Object.entries(entries)) {
|
|
190
187
|
const id = prefix ? `${prefix}.${key}` : system.id || key;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
if (system.
|
|
194
|
-
if (system.subsystems) visit(system.subsystems, id, betaByAncestry);
|
|
188
|
+
result.push({ ...system, id });
|
|
189
|
+
if (system.systems) visit(system.systems, id);
|
|
190
|
+
if (system.subsystems) visit(system.subsystems, id);
|
|
195
191
|
}
|
|
196
192
|
};
|
|
197
193
|
visit(systems);
|
|
@@ -205,6 +201,9 @@ function collectOrgOsUiRouteContractIssues(options) {
|
|
|
205
201
|
}
|
|
206
202
|
const normalizedRoutePaths = new Set([...routePaths].map(normalizeOrgOsRoutePath));
|
|
207
203
|
const normalizedGuardedPaths = options.guardedRoutePaths ? new Set([...options.guardedRoutePaths].map(normalizeOrgOsRoutePath)) : void 0;
|
|
204
|
+
const normalizedPubliclyReachablePaths = new Set(
|
|
205
|
+
[...options.publiclyReachableRoutePaths ?? []].map(normalizeOrgOsRoutePath)
|
|
206
|
+
);
|
|
208
207
|
const systems = getOrgOsRouteContractSystems(organizationModel);
|
|
209
208
|
const modelSystemIds = new Set(systems.map((system) => system.id));
|
|
210
209
|
const issues = [];
|
|
@@ -236,10 +235,10 @@ function collectOrgOsUiRouteContractIssues(options) {
|
|
|
236
235
|
});
|
|
237
236
|
continue;
|
|
238
237
|
}
|
|
239
|
-
if (normalizedGuardedPaths &&
|
|
238
|
+
if (normalizedGuardedPaths && !normalizedGuardedPaths.has(normalizedPath) && !normalizedPubliclyReachablePaths.has(normalizedPath)) {
|
|
240
239
|
issues.push({
|
|
241
240
|
target,
|
|
242
|
-
kind: "unguarded-
|
|
241
|
+
kind: "unguarded-route",
|
|
243
242
|
systemId: system.id,
|
|
244
243
|
ownerSystemId,
|
|
245
244
|
path: normalizedPath
|
|
@@ -257,17 +256,17 @@ function formatOrgOsUiRouteContractIssue(issue) {
|
|
|
257
256
|
`- If it should not ship, remove that SystemModule from ${issue.target.shellSource}.`
|
|
258
257
|
].join("\n");
|
|
259
258
|
}
|
|
260
|
-
if (issue.kind === "unguarded-
|
|
259
|
+
if (issue.kind === "unguarded-route") {
|
|
261
260
|
return [
|
|
262
|
-
`[unguarded-
|
|
261
|
+
`[unguarded-route] System "${issue.systemId}" routes to "${issue.path}", but neither that route file nor an ancestor layout route wraps it in an AccessGuard.`,
|
|
263
262
|
`Owner SystemModule: ${issue.ownerSystemId}`,
|
|
264
|
-
"
|
|
263
|
+
"Any System route answers a direct URL regardless of its lifecycle or navigation visibility, so every routable System needs its own guard.",
|
|
265
264
|
"Fix one of:",
|
|
266
265
|
// Phrased in prose rather than as a guard JSX tag on purpose. The
|
|
267
266
|
// access-key drift scanner in @repo/core matches that tag shape anywhere
|
|
268
267
|
// in a file and would read this message as a real runtime access key.
|
|
269
268
|
`- Wrap the route (or its layout route) in an AccessGuard whose access key is "${issue.systemId}".`,
|
|
270
|
-
`- Or
|
|
269
|
+
`- Or, if this route is genuinely meant to be reachable without an AccessGuard, add its path to the contract call's publiclyReachableRoutePaths with a comment naming why.`
|
|
271
270
|
].join("\n");
|
|
272
271
|
}
|
|
273
272
|
return [
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2225,6 +2225,64 @@ type Database = {
|
|
|
2225
2225
|
}
|
|
2226
2226
|
];
|
|
2227
2227
|
};
|
|
2228
|
+
content_distribution_metrics: {
|
|
2229
|
+
Row: {
|
|
2230
|
+
captured_at: string;
|
|
2231
|
+
created_at: string;
|
|
2232
|
+
distribution_id: string;
|
|
2233
|
+
id: string;
|
|
2234
|
+
metrics: Json;
|
|
2235
|
+
organization_id: string;
|
|
2236
|
+
raw: Json;
|
|
2237
|
+
source: string;
|
|
2238
|
+
source_execution_id: string | null;
|
|
2239
|
+
};
|
|
2240
|
+
Insert: {
|
|
2241
|
+
captured_at?: string;
|
|
2242
|
+
created_at?: string;
|
|
2243
|
+
distribution_id: string;
|
|
2244
|
+
id?: string;
|
|
2245
|
+
metrics?: Json;
|
|
2246
|
+
organization_id: string;
|
|
2247
|
+
raw?: Json;
|
|
2248
|
+
source: string;
|
|
2249
|
+
source_execution_id?: string | null;
|
|
2250
|
+
};
|
|
2251
|
+
Update: {
|
|
2252
|
+
captured_at?: string;
|
|
2253
|
+
created_at?: string;
|
|
2254
|
+
distribution_id?: string;
|
|
2255
|
+
id?: string;
|
|
2256
|
+
metrics?: Json;
|
|
2257
|
+
organization_id?: string;
|
|
2258
|
+
raw?: Json;
|
|
2259
|
+
source?: string;
|
|
2260
|
+
source_execution_id?: string | null;
|
|
2261
|
+
};
|
|
2262
|
+
Relationships: [
|
|
2263
|
+
{
|
|
2264
|
+
foreignKeyName: "content_distribution_metrics_distribution_fkey";
|
|
2265
|
+
columns: ["distribution_id", "organization_id"];
|
|
2266
|
+
isOneToOne: false;
|
|
2267
|
+
referencedRelation: "content_distributions";
|
|
2268
|
+
referencedColumns: ["id", "organization_id"];
|
|
2269
|
+
},
|
|
2270
|
+
{
|
|
2271
|
+
foreignKeyName: "content_distribution_metrics_organization_id_fkey";
|
|
2272
|
+
columns: ["organization_id"];
|
|
2273
|
+
isOneToOne: false;
|
|
2274
|
+
referencedRelation: "organizations";
|
|
2275
|
+
referencedColumns: ["id"];
|
|
2276
|
+
},
|
|
2277
|
+
{
|
|
2278
|
+
foreignKeyName: "content_distribution_metrics_source_execution_id_fkey";
|
|
2279
|
+
columns: ["source_execution_id"];
|
|
2280
|
+
isOneToOne: false;
|
|
2281
|
+
referencedRelation: "execution_logs";
|
|
2282
|
+
referencedColumns: ["execution_id"];
|
|
2283
|
+
}
|
|
2284
|
+
];
|
|
2285
|
+
};
|
|
2228
2286
|
content_distributions: {
|
|
2229
2287
|
Row: {
|
|
2230
2288
|
adapted_body: string | null;
|
|
@@ -5109,6 +5167,20 @@ interface OAuthState {
|
|
|
5109
5167
|
timestamp: number;
|
|
5110
5168
|
credentialName: string;
|
|
5111
5169
|
provider: string;
|
|
5170
|
+
/**
|
|
5171
|
+
* Origin of the app that started this flow (e.g. 'https://app.contemplativerecords.com').
|
|
5172
|
+
*
|
|
5173
|
+
* Validated against the platform allowed-origins list in `authorizeHandler`
|
|
5174
|
+
* BEFORE it is sealed into the signed state, so the callback can hand it to
|
|
5175
|
+
* the callback page without re-checking. Every app that renders the OAuth
|
|
5176
|
+
* card runs on its own origin, and the callback page is served from a single
|
|
5177
|
+
* deploy-global one — it cannot read `window.opener.location.origin` across
|
|
5178
|
+
* that boundary, so the origin has to travel with the flow.
|
|
5179
|
+
*
|
|
5180
|
+
* Optional so a state issued before this field existed still decodes; the
|
|
5181
|
+
* callback falls back to `FRONTEND_URL` when it is absent.
|
|
5182
|
+
*/
|
|
5183
|
+
appOrigin?: string;
|
|
5112
5184
|
}
|
|
5113
5185
|
|
|
5114
5186
|
/**
|
|
@@ -5742,7 +5814,7 @@ type AIResourceDefinition = SerializedWorkflowDefinition | SerializedAgentDefini
|
|
|
5742
5814
|
* Note: Concrete adapter implementations are deferred until needed.
|
|
5743
5815
|
* This type provides compile-time safety and auto-completion for tool definitions.
|
|
5744
5816
|
*/
|
|
5745
|
-
type IntegrationType = 'gmail' | 'google-sheets' | 'slack' | 'github' | 'linear' | 'attio' | 'airtable' | 'salesforce' | 'hubspot' | 'stripe' | 'twilio' | 'sendgrid' | 'mailgun' | 'zapier' | 'webhook' | 'apify' | 'instantly' | 'resend' | 'signature-api' | 'dropbox' | 'anymailfinder' | 'tomba' | 'millionverifier';
|
|
5817
|
+
type IntegrationType = 'gmail' | 'google-sheets' | 'slack' | 'github' | 'linear' | 'attio' | 'airtable' | 'salesforce' | 'hubspot' | 'stripe' | 'twilio' | 'sendgrid' | 'mailgun' | 'zapier' | 'webhook' | 'apify' | 'instantly' | 'resend' | 'signature-api' | 'dropbox' | 'anymailfinder' | 'tomba' | 'millionverifier' | 'instagram';
|
|
5746
5818
|
|
|
5747
5819
|
/**
|
|
5748
5820
|
* Resource Registry type definitions
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -266,6 +266,45 @@ declare const LinkSchema: z.ZodObject<{
|
|
|
266
266
|
}, z.core.$strip>;
|
|
267
267
|
type Link = z.infer<typeof LinkSchema>;
|
|
268
268
|
|
|
269
|
+
/**
|
|
270
|
+
* Registration surface for the generic readiness engine (`./engine`).
|
|
271
|
+
*
|
|
272
|
+
* This module owns two independent extension points so `./engine` never has
|
|
273
|
+
* to import anything from `business/**`:
|
|
274
|
+
*
|
|
275
|
+
* - `registerBuiltInReadinessProfile` — a profile id (e.g. `sales.lead-gen.api`)
|
|
276
|
+
* maps to structural validation logic plus an optional model-preparation
|
|
277
|
+
* hook run before ontology compilation (e.g. injecting a derived catalog).
|
|
278
|
+
* This is the ONE readiness-profile registry (`_builtInProfileValidators`
|
|
279
|
+
* below) — `../domains/systems`'s `isBuiltInReadinessProfile` /
|
|
280
|
+
* `lookupReadinessProfile` read it directly via `getBuiltInReadinessProfile`
|
|
281
|
+
* rather than mirroring registrations into a second map, so a profile id
|
|
282
|
+
* can never read as built-in without an actual registered validator.
|
|
283
|
+
* - `registerReadinessInterfaceMarker` — a `(systemPath, interfaceKey)` pair
|
|
284
|
+
* maps to a synthesized interface marker for interfaces that are not
|
|
285
|
+
* authored on `system.apiInterface` (e.g. the lead-gen/CRM handoff bridge,
|
|
286
|
+
* which is derived from scoped resources rather than declared directly).
|
|
287
|
+
*
|
|
288
|
+
* `business/acquisition/ontology-validation.ts` calls both at module load to
|
|
289
|
+
* register its three built-in profiles. Both registries are module-level
|
|
290
|
+
* mutable maps with no reset function. Reachable by a tenant via the
|
|
291
|
+
* `./organization-model/readiness` subpath (see `./index`).
|
|
292
|
+
*/
|
|
293
|
+
|
|
294
|
+
type SystemInterfaceReadinessIssueFamily = 'SYSTEM_INTERFACE_MISSING' | 'SYSTEM_INTERFACE_DISABLED' | 'SYSTEM_INTERFACE_INVALID' | 'SYSTEM_INTERFACE_NOT_READY' | 'SYSTEM_BRIDGE_NOT_READY'
|
|
295
|
+
/**
|
|
296
|
+
* The deployed OM snapshot hash does not match the canonical source hash.
|
|
297
|
+
* Redeploy with `pnpm operations:deploy` to refresh the snapshot.
|
|
298
|
+
*/
|
|
299
|
+
| 'STALE_OM_SNAPSHOT';
|
|
300
|
+
interface SystemInterfaceReadinessIssue {
|
|
301
|
+
family: SystemInterfaceReadinessIssueFamily;
|
|
302
|
+
code: string;
|
|
303
|
+
path?: string;
|
|
304
|
+
ref?: string;
|
|
305
|
+
message: string;
|
|
306
|
+
}
|
|
307
|
+
|
|
269
308
|
/**
|
|
270
309
|
* Time range selector for dashboard metrics
|
|
271
310
|
*/
|
|
@@ -402,12 +441,53 @@ declare class APIClientError extends Error {
|
|
|
402
441
|
readonly requestId?: string;
|
|
403
442
|
readonly fields?: Record<string, string[]>;
|
|
404
443
|
readonly retryAfter?: number;
|
|
405
|
-
|
|
444
|
+
/**
|
|
445
|
+
* Structured detail payload carried on `APIErrorResponse.details`
|
|
446
|
+
* (`packages/core/src/platform/api/types.ts`). Deliberately typed as a
|
|
447
|
+
* general bag rather than narrowed to any one error family — CONFLICT
|
|
448
|
+
* linked-row counts, SERVICE_UNAVAILABLE readiness payloads, and future
|
|
449
|
+
* error shapes all flow through the same field. Use a shape-specific
|
|
450
|
+
* accessor (e.g. `getSystemReadinessServerErrorDetails`) to narrow it.
|
|
451
|
+
*/
|
|
452
|
+
readonly details?: Record<string, unknown>;
|
|
453
|
+
constructor(message: string, code: APIErrorCode, statusCode: number, requestId?: string, fields?: Record<string, string[]>, retryAfter?: number, details?: Record<string, unknown>);
|
|
406
454
|
}
|
|
407
455
|
/**
|
|
408
456
|
* Type guard to check if an error is an APIClientError
|
|
409
457
|
*/
|
|
410
458
|
declare function isAPIClientError(error: unknown): error is APIClientError;
|
|
459
|
+
/**
|
|
460
|
+
* The structured 503 payload a System Interface readiness failure carries
|
|
461
|
+
* (`APIErrorResponse.details` shape produced by `createInterfaceReadinessApiError`
|
|
462
|
+
* in `apps/api/src/platform/organization-model/interface-readiness.ts`).
|
|
463
|
+
*
|
|
464
|
+
* Field-for-field identical to `SystemReadinessServerErrorDetails` in
|
|
465
|
+
* `packages/ui/src/components/display/SystemReadinessAlert.tsx` — same shape,
|
|
466
|
+
* different name to avoid a barrel export collision (both flow through
|
|
467
|
+
* `src/index.ts`) — so `getSystemReadinessServerErrorDetails`'s return value
|
|
468
|
+
* drops straight into that component's `serverError` prop. Declared
|
|
469
|
+
* independently here (rather than imported) to keep `utils` the dependency
|
|
470
|
+
* the `components` layer imports from, not the other way around.
|
|
471
|
+
*/
|
|
472
|
+
interface SystemReadinessErrorDetails {
|
|
473
|
+
systemPath: string;
|
|
474
|
+
interfaceKey: string;
|
|
475
|
+
readinessProfile?: string;
|
|
476
|
+
readinessCode: SystemInterfaceReadinessIssueFamily;
|
|
477
|
+
issues: SystemInterfaceReadinessIssue[];
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Narrows an unknown caught error to a System Interface readiness 503's
|
|
481
|
+
* structured details, or `undefined` when the error is not an
|
|
482
|
+
* `APIClientError`, carries no `details`, or carries a `details` payload
|
|
483
|
+
* from a different error family (e.g. a CONFLICT's linked-row counts).
|
|
484
|
+
*
|
|
485
|
+
* Intended for a one-line call site:
|
|
486
|
+
* ```ts
|
|
487
|
+
* <SystemReadinessAlert ... serverError={getSystemReadinessServerErrorDetails(error)} />
|
|
488
|
+
* ```
|
|
489
|
+
*/
|
|
490
|
+
declare function getSystemReadinessServerErrorDetails(error: unknown): SystemReadinessErrorDetails | undefined;
|
|
411
491
|
/**
|
|
412
492
|
* Extract error information from any error type
|
|
413
493
|
* Handles both APIClientError and generic Error instances
|
|
@@ -521,5 +601,5 @@ declare function restoreConsole(): void;
|
|
|
521
601
|
|
|
522
602
|
declare function setupBrowserMocks(): void;
|
|
523
603
|
|
|
524
|
-
export { APIClientError, API_URL, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, OAUTH_FLOW_TIMEOUT, PAGE_SIZE_DEFAULT, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, ResourceStatusColors, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, getTimeRangeDates, getTimeRangeLabel, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail };
|
|
525
|
-
export type { TablerIcon };
|
|
604
|
+
export { APIClientError, API_URL, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, OAUTH_FLOW_TIMEOUT, PAGE_SIZE_DEFAULT, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, ResourceStatusColors, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, getSystemReadinessServerErrorDetails, getTimeRangeDates, getTimeRangeLabel, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail };
|
|
605
|
+
export type { SystemReadinessErrorDetails, TablerIcon };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { APIClientError, API_URL, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, OAUTH_FLOW_TIMEOUT, PAGE_SIZE_DEFAULT, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail } from '../chunk-
|
|
1
|
+
export { APIClientError, API_URL, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, OAUTH_FLOW_TIMEOUT, PAGE_SIZE_DEFAULT, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, getSystemReadinessServerErrorDetails, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail } from '../chunk-A2SB32YV.js';
|
|
2
2
|
export { REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, getTimeRangeDates, getTimeRangeLabel } from '../chunk-Y6I3IC45.js';
|
|
3
3
|
export { ResourceStatusColors } from '../chunk-6SSQGWK7.js';
|
|
4
4
|
import '../chunk-TVTSASST.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.75.0",
|
|
4
4
|
"description": "UI components and platform-aware hooks for building custom frontends on the Elevasis platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
|
+
"!dist/metafile-*.json",
|
|
12
13
|
"src/**/README.md"
|
|
13
14
|
],
|
|
14
15
|
"exports": {
|
|
@@ -241,6 +242,7 @@
|
|
|
241
242
|
"@mantine/charts": "8.2.7",
|
|
242
243
|
"@mantine/notifications": "8.2.7",
|
|
243
244
|
"@mantine/form": "8.2.7",
|
|
245
|
+
"@mantine/modals": "8.2.7",
|
|
244
246
|
"@mantine/tiptap": "8.2.7",
|
|
245
247
|
"@tiptap/extension-link": "^2.11.7",
|
|
246
248
|
"@tiptap/extension-placeholder": "^2.11.7",
|
|
@@ -280,10 +282,10 @@
|
|
|
280
282
|
"typescript": "5.9.2",
|
|
281
283
|
"vite": "^7.0.0",
|
|
282
284
|
"vitest": "^3.2.4",
|
|
283
|
-
"@elevasis/sdk": "1.
|
|
284
|
-
"@repo/core": "0.64.0",
|
|
285
|
-
"@repo/typescript-config": "0.0.0",
|
|
285
|
+
"@elevasis/sdk": "1.50.0",
|
|
286
286
|
"@repo/elevasis-core": "1.0.0",
|
|
287
|
+
"@repo/core": "0.67.0",
|
|
288
|
+
"@repo/typescript-config": "0.0.0",
|
|
287
289
|
"@repo/eslint-config": "0.0.0"
|
|
288
290
|
},
|
|
289
291
|
"dependencies": {
|
|
@@ -311,6 +313,9 @@
|
|
|
311
313
|
"@mantine/form": {
|
|
312
314
|
"optional": true
|
|
313
315
|
},
|
|
316
|
+
"@mantine/modals": {
|
|
317
|
+
"optional": true
|
|
318
|
+
},
|
|
314
319
|
"@tabler/icons-react": {
|
|
315
320
|
"optional": true
|
|
316
321
|
},
|
|
@@ -361,7 +366,7 @@
|
|
|
361
366
|
"lint": "eslint src --max-warnings 0",
|
|
362
367
|
"check-types": "tsc --noEmit",
|
|
363
368
|
"test": "vitest run --passWithNoTests",
|
|
364
|
-
"test:publish-artifacts": "pnpm build:publish && vitest run src/__tests__/sdk-exports.test.ts src/provider/__tests__/published-surface.test.ts src/__tests__/published-artifact.test.ts src/__tests__/published-peer-dependencies.test.ts",
|
|
369
|
+
"test:publish-artifacts": "pnpm build:publish && vitest run src/__tests__/sdk-exports.test.ts src/provider/__tests__/published-surface.test.ts src/__tests__/published-artifact.test.ts src/__tests__/published-peer-dependencies.test.ts src/__tests__/published-subpath-identity.test.ts",
|
|
365
370
|
"test:watch": "vitest watch"
|
|
366
371
|
}
|
|
367
372
|
}
|
package/dist/chunk-6M6OLGQY.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
// src/components/typeform/schemas.ts
|
|
4
|
-
var answerValueSchema = z.discriminatedUnion("type", [
|
|
5
|
-
z.object({ type: z.literal("preset"), value: z.string() }),
|
|
6
|
-
z.object({ type: z.literal("custom"), value: z.string() })
|
|
7
|
-
]);
|
|
8
|
-
var multiAnswerValueSchema = z.array(answerValueSchema);
|
|
9
|
-
function radioWithOtherSchema(presetValues) {
|
|
10
|
-
return z.discriminatedUnion("type", [
|
|
11
|
-
z.object({
|
|
12
|
-
type: z.literal("preset"),
|
|
13
|
-
value: z.enum(presetValues)
|
|
14
|
-
}),
|
|
15
|
-
z.object({
|
|
16
|
-
type: z.literal("custom"),
|
|
17
|
-
value: z.string().min(1, "Please specify a value")
|
|
18
|
-
})
|
|
19
|
-
]);
|
|
20
|
-
}
|
|
21
|
-
function checkboxWithOtherSchema(presetValues) {
|
|
22
|
-
return z.array(
|
|
23
|
-
z.discriminatedUnion("type", [
|
|
24
|
-
z.object({
|
|
25
|
-
type: z.literal("preset"),
|
|
26
|
-
value: z.enum(presetValues)
|
|
27
|
-
}),
|
|
28
|
-
z.object({
|
|
29
|
-
type: z.literal("custom"),
|
|
30
|
-
value: z.string().min(1, "Please specify a value")
|
|
31
|
-
})
|
|
32
|
-
])
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export { answerValueSchema, checkboxWithOtherSchema, multiAnswerValueSchema, radioWithOtherSchema };
|
package/dist/chunk-MKH2KOAO.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
2
|
-
import { createClient } from '@supabase/supabase-js';
|
|
3
|
-
import { useMemo } from 'react';
|
|
4
|
-
|
|
5
|
-
function getSupabaseConfig() {
|
|
6
|
-
const url = import.meta.env?.VITE_SUPABASE_URL;
|
|
7
|
-
const anonKey = import.meta.env?.VITE_SUPABASE_ANON_KEY;
|
|
8
|
-
if (!url || !anonKey) {
|
|
9
|
-
throw new Error("Missing Supabase environment variables (VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY)");
|
|
10
|
-
}
|
|
11
|
-
return { url, anonKey };
|
|
12
|
-
}
|
|
13
|
-
var useSupabase = () => {
|
|
14
|
-
const { getAccessToken } = useAuthContext();
|
|
15
|
-
const { url, anonKey } = getSupabaseConfig();
|
|
16
|
-
return useMemo(
|
|
17
|
-
() => createClient(url, anonKey, {
|
|
18
|
-
global: {
|
|
19
|
-
headers: {
|
|
20
|
-
// Additional headers if needed
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
accessToken: async () => {
|
|
24
|
-
try {
|
|
25
|
-
const token = await getAccessToken();
|
|
26
|
-
if (!token) {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
return token;
|
|
30
|
-
} catch {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}),
|
|
35
|
-
[getAccessToken, url, anonKey]
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export { useSupabase };
|