@agenticmail/enterprise 0.5.272 → 0.5.274

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.
@@ -1,5 +1,5 @@
1
1
  import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, getOrgId } from '../components/utils.js';
2
- import { I } from '../components/icons.js';
2
+ import { I } from '../components/icons.js?v=2';
3
3
  import { Modal } from '../components/modal.js';
4
4
  import { HelpButton } from '../components/help-button.js';
5
5
 
@@ -105,8 +105,8 @@ export function DatabaseAccessPage() {
105
105
  engineCall('/database/connections'),
106
106
  engineCall('/agents').catch(function() { return []; }),
107
107
  ]);
108
- setConnections(conns || []);
109
- setAgents(agts || []);
108
+ setConnections(Array.isArray(conns) ? conns : []);
109
+ setAgents(Array.isArray(agts) ? agts : []);
110
110
  } catch (e) { console.error('Load failed:', e); }
111
111
  setLoading(false);
112
112
  }, []);
@@ -123,13 +123,13 @@ export function DatabaseAccessPage() {
123
123
 
124
124
  var deleteConn = useCallback(async function(id) {
125
125
  if (!confirm('Delete this database connection? All agent access grants will be removed.')) return;
126
- await engineCall('/database/connections/' + id, 'DELETE');
126
+ await engineCall('/database/connections/' + id, { method: 'DELETE' });
127
127
  loadData();
128
128
  }, []);
129
129
 
130
130
  var testConn = useCallback(async function(id) {
131
131
  try {
132
- var result = await engineCall('/database/connections/' + id + '/test', 'POST');
132
+ var result = await engineCall('/database/connections/' + id + '/test', { method: 'POST' });
133
133
  alert(result.success ? 'Connection successful! (' + result.latencyMs + 'ms)' : 'Connection failed: ' + (result.error || 'Unknown error'));
134
134
  loadData();
135
135
  } catch (e) { alert('Test failed: ' + e.message); }
@@ -138,7 +138,7 @@ export function DatabaseAccessPage() {
138
138
  return h('div', { style: s.page },
139
139
  h('div', { style: s.header },
140
140
  h('div', { style: s.title },
141
- I.database(20),
141
+ I.database(),
142
142
  'Database Access',
143
143
  HelpButton({
144
144
  title: 'Database Access',
@@ -176,7 +176,7 @@ function ConnectionsTab(props) {
176
176
  var connections = props.connections;
177
177
  if (connections.length === 0) {
178
178
  return h('div', { style: s.emptyState },
179
- h('div', { style: s.emptyIcon }, I.database(48)),
179
+ h('div', { style: s.emptyIcon }, I.database()),
180
180
  h('div', { style: 'font-size: 16px; font-weight: 600; margin-bottom: 8px;' }, 'No Database Connections'),
181
181
  h('div', null, 'Add a connection to let your agents query external databases.'),
182
182
  );
@@ -271,7 +271,7 @@ function AgentAccessTab(props) {
271
271
  ),
272
272
  h('button', { style: s.btnDanger + '; padding: 3px 8px; font-size: 11px;', onClick: async function() {
273
273
  if (!confirm('Revoke ' + (agent.displayName || agent.name) + ' access to ' + (conn.name || 'this database') + '?')) return;
274
- await engineCall('/database/connections/' + grant.connectionId + '/agents/' + agent.id, 'DELETE');
274
+ await engineCall('/database/connections/' + grant.connectionId + '/agents/' + agent.id, { method: 'DELETE' });
275
275
  props.onRefresh();
276
276
  }}, 'Revoke'),
277
277
  );
@@ -352,7 +352,7 @@ function AddConnectionModal(props) {
352
352
  body.password = form.password;
353
353
  body.ssl = form.ssl;
354
354
  }
355
- await engineCall('/database/connections', 'POST', body);
355
+ await engineCall('/database/connections', { method: 'POST', body: JSON.stringify(body) });
356
356
  props.onSave();
357
357
  props.onClose();
358
358
  } catch (e) { alert('Failed: ' + e.message); }
@@ -480,7 +480,7 @@ function GrantAccessModal(props) {
480
480
  if (blockedTables.trim()) {
481
481
  body.schemaAccess = { blockedTables: blockedTables.split(',').map(function(t) { return t.trim(); }).filter(Boolean) };
482
482
  }
483
- await engineCall('/database/connections/' + props.connectionId + '/agents', 'POST', body);
483
+ await engineCall('/database/connections/' + props.connectionId + '/agents', { method: 'POST', body: JSON.stringify(body) });
484
484
  props.onSave();
485
485
  props.onClose();
486
486
  } catch (e) { alert('Failed: ' + e.message); }
@@ -560,14 +560,14 @@ function EditConnectionModal(props) {
560
560
  var save = async function() {
561
561
  setSaving(true);
562
562
  try {
563
- await engineCall('/database/connections/' + conn.id, 'PUT', {
563
+ await engineCall('/database/connections/' + conn.id, { method: 'PUT', body: JSON.stringify({
564
564
  name: form.name,
565
565
  host: form.host,
566
566
  port: form.port ? parseInt(form.port) : undefined,
567
567
  database: form.database,
568
568
  description: form.description,
569
569
  ssl: form.ssl,
570
- });
570
+ }) });
571
571
  props.onSave();
572
572
  props.onClose();
573
573
  } catch (e) { alert('Failed: ' + e.message); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/enterprise",
3
- "version": "0.5.272",
3
+ "version": "0.5.274",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,5 +1,5 @@
1
1
  import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, getOrgId } from '../components/utils.js';
2
- import { I } from '../components/icons.js';
2
+ import { I } from '../components/icons.js?v=2';
3
3
  import { Modal } from '../components/modal.js';
4
4
  import { HelpButton } from '../components/help-button.js';
5
5
 
@@ -105,8 +105,8 @@ export function DatabaseAccessPage() {
105
105
  engineCall('/database/connections'),
106
106
  engineCall('/agents').catch(function() { return []; }),
107
107
  ]);
108
- setConnections(conns || []);
109
- setAgents(agts || []);
108
+ setConnections(Array.isArray(conns) ? conns : []);
109
+ setAgents(Array.isArray(agts) ? agts : []);
110
110
  } catch (e) { console.error('Load failed:', e); }
111
111
  setLoading(false);
112
112
  }, []);
@@ -123,13 +123,13 @@ export function DatabaseAccessPage() {
123
123
 
124
124
  var deleteConn = useCallback(async function(id) {
125
125
  if (!confirm('Delete this database connection? All agent access grants will be removed.')) return;
126
- await engineCall('/database/connections/' + id, 'DELETE');
126
+ await engineCall('/database/connections/' + id, { method: 'DELETE' });
127
127
  loadData();
128
128
  }, []);
129
129
 
130
130
  var testConn = useCallback(async function(id) {
131
131
  try {
132
- var result = await engineCall('/database/connections/' + id + '/test', 'POST');
132
+ var result = await engineCall('/database/connections/' + id + '/test', { method: 'POST' });
133
133
  alert(result.success ? 'Connection successful! (' + result.latencyMs + 'ms)' : 'Connection failed: ' + (result.error || 'Unknown error'));
134
134
  loadData();
135
135
  } catch (e) { alert('Test failed: ' + e.message); }
@@ -138,7 +138,7 @@ export function DatabaseAccessPage() {
138
138
  return h('div', { style: s.page },
139
139
  h('div', { style: s.header },
140
140
  h('div', { style: s.title },
141
- I.database(20),
141
+ I.database(),
142
142
  'Database Access',
143
143
  HelpButton({
144
144
  title: 'Database Access',
@@ -176,7 +176,7 @@ function ConnectionsTab(props) {
176
176
  var connections = props.connections;
177
177
  if (connections.length === 0) {
178
178
  return h('div', { style: s.emptyState },
179
- h('div', { style: s.emptyIcon }, I.database(48)),
179
+ h('div', { style: s.emptyIcon }, I.database()),
180
180
  h('div', { style: 'font-size: 16px; font-weight: 600; margin-bottom: 8px;' }, 'No Database Connections'),
181
181
  h('div', null, 'Add a connection to let your agents query external databases.'),
182
182
  );
@@ -271,7 +271,7 @@ function AgentAccessTab(props) {
271
271
  ),
272
272
  h('button', { style: s.btnDanger + '; padding: 3px 8px; font-size: 11px;', onClick: async function() {
273
273
  if (!confirm('Revoke ' + (agent.displayName || agent.name) + ' access to ' + (conn.name || 'this database') + '?')) return;
274
- await engineCall('/database/connections/' + grant.connectionId + '/agents/' + agent.id, 'DELETE');
274
+ await engineCall('/database/connections/' + grant.connectionId + '/agents/' + agent.id, { method: 'DELETE' });
275
275
  props.onRefresh();
276
276
  }}, 'Revoke'),
277
277
  );
@@ -352,7 +352,7 @@ function AddConnectionModal(props) {
352
352
  body.password = form.password;
353
353
  body.ssl = form.ssl;
354
354
  }
355
- await engineCall('/database/connections', 'POST', body);
355
+ await engineCall('/database/connections', { method: 'POST', body: JSON.stringify(body) });
356
356
  props.onSave();
357
357
  props.onClose();
358
358
  } catch (e) { alert('Failed: ' + e.message); }
@@ -480,7 +480,7 @@ function GrantAccessModal(props) {
480
480
  if (blockedTables.trim()) {
481
481
  body.schemaAccess = { blockedTables: blockedTables.split(',').map(function(t) { return t.trim(); }).filter(Boolean) };
482
482
  }
483
- await engineCall('/database/connections/' + props.connectionId + '/agents', 'POST', body);
483
+ await engineCall('/database/connections/' + props.connectionId + '/agents', { method: 'POST', body: JSON.stringify(body) });
484
484
  props.onSave();
485
485
  props.onClose();
486
486
  } catch (e) { alert('Failed: ' + e.message); }
@@ -560,14 +560,14 @@ function EditConnectionModal(props) {
560
560
  var save = async function() {
561
561
  setSaving(true);
562
562
  try {
563
- await engineCall('/database/connections/' + conn.id, 'PUT', {
563
+ await engineCall('/database/connections/' + conn.id, { method: 'PUT', body: JSON.stringify({
564
564
  name: form.name,
565
565
  host: form.host,
566
566
  port: form.port ? parseInt(form.port) : undefined,
567
567
  database: form.database,
568
568
  description: form.description,
569
569
  ssl: form.ssl,
570
- });
570
+ }) });
571
571
  props.onSave();
572
572
  props.onClose();
573
573
  } catch (e) { alert('Failed: ' + e.message); }