@aifabrix/builder 2.46.0 → 2.47.1
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/.npmrc.token +1 -0
- package/.temp/jest-protection-convert/run-IFN2nv/.protection/hubspot-companies.json +1 -0
- package/.temp/jest-protection-convert/run-IvmKLO/.protection/hubspot-companies.yaml +17 -0
- package/.temp/jest-protection-convert/run-SdvblF/.protection/hubspot-companies.json +1 -0
- package/.temp/jest-protection-convert/run-b51TsW/.protection/hubspot-companies.json +1 -0
- package/.temp/jest-protection-convert/run-fiLmb1/.protection/hubspot-companies.json +1 -0
- package/.temp/jest-protection-convert/run-qYGHMU/.protection/hubspot-companies.yaml +17 -0
- package/.temp/jest-protection-fixtures/hubspot-Mq5re8/hubspot-companies.yaml +17 -0
- package/.temp/jest-protection-fixtures/hubspot-f3u4YL/hubspot-companies.yaml +17 -0
- package/.temp/jest-protection-fixtures/hubspot-iQtd1O/hubspot-companies.yaml +17 -0
- package/.temp/jest-protection-fixtures/hubspot-mdmz5M/hubspot-companies.yaml +17 -0
- package/.temp/jest-protection-fixtures/hubspot-qbKYxQ/hubspot-companies.yaml +17 -0
- package/.temp/jest-protection-fixtures/hubspot-yzlJy6/hubspot-companies.yaml +17 -0
- package/.temp/validation/summary.txt +5 -0
- package/jest.isolated-projects.js +18 -2
- package/jest.projects.js +24 -0
- package/lib/api/dataplane-health.api.js +19 -7
- package/lib/api/lifecycle.api.js +22 -1
- package/lib/api/resource-types.api.js +107 -0
- package/lib/api/runtime-configuration.api.js +72 -0
- package/lib/api/types/resource-types.types.js +45 -0
- package/lib/api/user-groups.api.js +9 -9
- package/lib/api/users.api.js +8 -8
- package/lib/api/wizard.api.js +10 -2
- package/lib/app/down.js +58 -26
- package/lib/app/index.js +2 -2
- package/lib/app/run-resolve-image.js +2 -1
- package/lib/app/run-stop-containers.js +113 -0
- package/lib/app/run.js +1 -31
- package/lib/app/show-display.js +35 -0
- package/lib/app/show.js +32 -1
- package/lib/build/index.js +17 -5
- package/lib/build/miso-controller-npm-sdk-guard.js +25 -0
- package/lib/channels/add-channel.js +348 -0
- package/lib/channels/channel-artifact-generator.js +141 -0
- package/lib/channels/channel-audit.js +101 -0
- package/lib/channels/channel-auth-context.js +37 -0
- package/lib/channels/channel-credential.js +200 -0
- package/lib/channels/channel-display-name.js +64 -0
- package/lib/channels/channel-external-system.js +106 -0
- package/lib/channels/channel-integration-generator.js +274 -0
- package/lib/channels/channel-probe.js +89 -0
- package/lib/channels/channel-runtime-resolver.js +152 -0
- package/lib/channels/channel-status-display.js +141 -0
- package/lib/channels/channel-targets.js +115 -0
- package/lib/cli/index.js +18 -4
- package/lib/cli/infra-guided-auth.js +36 -12
- package/lib/cli/setup-app.js +54 -3
- package/lib/cli/setup-infra-up-dataplane-action.js +2 -2
- package/lib/cli/setup-infra-up-platform-action.js +2 -1
- package/lib/cli/setup-npm.js +59 -0
- package/lib/cli/setup-platform.js +1 -1
- package/lib/cli/setup-secrets.js +1 -1
- package/lib/cli/setup-utility-help-after.js +4 -1
- package/lib/cli/setup-utility-resolve.js +8 -5
- package/lib/commands/app-logs.js +54 -26
- package/lib/commands/app.js +41 -0
- package/lib/commands/auth-status-dataplane-version.js +97 -61
- package/lib/commands/auth-status.js +2 -7
- package/lib/commands/channel.js +58 -0
- package/lib/commands/datasource.js +1 -1
- package/lib/commands/identity-apply-sync.js +49 -8
- package/lib/commands/identity-group-cli.js +66 -26
- package/lib/commands/identity-membership-role-cache.js +58 -37
- package/lib/commands/identity-shared.js +22 -1
- package/lib/commands/identity-user-cli.js +80 -34
- package/lib/commands/login-device.js +11 -3
- package/lib/commands/login.js +8 -3
- package/lib/commands/npm-config.js +103 -0
- package/lib/commands/repair-auth-apply.js +30 -4
- package/lib/commands/repair-auth-config.js +8 -13
- package/lib/commands/repair-datasource-com-v2.js +15 -0
- package/lib/commands/repair-datasource-service-contract.js +206 -0
- package/lib/commands/repair-datasource.js +53 -18
- package/lib/commands/repair-env-template.js +12 -12
- package/lib/commands/repair-openapi-sync.js +26 -4
- package/lib/commands/repair-steps.js +28 -13
- package/lib/commands/repair-system-alignment.js +7 -4
- package/lib/commands/resource-type.js +371 -0
- package/lib/commands/setup-modes.js +1 -1
- package/lib/commands/setup-prompts-platform-mode.js +24 -21
- package/lib/commands/test-trust-external.js +39 -90
- package/lib/commands/up-common.js +33 -1
- package/lib/commands/up-dataplane.js +8 -4
- package/lib/commands/upload.js +24 -3
- package/lib/commands/verify-trust-command-action.js +4 -1
- package/lib/commands/verify-trust-external.js +12 -20
- package/lib/core/config-setup-platform-mode.js +3 -3
- package/lib/core/setup-platform-mode.js +41 -6
- package/lib/datasource/capability/capability-diff-slice.js +2 -2
- package/lib/datasource/capability/capability-manifest.js +254 -0
- package/lib/datasource/capability/capability-resolve.js +3 -4
- package/lib/datasource/capability/copy-operations.js +5 -3
- package/lib/datasource/capability/remove-operations.js +2 -1
- package/lib/datasource/capability/run-capability-copy.js +32 -4
- package/lib/datasource/capability/run-capability-diff.js +3 -3
- package/lib/datasource/capability/run-capability-dimension.js +2 -4
- package/lib/datasource/capability/run-capability-edit.js +4 -7
- package/lib/datasource/capability/run-capability-relate.js +2 -4
- package/lib/datasource/capability/run-capability-remove.js +2 -4
- package/lib/datasource/capability/validate-capability-slice.js +2 -1
- package/lib/datasource/datasource-identifier.js +2 -1
- package/lib/datasource/datasource-validate-display.js +1 -1
- package/lib/datasource/field-reference-validator.js +24 -3
- package/lib/datasource/orphan-profiles-validator.js +98 -0
- package/lib/datasource/validate.js +41 -23
- package/lib/external-system/download-helpers.js +87 -0
- package/lib/external-system/download.js +61 -122
- package/lib/external-system/generator.js +1 -59
- package/lib/external-system/test.js +10 -15
- package/lib/generator/builders.js +11 -1
- package/lib/generator/external-controller-manifest.js +5 -2
- package/lib/generator/split.js +3 -1
- package/lib/generator/wizard.js +1 -28
- package/lib/identity/fk-reference.js +65 -0
- package/lib/identity/identity-apply-core.js +13 -58
- package/lib/identity/identity-apply-phases.js +5 -1
- package/lib/identity/identity-display.js +243 -0
- package/lib/identity/identity-response-helpers.js +52 -0
- package/lib/identity/identity-sync-errors.js +62 -0
- package/lib/identity/resolve-user-id.js +129 -0
- package/lib/identity/username-default.js +31 -0
- package/lib/lifecycle/certification-progress.js +2 -2
- package/lib/lifecycle/report-display-trust.js +70 -0
- package/lib/lifecycle/report-display.js +14 -13
- package/lib/resolvers/datasource-resolver.js +2 -3
- package/lib/resolvers/resource-type-file.js +159 -0
- package/lib/schema/application-schema.json +16 -0
- package/lib/schema/deployment-rules.yaml +2 -1
- package/lib/schema/external-datasource.schema.json +372 -58
- package/lib/schema/external-system.schema.json +331 -2
- package/lib/schema/type/document-storage.json +9 -5
- package/lib/utils/api.js +2 -1
- package/lib/utils/app-run-containers.js +25 -2
- package/lib/utils/authentication-shape.js +224 -0
- package/lib/utils/build-copy.js +36 -5
- package/lib/utils/build-resolve-image.js +66 -12
- package/lib/utils/celery-companion-apps.js +53 -0
- package/lib/utils/cli-utils.js +4 -0
- package/lib/utils/compose-celery-worker.js +23 -0
- package/lib/utils/compose-generate-docker-compose.js +9 -1
- package/lib/utils/configuration-env-resolver.js +36 -0
- package/lib/utils/controller-url.js +4 -1
- package/lib/utils/credential-secrets-env-kv.js +216 -0
- package/lib/utils/credential-secrets-env.js +52 -262
- package/lib/utils/dataplane-resolver.js +4 -115
- package/lib/utils/declarative-url-ports.js +24 -1
- package/lib/utils/dev-platform-tls.js +148 -0
- package/lib/utils/docker-build.js +1 -4
- package/lib/utils/external-env-template.js +10 -3
- package/lib/utils/external-system-validators.js +8 -2
- package/lib/utils/health-check-request.js +114 -0
- package/lib/utils/health-check-url.js +3 -1
- package/lib/utils/health-check.js +1 -113
- package/lib/utils/help-builder.js +3 -0
- package/lib/utils/keycloak-realm-ready.js +5 -1
- package/lib/utils/localhost-public-host.js +31 -0
- package/lib/utils/npm-user-config.js +145 -0
- package/lib/utils/paths.js +25 -0
- package/lib/utils/platform-controller-url.js +58 -4
- package/lib/utils/platform-kv-ref.js +57 -0
- package/lib/utils/runtime-configuration-download.js +189 -0
- package/lib/utils/runtime-configuration-values.js +119 -0
- package/lib/utils/schema-loader.js +19 -4
- package/lib/utils/url-declarative-public-base.js +33 -25
- package/lib/utils/worker-sidecars.js +142 -0
- package/lib/validation/external-manifest-validator.js +2 -0
- package/lib/validation/runtime-configuration-rules.js +98 -0
- package/lib/validation/validate-display-dimensions.js +154 -0
- package/lib/validation/validate-display-sections.js +276 -0
- package/lib/validation/validate-display-steps.js +67 -0
- package/lib/validation/validate-display.js +24 -402
- package/package.json +1 -1
- package/templates/applications/dataplane/application.yaml +5 -0
- package/templates/applications/dataplane/env.template +26 -13
- package/templates/applications/dataplane/rbac.yaml +108 -1
- package/templates/applications/miso-controller/application.yaml +2 -2
- package/templates/applications/miso-controller/env.template +37 -122
- package/templates/applications/miso-controller/rbac.yaml +28 -13
- package/templates/channels/chatgpt/install.template.md.hbs +49 -0
- package/templates/channels/chatgpt/manifest.template.json.hbs +9 -0
- package/templates/channels/microsoft-copilot/install.template.md.hbs +49 -0
- package/templates/channels/microsoft-copilot/manifest.template.json.hbs +8 -0
- package/templates/channels/slack/install.template.md.hbs +49 -0
- package/templates/channels/slack/manifest.template.json.hbs +66 -0
- package/templates/channels/teams-bot/install.template.md.hbs +49 -0
- package/templates/channels/teams-bot/manifest.template.json.hbs +13 -0
- package/templates/channels/web-embed/install.template.md.hbs +49 -0
- package/templates/channels/web-embed/manifest.template.json.hbs +8 -0
- package/templates/python/docker-compose.hbs +56 -0
- package/templates/typescript/docker-compose.hbs +52 -0
package/.npmrc.token
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"apiVersion":"dataplane.aifabrix.ai/v1","kind":"Protection","metadata":{"key":"hubspot-country-sales","displayName":"HubSpot Country Sales Access"},"spec":{"enabled":true,"datasourceKey":"hubspot-companies","mode":"replaceForSource","rules":[{"key":"sales-country-users","principal":{"type":"group","expression":"Sales {{fk.country.metadata.iso3}} Users"},"grants":[{"dimensionKey":"country","valueExpression":"{{fk.country.metadata.iso2}}"}]}]}}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
apiVersion: dataplane.aifabrix.ai/v1
|
|
2
|
+
kind: Protection
|
|
3
|
+
metadata:
|
|
4
|
+
key: hubspot-country-sales
|
|
5
|
+
displayName: HubSpot Country Sales Access
|
|
6
|
+
spec:
|
|
7
|
+
enabled: true
|
|
8
|
+
datasourceKey: hubspot-companies
|
|
9
|
+
mode: replaceForSource
|
|
10
|
+
rules:
|
|
11
|
+
- key: sales-country-users
|
|
12
|
+
principal:
|
|
13
|
+
type: group
|
|
14
|
+
expression: "Sales {{fk.country.metadata.iso3}} Users"
|
|
15
|
+
grants:
|
|
16
|
+
- dimensionKey: country
|
|
17
|
+
valueExpression: "{{fk.country.metadata.iso2}}"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"kind":"Protection"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"apiVersion":"dataplane.aifabrix.ai/v1","kind":"Protection","metadata":{"key":"hubspot-country-sales","displayName":"HubSpot Country Sales Access"},"spec":{"enabled":true,"datasourceKey":"hubspot-companies","mode":"replaceForSource","rules":[{"key":"sales-country-users","principal":{"type":"group","expression":"Sales {{fk.country.metadata.iso3}} Users"},"grants":[{"dimensionKey":"country","valueExpression":"{{fk.country.metadata.iso2}}"}]}]}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"kind":"Protection"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
apiVersion: dataplane.aifabrix.ai/v1
|
|
2
|
+
kind: Protection
|
|
3
|
+
metadata:
|
|
4
|
+
key: hubspot-country-sales
|
|
5
|
+
displayName: HubSpot Country Sales Access
|
|
6
|
+
spec:
|
|
7
|
+
enabled: true
|
|
8
|
+
datasourceKey: hubspot-companies
|
|
9
|
+
mode: replaceForSource
|
|
10
|
+
rules:
|
|
11
|
+
- key: sales-country-users
|
|
12
|
+
principal:
|
|
13
|
+
type: group
|
|
14
|
+
expression: "Sales {{fk.country.metadata.iso3}} Users"
|
|
15
|
+
grants:
|
|
16
|
+
- dimensionKey: country
|
|
17
|
+
valueExpression: "{{fk.country.metadata.iso2}}"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
apiVersion: dataplane.aifabrix.ai/v1
|
|
2
|
+
kind: Protection
|
|
3
|
+
metadata:
|
|
4
|
+
key: hubspot-country-sales
|
|
5
|
+
displayName: HubSpot Country Sales Access
|
|
6
|
+
spec:
|
|
7
|
+
enabled: true
|
|
8
|
+
datasourceKey: hubspot-companies
|
|
9
|
+
mode: replaceForSource
|
|
10
|
+
rules:
|
|
11
|
+
- key: sales-country-users
|
|
12
|
+
principal:
|
|
13
|
+
type: group
|
|
14
|
+
expression: "Sales {{fk.country.metadata.iso3}} Users"
|
|
15
|
+
grants:
|
|
16
|
+
- dimensionKey: country
|
|
17
|
+
valueExpression: "{{fk.country.metadata.iso2}}"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
apiVersion: dataplane.aifabrix.ai/v1
|
|
2
|
+
kind: Protection
|
|
3
|
+
metadata:
|
|
4
|
+
key: hubspot-country-sales
|
|
5
|
+
displayName: HubSpot Country Sales Access
|
|
6
|
+
spec:
|
|
7
|
+
enabled: true
|
|
8
|
+
datasourceKey: hubspot-companies
|
|
9
|
+
mode: replaceForSource
|
|
10
|
+
rules:
|
|
11
|
+
- key: sales-country-users
|
|
12
|
+
principal:
|
|
13
|
+
type: group
|
|
14
|
+
expression: "Sales {{fk.country.metadata.iso3}} Users"
|
|
15
|
+
grants:
|
|
16
|
+
- dimensionKey: country
|
|
17
|
+
valueExpression: "{{fk.country.metadata.iso2}}"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
apiVersion: dataplane.aifabrix.ai/v1
|
|
2
|
+
kind: Protection
|
|
3
|
+
metadata:
|
|
4
|
+
key: hubspot-country-sales
|
|
5
|
+
displayName: HubSpot Country Sales Access
|
|
6
|
+
spec:
|
|
7
|
+
enabled: true
|
|
8
|
+
datasourceKey: hubspot-companies
|
|
9
|
+
mode: replaceForSource
|
|
10
|
+
rules:
|
|
11
|
+
- key: sales-country-users
|
|
12
|
+
principal:
|
|
13
|
+
type: group
|
|
14
|
+
expression: "Sales {{fk.country.metadata.iso3}} Users"
|
|
15
|
+
grants:
|
|
16
|
+
- dimensionKey: country
|
|
17
|
+
valueExpression: "{{fk.country.metadata.iso2}}"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
apiVersion: dataplane.aifabrix.ai/v1
|
|
2
|
+
kind: Protection
|
|
3
|
+
metadata:
|
|
4
|
+
key: hubspot-country-sales
|
|
5
|
+
displayName: HubSpot Country Sales Access
|
|
6
|
+
spec:
|
|
7
|
+
enabled: true
|
|
8
|
+
datasourceKey: hubspot-companies
|
|
9
|
+
mode: replaceForSource
|
|
10
|
+
rules:
|
|
11
|
+
- key: sales-country-users
|
|
12
|
+
principal:
|
|
13
|
+
type: group
|
|
14
|
+
expression: "Sales {{fk.country.metadata.iso3}} Users"
|
|
15
|
+
grants:
|
|
16
|
+
- dimensionKey: country
|
|
17
|
+
valueExpression: "{{fk.country.metadata.iso2}}"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
apiVersion: dataplane.aifabrix.ai/v1
|
|
2
|
+
kind: Protection
|
|
3
|
+
metadata:
|
|
4
|
+
key: hubspot-country-sales
|
|
5
|
+
displayName: HubSpot Country Sales Access
|
|
6
|
+
spec:
|
|
7
|
+
enabled: true
|
|
8
|
+
datasourceKey: hubspot-companies
|
|
9
|
+
mode: replaceForSource
|
|
10
|
+
rules:
|
|
11
|
+
- key: sales-country-users
|
|
12
|
+
principal:
|
|
13
|
+
type: group
|
|
14
|
+
expression: "Sales {{fk.country.metadata.iso3}} Users"
|
|
15
|
+
grants:
|
|
16
|
+
- dimensionKey: country
|
|
17
|
+
valueExpression: "{{fk.country.metadata.iso2}}"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
apiVersion: dataplane.aifabrix.ai/v1
|
|
2
|
+
kind: Protection
|
|
3
|
+
metadata:
|
|
4
|
+
key: hubspot-country-sales
|
|
5
|
+
displayName: HubSpot Country Sales Access
|
|
6
|
+
spec:
|
|
7
|
+
enabled: true
|
|
8
|
+
datasourceKey: hubspot-companies
|
|
9
|
+
mode: replaceForSource
|
|
10
|
+
rules:
|
|
11
|
+
- key: sales-country-users
|
|
12
|
+
principal:
|
|
13
|
+
type: group
|
|
14
|
+
expression: "Sales {{fk.country.metadata.iso3}} Users"
|
|
15
|
+
grants:
|
|
16
|
+
- dimensionKey: country
|
|
17
|
+
valueExpression: "{{fk.country.metadata.iso2}}"
|
|
@@ -40,7 +40,13 @@ const ISOLATED_SUITE_ENTRIES = [
|
|
|
40
40
|
],
|
|
41
41
|
['database-secret-values', ['**/tests/lib/parameters/database-secret-values.test.js']],
|
|
42
42
|
['infra-parameter-validate', ['**/tests/lib/parameters/infra-parameter-validate.test.js']],
|
|
43
|
-
[
|
|
43
|
+
[
|
|
44
|
+
'infra-parameter-catalog',
|
|
45
|
+
[
|
|
46
|
+
'**/tests/lib/parameters/infra-parameter-catalog.test.js',
|
|
47
|
+
'**/tests/lib/utils/platform-kv-ref.test.js'
|
|
48
|
+
]
|
|
49
|
+
],
|
|
44
50
|
['urls-local-registry', ['**/tests/lib/utils/urls-local-registry.test.js']],
|
|
45
51
|
['aifabrix-runtime-config-dir', ['**/tests/lib/utils/aifabrix-runtime-config-dir.test.js']],
|
|
46
52
|
['platform-env-template-kv-catalog', ['**/tests/lib/parameters/platform-env-template-kv-catalog.test.js']],
|
|
@@ -77,6 +83,8 @@ const ISOLATED_SUITE_ENTRIES = [
|
|
|
77
83
|
['generator-validation', ['**/tests/lib/generator/generator-validation.test.js']],
|
|
78
84
|
['secrets-databaselog', ['**/tests/lib/core/secrets-databaselog.test.js']],
|
|
79
85
|
['schema-241-alignment', ['**/tests/lib/validation/schema-241-alignment.test.js']],
|
|
86
|
+
['hubspot-e2e-com-v2', ['**/tests/lib/validation/hubspot-e2e-com-v2.test.js']],
|
|
87
|
+
['runtime-configuration-download', ['**/tests/lib/utils/runtime-configuration-download.test.js']],
|
|
80
88
|
['schema-resolver-order', ['**/tests/lib/utils/schema-resolver-order.test.js']],
|
|
81
89
|
['app-module', ['**/tests/lib/app/app.test.js']],
|
|
82
90
|
['admin-secrets', ['**/tests/lib/core/admin-secrets.test.js']],
|
|
@@ -110,7 +118,15 @@ const ISOLATED_SUITE_ENTRIES = [
|
|
|
110
118
|
['aifabrix-runtime-sandbox', ['**/tests/helpers/aifabrix-runtime-sandbox.test.js']],
|
|
111
119
|
['aifabrix-runtime-backup', ['**/tests/helpers/aifabrix-runtime-backup.test.js']],
|
|
112
120
|
['paths-jest-sandbox-integration', ['**/tests/lib/utils/paths-jest-sandbox-integration.test.js']],
|
|
113
|
-
['secrets-remove-all-guard', ['**/tests/lib/commands/secrets-remove-all-guard.test.js']]
|
|
121
|
+
['secrets-remove-all-guard', ['**/tests/lib/commands/secrets-remove-all-guard.test.js']],
|
|
122
|
+
['app-logs', ['**/tests/lib/commands/app-logs.test.js']],
|
|
123
|
+
[
|
|
124
|
+
'channel-real-fs',
|
|
125
|
+
[
|
|
126
|
+
'**/tests/lib/channels/channel-integration-generator.test.js',
|
|
127
|
+
'**/tests/lib/channels/channel-artifact-generator.test.js'
|
|
128
|
+
]
|
|
129
|
+
]
|
|
114
130
|
];
|
|
115
131
|
|
|
116
132
|
/**
|
package/jest.projects.js
CHANGED
|
@@ -116,6 +116,10 @@ const defaultProject = {
|
|
|
116
116
|
'\\\\tests\\\\lib\\\\parameters\\\\infra-parameter-catalog.test.js',
|
|
117
117
|
'lib/parameters/infra-parameter-catalog.test.js',
|
|
118
118
|
'infra-parameter-catalog\\.test\\.js',
|
|
119
|
+
'/tests/lib/utils/platform-kv-ref.test.js',
|
|
120
|
+
'\\\\tests\\\\lib\\\\utils\\\\platform-kv-ref.test.js',
|
|
121
|
+
'lib/utils/platform-kv-ref.test.js',
|
|
122
|
+
'platform-kv-ref\\.test\\.js',
|
|
119
123
|
'/tests/lib/utils/urls-local-registry.test.js',
|
|
120
124
|
'\\\\tests\\\\lib\\\\utils\\\\urls-local-registry.test.js',
|
|
121
125
|
'lib/utils/urls-local-registry.test.js',
|
|
@@ -252,6 +256,14 @@ const defaultProject = {
|
|
|
252
256
|
'\\\\tests\\\\lib\\\\validation\\\\schema-241-alignment.test.js',
|
|
253
257
|
'lib/validation/schema-241-alignment.test.js',
|
|
254
258
|
'schema-241-alignment\\.test\\.js',
|
|
259
|
+
'/tests/lib/validation/hubspot-e2e-com-v2.test.js',
|
|
260
|
+
'\\\\tests\\\\lib\\\\validation\\\\hubspot-e2e-com-v2.test.js',
|
|
261
|
+
'lib/validation/hubspot-e2e-com-v2.test.js',
|
|
262
|
+
'hubspot-e2e-com-v2\\.test\\.js',
|
|
263
|
+
'/tests/lib/utils/runtime-configuration-download.test.js',
|
|
264
|
+
'\\\\tests\\\\lib\\\\utils\\\\runtime-configuration-download.test.js',
|
|
265
|
+
'lib/utils/runtime-configuration-download.test.js',
|
|
266
|
+
'runtime-configuration-download\\.test\\.js',
|
|
255
267
|
'/tests/lib/utils/schema-resolver-order.test.js',
|
|
256
268
|
'\\\\tests\\\\lib\\\\utils\\\\schema-resolver-order.test.js',
|
|
257
269
|
'lib/utils/schema-resolver-order.test.js',
|
|
@@ -335,6 +347,18 @@ const defaultProject = {
|
|
|
335
347
|
'\\\\tests\\\\lib\\\\commands\\\\secrets-remove-all-guard.test.js',
|
|
336
348
|
'lib/commands/secrets-remove-all-guard.test.js',
|
|
337
349
|
'secrets-remove-all-guard\\.test\\.js',
|
|
350
|
+
'/tests/lib/commands/app-logs.test.js',
|
|
351
|
+
'\\\\tests\\\\lib\\\\commands\\\\app-logs.test.js',
|
|
352
|
+
'lib/commands/app-logs.test.js',
|
|
353
|
+
'app-logs\\.test\\.js',
|
|
354
|
+
'/tests/lib/channels/channel-integration-generator.test.js',
|
|
355
|
+
'\\\\tests\\\\lib\\\\channels\\\\channel-integration-generator.test.js',
|
|
356
|
+
'lib/channels/channel-integration-generator.test.js',
|
|
357
|
+
'channel-integration-generator\\.test\\.js',
|
|
358
|
+
'/tests/lib/channels/channel-artifact-generator.test.js',
|
|
359
|
+
'\\\\tests\\\\lib\\\\channels\\\\channel-artifact-generator.test.js',
|
|
360
|
+
'lib/channels/channel-artifact-generator.test.js',
|
|
361
|
+
'channel-artifact-generator\\.test\\.js',
|
|
338
362
|
'/tests/setup-ci-live-fabrix-guard.test.js',
|
|
339
363
|
'\\\\tests\\\\setup-ci-live-fabrix-guard.test.js',
|
|
340
364
|
'setup-ci-live-fabrix-guard\\.test\\.js'
|
|
@@ -90,6 +90,17 @@ function parseGeneralHealthResponse(response, endpoint) {
|
|
|
90
90
|
* Snapshot, or null when both endpoints fail
|
|
91
91
|
* @throws {Error} When dataplaneUrl is missing or not a string
|
|
92
92
|
*/
|
|
93
|
+
/**
|
|
94
|
+
* @param {'v1-first'|'legacy-first'} [endpointOrder]
|
|
95
|
+
* @returns {[string, string]}
|
|
96
|
+
*/
|
|
97
|
+
function healthEndpointOrder(endpointOrder) {
|
|
98
|
+
if (endpointOrder === 'legacy-first') {
|
|
99
|
+
return [FALLBACK_ENDPOINT, PRIMARY_ENDPOINT];
|
|
100
|
+
}
|
|
101
|
+
return [PRIMARY_ENDPOINT, FALLBACK_ENDPOINT];
|
|
102
|
+
}
|
|
103
|
+
|
|
93
104
|
async function fetchDataplaneGeneralHealth(dataplaneUrl, options = {}) {
|
|
94
105
|
if (!dataplaneUrl || typeof dataplaneUrl !== 'string') {
|
|
95
106
|
throw new Error('dataplaneUrl is required and must be a string');
|
|
@@ -100,13 +111,14 @@ async function fetchDataplaneGeneralHealth(dataplaneUrl, options = {}) {
|
|
|
100
111
|
requestOpts.timeoutMs = options.timeoutMs;
|
|
101
112
|
}
|
|
102
113
|
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
114
|
+
const endpoints = healthEndpointOrder(options.endpointOrder);
|
|
115
|
+
for (const endpoint of endpoints) {
|
|
116
|
+
const response = await safeGet(client, endpoint, requestOpts);
|
|
117
|
+
const snapshot = parseGeneralHealthResponse(response, endpoint);
|
|
118
|
+
if (snapshot) {
|
|
119
|
+
return snapshot;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
110
122
|
|
|
111
123
|
return null;
|
|
112
124
|
}
|
package/lib/api/lifecycle.api.js
CHANGED
|
@@ -71,7 +71,28 @@ async function runSystemLifecycle(dataplaneUrl, authConfig, systemKey, body = {}
|
|
|
71
71
|
return unwrapped;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
async function runSystemVerifyTrust(dataplaneUrl, authConfig, systemKey, body = {}) {
|
|
75
|
+
const client = createDataplaneApiClient(dataplaneUrl, authConfig);
|
|
76
|
+
const res = await client.post(
|
|
77
|
+
`/api/v1/external/systems/${encodeURIComponent(systemKey)}/verify-trust`,
|
|
78
|
+
{ body }
|
|
79
|
+
);
|
|
80
|
+
if (res && res.success === false) {
|
|
81
|
+
const msg =
|
|
82
|
+
(res.error && (res.error.formattedError || res.error.error || res.error.message)) ||
|
|
83
|
+
res.formattedError ||
|
|
84
|
+
'verify-trust request failed';
|
|
85
|
+
throw new Error(msg);
|
|
86
|
+
}
|
|
87
|
+
const unwrapped = unwrapApiData(res);
|
|
88
|
+
if (!unwrapped || !unwrapped.systemKey) {
|
|
89
|
+
throw new Error('verify-trust returned an unexpected response shape');
|
|
90
|
+
}
|
|
91
|
+
return unwrapped;
|
|
92
|
+
}
|
|
93
|
+
|
|
74
94
|
module.exports = {
|
|
75
95
|
getSystemLifecycleReport,
|
|
76
|
-
runSystemLifecycle
|
|
96
|
+
runSystemLifecycle,
|
|
97
|
+
runSystemVerifyTrust
|
|
77
98
|
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Resource types API (Controller /api/v1/resource-types)
|
|
3
|
+
* @author AI Fabrix Team
|
|
4
|
+
* @version 1.0.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
const { ApiClient } = require('./index');
|
|
10
|
+
|
|
11
|
+
const BASE = '/api/v1/resource-types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* List resource types (paginated)
|
|
15
|
+
* @requiresPermission {Controller} resourceTypes:read
|
|
16
|
+
* @async
|
|
17
|
+
* @function listResourceTypes
|
|
18
|
+
* @param {string} controllerUrl
|
|
19
|
+
* @param {Object} authConfig
|
|
20
|
+
* @param {Object} [options]
|
|
21
|
+
* @param {number} [options.page]
|
|
22
|
+
* @param {number} [options.pageSize]
|
|
23
|
+
* @param {string} [options.sort]
|
|
24
|
+
* @param {string} [options.filter]
|
|
25
|
+
* @param {string} [options.search]
|
|
26
|
+
* @param {string} [options.category]
|
|
27
|
+
* @param {string} [options.status]
|
|
28
|
+
* @returns {Promise<Object>}
|
|
29
|
+
*/
|
|
30
|
+
async function listResourceTypes(controllerUrl, authConfig, options = {}) {
|
|
31
|
+
const client = new ApiClient(controllerUrl, authConfig);
|
|
32
|
+
return await client.get(BASE, { params: options });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get a resource type by id or key
|
|
37
|
+
* @requiresPermission {Controller} resourceTypes:read
|
|
38
|
+
* @async
|
|
39
|
+
* @function getResourceType
|
|
40
|
+
* @param {string} controllerUrl
|
|
41
|
+
* @param {Object} authConfig
|
|
42
|
+
* @param {string} resourceTypeIdOrKey
|
|
43
|
+
* @returns {Promise<Object>}
|
|
44
|
+
*/
|
|
45
|
+
async function getResourceType(controllerUrl, authConfig, resourceTypeIdOrKey) {
|
|
46
|
+
const client = new ApiClient(controllerUrl, authConfig);
|
|
47
|
+
return await client.get(`${BASE}/${encodeURIComponent(resourceTypeIdOrKey)}`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Create a resource type
|
|
52
|
+
* @requiresPermission {Controller} resourceTypes:create
|
|
53
|
+
* @async
|
|
54
|
+
* @function createResourceType
|
|
55
|
+
* @param {string} controllerUrl
|
|
56
|
+
* @param {Object} authConfig
|
|
57
|
+
* @param {import('./types/resource-types.types').CreateResourceTypeRequest} body
|
|
58
|
+
* @returns {Promise<Object>}
|
|
59
|
+
*/
|
|
60
|
+
async function createResourceType(controllerUrl, authConfig, body) {
|
|
61
|
+
const client = new ApiClient(controllerUrl, authConfig);
|
|
62
|
+
const payload = {
|
|
63
|
+
key: body.key,
|
|
64
|
+
displayName: body.displayName
|
|
65
|
+
};
|
|
66
|
+
if (body.description !== undefined && body.description !== null && body.description !== '') {
|
|
67
|
+
payload.description = body.description;
|
|
68
|
+
}
|
|
69
|
+
if (body.category) payload.category = body.category;
|
|
70
|
+
if (body.defaultRiskLevel) payload.defaultRiskLevel = body.defaultRiskLevel;
|
|
71
|
+
if (body.status) payload.status = body.status;
|
|
72
|
+
return await client.post(BASE, { body: payload });
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Create-if-missing (idempotent): if a resource type already exists for the key, return success.
|
|
77
|
+
* @requiresPermission {Controller} resourceTypes:read + resourceTypes:create
|
|
78
|
+
* @async
|
|
79
|
+
* @function createResourceTypeIdempotent
|
|
80
|
+
* @param {string} controllerUrl
|
|
81
|
+
* @param {Object} authConfig
|
|
82
|
+
* @param {import('./types/resource-types.types').CreateResourceTypeRequest} body
|
|
83
|
+
* @returns {Promise<{ created: boolean, response: Object }>}
|
|
84
|
+
*/
|
|
85
|
+
async function createResourceTypeIdempotent(controllerUrl, authConfig, body) {
|
|
86
|
+
const key = String(body?.key || '').trim();
|
|
87
|
+
if (!key) {
|
|
88
|
+
throw new Error('Resource type key is required');
|
|
89
|
+
}
|
|
90
|
+
const getRes = await getResourceType(controllerUrl, authConfig, key);
|
|
91
|
+
if (getRes && getRes.success === true) {
|
|
92
|
+
return { created: false, response: getRes };
|
|
93
|
+
}
|
|
94
|
+
const createRes = await createResourceType(controllerUrl, authConfig, body);
|
|
95
|
+
if (createRes && createRes.success === true) {
|
|
96
|
+
return { created: true, response: createRes };
|
|
97
|
+
}
|
|
98
|
+
const msg = createRes?.error || createRes?.formattedError || 'Failed to create resource type';
|
|
99
|
+
throw new Error(msg);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
module.exports = {
|
|
103
|
+
listResourceTypes,
|
|
104
|
+
getResourceType,
|
|
105
|
+
createResourceType,
|
|
106
|
+
createResourceTypeIdempotent
|
|
107
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Runtime configuration variable API (dataplane configuration_values)
|
|
3
|
+
* @author AI Fabrix Team
|
|
4
|
+
* @version 1.0.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const { createDataplaneApiClient } = require('./index');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* GET /api/v1/external/systems/{systemIdOrKey}/configuration
|
|
11
|
+
* @requiresPermission {Dataplane} external-system:read
|
|
12
|
+
*/
|
|
13
|
+
async function getExternalSystemConfiguration(dataplaneUrl, systemIdOrKey, authConfig) {
|
|
14
|
+
const client = createDataplaneApiClient(dataplaneUrl, authConfig);
|
|
15
|
+
return await client.get(`/api/v1/external/systems/${systemIdOrKey}/configuration`);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* PUT /api/v1/external/systems/{systemIdOrKey}/configuration
|
|
20
|
+
* @requiresPermission {Dataplane} external-system:update
|
|
21
|
+
* @param {{ name: string, value?: string|null, kvKey?: string|null }} body
|
|
22
|
+
*/
|
|
23
|
+
async function putExternalSystemConfiguration(dataplaneUrl, systemIdOrKey, authConfig, body) {
|
|
24
|
+
const client = createDataplaneApiClient(dataplaneUrl, authConfig);
|
|
25
|
+
return await client.put(`/api/v1/external/systems/${systemIdOrKey}/configuration`, { body });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* GET /api/v1/external/{sourceIdOrKey}/configuration
|
|
30
|
+
* @requiresPermission {Dataplane} external-data-source:read
|
|
31
|
+
*/
|
|
32
|
+
async function getExternalDataSourceConfiguration(dataplaneUrl, sourceIdOrKey, authConfig) {
|
|
33
|
+
const client = createDataplaneApiClient(dataplaneUrl, authConfig);
|
|
34
|
+
return await client.get(`/api/v1/external/${sourceIdOrKey}/configuration`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* GET /api/v1/external/systems/{systemIdOrKey}/configuration/resolved
|
|
39
|
+
* @requiresPermission {Dataplane} external-system:configuration:resolve
|
|
40
|
+
*/
|
|
41
|
+
async function getExternalSystemConfigurationResolved(dataplaneUrl, systemIdOrKey, authConfig) {
|
|
42
|
+
const client = createDataplaneApiClient(dataplaneUrl, authConfig);
|
|
43
|
+
return await client.get(`/api/v1/external/systems/${systemIdOrKey}/configuration/resolved`);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* GET /api/v1/external/{sourceIdOrKey}/configuration/resolved
|
|
48
|
+
* @requiresPermission {Dataplane} external-data-source:configuration:resolve
|
|
49
|
+
*/
|
|
50
|
+
async function getExternalDataSourceConfigurationResolved(dataplaneUrl, sourceIdOrKey, authConfig) {
|
|
51
|
+
const client = createDataplaneApiClient(dataplaneUrl, authConfig);
|
|
52
|
+
return await client.get(`/api/v1/external/${sourceIdOrKey}/configuration/resolved`);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* PUT /api/v1/external/{sourceIdOrKey}/configuration
|
|
57
|
+
* @requiresPermission {Dataplane} external-data-source:update
|
|
58
|
+
* @param {{ name: string, value?: string|null, kvKey?: string|null }} body
|
|
59
|
+
*/
|
|
60
|
+
async function putExternalDataSourceConfiguration(dataplaneUrl, sourceIdOrKey, authConfig, body) {
|
|
61
|
+
const client = createDataplaneApiClient(dataplaneUrl, authConfig);
|
|
62
|
+
return await client.put(`/api/v1/external/${sourceIdOrKey}/configuration`, { body });
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
module.exports = {
|
|
66
|
+
getExternalSystemConfiguration,
|
|
67
|
+
getExternalSystemConfigurationResolved,
|
|
68
|
+
putExternalSystemConfiguration,
|
|
69
|
+
getExternalDataSourceConfiguration,
|
|
70
|
+
getExternalDataSourceConfigurationResolved,
|
|
71
|
+
putExternalDataSourceConfiguration
|
|
72
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Resource type catalog API type definitions
|
|
3
|
+
* @author AI Fabrix Team
|
|
4
|
+
* @version 1.0.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Resource type category
|
|
9
|
+
* @typedef {'business'|'collaboration'|'governance'|'content'|'communication'|'people'} ResourceTypeCategory
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Resource type risk level
|
|
14
|
+
* @typedef {'low'|'medium'|'high'|'critical'} ResourceTypeRiskLevel
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Resource type lifecycle status
|
|
19
|
+
* @typedef {'draft'|'active'|'deprecated'|'retired'} ResourceTypeStatus
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Create resource type request body
|
|
24
|
+
* @typedef {Object} CreateResourceTypeRequest
|
|
25
|
+
* @property {string} key - Catalog key (lowercase, hyphens)
|
|
26
|
+
* @property {string} displayName - Human-readable name
|
|
27
|
+
* @property {string} [description] - Optional description
|
|
28
|
+
* @property {ResourceTypeCategory} [category] - Catalog category
|
|
29
|
+
* @property {ResourceTypeRiskLevel} [defaultRiskLevel] - Default risk level
|
|
30
|
+
* @property {ResourceTypeStatus} [status] - Lifecycle status
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Resource type record
|
|
35
|
+
* @typedef {Object} ResourceTypeRecord
|
|
36
|
+
* @property {string} id - Controller id
|
|
37
|
+
* @property {string} key - Catalog key
|
|
38
|
+
* @property {string} displayName - Display name
|
|
39
|
+
* @property {string} [description] - Description
|
|
40
|
+
* @property {ResourceTypeCategory} category - Category
|
|
41
|
+
* @property {ResourceTypeRiskLevel} defaultRiskLevel - Default risk
|
|
42
|
+
* @property {ResourceTypeStatus} status - Status
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
module.exports = {};
|
|
@@ -9,20 +9,20 @@
|
|
|
9
9
|
const { ApiClient } = require('./index');
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* Add user to group
|
|
12
|
+
* Add user to group (flexible path segments per plan 194)
|
|
13
13
|
* @requiresPermission {Controller} users:update
|
|
14
14
|
* @async
|
|
15
15
|
* @param {string} controllerUrl
|
|
16
16
|
* @param {Object} authConfig
|
|
17
|
-
* @param {string}
|
|
18
|
-
* @param {string}
|
|
17
|
+
* @param {string} userIdOrEmail - UUID, email, or username
|
|
18
|
+
* @param {string} groupIdOrName - UUID or group name
|
|
19
19
|
* @param {Object} [body]
|
|
20
20
|
* @returns {Promise<Object>}
|
|
21
21
|
*/
|
|
22
|
-
async function addUserToGroup(controllerUrl, authConfig,
|
|
22
|
+
async function addUserToGroup(controllerUrl, authConfig, userIdOrEmail, groupIdOrName, body = {}) {
|
|
23
23
|
const client = new ApiClient(controllerUrl, authConfig);
|
|
24
24
|
return await client.post(
|
|
25
|
-
`/api/v1/users/${encodeURIComponent(
|
|
25
|
+
`/api/v1/users/${encodeURIComponent(userIdOrEmail)}/groups/${encodeURIComponent(groupIdOrName)}`,
|
|
26
26
|
{ body }
|
|
27
27
|
);
|
|
28
28
|
}
|
|
@@ -33,14 +33,14 @@ async function addUserToGroup(controllerUrl, authConfig, userId, groupId, body =
|
|
|
33
33
|
* @async
|
|
34
34
|
* @param {string} controllerUrl
|
|
35
35
|
* @param {Object} authConfig
|
|
36
|
-
* @param {string}
|
|
37
|
-
* @param {string}
|
|
36
|
+
* @param {string} userIdOrEmail - UUID, email, or username
|
|
37
|
+
* @param {string} groupIdOrName - UUID or group name
|
|
38
38
|
* @returns {Promise<Object>}
|
|
39
39
|
*/
|
|
40
|
-
async function removeUserFromGroup(controllerUrl, authConfig,
|
|
40
|
+
async function removeUserFromGroup(controllerUrl, authConfig, userIdOrEmail, groupIdOrName) {
|
|
41
41
|
const client = new ApiClient(controllerUrl, authConfig);
|
|
42
42
|
return await client.delete(
|
|
43
|
-
`/api/v1/users/${encodeURIComponent(
|
|
43
|
+
`/api/v1/users/${encodeURIComponent(userIdOrEmail)}/groups/${encodeURIComponent(groupIdOrName)}`
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
|
package/lib/api/users.api.js
CHANGED
|
@@ -25,22 +25,22 @@ async function listUsers(controllerUrl, authConfig, options = {}) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* Get user by id
|
|
28
|
+
* Get user by id, email, or username (controller path: userIdOrEmail)
|
|
29
29
|
* @requiresPermission {Controller} users:read
|
|
30
30
|
* @async
|
|
31
31
|
* @param {string} controllerUrl
|
|
32
32
|
* @param {Object} authConfig
|
|
33
|
-
* @param {string}
|
|
33
|
+
* @param {string} userIdOrEmail - UUID, email, or username
|
|
34
34
|
* @param {Object} [options]
|
|
35
35
|
* @returns {Promise<Object>}
|
|
36
36
|
*/
|
|
37
|
-
async function getUser(controllerUrl, authConfig,
|
|
37
|
+
async function getUser(controllerUrl, authConfig, userIdOrEmail, options = {}) {
|
|
38
38
|
const client = new ApiClient(controllerUrl, authConfig);
|
|
39
39
|
const params = {};
|
|
40
40
|
if (options.includeGroups) {
|
|
41
41
|
params.includeGroups = 'true';
|
|
42
42
|
}
|
|
43
|
-
return await client.get(`${BASE}/${encodeURIComponent(
|
|
43
|
+
return await client.get(`${BASE}/${encodeURIComponent(userIdOrEmail)}`, { params });
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
@@ -73,17 +73,17 @@ async function updateUser(controllerUrl, authConfig, userId, body) {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
-
* List groups for a user
|
|
76
|
+
* List groups for a user (controller path: userIdOrEmail)
|
|
77
77
|
* @requiresPermission {Controller} users:read
|
|
78
78
|
* @async
|
|
79
79
|
* @param {string} controllerUrl
|
|
80
80
|
* @param {Object} authConfig
|
|
81
|
-
* @param {string}
|
|
81
|
+
* @param {string} userIdOrEmail - UUID, email, or username
|
|
82
82
|
* @returns {Promise<Object>}
|
|
83
83
|
*/
|
|
84
|
-
async function listUserGroups(controllerUrl, authConfig,
|
|
84
|
+
async function listUserGroups(controllerUrl, authConfig, userIdOrEmail) {
|
|
85
85
|
const client = new ApiClient(controllerUrl, authConfig);
|
|
86
|
-
return await client.get(`${BASE}/${encodeURIComponent(
|
|
86
|
+
return await client.get(`${BASE}/${encodeURIComponent(userIdOrEmail)}/groups`);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
module.exports = {
|