@hed-hog/core 0.0.354 → 0.0.356
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/ai.service.d.ts +3 -12
- package/dist/ai/ai.service.d.ts.map +1 -1
- package/dist/ai/ai.service.js +34 -125
- package/dist/ai/ai.service.js.map +1 -1
- package/dist/core.module.d.ts.map +1 -1
- package/dist/core.module.js +3 -3
- package/dist/core.module.js.map +1 -1
- package/dist/file/file.service.d.ts +1 -1
- package/dist/file/file.service.d.ts.map +1 -1
- package/dist/file/file.service.js +50 -64
- package/dist/file/file.service.js.map +1 -1
- package/dist/file/provider/provider.enum.d.ts +2 -1
- package/dist/file/provider/provider.enum.d.ts.map +1 -1
- package/dist/file/provider/provider.enum.js +1 -0
- package/dist/file/provider/provider.enum.js.map +1 -1
- package/dist/file/provider/provider.factory.d.ts.map +1 -1
- package/dist/file/provider/provider.factory.js +3 -0
- package/dist/file/provider/provider.factory.js.map +1 -1
- package/dist/file/provider/spaces.provider.d.ts +27 -0
- package/dist/file/provider/spaces.provider.d.ts.map +1 -0
- package/dist/file/provider/spaces.provider.js +218 -0
- package/dist/file/provider/spaces.provider.js.map +1 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/integration-profile/dto/create.dto.d.ts +9 -0
- package/dist/integration-profile/dto/create.dto.d.ts.map +1 -0
- package/dist/integration-profile/dto/create.dto.js +54 -0
- package/dist/integration-profile/dto/create.dto.js.map +1 -0
- package/dist/integration-profile/dto/export.dto.d.ts +5 -0
- package/dist/integration-profile/dto/export.dto.d.ts.map +1 -0
- package/dist/integration-profile/dto/export.dto.js +29 -0
- package/dist/integration-profile/dto/export.dto.js.map +1 -0
- package/dist/integration-profile/dto/import-confirm.dto.d.ts +17 -0
- package/dist/integration-profile/dto/import-confirm.dto.d.ts.map +1 -0
- package/dist/integration-profile/dto/import-confirm.dto.js +77 -0
- package/dist/integration-profile/dto/import-confirm.dto.js.map +1 -0
- package/dist/integration-profile/dto/update.dto.d.ts +6 -0
- package/dist/integration-profile/dto/update.dto.d.ts.map +1 -0
- package/dist/integration-profile/dto/update.dto.js +9 -0
- package/dist/integration-profile/dto/update.dto.js.map +1 -0
- package/dist/integration-profile/integration-profile.controller.d.ts +142 -0
- package/dist/integration-profile/integration-profile.controller.d.ts.map +1 -0
- package/dist/integration-profile/integration-profile.controller.js +165 -0
- package/dist/integration-profile/integration-profile.controller.js.map +1 -0
- package/dist/integration-profile/integration-profile.module.d.ts +3 -0
- package/dist/integration-profile/integration-profile.module.d.ts.map +1 -0
- package/dist/integration-profile/integration-profile.module.js +29 -0
- package/dist/integration-profile/integration-profile.module.js.map +1 -0
- package/dist/integration-profile/integration-profile.service.d.ts +160 -0
- package/dist/integration-profile/integration-profile.service.d.ts.map +1 -0
- package/dist/integration-profile/integration-profile.service.js +606 -0
- package/dist/integration-profile/integration-profile.service.js.map +1 -0
- package/dist/integration-profile/integration-profile.utils.d.ts +24 -0
- package/dist/integration-profile/integration-profile.utils.d.ts.map +1 -0
- package/dist/integration-profile/integration-profile.utils.js +147 -0
- package/dist/integration-profile/integration-profile.utils.js.map +1 -0
- package/dist/mail/mail.module.d.ts.map +1 -1
- package/dist/mail/mail.module.js +27 -19
- package/dist/mail/mail.module.js.map +1 -1
- package/dist/mail/mail.service.d.ts +3 -2
- package/dist/mail/mail.service.d.ts.map +1 -1
- package/dist/mail/mail.service.js +25 -47
- package/dist/mail/mail.service.js.map +1 -1
- package/dist/mcp/mcp.module.js +2 -2
- package/dist/mcp/mcp.module.js.map +1 -1
- package/dist/mcp/tools/core-mail-profile.mcp-tools.d.ts +3 -15
- package/dist/mcp/tools/core-mail-profile.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-mail-profile.mcp-tools.js +12 -94
- package/dist/mcp/tools/core-mail-profile.mcp-tools.js.map +1 -1
- package/dist/mcp-chat/mcp-chat.service.d.ts.map +1 -1
- package/dist/mcp-chat/mcp-chat.service.js +17 -16
- package/dist/mcp-chat/mcp-chat.service.js.map +1 -1
- package/dist/setting/setting.service.d.ts.map +1 -1
- package/dist/setting/setting.service.js +0 -2
- package/dist/setting/setting.service.js.map +1 -1
- package/dist/webhook-integration/event-webhook.controller.d.ts +1 -0
- package/dist/webhook-integration/event-webhook.controller.d.ts.map +1 -1
- package/dist/webhook-integration/event-webhook.controller.js +10 -0
- package/dist/webhook-integration/event-webhook.controller.js.map +1 -1
- package/dist/webhook-integration/event-webhook.service.d.ts +2 -0
- package/dist/webhook-integration/event-webhook.service.d.ts.map +1 -1
- package/dist/webhook-integration/event-webhook.service.js +30 -0
- package/dist/webhook-integration/event-webhook.service.js.map +1 -1
- package/dist/webhook-integration/webhook-integration.controller.d.ts +1 -0
- package/dist/webhook-integration/webhook-integration.controller.d.ts.map +1 -1
- package/dist/webhook-integration/webhook-integration.controller.js +10 -0
- package/dist/webhook-integration/webhook-integration.controller.js.map +1 -1
- package/dist/webhook-integration/webhook-integration.service.d.ts +2 -1
- package/dist/webhook-integration/webhook-integration.service.d.ts.map +1 -1
- package/dist/webhook-integration/webhook-integration.service.js +62 -44
- package/dist/webhook-integration/webhook-integration.service.js.map +1 -1
- package/dist/whatsapp-profile/dto/create.dto.d.ts +11 -0
- package/dist/whatsapp-profile/dto/create.dto.d.ts.map +1 -0
- package/dist/whatsapp-profile/dto/create.dto.js +55 -0
- package/dist/whatsapp-profile/dto/create.dto.js.map +1 -0
- package/dist/whatsapp-profile/dto/update.dto.d.ts +6 -0
- package/dist/whatsapp-profile/dto/update.dto.d.ts.map +1 -0
- package/dist/whatsapp-profile/dto/update.dto.js +9 -0
- package/dist/whatsapp-profile/dto/update.dto.js.map +1 -0
- package/dist/whatsapp-profile/whatsapp-profile.controller.d.ts +54 -0
- package/dist/whatsapp-profile/whatsapp-profile.controller.d.ts.map +1 -0
- package/dist/whatsapp-profile/whatsapp-profile.controller.js +85 -0
- package/dist/whatsapp-profile/whatsapp-profile.controller.js.map +1 -0
- package/dist/whatsapp-profile/whatsapp-profile.module.d.ts +3 -0
- package/dist/whatsapp-profile/whatsapp-profile.module.d.ts.map +1 -0
- package/dist/whatsapp-profile/whatsapp-profile.module.js +26 -0
- package/dist/whatsapp-profile/whatsapp-profile.module.js.map +1 -0
- package/dist/whatsapp-profile/whatsapp-profile.service.d.ts +63 -0
- package/dist/whatsapp-profile/whatsapp-profile.service.d.ts.map +1 -0
- package/dist/whatsapp-profile/whatsapp-profile.service.js +138 -0
- package/dist/whatsapp-profile/whatsapp-profile.service.js.map +1 -0
- package/hedhog/data/file_provider.yaml +9 -1
- package/hedhog/data/integration_provider.yaml +132 -0
- package/hedhog/data/integration_type.yaml +29 -0
- package/hedhog/data/menu.yaml +15 -14
- package/hedhog/data/role.yaml +8 -0
- package/hedhog/data/route.yaml +66 -15
- package/hedhog/data/setting_group.yaml +30 -191
- package/hedhog/data/setting_subgroup.yaml +5 -13
- package/hedhog/data/whatsapp_profile.yaml +6 -0
- package/hedhog/frontend/app/account/components/connected-accounts.tsx.ejs +25 -20
- package/hedhog/frontend/app/configurations/[slug]/components/setting-field.tsx.ejs +579 -204
- package/hedhog/frontend/app/integration/profiles/page.tsx.ejs +1662 -0
- package/hedhog/frontend/app/integrations-webhooks/page.tsx.ejs +233 -108
- package/hedhog/frontend/app/mail/profiles/page.tsx.ejs +3 -822
- package/hedhog/frontend/app/users/permissions.tsx.ejs +79 -2
- package/hedhog/frontend/app/users/user-sheet.tsx.ejs +7 -2
- package/hedhog/frontend/messages/en.json +172 -0
- package/hedhog/frontend/messages/pt.json +172 -0
- package/hedhog/table/integration_profile.yaml +34 -0
- package/hedhog/table/integration_provider.yaml +23 -0
- package/hedhog/table/integration_type.yaml +19 -0
- package/hedhog/table/webhook_action.yaml +85 -85
- package/hedhog/table/whatsapp_profile.yaml +26 -0
- package/package.json +2 -2
- package/src/ai/ai.service.ts +35 -153
- package/src/core.module.ts +3 -3
- package/src/file/file.service.ts +60 -76
- package/src/file/provider/provider.enum.ts +1 -0
- package/src/file/provider/provider.factory.ts +3 -0
- package/src/file/provider/spaces.provider.ts +261 -0
- package/src/index.ts +6 -3
- package/src/integration-profile/dto/create.dto.ts +44 -0
- package/src/integration-profile/dto/export.dto.ts +15 -0
- package/src/integration-profile/dto/import-confirm.dto.ts +61 -0
- package/src/integration-profile/dto/update.dto.ts +4 -0
- package/src/integration-profile/integration-profile.controller.ts +129 -0
- package/src/integration-profile/integration-profile.module.ts +16 -0
- package/src/integration-profile/integration-profile.service.ts +788 -0
- package/src/integration-profile/integration-profile.utils.ts +156 -0
- package/src/mail/mail.module.ts +27 -18
- package/src/mail/mail.service.ts +31 -60
- package/src/mcp/mcp.module.ts +2 -2
- package/src/mcp/tools/core-mail-profile.mcp-tools.ts +10 -69
- package/src/mcp-chat/mcp-chat.service.ts +23 -20
- package/src/setting/setting.service.ts +0 -2
- package/src/webhook-integration/event-webhook.controller.ts +55 -50
- package/src/webhook-integration/event-webhook.service.ts +422 -384
- package/src/webhook-integration/webhook-integration.controller.ts +5 -0
- package/src/webhook-integration/webhook-integration.service.ts +74 -46
- package/src/whatsapp-profile/dto/create.dto.ts +36 -0
- package/src/whatsapp-profile/dto/update.dto.ts +4 -0
- package/src/whatsapp-profile/whatsapp-profile.controller.ts +51 -0
- package/src/whatsapp-profile/whatsapp-profile.module.ts +13 -0
- package/src/whatsapp-profile/whatsapp-profile.service.ts +160 -0
package/hedhog/data/route.yaml
CHANGED
|
@@ -1442,60 +1442,97 @@
|
|
|
1442
1442
|
role:
|
|
1443
1443
|
- where:
|
|
1444
1444
|
slug: admin
|
|
1445
|
-
|
|
1445
|
+
|
|
1446
|
+
# ─── Integration Profile ──────────────────────────────────────────────────────
|
|
1447
|
+
|
|
1448
|
+
- url: /integration-profile/types
|
|
1446
1449
|
method: GET
|
|
1447
1450
|
type: HTTP
|
|
1448
1451
|
relations:
|
|
1449
1452
|
role:
|
|
1450
1453
|
- where:
|
|
1451
1454
|
slug: admin
|
|
1455
|
+
|
|
1456
|
+
- url: /integration-profile/providers
|
|
1457
|
+
method: GET
|
|
1458
|
+
type: HTTP
|
|
1459
|
+
relations:
|
|
1460
|
+
role:
|
|
1452
1461
|
- where:
|
|
1453
|
-
slug: admin
|
|
1454
|
-
|
|
1462
|
+
slug: admin
|
|
1463
|
+
|
|
1464
|
+
- url: /integration-profile
|
|
1455
1465
|
method: GET
|
|
1456
1466
|
type: HTTP
|
|
1457
1467
|
relations:
|
|
1458
1468
|
role:
|
|
1459
1469
|
- where:
|
|
1460
1470
|
slug: admin
|
|
1471
|
+
|
|
1472
|
+
- url: /integration-profile/:id
|
|
1473
|
+
method: GET
|
|
1474
|
+
type: HTTP
|
|
1475
|
+
relations:
|
|
1476
|
+
role:
|
|
1461
1477
|
- where:
|
|
1462
|
-
slug: admin
|
|
1463
|
-
|
|
1478
|
+
slug: admin
|
|
1479
|
+
|
|
1480
|
+
- url: /integration-profile
|
|
1464
1481
|
method: POST
|
|
1465
1482
|
type: HTTP
|
|
1466
1483
|
relations:
|
|
1467
1484
|
role:
|
|
1468
1485
|
- where:
|
|
1469
1486
|
slug: admin
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
- url: /mail-profile/test
|
|
1487
|
+
|
|
1488
|
+
- url: /integration-profile/test
|
|
1473
1489
|
method: POST
|
|
1474
1490
|
type: HTTP
|
|
1475
1491
|
relations:
|
|
1476
1492
|
role:
|
|
1477
1493
|
- where:
|
|
1478
1494
|
slug: admin
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
- url: /mail-profile/:id
|
|
1495
|
+
|
|
1496
|
+
- url: /integration-profile/:id
|
|
1482
1497
|
method: PATCH
|
|
1483
1498
|
type: HTTP
|
|
1484
1499
|
relations:
|
|
1485
1500
|
role:
|
|
1486
1501
|
- where:
|
|
1487
1502
|
slug: admin
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
- url: /mail-profile
|
|
1503
|
+
|
|
1504
|
+
- url: /integration-profile
|
|
1491
1505
|
method: DELETE
|
|
1492
1506
|
type: HTTP
|
|
1493
1507
|
relations:
|
|
1494
1508
|
role:
|
|
1495
1509
|
- where:
|
|
1496
1510
|
slug: admin
|
|
1511
|
+
|
|
1512
|
+
- url: /integration-profile/export
|
|
1513
|
+
method: GET
|
|
1514
|
+
type: HTTP
|
|
1515
|
+
relations:
|
|
1516
|
+
role:
|
|
1497
1517
|
- where:
|
|
1498
|
-
slug: admin
|
|
1518
|
+
slug: admin
|
|
1519
|
+
|
|
1520
|
+
- url: /integration-profile/import/validate
|
|
1521
|
+
method: POST
|
|
1522
|
+
type: HTTP
|
|
1523
|
+
relations:
|
|
1524
|
+
role:
|
|
1525
|
+
- where:
|
|
1526
|
+
slug: admin
|
|
1527
|
+
|
|
1528
|
+
- url: /integration-profile/import/confirm
|
|
1529
|
+
method: POST
|
|
1530
|
+
type: HTTP
|
|
1531
|
+
relations:
|
|
1532
|
+
role:
|
|
1533
|
+
- where:
|
|
1534
|
+
slug: admin
|
|
1535
|
+
|
|
1499
1536
|
- url: /profile/preferences
|
|
1500
1537
|
method: PUT
|
|
1501
1538
|
type: HTTP
|
|
@@ -1916,6 +1953,13 @@
|
|
|
1916
1953
|
role:
|
|
1917
1954
|
- where:
|
|
1918
1955
|
slug: admin
|
|
1956
|
+
- url: /webhook-integration/:id/duplicate
|
|
1957
|
+
method: POST
|
|
1958
|
+
type: HTTP
|
|
1959
|
+
relations:
|
|
1960
|
+
role:
|
|
1961
|
+
- where:
|
|
1962
|
+
slug: admin
|
|
1919
1963
|
- url: /webhook-integration/:id/action
|
|
1920
1964
|
method: GET
|
|
1921
1965
|
type: HTTP
|
|
@@ -1993,6 +2037,13 @@
|
|
|
1993
2037
|
role:
|
|
1994
2038
|
- where:
|
|
1995
2039
|
slug: admin
|
|
2040
|
+
- url: /event-webhook/:id/duplicate
|
|
2041
|
+
method: POST
|
|
2042
|
+
type: HTTP
|
|
2043
|
+
relations:
|
|
2044
|
+
role:
|
|
2045
|
+
- where:
|
|
2046
|
+
slug: admin
|
|
1996
2047
|
- url: /event-webhook/:id/log
|
|
1997
2048
|
method: GET
|
|
1998
2049
|
type: HTTP
|
|
@@ -1484,26 +1484,16 @@
|
|
|
1484
1484
|
pt: Configure backend de armazenamento de arquivos, tipos de arquivo aceitos e limites de tamanho para uploads
|
|
1485
1485
|
relations:
|
|
1486
1486
|
setting:
|
|
1487
|
-
- slug: storage
|
|
1488
|
-
type:
|
|
1487
|
+
- slug: file-storage-profile-id
|
|
1488
|
+
type: number
|
|
1489
|
+
component: entity-picker
|
|
1489
1490
|
name:
|
|
1490
|
-
en: Storage
|
|
1491
|
-
pt:
|
|
1491
|
+
en: Storage Profile
|
|
1492
|
+
pt: Perfil de Armazenamento
|
|
1492
1493
|
description:
|
|
1493
|
-
en: Select the
|
|
1494
|
-
pt: Selecione o
|
|
1495
|
-
value:
|
|
1496
|
-
component: combobox
|
|
1497
|
-
relations:
|
|
1498
|
-
setting_list:
|
|
1499
|
-
- value: local
|
|
1500
|
-
order: 0
|
|
1501
|
-
- value: s3
|
|
1502
|
-
order: 1
|
|
1503
|
-
- value: abs
|
|
1504
|
-
order: 2
|
|
1505
|
-
- value: gcs
|
|
1506
|
-
order: 3
|
|
1494
|
+
en: Select the integration profile (type Storage) to use for file storage
|
|
1495
|
+
pt: Selecione o perfil de integração (tipo Armazenamento) a usar para armazenamento de arquivos
|
|
1496
|
+
value: ''
|
|
1507
1497
|
subgroup_id:
|
|
1508
1498
|
where:
|
|
1509
1499
|
slug: storage-general
|
|
@@ -1576,117 +1566,6 @@
|
|
|
1576
1566
|
subgroup_id:
|
|
1577
1567
|
where:
|
|
1578
1568
|
slug: storage-general
|
|
1579
|
-
- slug: storage-local-path
|
|
1580
|
-
type: string
|
|
1581
|
-
name:
|
|
1582
|
-
en: Local Directory
|
|
1583
|
-
pt: Diretório Local
|
|
1584
|
-
description:
|
|
1585
|
-
en: Folder path on the server for local file storage. Must be writable by the application
|
|
1586
|
-
pt: Caminho da pasta no servidor para armazenamento de arquivos local. Deve ser gravável pela aplicação
|
|
1587
|
-
value: storage
|
|
1588
|
-
subgroup_id:
|
|
1589
|
-
where:
|
|
1590
|
-
slug: local-storage
|
|
1591
|
-
- slug: storage-s3-key
|
|
1592
|
-
type: string
|
|
1593
|
-
name:
|
|
1594
|
-
en: Access Key ID
|
|
1595
|
-
pt: ID da Chave de Acesso
|
|
1596
|
-
description:
|
|
1597
|
-
en: AWS Access Key ID for S3 authentication
|
|
1598
|
-
pt: ID da chave de acesso AWS para autenticação S3
|
|
1599
|
-
value: ''
|
|
1600
|
-
subgroup_id:
|
|
1601
|
-
where:
|
|
1602
|
-
slug: s3-storage
|
|
1603
|
-
- slug: storage-s3-secret
|
|
1604
|
-
type: secret
|
|
1605
|
-
component: input-secret
|
|
1606
|
-
name:
|
|
1607
|
-
en: Secret Access Key
|
|
1608
|
-
pt: Chave de Acesso Secreta
|
|
1609
|
-
description:
|
|
1610
|
-
en: AWS secret access key for S3 authentication
|
|
1611
|
-
pt: Chave de acesso secreta AWS para autenticação S3
|
|
1612
|
-
value: ''
|
|
1613
|
-
subgroup_id:
|
|
1614
|
-
where:
|
|
1615
|
-
slug: s3-storage
|
|
1616
|
-
- slug: storage-s3-region
|
|
1617
|
-
type: string
|
|
1618
|
-
name:
|
|
1619
|
-
en: AWS Region
|
|
1620
|
-
pt: Região AWS
|
|
1621
|
-
description:
|
|
1622
|
-
en: AWS region where the S3 bucket is located
|
|
1623
|
-
pt: Região AWS onde o bucket S3 está localizado
|
|
1624
|
-
value: 'us-east-1'
|
|
1625
|
-
subgroup_id:
|
|
1626
|
-
where:
|
|
1627
|
-
slug: s3-storage
|
|
1628
|
-
- slug: storage-s3-bucket
|
|
1629
|
-
type: string
|
|
1630
|
-
name:
|
|
1631
|
-
en: Bucket Name
|
|
1632
|
-
pt: Nome do Bucket
|
|
1633
|
-
description:
|
|
1634
|
-
en: S3 bucket name for storing uploaded files
|
|
1635
|
-
pt: Nome do bucket S3 para armazenar arquivos enviados
|
|
1636
|
-
value: ''
|
|
1637
|
-
subgroup_id:
|
|
1638
|
-
where:
|
|
1639
|
-
slug: s3-storage
|
|
1640
|
-
- slug: storage-abs-account
|
|
1641
|
-
type: string
|
|
1642
|
-
name:
|
|
1643
|
-
en: Storage Account
|
|
1644
|
-
pt: Conta de Armazenamento
|
|
1645
|
-
description:
|
|
1646
|
-
en: Azure storage account name (without .blob.core.windows.net)
|
|
1647
|
-
pt: Nome da conta de armazenamento do Azure (sem .blob.core.windows.net)
|
|
1648
|
-
value: ''
|
|
1649
|
-
subgroup_id:
|
|
1650
|
-
where:
|
|
1651
|
-
slug: abs-storage
|
|
1652
|
-
- slug: storage-abs-key
|
|
1653
|
-
type: secret
|
|
1654
|
-
component: input-secret
|
|
1655
|
-
name:
|
|
1656
|
-
en: Account Key
|
|
1657
|
-
pt: Chave da Conta
|
|
1658
|
-
description:
|
|
1659
|
-
en: Azure storage account access key for authentication
|
|
1660
|
-
pt: Chave de acesso da conta de armazenamento do Azure para autenticação
|
|
1661
|
-
value: ''
|
|
1662
|
-
subgroup_id:
|
|
1663
|
-
where:
|
|
1664
|
-
slug: abs-storage
|
|
1665
|
-
- slug: storage-abs-container
|
|
1666
|
-
type: string
|
|
1667
|
-
name:
|
|
1668
|
-
en: Container Name
|
|
1669
|
-
pt: Nome do Contêiner
|
|
1670
|
-
description:
|
|
1671
|
-
en: Azure Blob Storage container name for storing uploaded files
|
|
1672
|
-
pt: Nome do contêiner de armazenamento de blob do Azure para armazenar arquivos enviados
|
|
1673
|
-
value: ''
|
|
1674
|
-
subgroup_id:
|
|
1675
|
-
where:
|
|
1676
|
-
slug: abs-storage
|
|
1677
|
-
- slug: storage-gcs-keyfile
|
|
1678
|
-
type: secret
|
|
1679
|
-
component: input-secret
|
|
1680
|
-
name:
|
|
1681
|
-
en: Service Account Key
|
|
1682
|
-
pt: Chave da Conta de Serviço
|
|
1683
|
-
description:
|
|
1684
|
-
en: JSON keyfile contents for Google Cloud service account authentication
|
|
1685
|
-
pt: Conteúdo do arquivo de chaves JSON para autenticação da conta de serviço do Google Cloud
|
|
1686
|
-
value: ''
|
|
1687
|
-
subgroup_id:
|
|
1688
|
-
where:
|
|
1689
|
-
slug: gcs-storage
|
|
1690
1569
|
- slug: 'mail'
|
|
1691
1570
|
icon: mail
|
|
1692
1571
|
name:
|
|
@@ -1728,62 +1607,28 @@
|
|
|
1728
1607
|
pt: Configure provedores de serviço de IA e credenciais de API para recursos inteligentes do sistema
|
|
1729
1608
|
relations:
|
|
1730
1609
|
setting:
|
|
1731
|
-
- slug: ai-openai-
|
|
1732
|
-
type:
|
|
1733
|
-
component:
|
|
1610
|
+
- slug: ai-openai-profile-id
|
|
1611
|
+
type: number
|
|
1612
|
+
component: entity-picker
|
|
1734
1613
|
name:
|
|
1735
|
-
en:
|
|
1736
|
-
pt:
|
|
1614
|
+
en: OpenAI Profile
|
|
1615
|
+
pt: Perfil OpenAI
|
|
1737
1616
|
description:
|
|
1738
|
-
en:
|
|
1739
|
-
pt:
|
|
1617
|
+
en: Integration profile (type AI / OpenAI) to use for OpenAI features
|
|
1618
|
+
pt: Perfil de integração (tipo IA / OpenAI) a usar para recursos de OpenAI
|
|
1740
1619
|
value: ''
|
|
1741
1620
|
user_override: false
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
- slug: ai-openai-api-key-enabled
|
|
1746
|
-
type: boolean
|
|
1747
|
-
name:
|
|
1748
|
-
en: Enable OpenAI
|
|
1749
|
-
pt: Habilitar OpenAI
|
|
1750
|
-
description:
|
|
1751
|
-
en: Toggle to enable or disable OpenAI integration features in the system
|
|
1752
|
-
pt: Alternar para habilitar ou desabilitar os recursos de integração do OpenAI no sistema
|
|
1753
|
-
value: false
|
|
1754
|
-
user_override: false
|
|
1755
|
-
component: switch
|
|
1756
|
-
subgroup_id:
|
|
1757
|
-
where:
|
|
1758
|
-
slug: openai
|
|
1759
|
-
- slug: ai-gemini-api-key
|
|
1760
|
-
type: secret
|
|
1761
|
-
component: input-secret
|
|
1621
|
+
- slug: ai-gemini-profile-id
|
|
1622
|
+
type: number
|
|
1623
|
+
component: entity-picker
|
|
1762
1624
|
name:
|
|
1763
|
-
en:
|
|
1764
|
-
pt:
|
|
1625
|
+
en: Gemini Profile
|
|
1626
|
+
pt: Perfil Gemini
|
|
1765
1627
|
description:
|
|
1766
|
-
en:
|
|
1767
|
-
pt:
|
|
1628
|
+
en: Integration profile (type AI / Gemini) to use for Gemini features
|
|
1629
|
+
pt: Perfil de integração (tipo IA / Gemini) a usar para recursos de Gemini
|
|
1768
1630
|
value: ''
|
|
1769
1631
|
user_override: false
|
|
1770
|
-
subgroup_id:
|
|
1771
|
-
where:
|
|
1772
|
-
slug: gemini
|
|
1773
|
-
- slug: ai-gemini-api-key-enabled
|
|
1774
|
-
type: boolean
|
|
1775
|
-
name:
|
|
1776
|
-
en: Enable Google AI
|
|
1777
|
-
pt: Habilitar Google AI
|
|
1778
|
-
description:
|
|
1779
|
-
en: Toggle to enable or disable Google AI integration features in the system
|
|
1780
|
-
pt: Alternar para habilitar ou desabilitar os recursos de integração do Google AI no sistema
|
|
1781
|
-
value: false
|
|
1782
|
-
user_override: false
|
|
1783
|
-
component: switch
|
|
1784
|
-
subgroup_id:
|
|
1785
|
-
where:
|
|
1786
|
-
slug: gemini
|
|
1787
1632
|
- slug: integration
|
|
1788
1633
|
icon: webhook
|
|
1789
1634
|
name:
|
|
@@ -1970,23 +1815,17 @@
|
|
|
1970
1815
|
pt: Habilitar ou desabilitar o servidor MCP e o recurso de chat de IA
|
|
1971
1816
|
value: true
|
|
1972
1817
|
user_override: false
|
|
1973
|
-
- slug: mcp-ai-
|
|
1974
|
-
type:
|
|
1975
|
-
component:
|
|
1818
|
+
- slug: mcp-ai-profile-id
|
|
1819
|
+
type: number
|
|
1820
|
+
component: entity-picker
|
|
1976
1821
|
name:
|
|
1977
|
-
en: AI
|
|
1978
|
-
pt:
|
|
1822
|
+
en: AI Profile
|
|
1823
|
+
pt: Perfil de IA
|
|
1979
1824
|
description:
|
|
1980
|
-
en: AI
|
|
1981
|
-
pt:
|
|
1982
|
-
value:
|
|
1825
|
+
en: Integration profile (type AI) to use for MCP chat
|
|
1826
|
+
pt: Perfil de integração (tipo IA) a usar no chat MCP
|
|
1827
|
+
value: ''
|
|
1983
1828
|
user_override: false
|
|
1984
|
-
relations:
|
|
1985
|
-
setting_list:
|
|
1986
|
-
- value: openai
|
|
1987
|
-
order: 0
|
|
1988
|
-
- value: gemini
|
|
1989
|
-
order: 1
|
|
1990
1829
|
- slug: pdf
|
|
1991
1830
|
icon: file-text
|
|
1992
1831
|
name:
|
|
@@ -246,21 +246,13 @@
|
|
|
246
246
|
en: Google Cloud Storage authentication settings
|
|
247
247
|
pt: Configurações de autenticação do Google Cloud Storage
|
|
248
248
|
|
|
249
|
-
- slug:
|
|
249
|
+
- slug: do-spaces-storage
|
|
250
250
|
name:
|
|
251
|
-
en:
|
|
252
|
-
pt:
|
|
251
|
+
en: DigitalOcean Spaces
|
|
252
|
+
pt: DigitalOcean Spaces
|
|
253
253
|
description:
|
|
254
|
-
en:
|
|
255
|
-
pt: Configurações de
|
|
256
|
-
|
|
257
|
-
- slug: gemini
|
|
258
|
-
name:
|
|
259
|
-
en: Gemini
|
|
260
|
-
pt: Gemini
|
|
261
|
-
description:
|
|
262
|
-
en: Google Gemini service credential settings
|
|
263
|
-
pt: Configurações de credenciais do serviço Google Gemini
|
|
254
|
+
en: DigitalOcean Spaces bucket access and optional CDN settings
|
|
255
|
+
pt: Configurações de acesso ao bucket e CDN opcional do DigitalOcean Spaces
|
|
264
256
|
|
|
265
257
|
- slug: outbox-general
|
|
266
258
|
name:
|
|
@@ -9,14 +9,15 @@ import {
|
|
|
9
9
|
CardHeader,
|
|
10
10
|
CardTitle,
|
|
11
11
|
} from '@/components/ui/card';
|
|
12
|
+
import {
|
|
13
|
+
formatIntegrationProviderName,
|
|
14
|
+
IntegrationLogo,
|
|
15
|
+
normalizeIntegrationProvider,
|
|
16
|
+
} from '@/components/ui/integration-logo';
|
|
12
17
|
import { useApp } from '@hed-hog/next-app-provider';
|
|
13
18
|
import { Link as LinkIcon, Unlink } from 'lucide-react';
|
|
14
19
|
import { useTranslations } from 'next-intl';
|
|
15
20
|
import Link from 'next/link';
|
|
16
|
-
import FacebookIcon from '../../../../../../../public/facebook.svg';
|
|
17
|
-
import GithubIcon from '../../../../../../../public/github.svg';
|
|
18
|
-
import GoogleIcon from '../../../../../../../public/google.svg';
|
|
19
|
-
import MicrosoftIcon from '../../../../../../../public/microsoft.svg';
|
|
20
21
|
|
|
21
22
|
export function ConnectedAccounts() {
|
|
22
23
|
const { getSettingValue, request, setAccessToken, showToastHandler, user } =
|
|
@@ -24,25 +25,18 @@ export function ConnectedAccounts() {
|
|
|
24
25
|
const t = useTranslations('core.ConnectedAccounts');
|
|
25
26
|
const availableProviders = getSettingValue('providers') || '[]';
|
|
26
27
|
|
|
27
|
-
const providerIcons: Record<string, React.ComponentType<any>> = {
|
|
28
|
-
google: GoogleIcon,
|
|
29
|
-
facebook: FacebookIcon,
|
|
30
|
-
github: GithubIcon,
|
|
31
|
-
microsoft: MicrosoftIcon,
|
|
32
|
-
};
|
|
33
|
-
|
|
34
28
|
const providers = Array.isArray(availableProviders)
|
|
35
29
|
? availableProviders.map((p: any) => {
|
|
36
30
|
if (typeof p === 'string') {
|
|
37
31
|
return {
|
|
38
32
|
id: p,
|
|
39
33
|
name: p.charAt(0).toUpperCase() + p.slice(1),
|
|
40
|
-
|
|
34
|
+
normalizedId: normalizeIntegrationProvider(p),
|
|
41
35
|
};
|
|
42
36
|
}
|
|
43
37
|
return {
|
|
44
38
|
...p,
|
|
45
|
-
|
|
39
|
+
normalizedId: normalizeIntegrationProvider(p.id),
|
|
46
40
|
};
|
|
47
41
|
})
|
|
48
42
|
: [];
|
|
@@ -50,7 +44,7 @@ export function ConnectedAccounts() {
|
|
|
50
44
|
const handleDisconnect = async (email: string, providerName: string) => {
|
|
51
45
|
try {
|
|
52
46
|
const { data }: any = await request({
|
|
53
|
-
url: `/oauth/${providerName
|
|
47
|
+
url: `/oauth/${normalizeIntegrationProvider(providerName)}`,
|
|
54
48
|
method: 'DELETE',
|
|
55
49
|
data: { email },
|
|
56
50
|
});
|
|
@@ -66,8 +60,10 @@ export function ConnectedAccounts() {
|
|
|
66
60
|
};
|
|
67
61
|
|
|
68
62
|
const getConnectionInfo = (providerName: string) => {
|
|
63
|
+
const normalizedProviderName = normalizeIntegrationProvider(providerName);
|
|
69
64
|
const accounts = (user?.user_account ?? []).filter(
|
|
70
|
-
(ua) =>
|
|
65
|
+
(ua) =>
|
|
66
|
+
normalizeIntegrationProvider(ua.provider) === normalizedProviderName
|
|
71
67
|
);
|
|
72
68
|
|
|
73
69
|
return {
|
|
@@ -85,7 +81,7 @@ export function ConnectedAccounts() {
|
|
|
85
81
|
</CardHeader>
|
|
86
82
|
<CardContent className="space-y-4 px-6 pb-6">
|
|
87
83
|
{providers?.map((provider: any) => {
|
|
88
|
-
const { isConnected, account } = getConnectionInfo(provider.
|
|
84
|
+
const { isConnected, account } = getConnectionInfo(provider.id);
|
|
89
85
|
|
|
90
86
|
return (
|
|
91
87
|
<div
|
|
@@ -94,11 +90,20 @@ export function ConnectedAccounts() {
|
|
|
94
90
|
>
|
|
95
91
|
<div className="flex items-center gap-4">
|
|
96
92
|
<div className="flex size-10 items-center justify-center rounded-lg bg-muted">
|
|
97
|
-
<
|
|
93
|
+
<IntegrationLogo
|
|
94
|
+
provider={provider.id}
|
|
95
|
+
size={20}
|
|
96
|
+
decorative
|
|
97
|
+
/>
|
|
98
98
|
</div>
|
|
99
99
|
<div>
|
|
100
100
|
<div className="flex items-center gap-2">
|
|
101
|
-
<p className="font-medium">
|
|
101
|
+
<p className="font-medium">
|
|
102
|
+
{formatIntegrationProviderName(
|
|
103
|
+
provider.id,
|
|
104
|
+
provider.name
|
|
105
|
+
)}
|
|
106
|
+
</p>
|
|
102
107
|
{Boolean(isConnected) && (
|
|
103
108
|
<Badge variant="default" className="text-xs">
|
|
104
109
|
{t('connected')}
|
|
@@ -118,7 +123,7 @@ export function ConnectedAccounts() {
|
|
|
118
123
|
variant="outline"
|
|
119
124
|
size="sm"
|
|
120
125
|
onClick={() =>
|
|
121
|
-
handleDisconnect(String(account?.email), provider.
|
|
126
|
+
handleDisconnect(String(account?.email), provider.id)
|
|
122
127
|
}
|
|
123
128
|
>
|
|
124
129
|
<Unlink className="mr-2 size-4" />
|
|
@@ -126,7 +131,7 @@ export function ConnectedAccounts() {
|
|
|
126
131
|
</Button>
|
|
127
132
|
) : (
|
|
128
133
|
<Link
|
|
129
|
-
href={`${process.env.NEXT_PUBLIC_API_BASE_URL}/oauth/${provider.
|
|
134
|
+
href={`${process.env.NEXT_PUBLIC_API_BASE_URL}/oauth/${provider.normalizedId}/connect`}
|
|
130
135
|
>
|
|
131
136
|
<Button type="button" variant="outline" size="sm">
|
|
132
137
|
<LinkIcon className="mr-2 size-4" />
|