@lumerahq/ui 0.13.0-dev.1 → 0.13.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 +5 -16
- package/dist/{RecordSheet-CmOeQ0M-.js → RecordSheet-BGs3rudM.js} +299 -379
- package/dist/{automations-DOek1EjJ.js → automations-DGUEnAYR.js} +199 -218
- package/dist/components/audit-log/AuditLog.d.ts +3 -3
- package/dist/components/audit-log/AuditLog.d.ts.map +1 -1
- package/dist/components/audit-log/AuditLogEntry.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{highlighted-body-OFNGDK62-CkZgLnjq.js → highlighted-body-OFNGDK62-V6FEuBTg.js} +1 -1
- package/dist/hooks/index.js +2 -2
- package/dist/index.js +39 -44
- package/dist/lib/audit-log-core.d.ts +0 -12
- package/dist/lib/audit-log-core.d.ts.map +1 -1
- package/dist/lib/audit-log.d.ts +1 -1
- package/dist/lib/audit-log.d.ts.map +1 -1
- package/dist/lib/bridge.d.ts +28 -0
- package/dist/lib/bridge.d.ts.map +1 -1
- package/dist/lib/index.d.ts +1 -2
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +36 -41
- package/dist/mermaid-GHXKKRXX-AvjGDhsO.js +4 -0
- package/dist/{use-automation-run-Vo2NXx-h.js → use-automation-run-D6DIaHy3.js} +142 -1
- package/dist/{use-sql-table-yjz6z8nW.js → use-sql-table-BfA0A-w3.js} +1 -1
- package/package.json +1 -1
- package/dist/mermaid-GHXKKRXX-DXYmvmZa.js +0 -4
|
@@ -36,13 +36,6 @@ export type AuditLogEntry = {
|
|
|
36
36
|
actor: AuditLogActor;
|
|
37
37
|
summary: AuditLogSummarySegment[];
|
|
38
38
|
details: AuditLogField[];
|
|
39
|
-
/** Physical collection API name, suitable for API-level diagnostics. */
|
|
40
|
-
collection: string;
|
|
41
|
-
collection_id: string;
|
|
42
|
-
record_id: string;
|
|
43
|
-
record_label: string;
|
|
44
|
-
/** Raw field API names changed by an update; empty for create/delete events. */
|
|
45
|
-
changed_fields: string[];
|
|
46
39
|
has_snapshot: boolean;
|
|
47
40
|
store: AuditLogStore;
|
|
48
41
|
};
|
|
@@ -52,10 +45,7 @@ export type AuditLogPagination = {
|
|
|
52
45
|
next_cursor?: string;
|
|
53
46
|
};
|
|
54
47
|
export type AuditLogCollectionStatus = {
|
|
55
|
-
/** Physical collection API name. */
|
|
56
48
|
name: string;
|
|
57
|
-
/** Collection selector supplied by the caller, usually the project-local bare name. */
|
|
58
|
-
requested_name: string;
|
|
59
49
|
audit_enabled: boolean;
|
|
60
50
|
};
|
|
61
51
|
export type AuditLogListResponse = {
|
|
@@ -99,8 +89,6 @@ export declare function normalizeAuditLogFilterState(collections: readonly strin
|
|
|
99
89
|
/** Build a request scoped to one or more user-defined collections. */
|
|
100
90
|
export declare function buildRecordAuditLogPath(params: ListRecordAuditLogParams): string;
|
|
101
91
|
export declare const auditLogDetailValue: (entry: AuditLogEntry, label: string) => string;
|
|
102
|
-
/** Resolve a physical API name back to the collection selector supplied by the caller. */
|
|
103
|
-
export declare const auditLogRequestedCollectionName: (collection: string, statuses: readonly AuditLogCollectionStatus[]) => string;
|
|
104
92
|
export declare function auditLogSummaryWithCollectionLabel(entry: AuditLogEntry, collectionLabel: string): AuditLogSummarySegment[];
|
|
105
93
|
export declare function buildAuditLogCsv(entries: AuditLogEntry[], options?: AuditLogCsvOptions): string;
|
|
106
94
|
//# sourceMappingURL=audit-log-core.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-log-core.d.ts","sourceRoot":"","sources":["../../src/lib/audit-log-core.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAC7C,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ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AC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,aAAa,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAClD,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,cAAU,KAAG,MAA6D,CAAC;AAErH,eAAO,MAAM,4BAA4B,GAAI,cAA8B,KAAG,MACc,CAAC;AAE7F,eAAO,MAAM,kBAAkB,GAAI,OAAO,aAAa,KAAG,MACK,CAAC;AAEhE,wBAAgB,+BAA+B,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAUxF;AAED,iFAAiF;AACjF,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAM,GACzC,mBAAmB,CAcrB;AAED,sEAAsE;AACtE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,wBAAwB,GAAG,MAAM,CAqBhF;AAED,eAAO,MAAM,mBAAmB,GAAI,OAAO,aAAa,EAAE,OAAO,MAAM,KAAG,MACP,CAAC;AAEpE,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,aAAa,EACpB,eAAe,EAAE,MAAM,GACtB,sBAAsB,EAAE,CAe1B;AAmBD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,OAAO,GAAE,kBAAuB,GAAG,MAAM,CAsBnG"}
|
package/dist/lib/audit-log.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuditLogCsvOptions, AuditLogListResponse, AuditLogSnapshotResponse, AuditLogStore, ListRecordAuditLogParams, RecordAuditLogCsvResult } from './audit-log-core';
|
|
2
|
-
export { AUDIT_LOG_EXPORT_LIMIT, AUDIT_LOG_MAX_COLLECTIONS, type AuditLogActor, type AuditLogCollectionStatus, type AuditLogCsvOptions, type AuditLogEntry, type AuditLogEvent, type AuditLogField, type AuditLogFilterState, type AuditLogFilters, type AuditLogListResponse,
|
|
2
|
+
export { AUDIT_LOG_EXPORT_LIMIT, AUDIT_LOG_MAX_COLLECTIONS, type AuditLogActor, type AuditLogCollectionStatus, type AuditLogCsvOptions, type AuditLogEntry, type AuditLogEvent, type AuditLogField, type AuditLogFilterState, type AuditLogFilters, type AuditLogListResponse, auditLogActorLabel, auditLogDetailValue, auditLogSummaryWithCollectionLabel, normalizeAuditLogExportLimit, normalizeAuditLogFilterState, normalizeAuditLogPageSize, normalizeRecordAuditCollections, } from './audit-log-core';
|
|
3
3
|
export declare function listRecordAuditLog(params: ListRecordAuditLogParams): Promise<AuditLogListResponse>;
|
|
4
4
|
export declare function getRecordAuditLogSnapshot(id: string, store: AuditLogStore): Promise<AuditLogSnapshotResponse>;
|
|
5
5
|
/** Fetch the current filtered feed page-by-page, capped defensively at 10,000 rows. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-log.d.ts","sourceRoot":"","sources":["../../src/lib/audit-log.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAGlB,KAAK,wBAAwB,EAE7B,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,
|
|
1
|
+
{"version":3,"file":"audit-log.d.ts","sourceRoot":"","sources":["../../src/lib/audit-log.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAGlB,KAAK,wBAAwB,EAE7B,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,kCAAkC,EAClC,4BAA4B,EAC5B,4BAA4B,EAC5B,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,kBAAkB,CAAC;AAE1B,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAExG;AAED,wBAAsB,yBAAyB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,wBAAwB,CAAC,CASnH;AAED,uFAAuF;AACvF,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,IAAI,CAAC,wBAAwB,EAAE,QAAQ,GAAG,OAAO,CAAC,EAC1D,OAAO,SAAyB,EAChC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,uBAAuB,CAAC,CA2BlC"}
|
package/dist/lib/bridge.d.ts
CHANGED
|
@@ -47,6 +47,11 @@ export type HostPayload = {
|
|
|
47
47
|
name?: string;
|
|
48
48
|
apiName?: string;
|
|
49
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* The signed-in user. Undefined for anonymous visitors on public-access
|
|
52
|
+
* apps served on their own hostname — apps that allow anonymous access
|
|
53
|
+
* must handle this and may offer sign-in via `redirectToLogin()`.
|
|
54
|
+
*/
|
|
50
55
|
user?: {
|
|
51
56
|
id: string;
|
|
52
57
|
name: string;
|
|
@@ -58,7 +63,15 @@ export type HostPayload = {
|
|
|
58
63
|
projectExternalId?: string;
|
|
59
64
|
/** Base iframe URL mounted by Lumera, used for share-link generation. */
|
|
60
65
|
iframeBaseUrl?: string;
|
|
66
|
+
/** Who may open the app (org_members_with_permission … public). */
|
|
67
|
+
accessLevel?: string;
|
|
61
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* How the current caller was classified when the app runs standalone on
|
|
71
|
+
* its own hostname: 'org_member' (company member), 'app_user' (external
|
|
72
|
+
* signed-in user), or 'anonymous'.
|
|
73
|
+
*/
|
|
74
|
+
subjectType?: string;
|
|
62
75
|
message?: string;
|
|
63
76
|
session?: {
|
|
64
77
|
token?: string;
|
|
@@ -191,6 +204,21 @@ export declare function buildShareableAppUrl(path: string, options?: ShareableAp
|
|
|
191
204
|
* `app.externalId`.
|
|
192
205
|
*/
|
|
193
206
|
export declare function getShareableAppUrl(options?: ShareableAppUrlOptions): string | undefined;
|
|
207
|
+
/**
|
|
208
|
+
* Redirect the browser into the Lumera app-session login flow. Only
|
|
209
|
+
* meaningful in direct mode (standalone app hostname); in the Lumera shell
|
|
210
|
+
* the platform session already exists.
|
|
211
|
+
*
|
|
212
|
+
* @param returnTo - Relative path to land on after login. Defaults to the
|
|
213
|
+
* current path + query.
|
|
214
|
+
*/
|
|
215
|
+
export declare const redirectToLogin: (returnTo?: string) => void;
|
|
216
|
+
/**
|
|
217
|
+
* Revoke the current app session and clear its cookies. Only meaningful in
|
|
218
|
+
* direct mode. Resolves once the session is cleared; callers usually reload
|
|
219
|
+
* or navigate afterwards.
|
|
220
|
+
*/
|
|
221
|
+
export declare const logout: () => Promise<void>;
|
|
194
222
|
/**
|
|
195
223
|
* Extend bridge runtime config for the current page load.
|
|
196
224
|
*
|
package/dist/lib/bridge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../src/lib/bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AA2CH,eAAO,MAAM,sBAAsB,KAA0D,CAAC;AAQ9F,M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KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CA6B/F,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,gBAAgB,GAAU,SAAS,aAAa,KAAG,OAAO,CAAC,cAAc,CAwDrF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,aAAa,EAAE,UAAU,oBAAoB,KAAG,YA0DxF,CAAC"}
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module @lumerahq/ui/lib
|
|
5
5
|
*/
|
|
6
|
-
export { BridgeError, type BridgeRequest, type BridgeResponse, type BridgeRuntimeConfig, type BridgeStream, type BridgeStreamHandlers, type BridgeStreamOpen, type BridgeStreamResponse, buildShareableAppUrl, configureBridge, EXPECTED_PARENT_ORIGIN, getAppProjectExternalId, getShareableAppUrl, type HostPayload, isEmbedded, onInitMessage, parentApiRequest, parentApiStream, postReadyMessage, type ShareableAppRouter, type ShareableAppUrlOptions, serializeBridgeRuntimeConfig, } from './bridge';
|
|
6
|
+
export { BridgeError, type BridgeRequest, type BridgeResponse, type BridgeRuntimeConfig, type BridgeStream, type BridgeStreamHandlers, type BridgeStreamOpen, type BridgeStreamResponse, buildShareableAppUrl, configureBridge, EXPECTED_PARENT_ORIGIN, getAppProjectExternalId, getShareableAppUrl, type HostPayload, isEmbedded, logout, onInitMessage, parentApiRequest, parentApiStream, postReadyMessage, redirectToLogin, type ShareableAppRouter, type ShareableAppUrlOptions, serializeBridgeRuntimeConfig, } from './bridge';
|
|
7
7
|
export { type EmailSendRequest, type EmailSendResult, type FileDescriptor, getDownloadUrl, getUploadUrl, type PbBulkResult, type PbListOptions, type PbListResponse, type PbRecord, type PbSearchMetadata, type PbSearchOptions, type PbSearchResult, type PbSqlRequest, type PbSqlResponse, pbBulkDelete, pbBulkUpdate, pbCreate, pbDelete, pbGet, pbList, pbSearch, pbSql, pbUpdate, pbUpdateRecord, pbUpsert, sendEmail, type UploadOptions, type UploadUrlResponse, uploadFile, } from './api';
|
|
8
8
|
export { type Automation, type AutomationRun, type AutomationRunFile, type AutomationStatus, automationStatuses, type CreateRunOptions, cancelAutomationRun, cancelRun, clearAutomationCache, createAutomationRun, createRun, ensureAutomationRun, ensureRun, getAutomationByExternalId, getAutomationRun, getAutomationRunFileDownloadUrl, getRun, getRunFiles, getRunFileUrl, isActiveStatus, isTerminalStatus, type LegacyCreateRunOptions, type ListRunsOptions, listAutomationRunFiles, listRuns, listRunsByAgent, listRunsByExternalId, type PollOptions, pollAutomationRun, pollRun, } from './automations';
|
|
9
|
-
export { AUDIT_LOG_EXPORT_LIMIT, AUDIT_LOG_MAX_COLLECTIONS, type AuditLogActor, type AuditLogCollectionStatus, type AuditLogCsvOptions, type AuditLogEntry, type AuditLogEvent, type AuditLogField, type AuditLogFilters, type AuditLogListResponse, type AuditLogPagination, type AuditLogSnapshot, type AuditLogSnapshotResponse, type AuditLogStore, auditLogActorLabel, auditLogRequestedCollectionName, fetchRecordAuditLogCsv, getRecordAuditLogSnapshot, type ListRecordAuditLogParams, listRecordAuditLog, type RecordAuditLogCsvResult, } from './audit-log';
|
|
10
9
|
export { type ColumnType, type FileDescriptor as FormatterFileDescriptor, type FormatOptions, formatBoolean, formatCellValue, formatCurrency, formatDate, formatDateTime, formatEditor, formatFile, formatFileSize, formatJson, formatNumber, formatPercent, formatRelation, formatSelect, formatText, stripHtml, } from './formatters';
|
|
11
10
|
export { queryClient } from './query-client';
|
|
12
11
|
export { cn } from './utils';
|
package/dist/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAEL,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KA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,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAEL,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,oBAAoB,EAEpB,eAAe,EAEf,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAElB,KAAK,WAAW,EAChB,UAAU,EACV,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,4BAA4B,GAC7B,MAAM,UAAU,CAAC;AAMlB,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,cAAc,EAEd,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,cAAc,EAEnB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,YAAY,EAEZ,YAAY,EACZ,QAAQ,EACR,QAAQ,EAER,KAAK,EACL,MAAM,EACN,QAAQ,EAER,KAAK,EACL,QAAQ,EAER,cAAc,EACd,QAAQ,EAER,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,UAAU,GACX,MAAM,OAAO,CAAC;AAMf,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,mBAAmB,EACnB,SAAS,EAET,oBAAoB,EAEpB,mBAAmB,EAEnB,SAAS,EACT,mBAAmB,EACnB,SAAS,EAET,yBAAyB,EACzB,gBAAgB,EAChB,+BAA+B,EAC/B,MAAM,EAEN,WAAW,EACX,aAAa,EACb,cAAc,EAEd,gBAAgB,EAChB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,sBAAsB,EACtB,QAAQ,EACR,eAAe,EACf,oBAAoB,EACpB,KAAK,WAAW,EAChB,iBAAiB,EACjB,OAAO,GACR,MAAM,eAAe,CAAC;AAMvB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,cAAc,IAAI,uBAAuB,EAC9C,KAAK,aAAa,EAClB,aAAa,EACb,eAAe,EACf,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,UAAU,EACV,SAAS,GACV,MAAM,cAAc,CAAC;AAMtB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAM7C,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/lib/index.js
CHANGED
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B, E, C, b, D, F, G, c, H, I, J, K, g, L, M, N, f, O, Q, P, a, h, R, i, S, T, U, V, W, l, o, p, d, j, k, m, n, q, t, u, v, w, x, y, X, Y, e, r, z, s, A } from "../automations-DGUEnAYR.js";
|
|
2
2
|
import { o as o2, f as f2, a as a2, b as b2, c as c2, d as d2, e as e2, g as g2, h as h2, i as i2, j as j2, k as k2, l as l2, m as m2, n as n2, s as s2 } from "../formatters-D4T821Dv.js";
|
|
3
3
|
import { q as q2 } from "../query-client-DdOWay4_.js";
|
|
4
4
|
export {
|
|
5
|
-
X as AUDIT_LOG_EXPORT_LIMIT,
|
|
6
|
-
Y as AUDIT_LOG_MAX_COLLECTIONS,
|
|
7
5
|
B as BridgeError,
|
|
8
6
|
E as EXPECTED_PARENT_ORIGIN,
|
|
9
|
-
|
|
10
|
-
_ as auditLogRequestedCollectionName,
|
|
11
|
-
z as automationStatuses,
|
|
7
|
+
C as automationStatuses,
|
|
12
8
|
b as buildShareableAppUrl,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
D as cancelAutomationRun,
|
|
10
|
+
F as cancelRun,
|
|
11
|
+
G as clearAutomationCache,
|
|
16
12
|
o2 as cn,
|
|
17
13
|
c as configureBridge,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
$ as fetchRecordAuditLogCsv,
|
|
14
|
+
H as createAutomationRun,
|
|
15
|
+
I as createRun,
|
|
16
|
+
J as ensureAutomationRun,
|
|
17
|
+
K as ensureRun,
|
|
23
18
|
f2 as formatBoolean,
|
|
24
19
|
a2 as formatCellValue,
|
|
25
20
|
b2 as formatCurrency,
|
|
@@ -35,44 +30,44 @@ export {
|
|
|
35
30
|
m2 as formatSelect,
|
|
36
31
|
n2 as formatText,
|
|
37
32
|
g as getAppProjectExternalId,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
L as getAutomationByExternalId,
|
|
34
|
+
M as getAutomationRun,
|
|
35
|
+
N as getAutomationRunFileDownloadUrl,
|
|
41
36
|
f as getDownloadUrl,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
N as getRunFiles,
|
|
37
|
+
O as getRun,
|
|
38
|
+
Q as getRunFileUrl,
|
|
39
|
+
P as getRunFiles,
|
|
46
40
|
a as getShareableAppUrl,
|
|
47
41
|
h as getUploadUrl,
|
|
48
|
-
|
|
42
|
+
R as isActiveStatus,
|
|
49
43
|
i as isEmbedded,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
S as isTerminalStatus,
|
|
45
|
+
T as listAutomationRunFiles,
|
|
46
|
+
U as listRuns,
|
|
47
|
+
V as listRunsByAgent,
|
|
48
|
+
W as listRunsByExternalId,
|
|
49
|
+
l as logout,
|
|
56
50
|
o as onInitMessage,
|
|
57
51
|
p as parentApiRequest,
|
|
58
52
|
d as parentApiStream,
|
|
59
53
|
j as pbBulkDelete,
|
|
60
54
|
k as pbBulkUpdate,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
55
|
+
m as pbCreate,
|
|
56
|
+
n as pbDelete,
|
|
57
|
+
q as pbGet,
|
|
58
|
+
t as pbList,
|
|
59
|
+
u as pbSearch,
|
|
60
|
+
v as pbSql,
|
|
61
|
+
w as pbUpdate,
|
|
62
|
+
x as pbUpdateRecord,
|
|
63
|
+
y as pbUpsert,
|
|
64
|
+
X as pollAutomationRun,
|
|
65
|
+
Y as pollRun,
|
|
72
66
|
e as postReadyMessage,
|
|
73
67
|
q2 as queryClient,
|
|
74
|
-
|
|
68
|
+
r as redirectToLogin,
|
|
69
|
+
z as sendEmail,
|
|
75
70
|
s as serializeBridgeRuntimeConfig,
|
|
76
71
|
s2 as stripHtml,
|
|
77
|
-
|
|
72
|
+
A as uploadFile
|
|
78
73
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState, useRef, useCallback, useMemo } from "react";
|
|
2
2
|
import { useInfiniteQuery, useQueryClient, useMutation, useQuery } from "@tanstack/react-query";
|
|
3
|
-
import {
|
|
3
|
+
import { Z as requestApi, J as ensureAutomationRun, H as createAutomationRun, D as cancelAutomationRun, C as automationStatuses, M as getAutomationRun } from "./automations-DGUEnAYR.js";
|
|
4
4
|
const QUEUED_DISCOVERY_POLL_MS = 2e3;
|
|
5
5
|
const IDLE_DISCOVERY_POLL_MS = 1e4;
|
|
6
6
|
const HIDDEN_DISCOVERY_POLL_MS = 3e4;
|
|
@@ -954,6 +954,138 @@ function replaceSession(sessions, next) {
|
|
|
954
954
|
});
|
|
955
955
|
return found ? updated : [next, ...updated];
|
|
956
956
|
}
|
|
957
|
+
const AUDIT_LOG_EXPORT_LIMIT = 1e4;
|
|
958
|
+
const AUDIT_LOG_MAX_COLLECTIONS = 20;
|
|
959
|
+
const normalizeAuditLogPageSize = (value = 50) => Math.min(200, Math.max(1, Math.trunc(value) || 50));
|
|
960
|
+
const normalizeAuditLogExportLimit = (value = AUDIT_LOG_EXPORT_LIMIT) => Math.min(AUDIT_LOG_EXPORT_LIMIT, Math.max(1, Math.trunc(value) || AUDIT_LOG_EXPORT_LIMIT));
|
|
961
|
+
const auditLogActorLabel = (actor) => actor.name?.trim() || actor.email?.trim() || actor.type_label;
|
|
962
|
+
function normalizeRecordAuditCollections(collections) {
|
|
963
|
+
const normalized = [];
|
|
964
|
+
const seen = /* @__PURE__ */ new Set();
|
|
965
|
+
for (const value of collections) {
|
|
966
|
+
const collection = value.trim();
|
|
967
|
+
if (!collection || seen.has(collection)) continue;
|
|
968
|
+
seen.add(collection);
|
|
969
|
+
normalized.push(collection);
|
|
970
|
+
}
|
|
971
|
+
return normalized;
|
|
972
|
+
}
|
|
973
|
+
function normalizeAuditLogFilterState(collections, filters = {}) {
|
|
974
|
+
const available = normalizeRecordAuditCollections(collections);
|
|
975
|
+
const allowed = new Set(available);
|
|
976
|
+
const selected = normalizeRecordAuditCollections(filters.collections ?? available).filter(
|
|
977
|
+
(name) => allowed.has(name)
|
|
978
|
+
);
|
|
979
|
+
return {
|
|
980
|
+
collections: selected.length > 0 ? selected : available,
|
|
981
|
+
event: filters.event,
|
|
982
|
+
actor: filters.actor?.trim() || void 0,
|
|
983
|
+
since: filters.since?.trim() || void 0,
|
|
984
|
+
until: filters.until?.trim() || void 0
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
function buildRecordAuditLogPath(params) {
|
|
988
|
+
const collections = normalizeRecordAuditCollections(params.collections);
|
|
989
|
+
if (collections.length === 0) {
|
|
990
|
+
throw new Error("At least one collection is required");
|
|
991
|
+
}
|
|
992
|
+
if (collections.length > AUDIT_LOG_MAX_COLLECTIONS) {
|
|
993
|
+
throw new Error(`At most ${AUDIT_LOG_MAX_COLLECTIONS} collections can be requested`);
|
|
994
|
+
}
|
|
995
|
+
const query = new URLSearchParams({
|
|
996
|
+
domain: "record",
|
|
997
|
+
limit: String(normalizeAuditLogPageSize(params.limit))
|
|
998
|
+
});
|
|
999
|
+
for (const collection of collections) query.append("collection", collection);
|
|
1000
|
+
if (params.cursor?.trim()) query.set("cursor", params.cursor.trim());
|
|
1001
|
+
if (params.event) query.set("event", params.event);
|
|
1002
|
+
if (params.actor?.trim()) query.set("actor", params.actor.trim());
|
|
1003
|
+
if (params.since?.trim()) query.set("since", params.since.trim());
|
|
1004
|
+
if (params.until?.trim()) query.set("until", params.until.trim());
|
|
1005
|
+
return `/audit-log?${query.toString()}`;
|
|
1006
|
+
}
|
|
1007
|
+
const auditLogDetailValue = (entry, label) => entry.details.find((field) => field.label === label)?.value ?? "";
|
|
1008
|
+
function auditLogSummaryWithCollectionLabel(entry, collectionLabel) {
|
|
1009
|
+
const label = collectionLabel.trim();
|
|
1010
|
+
if (!label) return entry.summary;
|
|
1011
|
+
const recordSegment = entry.summary.find((segment) => segment.emphasis === "strong");
|
|
1012
|
+
const suffixSegments = entry.summary.filter(
|
|
1013
|
+
(segment) => segment.emphasis === "none" && /^\(.+\)$/.test(segment.text.trim())
|
|
1014
|
+
);
|
|
1015
|
+
const eventLabel = entry.event[0].toUpperCase() + entry.event.slice(1);
|
|
1016
|
+
return [
|
|
1017
|
+
{ text: `${eventLabel} ${label}`, emphasis: "none" },
|
|
1018
|
+
...recordSegment ? [recordSegment] : [],
|
|
1019
|
+
...suffixSegments
|
|
1020
|
+
];
|
|
1021
|
+
}
|
|
1022
|
+
const collectionLabelFor = (collection, options = {}) => options.collectionLabels?.[collection]?.trim() || collection;
|
|
1023
|
+
const activityLabelFor = (collection, options = {}) => options.activityNouns?.[collection]?.trim() || options.collectionLabels?.[collection]?.trim() || "";
|
|
1024
|
+
const summaryText = (entry, options = {}) => {
|
|
1025
|
+
const collection = auditLogDetailValue(entry, "Collection");
|
|
1026
|
+
const collectionLabel = collection ? activityLabelFor(collection, options) : "";
|
|
1027
|
+
const summary = collectionLabel ? auditLogSummaryWithCollectionLabel(entry, collectionLabel) : entry.summary;
|
|
1028
|
+
return summary.map((segment) => segment.text).join(" ");
|
|
1029
|
+
};
|
|
1030
|
+
const protectSpreadsheetCell = (value) => /^[\t\r ]*[=+\-@]/.test(value) ? `'${value}` : value;
|
|
1031
|
+
const csvCell = (value) => `"${protectSpreadsheetCell(value).replaceAll('"', '""')}"`;
|
|
1032
|
+
function buildAuditLogCsv(entries, options = {}) {
|
|
1033
|
+
const rows = entries.map((entry) => {
|
|
1034
|
+
const collectionApiName = auditLogDetailValue(entry, "Collection");
|
|
1035
|
+
return [
|
|
1036
|
+
entry.occurred_at,
|
|
1037
|
+
collectionApiName ? collectionLabelFor(collectionApiName, options) : "",
|
|
1038
|
+
collectionApiName,
|
|
1039
|
+
auditLogActorLabel(entry.actor),
|
|
1040
|
+
entry.actor.type,
|
|
1041
|
+
entry.event,
|
|
1042
|
+
auditLogDetailValue(entry, "Record ID"),
|
|
1043
|
+
summaryText(entry, options)
|
|
1044
|
+
].map(csvCell).join(",");
|
|
1045
|
+
});
|
|
1046
|
+
return [
|
|
1047
|
+
["time", "collection_label", "collection_api_name", "actor", "actor_type", "event", "record_id", "summary"].map(csvCell).join(","),
|
|
1048
|
+
...rows
|
|
1049
|
+
].join("\n");
|
|
1050
|
+
}
|
|
1051
|
+
async function listRecordAuditLog(params) {
|
|
1052
|
+
return requestApi(buildRecordAuditLogPath(params), { method: "GET" });
|
|
1053
|
+
}
|
|
1054
|
+
async function getRecordAuditLogSnapshot(id, store) {
|
|
1055
|
+
const normalizedID = id.trim();
|
|
1056
|
+
if (!normalizedID) {
|
|
1057
|
+
throw new Error("Audit log ID is required");
|
|
1058
|
+
}
|
|
1059
|
+
return requestApi(
|
|
1060
|
+
`/audit-log/${encodeURIComponent(normalizedID)}/snapshot?store=${encodeURIComponent(store)}`,
|
|
1061
|
+
{ method: "GET" }
|
|
1062
|
+
);
|
|
1063
|
+
}
|
|
1064
|
+
async function fetchRecordAuditLogCsv(params, maxRows = AUDIT_LOG_EXPORT_LIMIT, options = {}) {
|
|
1065
|
+
const limit = normalizeAuditLogExportLimit(maxRows);
|
|
1066
|
+
const entries = [];
|
|
1067
|
+
let cursor = "";
|
|
1068
|
+
let truncated = false;
|
|
1069
|
+
while (entries.length < limit) {
|
|
1070
|
+
const page = await listRecordAuditLog({
|
|
1071
|
+
...params,
|
|
1072
|
+
cursor: cursor || void 0,
|
|
1073
|
+
limit: Math.min(200, limit - entries.length)
|
|
1074
|
+
});
|
|
1075
|
+
entries.push(...page.audit_logs.slice(0, limit - entries.length));
|
|
1076
|
+
if (!page.pagination.has_more) break;
|
|
1077
|
+
const nextCursor = page.pagination.next_cursor?.trim();
|
|
1078
|
+
if (!nextCursor || nextCursor === cursor) {
|
|
1079
|
+
throw new Error("Audit log export could not continue");
|
|
1080
|
+
}
|
|
1081
|
+
if (entries.length >= limit) {
|
|
1082
|
+
truncated = true;
|
|
1083
|
+
break;
|
|
1084
|
+
}
|
|
1085
|
+
cursor = nextCursor;
|
|
1086
|
+
}
|
|
1087
|
+
return { csv: buildAuditLogCsv(entries, options), count: entries.length, truncated };
|
|
1088
|
+
}
|
|
957
1089
|
function useAuditLog(collections, filters = {}, options = {}) {
|
|
958
1090
|
const normalizedCollections = normalizeRecordAuditCollections(collections);
|
|
959
1091
|
const pageSize = normalizeAuditLogPageSize(options.pageSize);
|
|
@@ -1127,8 +1259,17 @@ function useAutomationRun(options) {
|
|
|
1127
1259
|
};
|
|
1128
1260
|
}
|
|
1129
1261
|
export {
|
|
1262
|
+
AUDIT_LOG_MAX_COLLECTIONS as A,
|
|
1130
1263
|
useAgentChatSessions as a,
|
|
1131
1264
|
useAuditLog as b,
|
|
1132
1265
|
useAutomationRun as c,
|
|
1266
|
+
auditLogSummaryWithCollectionLabel as d,
|
|
1267
|
+
auditLogDetailValue as e,
|
|
1268
|
+
auditLogActorLabel as f,
|
|
1269
|
+
getRecordAuditLogSnapshot as g,
|
|
1270
|
+
normalizeAuditLogFilterState as h,
|
|
1271
|
+
fetchRecordAuditLogCsv as i,
|
|
1272
|
+
normalizeAuditLogExportLimit as j,
|
|
1273
|
+
normalizeRecordAuditCollections as n,
|
|
1133
1274
|
useAgentChat as u
|
|
1134
1275
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQueryClient, useQuery, useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { useState, useCallback, useEffect, useMemo } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { V as listRunsByAgent, C as automationStatuses, H as createAutomationRun, A as uploadFile, o as onInitMessage, v as pbSql, x as pbUpdateRecord } from "./automations-DGUEnAYR.js";
|
|
4
4
|
function useAutomationAgent({
|
|
5
5
|
agentId,
|
|
6
6
|
limit = 5,
|
package/package.json
CHANGED