web-mojo 2.4.4 → 2.4.6
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 +43 -0
- package/dist/admin-models.cjs.js +1 -1
- package/dist/admin-models.cjs.js.map +1 -1
- package/dist/admin-models.es.js +1 -1
- package/dist/admin-models.es.js.map +1 -1
- package/dist/admin.cjs.js +1 -1
- package/dist/admin.css +258 -6
- package/dist/admin.es.js +1 -1
- package/dist/auth.cjs.js +1 -1
- package/dist/auth.es.js +1 -1
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +1 -1
- package/dist/chat.css +5 -0
- package/dist/chunks/AssistantPanelView-CkQEcaFk.js +2 -0
- package/dist/chunks/AssistantPanelView-CkQEcaFk.js.map +1 -0
- package/dist/chunks/AssistantPanelView-D1wEbgtM.js +2 -0
- package/dist/chunks/AssistantPanelView-D1wEbgtM.js.map +1 -0
- package/dist/chunks/ChatView-D2WOSxPu.js +2 -0
- package/dist/chunks/ChatView-D2WOSxPu.js.map +1 -0
- package/dist/chunks/ChatView-kWguc444.js +2 -0
- package/dist/chunks/ChatView-kWguc444.js.map +1 -0
- package/dist/chunks/{Collection-7F3lsq4z.js → Collection-C0pHSKDH.js} +2 -2
- package/dist/chunks/{Collection-7F3lsq4z.js.map → Collection-C0pHSKDH.js.map} +1 -1
- package/dist/chunks/{Collection-Cgxbmj8G.js → Collection-DNmr743A.js} +2 -2
- package/dist/chunks/{Collection-Cgxbmj8G.js.map → Collection-DNmr743A.js.map} +1 -1
- package/dist/chunks/{ContextMenu-afYD0lFk.js → ContextMenu-BeveGkJr.js} +2 -2
- package/dist/chunks/{ContextMenu-afYD0lFk.js.map → ContextMenu-BeveGkJr.js.map} +1 -1
- package/dist/chunks/{ContextMenu-Ba4fjHxg.js → ContextMenu-T3yDdsIe.js} +2 -2
- package/dist/chunks/{ContextMenu-Ba4fjHxg.js.map → ContextMenu-T3yDdsIe.js.map} +1 -1
- package/dist/chunks/{DataView-DFGIE3wK.js → DataView-VZIXSsZa.js} +2 -2
- package/dist/chunks/{DataView-DFGIE3wK.js.map → DataView-VZIXSsZa.js.map} +1 -1
- package/dist/chunks/{DataView-fA6qQbvN.js → DataView-z2rxXk4L.js} +2 -2
- package/dist/chunks/{DataView-fA6qQbvN.js.map → DataView-z2rxXk4L.js.map} +1 -1
- package/dist/chunks/{FormView-CgnaTPkQ.js → FormView-COIPtbrd.js} +2 -2
- package/dist/chunks/{FormView-CgnaTPkQ.js.map → FormView-COIPtbrd.js.map} +1 -1
- package/dist/chunks/{FormView-LRb8scDI.js → FormView-DUXQruUZ.js} +2 -2
- package/dist/chunks/{FormView-LRb8scDI.js.map → FormView-DUXQruUZ.js.map} +1 -1
- package/dist/chunks/{ListView-Dsezts8J.js → ListView-BjsNHuZ1.js} +2 -2
- package/dist/chunks/{ListView-Dsezts8J.js.map → ListView-BjsNHuZ1.js.map} +1 -1
- package/dist/chunks/{ListView-Cu6iQ0aG.js → ListView-BxcxIwC3.js} +2 -2
- package/dist/chunks/{ListView-Cu6iQ0aG.js.map → ListView-BxcxIwC3.js.map} +1 -1
- package/dist/chunks/{MetricsCountryMapView-BsJoEsUE.js → MetricsCountryMapView-Bp3qoVHp.js} +2 -2
- package/dist/chunks/{MetricsCountryMapView-BsJoEsUE.js.map → MetricsCountryMapView-Bp3qoVHp.js.map} +1 -1
- package/dist/chunks/{MetricsCountryMapView-BkLDonK4.js → MetricsCountryMapView-CWjIEBJB.js} +2 -2
- package/dist/chunks/{MetricsCountryMapView-BkLDonK4.js.map → MetricsCountryMapView-CWjIEBJB.js.map} +1 -1
- package/dist/chunks/Modal-Bm1OQ8Ou.js +3 -0
- package/dist/chunks/{Modal-BRKy85bz.js.map → Modal-Bm1OQ8Ou.js.map} +1 -1
- package/dist/chunks/Modal-KnJhNZ1E.js +3 -0
- package/dist/chunks/{Modal-DKjxtaZI.js.map → Modal-KnJhNZ1E.js.map} +1 -1
- package/dist/chunks/Passkeys-B1-Z4-16.js +2 -0
- package/dist/chunks/Passkeys-B1-Z4-16.js.map +1 -0
- package/dist/chunks/Passkeys-BlHx11-5.js +2 -0
- package/dist/chunks/Passkeys-BlHx11-5.js.map +1 -0
- package/dist/chunks/TicketPanelView-DVePzWyJ.js +2 -0
- package/dist/chunks/TicketPanelView-DVePzWyJ.js.map +1 -0
- package/dist/chunks/TicketPanelView-TYh5iZiR.js +2 -0
- package/dist/chunks/TicketPanelView-TYh5iZiR.js.map +1 -0
- package/dist/chunks/{TokenManager-CWRL33UM.js → TokenManager-6atX9uKB.js} +2 -2
- package/dist/chunks/TokenManager-6atX9uKB.js.map +1 -0
- package/dist/chunks/{TokenManager-CVR3ENIS.js → TokenManager-CiNtJclo.js} +2 -2
- package/dist/chunks/TokenManager-CiNtJclo.js.map +1 -0
- package/dist/chunks/User-9qvKV7G6.js +2 -0
- package/dist/chunks/User-9qvKV7G6.js.map +1 -0
- package/dist/chunks/{User-BmS8zImI.js → User-BM76Ughk.js} +2 -2
- package/dist/chunks/User-BM76Ughk.js.map +1 -0
- package/dist/chunks/{UserProfileView-CrmACQjJ.js → UserProfileView-DDflzpTa.js} +2 -2
- package/dist/chunks/{UserProfileView-CrmACQjJ.js.map → UserProfileView-DDflzpTa.js.map} +1 -1
- package/dist/chunks/{UserProfileView-B56WeGL1.js → UserProfileView-cUF8ED9n.js} +2 -2
- package/dist/chunks/{UserProfileView-B56WeGL1.js.map → UserProfileView-cUF8ED9n.js.map} +1 -1
- package/dist/chunks/{View-gAghvPMN.js → View-BxlKR1IW.js} +2 -2
- package/dist/chunks/{View-gAghvPMN.js.map → View-BxlKR1IW.js.map} +1 -1
- package/dist/chunks/{View-IgBQlwd0.js → View-CPWwS19u.js} +2 -2
- package/dist/chunks/{View-IgBQlwd0.js.map → View-CPWwS19u.js.map} +1 -1
- package/dist/chunks/{WebApp-B6wrmIaj.js → WebApp-BdxhRnnT.js} +2 -2
- package/dist/chunks/WebApp-BdxhRnnT.js.map +1 -0
- package/dist/chunks/WebApp-Bo_egO0c.js +2 -0
- package/dist/chunks/WebApp-Bo_egO0c.js.map +1 -0
- package/dist/chunks/admin-CHPo4iDn.js +2 -0
- package/dist/chunks/admin-CHPo4iDn.js.map +1 -0
- package/dist/chunks/admin-CucHFXfD.js +2 -0
- package/dist/chunks/admin-CucHFXfD.js.map +1 -0
- package/dist/chunks/admin-models-CkHjtMHf.js +2 -0
- package/dist/chunks/admin-models-CkHjtMHf.js.map +1 -0
- package/dist/chunks/admin-models-DLtFboxy.js +2 -0
- package/dist/chunks/admin-models-DLtFboxy.js.map +1 -0
- package/dist/chunks/{exportChart-CmfLeCi8.js → exportChart-BTrEOM9j.js} +2 -2
- package/dist/chunks/{exportChart-CmfLeCi8.js.map → exportChart-BTrEOM9j.js.map} +1 -1
- package/dist/chunks/{exportChart-Ue-zU0_c.js → exportChart-BfzZUb1j.js} +2 -2
- package/dist/chunks/{exportChart-Ue-zU0_c.js.map → exportChart-BfzZUb1j.js.map} +1 -1
- package/dist/chunks/{index-DTXotoXw.js → index-Cxffar1o.js} +2 -2
- package/dist/chunks/{index-DTXotoXw.js.map → index-Cxffar1o.js.map} +1 -1
- package/dist/chunks/{index-NXnA6T-5.js → index-DsID1QpB.js} +2 -2
- package/dist/chunks/{index-NXnA6T-5.js.map → index-DsID1QpB.js.map} +1 -1
- package/dist/chunks/{version-CpR8sTVV.js → version-BYy2UAT0.js} +2 -2
- package/dist/chunks/{version-CpR8sTVV.js.map → version-BYy2UAT0.js.map} +1 -1
- package/dist/chunks/{version-CsLH6aiB.js → version-BxLEknar.js} +2 -2
- package/dist/chunks/{version-CsLH6aiB.js.map → version-BxLEknar.js.map} +1 -1
- package/dist/css/web-mojo.css +1 -1
- package/dist/docit.cjs.js +1 -1
- package/dist/docit.es.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/lightbox.cjs.js +1 -1
- package/dist/lightbox.es.js +1 -1
- package/dist/map.cjs.js +1 -1
- package/dist/map.es.js +1 -1
- package/dist/timeline.cjs.js +1 -1
- package/dist/timeline.es.js +1 -1
- package/dist/user-profile.cjs.js +1 -1
- package/dist/user-profile.es.js +1 -1
- package/dist/web-mojo.lite.iife.js +33 -4
- package/dist/web-mojo.lite.iife.js.map +1 -1
- package/dist/web-mojo.lite.iife.min.js +45 -45
- package/dist/web-mojo.lite.iife.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/AssistantPanelView-B3orPoag.js +0 -2
- package/dist/chunks/AssistantPanelView-B3orPoag.js.map +0 -1
- package/dist/chunks/AssistantPanelView-GeIHDvyN.js +0 -2
- package/dist/chunks/AssistantPanelView-GeIHDvyN.js.map +0 -1
- package/dist/chunks/ChatView-B0xHv7Nq.js +0 -2
- package/dist/chunks/ChatView-B0xHv7Nq.js.map +0 -1
- package/dist/chunks/ChatView-CUmRTKna.js +0 -2
- package/dist/chunks/ChatView-CUmRTKna.js.map +0 -1
- package/dist/chunks/Modal-BRKy85bz.js +0 -3
- package/dist/chunks/Modal-DKjxtaZI.js +0 -3
- package/dist/chunks/Passkeys-CMh9iSax.js +0 -2
- package/dist/chunks/Passkeys-CMh9iSax.js.map +0 -1
- package/dist/chunks/Passkeys-DF7mRGYj.js +0 -2
- package/dist/chunks/Passkeys-DF7mRGYj.js.map +0 -1
- package/dist/chunks/TokenManager-CVR3ENIS.js.map +0 -1
- package/dist/chunks/TokenManager-CWRL33UM.js.map +0 -1
- package/dist/chunks/User-BmS8zImI.js.map +0 -1
- package/dist/chunks/User-CayBjzMG.js +0 -2
- package/dist/chunks/User-CayBjzMG.js.map +0 -1
- package/dist/chunks/WebApp-B6wrmIaj.js.map +0 -1
- package/dist/chunks/WebApp-DeHPnmbD.js +0 -2
- package/dist/chunks/WebApp-DeHPnmbD.js.map +0 -1
- package/dist/chunks/admin-FvzwR-f7.js +0 -2
- package/dist/chunks/admin-FvzwR-f7.js.map +0 -1
- package/dist/chunks/admin-yjCkhxvU.js +0 -2
- package/dist/chunks/admin-yjCkhxvU.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
### TableView — `fetchOnView` auto-refreshes model before detail dialog
|
|
6
|
+
|
|
7
|
+
- **Added:** `fetchOnView` option (default `true`). When enabled, TableView calls `model.fetch()` before opening the view dialog, ensuring the detail view always has the latest server data. Set to `false` to use the row data as-is. Skipped when a custom `onItemView` handler is provided.
|
|
8
|
+
|
|
9
|
+
### Ticket panel — app-shell slide-over with action blocks
|
|
10
|
+
|
|
11
|
+
- **Added:** `registerTicketPanel(app)` — new registration helper that attaches `app.openTicketPanel(modelOrId)` and `app.closeTicketPanel()` to the running app instance. The panel (`TicketPanelView`) mounts as a flex child of `.portal-layout` (like `AssistantPanelView`) and persists across page navigation. `openTicketPanel` accepts either a Ticket model instance OR an id; the table passes the model directly so the panel and table share the same instance and updates propagate without a re-fetch.
|
|
12
|
+
- **Changed:** `TicketTablePage` now delegates to `app.openTicketPanel(model)` instead of managing the panel internally. This moves the panel to the app-shell level so it survives route changes. The table also got mockup-style styling — colored status pills, severity-colored priority chips, category dot+label, monospace IDs, single hairline borders — via custom function formatters and scoped CSS in `buildTemplate()`.
|
|
13
|
+
- **Changed:** `TicketPanelView` panel UI cleaned up — the AI-enable toggle was removed from the panel header and moved to the ticket edit form (`TicketForms`). The kebab `⋯` menu item changed from "Close Ticket" (which prompted a status change to `closed`) to "Close Window" (which dismisses the panel). The panel no longer shows a standalone close button in the header. The kebab menu now also includes "Ask AI" which opens an Assistant chat scoped to the current ticket.
|
|
14
|
+
- **Added:** `TicketPanelView` — 460 px slide-over detail view. Supports switching between tickets without closing the panel. Header has inline-editable status / priority / category / assignee / group dropdowns (each picks unique action ids — `pick-0`, `pick-1`, ... — so `ContextMenu`'s `find()`-by-action correctly resolves the clicked item). Saves go through `_saveAndSync()` which `save()` + `fetch()`-es the model and refreshes notes (so backend-side `metadata.type === 'status_change'` notes appear immediately).
|
|
15
|
+
- **Added:** Description chip in the panel header. Tickets with a description show "Description" — click to view rendered markdown with `Edit` / `Close` buttons. Tickets without a description show "Add description" — click jumps straight to edit. The edit modal is a large textarea with markdown shortcuts (`Cmd/Ctrl+B` bold, `Cmd/Ctrl+I` italic, `Shift+Enter` continues lists, ``` ``` ``` opens a code fence, bracket auto-pairing). Description was removed from `TicketForms.edit.fields` since it now has its own editor.
|
|
16
|
+
- **Added:** `ActionCardView` — renders LLM agent action blocks from ticket notes inline directly under each note. Approval-type blocks show Approve / Deny buttons; resolved blocks render a compact one-line chip (label + Approved/Denied badge + chevron) that expands per-note on click to show the full card with reference links; context-type blocks show clickable model-reference links. Emits `action:respond` when the user responds; `TicketPanelView` writes the response back as a new note via `TicketNoteAdapter.addActionResponse`.
|
|
17
|
+
- **Changed:** `TicketNoteAdapter.transform` now also detects `metadata.type === 'status_change'` and renders the note as a muted system-event row with colored badges for `old_status` → `new_status`. System-event content skips the markdown-render pass so the badge HTML isn't escaped. `ChatMessageView`'s system-event template uses `{{{message.content}}}` (unescaped) so pre-rendered HTML lands intact.
|
|
18
|
+
- **Added:** `TicketNoteAdapter.addActionResponse(actionNote, action)` — convenience method that posts an approve/deny response note with the correct metadata shape.
|
|
19
|
+
|
|
20
|
+
### TableRow — `editable + formatter` cells now work
|
|
21
|
+
|
|
22
|
+
- **Changed:** `TableRow.buildCellTemplate` adds the `cell-content` class to the wrapper span when a column is `editable: true` — even when a `formatter` (string or function) or `template` is set. Previously these branches skipped the wrapper, so `enterEditMode()`'s `querySelector('.cell-content')` came back empty and silently no-op'd. Tables can now combine custom rendering (e.g. status pills) with inline editing.
|
|
23
|
+
|
|
24
|
+
### ChatMessageView — cleaner re-renders
|
|
25
|
+
|
|
26
|
+
- **Fixed:** the attachments container is cleared and prior `FilePreviewView` children are removed before re-rendering, so files no longer multiply on each re-render of a message.
|
|
27
|
+
- **Changed:** the `system_event` body uses `{{{message.content}}}` (unescaped) so callers can inject pre-rendered HTML (e.g. status-change badges).
|
|
28
|
+
|
|
29
|
+
### WebApp — MODEL_REF registry (`registerModelRef` / `getModelByRef`)
|
|
30
|
+
|
|
31
|
+
- **Added:** `app.registerModelRef(ref, ModelClass)` and `app.getModelByRef(ref)` — a registry that maps backend dotted-type strings (e.g. `'incident.Incident'`) to frontend Model classes.
|
|
32
|
+
- **Added:** `MODEL_REF` static property convention on Model classes — the string that identifies the class in the backend type system (analogous to `VIEW_CLASS`).
|
|
33
|
+
- **Changed:** `registerAdminPages` now calls `app.registerModelRef` for `Incident`, `IncidentEvent`, `RuleSet`, `Ticket`, and `GeoLocatedIP` automatically. Consumer apps do not need extra wiring for these types.
|
|
34
|
+
|
|
35
|
+
### Sidebar & TopNav — `iconHtml` field on nav items
|
|
36
|
+
|
|
37
|
+
- **Added:** `iconHtml` field on Sidebar and TopNav item configs. When set, the raw HTML string is rendered (triple-brace, unescaped) in place of the `icon` Bootstrap Icon. This allows custom SVG images or other HTML in sidebar/topbar item icons. `icon` remains the preferred option for Bootstrap Icons.
|
|
38
|
+
|
|
39
|
+
### Admin Assistant — context reference blocks in chat messages
|
|
40
|
+
|
|
41
|
+
- **Added:** `AssistantMessageView` now renders `block.type === 'context'` blocks as clickable model-reference chips inline in chat messages. Each reference in the block's `references` array renders as a compact chip with the model label and instance display name. If the referenced model is registered via `app.registerModelRef` and declares a `VIEW_CLASS`, clicking the chip opens the detail dialog (`Modal.showModel`). Unregistered or unknown model types render as plain text. All user-controlled fields are HTML-escaped; the `pk` value is validated against `/^\d+$/` before use to prevent XSS.
|
|
42
|
+
|
|
43
|
+
### Admin Assistant — renamed to "Mojo"
|
|
44
|
+
|
|
45
|
+
- **Changed:** The AI assistant is now displayed as "Mojo" throughout the admin extension — `AssistantPanelView`, `AssistantView`, `AssistantContextChat`, `AssistantConversationView`, `ChatMessageView`, and `AssistantMemoryPage` all use "Mojo" as the author name and panel title. The permission label in `User.CATEGORY_PERMISSIONS` changed from "AI Assistant" to "Mojo". The `assistant` permission key is unchanged.
|
|
46
|
+
- **Changed:** Assistant avatar in `ChatMessageView` and the welcome icon in `AssistantPanelView` / `AssistantView` changed from the `bi-robot` Bootstrap Icon to the Mojo logo image.
|
|
47
|
+
|
|
5
48
|
### MetricsChart / MetricsMiniChartWidget — granularity in stats header
|
|
6
49
|
|
|
7
50
|
- The stats modal now shows the granularity and bucket count above the
|
package/dist/admin-models.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/Collection-7F3lsq4z.js"),t=require("./chunks/User-BmS8zImI.js");class LoginEvent extends e.Model{constructor(e={}){super(e,{endpoint:"/api/account/logins"})}}class LoginEventList extends e.Collection{constructor(e={}){super({ModelClass:LoginEvent,endpoint:"/api/account/logins",...e})}}class IncidentStats extends e.Model{constructor(e={}){super(e,{endpoint:"/api/incident/stats",requiresId:!1})}}class IncidentEvent extends e.Model{constructor(e={}){super(e,{endpoint:"/api/incident/event"})}}class IncidentEventList extends e.Collection{constructor(e={}){super({ModelClass:IncidentEvent,endpoint:"/api/incident/event",size:10,...e})}}const a={edit:{title:"Edit Incident Event",fields:[{name:"category",type:"select",label:"Category",placeholder:"Select category",options:()=>Incident.COMPONENTS,editable:!0,force_top:!0,cols:6},{name:"incident",type:"text",label:"Incident",placeholder:"Enter Incident ID",cols:6},{name:"description",type:"textarea",label:"Description",placeholder:"Enter Description",cols:12},{name:"details",type:"textarea",label:"Details",placeholder:"Enter Details",cols:12},{name:"component",type:"text",label:"Component",placeholder:"Enter Component",cols:8},{name:"component_id",type:"text",label:"Component ID",placeholder:"Enter Component ID",cols:4}]}};class Incident extends e.Model{constructor(e={}){super(e,{endpoint:"/api/incident/incident"})}}class IncidentList extends e.Collection{constructor(e={}){super({ModelClass:Incident,endpoint:"/api/incident/incident",size:10,...e})}}class IncidentRuleSet extends e.Model{constructor(e={}){super(e,{endpoint:"/api/incident/event/ruleset"})}}class IncidentRuleSetList extends e.Collection{constructor(e={}){super({ModelClass:IncidentRuleSet,endpoint:"/api/incident/event/ruleset",size:10,...e})}}class IncidentRule extends e.Model{constructor(e={}){super(e,{endpoint:"/api/incident/event/ruleset/rule"})}}class IncidentRuleList extends e.Collection{constructor(e={}){super({ModelClass:IncidentRule,endpoint:"/api/incident/event/ruleset/rule",size:10,...e})}}class IncidentHistory extends e.Model{constructor(e={}){super(e,{endpoint:"/api/incident/incident/history"})}}class IncidentHistoryList extends e.Collection{constructor(e={}){super({ModelClass:IncidentHistory,endpoint:"/api/incident/incident/history",size:10,...e})}}const n=[{value:0,label:"No Bundling"},{value:1,label:"By Hostname"},{value:2,label:"By Model Name"},{value:3,label:"By Model Name + ID"},{value:4,label:"By Source IP"},{value:5,label:"By Hostname + Model Name"},{value:6,label:"By Hostname + Model Name + ID"},{value:7,label:"By Source IP + Model Name"},{value:8,label:"By Source IP + Model Name + ID"},{value:9,label:"By Source IP + Hostname"}],l=[{value:0,label:"ALL (must match all rules)"},{value:1,label:"ANY (match any rule)"}],s=[{value:"==",label:"Equal (==)"},{value:"eq",label:"Equal (eq)"},{value:">",label:"Greater Than (>)"},{value:">=",label:"Greater Than or Equal (>=)"},{value:"<",label:"Less Than (<)"},{value:"<=",label:"Less Than or Equal (<=)"},{value:"contains",label:"Contains"},{value:"regex",label:"Regular Expression"}],o=[{value:"str",label:"String"},{value:"int",label:"Integer"},{value:"float",label:"Float"},{value:"bool",label:"Boolean"}],i=[{value:"level",label:"Level",description:"Event level (error, warning, info, debug)",meta:{type:"str"}},{value:"source_ip",label:"Source IP Address",description:"IP address of the event source",meta:{type:"str"}},{value:"rule_id",label:"Rule ID",description:"Numeric rule identifier",meta:{type:"int"}},{value:"hostname",label:"Hostname",description:"Hostname where event occurred",meta:{type:"str"}},{value:"component",label:"Component",description:"System component name",meta:{type:"str"}},{value:"component_id",label:"Component ID",description:"Component identifier",meta:{type:"str"}},{value:"category",label:"Category",description:"Event category (ossec, auth, api_error, etc.)",meta:{type:"str"}},{value:"description",label:"Description",description:"Event description text",meta:{type:"str"}},{value:"details",label:"Details",description:"Additional event details",meta:{type:"str"}},{value:"alert_id",label:"Alert ID",description:"Numeric alert identifier",meta:{type:"int"}},{value:"severity",label:"Severity",description:"Numeric severity level",meta:{type:"int"}},{value:"user",label:"User",description:"Username associated with event",meta:{type:"str"}},{value:"action",label:"Action",description:"Action that triggered the event",meta:{type:"str"}},{value:"status",label:"Status",description:"Status value or code",meta:{type:"str"}},{value:"status_code",label:"Status Code",description:"Numeric status code (e.g., HTTP status)",meta:{type:"int"}},{value:"message",label:"Message",description:"Event message text",meta:{type:"str"}},{value:"path",label:"Path",description:"File path or URL path",meta:{type:"str"}},{value:"title",label:"Title",description:"OSSEC Title",meta:{type:"str"}},{value:"country_code",label:"Country Code",description:"Country code associated with event",meta:{type:"str"}},{value:"region",label:"Region",description:"Region associated with event",meta:{type:"str"}},{value:"city",label:"City",description:"City associated with event",meta:{type:"str"}},{value:"http_user_agent",label:"HTTP User Agent",description:"User agent string associated with event",meta:{type:"str"}},{value:"request_path",label:"Request Path",description:"Request path associated with event",meta:{type:"str"}},{value:"method",label:"Method",description:"HTTP method or function name",meta:{type:"str"}}],r=["global","account","ossec","api","realtime","auth","login:unknown","invalid_password","sms:login_unknown","totp:login_unknown","reset:unknown","magic:unknown","token:unknown","api_denied","unauthenticated","view_permission_denied","edit_permission_denied","group_member_permission_denied","user_permission_denied","security_alert","totp:confirm_failed","totp:login_failed","totp:recovery_used","sms:otp_failed","email:no_mailbox","email:send_failed","sms:send_failed","email_change:bad_password","email_change:requested","account:deactivate_requested","phone_verify:invalid","email_verify:invalid","oauth:unlink_guard_error","rest_error","mojo_rest_error","rest_value_error"],c=r;class RuleSet extends e.Model{constructor(e={}){super(e,{endpoint:"/api/incident/event/ruleset"})}}class RuleSetList extends e.Collection{constructor(e={}){super({ModelClass:RuleSet,endpoint:"/api/incident/event/ruleset",...e})}}const u=[{value:0,label:"Disabled — each event gets its own incident"},{value:5,label:"5 minutes"},{value:10,label:"10 minutes"},{value:15,label:"15 minutes"},{value:30,label:"30 minutes"},{value:60,label:"1 hour"},{value:120,label:"2 hours"},{value:360,label:"6 hours"},{value:720,label:"12 hours"},{value:1440,label:"1 day"},{value:null,label:"No limit — bundle forever"}],d={create:{title:"Create RuleSet",size:"lg",fields:[{type:"tabset",name:"rulesetTabs",tabs:[{label:"General",fields:[{name:"name",type:"text",label:"Name",required:!0,placeholder:"e.g., Brute Force Detection",columns:6},{name:"match_by",type:"select",label:"Match Logic",value:0,options:l,tooltip:"ALL = every condition must match. ANY = at least one",columns:6},{name:"category",type:"combo",label:"Scope / Category",required:!0,options:r,allowCustom:!0,placeholder:"Type or select...",tooltip:"Scope or event category to match. Use * as a catch-all",columns:6},{name:"priority",type:"number",label:"Evaluation Priority",value:10,required:!0,tooltip:"Lower number = evaluated first",columns:6},{name:"is_active",type:"switch",label:"Active",value:!0,tooltip:"Inactive rules are skipped during event processing",columns:6},{name:"metadata.delete_on_resolution",type:"switch",label:"Delete on Resolution",value:!1,tooltip:"Incidents are permanently deleted when resolved or closed (CASCADE)",columns:6}]},{label:"Bundling",fields:[{name:"bundle_by",type:"select",label:"Bundle By",value:4,options:n,tooltip:"How to group related events into one incident",columns:6},{name:"bundle_minutes",type:"select",label:"Bundle Window",value:30,options:u,tooltip:"Events outside this window create a new incident",columns:6},{name:"bundle_by_rule_set",type:"switch",label:"Bundle by RuleSet",value:!0,tooltip:"Group events matched by this rule into the same incident",columns:6}]},{label:"Thresholds",fields:[{type:"html",columns:12,html:'<div class="alert alert-info small mb-3">\n <i class="bi bi-info-circle me-1"></i>\n <strong>How thresholds work:</strong> Events accumulate in "pending" status.\n Once trigger count is reached, the handler fires and the incident becomes "new".\n Leave empty to fire immediately on the first event.\n </div>'},{name:"trigger_count",type:"number",label:"Trigger Count",placeholder:"Empty = immediate",tooltip:"Number of events before the handler fires",columns:4},{name:"trigger_window",type:"number",label:"Trigger Window (min)",placeholder:"Empty = all events",tooltip:"Only count events within this many minutes",columns:4},{name:"retrigger_every",type:"number",label:"Re-trigger Every",placeholder:"Empty = once",tooltip:"Re-fire handler every N additional events after initial trigger",columns:4}]},{label:"Handler",fields:[{name:"handler",type:"text",label:"Handler Chain",placeholder:"e.g., block://?ttl=3600,ticket://?priority=8",tooltip:"Chain multiple handlers with commas",columns:12},{type:"html",columns:12,html:'<div class="alert alert-light border small mb-0">\n <code>block://?ttl=3600</code> — Block source IP<br>\n <code>ticket://?priority=8</code> — Create ticket<br>\n <code>email://perm@manage_security</code> — Email notification<br>\n <code>sms://perm@manage_security</code> — SMS notification<br>\n <code>notify://perm@manage_security</code> — In-app + push<br>\n <code>llm://</code> — LLM triage agent<br>\n <code>job://myapp.module.function</code> — Async job\n </div>'}]}]}]},edit:{title:"Edit RuleSet",size:"lg",fields:[{type:"tabset",name:"rulesetTabs",tabs:[{label:"General",fields:[{name:"name",type:"text",label:"Name",required:!0,placeholder:"e.g., Brute Force Detection",columns:6},{name:"match_by",type:"select",label:"Match Logic",options:l,tooltip:"ALL = every condition must match. ANY = at least one",columns:6},{name:"category",type:"combo",label:"Scope / Category",options:r,allowCustom:!0,required:!0,placeholder:"Type or select...",tooltip:"Scope or event category to match. Use * as a catch-all",columns:6},{name:"priority",type:"number",label:"Evaluation Priority",required:!0,tooltip:"Lower number = evaluated first",columns:6},{name:"is_active",type:"switch",label:"Active",tooltip:"Inactive rules are skipped during event processing",columns:6},{name:"metadata.delete_on_resolution",type:"switch",label:"Delete on Resolution",tooltip:"Incidents are permanently deleted when resolved or closed (CASCADE)",columns:6}]},{label:"Bundling",fields:[{name:"bundle_by",type:"select",label:"Bundle By",options:n,tooltip:"How to group related events into one incident",columns:6},{name:"bundle_minutes",type:"select",label:"Bundle Window",options:u,tooltip:"Events outside this window create a new incident",columns:6},{name:"bundle_by_rule_set",type:"switch",label:"Bundle by RuleSet",tooltip:"Group events matched by this rule into the same incident",columns:6}]},{label:"Thresholds",fields:[{type:"html",columns:12,html:'<div class="alert alert-info small mb-3">\n <i class="bi bi-info-circle me-1"></i>\n <strong>How thresholds work:</strong> Events accumulate in "pending" status.\n Once trigger count is reached, the handler fires and the incident becomes "new".\n Leave empty to fire immediately on the first event.\n </div>'},{name:"trigger_count",type:"number",label:"Trigger Count",placeholder:"Empty = immediate",tooltip:"Number of events before the handler fires",columns:4},{name:"trigger_window",type:"number",label:"Trigger Window (min)",placeholder:"Empty = all events",tooltip:"Only count events within this window toward the trigger count",columns:4},{name:"retrigger_every",type:"number",label:"Re-trigger Every",placeholder:"Empty = once",tooltip:"Re-fire handler every N additional events after initial trigger",columns:4}]},{label:"Handler",fields:[{name:"handler",type:"text",label:"Handler Chain",placeholder:"e.g., block://?ttl=3600,ticket://?priority=8",tooltip:"Chain multiple handlers with commas",columns:12},{type:"html",columns:12,html:'<div class="alert alert-light border small mb-0">\n <code>block://?ttl=3600</code> — Block source IP<br>\n <code>ticket://?priority=8</code> — Create ticket<br>\n <code>email://perm@manage_security</code> — Email notification<br>\n <code>sms://perm@manage_security</code> — SMS notification<br>\n <code>notify://perm@manage_security</code> — In-app + push<br>\n <code>llm://</code> — LLM triage agent<br>\n <code>job://myapp.module.function</code> — Async job\n </div>'}]}]}]}};class Rule extends e.Model{constructor(e={}){super(e,{endpoint:"/api/incident/event/ruleset/rule"})}}class RuleList extends e.Collection{constructor(e={}){super({ModelClass:Rule,endpoint:"/api/incident/event/ruleset/rule",...e})}}const p={create:{title:"Create Rule",fields:[{name:"name",type:"text",label:"Name",required:!0,placeholder:"Enter rule name",cols:12},{name:"field_name",type:"combo",label:"Field Name",required:!0,placeholder:"Select or enter field name...",options:i,allowCustom:!0,showDescription:!0,help:"Select a common field or type a custom field name",cols:8},{name:"index",type:"select",label:"Index",required:!0,start:0,end:14,step:1,cols:4},{name:"comparator",type:"select",label:"Comparator",required:!0,options:s,cols:6},{name:"value_type",type:"select",label:"Value Type",required:!0,options:o,value:"str",cols:6},{name:"value",type:"textarea",label:"Value",required:!0,placeholder:"Enter comparison value",cols:12}]},edit:{title:"Edit Rule",fields:[{name:"name",type:"text",label:"Name",required:!0,placeholder:"Enter rule name",cols:12},{name:"field_name",type:"combo",label:"Field Name",required:!0,placeholder:"Select or enter field name...",options:i,allowCustom:!0,showDescription:!0,help:"Select a common field or type a custom field name",cols:12},{name:"comparator",type:"select",label:"Comparator",required:!0,options:s,cols:6},{name:"value_type",type:"select",label:"Value Type",required:!0,options:o,cols:6},{name:"value",type:"text",label:"Value",required:!0,placeholder:"Enter comparison value",cols:12}]}};RuleSet.EDIT_FORM=d.edit,RuleSet.ADD_FORM=d.create,RuleSet.CREATE_FORM=d.create,RuleSet.BundleByOptions=n,RuleSet.MatchByOptions=l,Rule.EDIT_FORM=p.edit,Rule.ADD_FORM=p.create,Rule.CREATE_FORM=p.create,Rule.ComparatorOptions=s,Rule.ValueTypeOptions=o;class PushDevice extends e.Model{constructor(e={}){super(e,{endpoint:"/api/account/devices/push"})}}class PushDeviceList extends e.Collection{constructor(e={}){super({ModelClass:PushDevice,endpoint:"/api/account/devices/push",...e})}}class PushTemplate extends e.Model{constructor(e={}){super(e,{endpoint:"/api/account/devices/push/templates"})}}class PushTemplateList extends e.Collection{constructor(e={}){super({ModelClass:PushTemplate,endpoint:"/api/account/devices/push/templates",...e})}}class PushConfig extends e.Model{constructor(e={}){super(e,{endpoint:"/api/account/devices/push/config"})}}class PushConfigList extends e.Collection{constructor(e={}){super({ModelClass:PushConfig,endpoint:"/api/account/devices/push/config",...e})}}class PushDelivery extends e.Model{constructor(e={}){super(e,{endpoint:"/api/account/devices/push/deliveries"})}}class PushDeliveryList extends e.Collection{constructor(e={}){super({ModelClass:PushDelivery,endpoint:"/api/account/devices/push/deliveries",...e})}}const m={create:{title:"Create Push Configuration",fields:[{name:"name",label:"Name",required:!0},{type:"collection",name:"group",label:"Group (optional)",Collection:t.GroupList,labelField:"name",valueField:"id"},{name:"fcm_service_account",label:"Service Account",type:"textarea",rows:10}]},edit:{title:"Edit Push Configuration",fields:[{name:"name",label:"Name",required:!0},{type:"collection",name:"group",label:"Group (optional)",Collection:t.GroupList,labelField:"name",valueField:"id"},{name:"fcm_service_account",label:"Service Account",type:"textarea",rows:10},{name:"is_active",label:"Is Active",type:"switch",value:!0}]}},b={edit:{title:"Edit Push Template",fields:[{name:"name",label:"Name",required:!0},{name:"category",label:"Category",required:!0},{type:"collection",name:"group",label:"Group (optional)",Collection:t.GroupList,labelField:"name",valueField:"id",defaultParams:{is_active:!0}},{name:"title_template",label:"Title Template",required:!0},{name:"body_template",label:"Body Template",type:"textarea",required:!0},{name:"action_url",label:"Action URL"},{name:"priority",label:"Priority",type:"select",options:["high","normal"]},{name:"variables",label:"Variables",type:"json",help:"JSON format"},{name:"is_active",label:"Is Active",type:"switch"}]}};m.create=m.edit,b.create=b.edit;class Ticket extends e.Model{constructor(e={}){super(e,{endpoint:"/api/incident/ticket"})}}class TicketList extends e.Collection{constructor(e={}){super({ModelClass:Ticket,endpoint:"/api/incident/ticket",...e})}}const h={ticket:"Ticket",bug:"Bug",feature:"Feature Request",incident:"Incident",security:"Security Incident",fulfillment:"Fulfillment",new_user:"New User",new_group:"New Group",qa:"Quality Assurance"},y=Object.entries(h).map(([e,t])=>({value:e,label:t})),v={create:{title:"Create Ticket",fields:[{name:"title",type:"text",label:"Title",required:!0,cols:12},{name:"description",type:"textarea",label:"Description",required:!1,cols:12},{name:"category",type:"select",label:"Category",options:y,cols:12,value:"ticket"},{name:"priority",type:"number",label:"Priority",value:5,cols:6},{name:"status",type:"select",label:"Status",options:["new","open","paused","resolved","qa","ignored"],cols:6,value:"new"},{type:"collection",name:"assignee",label:"Assignee",Collection:t.UserList,labelField:"display_name",valueField:"id",cols:12},{type:"collection",name:"incident",label:"Incident",Collection:IncidentList,labelField:"title",valueField:"id",cols:12}]},edit:{title:"Edit Ticket",fields:[{name:"title",type:"text",label:"Title",required:!0,cols:12},{name:"description",type:"textarea",label:"Description",required:!1,cols:12},{name:"category",type:"select",label:"Category",options:y,cols:12},{name:"priority",type:"number",label:"Priority",cols:6},{name:"status",type:"select",label:"Status",options:["new","open","paused","resolved","qa","ignored"],cols:6},{type:"collection",name:"assignee",label:"Assignee",Collection:t.UserList,labelField:"display_name",valueField:"id",cols:12},{type:"collection",name:"incident",label:"Incident",Collection:IncidentList,labelField:"title",valueField:"id",cols:12}]}};class TicketNote extends e.Model{constructor(e={}){super(e,{endpoint:"/api/incident/ticket/note"})}}class TicketNoteList extends e.Collection{constructor(e={}){super({ModelClass:TicketNote,endpoint:"/api/incident/ticket/note",...e})}}class AssistantConversation extends e.Model{constructor(e={}){super(e,{endpoint:"/api/assistant/conversation"})}}class AssistantConversationList extends e.Collection{constructor(e={}){super({ModelClass:AssistantConversation,endpoint:"/api/assistant/conversation",size:50,...e})}}class AssistantSkill extends e.Model{constructor(e={}){super(e,{endpoint:"/api/assistant/skill"})}}class AssistantSkillList extends e.Collection{constructor(e={}){super({ModelClass:AssistantSkill,endpoint:"/api/assistant/skill",size:50,...e})}}class Job extends e.Model{constructor(e={}){super(e,{endpoint:"/api/jobs/job"})}async cancel(){const e=await this.save({cancel_request:!0});return e.success&&e.data.status&&this.set("cancel_requested",!0),e}async retry(e=null){const t=e?{retry_request:{retry:!0,delay:e}}:{retry_request:!0},a=await this.save(t);return a.success&&a.data.status&&a.data.new_job_id?{...a,newJobId:a.data.new_job_id,originalJobId:a.data.original_job_id}:a}async getDetailedStatus(){const e=await this.save({get_status:!0});return e.success&&e.data.status&&this.set(e.data.data),e}async cloneJob(e={}){const t={publish_job:{payload:e,...e}},a=await this.save(t);return a.success&&a.data.status&&a.data.job_id?{...a,newJobId:a.data.job_id,templateJobId:a.data.template_job_id}:a}isActive(){const e=this.get("status");return["pending","running"].includes(e)}isScheduled(){if("pending"!==this.get("status"))return!1;const e=this.get("run_at");if(!e)return!1;const t="number"==typeof e&&e<1e11?1e3*e:new Date(e).getTime();return Number.isFinite(t)&&t>Date.now()}isTerminal(){const e=this.get("status");return["completed","failed","canceled","expired"].includes(e)}canRetry(){const e=this.get("status");return["failed","canceled","expired"].includes(e)&&!1!==this.get("is_retriable")}canCancel(){const e=this.get("status");return["pending","running"].includes(e)&&!this.get("cancel_requested")}getStatusBadgeClass(){return{pending:"bg-primary",running:"bg-success",completed:"bg-info",failed:"bg-danger",canceled:"bg-secondary",expired:"bg-warning"}[this.get("status")]||"bg-secondary"}getStatusIcon(){return{pending:"bi-hourglass",running:"bi-arrow-repeat",completed:"bi-check-circle",failed:"bi-x-octagon",canceled:"bi-x-circle",expired:"bi-clock"}[this.get("status")]||"bi-question-circle"}getEvents(){return this.get("recent_events")||[]}getFormattedDuration(){const e=this.get("duration_ms");return e&&0!==e?e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${(e/6e4).toFixed(1)}m`:`${(e/36e5).toFixed(1)}h`:"N/A"}getQueuePosition(){return this.get("queue_position")}hasExpired(){const e=this.get("expires_at");return!!e&&new Date(e)</* @__PURE__ */new Date}getRunnerId(){return this.get("runner_id")}getPayload(){return this.get("payload")||{}}getMetadata(){return this.get("metadata")||{}}}class JobList extends e.Collection{constructor(e={}){super({ModelClass:Job,endpoint:"/api/jobs/job",...e})}async fetchByStatus(e,t={}){return this.fetch({status:e,...t})}async fetchByChannel(e,t={}){return this.fetch({channel:e,...t})}async fetchPending(e={}){return this.fetchByStatus("pending",e)}async fetchRunning(e={}){return this.fetchByStatus("running",e)}async fetchCompleted(e={}){return this.fetchByStatus("completed",e)}async fetchFailed(e={}){return this.fetchByStatus("failed",e)}async fetchScheduled(e={}){return this.fetch({scheduled:!0,...e})}}Job.publish=async function(t){return await e.rest.POST("/api/jobs/publish",t)},Job.getStats=async function(){const t=await e.rest.GET("/api/jobs/stats");return t.success?t.data:null},Job.getHealth=async function(t=null){const a=t?`/api/jobs/health/${t}`:"/api/jobs/health",n=e.rest.GET(a);return n.success?n.data:null},Job.test=async function(){return await e.rest.POST("/api/jobs/test",{})},Job.tests=async function(){return await e.rest.POST("/api/jobs/tests",{})},Job.clearStuck=async function(t=null){const a=t?{channel:t}:{};return await e.rest.POST("/api/jobs/control/clear-stuck",a)},Job.clearChannel=async function(t){return await e.rest.POST("/api/jobs/control/clear-queue",{channel:t,confirm:"yes"})},Job.cleanConsumers=async function(){return await e.rest.POST("/api/jobs/control/cleanup-consumers")},Job.purgeJobs=async function(t){return await e.rest.POST("/api/jobs/control/purge",{days_old:t})};class JobLog extends e.Model{constructor(e={}){super(e,{endpoint:"/api/jobs/logs"})}}class JobLogList extends e.Collection{constructor(e={}){super({endpoint:"/api/jobs/logs",model:JobLog,...e})}}class JobEvent extends e.Model{constructor(e={}){super(e,{endpoint:"/api/jobs/event"})}}class JobEventList extends e.Collection{constructor(e={}){super({endpoint:"/api/jobs/event",model:JobEvent,...e})}}class JobsEngineStats extends e.Model{constructor(e={}){super(e,{endpoint:"/api/jobs/stats",requiresId:!1})}}class EmailDomain extends e.Model{constructor(e={},t={}){super(e,{endpoint:"/api/aws/email/domain",...t})}async onboard(e={},t={}){if(!this.id)return await this.showError("Cannot onboard domain without ID"),{success:!1,status:400,error:"Missing domain id"};try{const a=`${this.buildUrl(this.id)}/onboard`;return await this.rest.POST(a,e,t.params)}catch(a){return{success:!1,status:a?.status||500,error:a?.message||"Failed to onboard domain"}}}async audit(e={}){if(!this.id)return await this.showError("Cannot audit domain without ID"),{success:!1,status:400,error:"Missing domain id"};const t=(e.method||"GET").toUpperCase(),a=`${this.buildUrl(this.id)}/audit`;try{return"POST"===t?await this.rest.POST(a,e.data||{},e.params):await this.rest.GET(a,e.params)}catch(n){return{success:!1,status:n?.status||500,error:n?.message||"Failed to audit domain"}}}async reconcile(e={},t={}){if(!this.id)return await this.showError("Cannot reconcile domain without ID"),{success:!1,status:400,error:"Missing domain id"};try{const a=`${this.buildUrl(this.id)}/reconcile`;return await this.rest.POST(a,e,t.params)}catch(a){return{success:!1,status:a?.status||500,error:a?.message||"Failed to reconcile domain"}}}static async onboardById(e,t={},a={}){const n=new EmailDomain({id:e},a);return await n.onboard(t,a)}static async auditById(e,t={}){const a=new EmailDomain({id:e},t);return await a.audit(t)}static async reconcileById(e,t={},a={}){const n=new EmailDomain({id:e},a);return await n.reconcile(t,a)}}class EmailDomainList extends e.Collection{constructor(e={}){super({ModelClass:EmailDomain,endpoint:"/api/aws/email/domain",size:10,...e})}}class Mailbox extends e.Model{constructor(e={},t={}){super(e,{endpoint:"/api/aws/email/mailbox",...t})}}Mailbox.sendEmail=async function(t){return await e.rest.POST("/api/aws/email/send",t)};class MailboxList extends e.Collection{constructor(e={}){super({ModelClass:Mailbox,endpoint:"/api/aws/email/mailbox",size:10,...e})}}const g={create:{title:"Add Mailbox",fields:[{type:"collection",name:"domain",label:"Domain",Collection:EmailDomainList,labelField:"name",valueField:"id",maxItems:10,placeholder:"Search domains...",emptyFetch:!1,required:!0,debounceMs:300,columns:12},{name:"email",type:"email",label:"Email Address",placeholder:"support@example.com",required:!0,columns:12},{name:"allow_inbound",type:"switch",label:"Allow Inbound",columns:6},{name:"allow_outbound",type:"switch",label:"Allow Outbound",defaultValue:!0,columns:6},{name:"is_system_default",type:"switch",label:"System Default",columns:6},{name:"is_domain_default",type:"switch",label:"Domain Default",columns:6},{name:"async_handler",type:"text",label:"Async Handler (optional)",placeholder:"myapp.handlers.process_support",columns:12,help:"Module:function to process inbound messages via task system"}]},edit:{title:"Edit Mailbox",fields:[{name:"email",type:"email",label:"Email Address",required:!0,columns:12},{name:"allow_inbound",type:"switch",label:"Allow Inbound",columns:6},{name:"allow_outbound",type:"switch",label:"Allow Outbound",columns:6},{name:"is_system_default",type:"switch",label:"System Default",columns:6},{name:"is_domain_default",type:"switch",label:"Domain Default",columns:6},{name:"async_handler",type:"text",label:"Async Handler (optional)",placeholder:"myapp.handlers.process_support",columns:12}]}};class SentMessage extends e.Model{constructor(e={},t={}){super(e,{endpoint:"/api/aws/email/sent",...t})}}class SentMessageList extends e.Collection{constructor(e={}){super({ModelClass:SentMessage,endpoint:"/api/aws/email/sent",size:10,...e})}}class EmailTemplate extends e.Model{constructor(e={},t={}){super(e,{endpoint:"/api/aws/email/template",...t})}}class EmailTemplateList extends e.Collection{constructor(e={}){super({ModelClass:EmailTemplate,endpoint:"/api/aws/email/template",size:10,...e})}}class PublicMessage extends e.Model{constructor(e={}){super(e,{endpoint:"/api/account/public_message"})}}class PublicMessageList extends e.Collection{constructor(e={}){super({ModelClass:PublicMessage,endpoint:"/api/account/public_message",size:25,...e})}}class PhoneNumber extends e.Model{constructor(e={},t={}){super(e,{endpoint:"/api/phonehub/number",...t})}static async normalize(t,a="US"){const n={phone_number:t};a&&(n.country_code=a);const l=await e.rest.POST("/api/phonehub/number/normalize",n),s=l?.data??l;return!0===s?.status||!0===s?.success?{success:!0,phone_number:s?.data?.phone_number??s?.phone_number,data:s?.data??s,response:l}:{success:!1,error:s?.error||"Normalization failed",response:l}}static async lookup(t,a={}){const n=await e.rest.POST("/api/phonehub/number/lookup",{phone_number:t,...a}),l=n?.data??n;if(!0===l?.status||!0===l?.success){const e=l?.data??{};return{success:!0,model:new PhoneNumber(e,{endpoint:"/api/phonehub/number"}),data:e,response:n}}return{success:!1,error:l?.error||"Phone lookup failed",response:n}}}class PhoneNumberList extends e.Collection{constructor(e={}){super({ModelClass:PhoneNumber,endpoint:"/api/phonehub/number",size:10,...e})}}class SMS extends e.Model{constructor(e={},t={}){super(e,{endpoint:"/api/phonehub/sms",...t})}static async send(t={}){const a=await e.rest.POST("/api/phonehub/sms/send",t),n=a?.data??a;if(!0===n?.status||!0===n?.success){const e=n?.data??{};return{success:!0,model:new SMS(e,{endpoint:"/api/phonehub/sms"}),data:e,response:a}}return{success:!1,error:n?.error||"Failed to send SMS",response:a}}}class SMSList extends e.Collection{constructor(e={}){super({ModelClass:SMS,endpoint:"/api/phonehub/sms",size:10,...e})}}const x={PhoneNumber:PhoneNumber,PhoneNumberList:PhoneNumberList,SMS:SMS,SMSList:SMSList};class JobRunner extends e.Model{constructor(e={}){e.runner_id&&!e.id&&(e.id=e.runner_id),super(e,{endpoint:"/api/jobs/runners",idAttribute:"runner_id"})}async ping(e=2){const t=this.getApp();if(!t||!t.rest)throw new Error("App or REST client not available");const a=await t.rest.POST("/api/jobs/runners/ping",{runner_id:this.get("runner_id"),timeout:e});return a.success&&a.data.status&&(this.set("last_heartbeat",/* @__PURE__ */(new Date).toISOString()),this.set("ping_status",a.data.ping_status||"success")),a}async shutdown(e=!0){const t=this.getApp();if(!t||!t.rest)throw new Error("App or REST client not available");const a=await t.rest.POST("/api/jobs/runners/shutdown",{runner_id:this.get("runner_id"),graceful:e});return a.success&&a.data.status&&this.set("alive",!1),a}getChannels(){return this.get("channels")||[]}getStatusBadgeClass(){return this.get("alive")?"bg-success":"bg-danger"}getStatusIcon(){return this.get("alive")?"bi-check-circle-fill":"bi-x-octagon-fill"}isActive(){return!0===this.get("alive")}isHealthy(){if(!this.isActive())return!1;const e=this.get("last_heartbeat");return!!e&&(Date.now()-new Date(e).getTime())/1e3<120}getFormattedHeartbeatAge(){const e=this.get("last_heartbeat");if(!e)return"Never";const t=(Date.now()-new Date(e).getTime())/1e3;return t<60?`${Math.round(t)}s ago`:t<3600?`${Math.round(t/60)}m ago`:`${Math.round(t/3600)}h ago`}getUtilization(){const e=(this.get("jobs_processed")||0)+(this.get("jobs_failed")||0);return e>10?100:Math.min(10*e,100)}getFormattedUptime(){const e=this.get("started");if(!e)return"Unknown";const t=new Date(e),a=/* @__PURE__ */new Date-t,n=Math.floor(a/1e3);return n<60?`${n}s`:n<3600?`${Math.floor(n/60)}m`:n<86400?`${Math.floor(n/3600)}h`:`${Math.floor(n/86400)}d`}getWorkerInfo(){const e=this.get("jobs_processed")||0,t=this.get("jobs_failed")||0;return{processed:e,failed:t,total:e+t,alive:this.get("alive"),utilization:this.getUtilization()}}getDisplayName(){const e=this.get("runner_id");if(!e)return"Unknown Runner";const t=e.split("-");return t.length>1?t[0]:e}canControl(){return!0===this.get("alive")}}class JobRunnerList extends e.Collection{constructor(e={}){super({ModelClass:JobRunner,endpoint:"/api/jobs/runners",...e})}getActive(){return this.where(e=>e.isActive())}getByChannel(e){return this.where(t=>t.getChannels().includes(e))}getHealthy(){return this.where(e=>e.isHealthy())}getTotalProcessed(){return this.models.reduce((e,t)=>e+(t.get("jobs_processed")||0),0)}getTotalFailed(){return this.models.reduce((e,t)=>e+(t.get("jobs_failed")||0),0)}getSystemHealth(){if(0===this.models.length)return 0;const e=this.models.filter(e=>e.get("alive")).length;return Math.round(e/this.models.length*100)}getAllChannels(){const e=/* @__PURE__ */new Set;return this.models.forEach(t=>{t.getChannels().forEach(t=>e.add(t))}),Array.from(e).sort()}}JobRunner.ping=async function(e,t=2){const a="undefined"!=typeof window&&window.app;if(!a||!a.rest)throw new Error("App or REST client not available");return await a.rest.POST("/api/jobs/runners/ping",{runner_id:e,timeout:t})},JobRunner.shutdown=async function(e,t=!0){const a="undefined"!=typeof window&&window.app;if(!a||!a.rest)throw new Error("App or REST client not available");return await a.rest.POST("/api/jobs/runners/shutdown",{runner_id:e,graceful:t})},JobRunner.broadcast=async function(e,t={},a=2){const n="undefined"!=typeof window&&window.app;if(!n||!n.rest)throw new Error("App or REST client not available");return await n.rest.POST("/api/jobs/runners/broadcast",{command:e,data:t,timeout:a})},JobRunner.broadcastStatus=async function(e=2){return JobRunner.broadcast("status",{},e)},JobRunner.broadcastShutdown=async function(e=2){return JobRunner.broadcast("shutdown",{},e)},JobRunner.broadcastPause=async function(e=2){return JobRunner.broadcast("pause",{},e)},JobRunner.broadcastResume=async function(e=2){return JobRunner.broadcast("resume",{},e)},JobRunner.broadcastReload=async function(e=2){return JobRunner.broadcast("reload",{},e)};class BouncerDevice extends e.Model{constructor(e={},t={}){super(e,{endpoint:"/api/account/bouncer/device",...t})}}class BouncerDeviceList extends e.Collection{constructor(e={}){super({ModelClass:BouncerDevice,endpoint:"/api/account/bouncer/device",size:25,...e})}}class BouncerSignal extends e.Model{constructor(e={},t={}){super(e,{endpoint:"/api/account/bouncer/signal",...t})}}class BouncerSignalList extends e.Collection{constructor(e={}){super({ModelClass:BouncerSignal,endpoint:"/api/account/bouncer/signal",size:25,...e})}}class BouncerSignature extends e.Model{constructor(e={},t={}){super(e,{endpoint:"/api/account/bouncer/signature",...t})}}class BouncerSignatureList extends e.Collection{constructor(e={}){super({ModelClass:BouncerSignature,endpoint:"/api/account/bouncer/signature",size:25,...e})}}const S=[{value:"country",label:"Country — Block all traffic from a country"},{value:"abuse",label:"Abuse Feed — Import known attacker IPs"},{value:"datacenter",label:"Datacenter — Block datacenter/hosting ranges"},{value:"custom",label:"Custom — Define your own CIDR list"}],f=[{value:"country",label:"Country"},{value:"abuse",label:"Abuse Feed"},{value:"datacenter",label:"Datacenter"},{value:"custom",label:"Custom"}],w=[{value:"ipdeny",label:"IPDeny (Country Zones)"},{value:"abuseipdb",label:"AbuseIPDB"},{value:"manual",label:"Manual"}],_=[{value:"cn",label:"China"},{value:"ru",label:"Russia"},{value:"kp",label:"North Korea"},{value:"ir",label:"Iran"},{value:"ng",label:"Nigeria"},{value:"ro",label:"Romania"},{value:"br",label:"Brazil"},{value:"in",label:"India"},{value:"pk",label:"Pakistan"},{value:"id",label:"Indonesia"},{value:"vn",label:"Vietnam"},{value:"ua",label:"Ukraine"},{value:"th",label:"Thailand"},{value:"ph",label:"Philippines"},{value:"bd",label:"Bangladesh"},{value:"eg",label:"Egypt"},{value:"tr",label:"Turkey"},{value:"mx",label:"Mexico"},{value:"ar",label:"Argentina"},{value:"co",label:"Colombia"}];class IPSet extends e.Model{constructor(e={}){super(e,{endpoint:"/api/incident/ipset"})}}class IPSetList extends e.Collection{constructor(e={}){super({ModelClass:IPSet,endpoint:"/api/incident/ipset",...e})}}const C={create:{title:"Create IP Set",size:"md",fields:[{name:"kind",type:"select",label:"What do you want to block?",required:!0,options:S,value:"country",columns:12},{name:"country_code",type:"select",label:"Country",required:!0,options:_,help:"Select a country to block. CIDRs are fetched automatically from IPDeny.",columns:8,showWhen:{field:"kind",value:"country"}},{name:"source_key",type:"text",label:"API Key",required:!0,placeholder:"Your AbuseIPDB API key",help:"Get a free key at abuseipdb.com. Never stored in plaintext.",columns:12,showWhen:{field:"kind",value:"abuse"}},{name:"source_url",type:"url",label:"Source URL",required:!0,placeholder:"https://example.com/datacenter-ranges.txt",help:"URL to a plain text file with one CIDR per line.",columns:12,showWhen:{field:"kind",value:"datacenter"}},{name:"data",type:"textarea",label:"CIDR List",rows:8,placeholder:"# One CIDR per line\n192.0.2.0/24\n198.51.100.0/24\n203.0.113.0/24",help:"Enter IP ranges in CIDR notation. Lines starting with # are ignored.",columns:12,showWhen:{field:"kind",value:"custom"}},{name:"name",type:"text",label:"Name",required:!0,placeholder:"e.g., abuse_ips, dc_aws",help:"Unique identifier. Used as the kernel ipset name.",columns:6,showWhen:{field:"kind",value:"country",negate:!0}},{name:"description",type:"text",label:"Description",placeholder:"Human-readable label",columns:6,showWhen:{field:"kind",value:"country",negate:!0}},{name:"is_enabled",type:"switch",label:"Enable immediately",value:!0,help:"When enabled, CIDRs are synced to the fleet and traffic is blocked.",columns:4}]},edit:{title:"Edit IP Set",size:"md",fields:[{name:"name",type:"text",label:"Name",required:!0,columns:6},{name:"kind",type:"select",label:"Kind",options:f,disabled:!0,columns:3},{name:"is_enabled",type:"switch",label:"Enabled",columns:3},{name:"description",type:"text",label:"Description",columns:12},{name:"source",type:"select",label:"Source",options:w,columns:6},{name:"source_url",type:"url",label:"Source URL",columns:6},{name:"source_key",type:"text",label:"API Key",placeholder:"Leave blank to keep current key",help:"Write-only — current value is never shown.",columns:12}]}};IPSet.EDIT_FORM=C.edit;class S3Bucket extends e.Model{constructor(e={}){super(e,{endpoint:"/api/aws/s3/bucket"})}}class S3BucketList extends e.Collection{constructor(e={}){super({ModelClass:S3Bucket,endpoint:"/api/aws/s3/bucket",size:10,...e})}}class ScheduledTask extends e.Model{constructor(e={},t={}){super(e,{endpoint:"/api/jobs/scheduled_task",...t})}}class ScheduledTaskList extends e.Collection{constructor(e={}){super({ModelClass:ScheduledTask,endpoint:"/api/jobs/scheduled_task",size:25,...e})}}class TaskResult extends e.Model{constructor(e={},t={}){super(e,{endpoint:"/api/jobs/task_result",...t})}}class TaskResultList extends e.Collection{constructor(e={}){super({ModelClass:TaskResult,endpoint:"/api/jobs/task_result",size:25,...e})}}exports.Assistant=AssistantConversation,exports.AssistantConversation=AssistantConversation,exports.AssistantConversationList=AssistantConversationList,exports.AssistantSkill=AssistantSkill,exports.AssistantSkillList=AssistantSkillList,exports.BouncerDevice=BouncerDevice,exports.BouncerDeviceList=BouncerDeviceList,exports.BouncerSignal=BouncerSignal,exports.BouncerSignalList=BouncerSignalList,exports.BouncerSignature=BouncerSignature,exports.BouncerSignatureForms={create:{title:"Create Signature",fields:[{name:"sig_type",type:"select",label:"Signature Type",required:!0,columns:6,options:[{value:"user_agent",label:"User Agent"},{value:"ip_pattern",label:"IP Pattern"},{value:"fingerprint",label:"Fingerprint"},{value:"behavior",label:"Behavior"},{value:"header",label:"Header"},{value:"cookie",label:"Cookie"}]},{name:"value",type:"text",label:"Value",required:!0,columns:6,help:"The pattern or value to match against."},{name:"confidence",type:"number",label:"Confidence",columns:6,default:80,min:0,max:100,help:"Confidence level from 0 to 100."},{name:"notes",type:"textarea",label:"Notes",columns:12,help:"Optional notes about this signature."},{name:"is_active",type:"switch",label:"Active",columns:6,default:!0}]},edit:{title:"Edit Signature",fields:[{name:"sig_type",type:"select",label:"Signature Type",required:!0,columns:6,options:[{value:"user_agent",label:"User Agent"},{value:"ip_pattern",label:"IP Pattern"},{value:"fingerprint",label:"Fingerprint"},{value:"behavior",label:"Behavior"},{value:"header",label:"Header"},{value:"cookie",label:"Cookie"}]},{name:"value",type:"text",label:"Value",required:!0,columns:6,help:"The pattern or value to match against."},{name:"confidence",type:"number",label:"Confidence",columns:6,default:80,min:0,max:100,help:"Confidence level from 0 to 100."},{name:"notes",type:"textarea",label:"Notes",columns:12,help:"Optional notes about this signature."},{name:"is_active",type:"switch",label:"Active",columns:6,default:!0}]}},exports.BouncerSignatureList=BouncerSignatureList,exports.BundleByOptions=n,exports.CommonBlockCountries=_,exports.CommonCategoryOptions=r,exports.CommonEventFields=i,exports.CommonScopeOptions=c,exports.ComparatorOptions=s,exports.DAY_LABELS=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],exports.EmailDomain=EmailDomain,exports.EmailDomainForms={create:{title:"Add Email Domain",fields:[{name:"name",type:"text",label:"Domain Name",placeholder:"example.com",required:!0,columns:12,help:"Enter the root domain to verify with SES (no protocol)."},{name:"region",type:"text",label:"AWS Region (optional)",placeholder:"us-east-1",columns:12,help:"Optional. Defaults to project AWS_REGION if omitted."},{name:"aws_key",type:"text",label:"AWS Key (optional)",placeholder:"enter your AWS Key with SES permissions",columns:12,help:"Optional, AWS Key with SES permissions"},{name:"aws_secret",type:"text",label:"AWS Secret (optional)",placeholder:"enter your AWS Secret with SES permissions",columns:12,help:"Optional, AWS Secret with SES permissions"},{name:"receiving_enabled",type:"switch",label:"Enable Inbound Receiving",columns:12,help:"Catch-all SES receipt rule to S3 + SNS; routing is done in-app."}]},edit:{title:"Edit Email Domain",fields:[{name:"name",type:"text",label:"Domain Name",placeholder:"example.com",required:!0,columns:12,readonly:!0,help:"Domain name cannot be changed after creation."},{name:"region",type:"text",label:"AWS Region",placeholder:"us-east-1",columns:12},{name:"receiving_enabled",type:"switch",label:"Enable Inbound Receiving",columns:12},{name:"s3_inbound_bucket",type:"text",label:"Inbound S3 Bucket",placeholder:"my-inbound-bucket",columns:12},{name:"s3_inbound_prefix",type:"text",label:"Inbound S3 Prefix",placeholder:"inbound/example.com/",columns:12},{name:"dns_mode",type:"select",label:"DNS Mode",options:[{value:"manual",text:"Manual (show records)"},{value:"godaddy",text:"GoDaddy (apply via API)"}],columns:12}]},credentials:{fields:[{name:"region",type:"select",label:"AWS Region (optional)",placeholder:"us-east-1",options:[{value:"us-east-1",text:"US East (N. Virginia)"},{value:"us-east-2",text:"US East (Ohio)"},{value:"us-west-1",text:"US West (N. California)"},{value:"us-west-2",text:"US West (Oregon)"},{value:"ca-central-1",text:"Canada (Central)"},{value:"eu-west-1",text:"Europe (Ireland)"},{value:"eu-west-2",text:"Europe (London)"},{value:"eu-west-3",text:"Europe (Paris)"},{value:"eu-central-1",text:"Europe (Frankfurt)"},{value:"eu-north-1",text:"Europe (Stockholm)"},{value:"eu-south-1",text:"Europe (Milan)"},{value:"ap-southeast-2",text:"Asia Pacific (Sydney)"}],columns:12,help:"Optional. Defaults to project AWS_REGION if omitted."},{name:"aws_key",type:"text",label:"AWS Key (optional)",placeholder:"enter your AWS Key with SES permissions",columns:12,help:"Optional, AWS Key with SES permissions"},{name:"aws_secret",type:"text",label:"AWS Secret (optional)",placeholder:"enter your AWS Secret with SES permissions",columns:12,help:"Optional, AWS Secret with SES permissions"}]},onboard:{title:"Onboard Domain",fields:[{type:"header",text:"Receiving",level:6,className:"mt-2"},{name:"receiving_enabled",type:"switch",label:"Enable Inbound Receiving",columns:12},{name:"s3_inbound_bucket",type:"text",label:"Inbound S3 Bucket",placeholder:"my-inbound-bucket",columns:12,help:"Required if receiving is enabled."},{name:"s3_inbound_prefix",type:"text",label:"Inbound S3 Prefix",placeholder:"inbound/example.com/",columns:12},{type:"header",text:"MAIL FROM (optional)",level:6,className:"mt-3"},{name:"ensure_mail_from",type:"switch",label:"Ensure MAIL FROM Setup",columns:12},{name:"mail_from_subdomain",type:"text",label:"MAIL FROM Subdomain",placeholder:"feedback",columns:12},{type:"header",text:"DNS",level:6,className:"mt-3"},{name:"dns_mode",type:"select",label:"DNS Mode",options:[{value:"manual",text:"Manual (show records)"},{value:"godaddy",text:"GoDaddy (apply via API)"}],value:"manual",columns:12},{name:"godaddy_key",type:"text",label:"GoDaddy API Key",columns:12,help:"Required when DNS Mode = GoDaddy."},{name:"godaddy_secret",type:"password",label:"GoDaddy API Secret",columns:12},{type:"header",text:"Webhook Endpoints",level:6,className:"mt-3"},{name:"endpoints.bounce",type:"text",label:"Bounce Endpoint",placeholder:"https://portal.example.com/api/aws/sns/bounce",columns:12},{name:"endpoints.complaint",type:"text",label:"Complaint Endpoint",placeholder:"https://portal.example.com/api/aws/sns/complaint",columns:12},{name:"endpoints.delivery",type:"text",label:"Delivery Endpoint",placeholder:"https://portal.example.com/api/aws/sns/delivery",columns:12},{name:"endpoints.inbound",type:"text",label:"Inbound Endpoint",placeholder:"https://portal.example.com/api/aws/sns/inbound",columns:12}]}},exports.EmailDomainList=EmailDomainList,exports.EmailTemplate=EmailTemplate,exports.EmailTemplateForms={create:{title:"Add Email Template",fields:[{name:"name",type:"text",label:"Name",required:!0,cols:12},{name:"subject_template",type:"text",label:"Subject Template",cols:12},{type:"tabset",name:"settingsTabs",tabs:[{label:"HTML",fields:[{name:"html_template",type:"htmlpreview",label:"HTML Template",rows:16,cols:12}]},{label:"TEXT",fields:[{name:"text_template",type:"textarea",label:"Text Template",rows:16,cols:12}]}]}]},edit:{title:"Edit Email Template",fields:[{name:"name",type:"text",label:"Name",required:!0,cols:12},{name:"subject_template",type:"text",label:"Subject Template",cols:12},{type:"tabset",name:"settingsTabs",tabs:[{label:"HTML",fields:[{name:"html_template",type:"textarea",label:"HTML Template",rows:16,cols:12}]},{label:"TEXT",fields:[{name:"text_template",type:"textarea",label:"Text Template",rows:16,cols:12}]}]}]}},exports.EmailTemplateList=EmailTemplateList,exports.IPSet=IPSet,exports.IPSetForms=C,exports.IPSetKindBadgeOptions=f,exports.IPSetKindOptions=S,exports.IPSetList=IPSetList,exports.IPSetSourceOptions=w,exports.Incident=Incident,exports.IncidentEvent=IncidentEvent,exports.IncidentEventForms=a,exports.IncidentEventList=IncidentEventList,exports.IncidentForms={create:{title:"Create Incident",fields:[{type:"tabset",name:"settingsTabs",tabs:[{label:"General",fields:[{name:"title",type:"text",label:"Title",required:!0,columns:12},{name:"details",type:"textarea",label:"Details",required:!0,columns:12}]},{label:"Advanced",fields:[{name:"priority",type:"select",label:"Priority",options:["1","2","3","4","5","6","7","8","9","10"],value:5,columns:6},{name:"status",type:"select",label:"Status",value:"open",options:["open","investigating","resolved","closed","paused","ignored"],columns:6},{name:"category",type:"text",label:"Category",value:"manual",columns:6}]},{label:"Metadata",fields:[{name:"metadata",type:"json",label:"Metadata",value:{example:"hello world"},rows:15,columns:12}]}]}]},edit:{title:"Edit Incident",fields:[{name:"category",type:"text",label:"Category",cols:6},{name:"status",type:"select",label:"Status",placeholder:"Select Status",options:["open","investigating","resolved","closed","paused","ignored"],cols:3},{name:"priority",type:"text",label:"Priority"},{name:"details",type:"textarea",label:"Description",placeholder:"Enter Name",cols:12},{name:"model_name",type:"text",label:"Model",placeholder:"Enter Model",cols:8},{name:"model_id",type:"text",label:"Model ID",placeholder:"Enter Model ID",cols:4}]}},exports.IncidentHistory=IncidentHistory,exports.IncidentHistoryList=IncidentHistoryList,exports.IncidentList=IncidentList,exports.IncidentRule=IncidentRule,exports.IncidentRuleList=IncidentRuleList,exports.IncidentRuleSet=IncidentRuleSet,exports.IncidentRuleSetList=IncidentRuleSetList,exports.IncidentStats=IncidentStats,exports.Job=Job,exports.JobEvent=JobEvent,exports.JobEventList=JobEventList,exports.JobForms={publish:{title:"Publish New Job",fields:[{name:"func",type:"text",label:"Function",required:!0,placeholder:"myapp.jobs.send_email",help:"Module path to job function"},{name:"channel",type:"text",label:"Channel",value:"default",help:'Queue channel (default: "default")'},{name:"payload",type:"textarea",label:"Payload (JSON)",required:!0,rows:8,placeholder:'{\n "key": "value"\n}',help:"JSON data passed to the job function"},{name:"delay",type:"number",label:"Delay (seconds)",min:0,help:"Delay execution by specified seconds"},{name:"run_at",type:"datetime-local",label:"Run At",help:"Schedule for specific date/time"},{name:"max_retries",type:"number",label:"Max Retries",value:3,min:0,max:10},{name:"expires_in",type:"number",label:"Expires In (seconds)",value:900,min:60,help:"Job will expire if not completed in this time"},{name:"broadcast",type:"switch",label:"Broadcast to All Workers",help:"Execute on all available workers"}]},retry:{title:"Retry Job",fields:[{name:"delay",type:"number",label:"Delay (seconds)",value:0,min:0,help:"Delay before retry (0 = immediate)"}]},clone:{title:"Clone Job",fields:[{name:"channel",type:"text",label:"Channel",help:"Override channel for cloned job"},{name:"payload",type:"textarea",label:"Modified Payload (JSON)",rows:8,help:"Modified payload for cloned job"},{name:"delay",type:"number",label:"Delay (seconds)",min:0}]}},exports.JobList=JobList,exports.JobLog=JobLog,exports.JobLogList=JobLogList,exports.JobRunner=JobRunner,exports.JobRunnerForms={broadcast:{title:"Broadcast Command",fields:[{name:"command",type:"select",label:"Command",required:!0,options:[{value:"status",label:"Status Check"},{value:"pause",label:"Pause Processing"},{value:"resume",label:"Resume Processing"},{value:"reload",label:"Reload Configuration"},{value:"shutdown",label:"Shutdown All Runners"}],help:"Command to send to all runners"},{name:"timeout",type:"number",label:"Timeout (seconds)",value:2,min:.5,max:10,step:.5,help:"How long to wait for responses"}]}},exports.JobRunnerList=JobRunnerList,exports.JobsEngineStats=JobsEngineStats,exports.LoginEvent=LoginEvent,exports.LoginEventList=LoginEventList,exports.Mailbox=Mailbox,exports.MailboxForms=g,exports.MailboxList=MailboxList,exports.MatchByOptions=l,exports.PhoneNumber=PhoneNumber,exports.PhoneNumberList=PhoneNumberList,exports.Phonehub=x,exports.PublicMessage=PublicMessage,exports.PublicMessageCategoryOptions=[{value:"billing",label:"Billing"},{value:"account",label:"Account"},{value:"bug",label:"Bug"},{value:"other",label:"Other"}],exports.PublicMessageKindOptions=[{value:"contact_us",label:"Contact Us"},{value:"support",label:"Support"}],exports.PublicMessageList=PublicMessageList,exports.PublicMessageMetadataLabels={company:"Company",category:"Category",severity:"Severity",referrer:"Referrer",landing_page:"Landing Page",utm_source:"UTM Source",utm_medium:"UTM Medium",utm_campaign:"UTM Campaign",utm_term:"UTM Term",utm_content:"UTM Content"},exports.PublicMessageSeverityOptions=[{value:"low",label:"Low"},{value:"normal",label:"Normal"},{value:"high",label:"High"}],exports.PublicMessageStatusOptions=[{value:"open",label:"Open"},{value:"closed",label:"Closed"}],exports.PushConfig=PushConfig,exports.PushConfigForms=m,exports.PushConfigList=PushConfigList,exports.PushDelivery=PushDelivery,exports.PushDeliveryList=PushDeliveryList,exports.PushDevice=PushDevice,exports.PushDeviceList=PushDeviceList,exports.PushTemplate=PushTemplate,exports.PushTemplateForms=b,exports.PushTemplateList=PushTemplateList,exports.Rule=Rule,exports.RuleForms=p,exports.RuleList=RuleList,exports.RuleSet=RuleSet,exports.RuleSetForms=d,exports.RuleSetList=RuleSetList,exports.S3Bucket=S3Bucket,exports.S3BucketForms={create:{title:"Add S3 Bucket",fields:[{name:"bucket_name",type:"text",label:"Name",placeholder:"bucket name",help:"Enter a universally unique name for the bucket",required:!0,cols:12},{name:"is_public",type:"switch",label:"Is Public",cols:12}]},edit:{title:"Edit S3 Bucket",fields:[{name:"bucket_name",type:"text",label:"Name",placeholder:"bucket name",help:"Enter a universally unique name for the bucket",required:!0,cols:12},{name:"is_public",type:"switch",label:"Is Public",cols:12}]}},exports.S3BucketList=S3BucketList,exports.SMS=SMS,exports.SMSList=SMSList,exports.ScheduledTask=ScheduledTask,exports.ScheduledTaskForms={create:{title:"Create Scheduled Task",fields:[{name:"name",type:"text",label:"Name",placeholder:"Daily report",required:!0,columns:12},{name:"description",type:"textarea",label:"Description",placeholder:"What this task does...",columns:12},{name:"task_type",type:"select",label:"Task Type",required:!0,columns:6,options:[{value:"llm",label:"LLM Prompt"},{value:"job",label:"Backend Job"},{value:"webhook",label:"Webhook"}]},{name:"enabled",type:"switch",label:"Enabled",columns:6,value:!0},{name:"run_times",type:"text",label:"Run Times (HH:MM)",placeholder:"09:00",required:!0,columns:6,help:'Comma-separated 24h times, max 2. e.g. "09:00, 17:00"'},{name:"run_days",type:"text",label:"Run Days",placeholder:"0,1,2,3,4",columns:6,help:"Comma-separated day numbers (Mon=0). Leave empty for every day."},{name:"run_once",type:"switch",label:"Run Once",columns:6,help:"Task runs once then disables itself."},{name:"max_retries",type:"number",label:"Max Retries",columns:6,value:0},{name:"notify",type:"text",label:"Notify",placeholder:"in_app, email",columns:12,help:"Comma-separated: email, in_app, sms, push"}]},edit:{title:"Edit Scheduled Task",fields:[{name:"name",type:"text",label:"Name",required:!0,columns:12},{name:"description",type:"textarea",label:"Description",columns:12},{name:"enabled",type:"switch",label:"Enabled",columns:6},{name:"run_times",type:"text",label:"Run Times (HH:MM)",required:!0,columns:6,help:"Comma-separated 24h times, max 2."},{name:"run_days",type:"text",label:"Run Days",columns:6,help:"Comma-separated day numbers (Mon=0). Leave empty for every day."},{name:"run_once",type:"switch",label:"Run Once",columns:6},{name:"max_retries",type:"number",label:"Max Retries",columns:6},{name:"notify",type:"text",label:"Notify",placeholder:"in_app, email",columns:12,help:"Comma-separated: email, in_app, sms, push"}]}},exports.ScheduledTaskList=ScheduledTaskList,exports.SentMessage=SentMessage,exports.SentMessageForms={view:{title:"Sent Message Details",fields:[{name:"id",type:"text",label:"ID",readonly:!0,cols:6},{name:"ses_message_id",type:"text",label:"SES Message ID",readonly:!0,cols:6},{name:"from_email",type:"text",label:"From",readonly:!0,cols:12},{name:"to",type:"textarea",label:"To",readonly:!0,rows:2,cols:12},{name:"cc",type:"textarea",label:"CC",readonly:!0,rows:2,cols:12},{name:"bcc",type:"textarea",label:"BCC",readonly:!0,rows:2,cols:12},{name:"subject",type:"text",label:"Subject",readonly:!0,cols:12},{name:"status",type:"text",label:"Status",readonly:!0,cols:6},{name:"status_reason",type:"textarea",label:"Status Reason",readonly:!0,rows:3,cols:12},{name:"created",type:"text",label:"Created",readonly:!0,cols:6}]}},exports.SentMessageList=SentMessageList,exports.TaskResult=TaskResult,exports.TaskResultList=TaskResultList,exports.Ticket=Ticket,exports.TicketCategories=h,exports.TicketForms=v,exports.TicketList=TicketList,exports.TicketNote=TicketNote,exports.TicketNoteList=TicketNoteList,exports.ValueTypeOptions=o;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/admin-models-CkHjtMHf.js");exports.Assistant=e.AssistantConversation,exports.AssistantConversation=e.AssistantConversation,exports.AssistantConversationList=e.AssistantConversationList,exports.AssistantSkill=e.AssistantSkill,exports.AssistantSkillList=e.AssistantSkillList,exports.BouncerDevice=e.BouncerDevice,exports.BouncerDeviceList=e.BouncerDeviceList,exports.BouncerSignal=e.BouncerSignal,exports.BouncerSignalList=e.BouncerSignalList,exports.BouncerSignature=e.BouncerSignature,exports.BouncerSignatureForms=e.BouncerSignatureForms,exports.BouncerSignatureList=e.BouncerSignatureList,exports.BundleByOptions=e.BundleByOptions,exports.CommonBlockCountries=e.CommonBlockCountries,exports.CommonCategoryOptions=e.CommonCategoryOptions,exports.CommonEventFields=e.CommonEventFields,exports.CommonScopeOptions=e.CommonScopeOptions,exports.ComparatorOptions=e.ComparatorOptions,exports.DAY_LABELS=e.DAY_LABELS,exports.EmailDomain=e.EmailDomain,exports.EmailDomainForms=e.EmailDomainForms,exports.EmailDomainList=e.EmailDomainList,exports.EmailTemplate=e.EmailTemplate,exports.EmailTemplateForms=e.EmailTemplateForms,exports.EmailTemplateList=e.EmailTemplateList,exports.IPSet=e.IPSet,exports.IPSetForms=e.IPSetForms,exports.IPSetKindBadgeOptions=e.IPSetKindBadgeOptions,exports.IPSetKindOptions=e.IPSetKindOptions,exports.IPSetList=e.IPSetList,exports.IPSetSourceOptions=e.IPSetSourceOptions,exports.Incident=e.Incident,exports.IncidentEvent=e.IncidentEvent,exports.IncidentEventForms=e.IncidentEventForms,exports.IncidentEventList=e.IncidentEventList,exports.IncidentForms=e.IncidentForms,exports.IncidentHistory=e.IncidentHistory,exports.IncidentHistoryList=e.IncidentHistoryList,exports.IncidentList=e.IncidentList,exports.IncidentRule=e.IncidentRule,exports.IncidentRuleList=e.IncidentRuleList,exports.IncidentRuleSet=e.IncidentRuleSet,exports.IncidentRuleSetList=e.IncidentRuleSetList,exports.IncidentStats=e.IncidentStats,exports.Job=e.Job,exports.JobEvent=e.JobEvent,exports.JobEventList=e.JobEventList,exports.JobForms=e.JobForms,exports.JobList=e.JobList,exports.JobLog=e.JobLog,exports.JobLogList=e.JobLogList,exports.JobRunner=e.JobRunner,exports.JobRunnerForms=e.JobRunnerForms,exports.JobRunnerList=e.JobRunnerList,exports.JobsEngineStats=e.JobsEngineStats,exports.LoginEvent=e.LoginEvent,exports.LoginEventList=e.LoginEventList,exports.Mailbox=e.Mailbox,exports.MailboxForms=e.MailboxForms,exports.MailboxList=e.MailboxList,exports.MatchByOptions=e.MatchByOptions,exports.PhoneNumber=e.PhoneNumber,exports.PhoneNumberList=e.PhoneNumberList,exports.Phonehub=e.Phonehub,exports.PublicMessage=e.PublicMessage,exports.PublicMessageCategoryOptions=e.PublicMessageCategoryOptions,exports.PublicMessageKindOptions=e.PublicMessageKindOptions,exports.PublicMessageList=e.PublicMessageList,exports.PublicMessageMetadataLabels=e.PublicMessageMetadataLabels,exports.PublicMessageSeverityOptions=e.PublicMessageSeverityOptions,exports.PublicMessageStatusOptions=e.PublicMessageStatusOptions,exports.PushConfig=e.PushConfig,exports.PushConfigForms=e.PushConfigForms,exports.PushConfigList=e.PushConfigList,exports.PushDelivery=e.PushDelivery,exports.PushDeliveryList=e.PushDeliveryList,exports.PushDevice=e.PushDevice,exports.PushDeviceList=e.PushDeviceList,exports.PushTemplate=e.PushTemplate,exports.PushTemplateForms=e.PushTemplateForms,exports.PushTemplateList=e.PushTemplateList,exports.Rule=e.Rule,exports.RuleForms=e.RuleForms,exports.RuleList=e.RuleList,exports.RuleSet=e.RuleSet,exports.RuleSetForms=e.RuleSetForms,exports.RuleSetList=e.RuleSetList,exports.S3Bucket=e.S3Bucket,exports.S3BucketForms=e.S3BucketForms,exports.S3BucketList=e.S3BucketList,exports.SMS=e.SMS,exports.SMSList=e.SMSList,exports.ScheduledTask=e.ScheduledTask,exports.ScheduledTaskForms=e.ScheduledTaskForms,exports.ScheduledTaskList=e.ScheduledTaskList,exports.SentMessage=e.SentMessage,exports.SentMessageForms=e.SentMessageForms,exports.SentMessageList=e.SentMessageList,exports.TaskResult=e.TaskResult,exports.TaskResultList=e.TaskResultList,exports.Ticket=e.Ticket,exports.TicketCategories=e.TicketCategories,exports.TicketForms=e.TicketForms,exports.TicketList=e.TicketList,exports.TicketNote=e.TicketNote,exports.TicketNoteList=e.TicketNoteList,exports.ValueTypeOptions=e.ValueTypeOptions;
|
|
2
2
|
//# sourceMappingURL=admin-models.cjs.js.map
|