@greatapps/greatagents 0.1.23 → 0.1.25
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/CLAUDE.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## gagents-schemas — @greatapps/greatagents
|
|
2
6
|
|
|
3
7
|
Pacote NPM `@greatapps/greatagents`: definições de schema compartilhadas por todos os serviços.
|
|
4
8
|
|
|
@@ -95,3 +99,7 @@ O array `params` define quais campos são obrigatórios em WHERE clauses:
|
|
|
95
99
|
- **`contacts.identifier`**: Tem constraint UNIQUE global, não per-account
|
|
96
100
|
- **Versionamento**: Sempre bumpar version antes de publicar — consumers usam versão fixa
|
|
97
101
|
- **Impacto cross-service**: Mudanças em schemas afetam gagents-r1-api-postgresql (validação, queries) e gagents-r3-api (serviços, lógica)
|
|
102
|
+
|
|
103
|
+
## API Response Shape (para consumidores)
|
|
104
|
+
|
|
105
|
+
Schemas definem a estrutura, mas consumers devem saber: `@greatapps/api` view operations retornam `{ data: [{...}] }` — **sempre array**. `insert()` retorna `{ status: 0 }` em falha de validação (não throw). **JSONB columns** (metadata, config, products): schema define `type: "string"` mas DB é JSONB — sempre `JSON.stringify()` antes de insert/update.
|
package/package.json
CHANGED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
export const properties = {
|
|
2
|
+
id: {
|
|
3
|
+
type: "number",
|
|
4
|
+
filterable: true,
|
|
5
|
+
unique: true,
|
|
6
|
+
autoIncrement: true,
|
|
7
|
+
index: true
|
|
8
|
+
},
|
|
9
|
+
deleted: {
|
|
10
|
+
type: "boolean",
|
|
11
|
+
default: false,
|
|
12
|
+
filterable: true
|
|
13
|
+
},
|
|
14
|
+
datetime_add: {
|
|
15
|
+
type: "date",
|
|
16
|
+
filterable: true,
|
|
17
|
+
updatable: false
|
|
18
|
+
},
|
|
19
|
+
datetime_alt: {
|
|
20
|
+
type: "date",
|
|
21
|
+
filterable: true,
|
|
22
|
+
updatable: true
|
|
23
|
+
},
|
|
24
|
+
datetime_del: {
|
|
25
|
+
type: "date",
|
|
26
|
+
filterable: true
|
|
27
|
+
},
|
|
28
|
+
slug: {
|
|
29
|
+
type: "string",
|
|
30
|
+
required: true,
|
|
31
|
+
filterable: true,
|
|
32
|
+
index: true,
|
|
33
|
+
validation: {
|
|
34
|
+
maxLength: 100
|
|
35
|
+
},
|
|
36
|
+
interface: {
|
|
37
|
+
label: {
|
|
38
|
+
"pt-br": "Slug",
|
|
39
|
+
"en": "Slug"
|
|
40
|
+
},
|
|
41
|
+
component: "input"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
name: {
|
|
45
|
+
type: "string",
|
|
46
|
+
required: true,
|
|
47
|
+
validation: {
|
|
48
|
+
maxLength: 255
|
|
49
|
+
},
|
|
50
|
+
interface: {
|
|
51
|
+
label: {
|
|
52
|
+
"pt-br": "Nome",
|
|
53
|
+
"en": "Name"
|
|
54
|
+
},
|
|
55
|
+
component: "input"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
type: {
|
|
59
|
+
type: "string",
|
|
60
|
+
required: true,
|
|
61
|
+
filterable: true,
|
|
62
|
+
validation: {
|
|
63
|
+
maxLength: 50
|
|
64
|
+
},
|
|
65
|
+
interface: {
|
|
66
|
+
label: {
|
|
67
|
+
"pt-br": "Tipo",
|
|
68
|
+
"en": "Type"
|
|
69
|
+
},
|
|
70
|
+
component: "select"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
description: {
|
|
74
|
+
type: "string",
|
|
75
|
+
required: false,
|
|
76
|
+
validation: {
|
|
77
|
+
maxLength: 1000
|
|
78
|
+
},
|
|
79
|
+
interface: {
|
|
80
|
+
label: {
|
|
81
|
+
"pt-br": "Descrição",
|
|
82
|
+
"en": "Description"
|
|
83
|
+
},
|
|
84
|
+
component: "textarea"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
auth_config: {
|
|
88
|
+
type: "string",
|
|
89
|
+
required: false,
|
|
90
|
+
interface: {
|
|
91
|
+
label: {
|
|
92
|
+
"pt-br": "Configuração de autenticação",
|
|
93
|
+
"en": "Auth configuration"
|
|
94
|
+
},
|
|
95
|
+
component: "textarea"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
config: {
|
|
99
|
+
type: "string",
|
|
100
|
+
required: false,
|
|
101
|
+
interface: {
|
|
102
|
+
label: {
|
|
103
|
+
"pt-br": "Configuração adicional",
|
|
104
|
+
"en": "Additional configuration"
|
|
105
|
+
},
|
|
106
|
+
component: "textarea"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
status: {
|
|
110
|
+
type: "string",
|
|
111
|
+
required: true,
|
|
112
|
+
filterable: true,
|
|
113
|
+
default: "active",
|
|
114
|
+
validation: {
|
|
115
|
+
maxLength: 20
|
|
116
|
+
},
|
|
117
|
+
interface: {
|
|
118
|
+
label: {
|
|
119
|
+
"pt-br": "Status",
|
|
120
|
+
"en": "Status"
|
|
121
|
+
},
|
|
122
|
+
component: "select"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
@@ -45,9 +45,29 @@ export const properties = {
|
|
|
45
45
|
disabled: true
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
+
id_platform_integration: {
|
|
49
|
+
type: "number",
|
|
50
|
+
required: false,
|
|
51
|
+
updatable: false,
|
|
52
|
+
filterable: true,
|
|
53
|
+
index: true,
|
|
54
|
+
reference: {
|
|
55
|
+
module: "platform_integrations",
|
|
56
|
+
label: "name",
|
|
57
|
+
value: "id",
|
|
58
|
+
},
|
|
59
|
+
interface: {
|
|
60
|
+
label: {
|
|
61
|
+
"pt-br": "Integração de plataforma",
|
|
62
|
+
"en": "Platform integration"
|
|
63
|
+
},
|
|
64
|
+
component: "select",
|
|
65
|
+
disabled: true
|
|
66
|
+
}
|
|
67
|
+
},
|
|
48
68
|
id_tool: {
|
|
49
69
|
type: "number",
|
|
50
|
-
required:
|
|
70
|
+
required: false,
|
|
51
71
|
updatable: false,
|
|
52
72
|
filterable: true,
|
|
53
73
|
index: true,
|
|
@@ -67,7 +87,7 @@ export const properties = {
|
|
|
67
87
|
},
|
|
68
88
|
id_agent: {
|
|
69
89
|
type: "number",
|
|
70
|
-
required:
|
|
90
|
+
required: false,
|
|
71
91
|
updatable: false,
|
|
72
92
|
filterable: true,
|
|
73
93
|
index: true,
|
|
@@ -85,6 +105,24 @@ export const properties = {
|
|
|
85
105
|
disabled: true
|
|
86
106
|
}
|
|
87
107
|
},
|
|
108
|
+
external_reference: {
|
|
109
|
+
type: "string",
|
|
110
|
+
required: false,
|
|
111
|
+
updatable: false,
|
|
112
|
+
filterable: true,
|
|
113
|
+
index: true,
|
|
114
|
+
validation: {
|
|
115
|
+
maxLength: 255
|
|
116
|
+
},
|
|
117
|
+
interface: {
|
|
118
|
+
label: {
|
|
119
|
+
"pt-br": "Referência externa",
|
|
120
|
+
"en": "External reference"
|
|
121
|
+
},
|
|
122
|
+
component: "input",
|
|
123
|
+
disabled: true
|
|
124
|
+
}
|
|
125
|
+
},
|
|
88
126
|
authorized_by_contact: {
|
|
89
127
|
type: "number",
|
|
90
128
|
required: false,
|
package/src/product.js
CHANGED
|
@@ -9,6 +9,7 @@ import tools from './modules/tools/index.js';
|
|
|
9
9
|
import agent_tools from './modules/agent_tools/index.js';
|
|
10
10
|
import tool_credentials from './modules/tool_credentials/index.js';
|
|
11
11
|
import contact_users from './modules/contact_users/index.js';
|
|
12
|
+
import platform_integrations from './modules/platform_integrations/index.js';
|
|
12
13
|
|
|
13
14
|
/* Shared */
|
|
14
15
|
|
|
@@ -41,7 +42,8 @@ export default {
|
|
|
41
42
|
tools,
|
|
42
43
|
agent_tools,
|
|
43
44
|
tool_credentials,
|
|
44
|
-
contact_users
|
|
45
|
+
contact_users,
|
|
46
|
+
platform_integrations
|
|
45
47
|
},
|
|
46
48
|
documentation: {
|
|
47
49
|
title: "GreatAgents API",
|