@aifabrix/builder 2.42.0 → 2.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/aifabrix.js +1 -1
- package/integration/hubspot-test/README.md +126 -0
- package/integration/{hubspot → hubspot-test}/application.json +6 -6
- package/integration/{hubspot → hubspot-test}/create-hubspot.js +5 -5
- package/integration/hubspot-test/env.template +4 -0
- package/integration/{hubspot/hubspot-datasource-company.json → hubspot-test/hubspot-test-datasource-company.json} +3 -2
- package/integration/{hubspot/hubspot-datasource-contact.json → hubspot-test/hubspot-test-datasource-contact.json} +3 -2
- package/integration/{hubspot/hubspot-datasource-deal.json → hubspot-test/hubspot-test-datasource-deal.json} +3 -2
- package/integration/{hubspot/hubspot-datasource-users.json → hubspot-test/hubspot-test-datasource-users.json} +3 -2
- package/integration/{hubspot/hubspot-deploy.json → hubspot-test/hubspot-test-deploy.json} +198 -21
- package/integration/{hubspot/hubspot-system.json → hubspot-test/hubspot-test-system.json} +8 -7
- package/integration/hubspot-test/rbac.json +166 -0
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-hubspot-credential-real.yaml +3 -3
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-hubspot-env-vars.yaml +2 -2
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-add-datasource.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-credential-create.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-credential-select.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-known-platform.yaml +1 -1
- package/integration/hubspot-test/test-artifacts/wizard-invalid-missing-source.yaml +2 -0
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-mode.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-openapi-file.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-openapi-url.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-source.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-valid-for-dimension-array-test.yaml +1 -1
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-key-test.yaml +5 -0
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-path-test.yaml +5 -0
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-valid-for-dimension-test.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-valid-for-rbac-test.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-valid-for-rbac-yaml-test.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test.js +102 -59
- package/integration/{hubspot → hubspot-test}/wizard-hubspot-e2e.yaml +2 -2
- package/integration/{hubspot → hubspot-test}/wizard-hubspot-platform.yaml +1 -1
- package/lib/api/external-test.api.js +1 -1
- package/lib/api/service-users.api.js +111 -2
- package/lib/api/types/service-users.types.js +41 -0
- package/lib/api/wizard.api.js +2 -1
- package/lib/app/index.js +2 -2
- package/lib/app/prompts.js +2 -2
- package/lib/app/readme.js +3 -1
- package/lib/app/register.js +3 -1
- package/lib/app/rotate-secret.js +3 -0
- package/lib/cli/setup-app.js +5 -5
- package/lib/cli/setup-auth.js +19 -11
- package/lib/cli/setup-dev.js +62 -32
- package/lib/cli/setup-environment.js +6 -21
- package/lib/cli/setup-infra.js +13 -0
- package/lib/cli/setup-secrets.js +45 -6
- package/lib/cli/setup-service-user.js +146 -20
- package/lib/cli/setup-utility.js +12 -0
- package/lib/commands/auth-config.js +25 -19
- package/lib/commands/datasource.js +46 -1
- package/lib/commands/dev-init.js +1 -1
- package/lib/commands/repair-env-template.js +14 -8
- package/lib/commands/repair-rbac.js +25 -19
- package/lib/commands/repair.js +108 -31
- package/lib/commands/secrets-remove.js +1 -1
- package/lib/commands/secrets-set.js +6 -0
- package/lib/commands/secrets-validate.js +17 -4
- package/lib/commands/service-user.js +231 -2
- package/lib/commands/up-common.js +25 -0
- package/lib/commands/up-dataplane.js +91 -7
- package/lib/commands/wizard-core-helpers.js +5 -2
- package/lib/commands/wizard-core.js +2 -1
- package/lib/commands/wizard-headless.js +6 -1
- package/lib/commands/wizard.js +13 -6
- package/lib/core/admin-secrets.js +2 -0
- package/lib/core/config.js +7 -5
- package/lib/core/ensure-encryption-key.js +1 -3
- package/lib/core/secrets.js +32 -9
- package/lib/core/templates.js +1 -1
- package/lib/datasource/abac-validator.js +157 -0
- package/lib/datasource/field-reference-validator.js +74 -36
- package/lib/datasource/log-viewer.js +221 -0
- package/lib/datasource/resolve-app.js +109 -0
- package/lib/datasource/test-e2e.js +11 -20
- package/lib/datasource/test-integration.js +42 -22
- package/lib/datasource/validate.js +5 -2
- package/lib/external-system/download-helpers.js +3 -1
- package/lib/external-system/generator.js +12 -8
- package/lib/external-system/test-system-level.js +1 -1
- package/lib/generator/external-controller-manifest.js +3 -3
- package/lib/generator/external-schema-utils.js +3 -1
- package/lib/generator/external.js +7 -7
- package/lib/generator/helpers.js +13 -9
- package/lib/generator/index.js +4 -4
- package/lib/generator/split.js +45 -10
- package/lib/generator/wizard-prompts-secondary.js +39 -7
- package/lib/generator/wizard-readme.js +4 -1
- package/lib/generator/wizard.js +68 -53
- package/lib/infrastructure/helpers.js +50 -35
- package/lib/infrastructure/index.js +39 -23
- package/lib/schema/env-config.yaml +19 -2
- package/lib/schema/external-datasource.schema.json +11 -1
- package/lib/schema/wizard-config.schema.json +7 -1
- package/lib/utils/app-config-resolver.js +23 -1
- package/lib/utils/config-paths.js +48 -4
- package/lib/utils/credential-secrets-env.js +16 -1
- package/lib/utils/env-map.js +7 -3
- package/lib/utils/error-formatter.js +37 -0
- package/lib/utils/external-env-template.js +180 -0
- package/lib/utils/external-readme.js +33 -1
- package/lib/utils/external-system-display.js +43 -0
- package/lib/utils/external-system-validators.js +2 -2
- package/lib/utils/help-builder.js +3 -5
- package/lib/utils/local-secrets.js +26 -3
- package/lib/utils/paths.js +2 -1
- package/lib/utils/secrets-generator.js +2 -2
- package/lib/utils/secrets-utils.js +4 -0
- package/lib/utils/secure-file-permissions.js +91 -0
- package/lib/utils/token-manager.js +36 -3
- package/lib/utils/yaml-preserve.js +59 -1
- package/lib/validation/env-template-auth.js +50 -2
- package/lib/validation/external-manifest-validator.js +8 -0
- package/lib/validation/validate.js +8 -0
- package/lib/validation/validator.js +10 -13
- package/package.json +6 -2
- package/templates/applications/dataplane/env.template +5 -1
- package/templates/applications/miso-controller/application.yaml +1 -1
- package/templates/applications/miso-controller/env.template +13 -2
- package/templates/external-system/README.md.hbs +18 -5
- package/templates/external-system/env.template.hbs +22 -0
- package/integration/hubspot/README.md +0 -100
- package/integration/hubspot/env.template +0 -4
- package/integration/hubspot/test-artifacts/wizard-invalid-missing-source.yaml +0 -2
- package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-key-test.yaml +0 -5
- package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-path-test.yaml +0 -5
- /package/integration/{hubspot → hubspot-test}/companies.json +0 -0
- /package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-app-name.yaml +0 -0
- /package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-missing-app.yaml +0 -0
- /package/integration/{hubspot → hubspot-test}/test-dataplane-down-helpers.js +0 -0
- /package/integration/{hubspot → hubspot-test}/test-dataplane-down-tests.js +0 -0
- /package/integration/{hubspot → hubspot-test}/test-dataplane-down.js +0 -0
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ Create and deploy an external system (e.g. HubSpot): wizard or manual setup, the
|
|
|
82
82
|
|
|
83
83
|
**Example: HubSpot**
|
|
84
84
|
|
|
85
|
-
- Create: `aifabrix create hubspot-test
|
|
85
|
+
- Create: `aifabrix create hubspot-test` (external is the default; or `aifabrix wizard` for guided setup). For a web app use `aifabrix create my-app --type webapp`.
|
|
86
86
|
- Configure auth and datasources under `integration/hubspot-test/`.
|
|
87
87
|
- Validate: `aifabrix validate hubspot-test`
|
|
88
88
|
- Deploy: `aifabrix deploy hubspot-test`
|
package/bin/aifabrix.js
CHANGED
|
@@ -28,7 +28,7 @@ function initializeCLI() {
|
|
|
28
28
|
|
|
29
29
|
program.name('aifabrix')
|
|
30
30
|
.version(packageJson.version)
|
|
31
|
-
.description('AI Fabrix
|
|
31
|
+
.description('AI Fabrix Builder – Help and documentation');
|
|
32
32
|
|
|
33
33
|
// Delegate command setup to lib/cli.js (order matches help categories for consistency)
|
|
34
34
|
cli.setupCommands(program);
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# HubSpot CRM
|
|
2
|
+
|
|
3
|
+
HubSpot CRM integration with OpenAPI support for companies, contacts, and deals
|
|
4
|
+
|
|
5
|
+
## System Information
|
|
6
|
+
|
|
7
|
+
- **System Key**: `hubspot-test`
|
|
8
|
+
- **System Type**: `openapi`
|
|
9
|
+
- **Datasources**: 4
|
|
10
|
+
|
|
11
|
+
## Files
|
|
12
|
+
|
|
13
|
+
- `application.yaml` – Application configuration with `app` and `externalIntegration` blocks
|
|
14
|
+
- `hubspot-test-system.json` – External system definition (authentication, OpenAPI/MCP, RBAC)
|
|
15
|
+
- `hubspot-test-datasource-deal.json` – Datasource: HubSpot Deal
|
|
16
|
+
- `hubspot-test-datasource-contact.json` – Datasource: HubSpot Contact
|
|
17
|
+
- `hubspot-test-datasource-users.json` – Datasource: HubSpot Users
|
|
18
|
+
- `hubspot-test-datasource-company.json` – Datasource: HubSpot Company
|
|
19
|
+
- `env.template` – Environment variables template (secrets, API keys)
|
|
20
|
+
- `hubspot-test-deploy.json` – Deployment manifest (generated by `aifabrix json`)
|
|
21
|
+
|
|
22
|
+
Optional: `rbac.yaml` – Roles and permissions merged into the system when present.
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
### 1. Create External System
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
aifabrix create hubspot-test
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
(External is the default type. Use `aifabrix create <name> --type webapp` for a builder app.)
|
|
33
|
+
|
|
34
|
+
Or use the interactive wizard:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
aifabrix wizard --app hubspot-test
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 2. Configure Authentication and Datasources
|
|
41
|
+
|
|
42
|
+
Edit files in `integration/hubspot-test/`:
|
|
43
|
+
|
|
44
|
+
- **Authentication**: `hubspot-test-system.json` (auth type, credentials placeholders)
|
|
45
|
+
- **Field mappings**: `hubspot-test-datasource-*.json` (dimensions, attributes, operations)
|
|
46
|
+
|
|
47
|
+
### 3. Validate Configuration
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
aifabrix validate hubspot-test --type external
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 4. Generate Deployment Manifest
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
aifabrix json hubspot-test --type external
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
This creates `hubspot-test-deploy.json` in `integration/hubspot-test/`.
|
|
60
|
+
|
|
61
|
+
### 5. Deploy
|
|
62
|
+
|
|
63
|
+
Controller URL and environment are read from config. Configure and log in first:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
aifabrix auth config --set-controller <url> --set-environment dev
|
|
67
|
+
aifabrix login
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Then deploy:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
aifabrix deploy hubspot-test
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Testing
|
|
77
|
+
|
|
78
|
+
### Unit Tests (Local Validation, No API)
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
aifabrix test hubspot-test
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Integration Tests (Via Dataplane)
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
aifabrix test-integration hubspot-test
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Deployment
|
|
91
|
+
|
|
92
|
+
Deploy via miso-controller pipeline (same as regular apps). Auth and controller come from `aifabrix login` and `aifabrix auth config`:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
aifabrix deploy hubspot-test
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Wizard E2E tests (`test.js`)
|
|
99
|
+
|
|
100
|
+
Run positive wizard tests with:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
pnpm test:hubspot-wizard:positive
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
If you see **"Invalid token or insufficient permissions"** or **"Failed to create wizard session"** even though `aifabrix auth status` shows connected, the dataplane may be configured to accept only **client credentials** for the wizard API, not device tokens.
|
|
107
|
+
|
|
108
|
+
**Option A – Use client credentials (recommended if dataplane requires them)**
|
|
109
|
+
|
|
110
|
+
1. Get a **client ID** and **client secret** for an app that the dataplane accepts for wizard (e.g. from your admin or Miso/Keycloak for the environment).
|
|
111
|
+
2. Put them in **`~/.aifabrix/secrets.local.yaml`** under keys that depend on the **app name in the wizard config**:
|
|
112
|
+
- For `wizard-hubspot-e2e.yaml` the app name is `wizard-e2e-e2e`, so use:
|
|
113
|
+
- `wizard-e2e-e2e-client-idKeyVault`: `<your client id>`
|
|
114
|
+
- `wizard-e2e-e2e-client-secretKeyVault`: `<your client secret>`
|
|
115
|
+
- If your platform uses a single “wizard” or “dataplane” app for all wizard runs, ask your admin for that app’s client ID/secret and the exact key names (they may be something like `dataplane-client-idKeyVault` / `dataplane-client-secretKeyVault`; the builder looks up `<appName>-client-idKeyVault` and `<appName>-client-secretKeyVault` where `appName` comes from the config file).
|
|
116
|
+
3. **Optional fallback:** you can also set **`integration/hubspot-test/.env`** with `CLIENTID` and `CLIENTSECRET`; the test runner maps those to `HUBSPOT_CLIENT_ID` / `HUBSPOT_CLIENT_SECRET` for real-credential tests, and the token manager uses `CLIENTID`/`CLIENTSECRET` when no secrets file entry exists for the app.
|
|
117
|
+
|
|
118
|
+
**Option B – Use device token**
|
|
119
|
+
|
|
120
|
+
If the dataplane is configured to accept device tokens for the wizard API, ensure you are logged in with `aifabrix login` and that the controller URL and environment match (e.g. `dev`). No client credentials are needed.
|
|
121
|
+
|
|
122
|
+
## Troubleshooting
|
|
123
|
+
|
|
124
|
+
- **Validation errors**: Run `aifabrix validate hubspot-test --type external` to see schema and manifest errors.
|
|
125
|
+
- **Deployment / auth**: Run `aifabrix auth config --set-controller <url> --set-environment <env>` and `aifabrix login` before `aifabrix deploy`.
|
|
126
|
+
- **File not found**: Run commands from the project root (where `package.json` and `integration/` live).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"app": {
|
|
3
|
-
"key": "hubspot",
|
|
3
|
+
"key": "hubspot-test",
|
|
4
4
|
"displayName": "HubSpot CRM",
|
|
5
5
|
"description": "HubSpot CRM integration with OpenAPI support for companies, contacts, and deals",
|
|
6
6
|
"type": "external"
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"externalIntegration": {
|
|
9
9
|
"schemaBasePath": "./",
|
|
10
10
|
"systems": [
|
|
11
|
-
"hubspot-system.json"
|
|
11
|
+
"hubspot-test-system.json"
|
|
12
12
|
],
|
|
13
13
|
"dataSources": [
|
|
14
|
-
"hubspot-datasource-company.json",
|
|
15
|
-
"hubspot-datasource-contact.json",
|
|
16
|
-
"hubspot-datasource-deal.json",
|
|
17
|
-
"hubspot-datasource-users.json"
|
|
14
|
+
"hubspot-test-datasource-company.json",
|
|
15
|
+
"hubspot-test-datasource-contact.json",
|
|
16
|
+
"hubspot-test-datasource-deal.json",
|
|
17
|
+
"hubspot-test-datasource-users.json"
|
|
18
18
|
],
|
|
19
19
|
"autopublish": true,
|
|
20
20
|
"version": "1.0.0"
|
|
@@ -24,7 +24,7 @@ const execFileAsync = promisify(execFile);
|
|
|
24
24
|
const DEFAULT_CONTROLLER_URL = process.env.CONTROLLER_URL || 'http://localhost:3110';
|
|
25
25
|
const DEFAULT_ENVIRONMENT = process.env.ENVIRONMENT || 'miso';
|
|
26
26
|
const DEFAULT_OPENAPI_FILE = process.env.HUBSPOT_OPENAPI_FILE ||
|
|
27
|
-
path.join(process.cwd(), 'integration', 'hubspot', 'companies.json');
|
|
27
|
+
path.join(process.cwd(), 'integration', 'hubspot-test', 'companies.json');
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Prints usage information
|
|
@@ -34,7 +34,7 @@ const DEFAULT_OPENAPI_FILE = process.env.HUBSPOT_OPENAPI_FILE ||
|
|
|
34
34
|
function printUsage() {
|
|
35
35
|
logger.log([
|
|
36
36
|
'Usage:',
|
|
37
|
-
' node integration/hubspot/create-hubspot.js [options]',
|
|
37
|
+
' node integration/hubspot-test/create-hubspot.js [options]',
|
|
38
38
|
'',
|
|
39
39
|
'Options:',
|
|
40
40
|
' --name <name> Application name (required)',
|
|
@@ -46,9 +46,9 @@ function printUsage() {
|
|
|
46
46
|
' --help Show this help message',
|
|
47
47
|
'',
|
|
48
48
|
'Examples:',
|
|
49
|
-
' node integration/hubspot/create-hubspot.js --name my-hubspot',
|
|
50
|
-
' node integration/hubspot/create-hubspot.js --name my-hubspot --output ~/my-project',
|
|
51
|
-
' node integration/hubspot/create-hubspot.js --name my-hubspot --openapi /path/to/openapi.json'
|
|
49
|
+
' node integration/hubspot-test/create-hubspot.js --name my-hubspot',
|
|
50
|
+
' node integration/hubspot-test/create-hubspot.js --name my-hubspot --output ~/my-project',
|
|
51
|
+
' node integration/hubspot-test/create-hubspot.js --name my-hubspot --openapi /path/to/openapi.json'
|
|
52
52
|
].join('\n'));
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"key": "hubspot-company",
|
|
2
|
+
"key": "hubspot-test-company",
|
|
3
3
|
"displayName": "HubSpot Company",
|
|
4
4
|
"description": "HubSpot companies datasource with field mappings for CRM company data",
|
|
5
|
-
"systemKey": "hubspot",
|
|
5
|
+
"systemKey": "hubspot-test",
|
|
6
6
|
"entityType": "record-storage",
|
|
7
7
|
"resourceType": "customer",
|
|
8
8
|
"enabled": true,
|
|
9
9
|
"version": "1.0.0",
|
|
10
|
+
"primaryKey": ["id"],
|
|
10
11
|
"metadataSchema": {
|
|
11
12
|
"type": "object",
|
|
12
13
|
"properties": {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"key": "hubspot-contact",
|
|
2
|
+
"key": "hubspot-test-contact",
|
|
3
3
|
"displayName": "HubSpot Contact",
|
|
4
4
|
"description": "HubSpot contacts datasource with field mappings for CRM contact data",
|
|
5
|
-
"systemKey": "hubspot",
|
|
5
|
+
"systemKey": "hubspot-test",
|
|
6
6
|
"entityType": "record-storage",
|
|
7
7
|
"resourceType": "contact",
|
|
8
8
|
"enabled": true,
|
|
9
9
|
"version": "1.0.0",
|
|
10
|
+
"primaryKey": ["id"],
|
|
10
11
|
"metadataSchema": {
|
|
11
12
|
"type": "object",
|
|
12
13
|
"properties": {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"key": "hubspot-deal",
|
|
2
|
+
"key": "hubspot-test-deal",
|
|
3
3
|
"displayName": "HubSpot Deal",
|
|
4
4
|
"description": "HubSpot deals datasource with field mappings for CRM deal data",
|
|
5
|
-
"systemKey": "hubspot",
|
|
5
|
+
"systemKey": "hubspot-test",
|
|
6
6
|
"entityType": "record-storage",
|
|
7
7
|
"resourceType": "deal",
|
|
8
8
|
"enabled": true,
|
|
9
9
|
"version": "1.0.0",
|
|
10
|
+
"primaryKey": ["id"],
|
|
10
11
|
"metadataSchema": {
|
|
11
12
|
"type": "object",
|
|
12
13
|
"properties": {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"key": "hubspot-users
|
|
2
|
+
"key": "hubspot-test-users",
|
|
3
3
|
"displayName": "HubSpot Users",
|
|
4
4
|
"resourceType": "person",
|
|
5
|
-
"systemKey": "hubspot",
|
|
5
|
+
"systemKey": "hubspot-test",
|
|
6
6
|
"enabled": true,
|
|
7
7
|
"entityType": "recordStorage",
|
|
8
|
+
"primaryKey": ["id"],
|
|
8
9
|
"description": "Comprehensive HubSpot users datasource with full CRUD operations, comprehensive metadata schema, ABAC dimensions, and OpenAPI support",
|
|
9
10
|
"metadataSchema": {
|
|
10
11
|
"type": "object",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"key": "hubspot",
|
|
2
|
+
"key": "hubspot-test",
|
|
3
3
|
"displayName": "HubSpot CRM",
|
|
4
4
|
"description": "HubSpot CRM integration with OpenAPI support for companies, contacts, and deals",
|
|
5
5
|
"type": "external",
|
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
"externalIntegration": {
|
|
8
8
|
"schemaBasePath": "./",
|
|
9
9
|
"systems": [
|
|
10
|
-
"hubspot-system.json"
|
|
10
|
+
"hubspot-test-system.json"
|
|
11
11
|
],
|
|
12
12
|
"dataSources": [
|
|
13
|
-
"hubspot-datasource-company.json",
|
|
14
|
-
"hubspot-datasource-contact.json",
|
|
15
|
-
"hubspot-datasource-deal.json",
|
|
16
|
-
"hubspot-datasource-users.json"
|
|
13
|
+
"hubspot-test-datasource-company.json",
|
|
14
|
+
"hubspot-test-datasource-contact.json",
|
|
15
|
+
"hubspot-test-datasource-deal.json",
|
|
16
|
+
"hubspot-test-datasource-users.json"
|
|
17
17
|
],
|
|
18
18
|
"autopublish": true,
|
|
19
19
|
"version": "1.0.0"
|
|
20
20
|
},
|
|
21
21
|
"system": {
|
|
22
|
-
"key": "hubspot",
|
|
22
|
+
"key": "hubspot-test",
|
|
23
23
|
"displayName": "HubSpot CRM",
|
|
24
24
|
"description": "HubSpot CRM integration with OpenAPI support for companies, contacts, and deals",
|
|
25
25
|
"type": "openapi",
|
|
@@ -29,11 +29,12 @@
|
|
|
29
29
|
"variables": {
|
|
30
30
|
"baseUrl": "https://api.hubapi.com",
|
|
31
31
|
"tokenUrl": "https://api.hubapi.com/oauth/v1/token",
|
|
32
|
+
"authorizationUrl": "https://app.hubspot.com/oauth/authorize",
|
|
32
33
|
"scope": "crm.objects.companies.read crm.objects.companies.write crm.objects.contacts.read crm.objects.contacts.write crm.objects.deals.read crm.objects.deals.write"
|
|
33
34
|
},
|
|
34
35
|
"security": {
|
|
35
|
-
"clientId": "kv://hubspot/
|
|
36
|
-
"clientSecret": "kv://hubspot/
|
|
36
|
+
"clientId": "kv://hubspot-test/clientId",
|
|
37
|
+
"clientSecret": "kv://hubspot-test/clientSecret"
|
|
37
38
|
}
|
|
38
39
|
},
|
|
39
40
|
"configuration": [
|
|
@@ -85,22 +86,189 @@
|
|
|
85
86
|
"hubspot"
|
|
86
87
|
],
|
|
87
88
|
"dataSources": [
|
|
88
|
-
"hubspot-company",
|
|
89
|
-
"hubspot-contact",
|
|
90
|
-
"hubspot-deal",
|
|
91
|
-
"hubspot-users
|
|
89
|
+
"hubspot-test-company",
|
|
90
|
+
"hubspot-test-contact",
|
|
91
|
+
"hubspot-test-deal",
|
|
92
|
+
"hubspot-test-users"
|
|
93
|
+
],
|
|
94
|
+
"roles": [
|
|
95
|
+
{
|
|
96
|
+
"name": "HubSpot CRM Admin",
|
|
97
|
+
"value": "hubspot-test-admin",
|
|
98
|
+
"description": "Full access to all HubSpot CRM operations",
|
|
99
|
+
"groups": []
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "HubSpot CRM Reader",
|
|
103
|
+
"value": "hubspot-test-reader",
|
|
104
|
+
"description": "Read-only access to all HubSpot CRM data",
|
|
105
|
+
"groups": []
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"permissions": [
|
|
109
|
+
{
|
|
110
|
+
"name": "customer:list",
|
|
111
|
+
"roles": [
|
|
112
|
+
"hubspot-test-reader",
|
|
113
|
+
"hubspot-test-admin"
|
|
114
|
+
],
|
|
115
|
+
"description": "Permission: customer:list"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "customer:get",
|
|
119
|
+
"roles": [
|
|
120
|
+
"hubspot-test-reader",
|
|
121
|
+
"hubspot-test-admin"
|
|
122
|
+
],
|
|
123
|
+
"description": "Permission: customer:get"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "customer:create",
|
|
127
|
+
"roles": [
|
|
128
|
+
"hubspot-test-admin"
|
|
129
|
+
],
|
|
130
|
+
"description": "Permission: customer:create"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "customer:update",
|
|
134
|
+
"roles": [
|
|
135
|
+
"hubspot-test-admin"
|
|
136
|
+
],
|
|
137
|
+
"description": "Permission: customer:update"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "customer:delete",
|
|
141
|
+
"roles": [
|
|
142
|
+
"hubspot-test-admin"
|
|
143
|
+
],
|
|
144
|
+
"description": "Permission: customer:delete"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "contact:list",
|
|
148
|
+
"roles": [
|
|
149
|
+
"hubspot-test-reader",
|
|
150
|
+
"hubspot-test-admin"
|
|
151
|
+
],
|
|
152
|
+
"description": "Permission: contact:list"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "contact:get",
|
|
156
|
+
"roles": [
|
|
157
|
+
"hubspot-test-reader",
|
|
158
|
+
"hubspot-test-admin"
|
|
159
|
+
],
|
|
160
|
+
"description": "Permission: contact:get"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "contact:create",
|
|
164
|
+
"roles": [
|
|
165
|
+
"hubspot-test-admin"
|
|
166
|
+
],
|
|
167
|
+
"description": "Permission: contact:create"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "contact:update",
|
|
171
|
+
"roles": [
|
|
172
|
+
"hubspot-test-admin"
|
|
173
|
+
],
|
|
174
|
+
"description": "Permission: contact:update"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "contact:delete",
|
|
178
|
+
"roles": [
|
|
179
|
+
"hubspot-test-admin"
|
|
180
|
+
],
|
|
181
|
+
"description": "Permission: contact:delete"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "deal:list",
|
|
185
|
+
"roles": [
|
|
186
|
+
"hubspot-test-reader",
|
|
187
|
+
"hubspot-test-admin"
|
|
188
|
+
],
|
|
189
|
+
"description": "Permission: deal:list"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "deal:get",
|
|
193
|
+
"roles": [
|
|
194
|
+
"hubspot-test-reader",
|
|
195
|
+
"hubspot-test-admin"
|
|
196
|
+
],
|
|
197
|
+
"description": "Permission: deal:get"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"name": "deal:create",
|
|
201
|
+
"roles": [
|
|
202
|
+
"hubspot-test-admin"
|
|
203
|
+
],
|
|
204
|
+
"description": "Permission: deal:create"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "deal:update",
|
|
208
|
+
"roles": [
|
|
209
|
+
"hubspot-test-admin"
|
|
210
|
+
],
|
|
211
|
+
"description": "Permission: deal:update"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "deal:delete",
|
|
215
|
+
"roles": [
|
|
216
|
+
"hubspot-test-admin"
|
|
217
|
+
],
|
|
218
|
+
"description": "Permission: deal:delete"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"name": "person:list",
|
|
222
|
+
"roles": [
|
|
223
|
+
"hubspot-test-reader",
|
|
224
|
+
"hubspot-test-admin"
|
|
225
|
+
],
|
|
226
|
+
"description": "Permission: person:list"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "person:get",
|
|
230
|
+
"roles": [
|
|
231
|
+
"hubspot-test-reader",
|
|
232
|
+
"hubspot-test-admin"
|
|
233
|
+
],
|
|
234
|
+
"description": "Permission: person:get"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"name": "person:create",
|
|
238
|
+
"roles": [
|
|
239
|
+
"hubspot-test-admin"
|
|
240
|
+
],
|
|
241
|
+
"description": "Permission: person:create"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "person:update",
|
|
245
|
+
"roles": [
|
|
246
|
+
"hubspot-test-admin"
|
|
247
|
+
],
|
|
248
|
+
"description": "Permission: person:update"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "person:delete",
|
|
252
|
+
"roles": [
|
|
253
|
+
"hubspot-test-admin"
|
|
254
|
+
],
|
|
255
|
+
"description": "Permission: person:delete"
|
|
256
|
+
}
|
|
92
257
|
]
|
|
93
258
|
},
|
|
94
259
|
"dataSources": [
|
|
95
260
|
{
|
|
96
|
-
"key": "hubspot-company",
|
|
261
|
+
"key": "hubspot-test-company",
|
|
97
262
|
"displayName": "HubSpot Company",
|
|
98
263
|
"description": "HubSpot companies datasource with field mappings for CRM company data",
|
|
99
|
-
"systemKey": "hubspot",
|
|
264
|
+
"systemKey": "hubspot-test",
|
|
100
265
|
"entityType": "record-storage",
|
|
101
266
|
"resourceType": "customer",
|
|
102
267
|
"enabled": true,
|
|
103
268
|
"version": "1.0.0",
|
|
269
|
+
"primaryKey": [
|
|
270
|
+
"id"
|
|
271
|
+
],
|
|
104
272
|
"metadataSchema": {
|
|
105
273
|
"type": "object",
|
|
106
274
|
"properties": {
|
|
@@ -634,14 +802,17 @@
|
|
|
634
802
|
}
|
|
635
803
|
},
|
|
636
804
|
{
|
|
637
|
-
"key": "hubspot-contact",
|
|
805
|
+
"key": "hubspot-test-contact",
|
|
638
806
|
"displayName": "HubSpot Contact",
|
|
639
807
|
"description": "HubSpot contacts datasource with field mappings for CRM contact data",
|
|
640
|
-
"systemKey": "hubspot",
|
|
808
|
+
"systemKey": "hubspot-test",
|
|
641
809
|
"entityType": "record-storage",
|
|
642
810
|
"resourceType": "contact",
|
|
643
811
|
"enabled": true,
|
|
644
812
|
"version": "1.0.0",
|
|
813
|
+
"primaryKey": [
|
|
814
|
+
"id"
|
|
815
|
+
],
|
|
645
816
|
"metadataSchema": {
|
|
646
817
|
"type": "object",
|
|
647
818
|
"properties": {
|
|
@@ -1273,14 +1444,17 @@
|
|
|
1273
1444
|
}
|
|
1274
1445
|
},
|
|
1275
1446
|
{
|
|
1276
|
-
"key": "hubspot-deal",
|
|
1447
|
+
"key": "hubspot-test-deal",
|
|
1277
1448
|
"displayName": "HubSpot Deal",
|
|
1278
1449
|
"description": "HubSpot deals datasource with field mappings for CRM deal data",
|
|
1279
|
-
"systemKey": "hubspot",
|
|
1450
|
+
"systemKey": "hubspot-test",
|
|
1280
1451
|
"entityType": "record-storage",
|
|
1281
1452
|
"resourceType": "deal",
|
|
1282
1453
|
"enabled": true,
|
|
1283
1454
|
"version": "1.0.0",
|
|
1455
|
+
"primaryKey": [
|
|
1456
|
+
"id"
|
|
1457
|
+
],
|
|
1284
1458
|
"metadataSchema": {
|
|
1285
1459
|
"type": "object",
|
|
1286
1460
|
"properties": {
|
|
@@ -1861,12 +2035,15 @@
|
|
|
1861
2035
|
}
|
|
1862
2036
|
},
|
|
1863
2037
|
{
|
|
1864
|
-
"key": "hubspot-users
|
|
2038
|
+
"key": "hubspot-test-users",
|
|
1865
2039
|
"displayName": "HubSpot Users",
|
|
1866
2040
|
"resourceType": "person",
|
|
1867
|
-
"systemKey": "hubspot",
|
|
2041
|
+
"systemKey": "hubspot-test",
|
|
1868
2042
|
"enabled": true,
|
|
1869
2043
|
"entityType": "recordStorage",
|
|
2044
|
+
"primaryKey": [
|
|
2045
|
+
"id"
|
|
2046
|
+
],
|
|
1870
2047
|
"description": "Comprehensive HubSpot users datasource with full CRUD operations, comprehensive metadata schema, ABAC dimensions, and OpenAPI support",
|
|
1871
2048
|
"metadataSchema": {
|
|
1872
2049
|
"type": "object",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"key": "hubspot",
|
|
2
|
+
"key": "hubspot-test",
|
|
3
3
|
"displayName": "HubSpot CRM",
|
|
4
4
|
"description": "HubSpot CRM integration with OpenAPI support for companies, contacts, and deals",
|
|
5
5
|
"type": "openapi",
|
|
@@ -9,11 +9,12 @@
|
|
|
9
9
|
"variables": {
|
|
10
10
|
"baseUrl": "https://api.hubapi.com",
|
|
11
11
|
"tokenUrl": "https://api.hubapi.com/oauth/v1/token",
|
|
12
|
+
"authorizationUrl": "https://app.hubspot.com/oauth/authorize",
|
|
12
13
|
"scope": "crm.objects.companies.read crm.objects.companies.write crm.objects.contacts.read crm.objects.contacts.write crm.objects.deals.read crm.objects.deals.write"
|
|
13
14
|
},
|
|
14
15
|
"security": {
|
|
15
|
-
"clientId": "kv://hubspot/
|
|
16
|
-
"clientSecret": "kv://hubspot/
|
|
16
|
+
"clientId": "kv://hubspot-test/clientId",
|
|
17
|
+
"clientSecret": "kv://hubspot-test/clientSecret"
|
|
17
18
|
}
|
|
18
19
|
},
|
|
19
20
|
"configuration": [
|
|
@@ -65,9 +66,9 @@
|
|
|
65
66
|
"hubspot"
|
|
66
67
|
],
|
|
67
68
|
"dataSources": [
|
|
68
|
-
"hubspot-company",
|
|
69
|
-
"hubspot-contact",
|
|
70
|
-
"hubspot-deal",
|
|
71
|
-
"hubspot-users
|
|
69
|
+
"hubspot-test-company",
|
|
70
|
+
"hubspot-test-contact",
|
|
71
|
+
"hubspot-test-deal",
|
|
72
|
+
"hubspot-test-users"
|
|
72
73
|
]
|
|
73
74
|
}
|