@aifabrix/builder 2.52.0 → 2.53.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/lib/api/datasources-extended.api.js +8 -8
- package/lib/api/keycloak.api.js +92 -0
- package/lib/api/token-providers.api.js +77 -0
- package/lib/api/types/keycloak.types.js +23 -0
- package/lib/api/types/token-providers.types.js +65 -0
- package/lib/app/deploy-config.js +3 -2
- package/lib/app/down.js +16 -1
- package/lib/channels/add-channel.js +134 -57
- package/lib/channels/approval-guides/chatgpt.js +1 -1
- package/lib/channels/approval-guides/index.js +3 -0
- package/lib/channels/approval-guides/microsoft-copilot.js +27 -14
- package/lib/channels/channel-add-ensure.js +128 -0
- package/lib/channels/channel-add-existing.js +72 -0
- package/lib/channels/channel-artifact-generator.js +11 -1
- package/lib/channels/channel-branding.js +94 -0
- package/lib/channels/channel-credential.js +8 -0
- package/lib/channels/channel-discovery.js +330 -0
- package/lib/channels/channel-external-system.js +1 -1
- package/lib/channels/channel-runtime-resolver.js +107 -14
- package/lib/channels/channel-status-display.js +36 -3
- package/lib/channels/microsoft-copilot-channel-add.js +138 -0
- package/lib/channels/microsoft-copilot-entra-sso-form.js +251 -0
- package/lib/channels/microsoft-copilot-entra-sso.js +285 -0
- package/lib/channels/microsoft-copilot-icons.js +74 -0
- package/lib/channels/microsoft-copilot-limits.js +103 -0
- package/lib/channels/microsoft-copilot-package.js +178 -52
- package/lib/channels/microsoft-copilot-validate.js +227 -0
- package/lib/cli/attach-default-help-examples.js +102 -0
- package/lib/cli/index.js +4 -0
- package/lib/cli/infra-guided.js +13 -6
- package/lib/cli/setup-credential-deployment.js +7 -5
- package/lib/cli/setup-infra.js +31 -4
- package/lib/cli/setup-utility-validate.js +1 -0
- package/lib/commands/channel-add-setup.js +28 -9
- package/lib/commands/channel.js +14 -10
- package/lib/commands/credential-push.js +37 -5
- package/lib/commands/integration-definition.js +158 -0
- package/lib/commands/package-score.js +72 -0
- package/lib/commands/repair-auth-apply.js +19 -5
- package/lib/commands/repair-datasource-sync-operations.js +4 -1
- package/lib/commands/role-assistant-test-output.js +200 -0
- package/lib/commands/role-assistant.js +163 -166
- package/lib/datasource/capability/capability-resolve.js +15 -5
- package/lib/datasource/capability/copy-operations.js +14 -4
- package/lib/deployment/deployer-poll-run.js +2 -2
- package/lib/deployment/deployer.js +1 -1
- package/lib/deployment/environment.js +2 -2
- package/lib/external-system/deploy.js +11 -21
- package/lib/infrastructure/index.js +19 -4
- package/lib/integration-definition/apply.js +476 -0
- package/lib/integration-definition/canonical-json.js +51 -0
- package/lib/integration-definition/emit-suite-bid.js +94 -0
- package/lib/integration-definition/enrich-crm-field-mappings.js +240 -0
- package/lib/integration-definition/enrich-openapi-operations.js +433 -0
- package/lib/integration-definition/from-discovery.js +339 -0
- package/lib/integration-definition/hash.js +37 -0
- package/lib/integration-definition/index.js +37 -0
- package/lib/integration-definition/resource-type-catalog.js +59 -0
- package/lib/integration-definition/system-kind-enum.js +40 -0
- package/lib/integration-definition/validate.js +148 -0
- package/lib/lab/package-parity-score.js +417 -0
- package/lib/programmatic/builder-api-request.js +5 -1
- package/lib/programmatic/builder-help-governance.js +3 -2
- package/lib/programmatic/capability-registry.js +20 -0
- package/lib/programmatic/help-content/channel-onboarding.md +35 -0
- package/lib/programmatic/help-content/cip-overview.md +27 -0
- package/lib/programmatic/help-content/connected-system-ui.md +70 -0
- package/lib/programmatic/help-content/dimensions-guide.md +23 -0
- package/lib/programmatic/help-content/enterprise-sync-fabrix.md +123 -0
- package/lib/programmatic/help-content/overview.md +25 -0
- package/lib/programmatic/help-content/subscription-guide.md +27 -0
- package/lib/programmatic/help-content/workflow.md +50 -0
- package/lib/programmatic/openapi-component-schemas.js +7 -1
- package/lib/programmatic/openapi-descriptions.js +46 -0
- package/lib/programmatic/openapi-envelope-examples.js +280 -0
- package/lib/programmatic/openapi-operation-bindings.js +50 -0
- package/lib/programmatic/openapi-request-schemas.js +40 -0
- package/lib/programmatic/openapi-result-schemas-overflow.js +101 -0
- package/lib/programmatic/openapi-result-schemas.js +76 -99
- package/lib/programmatic/openapi-schema-descriptions-core.js +25 -4
- package/lib/programmatic/openapi-schema-descriptions-help.js +1 -1
- package/lib/programmatic/openapi-schema-descriptions-operations.js +43 -0
- package/lib/programmatic/openapi-schema-helpers.js +9 -9
- package/lib/programmatic/openapi-spec.js +11 -1
- package/lib/programmatic/orchestration-openapi-meta.js +10 -0
- package/lib/programmatic/persist-supplied-openapi.js +180 -0
- package/lib/programmatic/route-handler-map.js +35 -1
- package/lib/programmatic/run-channel-package.js +236 -0
- package/lib/programmatic/run-integration-definition.js +77 -0
- package/lib/role-assistant/evidence-sync.js +55 -7
- package/lib/role-assistant/knowledge-sync-logging.js +58 -0
- package/lib/role-assistant/knowledge-sync.js +88 -93
- package/lib/role-assistant/test-cases-bid.js +155 -0
- package/lib/role-assistant/test-cases-evaluate.js +9 -1
- package/lib/role-assistant/test-cases-honesty.js +24 -10
- package/lib/role-assistant/test-cases.js +28 -0
- package/lib/role-assistant/test-runner-attachments.js +118 -0
- package/lib/role-assistant/test-runner-bid-apply.js +201 -0
- package/lib/role-assistant/test-runner-bid-document.js +278 -0
- package/lib/role-assistant/test-runner-start-payload.js +96 -0
- package/lib/role-assistant/test-runner-workhub-answers.js +249 -20
- package/lib/role-assistant/test-runner-workhub-helpers.js +100 -0
- package/lib/role-assistant/test-runner-workhub-soft.js +86 -0
- package/lib/role-assistant/test-runner-workhub.js +152 -107
- package/lib/role-assistant/test-runner.js +5 -63
- package/lib/role-assistant/test-suite.js +112 -0
- package/lib/schema/application-schema.json +56 -6
- package/lib/schema/external-datasource.schema.json +103 -17
- package/lib/schema/external-system.schema.json +54 -3
- package/lib/schema/integration-definition.schema.json +195 -0
- package/lib/utils/authentication-shape.js +6 -0
- package/lib/utils/compose-generator.js +10 -1
- package/lib/utils/compose-traefik-extra-routes.js +107 -0
- package/lib/utils/docker-build.js +2 -2
- package/lib/utils/help-builder.js +3 -1
- package/lib/utils/promote-dev-docker-image.js +102 -18
- package/lib/utils/transient-developer-id.js +28 -0
- package/package.json +14 -16
- package/templates/README.md +12 -1
- package/templates/applications/dataplane/application.yaml +10 -2
- package/templates/applications/dataplane/env.template +7 -6
- package/templates/applications/miso-controller/application.yaml +23 -8
- package/templates/applications/miso-controller/env.template +8 -2
- package/templates/applications/miso-controller/rbac.yaml +1 -0
- package/templates/channels/README.md +11 -1
- package/templates/channels/brand/color-192.png +0 -0
- package/templates/channels/brand/dark/128.png +0 -0
- package/templates/channels/brand/dark/192.png +0 -0
- package/templates/channels/brand/dark/256.png +0 -0
- package/templates/channels/brand/dark/32.png +0 -0
- package/templates/channels/brand/dark/512.png +0 -0
- package/templates/channels/brand/dark/64.png +0 -0
- package/templates/channels/brand/light/128.png +0 -0
- package/templates/channels/brand/light/192.png +0 -0
- package/templates/channels/brand/light/256.png +0 -0
- package/templates/channels/brand/light/32.png +0 -0
- package/templates/channels/brand/light/512.png +0 -0
- package/templates/channels/brand/light/64.png +0 -0
- package/templates/channels/brand/mono-white/128.png +0 -0
- package/templates/channels/brand/mono-white/192.png +0 -0
- package/templates/channels/brand/mono-white/256.png +0 -0
- package/templates/channels/brand/mono-white/32.png +0 -0
- package/templates/channels/brand/mono-white/512.png +0 -0
- package/templates/channels/brand/mono-white/64.png +0 -0
- package/templates/channels/brand/outline-32.png +0 -0
- package/templates/channels/chatgpt/install.template.md.hbs +6 -4
- package/templates/channels/chatgpt/integration/README.md +4 -5
- package/templates/channels/chatgpt/integration/chatgpt-system.json +1 -16
- package/templates/channels/microsoft-copilot/ai-plugin.template.json.hbs +14 -16
- package/templates/channels/microsoft-copilot/declarative-agent.template.json.hbs +5 -3
- package/templates/channels/microsoft-copilot/entra-sso-registration.template.md.hbs +30 -0
- package/templates/channels/microsoft-copilot/fi-fi.template.json.hbs +7 -0
- package/templates/channels/microsoft-copilot/install.template.md.hbs +93 -22
- package/templates/channels/microsoft-copilot/integration/README.md +2 -3
- package/templates/channels/microsoft-copilot/integration/microsoft-copilot-system.json +1 -22
- package/templates/channels/microsoft-copilot/manifest.template.json.hbs +34 -19
- package/templates/channels/microsoft-copilot/oauth-plugin-vault-required.template.md.hbs +15 -0
- package/templates/channels/slack/integration/README.md +2 -4
- package/templates/channels/teams-bot/install.template.md.hbs +4 -0
- package/templates/channels/teams-bot/integration/README.md +3 -5
- package/templates/channels/web-embed/integration/web-embed-system.json +1 -16
- package/templates/python/docker-compose.hbs +36 -0
- package/templates/typescript/docker-compose.hbs +36 -0
- package/.cursor/plans/Done/157.1-security-quality-violations-by-type.csv +0 -374
- package/.cursor/process/README.md +0 -9
- package/.cursor/rules/anchor-docs.mdc +0 -15
- package/.cursor/rules/assistant-driven-integration-build.mdc +0 -40
- package/.cursor/rules/cli-layout.mdc +0 -81
- package/.cursor/rules/cli-product-neutral.mdc +0 -43
- package/.cursor/rules/deploy-rules/docker-image-ip-policy.mdc +0 -49
- package/.cursor/rules/docs-rules.mdc +0 -32
- package/.cursor/rules/plan-rules/application-lifecycle.mdc +0 -30
- package/.cursor/rules/plan-rules/plan-frontmatter.mdc +0 -35
- package/.cursor/rules/plan-rules/plan-lifecycle.mdc +0 -31
- package/.cursor/rules/plan-rules/plan-validation-gate.mdc +0 -34
- package/.cursor/rules/project-rules.mdc +0 -913
- package/.cursor/skills/README.md +0 -15
- package/.dockerignore +0 -52
- package/.eslintignore +0 -22
- package/.markdownlint.json +0 -14
- package/anchor-docs/README.md +0 -10
- package/anchor-docs/_TEMPLATE +0 -24
- package/babel.config.js +0 -6
- package/bin/builder-api-cleanup.js +0 -26
- package/bin/builder-api-nest.js +0 -10
- package/bin/builder-api-spike.js +0 -19
- package/enterprise-knowledge/README.md +0 -50
- package/enterprise-knowledge/enterprise-integration-lifecycle/README.md +0 -22
- package/enterprise-knowledge/enterprise-integration-lifecycle/application.json +0 -15
- package/enterprise-knowledge/enterprise-integration-lifecycle/deploy.js +0 -69
- package/enterprise-knowledge/enterprise-integration-lifecycle/enterprise-integration-lifecycle-deploy.json +0 -52
- package/enterprise-knowledge/enterprise-integration-lifecycle/enterprise-integration-lifecycle-system.json +0 -29
- package/enterprise-knowledge/enterprise-integration-lifecycle/env.template +0 -2
- package/integration/README.md +0 -81
- package/integration/github/README.md +0 -53
- package/integration/github/application.json +0 -21
- package/integration/github/deploy.js +0 -72
- package/integration/github/env.template +0 -11
- package/integration/github/github-datasource-issue-comments.json +0 -239
- package/integration/github/github-datasource-issues.json +0 -399
- package/integration/github/github-datasource-repository.json +0 -354
- package/integration/github/github-deploy.json +0 -1202
- package/integration/github/github-system.json +0 -82
- package/integration/hubspot-test/README.md +0 -159
- package/integration/hubspot-test/application.json +0 -54
- package/integration/hubspot-test/companies.json +0 -2048
- package/integration/hubspot-test/create-hubspot.js +0 -523
- package/integration/hubspot-test/env.template +0 -4
- package/integration/hubspot-test/hubspot-test-datasource-company.json +0 -138
- package/integration/hubspot-test/hubspot-test-datasource-contact.json +0 -146
- package/integration/hubspot-test/hubspot-test-datasource-deal.json +0 -146
- package/integration/hubspot-test/hubspot-test-datasource-users.json +0 -76
- package/integration/hubspot-test/hubspot-test-deploy.json +0 -2160
- package/integration/hubspot-test/hubspot-test-system.json +0 -74
- package/integration/hubspot-test/rbac.json +0 -166
- package/integration/hubspot-test/test-artifacts/wizard-hubspot-credential-real.yaml +0 -20
- package/integration/hubspot-test/test-artifacts/wizard-hubspot-env-vars.yaml +0 -9
- package/integration/hubspot-test/test-artifacts/wizard-invalid-add-datasource.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-invalid-app-name.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-invalid-credential-create.yaml +0 -7
- package/integration/hubspot-test/test-artifacts/wizard-invalid-credential-select.yaml +0 -7
- package/integration/hubspot-test/test-artifacts/wizard-invalid-known-platform.yaml +0 -4
- package/integration/hubspot-test/test-artifacts/wizard-invalid-missing-app.yaml +0 -4
- package/integration/hubspot-test/test-artifacts/wizard-invalid-missing-source.yaml +0 -2
- package/integration/hubspot-test/test-artifacts/wizard-invalid-mode.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-invalid-openapi-file.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-invalid-openapi-url.yaml +0 -4
- package/integration/hubspot-test/test-artifacts/wizard-invalid-source.yaml +0 -4
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-array-test.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-key-test.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-path-test.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-test.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-rbac-test.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-rbac-yaml-test.yaml +0 -5
- package/integration/hubspot-test/test-dataplane-down-helpers.js +0 -249
- package/integration/hubspot-test/test-dataplane-down-tests.js +0 -386
- package/integration/hubspot-test/test-dataplane-down.js +0 -209
- package/integration/hubspot-test/test.js +0 -1588
- package/integration/hubspot-test/wizard-hubspot-e2e.yaml +0 -16
- package/integration/hubspot-test/wizard-hubspot-platform.yaml +0 -8
- package/integration/hubspot-test/wizard-hubspot-test-headless.yaml +0 -23
- package/integration/roundtrip-test-local/README.md +0 -143
- package/integration/roundtrip-test-local/application.yaml +0 -13
- package/integration/roundtrip-test-local/env.template +0 -15
- package/integration/roundtrip-test-local/roundtrip-test-local-datasource-roundtrip-test-company.yaml +0 -14
- package/integration/roundtrip-test-local/roundtrip-test-local-deploy.json +0 -61
- package/integration/roundtrip-test-local/roundtrip-test-local-system.yaml +0 -25
- package/integration/roundtrip-test-local2/README.md +0 -143
- package/integration/roundtrip-test-local2/application.yaml +0 -13
- package/integration/roundtrip-test-local2/env.template +0 -15
- package/integration/roundtrip-test-local2/roundtrip-test-local2-datasource-company.yaml +0 -31
- package/integration/roundtrip-test-local2/roundtrip-test-local2-deploy.json +0 -86
- package/integration/roundtrip-test-local2/roundtrip-test-local2-system.yaml +0 -25
- package/integration/test/wizard.yaml +0 -8
- package/jest.config.coverage.js +0 -37
- package/jest.config.default.js +0 -11
- package/jest.config.integration.fixtures.js +0 -22
- package/jest.config.integration.js +0 -33
- package/jest.config.isolated.js +0 -11
- package/jest.config.manual.js +0 -30
- package/jest.global-live-fabrix-hooks.js +0 -36
- package/jest.isolated-projects.js +0 -260
- package/jest.projects.js +0 -76
- package/packages/builder-api/README.md +0 -120
- package/packages/builder-api/package.json +0 -30
- package/packages/builder-api/src/app.module.ts +0 -7
- package/packages/builder-api/src/auth/auth.module.ts +0 -5
- package/packages/builder-api/src/external-system/external-system.module.ts +0 -5
- package/packages/builder-api/src/main.ts +0 -16
- package/packages/builder-api/tsconfig.json +0 -15
- package/scripts/check-builder-api-architecture-grep.js +0 -79
- package/scripts/check-datasource-test-run-schema-sync.js +0 -34
- package/scripts/ci-fix.sh +0 -19
- package/scripts/ci-simulate.sh +0 -19
- package/scripts/diagnose-cli.js +0 -150
- package/scripts/docker_image_content_gate.js +0 -47
- package/scripts/docker_image_content_gate.sh +0 -5
- package/scripts/export-builder-api-evidence.js +0 -262
- package/scripts/install-local.js +0 -490
- package/scripts/lib/builder-api-docker-staging-copy.js +0 -60
- package/scripts/lib/builder-api-docker-staging-core.js +0 -183
- package/scripts/lib/docker-image-content-gate-core.js +0 -166
- package/scripts/lib/plan-actor.js +0 -109
- package/scripts/lib/plan-config.js +0 -20
- package/scripts/lib/plan-gates.js +0 -154
- package/scripts/lib/plan-meta.js +0 -104
- package/scripts/lib/plan-parse.js +0 -162
- package/scripts/lib/plan-prevalidate-gates.js +0 -337
- package/scripts/lib/plan-run-core.js +0 -125
- package/scripts/lib/plan-run-report.js +0 -119
- package/scripts/plan-approve.js +0 -24
- package/scripts/plan-archive.js +0 -49
- package/scripts/plan-run.js +0 -13
- package/scripts/plan-set-actor.js +0 -21
- package/scripts/plan-validate.js +0 -80
- package/scripts/pnpm/af.mjs +0 -110
- package/scripts/pnpm/check-quiet.mjs +0 -32
- package/scripts/pnpm/dev-install.mjs +0 -29
- package/scripts/pnpm/dev-reload.mjs +0 -18
- package/scripts/pnpm/help.mjs +0 -55
- package/scripts/pnpm/lib/dev-reload-core.mjs +0 -189
- package/scripts/pnpm/lib/dev-reload-log-capture.mjs +0 -67
- package/scripts/pnpm/lib/dev-reload-log-utils.mjs +0 -32
- package/scripts/pnpm/lib/resolve-aifabrix-bin.mjs +0 -124
- package/scripts/pnpm/lib/resolve-app-url.mjs +0 -183
- package/scripts/pnpm/lib/spinner.mjs +0 -42
- package/scripts/pnpm-global-remove.js +0 -48
- package/scripts/stage_builder_api_for_docker.js +0 -65
- package/scripts/sync-builder-api-template.js +0 -44
- package/scripts/test-dataplane-bootstrap.js +0 -331
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"key": "hubspot-test",
|
|
3
|
-
"displayName": "HubSpot CRM",
|
|
4
|
-
"description": "HubSpot CRM integration with OpenAPI support for companies, contacts, and deals",
|
|
5
|
-
"type": "openapi",
|
|
6
|
-
"enabled": true,
|
|
7
|
-
"authentication": {
|
|
8
|
-
"method": "oauth2",
|
|
9
|
-
"variables": {
|
|
10
|
-
"baseUrl": "https://api.hubapi.com",
|
|
11
|
-
"tokenUrl": "https://api.hubapi.com/oauth/v1/token",
|
|
12
|
-
"authorizationUrl": "https://app.hubspot.com/oauth/authorize",
|
|
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"
|
|
14
|
-
},
|
|
15
|
-
"security": {
|
|
16
|
-
"clientId": "kv://hubspot-test/clientId",
|
|
17
|
-
"clientSecret": "kv://hubspot-test/clientSecret"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"configuration": [
|
|
21
|
-
{
|
|
22
|
-
"name": "HUBSPOT_API_VERSION",
|
|
23
|
-
"value": "v3",
|
|
24
|
-
"location": "variable",
|
|
25
|
-
"required": false,
|
|
26
|
-
"portalInput": {
|
|
27
|
-
"field": "select",
|
|
28
|
-
"label": "HubSpot API Version",
|
|
29
|
-
"placeholder": "Select API version",
|
|
30
|
-
"options": [
|
|
31
|
-
"v1",
|
|
32
|
-
"v2",
|
|
33
|
-
"v3"
|
|
34
|
-
],
|
|
35
|
-
"validation": {
|
|
36
|
-
"required": false
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"name": "MAX_PAGE_SIZE",
|
|
42
|
-
"value": "100",
|
|
43
|
-
"location": "variable",
|
|
44
|
-
"required": false,
|
|
45
|
-
"portalInput": {
|
|
46
|
-
"field": "text",
|
|
47
|
-
"label": "Maximum Page Size",
|
|
48
|
-
"placeholder": "100",
|
|
49
|
-
"validation": {
|
|
50
|
-
"required": false,
|
|
51
|
-
"pattern": "^[0-9]+$",
|
|
52
|
-
"minLength": 1,
|
|
53
|
-
"maxLength": 1000
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
"openapi": {
|
|
59
|
-
"documentKey": "hubspot-v3",
|
|
60
|
-
"autoDiscoverEntities": false
|
|
61
|
-
},
|
|
62
|
-
"tags": [
|
|
63
|
-
"crm",
|
|
64
|
-
"sales",
|
|
65
|
-
"marketing",
|
|
66
|
-
"hubspot"
|
|
67
|
-
],
|
|
68
|
-
"dataSources": [
|
|
69
|
-
"hubspot-test-company",
|
|
70
|
-
"hubspot-test-contact",
|
|
71
|
-
"hubspot-test-deal",
|
|
72
|
-
"hubspot-test-users"
|
|
73
|
-
]
|
|
74
|
-
}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"roles": [
|
|
3
|
-
{
|
|
4
|
-
"name": "HubSpot CRM Admin",
|
|
5
|
-
"value": "hubspot-test-admin",
|
|
6
|
-
"description": "Full access to all HubSpot CRM operations",
|
|
7
|
-
"groups": []
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"name": "HubSpot CRM Reader",
|
|
11
|
-
"value": "hubspot-test-reader",
|
|
12
|
-
"description": "Read-only access to all HubSpot CRM data",
|
|
13
|
-
"groups": []
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"permissions": [
|
|
17
|
-
{
|
|
18
|
-
"name": "customer:list",
|
|
19
|
-
"roles": [
|
|
20
|
-
"hubspot-test-reader",
|
|
21
|
-
"hubspot-test-admin"
|
|
22
|
-
],
|
|
23
|
-
"description": "Permission: customer:list"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"name": "customer:get",
|
|
27
|
-
"roles": [
|
|
28
|
-
"hubspot-test-reader",
|
|
29
|
-
"hubspot-test-admin"
|
|
30
|
-
],
|
|
31
|
-
"description": "Permission: customer:get"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"name": "customer:create",
|
|
35
|
-
"roles": [
|
|
36
|
-
"hubspot-test-admin"
|
|
37
|
-
],
|
|
38
|
-
"description": "Permission: customer:create"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"name": "customer:update",
|
|
42
|
-
"roles": [
|
|
43
|
-
"hubspot-test-admin"
|
|
44
|
-
],
|
|
45
|
-
"description": "Permission: customer:update"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"name": "customer:delete",
|
|
49
|
-
"roles": [
|
|
50
|
-
"hubspot-test-admin"
|
|
51
|
-
],
|
|
52
|
-
"description": "Permission: customer:delete"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"name": "contact:list",
|
|
56
|
-
"roles": [
|
|
57
|
-
"hubspot-test-reader",
|
|
58
|
-
"hubspot-test-admin"
|
|
59
|
-
],
|
|
60
|
-
"description": "Permission: contact:list"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"name": "contact:get",
|
|
64
|
-
"roles": [
|
|
65
|
-
"hubspot-test-reader",
|
|
66
|
-
"hubspot-test-admin"
|
|
67
|
-
],
|
|
68
|
-
"description": "Permission: contact:get"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "contact:create",
|
|
72
|
-
"roles": [
|
|
73
|
-
"hubspot-test-admin"
|
|
74
|
-
],
|
|
75
|
-
"description": "Permission: contact:create"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "contact:update",
|
|
79
|
-
"roles": [
|
|
80
|
-
"hubspot-test-admin"
|
|
81
|
-
],
|
|
82
|
-
"description": "Permission: contact:update"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"name": "contact:delete",
|
|
86
|
-
"roles": [
|
|
87
|
-
"hubspot-test-admin"
|
|
88
|
-
],
|
|
89
|
-
"description": "Permission: contact:delete"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"name": "deal:list",
|
|
93
|
-
"roles": [
|
|
94
|
-
"hubspot-test-reader",
|
|
95
|
-
"hubspot-test-admin"
|
|
96
|
-
],
|
|
97
|
-
"description": "Permission: deal:list"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"name": "deal:get",
|
|
101
|
-
"roles": [
|
|
102
|
-
"hubspot-test-reader",
|
|
103
|
-
"hubspot-test-admin"
|
|
104
|
-
],
|
|
105
|
-
"description": "Permission: deal:get"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"name": "deal:create",
|
|
109
|
-
"roles": [
|
|
110
|
-
"hubspot-test-admin"
|
|
111
|
-
],
|
|
112
|
-
"description": "Permission: deal:create"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"name": "deal:update",
|
|
116
|
-
"roles": [
|
|
117
|
-
"hubspot-test-admin"
|
|
118
|
-
],
|
|
119
|
-
"description": "Permission: deal:update"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"name": "deal:delete",
|
|
123
|
-
"roles": [
|
|
124
|
-
"hubspot-test-admin"
|
|
125
|
-
],
|
|
126
|
-
"description": "Permission: deal:delete"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"name": "person:list",
|
|
130
|
-
"roles": [
|
|
131
|
-
"hubspot-test-reader",
|
|
132
|
-
"hubspot-test-admin"
|
|
133
|
-
],
|
|
134
|
-
"description": "Permission: person:list"
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
"name": "person:get",
|
|
138
|
-
"roles": [
|
|
139
|
-
"hubspot-test-reader",
|
|
140
|
-
"hubspot-test-admin"
|
|
141
|
-
],
|
|
142
|
-
"description": "Permission: person:get"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"name": "person:create",
|
|
146
|
-
"roles": [
|
|
147
|
-
"hubspot-test-admin"
|
|
148
|
-
],
|
|
149
|
-
"description": "Permission: person:create"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"name": "person:update",
|
|
153
|
-
"roles": [
|
|
154
|
-
"hubspot-test-admin"
|
|
155
|
-
],
|
|
156
|
-
"description": "Permission: person:update"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"name": "person:delete",
|
|
160
|
-
"roles": [
|
|
161
|
-
"hubspot-test-admin"
|
|
162
|
-
],
|
|
163
|
-
"description": "Permission: person:delete"
|
|
164
|
-
}
|
|
165
|
-
]
|
|
166
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
appName: wizard-e2e-credential-real
|
|
2
|
-
mode: create-system
|
|
3
|
-
source:
|
|
4
|
-
type: openapi-file
|
|
5
|
-
filePath: /workspace/aifabrix-builder/integration/hubspot-test/companies.json
|
|
6
|
-
credential:
|
|
7
|
-
action: create
|
|
8
|
-
config:
|
|
9
|
-
key: wizard-e2e-cred-real
|
|
10
|
-
displayName: HubSpot Test Credential (Real)
|
|
11
|
-
type: OAUTH2
|
|
12
|
-
config:
|
|
13
|
-
tokenUrl: ${HUBSPOT_TOKEN_URL}
|
|
14
|
-
clientId: ${HUBSPOT_CLIENT_ID}
|
|
15
|
-
clientSecret: ${HUBSPOT_CLIENT_SECRET}
|
|
16
|
-
scopes:
|
|
17
|
-
- crm.objects.companies.read
|
|
18
|
-
- crm.objects.companies.write
|
|
19
|
-
- crm.objects.contacts.read
|
|
20
|
-
- crm.objects.contacts.write
|
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test Helper Utilities for Dataplane Down Tests
|
|
3
|
-
*
|
|
4
|
-
* Common utilities for dataplane down test suite.
|
|
5
|
-
*
|
|
6
|
-
* @fileoverview Helper utilities for dataplane down tests
|
|
7
|
-
* @author AI Fabrix Team
|
|
8
|
-
* @version 2.0.0
|
|
9
|
-
*/
|
|
10
|
-
'use strict';
|
|
11
|
-
|
|
12
|
-
const { execFile } = require('child_process');
|
|
13
|
-
const { promisify } = require('util');
|
|
14
|
-
const chalk = require('chalk');
|
|
15
|
-
|
|
16
|
-
const execFileAsync = promisify(execFile);
|
|
17
|
-
|
|
18
|
-
const MAX_OUTPUT_BYTES = 10 * 1024 * 1024;
|
|
19
|
-
const COMMAND_TIMEOUT_MS = 15 * 1000; // 15 seconds - shorter timeout to catch hanging commands
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Logs info message
|
|
23
|
-
* @function logInfo
|
|
24
|
-
* @param {string} message - Message to log
|
|
25
|
-
* @returns {void}
|
|
26
|
-
*/
|
|
27
|
-
function logInfo(message) {
|
|
28
|
-
// eslint-disable-next-line no-console
|
|
29
|
-
console.log(chalk.cyan(message));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Logs success message
|
|
34
|
-
* @function logSuccess
|
|
35
|
-
* @param {string} message - Message to log
|
|
36
|
-
* @returns {void}
|
|
37
|
-
*/
|
|
38
|
-
function logSuccess(message) {
|
|
39
|
-
// eslint-disable-next-line no-console
|
|
40
|
-
console.log(chalk.green(message));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Logs error message
|
|
45
|
-
* @function logError
|
|
46
|
-
* @param {string} message - Message to log
|
|
47
|
-
* @returns {void}
|
|
48
|
-
*/
|
|
49
|
-
function logError(message) {
|
|
50
|
-
// eslint-disable-next-line no-console
|
|
51
|
-
console.error(chalk.red(message));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Logs warning message
|
|
56
|
-
* @function logWarn
|
|
57
|
-
* @param {string} message - Message to log
|
|
58
|
-
* @returns {void}
|
|
59
|
-
*/
|
|
60
|
-
function logWarn(message) {
|
|
61
|
-
// eslint-disable-next-line no-console
|
|
62
|
-
console.warn(chalk.yellow(message));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Runs a command
|
|
67
|
-
* @async
|
|
68
|
-
* @function runCommand
|
|
69
|
-
* @param {string} command - Command to run
|
|
70
|
-
* @param {string[]} args - Command arguments
|
|
71
|
-
* @returns {Promise<Object>} Command result object with success, stdout, stderr
|
|
72
|
-
*/
|
|
73
|
-
async function runCommand(command, args) {
|
|
74
|
-
try {
|
|
75
|
-
const result = await execFileAsync(command, args, {
|
|
76
|
-
cwd: process.cwd(),
|
|
77
|
-
env: { ...process.env },
|
|
78
|
-
maxBuffer: MAX_OUTPUT_BYTES,
|
|
79
|
-
timeout: COMMAND_TIMEOUT_MS
|
|
80
|
-
});
|
|
81
|
-
return { success: true, stdout: result.stdout || '', stderr: result.stderr || '', error: null };
|
|
82
|
-
} catch (error) {
|
|
83
|
-
const stdout = error.stdout || '';
|
|
84
|
-
const stderr = error.stderr || '';
|
|
85
|
-
// Check if it's a timeout error
|
|
86
|
-
const isTimeout = error.code === 'ETIMEDOUT' ||
|
|
87
|
-
(error.message && error.message.includes('timeout'));
|
|
88
|
-
return { success: false, stdout, stderr, error, isTimeout };
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Validates error message contains expected patterns
|
|
94
|
-
* @function validateError
|
|
95
|
-
* @param {string} output - Combined stdout and stderr
|
|
96
|
-
* @param {string[]} expectedPatterns - Array of expected error patterns
|
|
97
|
-
* @returns {boolean} True if error matches expected patterns
|
|
98
|
-
*/
|
|
99
|
-
function validateError(output, expectedPatterns) {
|
|
100
|
-
const lowerOutput = output.toLowerCase();
|
|
101
|
-
return expectedPatterns.some(pattern => lowerOutput.includes(pattern.toLowerCase()));
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Checks if result indicates a timeout
|
|
106
|
-
* @function isTimeoutResult
|
|
107
|
-
* @param {Object} result - Command result
|
|
108
|
-
* @returns {boolean} True if timeout detected
|
|
109
|
-
*/
|
|
110
|
-
function isTimeoutResult(result) {
|
|
111
|
-
return result.isTimeout || (result.error && (
|
|
112
|
-
result.error.code === 'ETIMEDOUT' ||
|
|
113
|
-
(result.error.message && result.error.message.includes('timeout'))
|
|
114
|
-
));
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Checks if output contains error indicators
|
|
119
|
-
* @function hasErrorIndicators
|
|
120
|
-
* @param {string} output - Combined output
|
|
121
|
-
* @param {string[]} expectedPatterns - Expected error patterns
|
|
122
|
-
* @param {Object} result - Command result
|
|
123
|
-
* @returns {boolean} True if error indicators found
|
|
124
|
-
*/
|
|
125
|
-
function hasErrorIndicators(output, expectedPatterns, result) {
|
|
126
|
-
return validateError(output, expectedPatterns) ||
|
|
127
|
-
output.includes('Failed') ||
|
|
128
|
-
output.includes('Error') ||
|
|
129
|
-
output.includes('not found') ||
|
|
130
|
-
output.includes('External system') ||
|
|
131
|
-
output.includes('external system') ||
|
|
132
|
-
output.includes('timeout') ||
|
|
133
|
-
output.includes('ECONNREFUSED') ||
|
|
134
|
-
output.includes('ENOTFOUND') ||
|
|
135
|
-
output.includes('Command failed') ||
|
|
136
|
-
(result.error && result.error.message) ||
|
|
137
|
-
result.stderr.length > 0;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Validates download/delete command result
|
|
142
|
-
* @function validateDownloadDeleteResult
|
|
143
|
-
* @param {Object} result - Command result
|
|
144
|
-
* @param {string} output - Combined output
|
|
145
|
-
* @param {string[]} expectedPatterns - Expected error patterns
|
|
146
|
-
* @returns {Object} Validation result
|
|
147
|
-
*/
|
|
148
|
-
function validateDownloadDeleteResult(result, output, expectedPatterns) {
|
|
149
|
-
const timeout = isTimeoutResult(result);
|
|
150
|
-
const isValid = (!result.success || timeout) && (
|
|
151
|
-
timeout ||
|
|
152
|
-
validateError(output, expectedPatterns) ||
|
|
153
|
-
output.includes('Failed') ||
|
|
154
|
-
output.includes('Error')
|
|
155
|
-
);
|
|
156
|
-
|
|
157
|
-
return {
|
|
158
|
-
isValid,
|
|
159
|
-
timeout,
|
|
160
|
-
output: timeout ? `${output}\n[Command timed out - this indicates the command may be hanging]` : output,
|
|
161
|
-
expectedPatterns: timeout ? [...expectedPatterns, 'timeout'] : expectedPatterns
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Validates delete command result
|
|
167
|
-
* @function validateDeleteResult
|
|
168
|
-
* @param {Object} result - Command result
|
|
169
|
-
* @param {string} output - Combined output
|
|
170
|
-
* @param {string[]} expectedPatterns - Expected error patterns
|
|
171
|
-
* @returns {Object} Validation result
|
|
172
|
-
*/
|
|
173
|
-
function validateDeleteResult(result, output, expectedPatterns) {
|
|
174
|
-
const timeout = isTimeoutResult(result);
|
|
175
|
-
|
|
176
|
-
if (result.success && !timeout) {
|
|
177
|
-
return {
|
|
178
|
-
isValid: false,
|
|
179
|
-
output: `Command succeeded when it should have failed. Output: ${output.substring(0, 200)}`,
|
|
180
|
-
expectedPatterns,
|
|
181
|
-
error: 'Command should have failed but succeeded'
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
const hasErrorIndicator = timeout || hasErrorIndicators(output, expectedPatterns, result);
|
|
186
|
-
const isValid = (!result.success || timeout) && (
|
|
187
|
-
timeout ||
|
|
188
|
-
hasErrorIndicator ||
|
|
189
|
-
result.error !== null
|
|
190
|
-
);
|
|
191
|
-
|
|
192
|
-
const fullOutput = timeout
|
|
193
|
-
? `${output}\n[Command timed out after ${COMMAND_TIMEOUT_MS}ms - this indicates the command may be hanging when dataplane is down]`
|
|
194
|
-
: output;
|
|
195
|
-
|
|
196
|
-
return {
|
|
197
|
-
isValid,
|
|
198
|
-
output: fullOutput,
|
|
199
|
-
expectedPatterns: timeout ? [...expectedPatterns, 'timeout'] : expectedPatterns,
|
|
200
|
-
error: result.error ? (result.error.message || String(result.error)) : undefined
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Validates wizard command result
|
|
206
|
-
* @function validateWizardResult
|
|
207
|
-
* @param {Object} result - Command result
|
|
208
|
-
* @param {string} output - Combined output
|
|
209
|
-
* @returns {Object} Validation result
|
|
210
|
-
*/
|
|
211
|
-
function validateWizardResult(result, output) {
|
|
212
|
-
const expectedPatterns = [
|
|
213
|
-
'failed to connect',
|
|
214
|
-
'connection refused',
|
|
215
|
-
'network error',
|
|
216
|
-
'econnrefused',
|
|
217
|
-
'fetch failed',
|
|
218
|
-
'timeout',
|
|
219
|
-
'unreachable',
|
|
220
|
-
'failed to create wizard session',
|
|
221
|
-
'authentication failed',
|
|
222
|
-
'no authentication method',
|
|
223
|
-
'client token unavailable'
|
|
224
|
-
];
|
|
225
|
-
|
|
226
|
-
const isValid = !result.success && validateError(output, expectedPatterns);
|
|
227
|
-
|
|
228
|
-
return {
|
|
229
|
-
name: 'wizard',
|
|
230
|
-
success: isValid,
|
|
231
|
-
output,
|
|
232
|
-
expectedPatterns
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
module.exports = {
|
|
237
|
-
logInfo,
|
|
238
|
-
logSuccess,
|
|
239
|
-
logError,
|
|
240
|
-
logWarn,
|
|
241
|
-
runCommand,
|
|
242
|
-
validateError,
|
|
243
|
-
isTimeoutResult,
|
|
244
|
-
hasErrorIndicators,
|
|
245
|
-
validateDownloadDeleteResult,
|
|
246
|
-
validateDeleteResult,
|
|
247
|
-
validateWizardResult,
|
|
248
|
-
COMMAND_TIMEOUT_MS
|
|
249
|
-
};
|