diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d89ebe2..6bce747c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: branches: ["main"] - tags: ["@epilot/sdk@*"] + tags: ["@epilot/sdk@*", "@epilot/cli@*"] pull_request: branches: ["main"] @@ -111,7 +111,7 @@ jobs: working-directory: packages/epilot-sdk-v2 publish: - name: Publish to npm + name: Publish @epilot/sdk to npm needs: [lint, test] runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/@epilot/sdk@') @@ -135,3 +135,98 @@ jobs: - name: Publish @epilot/sdk run: npm publish --ignore-scripts working-directory: packages/epilot-sdk-v2 + + auto-release-cli: + name: Auto-release @epilot/cli + needs: [test] + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 2 + + - name: Check for CLI-related changes + id: check + run: | + if git diff --name-only HEAD~1 HEAD | grep -qE '^(packages/cli/|clients/.*/openapi\.json$)'; then + echo "changed=true" >> "$GITHUB_OUTPUT" + else + echo "changed=false" >> "$GITHUB_OUTPUT" + fi + + - name: Install pnpm + if: steps.check.outputs.changed == 'true' + uses: pnpm/action-setup@v4 + with: + version: 10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977 + + - uses: actions/setup-node@v5 + if: steps.check.outputs.changed == 'true' + with: + node-version: 22 + cache: "pnpm" + registry-url: https://registry.npmjs.org/ + + - name: Build and test CLI + if: steps.check.outputs.changed == 'true' + run: | + pnpm install --frozen-lockfile + pnpm --filter @epilot/cli build + pnpm --filter @epilot/cli test + + - name: Bump version, commit and tag + if: steps.check.outputs.changed == 'true' + id: version + run: | + cd packages/cli + npm version patch --no-git-tag-version + NEW_VERSION=$(node -p "require('./package.json').version") + echo "version=${NEW_VERSION}" >> "$GITHUB_OUTPUT" + + # Keep wrapper version in sync + cd "$GITHUB_WORKSPACE/packages/cli-wrapper" + npm version "$NEW_VERSION" --no-git-tag-version + node -e " + const pkg = require('./package.json'); + pkg.dependencies['@epilot/cli'] = '^${NEW_VERSION}'; + require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); + " + + cd "$GITHUB_WORKSPACE" + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add packages/cli/package.json packages/cli-wrapper/package.json + git commit -m "@epilot/cli@${NEW_VERSION}" + git tag "@epilot/cli@${NEW_VERSION}" + git push origin main --follow-tags + + publish-cli: + name: Publish @epilot/cli to npm + needs: [lint, test] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/@epilot/cli@') + steps: + - uses: actions/checkout@v5 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977 + + - uses: actions/setup-node@v5 + with: + node-version: 22 + cache: "pnpm" + registry-url: https://registry.npmjs.org/ + + - run: pnpm install --frozen-lockfile + - run: pnpm --filter @epilot/cli build + + - name: Publish @epilot/cli + run: npm publish --ignore-scripts + working-directory: packages/cli + + - name: Publish epilot wrapper + run: npm publish --ignore-scripts + working-directory: packages/cli-wrapper diff --git a/LICENSE b/LICENSE index bb2a53d7..9169ae20 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2025 epilot GmbH +Copyright (c) 2026 epilot GmbH Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/package-lock.json b/package-lock.json index e6108574..dbb08351 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,12 +13,10 @@ "clients/*" ], "devDependencies": { + "@biomejs/biome": "^2.4.6", "@changesets/cli": "^2.29.5", - "@epilot/eslint-config": "^2.1.3", - "@jest/types": "^30.0.0", "@types/node": "^24.0.1", "@types/yargs": "^17.0.33", - "eslint": "^7.32.0", "openapicmd": "^2.7.0", "typescript": "^4.9.3", "webpack-cli": "^5.1.4" @@ -38,13 +36,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -88,73 +83,10 @@ } } }, - "clients/access-token-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/access-token-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "clients/access-token-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -211,12 +143,9 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.8.2", "typescript": "^4.7.4", @@ -260,73 +189,10 @@ } } }, - "clients/address-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/address-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "clients/address-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -383,12 +249,9 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.8.2", "typescript": "^4.7.4", @@ -432,73 +295,10 @@ } } }, - "clients/address-suggestions-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/address-suggestions-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "clients/address-suggestions-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -555,12 +355,9 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.8.2", "typescript": "^4.7.4", @@ -604,73 +401,10 @@ } } }, - "clients/ai-agents-client/node_modules/ts-jest": { - "version": "29.4.6", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/ai-agents-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "clients/ai-agents-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -727,13 +461,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -777,73 +508,10 @@ } } }, - "clients/app-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/app-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "clients/app-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -900,13 +568,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -950,73 +615,10 @@ } } }, - "clients/audit-logs-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/audit-logs-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "clients/audit-logs-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -1061,7 +663,7 @@ }, "clients/automation-client": { "name": "@epilot/automation-client", - "version": "2.29.0", + "version": "2.30.0", "license": "MIT", "dependencies": { "buffer": "^6.0.3", @@ -1073,15 +675,12 @@ "devDependencies": { "@oclif/command": "^1.8.18", "@oclif/errors": "^1.3.6", - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "node-fetch": "^3.2.10", "openapi-client-axios": "^7.8.0", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -1126,73 +725,10 @@ } } }, - "clients/automation-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/automation-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "clients/automation-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -1248,13 +784,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -1298,73 +831,10 @@ } } }, - "clients/billing-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/billing-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "clients/billing-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -1421,13 +891,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -1471,73 +938,10 @@ } } }, - "clients/blueprint-manifest-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/blueprint-manifest-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "clients/blueprint-manifest-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -1594,13 +998,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -1644,73 +1045,10 @@ } } }, - "clients/consent-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/consent-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "clients/consent-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -1766,13 +1104,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -1816,73 +1151,10 @@ } } }, - "clients/customer-portal-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/customer-portal-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "clients/customer-portal-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -1925,50 +1197,49 @@ } } }, - "clients/data-management-client": { - "name": "@epilot/data-management-client", - "version": "1.2.24", + "clients/dashboard-client": { + "name": "@epilot/dashboard-client", + "version": "2.1.0", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", "https-browserify": "^1.0.0", "openapi-client-axios": "^7.8.0", - "stream-http": "^3.2.0", + "stream-http": "^3.1.1", "url": "^0.11.0", "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", - "ts-node": "^10.9.2", + "ts-node": "^10.9.1", "typescript": "^4.1.3", - "webpack": "^5.101.0", - "webpack-cli": "^4.10.0" + "webpack": "^5.18.0", + "webpack-cli": "^4.4.0" }, "peerDependencies": { "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/data-management-client/node_modules/@webpack-cli/configtest": { + "clients/dashboard-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", + "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", "dev": true, - "license": "MIT", "peerDependencies": { "webpack": "4.x.x || 5.x.x", "webpack-cli": "4.x.x" } }, - "clients/data-management-client/node_modules/@webpack-cli/info": { + "clients/dashboard-client/node_modules/@webpack-cli/info": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", + "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", "dev": true, - "license": "MIT", "dependencies": { "envinfo": "^7.7.3" }, @@ -1976,10 +1247,11 @@ "webpack-cli": "4.x.x" } }, - "clients/data-management-client/node_modules/@webpack-cli/serve": { + "clients/dashboard-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", + "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", "dev": true, - "license": "MIT", "peerDependencies": { "webpack-cli": "4.x.x" }, @@ -1989,73 +1261,118 @@ } } }, - "clients/data-management-client/node_modules/ts-jest": { - "version": "29.4.6", + "clients/dashboard-client/node_modules/webpack-cli": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", + "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "dev": true, - "license": "MIT", "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.2.0", + "@webpack-cli/info": "^1.5.0", + "@webpack-cli/serve": "^1.7.0", + "colorette": "^2.0.14", + "commander": "^7.0.0", + "cross-spawn": "^7.0.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "webpack-merge": "^5.7.3" }, "bin": { - "ts-jest": "cli.js" + "webpack-cli": "bin/cli.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "4.x.x || 5.x.x" }, "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { + "@webpack-cli/generators": { "optional": true }, - "babel-jest": { + "@webpack-cli/migrate": { "optional": true }, - "esbuild": { + "webpack-bundle-analyzer": { "optional": true }, - "jest-util": { + "webpack-dev-server": { "optional": true } } }, - "clients/data-management-client/node_modules/type-fest": { - "version": "4.41.0", + "clients/data-management-client": { + "name": "@epilot/data-management-client", + "version": "1.2.24", + "license": "MIT", + "dependencies": { + "@dazn/lambda-powertools-correlation-ids": "^1.28.1", + "buffer": "^6.0.3", + "https-browserify": "^1.0.0", + "openapi-client-axios": "^7.8.0", + "stream-http": "^3.2.0", + "url": "^0.11.0", + "util": "^0.12.3" + }, + "devDependencies": { + "axios": "^1.11.0", + "copy-webpack-plugin": "^7.0.0", + "json-loader": "^0.5.7", + "openapicmd": "^2.7.0", + "ts-loader": "^8.0.14", + "ts-node": "^10.9.2", + "typescript": "^4.1.3", + "webpack": "^5.101.0", + "webpack-cli": "^4.10.0" + }, + "peerDependencies": { + "axios": "^1.0.0 || >=0.25.0 <1.0.0" + } + }, + "clients/data-management-client/node_modules/@webpack-cli/configtest": { + "version": "1.2.0", "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" + "license": "MIT", + "peerDependencies": { + "webpack": "4.x.x || 5.x.x", + "webpack-cli": "4.x.x" + } + }, + "clients/data-management-client/node_modules/@webpack-cli/info": { + "version": "1.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "envinfo": "^7.7.3" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "webpack-cli": "4.x.x" + } + }, + "clients/data-management-client/node_modules/@webpack-cli/serve": { + "version": "1.7.0", + "dev": true, + "license": "MIT", + "peerDependencies": { + "webpack-cli": "4.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } } }, "clients/data-management-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -2112,13 +1429,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.2", "typescript": "^4.1.3", @@ -2162,73 +1476,10 @@ } } }, - "clients/deduplication-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/deduplication-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "clients/deduplication-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -2285,13 +1536,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -2335,73 +1583,10 @@ } } }, - "clients/design-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/design-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "clients/design-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -2447,6 +1632,7 @@ "clients/discussion-client": { "name": "@epilot/discussion-client", "version": "1.10.2", + "extraneous": true, "license": "UNLICENSED", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", @@ -2475,7 +1661,34 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/discussion-client/node_modules/@webpack-cli/configtest": { + "clients/document-client": { + "name": "@epilot/document-client", + "version": "0.19.1", + "license": "UNLICENSED", + "dependencies": { + "buffer": "^6.0.3", + "https-browserify": "^1.0.0", + "openapi-client-axios": "^7.8.0", + "stream-http": "^3.1.1", + "url": "^0.11.0", + "util": "^0.12.3" + }, + "devDependencies": { + "axios": "^1.11.0", + "copy-webpack-plugin": "^7.0.0", + "json-loader": "^0.5.7", + "openapicmd": "^2.7.0", + "ts-loader": "^8.0.14", + "ts-node": "^10.9.1", + "typescript": "^4.1.3", + "webpack": "^5.18.0", + "webpack-cli": "^4.4.0" + }, + "peerDependencies": { + "axios": "^1.0.0 || >=0.25.0 <1.0.0" + } + }, + "clients/document-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -2484,7 +1697,7 @@ "webpack-cli": "4.x.x" } }, - "clients/discussion-client/node_modules/@webpack-cli/info": { + "clients/document-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -2495,7 +1708,7 @@ "webpack-cli": "4.x.x" } }, - "clients/discussion-client/node_modules/@webpack-cli/serve": { + "clients/document-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -2508,73 +1721,10 @@ } } }, - "clients/discussion-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/discussion-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/discussion-client/node_modules/webpack-cli": { + "clients/document-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -2617,11 +1767,12 @@ } } }, - "clients/document-client": { - "name": "@epilot/document-client", - "version": "0.19.1", + "clients/email-settings-client": { + "name": "@epilot/email-settings-client", + "version": "1.4.0", "license": "UNLICENSED", "dependencies": { + "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", "https-browserify": "^1.0.0", "openapi-client-axios": "^7.8.0", @@ -2630,24 +1781,21 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", "webpack": "^5.18.0", - "webpack-cli": "^4.4.0" + "webpack-cli": "^4.10.0" }, "peerDependencies": { "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/document-client/node_modules/@webpack-cli/configtest": { + "clients/email-settings-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -2656,7 +1804,7 @@ "webpack-cli": "4.x.x" } }, - "clients/document-client/node_modules/@webpack-cli/info": { + "clients/email-settings-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -2667,7 +1815,7 @@ "webpack-cli": "4.x.x" } }, - "clients/document-client/node_modules/@webpack-cli/serve": { + "clients/email-settings-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -2680,73 +1828,12 @@ } } }, - "clients/document-client/node_modules/ts-jest": { - "version": "29.4.5", + "clients/email-settings-client/node_modules/webpack-cli": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", + "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "dev": true, "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/document-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/document-client/node_modules/webpack-cli": { - "version": "4.10.0", - "dev": true, - "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -2789,9 +1876,9 @@ } } }, - "clients/email-settings-client": { - "name": "@epilot/email-settings-client", - "version": "1.4.0", + "clients/email-template-client": { + "name": "@epilot/email-template-client", + "version": "2.2.3", "license": "UNLICENSED", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", @@ -2803,24 +1890,21 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", "webpack": "^5.18.0", - "webpack-cli": "^4.10.0" + "webpack-cli": "^4.4.0" }, "peerDependencies": { "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/email-settings-client/node_modules/@webpack-cli/configtest": { + "clients/email-template-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -2829,7 +1913,7 @@ "webpack-cli": "4.x.x" } }, - "clients/email-settings-client/node_modules/@webpack-cli/info": { + "clients/email-template-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -2840,7 +1924,7 @@ "webpack-cli": "4.x.x" } }, - "clients/email-settings-client/node_modules/@webpack-cli/serve": { + "clients/email-template-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -2853,75 +1937,10 @@ } } }, - "clients/email-settings-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/email-settings-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/email-settings-client/node_modules/webpack-cli": { + "clients/email-template-client/node_modules/webpack-cli": { "version": "4.10.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", - "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -2964,10 +1983,10 @@ } } }, - "clients/email-template-client": { - "name": "@epilot/email-template-client", - "version": "2.2.3", - "license": "UNLICENSED", + "clients/entity-client": { + "name": "@epilot/entity-client", + "version": "6.14.0", + "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", @@ -2978,13 +1997,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -2995,7 +2011,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/email-template-client/node_modules/@webpack-cli/configtest": { + "clients/entity-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -3004,7 +2020,7 @@ "webpack-cli": "4.x.x" } }, - "clients/email-template-client/node_modules/@webpack-cli/info": { + "clients/entity-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -3015,7 +2031,7 @@ "webpack-cli": "4.x.x" } }, - "clients/email-template-client/node_modules/@webpack-cli/serve": { + "clients/entity-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -3028,73 +2044,10 @@ } } }, - "clients/email-template-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/email-template-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/email-template-client/node_modules/webpack-cli": { + "clients/entity-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -3137,9 +2090,9 @@ } } }, - "clients/entity-client": { - "name": "@epilot/entity-client", - "version": "6.14.0", + "clients/entity-mapping-client": { + "name": "@epilot/entity-mapping-client", + "version": "0.10.4-alpha", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", @@ -3151,13 +2104,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -3168,7 +2118,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/entity-client/node_modules/@webpack-cli/configtest": { + "clients/entity-mapping-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -3177,7 +2127,7 @@ "webpack-cli": "4.x.x" } }, - "clients/entity-client/node_modules/@webpack-cli/info": { + "clients/entity-mapping-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -3188,7 +2138,7 @@ "webpack-cli": "4.x.x" } }, - "clients/entity-client/node_modules/@webpack-cli/serve": { + "clients/entity-mapping-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -3201,73 +2151,10 @@ } } }, - "clients/entity-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/entity-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/entity-client/node_modules/webpack-cli": { + "clients/entity-mapping-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -3310,9 +2197,9 @@ } } }, - "clients/entity-mapping-client": { - "name": "@epilot/entity-mapping-client", - "version": "0.10.4-alpha", + "clients/environments-client": { + "name": "@epilot/environments-client", + "version": "0.2.1", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", @@ -3324,13 +2211,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^28.1.3", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -3341,17 +2225,10 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/entity-mapping-client/node_modules/@types/jest": { - "version": "28.1.8", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^28.0.0", - "pretty-format": "^28.0.0" - } - }, - "clients/entity-mapping-client/node_modules/@webpack-cli/configtest": { + "clients/environments-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", + "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", "dev": true, "license": "MIT", "peerDependencies": { @@ -3359,8 +2236,10 @@ "webpack-cli": "4.x.x" } }, - "clients/entity-mapping-client/node_modules/@webpack-cli/info": { + "clients/environments-client/node_modules/@webpack-cli/info": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", + "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3370,8 +2249,10 @@ "webpack-cli": "4.x.x" } }, - "clients/entity-mapping-client/node_modules/@webpack-cli/serve": { + "clients/environments-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", + "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", "dev": true, "license": "MIT", "peerDependencies": { @@ -3383,73 +2264,12 @@ } } }, - "clients/entity-mapping-client/node_modules/ts-jest": { - "version": "29.4.5", + "clients/environments-client/node_modules/webpack-cli": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", + "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "dev": true, "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/entity-mapping-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/entity-mapping-client/node_modules/webpack-cli": { - "version": "4.10.0", - "dev": true, - "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -3492,9 +2312,9 @@ } } }, - "clients/environments-client": { - "name": "@epilot/environments-client", - "version": "0.2.1", + "clients/erp-integration-client": { + "name": "@epilot/erp-integration-client", + "version": "0.27.2", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", @@ -3506,27 +2326,22 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", - "axios": "^1.11.0", + "axios": "^1.13.5", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", - "webpack": "^5.18.0", + "webpack": "^5.104.1", "webpack-cli": "^4.4.0" }, "peerDependencies": { "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/environments-client/node_modules/@webpack-cli/configtest": { + "clients/erp-integration-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", - "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", "dev": true, "license": "MIT", "peerDependencies": { @@ -3534,10 +2349,8 @@ "webpack-cli": "4.x.x" } }, - "clients/environments-client/node_modules/@webpack-cli/info": { + "clients/erp-integration-client/node_modules/@webpack-cli/info": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", - "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3547,10 +2360,8 @@ "webpack-cli": "4.x.x" } }, - "clients/environments-client/node_modules/@webpack-cli/serve": { + "clients/erp-integration-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", - "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", "dev": true, "license": "MIT", "peerDependencies": { @@ -3562,79 +2373,10 @@ } } }, - "clients/environments-client/node_modules/ts-jest": { - "version": "29.4.6", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.6.tgz", - "integrity": "sha512-fSpWtOO/1AjSNQguk43hb/JCo16oJDnMJf3CdEGNkqsEX3t0KX96xvyX1D7PfLCpVoKu4MfVrqUkFyblYoY4lA==", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/environments-client/node_modules/type-fest": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", - "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/environments-client/node_modules/webpack-cli": { + "clients/erp-integration-client/node_modules/webpack-cli": { "version": "4.10.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", - "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -3677,9 +2419,9 @@ } } }, - "clients/erp-integration-client": { - "name": "@epilot/erp-integration-client", - "version": "0.27.2", + "clients/event-catalog-client": { + "name": "@epilot/event-catalog-client", + "version": "0.4.2", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", @@ -3691,24 +2433,21 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", - "axios": "^1.13.5", + "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", - "webpack": "^5.104.1", + "webpack": "^5.18.0", "webpack-cli": "^4.4.0" }, "peerDependencies": { "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/erp-integration-client/node_modules/@webpack-cli/configtest": { + "clients/event-catalog-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -3717,7 +2456,7 @@ "webpack-cli": "4.x.x" } }, - "clients/erp-integration-client/node_modules/@webpack-cli/info": { + "clients/event-catalog-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -3728,7 +2467,7 @@ "webpack-cli": "4.x.x" } }, - "clients/erp-integration-client/node_modules/@webpack-cli/serve": { + "clients/event-catalog-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -3741,73 +2480,10 @@ } } }, - "clients/erp-integration-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/erp-integration-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/erp-integration-client/node_modules/webpack-cli": { + "clients/event-catalog-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -3850,12 +2526,11 @@ } } }, - "clients/event-catalog-client": { - "name": "@epilot/event-catalog-client", - "version": "0.4.2", + "clients/file-client": { + "name": "@epilot/file-client", + "version": "1.23.0", "license": "MIT", "dependencies": { - "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", "https-browserify": "^1.0.0", "openapi-client-axios": "^7.8.0", @@ -3864,13 +2539,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -3881,7 +2553,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/event-catalog-client/node_modules/@webpack-cli/configtest": { + "clients/file-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -3890,7 +2562,7 @@ "webpack-cli": "4.x.x" } }, - "clients/event-catalog-client/node_modules/@webpack-cli/info": { + "clients/file-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -3901,7 +2573,7 @@ "webpack-cli": "4.x.x" } }, - "clients/event-catalog-client/node_modules/@webpack-cli/serve": { + "clients/file-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -3914,73 +2586,10 @@ } } }, - "clients/event-catalog-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/event-catalog-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/event-catalog-client/node_modules/webpack-cli": { + "clients/file-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -4023,11 +2632,12 @@ } } }, - "clients/file-client": { - "name": "@epilot/file-client", - "version": "1.23.0", + "clients/iban-client": { + "name": "@epilot/iban-client", + "version": "0.3.0", "license": "MIT", "dependencies": { + "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", "https-browserify": "^1.0.0", "openapi-client-axios": "^7.8.0", @@ -4036,13 +2646,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -4053,7 +2660,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/file-client/node_modules/@webpack-cli/configtest": { + "clients/iban-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -4062,7 +2669,7 @@ "webpack-cli": "4.x.x" } }, - "clients/file-client/node_modules/@webpack-cli/info": { + "clients/iban-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -4073,7 +2680,7 @@ "webpack-cli": "4.x.x" } }, - "clients/file-client/node_modules/@webpack-cli/serve": { + "clients/iban-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -4086,118 +2693,97 @@ } } }, - "clients/file-client/node_modules/ts-jest": { - "version": "29.4.5", + "clients/iban-client/node_modules/webpack-cli": { + "version": "4.10.0", "dev": true, "license": "MIT", "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.2.0", + "@webpack-cli/info": "^1.5.0", + "@webpack-cli/serve": "^1.7.0", + "colorette": "^2.0.14", + "commander": "^7.0.0", + "cross-spawn": "^7.0.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "webpack-merge": "^5.7.3" }, "bin": { - "ts-jest": "cli.js" + "webpack-cli": "bin/cli.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" + "webpack": "4.x.x || 5.x.x" }, "peerDependenciesMeta": { - "@babel/core": { + "@webpack-cli/generators": { "optional": true }, - "@jest/transform": { + "@webpack-cli/migrate": { "optional": true }, - "@jest/types": { + "webpack-bundle-analyzer": { "optional": true }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { + "webpack-dev-server": { "optional": true } } }, - "clients/file-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" + "clients/journey-client": { + "name": "@epilot/journey-client", + "version": "0.5.1", + "license": "UNLICENSED", + "dependencies": { + "buffer": "^6.0.3", + "https-browserify": "^1.0.0", + "openapi-backend": "5.11.1", + "openapi-client-axios": "^7.8.0", + "stream-http": "^3.1.1", + "url": "^0.11.0", + "util": "^0.12.3" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "devDependencies": { + "@vitest/coverage-v8": "^1.6.0", + "axios": "^1.11.0", + "copy-webpack-plugin": "^7.0.0", + "json-loader": "^0.5.7", + "openapi-client-axios-typegen": "^7.5.1", + "openapicmd": "^2.7.0", + "ts-loader": "^8.3.0", + "typescript": "^5.4.5", + "vitest": "^1.6.0", + "webpack": "^5.91.0", + "webpack-cli": "^5.1.4" + }, + "peerDependencies": { + "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/file-client/node_modules/webpack-cli": { - "version": "4.10.0", + "clients/journey-client/node_modules/typescript": { + "version": "5.8.3", "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.2.0", - "@webpack-cli/info": "^1.5.0", - "@webpack-cli/serve": "^1.7.0", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "cross-spawn": "^7.0.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "webpack-merge": "^5.7.3" - }, + "license": "Apache-2.0", "bin": { - "webpack-cli": "bin/cli.js" + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "@webpack-cli/migrate": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } + "node": ">=14.17" } }, - "clients/iban-client": { - "name": "@epilot/iban-client", - "version": "0.3.0", + "clients/kanban-client": { + "name": "@epilot/kanban-client", + "version": "1.2.0", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", @@ -4209,13 +2795,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -4226,7 +2809,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/iban-client/node_modules/@webpack-cli/configtest": { + "clients/kanban-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -4235,7 +2818,7 @@ "webpack-cli": "4.x.x" } }, - "clients/iban-client/node_modules/@webpack-cli/info": { + "clients/kanban-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -4246,7 +2829,7 @@ "webpack-cli": "4.x.x" } }, - "clients/iban-client/node_modules/@webpack-cli/serve": { + "clients/kanban-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -4259,73 +2842,10 @@ } } }, - "clients/iban-client/node_modules/ts-jest": { - "version": "29.4.6", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/iban-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/iban-client/node_modules/webpack-cli": { + "clients/kanban-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -4368,52 +2888,10 @@ } } }, - "clients/journey-client": { - "name": "@epilot/journey-client", - "version": "0.5.1", + "clients/message-client": { + "name": "@epilot/message-client", + "version": "1.26.0", "license": "UNLICENSED", - "dependencies": { - "buffer": "^6.0.3", - "https-browserify": "^1.0.0", - "openapi-backend": "5.11.1", - "openapi-client-axios": "^7.8.0", - "stream-http": "^3.1.1", - "url": "^0.11.0", - "util": "^0.12.3" - }, - "devDependencies": { - "@vitest/coverage-v8": "^1.6.0", - "axios": "^1.11.0", - "copy-webpack-plugin": "^7.0.0", - "json-loader": "^0.5.7", - "openapi-client-axios-typegen": "^7.5.1", - "openapicmd": "^2.7.0", - "ts-loader": "^8.3.0", - "typescript": "^5.4.5", - "vitest": "^1.6.0", - "webpack": "^5.91.0", - "webpack-cli": "^5.1.4" - }, - "peerDependencies": { - "axios": "^1.0.0 || >=0.25.0 <1.0.0" - } - }, - "clients/journey-client/node_modules/typescript": { - "version": "5.8.3", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "clients/kanban-client": { - "name": "@epilot/kanban-client", - "version": "1.2.0", - "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", @@ -4424,13 +2902,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -4441,7 +2916,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/kanban-client/node_modules/@webpack-cli/configtest": { + "clients/message-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -4450,7 +2925,7 @@ "webpack-cli": "4.x.x" } }, - "clients/kanban-client/node_modules/@webpack-cli/info": { + "clients/message-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -4461,7 +2936,7 @@ "webpack-cli": "4.x.x" } }, - "clients/kanban-client/node_modules/@webpack-cli/serve": { + "clients/message-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -4474,73 +2949,10 @@ } } }, - "clients/kanban-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/kanban-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/kanban-client/node_modules/webpack-cli": { + "clients/message-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -4583,12 +2995,11 @@ } } }, - "clients/message-client": { - "name": "@epilot/message-client", - "version": "1.26.0", + "clients/metering-client": { + "name": "@epilot/metering-client", + "version": "0.9.1", "license": "UNLICENSED", "dependencies": { - "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", "https-browserify": "^1.0.0", "openapi-client-axios": "^7.8.0", @@ -4597,13 +3008,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -4614,7 +3022,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/message-client/node_modules/@webpack-cli/configtest": { + "clients/metering-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -4623,7 +3031,7 @@ "webpack-cli": "4.x.x" } }, - "clients/message-client/node_modules/@webpack-cli/info": { + "clients/metering-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -4634,7 +3042,7 @@ "webpack-cli": "4.x.x" } }, - "clients/message-client/node_modules/@webpack-cli/serve": { + "clients/metering-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -4647,73 +3055,10 @@ } } }, - "clients/message-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/message-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/message-client/node_modules/webpack-cli": { + "clients/metering-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -4756,28 +3101,26 @@ } } }, - "clients/metering-client": { - "name": "@epilot/metering-client", - "version": "0.9.1", - "license": "UNLICENSED", + "clients/notes-client": { + "name": "@epilot/notes-client", + "version": "0.21.7", + "license": "MIT", "dependencies": { + "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", "https-browserify": "^1.0.0", "openapi-client-axios": "^7.8.0", - "stream-http": "^3.1.1", + "stream-http": "^3.2.0", "url": "^0.11.0", "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", - "ts-node": "^10.9.1", + "ts-node": "^10.9.2", "typescript": "^4.1.3", "webpack": "^5.18.0", "webpack-cli": "^4.4.0" @@ -4786,7 +3129,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/metering-client/node_modules/@webpack-cli/configtest": { + "clients/notes-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -4795,7 +3138,7 @@ "webpack-cli": "4.x.x" } }, - "clients/metering-client/node_modules/@webpack-cli/info": { + "clients/notes-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -4806,7 +3149,7 @@ "webpack-cli": "4.x.x" } }, - "clients/metering-client/node_modules/@webpack-cli/serve": { + "clients/notes-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -4819,73 +3162,10 @@ } } }, - "clients/metering-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/metering-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/metering-client/node_modules/webpack-cli": { + "clients/notes-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -4928,29 +3208,26 @@ } } }, - "clients/notes-client": { - "name": "@epilot/notes-client", - "version": "0.21.7", - "license": "MIT", + "clients/notification-client": { + "name": "@epilot/notification-client", + "version": "0.13.0", + "license": "UNLICENSED", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", "https-browserify": "^1.0.0", "openapi-client-axios": "^7.8.0", - "stream-http": "^3.2.0", + "stream-http": "^3.1.1", "url": "^0.11.0", "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", - "ts-node": "^10.9.2", + "ts-node": "^10.9.1", "typescript": "^4.1.3", "webpack": "^5.18.0", "webpack-cli": "^4.4.0" @@ -4959,7 +3236,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/notes-client/node_modules/@webpack-cli/configtest": { + "clients/notification-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -4968,7 +3245,7 @@ "webpack-cli": "4.x.x" } }, - "clients/notes-client/node_modules/@webpack-cli/info": { + "clients/notification-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -4979,7 +3256,7 @@ "webpack-cli": "4.x.x" } }, - "clients/notes-client/node_modules/@webpack-cli/serve": { + "clients/notification-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -4992,73 +3269,10 @@ } } }, - "clients/notes-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/notes-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/notes-client/node_modules/webpack-cli": { + "clients/notification-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -5101,10 +3315,10 @@ } } }, - "clients/notification-client": { - "name": "@epilot/notification-client", - "version": "0.13.0", - "license": "UNLICENSED", + "clients/organization-client": { + "name": "@epilot/organization-client", + "version": "0.13.2", + "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", @@ -5115,13 +3329,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -5132,7 +3343,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/notification-client/node_modules/@webpack-cli/configtest": { + "clients/organization-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -5141,7 +3352,7 @@ "webpack-cli": "4.x.x" } }, - "clients/notification-client/node_modules/@webpack-cli/info": { + "clients/organization-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -5152,7 +3363,7 @@ "webpack-cli": "4.x.x" } }, - "clients/notification-client/node_modules/@webpack-cli/serve": { + "clients/organization-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -5165,73 +3376,10 @@ } } }, - "clients/notification-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/notification-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/notification-client/node_modules/webpack-cli": { + "clients/organization-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -5274,10 +3422,10 @@ } } }, - "clients/organization-client": { - "name": "@epilot/organization-client", - "version": "0.13.2", - "license": "MIT", + "clients/partner-directory-client": { + "name": "@epilot/partner-directory-client", + "version": "0.15.0", + "license": "UNLICENSED", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", @@ -5288,16 +3436,13 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", - "ts-loader": "^8.0.14", + "ts-loader": "^8.3.0", "ts-node": "^10.9.1", - "typescript": "^4.1.3", + "typescript": "^4.5.4", "webpack": "^5.18.0", "webpack-cli": "^4.4.0" }, @@ -5305,7 +3450,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/organization-client/node_modules/@webpack-cli/configtest": { + "clients/partner-directory-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -5314,7 +3459,7 @@ "webpack-cli": "4.x.x" } }, - "clients/organization-client/node_modules/@webpack-cli/info": { + "clients/partner-directory-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -5325,7 +3470,7 @@ "webpack-cli": "4.x.x" } }, - "clients/organization-client/node_modules/@webpack-cli/serve": { + "clients/partner-directory-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -5338,73 +3483,10 @@ } } }, - "clients/organization-client/node_modules/ts-jest": { - "version": "29.4.5", + "clients/partner-directory-client/node_modules/webpack-cli": { + "version": "4.10.0", "dev": true, "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/organization-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/organization-client/node_modules/webpack-cli": { - "version": "4.10.0", - "dev": true, - "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -5447,10 +3529,10 @@ } } }, - "clients/partner-directory-client": { - "name": "@epilot/partner-directory-client", - "version": "0.15.0", - "license": "UNLICENSED", + "clients/permissions-client": { + "name": "@epilot/permissions-client", + "version": "0.16.3", + "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", @@ -5461,16 +3543,13 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", - "ts-loader": "^8.3.0", + "ts-loader": "^8.0.14", "ts-node": "^10.9.1", - "typescript": "^4.5.4", + "typescript": "^4.1.3", "webpack": "^5.18.0", "webpack-cli": "^4.4.0" }, @@ -5478,7 +3557,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/partner-directory-client/node_modules/@webpack-cli/configtest": { + "clients/permissions-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -5487,7 +3566,7 @@ "webpack-cli": "4.x.x" } }, - "clients/partner-directory-client/node_modules/@webpack-cli/info": { + "clients/permissions-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -5498,7 +3577,7 @@ "webpack-cli": "4.x.x" } }, - "clients/partner-directory-client/node_modules/@webpack-cli/serve": { + "clients/permissions-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -5511,73 +3590,10 @@ } } }, - "clients/partner-directory-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/partner-directory-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/partner-directory-client/node_modules/webpack-cli": { + "clients/permissions-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -5620,9 +3636,9 @@ } } }, - "clients/permissions-client": { - "name": "@epilot/permissions-client", - "version": "0.16.3", + "clients/pricing-client": { + "name": "@epilot/pricing-client", + "version": "3.53.5", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", @@ -5634,13 +3650,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -5651,7 +3664,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/permissions-client/node_modules/@webpack-cli/configtest": { + "clients/pricing-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -5660,7 +3673,7 @@ "webpack-cli": "4.x.x" } }, - "clients/permissions-client/node_modules/@webpack-cli/info": { + "clients/pricing-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -5671,7 +3684,7 @@ "webpack-cli": "4.x.x" } }, - "clients/permissions-client/node_modules/@webpack-cli/serve": { + "clients/pricing-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -5684,73 +3697,10 @@ } } }, - "clients/permissions-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/permissions-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/permissions-client/node_modules/webpack-cli": { + "clients/pricing-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -5793,9 +3743,9 @@ } } }, - "clients/pricing-client": { - "name": "@epilot/pricing-client", - "version": "3.53.5", + "clients/pricing-tier-client": { + "name": "@epilot/pricing-tier-client", + "version": "1.2.2", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", @@ -5807,13 +3757,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -5824,7 +3771,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/pricing-client/node_modules/@webpack-cli/configtest": { + "clients/pricing-tier-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -5833,7 +3780,7 @@ "webpack-cli": "4.x.x" } }, - "clients/pricing-client/node_modules/@webpack-cli/info": { + "clients/pricing-tier-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -5844,7 +3791,7 @@ "webpack-cli": "4.x.x" } }, - "clients/pricing-client/node_modules/@webpack-cli/serve": { + "clients/pricing-tier-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -5857,73 +3804,10 @@ } } }, - "clients/pricing-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/pricing-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/pricing-client/node_modules/webpack-cli": { + "clients/pricing-tier-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -5966,29 +3850,26 @@ } } }, - "clients/pricing-tier-client": { - "name": "@epilot/pricing-tier-client", - "version": "1.2.2", + "clients/purpose-client": { + "name": "@epilot/purpose-client", + "version": "0.1.0", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", "https-browserify": "^1.0.0", "openapi-client-axios": "^7.8.0", - "stream-http": "^3.1.1", + "stream-http": "^3.2.0", "url": "^0.11.0", "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", - "ts-node": "^10.9.1", + "ts-node": "^10.9.2", "typescript": "^4.1.3", "webpack": "^5.18.0", "webpack-cli": "^4.4.0" @@ -5997,7 +3878,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/pricing-tier-client/node_modules/@webpack-cli/configtest": { + "clients/purpose-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -6006,7 +3887,7 @@ "webpack-cli": "4.x.x" } }, - "clients/pricing-tier-client/node_modules/@webpack-cli/info": { + "clients/purpose-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -6017,7 +3898,7 @@ "webpack-cli": "4.x.x" } }, - "clients/pricing-tier-client/node_modules/@webpack-cli/serve": { + "clients/purpose-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -6030,73 +3911,117 @@ } } }, - "clients/pricing-tier-client/node_modules/ts-jest": { - "version": "29.4.5", + "clients/purpose-client/node_modules/webpack-cli": { + "version": "4.10.0", "dev": true, "license": "MIT", "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.2.0", + "@webpack-cli/info": "^1.5.0", + "@webpack-cli/serve": "^1.7.0", + "colorette": "^2.0.14", + "commander": "^7.0.0", + "cross-spawn": "^7.0.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "webpack-merge": "^5.7.3" }, "bin": { - "ts-jest": "cli.js" + "webpack-cli": "bin/cli.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" + "webpack": "4.x.x || 5.x.x" }, "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { + "@webpack-cli/generators": { "optional": true }, - "@jest/types": { + "@webpack-cli/migrate": { "optional": true }, - "babel-jest": { + "webpack-bundle-analyzer": { "optional": true }, - "esbuild": { - "optional": true - }, - "jest-util": { + "webpack-dev-server": { "optional": true } } }, - "clients/pricing-tier-client/node_modules/type-fest": { - "version": "4.41.0", + "clients/sandbox-client": { + "name": "@epilot/sandbox-client", + "version": "0.4.2", + "license": "MIT", + "dependencies": { + "@dazn/lambda-powertools-correlation-ids": "^1.28.1", + "buffer": "^6.0.3", + "https-browserify": "^1.0.0", + "openapi-client-axios": "^7.8.0", + "stream-http": "^3.1.1", + "url": "^0.11.0", + "util": "^0.12.3" + }, + "devDependencies": { + "axios": "^1.11.0", + "copy-webpack-plugin": "^7.0.0", + "json-loader": "^0.5.7", + "openapicmd": "^2.7.0", + "ts-loader": "^8.0.14", + "ts-node": "^10.9.1", + "typescript": "^4.1.3", + "webpack": "^5.18.0", + "webpack-cli": "^4.4.0" + }, + "peerDependencies": { + "axios": "^1.0.0 || >=0.25.0 <1.0.0" + } + }, + "clients/sandbox-client/node_modules/@webpack-cli/configtest": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "peerDependencies": { + "webpack": "4.x.x || 5.x.x", + "webpack-cli": "4.x.x" + } + }, + "clients/sandbox-client/node_modules/@webpack-cli/info": { + "version": "1.5.0", "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" + "license": "MIT", + "dependencies": { + "envinfo": "^7.7.3" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "webpack-cli": "4.x.x" } }, - "clients/pricing-tier-client/node_modules/webpack-cli": { + "clients/sandbox-client/node_modules/@webpack-cli/serve": { + "version": "1.7.0", + "dev": true, + "license": "MIT", + "peerDependencies": { + "webpack-cli": "4.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "clients/sandbox-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -6139,29 +4064,26 @@ } } }, - "clients/purpose-client": { - "name": "@epilot/purpose-client", - "version": "0.1.0", + "clients/submission-client": { + "name": "@epilot/submission-client", + "version": "1.8.3", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", "https-browserify": "^1.0.0", "openapi-client-axios": "^7.8.0", - "stream-http": "^3.2.0", + "stream-http": "^3.1.1", "url": "^0.11.0", "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", - "ts-node": "^10.9.2", + "ts-node": "^10.9.1", "typescript": "^4.1.3", "webpack": "^5.18.0", "webpack-cli": "^4.4.0" @@ -6170,7 +4092,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/purpose-client/node_modules/@webpack-cli/configtest": { + "clients/submission-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -6179,7 +4101,7 @@ "webpack-cli": "4.x.x" } }, - "clients/purpose-client/node_modules/@webpack-cli/info": { + "clients/submission-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -6190,7 +4112,7 @@ "webpack-cli": "4.x.x" } }, - "clients/purpose-client/node_modules/@webpack-cli/serve": { + "clients/submission-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -6203,73 +4125,10 @@ } } }, - "clients/purpose-client/node_modules/ts-jest": { - "version": "29.4.6", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/purpose-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/purpose-client/node_modules/webpack-cli": { + "clients/submission-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -6312,9 +4171,9 @@ } } }, - "clients/sandbox-client": { - "name": "@epilot/sandbox-client", - "version": "0.4.2", + "clients/targeting-client": { + "name": "@epilot/targeting-client", + "version": "0.15.1", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", @@ -6326,13 +4185,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -6343,7 +4199,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/sandbox-client/node_modules/@webpack-cli/configtest": { + "clients/targeting-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -6352,7 +4208,7 @@ "webpack-cli": "4.x.x" } }, - "clients/sandbox-client/node_modules/@webpack-cli/info": { + "clients/targeting-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -6363,7 +4219,7 @@ "webpack-cli": "4.x.x" } }, - "clients/sandbox-client/node_modules/@webpack-cli/serve": { + "clients/targeting-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -6376,73 +4232,10 @@ } } }, - "clients/sandbox-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/sandbox-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/sandbox-client/node_modules/webpack-cli": { + "clients/targeting-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -6485,10 +4278,10 @@ } } }, - "clients/submission-client": { - "name": "@epilot/submission-client", - "version": "1.8.3", - "license": "MIT", + "clients/template-variables-client": { + "name": "@epilot/template-variables-client", + "version": "1.17.0", + "license": "UNLICENSED", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", @@ -6499,13 +4292,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -6516,7 +4306,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/submission-client/node_modules/@webpack-cli/configtest": { + "clients/template-variables-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -6525,7 +4315,7 @@ "webpack-cli": "4.x.x" } }, - "clients/submission-client/node_modules/@webpack-cli/info": { + "clients/template-variables-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -6536,7 +4326,7 @@ "webpack-cli": "4.x.x" } }, - "clients/submission-client/node_modules/@webpack-cli/serve": { + "clients/template-variables-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -6549,73 +4339,10 @@ } } }, - "clients/submission-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/submission-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/submission-client/node_modules/webpack-cli": { + "clients/template-variables-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -6658,9 +4385,9 @@ } } }, - "clients/targeting-client": { - "name": "@epilot/targeting-client", - "version": "0.15.1", + "clients/user-client": { + "name": "@epilot/user-client", + "version": "3.13.1", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", @@ -6672,13 +4399,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -6689,7 +4413,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/targeting-client/node_modules/@webpack-cli/configtest": { + "clients/user-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -6698,7 +4422,7 @@ "webpack-cli": "4.x.x" } }, - "clients/targeting-client/node_modules/@webpack-cli/info": { + "clients/user-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -6709,7 +4433,7 @@ "webpack-cli": "4.x.x" } }, - "clients/targeting-client/node_modules/@webpack-cli/serve": { + "clients/user-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -6722,73 +4446,10 @@ } } }, - "clients/targeting-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/targeting-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/targeting-client/node_modules/webpack-cli": { + "clients/user-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -6831,10 +4492,51 @@ } } }, - "clients/template-variables-client": { - "name": "@epilot/template-variables-client", - "version": "1.17.0", - "license": "UNLICENSED", + "clients/validation-rules-client": { + "name": "@epilot/validation-rules-client", + "version": "1.1.10", + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3", + "https-browserify": "^1.0.0", + "openapi-backend": "5.11.1", + "openapi-client-axios": "^7.8.0", + "stream-http": "^3.1.1", + "url": "^0.11.0", + "util": "^0.12.3" + }, + "devDependencies": { + "@vitest/coverage-v8": "^1.6.0", + "axios": "^1.11.0", + "copy-webpack-plugin": "^7.0.0", + "json-loader": "^0.5.7", + "openapi-client-axios-typegen": "^7.5.1", + "ts-loader": "^8.3.0", + "typescript": "^5.4.5", + "vitest": "^1.6.0", + "webpack": "^5.91.0", + "webpack-cli": "^5.1.4" + }, + "peerDependencies": { + "axios": "^1.0.0 || >=0.25.0 <1.0.0" + } + }, + "clients/validation-rules-client/node_modules/typescript": { + "version": "5.9.3", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "clients/webhooks-client": { + "name": "@epilot/webhooks-client", + "version": "2.18.0", + "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", @@ -6845,13 +4547,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -6862,7 +4561,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/template-variables-client/node_modules/@webpack-cli/configtest": { + "clients/webhooks-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -6871,7 +4570,7 @@ "webpack-cli": "4.x.x" } }, - "clients/template-variables-client/node_modules/@webpack-cli/info": { + "clients/webhooks-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -6882,7 +4581,7 @@ "webpack-cli": "4.x.x" } }, - "clients/template-variables-client/node_modules/@webpack-cli/serve": { + "clients/webhooks-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -6895,73 +4594,10 @@ } } }, - "clients/template-variables-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/template-variables-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/template-variables-client/node_modules/webpack-cli": { + "clients/webhooks-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -7004,9 +4640,9 @@ } } }, - "clients/user-client": { - "name": "@epilot/user-client", - "version": "3.13.1", + "clients/workflow-client": { + "name": "@epilot/workflow-client", + "version": "1.21.0", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", @@ -7018,13 +4654,10 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", @@ -7035,7 +4668,7 @@ "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/user-client/node_modules/@webpack-cli/configtest": { + "clients/workflow-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -7044,7 +4677,7 @@ "webpack-cli": "4.x.x" } }, - "clients/user-client/node_modules/@webpack-cli/info": { + "clients/workflow-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -7055,7 +4688,7 @@ "webpack-cli": "4.x.x" } }, - "clients/user-client/node_modules/@webpack-cli/serve": { + "clients/workflow-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -7068,73 +4701,10 @@ } } }, - "clients/user-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/user-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/user-client/node_modules/webpack-cli": { + "clients/workflow-client/node_modules/webpack-cli": { "version": "4.10.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -7177,50 +4747,9 @@ } } }, - "clients/validation-rules-client": { - "name": "@epilot/validation-rules-client", - "version": "1.1.10", - "license": "MIT", - "dependencies": { - "buffer": "^6.0.3", - "https-browserify": "^1.0.0", - "openapi-backend": "5.11.1", - "openapi-client-axios": "^7.8.0", - "stream-http": "^3.1.1", - "url": "^0.11.0", - "util": "^0.12.3" - }, - "devDependencies": { - "@vitest/coverage-v8": "^1.6.0", - "axios": "^1.11.0", - "copy-webpack-plugin": "^7.0.0", - "json-loader": "^0.5.7", - "openapi-client-axios-typegen": "^7.5.1", - "ts-loader": "^8.3.0", - "typescript": "^5.4.5", - "vitest": "^1.6.0", - "webpack": "^5.91.0", - "webpack-cli": "^5.1.4" - }, - "peerDependencies": { - "axios": "^1.0.0 || >=0.25.0 <1.0.0" - } - }, - "clients/validation-rules-client/node_modules/typescript": { - "version": "5.9.3", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "clients/webhooks-client": { - "name": "@epilot/webhooks-client", - "version": "2.18.0", + "clients/workflow-definition-client": { + "name": "@epilot/workflow-definition-client", + "version": "1.20.0", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", @@ -7232,24 +4761,21 @@ "util": "^0.12.3" }, "devDependencies": { - "@types/jest": "^26.0.20", "axios": "^1.11.0", "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", "json-loader": "^0.5.7", "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", "ts-loader": "^8.0.14", "ts-node": "^10.9.1", "typescript": "^4.1.3", "webpack": "^5.18.0", - "webpack-cli": "^4.4.0" + "webpack-cli": "^4.10.0" }, "peerDependencies": { "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "clients/webhooks-client/node_modules/@webpack-cli/configtest": { + "clients/workflow-definition-client/node_modules/@webpack-cli/configtest": { "version": "1.2.0", "dev": true, "license": "MIT", @@ -7258,7 +4784,7 @@ "webpack-cli": "4.x.x" } }, - "clients/webhooks-client/node_modules/@webpack-cli/info": { + "clients/workflow-definition-client/node_modules/@webpack-cli/info": { "version": "1.5.0", "dev": true, "license": "MIT", @@ -7269,7 +4795,7 @@ "webpack-cli": "4.x.x" } }, - "clients/webhooks-client/node_modules/@webpack-cli/serve": { + "clients/workflow-definition-client/node_modules/@webpack-cli/serve": { "version": "1.7.0", "dev": true, "license": "MIT", @@ -7282,73 +4808,10 @@ } } }, - "clients/webhooks-client/node_modules/ts-jest": { - "version": "29.4.5", + "clients/workflow-definition-client/node_modules/webpack-cli": { + "version": "4.10.0", "dev": true, "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/webhooks-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/webhooks-client/node_modules/webpack-cli": { - "version": "4.10.0", - "dev": true, - "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -7391,469 +4854,123 @@ } } }, - "clients/workflow-client": { - "name": "@epilot/workflow-client", - "version": "1.21.0", - "license": "MIT", + "node_modules/@adobe/css-tools": { + "version": "4.4.3", + "dev": true, + "license": "MIT" + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "dev": true, + "license": "Apache-2.0", "dependencies": { - "@dazn/lambda-powertools-correlation-ids": "^1.28.1", - "buffer": "^6.0.3", - "https-browserify": "^1.0.0", - "openapi-client-axios": "^7.8.0", - "stream-http": "^3.1.1", - "url": "^0.11.0", - "util": "^0.12.3" - }, - "devDependencies": { - "@types/jest": "^26.0.20", - "axios": "^1.11.0", - "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", - "json-loader": "^0.5.7", - "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", - "ts-loader": "^8.0.14", - "ts-node": "^10.9.1", - "typescript": "^4.1.3", - "webpack": "^5.18.0", - "webpack-cli": "^4.4.0" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, - "peerDependencies": { - "axios": "^1.0.0 || >=0.25.0 <1.0.0" + "engines": { + "node": ">=6.0.0" } }, - "clients/workflow-client/node_modules/@webpack-cli/configtest": { - "version": "1.2.0", + "node_modules/@anttiviljami/dtsgenerator": { + "version": "3.20.0", "dev": true, "license": "MIT", - "peerDependencies": { - "webpack": "4.x.x || 5.x.x", - "webpack-cli": "4.x.x" + "dependencies": { + "commander": "^11.1.0", + "cross-fetch": "^4.0.0", + "debug": "^4.3.4", + "glob": "^10.3.10", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "js-yaml": "^4.1.0", + "tslib": "^2.6.2", + "typescript": "^5.2.2" + }, + "bin": { + "dtsgen": "bin/dtsgen" + }, + "engines": { + "node": ">= 18.0" } }, - "clients/workflow-client/node_modules/@webpack-cli/info": { - "version": "1.5.0", + "node_modules/@anttiviljami/dtsgenerator/node_modules/brace-expansion": { + "version": "2.0.2", "dev": true, "license": "MIT", "dependencies": { - "envinfo": "^7.7.3" - }, - "peerDependencies": { - "webpack-cli": "4.x.x" + "balanced-match": "^1.0.0" } }, - "clients/workflow-client/node_modules/@webpack-cli/serve": { - "version": "1.7.0", + "node_modules/@anttiviljami/dtsgenerator/node_modules/commander": { + "version": "11.1.0", "dev": true, "license": "MIT", - "peerDependencies": { - "webpack-cli": "4.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } + "engines": { + "node": ">=16" } }, - "clients/workflow-client/node_modules/ts-jest": { - "version": "29.4.5", + "node_modules/@anttiviljami/dtsgenerator/node_modules/glob": { + "version": "10.4.5", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" + "glob": "dist/esm/bin.mjs" }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "clients/workflow-client/node_modules/type-fest": { - "version": "4.41.0", + "node_modules/@anttiviljami/dtsgenerator/node_modules/minimatch": { + "version": "9.0.5", "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, "engines": { - "node": ">=16" + "node": ">=16 || 14 >=14.17" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, - "clients/workflow-client/node_modules/webpack-cli": { - "version": "4.10.0", + "node_modules/@anttiviljami/dtsgenerator/node_modules/typescript": { + "version": "5.8.3", "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.2.0", - "@webpack-cli/info": "^1.5.0", - "@webpack-cli/serve": "^1.7.0", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "cross-spawn": "^7.0.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "webpack-merge": "^5.7.3" - }, + "license": "Apache-2.0", "bin": { - "webpack-cli": "bin/cli.js" + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "@webpack-cli/migrate": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } + "node": ">=14.17" } }, - "clients/workflow-definition-client": { - "name": "@epilot/workflow-definition-client", - "version": "1.20.0", + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "11.9.3", "license": "MIT", "dependencies": { - "@dazn/lambda-powertools-correlation-ids": "^1.28.1", - "buffer": "^6.0.3", - "https-browserify": "^1.0.0", - "openapi-client-axios": "^7.8.0", - "stream-http": "^3.1.1", - "url": "^0.11.0", - "util": "^0.12.3" + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0" }, - "devDependencies": { - "@types/jest": "^26.0.20", - "axios": "^1.11.0", - "copy-webpack-plugin": "^7.0.0", - "jest": "^29.6.2", - "json-loader": "^0.5.7", - "openapicmd": "^2.7.0", - "ts-jest": "^29.4.1", - "ts-loader": "^8.0.14", - "ts-node": "^10.9.1", - "typescript": "^4.1.3", - "webpack": "^5.18.0", - "webpack-cli": "^4.10.0" + "engines": { + "node": ">= 16" }, - "peerDependencies": { - "axios": "^1.0.0 || >=0.25.0 <1.0.0" + "funding": { + "url": "https://github.com/sponsors/philsturgeon" } }, - "clients/workflow-definition-client/node_modules/@webpack-cli/configtest": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "peerDependencies": { - "webpack": "4.x.x || 5.x.x", - "webpack-cli": "4.x.x" - } - }, - "clients/workflow-definition-client/node_modules/@webpack-cli/info": { - "version": "1.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "envinfo": "^7.7.3" - }, - "peerDependencies": { - "webpack-cli": "4.x.x" - } - }, - "clients/workflow-definition-client/node_modules/@webpack-cli/serve": { - "version": "1.7.0", - "dev": true, - "license": "MIT", - "peerDependencies": { - "webpack-cli": "4.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, - "clients/workflow-definition-client/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } - } - }, - "clients/workflow-definition-client/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "clients/workflow-definition-client/node_modules/webpack-cli": { - "version": "4.10.0", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.2.0", - "@webpack-cli/info": "^1.5.0", - "@webpack-cli/serve": "^1.7.0", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "cross-spawn": "^7.0.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "@webpack-cli/migrate": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/@adobe/css-tools": { - "version": "4.4.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@anttiviljami/dtsgenerator": { - "version": "3.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "commander": "^11.1.0", - "cross-fetch": "^4.0.0", - "debug": "^4.3.4", - "glob": "^10.3.10", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", - "js-yaml": "^4.1.0", - "tslib": "^2.6.2", - "typescript": "^5.2.2" - }, - "bin": { - "dtsgen": "bin/dtsgen" - }, - "engines": { - "node": ">= 18.0" - } - }, - "node_modules/@anttiviljami/dtsgenerator/node_modules/brace-expansion": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@anttiviljami/dtsgenerator/node_modules/commander": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - } - }, - "node_modules/@anttiviljami/dtsgenerator/node_modules/glob": { - "version": "10.4.5", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@anttiviljami/dtsgenerator/node_modules/minimatch": { - "version": "9.0.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@anttiviljami/dtsgenerator/node_modules/typescript": { - "version": "5.8.3", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "11.9.3", - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.15", - "js-yaml": "^4.1.0" - }, - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://github.com/sponsors/philsturgeon" - } - }, - "node_modules/@apidevtools/openapi-schemas": { - "version": "2.1.0", + "node_modules/@apidevtools/openapi-schemas": { + "version": "2.1.0", "dev": true, "license": "MIT", "engines": { @@ -7902,7 +5019,6 @@ "version": "8.17.1", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -7974,7 +5090,6 @@ "version": "7.28.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", @@ -8131,107 +5246,29 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.25.9", + "node_modules/@babel/parser": { + "version": "7.28.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "@babel/types": "^7.28.0" + }, + "bin": { + "parser": "bin/babel-parser.js" }, "engines": { - "node": ">=6.9.0" + "node": ">=6.0.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^1.9.0" + "@babel/helper-plugin-utils": "^7.8.0" }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.28.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, "node_modules/@babel/plugin-syntax-bigint": { @@ -8483,46 +5520,158 @@ "dev": true, "license": "MIT" }, - "node_modules/@bundled-es-modules/cookie": { - "version": "2.0.1", - "license": "ISC", - "dependencies": { - "cookie": "^0.7.2" + "node_modules/@biomejs/biome": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.6.tgz", + "integrity": "sha512-QnHe81PMslpy3mnpL8DnO2M4S4ZnYPkjlGCLWBZT/3R9M6b5daArWMMtEfP52/n174RKnwRIf3oT8+wc9ihSfQ==", + "dev": true, + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "2.4.6", + "@biomejs/cli-darwin-x64": "2.4.6", + "@biomejs/cli-linux-arm64": "2.4.6", + "@biomejs/cli-linux-arm64-musl": "2.4.6", + "@biomejs/cli-linux-x64": "2.4.6", + "@biomejs/cli-linux-x64-musl": "2.4.6", + "@biomejs/cli-win32-arm64": "2.4.6", + "@biomejs/cli-win32-x64": "2.4.6" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.6.tgz", + "integrity": "sha512-NW18GSyxr+8sJIqgoGwVp5Zqm4SALH4b4gftIA0n62PTuBs6G2tHlwNAOj0Vq0KKSs7Sf88VjjmHh0O36EnzrQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" } }, - "node_modules/@bundled-es-modules/statuses": { - "version": "1.0.1", - "license": "ISC", - "dependencies": { - "statuses": "^2.0.1" + "node_modules/@biomejs/cli-darwin-x64": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.6.tgz", + "integrity": "sha512-4uiE/9tuI7cnjtY9b07RgS7gGyYOAfIAGeVJWEfeCnAarOAS7qVmuRyX6d7JTKw28/mt+rUzMasYeZ+0R/U1Mw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" } }, - "node_modules/@bundled-es-modules/tough-cookie": { - "version": "0.1.6", - "license": "ISC", - "dependencies": { - "@types/tough-cookie": "^4.0.5", - "tough-cookie": "^4.1.4" + "node_modules/@biomejs/cli-linux-arm64": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.6.tgz", + "integrity": "sha512-kMLaI7OF5GN1Q8Doymjro1P8rVEoy7BKQALNz6fiR8IC1WKduoNyteBtJlHT7ASIL0Cx2jR6VUOBIbcB1B8pew==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" } }, - "node_modules/@bundled-es-modules/tough-cookie/node_modules/tough-cookie": { - "version": "4.1.4", - "license": "BSD-3-Clause", - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.6.tgz", + "integrity": "sha512-F/JdB7eN22txiTqHM5KhIVt0jVkzZwVYrdTR1O3Y4auBOQcXxHK4dxULf4z43QyZI5tsnQJrRBHZy7wwtL+B3A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6" + "node": ">=14.21.3" } }, - "node_modules/@bundled-es-modules/tough-cookie/node_modules/universalify": { - "version": "0.2.0", - "license": "MIT", + "node_modules/@biomejs/cli-linux-x64": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.6.tgz", + "integrity": "sha512-oHXmUFEoH8Lql1xfc3QkFLiC1hGR7qedv5eKNlC185or+o4/4HiaU7vYODAH3peRCfsuLr1g6v2fK9dFFOYdyw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 4.0.0" + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.6.tgz", + "integrity": "sha512-C9s98IPDu7DYarjlZNuzJKTjVHN03RUnmHV5htvqsx6vEUXCDSJ59DNwjKVD5XYoSS4N+BYhq3RTBAL8X6svEg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-arm64": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.6.tgz", + "integrity": "sha512-xzThn87Pf3YrOGTEODFGONmqXpTwUNxovQb72iaUOdcw8sBSY3+3WD8Hm9IhMYLnPi0n32s3L3NWU6+eSjfqFg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-x64": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.6.tgz", + "integrity": "sha512-7++XhnsPlr1HDbor5amovPjOH6vsrFOCdp93iKXhFn6bcMUI6soodj3WWKfgEO6JosKU1W5n3uky3WW9RlRjTg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" } }, "node_modules/@changesets/apply-release-plan": { @@ -8959,7 +6108,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -8981,7 +6129,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" } @@ -9030,10 +6177,6 @@ "resolved": "clients/audit-logs-client", "link": true }, - "node_modules/@epilot/auth": { - "resolved": "packages/auth", - "link": true - }, "node_modules/@epilot/automation-client": { "resolved": "clients/automation-client", "link": true @@ -9046,6 +6189,10 @@ "resolved": "clients/blueprint-manifest-client", "link": true }, + "node_modules/@epilot/cli": { + "resolved": "packages/cli", + "link": true + }, "node_modules/@epilot/consent-client": { "resolved": "clients/consent-client", "link": true @@ -9054,6 +6201,10 @@ "resolved": "clients/customer-portal-client", "link": true }, + "node_modules/@epilot/dashboard-client": { + "resolved": "clients/dashboard-client", + "link": true + }, "node_modules/@epilot/data-management-client": { "resolved": "clients/data-management-client", "link": true @@ -9066,10 +6217,6 @@ "resolved": "clients/design-client", "link": true }, - "node_modules/@epilot/discussion-client": { - "resolved": "clients/discussion-client", - "link": true - }, "node_modules/@epilot/document-client": { "resolved": "clients/document-client", "link": true @@ -9098,27 +6245,6 @@ "resolved": "clients/erp-integration-client", "link": true }, - "node_modules/@epilot/eslint-config": { - "version": "2.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "6.0.0", - "@typescript-eslint/parser": "6.0.0", - "eslint-config-prettier": "8.5.0", - "eslint-import-resolver-typescript": "2.7.1", - "eslint-plugin-import": "2.26.0", - "eslint-plugin-prettier": "4.0.0", - "prettier": "2.7.1" - }, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "eslint": ">= 7.0.0", - "typescript": ">= 3.9.0" - } - }, "node_modules/@epilot/event-catalog-client": { "resolved": "clients/event-catalog-client", "link": true @@ -9183,6 +6309,10 @@ "resolved": "clients/sandbox-client", "link": true }, + "node_modules/@epilot/sdk": { + "resolved": "packages/epilot-sdk-v2", + "link": true + }, "node_modules/@epilot/submission-client": { "resolved": "clients/submission-client", "link": true @@ -9215,121 +6345,420 @@ "resolved": "clients/workflow-definition-client", "link": true }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.8", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz", + "integrity": "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==", "cpu": [ - "arm64" + "ppc64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ - "darwin" + "aix" ], "engines": { "node": ">=18" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", + "node_modules/@esbuild/android-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.3.tgz", + "integrity": "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + "node": ">=18" } }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", + "node_modules/@esbuild/android-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.3.tgz", + "integrity": "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "node": ">=18" } }, - "node_modules/@eslint/eslintrc": { - "version": "0.4.3", + "node_modules/@esbuild/android-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.3.tgz", + "integrity": "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" + "node": ">=18" } }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.8", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, + "optional": true, + "os": [ + "darwin" + ], + "peer": true, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18" } }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "4.0.6", + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.3.tgz", + "integrity": "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 4" + "node": ">=18" } }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "3.14.1", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.3.tgz", + "integrity": "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@eslint/eslintrc/node_modules/sprintf-js": { - "version": "1.0.3", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.3.tgz", + "integrity": "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "BSD-3-Clause" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", + "node_modules/@esbuild/linux-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.3.tgz", + "integrity": "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==", + "cpu": [ + "arm" + ], "dev": true, - "license": "(MIT OR CC0-1.0)", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.3.tgz", + "integrity": "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.3.tgz", + "integrity": "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.3.tgz", + "integrity": "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.3.tgz", + "integrity": "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.3.tgz", + "integrity": "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.3.tgz", + "integrity": "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.3.tgz", + "integrity": "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz", + "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.3.tgz", + "integrity": "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.3.tgz", + "integrity": "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.3.tgz", + "integrity": "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.3.tgz", + "integrity": "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.3.tgz", + "integrity": "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.3.tgz", + "integrity": "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.3.tgz", + "integrity": "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.3.tgz", + "integrity": "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.3.tgz", + "integrity": "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" } }, "node_modules/@exodus/schemasafe": { @@ -9342,30 +6771,44 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.5.0", - "dev": true, - "license": "Apache-2.0", + "node_modules/@inquirer/ansi": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.2.tgz", + "integrity": "sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==", + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/checkbox": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.3.2.tgz", + "integrity": "sha512-VXukHf0RR1doGe6Sm4F0Em7SWYLTHSsbGfJdS9Ja2bX5/D5uwVOEjr07cncLROdBvmnvCATYEWlHqYmXv2IlQA==", "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", - "debug": "^4.1.1", - "minimatch": "^3.0.4" + "@inquirer/ansi": "^1.0.2", + "@inquirer/core": "^10.3.2", + "@inquirer/figures": "^1.0.15", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" }, "engines": { - "node": ">=10.10.0" + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/@inquirer/confirm": { - "version": "5.1.14", - "license": "MIT", + "version": "5.1.21", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.21.tgz", + "integrity": "sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ==", "dependencies": { - "@inquirer/core": "^10.1.15", - "@inquirer/type": "^3.0.8" + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10" }, "engines": { "node": ">=18" @@ -9380,17 +6823,18 @@ } }, "node_modules/@inquirer/core": { - "version": "10.1.15", - "license": "MIT", + "version": "10.3.2", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.3.2.tgz", + "integrity": "sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A==", "dependencies": { - "@inquirer/figures": "^1.0.13", - "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2", + "@inquirer/ansi": "^1.0.2", + "@inquirer/figures": "^1.0.15", + "@inquirer/type": "^3.0.10", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", "wrap-ansi": "^6.2.0", - "yoctocolors-cjs": "^2.1.2" + "yoctocolors-cjs": "^2.1.3" }, "engines": { "node": ">=18" @@ -9406,21 +6850,24 @@ }, "node_modules/@inquirer/core/node_modules/cli-width": { "version": "4.1.0", - "license": "ISC", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", "engines": { "node": ">= 12" } }, "node_modules/@inquirer/core/node_modules/mute-stream": { "version": "2.0.0", - "license": "ISC", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", "engines": { "node": "^18.17.0 || >=20.5.0" } }, "node_modules/@inquirer/core/node_modules/signal-exit": { "version": "4.1.0", - "license": "ISC", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "engines": { "node": ">=14" }, @@ -9430,7 +6877,8 @@ }, "node_modules/@inquirer/core/node_modules/wrap-ansi": { "version": "6.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -9440,13 +6888,14 @@ "node": ">=8" } }, - "node_modules/@inquirer/external-editor": { - "version": "1.0.2", - "dev": true, - "license": "MIT", + "node_modules/@inquirer/editor": { + "version": "4.2.23", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.23.tgz", + "integrity": "sha512-aLSROkEwirotxZ1pBaP8tugXRFCxW94gwrQLxXfrZsKkfjOYC1aRvAZuhpJOb5cu4IBTJdsCigUlf2iCOu4ZDQ==", "dependencies": { - "chardet": "^2.1.0", - "iconv-lite": "^0.7.0" + "@inquirer/core": "^10.3.2", + "@inquirer/external-editor": "^1.0.3", + "@inquirer/type": "^3.0.10" }, "engines": { "node": ">=18" @@ -9460,14 +6909,54 @@ } } }, - "node_modules/@inquirer/external-editor/node_modules/chardet": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@inquirer/external-editor/node_modules/iconv-lite": { - "version": "0.7.0", - "dev": true, + "node_modules/@inquirer/expand": { + "version": "4.0.23", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.23.tgz", + "integrity": "sha512-nRzdOyFYnpeYTTR2qFwEVmIWypzdAx/sIkCMeTNTcflFOovfqUk+HcFhQQVBftAh9gmGrpFj6QcGEqrDMDOiew==", + "dependencies": { + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/external-editor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", + "integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==", + "dependencies": { + "chardet": "^2.1.1", + "iconv-lite": "^0.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/external-editor/node_modules/chardet": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", + "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==" + }, + "node_modules/@inquirer/external-editor/node_modules/iconv-lite": { + "version": "0.7.0", "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -9481,15 +6970,172 @@ } }, "node_modules/@inquirer/figures": { - "version": "1.0.13", - "license": "MIT", + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.15.tgz", + "integrity": "sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==", + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/input": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.3.1.tgz", + "integrity": "sha512-kN0pAM4yPrLjJ1XJBjDxyfDduXOuQHrBB8aLDMueuwUGn+vNpF7Gq7TvyVxx8u4SHlFFj4trmj+a2cbpG4Jn1g==", + "dependencies": { + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/number": { + "version": "3.0.23", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.23.tgz", + "integrity": "sha512-5Smv0OK7K0KUzUfYUXDXQc9jrf8OHo4ktlEayFlelCjwMXz0299Y8OrI+lj7i4gCBY15UObk76q0QtxjzFcFcg==", + "dependencies": { + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/password": { + "version": "4.0.23", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.23.tgz", + "integrity": "sha512-zREJHjhT5vJBMZX/IUbyI9zVtVfOLiTO66MrF/3GFZYZ7T4YILW5MSkEYHceSii/KtRk+4i3RE7E1CUXA2jHcA==", + "dependencies": { + "@inquirer/ansi": "^1.0.2", + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/prompts": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.10.1.tgz", + "integrity": "sha512-Dx/y9bCQcXLI5ooQ5KyvA4FTgeo2jYj/7plWfV5Ak5wDPKQZgudKez2ixyfz7tKXzcJciTxqLeK7R9HItwiByg==", + "dependencies": { + "@inquirer/checkbox": "^4.3.2", + "@inquirer/confirm": "^5.1.21", + "@inquirer/editor": "^4.2.23", + "@inquirer/expand": "^4.0.23", + "@inquirer/input": "^4.3.1", + "@inquirer/number": "^3.0.23", + "@inquirer/password": "^4.0.23", + "@inquirer/rawlist": "^4.1.11", + "@inquirer/search": "^3.2.2", + "@inquirer/select": "^4.4.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/rawlist": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.11.tgz", + "integrity": "sha512-+LLQB8XGr3I5LZN/GuAHo+GpDJegQwuPARLChlMICNdwW7OwV2izlCSCxN6cqpL0sMXmbKbFcItJgdQq5EBXTw==", + "dependencies": { + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/search": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.2.2.tgz", + "integrity": "sha512-p2bvRfENXCZdWF/U2BXvnSI9h+tuA8iNqtUKb9UWbmLYCRQxd8WkvwWvYn+3NgYaNwdUkHytJMGG4MMLucI1kA==", + "dependencies": { + "@inquirer/core": "^10.3.2", + "@inquirer/figures": "^1.0.15", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/select": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.4.2.tgz", + "integrity": "sha512-l4xMuJo55MAe+N7Qr4rX90vypFwCajSakx59qe/tMaC1aEHWLyw68wF4o0A4SLAY4E0nd+Vt+EyskeDIqu1M6w==", + "dependencies": { + "@inquirer/ansi": "^1.0.2", + "@inquirer/core": "^10.3.2", + "@inquirer/figures": "^1.0.15", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" + }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@inquirer/type": { - "version": "3.0.8", - "license": "MIT", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz", + "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==", "engines": { "node": ">=18" }, @@ -9960,17 +7606,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/expect-utils": { - "version": "28.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^28.0.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, "node_modules/@jest/expect/node_modules/@jest/expect-utils": { "version": "29.7.0", "dev": true, @@ -10285,26 +7920,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@jest/pattern": { - "version": "30.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-regex-util": "30.0.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/pattern/node_modules/jest-regex-util": { - "version": "30.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, "node_modules/@jest/reporters": { "version": "29.7.0", "dev": true, @@ -10453,17 +8068,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/schemas": { - "version": "28.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, "node_modules/@jest/source-map": { "version": "29.6.3", "dev": true, @@ -10541,7 +8145,6 @@ "version": "29.7.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", @@ -10616,40 +8219,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/types": { - "version": "30.2.0", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@jest/pattern": "30.0.1", - "@jest/schemas": "30.0.5", - "@types/istanbul-lib-coverage": "^2.0.6", - "@types/istanbul-reports": "^3.0.4", - "@types/node": "*", - "@types/yargs": "^17.0.33", - "chalk": "^4.1.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/types/node_modules/@jest/schemas": { - "version": "30.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.34.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/types/node_modules/@sinclair/typebox": { - "version": "0.34.38", - "dev": true, - "license": "MIT" - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.12", "dev": true, @@ -10739,18 +8308,10 @@ "dev": true, "license": "MIT" }, - "node_modules/@mswjs/cookies": { - "version": "0.1.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/set-cookie-parser": "^2.4.0", - "set-cookie-parser": "^2.4.6" - } - }, "node_modules/@mswjs/interceptors": { - "version": "0.39.4", - "license": "MIT", + "version": "0.41.3", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.41.3.tgz", + "integrity": "sha512-cXu86tF4VQVfwz8W1SPbhoRyHJkti6mjH/XJIxp40jhO4j2k1m4KYrEykxqWPkFF3vrK4rgQppBh//AwyGSXPA==", "dependencies": { "@open-draft/deferred-promise": "^2.2.0", "@open-draft/logger": "^0.3.0", @@ -11304,11 +8865,13 @@ }, "node_modules/@open-draft/deferred-promise": { "version": "2.2.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz", + "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==" }, "node_modules/@open-draft/logger": { "version": "0.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz", + "integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==", "dependencies": { "is-node-process": "^1.2.0", "outvariant": "^1.4.0" @@ -11316,7 +8879,8 @@ }, "node_modules/@open-draft/until": { "version": "2.1.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz", + "integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==" }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", @@ -11345,11 +8909,6 @@ "hasInstallScript": true, "license": "Apache-2.0" }, - "node_modules/@sinclair/typebox": { - "version": "0.24.51", - "dev": true, - "license": "MIT" - }, "node_modules/@sinonjs/fake-timers": { "version": "10.3.0", "dev": true, @@ -11463,14 +9022,11 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/cookie": { - "version": "0.6.0", - "license": "MIT" - }, "node_modules/@types/debug": { "version": "4.1.12", "dev": true, "license": "MIT", + "optional": true, "peer": true, "dependencies": { "@types/ms": "*" @@ -11558,360 +9114,57 @@ "@types/istanbul-lib-report": "*" } }, - "node_modules/@types/jest": { - "version": "26.0.24", + "node_modules/@types/json-schema": { + "version": "7.0.15", + "license": "MIT" + }, + "node_modules/@types/ms": { + "version": "2.1.0", "dev": true, "license": "MIT", - "dependencies": { - "jest-diff": "^26.0.0", - "pretty-format": "^26.0.0" - } + "optional": true, + "peer": true }, - "node_modules/@types/jest/node_modules/@jest/types": { - "version": "26.6.2", - "dev": true, + "node_modules/@types/node": { + "version": "24.1.0", + "devOptional": true, "license": "MIT", "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": ">= 10.14.2" + "undici-types": "~7.8.0" } }, - "node_modules/@types/jest/node_modules/@types/yargs": { - "version": "15.0.19", + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/statuses": { + "version": "2.0.6", + "license": "MIT" + }, + "node_modules/@types/through": { + "version": "0.0.33", "dev": true, "license": "MIT", "dependencies": { - "@types/yargs-parser": "*" + "@types/node": "*" } }, - "node_modules/@types/jest/node_modules/pretty-format": { - "version": "26.6.2", + "node_modules/@types/yargs": { + "version": "17.0.33", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": ">= 10" + "@types/yargs-parser": "*" } }, - "node_modules/@types/jest/node_modules/react-is": { - "version": "17.0.2", + "node_modules/@types/yargs-parser": { + "version": "21.0.3", "dev": true, "license": "MIT" }, - "node_modules/@types/js-levenshtein": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "license": "MIT" - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/ms": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "24.1.0", - "devOptional": true, - "license": "MIT", - "peer": true, - "dependencies": { - "undici-types": "~7.8.0" - } - }, - "node_modules/@types/semver": { - "version": "7.7.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/set-cookie-parser": { - "version": "2.4.10", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/statuses": { - "version": "2.0.6", - "license": "MIT" - }, - "node_modules/@types/through": { - "version": "0.0.33", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/tough-cookie": { - "version": "4.0.5", - "license": "MIT" - }, - "node_modules/@types/yargs": { - "version": "17.0.33", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-interactive": { - "version": "2.1.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.5.0", - "@typescript-eslint/scope-manager": "6.0.0", - "@typescript-eslint/type-utils": "6.0.0", - "@typescript-eslint/utils": "6.0.0", - "@typescript-eslint/visitor-keys": "6.0.0", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.5.0", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ts-api-utils": { - "version": "1.4.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "6.0.0", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "@typescript-eslint/scope-manager": "6.0.0", - "@typescript-eslint/types": "6.0.0", - "@typescript-eslint/typescript-estree": "6.0.0", - "@typescript-eslint/visitor-keys": "6.0.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "6.0.0", - "@typescript-eslint/visitor-keys": "6.0.0" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "6.0.0", - "@typescript-eslint/utils": "6.0.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/ts-api-utils": { - "version": "1.4.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.0.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "6.0.0", - "@typescript-eslint/visitor-keys": "6.0.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.5.0", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/ts-api-utils": { - "version": "1.4.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.3.0", - "@types/json-schema": "^7.0.11", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "6.0.0", - "@typescript-eslint/types": "6.0.0", - "@typescript-eslint/typescript-estree": "6.0.0", - "eslint-scope": "^5.1.1", - "semver": "^7.5.0" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "6.0.0", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@vitest/coverage-v8": { - "version": "1.6.1", + "node_modules/@vitest/coverage-v8": { + "version": "1.6.1", "dev": true, "license": "MIT", "dependencies": { @@ -12309,14 +9562,6 @@ } } }, - "node_modules/@xmldom/xmldom": { - "version": "0.7.13", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", "dev": true, @@ -12327,12 +9572,6 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/@zxing/text-encoding": { - "version": "0.9.0", - "dev": true, - "license": "(Unlicense OR Apache-2.0)", - "optional": true - }, "node_modules/accepts": { "version": "1.3.8", "dev": true, @@ -12353,26 +9592,6 @@ "node": ">= 0.6" } }, - "node_modules/acorn": { - "version": "7.4.1", - "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, "node_modules/acorn-walk": { "version": "8.3.4", "dev": true, @@ -12407,7 +9626,6 @@ "version": "6.12.6", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -12460,40 +9678,17 @@ "ajv": "^6.9.1" } }, - "node_modules/amazon-cognito-identity-js": { - "version": "5.2.14", - "license": "Apache-2.0", - "dependencies": { - "buffer": "4.9.2", - "crypto-js": "^4.1.1", - "fast-base64-decode": "^1.0.0", - "isomorphic-unfetch": "^3.0.0", - "js-cookie": "^2.2.1" - } - }, - "node_modules/amazon-cognito-identity-js/node_modules/buffer": { - "version": "4.9.2", - "license": "MIT", - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "node_modules/amazon-cognito-identity-js/node_modules/isarray": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" + "node_modules/ansi-colors": { + "version": "4.1.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" } }, "node_modules/ansi-escapes": { "version": "4.3.2", + "dev": true, "license": "MIT", "dependencies": { "type-fest": "^0.21.3" @@ -12538,6 +9733,12 @@ "node": ">=14" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, "node_modules/anymatch": { "version": "3.1.3", "dev": true, @@ -12567,42 +9768,6 @@ "node": ">= 0.4" } }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.9", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.0", - "es-object-atoms": "^1.1.1", - "get-intrinsic": "^1.3.0", - "is-string": "^1.1.1", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/array-union": { "version": "2.1.0", "dev": true, @@ -12611,43 +9776,6 @@ "node": ">=8" } }, - "node_modules/array.prototype.flat": { - "version": "1.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/asn1": { "version": "0.2.6", "dev": true, @@ -12685,14 +9813,6 @@ "dev": true, "license": "MIT" }, - "node_modules/async-function": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/asynckit": { "version": "0.4.0", "license": "MIT" @@ -12735,7 +9855,6 @@ "version": "1.13.5", "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz", "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==", - "peer": true, "dependencies": { "follow-redirects": "^1.15.11", "form-data": "^4.0.5", @@ -12746,7 +9865,6 @@ "version": "29.7.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", @@ -12895,50 +10013,6 @@ "node": "*" } }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/bl/node_modules/buffer": { - "version": "5.7.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/brace-expansion": { "version": "1.1.12", "dev": true, @@ -12978,7 +10052,6 @@ "url": "https://github.com/sponsors/ai" } ], - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -12993,17 +10066,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/bs-logger": { - "version": "0.2.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-json-stable-stringify": "2.x" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/bser": { "version": "2.1.1", "dev": true, @@ -13043,6 +10105,35 @@ "version": "3.0.0", "license": "MIT" }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bundle-require": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", + "integrity": "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==", + "dev": true, + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.18" + } + }, "node_modules/bytes": { "version": "3.1.2", "dev": true, @@ -13127,6 +10218,7 @@ }, "node_modules/camelcase": { "version": "5.3.1", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -13196,6 +10288,7 @@ }, "node_modules/chalk": { "version": "4.1.2", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", @@ -13218,6 +10311,7 @@ }, "node_modules/chardet": { "version": "0.7.0", + "dev": true, "license": "MIT" }, "node_modules/check-error": { @@ -13231,29 +10325,6 @@ "node": "*" } }, - "node_modules/chokidar": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, "node_modules/chrome-trace-event": { "version": "1.0.4", "dev": true, @@ -13276,6 +10347,11 @@ "node": ">=8" } }, + "node_modules/citty": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.2.1.tgz", + "integrity": "sha512-kEV95lFBhQgtogAPlQfJJ0WGVSokvLr/UEoFPiKKOXF7pl98HfUVUD0ejsuTCld/9xH9vogSywZ5KqHzXrZpqg==" + }, "node_modules/cjs-module-lexer": { "version": "1.4.3", "dev": true, @@ -13297,6 +10373,7 @@ }, "node_modules/cli-cursor": { "version": "3.1.0", + "dev": true, "license": "MIT", "dependencies": { "restore-cursor": "^3.1.0" @@ -13316,17 +10393,6 @@ "node": ">=4" } }, - "node_modules/cli-spinners": { - "version": "2.6.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cli-ux": { "version": "6.0.9", "dev": true, @@ -13482,19 +10548,12 @@ }, "node_modules/cli-width": { "version": "3.0.0", + "dev": true, "license": "ISC", "engines": { "node": ">= 10" } }, - "node_modules/clone": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, "node_modules/clone-deep": { "version": "4.0.1", "dev": true, @@ -13623,6 +10682,15 @@ "dev": true, "license": "MIT" }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "dev": true, + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, "node_modules/content-disposition": { "version": "0.5.4", "dev": true, @@ -13643,10 +10711,15 @@ } }, "node_modules/cookie": { - "version": "0.7.2", - "license": "MIT", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz", + "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==", "engines": { - "node": ">= 0.6" + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/cookies": { @@ -13828,10 +10901,6 @@ "node": ">= 8" } }, - "node_modules/crypto-js": { - "version": "4.2.0", - "license": "MIT" - }, "node_modules/css.escape": { "version": "1.5.1", "dev": true, @@ -13903,56 +10972,9 @@ "node": ">=18" } }, - "node_modules/data-view-buffer": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/inspect-js" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/debug": { "version": "4.4.1", + "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -13966,13 +10988,6 @@ } } }, - "node_modules/decamelize": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/decimal.js": { "version": "10.6.0", "dev": true, @@ -13994,11 +11009,6 @@ "dev": true, "license": "MIT" }, - "node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, "node_modules/deepmerge": { "version": "4.3.1", "dev": true, @@ -14007,12 +11017,27 @@ "node": ">=0.10.0" } }, - "node_modules/defaults": { - "version": "1.0.4", - "dev": true, - "license": "MIT", + "node_modules/default-browser": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.0.tgz", + "integrity": "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==", "dependencies": { - "clone": "^1.0.2" + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", + "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -14033,20 +11058,15 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/define-properties": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/delayed-stream": { @@ -14070,8 +11090,9 @@ } }, "node_modules/dereference-json-schema": { - "version": "0.2.1", - "license": "MIT" + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dereference-json-schema/-/dereference-json-schema-0.2.2.tgz", + "integrity": "sha512-w8dUsJyrzH4Zsj8W/tKcjLsmcTKXfdNf+n3BBm1SAfnqpaCodgEUWqQGJ+pNb9NOqPwYMGvUnZZ8nQfeFjJlbQ==" }, "node_modules/destroy": { "version": "1.2.0", @@ -14098,14 +11119,6 @@ "node": ">=0.3.1" } }, - "node_modules/diff-sequences": { - "version": "26.6.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10.14.2" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "dev": true, @@ -14117,17 +11130,6 @@ "node": ">=8" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dom-accessibility-api": { "version": "0.6.3", "dev": true, @@ -14266,8 +11268,8 @@ "node": ">=4" } }, - "node_modules/epilot-sdk": { - "resolved": "packages/epilot-sdk", + "node_modules/epilot": { + "resolved": "packages/cli-wrapper", "link": true }, "node_modules/errno": { @@ -14289,73 +11291,6 @@ "is-arrayish": "^0.2.1" } }, - "node_modules/es-abstract": { - "version": "1.24.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-set-tostringtag": "^2.1.0", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.3.0", - "get-proto": "^1.0.1", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.2.1", - "is-set": "^2.0.3", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.1", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.4", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "set-proto": "^1.0.0", - "stop-iteration-iterator": "^1.1.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.19" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/es-define-property": { "version": "1.0.1", "license": "MIT", @@ -14398,33 +11333,6 @@ "node": ">= 0.4" } }, - "node_modules/es-shim-unscopables": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-to-primitive": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7", - "is-date-object": "^1.0.5", - "is-symbol": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/es6-promise": { "version": "3.3.1", "dev": true, @@ -14470,341 +11378,447 @@ "@esbuild/win32-x64": "0.25.8" } }, - "node_modules/escalade": { - "version": "3.2.0", - "license": "MIT", + "node_modules/esbuild/node_modules/@esbuild/aix-ppc64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.8.tgz", + "integrity": "sha512-urAvrUedIqEiFR3FYSLTWQgLu5tb+m0qZw0NBEasUeo6wuqatkMDaRT+1uABiGXEu5vqgPd7FGE1BhsAIy9QVA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "peer": true, "engines": { - "node": ">=6" + "node": ">=18" } }, - "node_modules/escape-html": { - "version": "1.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", + "node_modules/esbuild/node_modules/@esbuild/android-arm": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.8.tgz", + "integrity": "sha512-RONsAvGCz5oWyePVnLdZY/HHwA++nxYWIX1atInlaW6SEkwq6XkP3+cb825EUcRs5Vss/lGh/2YxAb5xqc07Uw==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18" } }, - "node_modules/eslint": { - "version": "7.32.0", + "node_modules/esbuild/node_modules/@esbuild/android-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.8.tgz", + "integrity": "sha512-OD3p7LYzWpLhZEyATcTSJ67qB5D+20vbtr6vHlHWSQYhKtzUYrETuWThmzFpZtFsBIxRvhO07+UgVA9m0i/O1w==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "android" + ], "peer": true, - "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=18" } }, - "node_modules/eslint-config-prettier": { - "version": "8.5.0", + "node_modules/esbuild/node_modules/@esbuild/android-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.8.tgz", + "integrity": "sha512-yJAVPklM5+4+9dTeKwHOaA+LQkmrKFX96BM0A/2zQrbS6ENCmxc4OVoBs5dPkCCak2roAD+jKCdnmOqKszPkjA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" } }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", + "node_modules/esbuild/node_modules/@esbuild/darwin-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.8.tgz", + "integrity": "sha512-Vh2gLxxHnuoQ+GjPNvDSDRpoBCUzY4Pu0kBqMBDlK4fuWbKgGtmDIeEC081xi26PPjn+1tct+Bh8FjyLlw1Zlg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=18" } }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", + "node_modules/esbuild/node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.8.tgz", + "integrity": "sha512-YPJ7hDQ9DnNe5vxOm6jaie9QsTwcKedPvizTVlqWG9GBSq+BuyWEDazlGaDTC5NGU4QJd666V0yqCBL2oWKPfA==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=18" } }, - "node_modules/eslint-import-resolver-typescript": { - "version": "2.7.1", + "node_modules/esbuild/node_modules/@esbuild/freebsd-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.8.tgz", + "integrity": "sha512-MmaEXxQRdXNFsRN/KcIimLnSJrk2r5H8v+WVafRWz5xdSVmWLoITZQXcgehI2ZE6gioE6HirAEToM/RvFBeuhw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "ISC", - "dependencies": { - "debug": "^4.3.4", - "glob": "^7.2.0", - "is-glob": "^4.0.3", - "resolve": "^1.22.0", - "tsconfig-paths": "^3.14.1" - }, + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "*", - "eslint-plugin-import": "*" + "node": ">=18" } }, - "node_modules/eslint-module-utils": { - "version": "2.12.1", + "node_modules/esbuild/node_modules/@esbuild/linux-arm": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.8.tgz", + "integrity": "sha512-FuzEP9BixzZohl1kLf76KEVOsxtIBFwCaLupVuk4eFVnOZfU+Wsn+x5Ryam7nILV2pkq2TqQM9EZPsOBuMC+kg==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, + "optional": true, + "os": [ + "linux" + ], + "peer": true, "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } + "node": ">=18" } }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", + "node_modules/esbuild/node_modules/@esbuild/linux-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.8.tgz", + "integrity": "sha512-WIgg00ARWv/uYLU7lsuDK00d/hHSfES5BzdWAdAig1ioV5kaFNrtK8EqGcUBJhYqotlUByUKz5Qo6u8tt7iD/w==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" } }, - "node_modules/eslint-plugin-import": { - "version": "2.26.0", + "node_modules/esbuild/node_modules/@esbuild/linux-ia32": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.8.tgz", + "integrity": "sha512-A1D9YzRX1i+1AJZuFFUMP1E9fMaYY+GnSQil9Tlw05utlE86EKTUA7RjwHDkEitmLYiFsRd9HwKBPEftNdBfjg==", + "cpu": [ + "ia32" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "peer": true, - "dependencies": { - "array-includes": "^3.1.4", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.3", - "has": "^1.0.3", - "is-core-module": "^2.8.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.values": "^1.1.5", - "resolve": "^1.22.0", - "tsconfig-paths": "^3.14.1" - }, "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + "node": ">=18" } }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "2.6.9", + "node_modules/esbuild/node_modules/@esbuild/linux-loong64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.8.tgz", + "integrity": "sha512-O7k1J/dwHkY1RMVvglFHl1HzutGEFFZ3kNiDMSOyUrB7WcoHGf96Sh+64nTRT26l3GMbCW01Ekh/ThKM5iI7hQ==", + "cpu": [ + "loong64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" } }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", + "node_modules/esbuild/node_modules/@esbuild/linux-mips64el": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.8.tgz", + "integrity": "sha512-uv+dqfRazte3BzfMp8PAQXmdGHQt2oC/y2ovwpTteqrMx2lwaksiFZ/bdkXJC19ttTvNXBuWH53zy/aTj1FgGw==", + "cpu": [ + "mips64el" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, + "optional": true, + "os": [ + "linux" + ], + "peer": true, "engines": { - "node": ">=0.10.0" + "node": ">=18" } }, - "node_modules/eslint-plugin-import/node_modules/ms": { - "version": "2.0.0", + "node_modules/esbuild/node_modules/@esbuild/linux-ppc64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.8.tgz", + "integrity": "sha512-GyG0KcMi1GBavP5JgAkkstMGyMholMDybAf8wF5A70CALlDM2p/f7YFE7H92eDeH/VBtFJA5MT4nRPDGg4JuzQ==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "MIT" + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } }, - "node_modules/eslint-plugin-prettier": { - "version": "4.0.0", + "node_modules/esbuild/node_modules/@esbuild/linux-riscv64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.8.tgz", + "integrity": "sha512-rAqDYFv3yzMrq7GIcen3XP7TUEG/4LK86LUPMIz6RT8A6pRIDn0sDcvjudVZBiiTcZCY9y2SgYX2lgK3AF+1eg==", + "cpu": [ + "riscv64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "prettier-linter-helpers": "^1.0.0" - }, + "optional": true, + "os": [ + "linux" + ], + "peer": true, "engines": { - "node": ">=6.0.0" - }, - "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" - }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } + "node": ">=18" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", + "node_modules/esbuild/node_modules/@esbuild/linux-s390x": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.8.tgz", + "integrity": "sha512-Xutvh6VjlbcHpsIIbwY8GVRbwoviWT19tFhgdA7DlenLGC/mbc3lBoVb7jxj9Z+eyGqvcnSyIltYUrkKzWqSvg==", + "cpu": [ + "s390x" + ], "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, + "optional": true, + "os": [ + "linux" + ], + "peer": true, "engines": { - "node": ">=8.0.0" + "node": ">=18" } }, - "node_modules/eslint-utils": { - "version": "2.1.0", + "node_modules/esbuild/node_modules/@esbuild/linux-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.8.tgz", + "integrity": "sha512-ASFQhgY4ElXh3nDcOMTkQero4b1lgubskNlhIfJrsH5OKZXDpUAKBlNS0Kx81jwOBp+HCeZqmoJuihTv57/jvQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, + "optional": true, + "os": [ + "linux" + ], + "peer": true, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" + "node": ">=18" } }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", + "node_modules/esbuild/node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.8.tgz", + "integrity": "sha512-d1KfruIeohqAi6SA+gENMuObDbEjn22olAR7egqnkCD9DGBG0wsEARotkLgXDu6c4ncgWTZJtN5vcgxzWRMzcw==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, "engines": { - "node": ">=4" + "node": ">=18" } }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", + "node_modules/esbuild/node_modules/@esbuild/netbsd-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.8.tgz", + "integrity": "sha512-nVDCkrvx2ua+XQNyfrujIG38+YGyuy2Ru9kKVNyh5jAys6n+l44tTtToqHjino2My8VAY6Lw9H7RI73XFi66Cg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=18" } }, - "node_modules/eslint/node_modules/@babel/code-frame": { - "version": "7.12.11", + "node_modules/esbuild/node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.8.tgz", + "integrity": "sha512-j8HgrDuSJFAujkivSMSfPQSAa5Fxbvk4rgNAS5i3K+r8s1X0p1uOO2Hl2xNsGFppOeHOLAVgYwDVlmxhq5h+SQ==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.10.4" + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=18" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "1.0.10", + "node_modules/esbuild/node_modules/@esbuild/openbsd-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.8.tgz", + "integrity": "sha512-1h8MUAwa0VhNCDp6Af0HToI2TJFAn1uqT9Al6DJVzdIBAd21m/G0Yfc77KDM3uF3T/YaOgQq3qTJHPbTOInaIQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=18" } }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "2.1.0", + "node_modules/esbuild/node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.8.tgz", + "integrity": "sha512-r2nVa5SIK9tSWd0kJd9HCffnDHKchTGikb//9c7HX+r+wHYCpQrSgxhlY6KWV1nFo1l4KFbsMlHk+L6fekLsUg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "Apache-2.0", + "optional": true, + "os": [ + "openharmony" + ], + "peer": true, "engines": { - "node": ">=10" + "node": ">=18" } }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", + "node_modules/esbuild/node_modules/@esbuild/sunos-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.8.tgz", + "integrity": "sha512-zUlaP2S12YhQ2UzUfcCuMDHQFJyKABkAjvO5YSndMiIkMimPmxA+BYSBikWgsRpvyxuRnow4nS5NPnf9fpv41w==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, + "optional": true, + "os": [ + "sunos" + ], + "peer": true, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18" } }, - "node_modules/eslint/node_modules/ignore": { - "version": "4.0.6", + "node_modules/esbuild/node_modules/@esbuild/win32-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.8.tgz", + "integrity": "sha512-YEGFFWESlPva8hGL+zvj2z/SaK+pH0SwOM0Nc/d+rVnW7GSTFlLBGzZkuSU9kFIGIo8q9X3ucpZhu8PDN5A2sQ==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, "engines": { - "node": ">= 4" + "node": ">=18" } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "3.14.1", + "node_modules/esbuild/node_modules/@esbuild/win32-ia32": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.8.tgz", + "integrity": "sha512-hiGgGC6KZ5LZz58OL/+qVVoZiuZlUYlYHNAmczOm7bs2oE1XriPFi5ZHHrS8ACpV5EjySrnoCKmcbQMN+ojnHg==", + "cpu": [ + "ia32" + ], "dev": true, + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild/node_modules/@esbuild/win32-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.8.tgz", + "integrity": "sha512-cn3Yr7+OaaZq1c+2pe+8yxC8E144SReCQjN6/2ynubzYjvyqZjTXfQJpAcQpsdJq3My7XADANiYGHoFC69pLQw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/escalade": { + "version": "3.2.0", "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=6" } }, - "node_modules/eslint/node_modules/sprintf-js": { + "node_modules/escape-html": { "version": "1.0.3", "dev": true, - "license": "BSD-3-Clause" + "license": "MIT" }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", + "node_modules/escape-string-regexp": { + "version": "4.0.0", "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "MIT", "engines": { "node": ">=10" }, @@ -14812,25 +11826,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/espree": { - "version": "7.3.1", + "node_modules/eslint-scope": { + "version": "5.1.1", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=4" + "node": ">=8.0.0" } }, "node_modules/esprima": { @@ -14845,25 +11850,6 @@ "node": ">=4" } }, - "node_modules/esquery": { - "version": "1.6.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "dev": true, @@ -14899,14 +11885,6 @@ "@types/estree": "^1.0.0" } }, - "node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/events": { "version": "3.3.0", "dev": true, @@ -14944,21 +11922,6 @@ "node": ">= 0.8.0" } }, - "node_modules/expect": { - "version": "28.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, "node_modules/expect-type": { "version": "1.2.2", "dev": true, @@ -14979,6 +11942,7 @@ }, "node_modules/external-editor": { "version": "3.1.0", + "dev": true, "license": "MIT", "dependencies": { "chardet": "^0.7.0", @@ -14991,6 +11955,7 @@ }, "node_modules/external-editor/node_modules/tmp": { "version": "0.0.33", + "dev": true, "license": "MIT", "dependencies": { "os-tmpdir": "~1.0.2" @@ -15015,19 +11980,10 @@ ], "license": "MIT" }, - "node_modules/fast-base64-decode": { - "version": "1.0.0", - "license": "MIT" - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "license": "MIT" }, - "node_modules/fast-diff": { - "version": "1.3.0", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/fast-glob": { "version": "3.3.3", "dev": true, @@ -15048,11 +12004,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, "node_modules/fast-safe-stringify": { "version": "2.1.1", "dev": true, @@ -15120,6 +12071,7 @@ }, "node_modules/figures": { "version": "3.2.0", + "dev": true, "license": "MIT", "dependencies": { "escape-string-regexp": "^1.0.5" @@ -15133,22 +12085,12 @@ }, "node_modules/figures/node_modules/escape-string-regexp": { "version": "1.0.5", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8.0" } }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, "node_modules/filelist": { "version": "1.0.4", "dev": true, @@ -15199,46 +12141,25 @@ "node": ">=8" } }, - "node_modules/flat": { - "version": "5.0.2", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", + "node_modules/fix-dts-default-cjs-exports": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", + "integrity": "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==", "dev": true, - "license": "MIT", "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "rollup": "^4.34.8" } }, - "node_modules/flat-cache/node_modules/rimraf": { - "version": "3.0.2", + "node_modules/flat": { + "version": "5.0.2", "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, + "license": "BSD-3-Clause", "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "flat": "cli.js" } }, - "node_modules/flatted": { - "version": "3.3.3", - "dev": true, - "license": "ISC" - }, "node_modules/follow-redirects": { "version": "1.15.11", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", @@ -15379,38 +12300,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/function.prototype.name": { - "version": "1.1.8", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "functions-have-names": "^1.2.3", - "hasown": "^2.0.2", - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/gensync": { "version": "1.0.0-beta.2", "dev": true, @@ -15497,20 +12386,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/get-symbol-description": { - "version": "1.1.0", + "node_modules/get-tsconfig": { + "version": "4.13.6", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.6.tgz", + "integrity": "sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==", "dev": true, - "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" + "resolve-pkg-maps": "^1.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, "node_modules/getpass": { @@ -15568,21 +12453,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globalthis": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/globby": { "version": "11.1.0", "dev": true, @@ -15617,43 +12487,14 @@ "dev": true, "license": "ISC" }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "dev": true, - "license": "MIT" - }, - "node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, "node_modules/graphql": { - "version": "16.11.0", - "license": "MIT", + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.13.1.tgz", + "integrity": "sha512-gGgrVCoDKlIZ8fIqXBBb0pPKqDgki0Z/FSKNiQzSGj2uEYHr1tq5wmBegGwJx6QB5S5cM0khSBpi/JFHMCvsmQ==", "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } }, - "node_modules/handlebars": { - "version": "4.7.8", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.2", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" - } - }, "node_modules/har-schema": { "version": "2.0.0", "dev": true, @@ -15674,27 +12515,9 @@ "node": ">=6" } }, - "node_modules/has": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-bigints": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-flag": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -15710,20 +12533,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-proto": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-symbols": { "version": "1.1.0", "license": "MIT", @@ -15761,11 +12570,6 @@ "version": "4.0.3", "license": "MIT" }, - "node_modules/headers-utils": { - "version": "3.0.2", - "dev": true, - "license": "MIT" - }, "node_modules/html-encoding-sniffer": { "version": "4.0.0", "dev": true, @@ -15902,6 +12706,7 @@ }, "node_modules/iconv-lite": { "version": "0.4.24", + "dev": true, "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" @@ -15936,29 +12741,6 @@ "node": ">= 4" } }, - "node_modules/import-fresh": { - "version": "3.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/import-local": { "version": "3.2.0", "dev": true, @@ -16014,57 +12796,6 @@ "version": "2.0.4", "license": "ISC" }, - "node_modules/inquirer": { - "version": "8.2.6", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.5.5", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6", - "wrap-ansi": "^6.0.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/inquirer/node_modules/wrap-ansi": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/internal-slot": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/interpret": { "version": "2.2.0", "dev": true, @@ -16087,38 +12818,14 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-array-buffer": { - "version": "3.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-arrayish": { "version": "0.2.1", "dev": true, "license": "MIT" }, - "node_modules/is-async-function": { - "version": "2.1.1", - "dev": true, + "node_modules/is-callable": { + "version": "1.2.7", "license": "MIT", - "dependencies": { - "async-function": "^1.0.0", - "call-bound": "^1.0.3", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, "engines": { "node": ">= 0.4" }, @@ -16126,12 +12833,12 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-bigint": { - "version": "1.1.0", + "node_modules/is-core-module": { + "version": "2.16.1", "dev": true, "license": "MIT", "dependencies": { - "has-bigints": "^1.0.2" + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -16140,125 +12847,30 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", + "node_modules/is-docker": { + "version": "2.2.1", "dev": true, "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" + "bin": { + "is-docker": "cli.js" }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-boolean-object": { - "version": "1.2.2", + "node_modules/is-extglob": { + "version": "2.1.1", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-callable": { - "version": "1.2.7", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-view": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-docker": { - "version": "2.2.1", - "dev": true, - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-finalizationregistry": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", "license": "MIT", "engines": { "node": ">=8" @@ -16299,34 +12911,35 @@ "node": ">=0.10.0" } }, - "node_modules/is-interactive": { + "node_modules/is-inside-container": { "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-map": { - "version": "2.0.3", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, "engines": { - "node": ">= 0.4" + "node": ">=14.16" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "dev": true, - "license": "MIT", + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "bin": { + "is-docker": "cli.js" + }, "engines": { - "node": ">= 0.4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-node-process": { @@ -16341,21 +12954,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-number-object": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", "dev": true, @@ -16377,31 +12975,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-set": { - "version": "2.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-stream": { "version": "2.0.1", "dev": true, @@ -16413,21 +12986,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-string": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-subdir": { "version": "1.2.0", "dev": true, @@ -16439,22 +12997,6 @@ "node": ">=4" } }, - "node_modules/is-symbol": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-typed-array": { "version": "1.1.15", "license": "MIT", @@ -16473,57 +13015,6 @@ "dev": true, "license": "MIT" }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-windows": { "version": "1.0.2", "dev": true, @@ -16543,11 +13034,6 @@ "node": ">=8" } }, - "node_modules/isarray": { - "version": "2.0.5", - "dev": true, - "license": "MIT" - }, "node_modules/isexe": { "version": "2.0.0", "dev": true, @@ -16561,71 +13047,29 @@ "node": ">=0.10.0" } }, - "node_modules/isomorphic-unfetch": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.1", - "unfetch": "^4.2.0" + "node_modules/isstream": { + "version": "0.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" } }, - "node_modules/isomorphic-unfetch/node_modules/node-fetch": { - "version": "2.7.0", - "license": "MIT", + "node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/isomorphic-unfetch/node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" - }, - "node_modules/isomorphic-unfetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" - }, - "node_modules/isomorphic-unfetch/node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/isstream": { - "version": "0.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" }, "engines": { "node": ">=8" @@ -16712,7 +13156,6 @@ "version": "29.7.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", @@ -17177,70 +13620,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-diff": { - "version": "26.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^26.6.2", - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" - }, - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/jest-diff/node_modules/@jest/types": { - "version": "26.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/jest-diff/node_modules/@types/yargs": { - "version": "15.0.19", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-diff/node_modules/jest-get-type": { - "version": "26.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/jest-diff/node_modules/pretty-format": { - "version": "26.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/jest-diff/node_modules/react-is": { - "version": "17.0.2", - "dev": true, - "license": "MIT" - }, "node_modules/jest-docblock": { "version": "29.7.0", "dev": true, @@ -17411,14 +13790,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-get-type": { - "version": "28.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, "node_modules/jest-haste-map": { "version": "29.7.0", "dev": true, @@ -17658,77 +14029,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-matcher-utils": { - "version": "28.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.3", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-matcher-utils/node_modules/diff-sequences": { - "version": "28.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-matcher-utils/node_modules/jest-diff": { - "version": "28.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "28.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-message-util/node_modules/@jest/types": { - "version": "28.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, "node_modules/jest-mock": { "version": "29.7.0", "dev": true, @@ -18329,39 +14629,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-util": { - "version": "28.1.3", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@jest/types": "^28.1.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-util/node_modules/@jest/types": { - "version": "28.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, "node_modules/jest-validate": { "version": "29.7.0", "dev": true, @@ -18627,16 +14894,13 @@ "dev": true, "license": "MIT" }, - "node_modules/js-cookie": { - "version": "2.2.1", - "license": "MIT" - }, - "node_modules/js-levenshtein": { - "version": "1.1.6", + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", "dev": true, - "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, "node_modules/js-tokens": { @@ -18647,7 +14911,6 @@ "node_modules/js-yaml": { "version": "4.1.0", "license": "MIT", - "peer": true, "dependencies": { "argparse": "^2.0.1" }, @@ -18659,7 +14922,6 @@ "version": "26.1.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "cssstyle": "^4.2.1", "data-urls": "^5.0.0", @@ -18728,11 +14990,6 @@ "node": ">=6" } }, - "node_modules/json-buffer": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/json-loader": { "version": "0.5.7", "dev": true, @@ -18748,11 +15005,6 @@ "dev": true, "license": "MIT" }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/json-stringify-safe": { "version": "5.0.1", "dev": true, @@ -18769,6 +15021,14 @@ "node": ">=6" } }, + "node_modules/jsonata": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/jsonata/-/jsonata-2.1.0.tgz", + "integrity": "sha512-OCzaRMK8HobtX8fp37uIVmL8CY1IGc/a6gLsDqz3quExFR09/U78HUzWYr7T31UEB6+Eu0/8dkVD5fFDOl9a8w==", + "engines": { + "node": ">= 8" + } + }, "node_modules/jsonfile": { "version": "4.0.0", "dev": true, @@ -18802,14 +15062,6 @@ "node": ">= 0.6" } }, - "node_modules/keyv": { - "version": "4.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, "node_modules/kind-of": { "version": "6.0.3", "dev": true, @@ -19087,18 +15339,6 @@ "node": ">=6" } }, - "node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/lilconfig": { "version": "3.1.3", "dev": true, @@ -19110,6 +15350,21 @@ "url": "https://github.com/sponsors/antonk52" } }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, "node_modules/loader-runner": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.1.tgz", @@ -19166,11 +15421,6 @@ "version": "4.17.21", "license": "MIT" }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.merge": { "version": "4.6.2", "license": "MIT" @@ -19180,26 +15430,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "dev": true, - "license": "MIT" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/loupe": { "version": "2.3.7", "dev": true, @@ -19372,6 +15602,7 @@ }, "node_modules/mimic-fn": { "version": "2.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -19396,14 +15627,6 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/minipass": { "version": "7.1.2", "dev": true, @@ -19440,8 +15663,9 @@ "license": "MIT" }, "node_modules/mock-json-schema": { - "version": "1.1.1", - "license": "MIT", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/mock-json-schema/-/mock-json-schema-1.1.2.tgz", + "integrity": "sha512-3IyduYlhfzPy+nFN8wxUjloUi1hM7l8lN5LITuauUNMQltynJIOfLf/DADwTAp2d6kvSBtWojly1EuxX5B0WkA==", "dependencies": { "lodash": "^4.17.21" } @@ -19456,31 +15680,32 @@ }, "node_modules/ms": { "version": "2.1.3", + "dev": true, "license": "MIT" }, "node_modules/msw": { - "version": "2.10.4", + "version": "2.12.10", + "resolved": "https://registry.npmjs.org/msw/-/msw-2.12.10.tgz", + "integrity": "sha512-G3VUymSE0/iegFnuipujpwyTM2GuZAKXNeerUSrG2+Eg391wW63xFs5ixWsK9MWzr1AGoSkYGmyAzNgbR3+urw==", "hasInstallScript": true, - "license": "MIT", - "peer": true, "dependencies": { - "@bundled-es-modules/cookie": "^2.0.1", - "@bundled-es-modules/statuses": "^1.0.1", - "@bundled-es-modules/tough-cookie": "^0.1.6", "@inquirer/confirm": "^5.0.0", - "@mswjs/interceptors": "^0.39.1", + "@mswjs/interceptors": "^0.41.2", "@open-draft/deferred-promise": "^2.2.0", - "@open-draft/until": "^2.1.0", - "@types/cookie": "^0.6.0", - "@types/statuses": "^2.0.4", - "graphql": "^16.8.1", + "@types/statuses": "^2.0.6", + "cookie": "^1.0.2", + "graphql": "^16.12.0", "headers-polyfill": "^4.0.2", "is-node-process": "^1.2.0", "outvariant": "^1.4.3", "path-to-regexp": "^6.3.0", "picocolors": "^1.1.1", + "rettime": "^0.10.1", + "statuses": "^2.0.2", "strict-event-emitter": "^0.5.1", - "type-fest": "^4.26.1", + "tough-cookie": "^6.0.0", + "type-fest": "^5.2.0", + "until-async": "^3.0.2", "yargs": "^17.7.2" }, "bin": { @@ -19501,19 +15726,62 @@ } } }, - "node_modules/msw/node_modules/type-fest": { - "version": "4.41.0", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" + "node_modules/msw/node_modules/tldts": { + "version": "7.0.25", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.25.tgz", + "integrity": "sha512-keinCnPbwXEUG3ilrWQZU+CqcTTzHq9m2HhoUP2l7Xmi8l1LuijAXLpAJ5zRW+ifKTNscs4NdCkfkDCBYm352w==", + "dependencies": { + "tldts-core": "^7.0.25" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "bin": { + "tldts": "bin/cli.js" } }, - "node_modules/mute-stream": { - "version": "0.0.8", - "license": "ISC" + "node_modules/msw/node_modules/tldts-core": { + "version": "7.0.25", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.25.tgz", + "integrity": "sha512-ZjCZK0rppSBu7rjHYDYsEaMOIbbT+nWF57hKkv4IUmZWBNrBWBOjIElc0mKRgLM8bm7x/BBlof6t2gi/Oq/Asw==" + }, + "node_modules/msw/node_modules/tough-cookie": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.0.tgz", + "integrity": "sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w==", + "dependencies": { + "tldts": "^7.0.5" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/msw/node_modules/type-fest": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-5.4.4.tgz", + "integrity": "sha512-JnTrzGu+zPV3aXIUhnyWJj4z/wigMsdYajGLIYakqyOW1nPllzXEJee0QQbHj+CTIQtXGlAjuK0UY+2xTyjVAw==", + "dependencies": { + "tagged-tag": "^1.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "dev": true, + "license": "ISC" + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } }, "node_modules/nanoid": { "version": "3.3.11", @@ -19537,11 +15805,6 @@ "dev": true, "license": "MIT" }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, "node_modules/natural-orderby": { "version": "2.0.3", "dev": true, @@ -22069,7 +18332,6 @@ "dev": true, "inBundle": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -22423,6 +18685,15 @@ "node": "*" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.13.4", "license": "MIT", @@ -22433,14 +18704,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object-keys": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/object-treeify": { "version": "1.1.33", "dev": true, @@ -22449,42 +18712,6 @@ "node": ">= 10" } }, - "node_modules/object.assign": { - "version": "4.1.7", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.values": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/on-finished": { "version": "2.4.1", "dev": true, @@ -22506,6 +18733,7 @@ }, "node_modules/onetime": { "version": "5.1.2", + "dev": true, "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" @@ -22521,6 +18749,23 @@ "version": "0.0.2", "dev": true }, + "node_modules/open": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", + "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "wsl-utils": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/openapi-backend": { "version": "5.11.1", "license": "MIT", @@ -22557,13 +18802,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/openapi-backend/node_modules/cookie": { - "version": "1.0.2", - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/openapi-backend/node_modules/json-schema-traverse": { "version": "1.0.0", "license": "MIT" @@ -22635,8 +18873,7 @@ }, "node_modules/openapi-types": { "version": "12.1.3", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/openapicmd": { "version": "2.7.0", @@ -22747,46 +18984,9 @@ "dev": true, "license": "0BSD" }, - "node_modules/optionator": { - "version": "0.9.4", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/ora": { - "version": "5.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/os-tmpdir": { "version": "1.0.2", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -22801,22 +19001,6 @@ "version": "1.4.3", "license": "MIT" }, - "node_modules/own-keys": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.6", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/p-filter": { "version": "2.1.0", "dev": true, @@ -22877,6 +19061,7 @@ }, "node_modules/p-try": { "version": "2.2.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -22895,17 +19080,6 @@ "quansync": "^0.2.7" } }, - "node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/parse-json": { "version": "5.2.0", "dev": true, @@ -22928,11 +19102,6 @@ "dev": true, "license": "MIT" }, - "node_modules/parse-json/node_modules/lines-and-columns": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, "node_modules/parse5": { "version": "7.3.0", "dev": true, @@ -23139,19 +19308,52 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", "dev": true, - "license": "MIT", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "lilconfig": "^3.1.1" + }, "engines": { - "node": ">= 0.8.0" + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } } }, "node_modules/prettier": { "version": "2.7.1", "dev": true, "license": "MIT", - "peer": true, "bin": { "prettier": "bin-prettier.js" }, @@ -23162,55 +19364,11 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/pretty-format": { - "version": "28.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/process-nextick-args": { "version": "2.0.1", "dev": true, "license": "MIT" }, - "node_modules/progress": { - "version": "2.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/prompts": { "version": "2.4.2", "dev": true, @@ -23234,6 +19392,7 @@ }, "node_modules/psl": { "version": "1.15.0", + "dev": true, "license": "MIT", "dependencies": { "punycode": "^2.3.1" @@ -23244,6 +19403,7 @@ }, "node_modules/punycode": { "version": "2.3.1", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -23292,10 +19452,6 @@ ], "license": "MIT" }, - "node_modules/querystringify": { - "version": "2.2.0", - "license": "MIT" - }, "node_modules/queue-microtask": { "version": "1.2.3", "dev": true, @@ -23432,17 +19588,6 @@ "node": ">= 6" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, "node_modules/rechoir": { "version": "0.7.1", "dev": true, @@ -23474,27 +19619,6 @@ "esprima": "~4.0.0" } }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.1", - "which-builtin-type": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/reftools": { "version": "1.1.9", "dev": true, @@ -23503,40 +19627,10 @@ "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.4", + "node_modules/request": { + "version": "2.88.2", "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexpp": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/request": { - "version": "2.88.2", - "dev": true, - "license": "Apache-2.0", + "license": "Apache-2.0", "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -23660,14 +19754,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "license": "ISC" - }, - "node_modules/requires-port": { - "version": "1.0.0", - "license": "MIT" - }, "node_modules/resolve": { "version": "1.22.10", "dev": true, @@ -23758,6 +19844,15 @@ "node": ">= 0.6" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/resolve.exports": { "version": "2.0.3", "dev": true, @@ -23768,6 +19863,7 @@ }, "node_modules/restore-cursor": { "version": "3.1.0", + "dev": true, "license": "MIT", "dependencies": { "onetime": "^5.1.0", @@ -23777,6 +19873,11 @@ "node": ">=8" } }, + "node_modules/rettime": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/rettime/-/rettime-0.10.1.tgz", + "integrity": "sha512-uyDrIlUEH37cinabq0AX4QbgV4HbFZ/gqoiunWQ1UqBtRvTTytwhNYjE++pO/MjPTZL5KQCf2bEoJ/BJNVQ5Kw==" + }, "node_modules/reusify": { "version": "1.1.0", "dev": true, @@ -23920,8 +20021,20 @@ "dev": true, "license": "MIT" }, + "node_modules/run-applescript": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/run-async": { "version": "2.4.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.12.0" @@ -23949,32 +20062,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/rxjs": { - "version": "7.8.2", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/safe-array-concat": { - "version": "1.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/safe-buffer": { "version": "5.2.1", "funding": [ @@ -23993,21 +20080,6 @@ ], "license": "MIT" }, - "node_modules/safe-push-apply": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/safe-regex-test": { "version": "1.1.0", "license": "MIT", @@ -24074,15 +20146,6 @@ "randombytes": "^2.1.0" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "license": "ISC" - }, - "node_modules/set-cookie-parser": { - "version": "2.7.1", - "dev": true, - "license": "MIT" - }, "node_modules/set-function-length": { "version": "1.2.2", "license": "MIT", @@ -24098,33 +20161,6 @@ "node": ">= 0.4" } }, - "node_modules/set-function-name": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-proto": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/setprototypeof": { "version": "1.2.0", "dev": true, @@ -24279,6 +20315,7 @@ }, "node_modules/signal-exit": { "version": "3.0.7", + "dev": true, "license": "ISC" }, "node_modules/simple-swizzle": { @@ -24441,18 +20478,6 @@ "node": ">=0.10.0" } }, - "node_modules/stop-iteration-iterator": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "internal-slot": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/stream-http": { "version": "3.2.0", "license": "MIT", @@ -24465,7 +20490,8 @@ }, "node_modules/strict-event-emitter": { "version": "0.5.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz", + "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==" }, "node_modules/string_decoder": { "version": "1.3.0", @@ -24512,59 +20538,6 @@ "node": ">=8" } }, - "node_modules/string.prototype.trim": { - "version": "1.2.10", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-object-atoms": "^1.0.0", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.9", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "license": "MIT", @@ -24641,8 +20614,40 @@ "dev": true, "license": "MIT" }, + "node_modules/sucrase": { + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/supports-color": { "version": "7.2.0", + "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -24767,41 +20772,17 @@ "dev": true, "license": "MIT" }, - "node_modules/table": { - "version": "6.9.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, + "node_modules/tagged-tag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tagged-tag/-/tagged-tag-1.0.0.tgz", + "integrity": "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==", "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.17.1", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" + "node": ">=20" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/tapable": { "version": "1.1.3", "dev": true, @@ -24825,7 +20806,6 @@ "version": "5.43.1", "dev": true, "license": "BSD-2-Clause", - "peer": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.14.0", @@ -24878,7 +20858,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", "dev": true, - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -25003,13 +20982,30 @@ "node": ">=8" } }, - "node_modules/text-table": { - "version": "0.2.0", + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", "dev": true, - "license": "MIT" + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } }, "node_modules/through": { "version": "2.3.8", + "dev": true, "license": "MIT" }, "node_modules/tinybench": { @@ -25054,7 +21050,6 @@ "version": "4.0.3", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -25148,6 +21143,15 @@ "node": ">=12" } }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, "node_modules/ts-api-utils": { "version": "2.0.1", "dev": true, @@ -25159,6 +21163,12 @@ "typescript": ">=4.8.4" } }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, "node_modules/ts-loader": { "version": "8.4.0", "dev": true, @@ -25236,36 +21246,6 @@ "node": ">=0.4.0" } }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/tsconfig-paths/node_modules/strip-bom": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/tslib": { "version": "2.8.1", "license": "0BSD" @@ -25278,138 +21258,279 @@ "node": ">=0.6.x" } }, - "node_modules/tunnel-agent": { - "version": "0.6.0", + "node_modules/tsup": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.5.1.tgz", + "integrity": "sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" + "bundle-require": "^5.1.0", + "cac": "^6.7.14", + "chokidar": "^4.0.3", + "consola": "^3.4.0", + "debug": "^4.4.0", + "esbuild": "^0.27.0", + "fix-dts-default-cjs-exports": "^1.0.0", + "joycon": "^3.1.1", + "picocolors": "^1.1.1", + "postcss-load-config": "^6.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.34.8", + "source-map": "^0.7.6", + "sucrase": "^3.35.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.11", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } } }, - "node_modules/tweetnacl": { - "version": "0.14.5", + "node_modules/tsup/node_modules/@esbuild/darwin-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz", + "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "Unlicense" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } }, - "node_modules/type-check": { - "version": "0.4.0", + "node_modules/tsup/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, - "license": "MIT", "dependencies": { - "prelude-ls": "^1.2.1" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 0.8.0" + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/type-detect": { - "version": "4.0.8", + "node_modules/tsup/node_modules/esbuild": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz", + "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==", "dev": true, - "license": "MIT", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "license": "(MIT OR CC0-1.0)", + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.3", + "@esbuild/android-arm": "0.27.3", + "@esbuild/android-arm64": "0.27.3", + "@esbuild/android-x64": "0.27.3", + "@esbuild/darwin-arm64": "0.27.3", + "@esbuild/darwin-x64": "0.27.3", + "@esbuild/freebsd-arm64": "0.27.3", + "@esbuild/freebsd-x64": "0.27.3", + "@esbuild/linux-arm": "0.27.3", + "@esbuild/linux-arm64": "0.27.3", + "@esbuild/linux-ia32": "0.27.3", + "@esbuild/linux-loong64": "0.27.3", + "@esbuild/linux-mips64el": "0.27.3", + "@esbuild/linux-ppc64": "0.27.3", + "@esbuild/linux-riscv64": "0.27.3", + "@esbuild/linux-s390x": "0.27.3", + "@esbuild/linux-x64": "0.27.3", + "@esbuild/netbsd-arm64": "0.27.3", + "@esbuild/netbsd-x64": "0.27.3", + "@esbuild/openbsd-arm64": "0.27.3", + "@esbuild/openbsd-x64": "0.27.3", + "@esbuild/openharmony-arm64": "0.27.3", + "@esbuild/sunos-x64": "0.27.3", + "@esbuild/win32-arm64": "0.27.3", + "@esbuild/win32-ia32": "0.27.3", + "@esbuild/win32-x64": "0.27.3" + } + }, + "node_modules/tsup/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, "engines": { - "node": ">=10" + "node": ">= 14.18.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, - "node_modules/type-is": { - "version": "1.6.18", + "node_modules/tsup/node_modules/source-map": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", "dev": true, - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, "engines": { - "node": ">= 0.6" + "node": ">= 12" } }, - "node_modules/typed-array-buffer": { - "version": "1.0.3", + "node_modules/tsx": { + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", + "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", "dev": true, - "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" + "esbuild": "~0.27.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" }, "engines": { - "node": ">= 0.4" + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" } }, - "node_modules/typed-array-byte-length": { - "version": "1.0.3", + "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz", + "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.14" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/esbuild": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz", + "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" }, "engines": { - "node": ">= 0.4" + "node": ">=18" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.3", + "@esbuild/android-arm": "0.27.3", + "@esbuild/android-arm64": "0.27.3", + "@esbuild/android-x64": "0.27.3", + "@esbuild/darwin-arm64": "0.27.3", + "@esbuild/darwin-x64": "0.27.3", + "@esbuild/freebsd-arm64": "0.27.3", + "@esbuild/freebsd-x64": "0.27.3", + "@esbuild/linux-arm": "0.27.3", + "@esbuild/linux-arm64": "0.27.3", + "@esbuild/linux-ia32": "0.27.3", + "@esbuild/linux-loong64": "0.27.3", + "@esbuild/linux-mips64el": "0.27.3", + "@esbuild/linux-ppc64": "0.27.3", + "@esbuild/linux-riscv64": "0.27.3", + "@esbuild/linux-s390x": "0.27.3", + "@esbuild/linux-x64": "0.27.3", + "@esbuild/netbsd-arm64": "0.27.3", + "@esbuild/netbsd-x64": "0.27.3", + "@esbuild/openbsd-arm64": "0.27.3", + "@esbuild/openbsd-x64": "0.27.3", + "@esbuild/openharmony-arm64": "0.27.3", + "@esbuild/sunos-x64": "0.27.3", + "@esbuild/win32-arm64": "0.27.3", + "@esbuild/win32-ia32": "0.27.3", + "@esbuild/win32-x64": "0.27.3" } }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.4", + "node_modules/tunnel-agent": { + "version": "0.6.0", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" + "safe-buffer": "^5.0.1" }, "engines": { - "node": ">= 0.4" + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "dev": true, + "license": "Unlicense" + }, + "node_modules/type-detect": { + "version": "4.0.8", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/typed-array-length": { - "version": "1.0.7", + "node_modules/type-is": { + "version": "1.6.18", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0", - "reflect.getprototypeof": "^1.0.6" + "media-typer": "0.3.0", + "mime-types": "~2.1.24" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.6" } }, "node_modules/typescript": { "version": "4.9.5", "devOptional": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -25423,44 +21544,11 @@ "dev": true, "license": "MIT" }, - "node_modules/uglify-js": { - "version": "3.19.3", - "dev": true, - "license": "BSD-2-Clause", - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/unbox-primitive": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/undici-types": { "version": "7.8.0", "devOptional": true, "license": "MIT" }, - "node_modules/unfetch": { - "version": "4.2.0", - "license": "MIT" - }, "node_modules/universalify": { "version": "0.1.2", "dev": true, @@ -25477,6 +21565,14 @@ "node": ">= 0.8" } }, + "node_modules/until-async": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/until-async/-/until-async-3.0.2.tgz", + "integrity": "sha512-IiSk4HlzAMqTUseHHe3VhIGyuFmN90zMTpD3Z3y8jeQbzLIq500MVM7Jq2vUAnTKAFPJrqwkzr6PoTcPhGcOiw==", + "funding": { + "url": "https://github.com/sponsors/kettanaito" + } + }, "node_modules/update-browserslist-db": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", @@ -25526,14 +21622,6 @@ "node": ">= 0.4" } }, - "node_modules/url-parse": { - "version": "1.5.10", - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, "node_modules/url/node_modules/punycode": { "version": "1.4.1", "license": "MIT" @@ -25553,11 +21641,6 @@ "version": "1.0.2", "license": "MIT" }, - "node_modules/v8-compile-cache": { - "version": "2.4.0", - "dev": true, - "license": "MIT" - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "dev": true, @@ -25606,7 +21689,6 @@ "version": "6.3.5", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -25697,383 +21779,411 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/vite-node/node_modules/@esbuild/darwin-arm64": { + "node_modules/vite-node/node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", "cpu": [ - "arm64" + "ppc64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ - "darwin" + "aix" ], "engines": { "node": ">=12" } }, - "node_modules/vite-node/node_modules/esbuild": { + "node_modules/vite-node/node_modules/@esbuild/android-arm": { "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, + "optional": true, + "os": [ + "android" + ], "engines": { "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" } }, - "node_modules/vite-node/node_modules/vite": { - "version": "5.4.19", + "node_modules/vite-node/node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" - }, - "bin": { - "vite": "bin/vite.js" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } + "node": ">=12" } }, - "node_modules/vite/node_modules/fdir": { - "version": "6.4.6", + "node_modules/vite-node/node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/vite/node_modules/picomatch": { - "version": "4.0.3", + "node_modules/vite-node/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "peer": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/vitest": { - "version": "1.6.1", + "node_modules/vite-node/node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@vitest/expect": "1.6.1", - "@vitest/runner": "1.6.1", - "@vitest/snapshot": "1.6.1", - "@vitest/spy": "1.6.1", - "@vitest/utils": "1.6.1", - "acorn-walk": "^8.3.2", - "chai": "^4.3.10", - "debug": "^4.3.4", - "execa": "^8.0.1", - "local-pkg": "^0.5.0", - "magic-string": "^0.30.5", - "pathe": "^1.1.1", - "picocolors": "^1.0.0", - "std-env": "^3.5.0", - "strip-literal": "^2.0.0", - "tinybench": "^2.5.1", - "tinypool": "^0.8.3", - "vite": "^5.0.0", - "vite-node": "1.6.1", - "why-is-node-running": "^2.2.2" - }, - "bin": { - "vitest": "vitest.mjs" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "1.6.1", - "@vitest/ui": "1.6.1", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } + "node": ">=12" } }, - "node_modules/vitest/node_modules/@esbuild/darwin-arm64": { + "node_modules/vite-node/node_modules/@esbuild/freebsd-arm64": { "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ - "darwin" + "freebsd" ], "engines": { "node": ">=12" } }, - "node_modules/vitest/node_modules/esbuild": { + "node_modules/vite-node/node_modules/@esbuild/freebsd-x64": { "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" } }, - "node_modules/vitest/node_modules/execa": { - "version": "8.0.1", + "node_modules/vite-node/node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "node": ">=12" } }, - "node_modules/vitest/node_modules/get-stream": { - "version": "8.0.1", + "node_modules/vite-node/node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, - "node_modules/vitest/node_modules/human-signals": { - "version": "5.0.0", + "node_modules/vite-node/node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], "dev": true, - "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=16.17.0" + "node": ">=12" } }, - "node_modules/vitest/node_modules/is-stream": { - "version": "3.0.0", + "node_modules/vite-node/node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, - "node_modules/vitest/node_modules/mimic-fn": { - "version": "4.0.0", + "node_modules/vite-node/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/vitest/node_modules/npm-run-path": { - "version": "5.3.0", + "node_modules/vite-node/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^4.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, - "node_modules/vitest/node_modules/onetime": { - "version": "6.0.0", + "node_modules/vite-node/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^4.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/vitest/node_modules/path-key": { - "version": "4.0.0", + "node_modules/vite-node/node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/vitest/node_modules/signal-exit": { - "version": "4.1.0", + "node_modules/vite-node/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "ISC", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=12" } }, - "node_modules/vitest/node_modules/strip-final-newline": { - "version": "3.0.0", + "node_modules/vite-node/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/esbuild": { + "version": "0.21.5", "dev": true, + "hasInstallScript": true, "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, "engines": { "node": ">=12" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" } }, - "node_modules/vitest/node_modules/vite": { + "node_modules/vite-node/node_modules/vite": { "version": "5.4.19", "dev": true, "license": "MIT", @@ -26131,1436 +22241,1384 @@ } } }, - "node_modules/w3c-xmlserializer": { - "version": "5.0.0", + "node_modules/vite/node_modules/fdir": { + "version": "6.4.6", "dev": true, "license": "MIT", - "dependencies": { - "xml-name-validator": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/walker": { - "version": "1.0.8", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/watchpack": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.1.tgz", - "integrity": "sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==", - "dev": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" + "peerDependencies": { + "picomatch": "^3 || ^4" }, - "engines": { - "node": ">=10.13.0" + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } } }, - "node_modules/wcwidth": { - "version": "1.0.1", + "node_modules/vite/node_modules/picomatch": { + "version": "4.0.3", "dev": true, "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/web-encoding": { - "version": "1.1.5", + "node_modules/vitest": { + "version": "1.6.1", "dev": true, "license": "MIT", "dependencies": { - "util": "^0.12.3" + "@vitest/expect": "1.6.1", + "@vitest/runner": "1.6.1", + "@vitest/snapshot": "1.6.1", + "@vitest/spy": "1.6.1", + "@vitest/utils": "1.6.1", + "acorn-walk": "^8.3.2", + "chai": "^4.3.10", + "debug": "^4.3.4", + "execa": "^8.0.1", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "std-env": "^3.5.0", + "strip-literal": "^2.0.0", + "tinybench": "^2.5.1", + "tinypool": "^0.8.3", + "vite": "^5.0.0", + "vite-node": "1.6.1", + "why-is-node-running": "^2.2.2" + }, + "bin": { + "vitest": "vitest.mjs" }, - "optionalDependencies": { - "@zxing/text-encoding": "0.9.0" - } - }, - "node_modules/web-streams-polyfill": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/webidl-conversions": { - "version": "7.0.0", - "dev": true, - "license": "BSD-2-Clause", "engines": { - "node": ">=12" - } - }, - "node_modules/webpack": { - "version": "5.105.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.105.2.tgz", - "integrity": "sha512-dRXm0a2qcHPUBEzVk8uph0xWSjV/xZxenQQbLwnwP7caQCYpqG1qddwlyEkIDkYn0K8tvmcrZ+bOrzoQ3HxCDw==", - "dev": true, - "peer": true, - "dependencies": { - "@types/eslint-scope": "^3.7.7", - "@types/estree": "^1.0.8", - "@types/json-schema": "^7.0.15", - "@webassemblyjs/ast": "^1.14.1", - "@webassemblyjs/wasm-edit": "^1.14.1", - "@webassemblyjs/wasm-parser": "^1.14.1", - "acorn": "^8.15.0", - "acorn-import-phases": "^1.0.3", - "browserslist": "^4.28.1", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.19.0", - "es-module-lexer": "^2.0.0", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.11", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.3.1", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^4.3.3", - "tapable": "^2.3.0", - "terser-webpack-plugin": "^5.3.16", - "watchpack": "^2.5.1", - "webpack-sources": "^3.3.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-cli": { - "version": "5.1.4", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.1.1", - "@webpack-cli/info": "^2.0.2", - "@webpack-cli/serve": "^2.0.5", - "colorette": "^2.0.14", - "commander": "^10.0.1", - "cross-spawn": "^7.0.3", - "envinfo": "^7.7.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^3.1.1", - "rechoir": "^0.8.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=14.15.0" + "node": "^18.0.0 || >=20.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" + "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "webpack": "5.x.x" + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "1.6.1", + "@vitest/ui": "1.6.1", + "happy-dom": "*", + "jsdom": "*" }, "peerDependenciesMeta": { - "@webpack-cli/generators": { + "@edge-runtime/vm": { "optional": true }, - "webpack-bundle-analyzer": { + "@types/node": { "optional": true }, - "webpack-dev-server": { + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { "optional": true } } }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "10.0.1", + "node_modules/vitest/node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": ">=14" + "node": ">=12" } }, - "node_modules/webpack-cli/node_modules/interpret": { - "version": "3.1.1", + "node_modules/vitest/node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=10.13.0" + "node": ">=12" } }, - "node_modules/webpack-cli/node_modules/rechoir": { - "version": "0.8.0", + "node_modules/vitest/node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "resolve": "^1.20.0" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">= 10.13.0" + "node": ">=12" } }, - "node_modules/webpack-merge": { - "version": "5.10.0", + "node_modules/vitest/node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "clone-deep": "^4.0.1", - "flat": "^5.0.2", - "wildcard": "^2.0.0" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=10.0.0" + "node": ">=12" } }, - "node_modules/webpack-sources": { - "version": "3.3.3", + "node_modules/vitest/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=10.13.0" + "node": ">=12" } }, - "node_modules/webpack/node_modules/acorn": { - "version": "8.15.0", + "node_modules/vitest/node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "acorn": "bin/acorn" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=0.4.0" + "node": ">=12" } }, - "node_modules/webpack/node_modules/acorn-import-phases": { - "version": "1.0.4", + "node_modules/vitest/node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=10.13.0" - }, - "peerDependencies": { - "acorn": "^8.14.0" + "node": ">=12" } }, - "node_modules/webpack/node_modules/ajv": { - "version": "8.17.1", + "node_modules/vitest/node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/webpack/node_modules/ajv-keywords": { - "version": "5.1.0", + "node_modules/vitest/node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/webpack/node_modules/enhanced-resolve": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.19.0.tgz", - "integrity": "sha512-phv3E1Xl4tQOShqSte26C7Fl84EwUdZsyOuSSk9qtAGyyQs2s3jJzComh+Abf4g187lUUAvH+H26omrqia2aGg==", + "node_modules/vitest/node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.3.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10.13.0" + "node": ">=12" } }, - "node_modules/webpack/node_modules/es-module-lexer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.0.0.tgz", - "integrity": "sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==", - "dev": true - }, - "node_modules/webpack/node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "dev": true, - "license": "MIT" - }, - "node_modules/webpack/node_modules/json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/webpack/node_modules/schema-utils": { - "version": "4.3.3", + "node_modules/vitest/node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" + "node": ">=12" } }, - "node_modules/webpack/node_modules/tapable": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", - "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", + "node_modules/vitest/node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" + "node": ">=12" } }, - "node_modules/whatwg-encoding": { - "version": "3.1.1", + "node_modules/vitest/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "0.6.3" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=18" + "node": ">=12" } }, - "node_modules/whatwg-encoding/node_modules/iconv-lite": { - "version": "0.6.3", + "node_modules/vitest/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=0.10.0" + "node": ">=12" } }, - "node_modules/whatwg-mimetype": { - "version": "4.0.0", + "node_modules/vitest/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=18" + "node": ">=12" } }, - "node_modules/whatwg-url": { - "version": "11.0.0", + "node_modules/vitest/node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { "node": ">=12" } }, - "node_modules/which": { - "version": "2.0.2", + "node_modules/vitest/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 8" + "node": ">=12" } }, - "node_modules/which-boxed-primitive": { - "version": "1.1.1", + "node_modules/vitest/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" - }, + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=12" } }, - "node_modules/which-builtin-type": { - "version": "1.2.1", + "node_modules/vitest/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" - }, + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=12" } }, - "node_modules/which-collection": { - "version": "1.0.2", + "node_modules/vitest/node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-module": { - "version": "2.0.1", - "license": "ISC" - }, - "node_modules/which-typed-array": { - "version": "1.1.19", - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "for-each": "^0.3.5", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=12" } }, - "node_modules/why-is-node-running": { - "version": "2.3.0", + "node_modules/vitest/node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/widest-line": { - "version": "3.1.0", + "node_modules/vitest/node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], "dev": true, - "license": "MIT", - "dependencies": { - "string-width": "^4.0.0" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/wildcard": { - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/word-wrap": { - "version": "1.2.5", + "node_modules/vitest/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=0.10.0" + "node": ">=12" } }, - "node_modules/wordwrap": { - "version": "1.0.0", + "node_modules/vitest/node_modules/esbuild": { + "version": "0.21.5", "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", + "hasInstallScript": true, "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "bin": { + "esbuild": "bin/esbuild" }, "engines": { - "node": ">=10" + "node": ">=12" }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", + "node_modules/vitest/node_modules/execa": { + "version": "8.0.1", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/ws": { - "version": "8.18.3", + "node_modules/vitest/node_modules/get-stream": { + "version": "8.0.1", "dev": true, "license": "MIT", "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" + "node": ">=16" }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/xml-name-validator": { + "node_modules/vitest/node_modules/human-signals": { "version": "5.0.0", "dev": true, "license": "Apache-2.0", "engines": { - "node": ">=18" + "node": ">=16.17.0" } }, - "node_modules/xmlchars": { - "version": "2.2.0", + "node_modules/vitest/node_modules/is-stream": { + "version": "3.0.0", "dev": true, - "license": "MIT" - }, - "node_modules/xtend": { - "version": "4.0.2", "license": "MIT", "engines": { - "node": ">=0.4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/y18n": { - "version": "5.0.8", - "license": "ISC", + "node_modules/vitest/node_modules/mimic-fn": { + "version": "4.0.0", + "dev": true, + "license": "MIT", "engines": { - "node": ">=10" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yallist": { - "version": "3.1.1", + "node_modules/vitest/node_modules/npm-run-path": { + "version": "5.3.0", "dev": true, - "license": "ISC" - }, - "node_modules/yargs": { - "version": "17.7.2", "license": "MIT", "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "path-key": "^4.0.0" }, "engines": { - "node": ">=12" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs-interactive": { - "version": "3.0.1", + "node_modules/vitest/node_modules/onetime": { + "version": "6.0.0", + "dev": true, "license": "MIT", "dependencies": { - "inquirer": "^7.0.0", - "yargs": "^14.0.0" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">=8", - "npm": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs-interactive/node_modules/ansi-regex": { - "version": "4.1.1", + "node_modules/vitest/node_modules/path-key": { + "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { - "node": ">=6" - } - }, - "node_modules/yargs-interactive/node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" + "node": ">=12" }, - "engines": { - "node": ">=4" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs-interactive/node_modules/cliui": { - "version": "5.0.0", + "node_modules/vitest/node_modules/signal-exit": { + "version": "4.1.0", + "dev": true, "license": "ISC", - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/yargs-interactive/node_modules/cliui/node_modules/string-width": { - "version": "3.1.0", + "node_modules/vitest/node_modules/strip-final-newline": { + "version": "3.0.0", + "dev": true, "license": "MIT", - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs-interactive/node_modules/cliui/node_modules/strip-ansi": { - "version": "5.2.0", + "node_modules/vitest/node_modules/vite": { + "version": "5.4.19", + "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^4.1.0" + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" }, "engines": { - "node": ">=6" - } - }, - "node_modules/yargs-interactive/node_modules/color-convert": { - "version": "1.9.3", - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } } }, - "node_modules/yargs-interactive/node_modules/color-name": { - "version": "1.1.3", - "license": "MIT" - }, - "node_modules/yargs-interactive/node_modules/emoji-regex": { - "version": "7.0.3", - "license": "MIT" - }, - "node_modules/yargs-interactive/node_modules/find-up": { - "version": "3.0.0", + "node_modules/w3c-xmlserializer": { + "version": "5.0.0", + "dev": true, "license": "MIT", "dependencies": { - "locate-path": "^3.0.0" + "xml-name-validator": "^5.0.0" }, "engines": { - "node": ">=6" + "node": ">=18" } }, - "node_modules/yargs-interactive/node_modules/inquirer": { - "version": "7.3.3", - "license": "MIT", + "node_modules/walker": { + "version": "1.0.8", + "dev": true, + "license": "Apache-2.0", "dependencies": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.19", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.6.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" + "makeerror": "1.0.12" + } + }, + "node_modules/watchpack": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.1.tgz", + "integrity": "sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==", + "dev": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" }, "engines": { - "node": ">=8.0.0" + "node": ">=10.13.0" } }, - "node_modules/yargs-interactive/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">= 8" } }, - "node_modules/yargs-interactive/node_modules/locate-path": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "dev": true, + "license": "BSD-2-Clause", "engines": { - "node": ">=6" + "node": ">=12" } }, - "node_modules/yargs-interactive/node_modules/p-limit": { - "version": "2.3.0", - "license": "MIT", + "node_modules/webpack": { + "version": "5.105.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.105.2.tgz", + "integrity": "sha512-dRXm0a2qcHPUBEzVk8uph0xWSjV/xZxenQQbLwnwP7caQCYpqG1qddwlyEkIDkYn0K8tvmcrZ+bOrzoQ3HxCDw==", + "dev": true, "dependencies": { - "p-try": "^2.0.0" + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.8", + "@types/json-schema": "^7.0.15", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.15.0", + "acorn-import-phases": "^1.0.3", + "browserslist": "^4.28.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.19.0", + "es-module-lexer": "^2.0.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.3.1", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^4.3.3", + "tapable": "^2.3.0", + "terser-webpack-plugin": "^5.3.16", + "watchpack": "^2.5.1", + "webpack-sources": "^3.3.3" + }, + "bin": { + "webpack": "bin/webpack.js" }, "engines": { - "node": ">=6" + "node": ">=10.13.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } } }, - "node_modules/yargs-interactive/node_modules/p-locate": { - "version": "3.0.0", + "node_modules/webpack-cli": { + "version": "5.1.4", + "dev": true, "license": "MIT", "dependencies": { - "p-limit": "^2.0.0" + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", + "colorette": "^2.0.14", + "commander": "^10.0.1", + "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" }, "engines": { - "node": ">=6" + "node": ">=14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "5.x.x" + }, + "peerDependenciesMeta": { + "@webpack-cli/generators": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } } }, - "node_modules/yargs-interactive/node_modules/path-exists": { - "version": "3.0.0", + "node_modules/webpack-cli/node_modules/commander": { + "version": "10.0.1", + "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">=14" } }, - "node_modules/yargs-interactive/node_modules/rxjs": { - "version": "6.6.7", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^1.9.0" - }, + "node_modules/webpack-cli/node_modules/interpret": { + "version": "3.1.1", + "dev": true, + "license": "MIT", "engines": { - "npm": ">=2.0.0" + "node": ">=10.13.0" } }, - "node_modules/yargs-interactive/node_modules/tslib": { - "version": "1.14.1", - "license": "0BSD" - }, - "node_modules/yargs-interactive/node_modules/wrap-ansi": { - "version": "5.1.0", + "node_modules/webpack-cli/node_modules/rechoir": { + "version": "0.8.0", + "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" + "resolve": "^1.20.0" }, "engines": { - "node": ">=6" + "node": ">= 10.13.0" } }, - "node_modules/yargs-interactive/node_modules/wrap-ansi/node_modules/string-width": { - "version": "3.1.0", + "node_modules/webpack-merge": { + "version": "5.10.0", + "dev": true, "license": "MIT", "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.0" }, "engines": { - "node": ">=6" + "node": ">=10.0.0" } }, - "node_modules/yargs-interactive/node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "5.2.0", + "node_modules/webpack-sources": { + "version": "3.3.3", + "dev": true, "license": "MIT", - "dependencies": { - "ansi-regex": "^4.1.0" - }, "engines": { - "node": ">=6" + "node": ">=10.13.0" } }, - "node_modules/yargs-interactive/node_modules/y18n": { - "version": "4.0.3", - "license": "ISC" - }, - "node_modules/yargs-interactive/node_modules/yargs": { - "version": "14.2.3", + "node_modules/webpack/node_modules/acorn": { + "version": "8.15.0", + "dev": true, "license": "MIT", - "dependencies": { - "cliui": "^5.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^15.0.1" - } - }, - "node_modules/yargs-interactive/node_modules/yargs-parser": { - "version": "15.0.3", - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" } }, - "node_modules/yargs-interactive/node_modules/yargs/node_modules/string-width": { - "version": "3.1.0", + "node_modules/webpack/node_modules/acorn-import-phases": { + "version": "1.0.4", + "dev": true, "license": "MIT", - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, "engines": { - "node": ">=6" + "node": ">=10.13.0" + }, + "peerDependencies": { + "acorn": "^8.14.0" } }, - "node_modules/yargs-interactive/node_modules/yargs/node_modules/strip-ansi": { - "version": "5.2.0", + "node_modules/webpack/node_modules/ajv": { + "version": "8.17.1", + "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^4.1.0" + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "license": "ISC", - "engines": { - "node": ">=12" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/yargs/node_modules/cliui": { - "version": "8.0.1", - "license": "ISC", + "node_modules/webpack/node_modules/ajv-keywords": { + "version": "5.1.0", + "dev": true, + "license": "MIT", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "fast-deep-equal": "^3.1.3" }, - "engines": { - "node": ">=12" + "peerDependencies": { + "ajv": "^8.8.2" } }, - "node_modules/yarn": { - "version": "1.22.22", + "node_modules/webpack/node_modules/enhanced-resolve": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.19.0.tgz", + "integrity": "sha512-phv3E1Xl4tQOShqSte26C7Fl84EwUdZsyOuSSk9qtAGyyQs2s3jJzComh+Abf4g187lUUAvH+H26omrqia2aGg==", "dev": true, - "hasInstallScript": true, - "license": "BSD-2-Clause", - "bin": { - "yarn": "bin/yarn.js", - "yarnpkg": "bin/yarn.js" + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.0" }, "engines": { - "node": ">=4.0.0" + "node": ">=10.13.0" } }, - "node_modules/ylru": { - "version": "1.4.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } + "node_modules/webpack/node_modules/es-module-lexer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.0.0.tgz", + "integrity": "sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==", + "dev": true }, - "node_modules/yn": { - "version": "3.1.1", + "node_modules/webpack/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } + "license": "MIT" }, - "node_modules/yocto-queue": { - "version": "0.1.0", + "node_modules/webpack/node_modules/json-schema-traverse": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/webpack/node_modules/schema-utils": { + "version": "4.3.3", "dev": true, "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, "engines": { - "node": ">=10" + "node": ">= 10.13.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, - "node_modules/yoctocolors-cjs": { - "version": "2.1.2", - "license": "MIT", + "node_modules/webpack/node_modules/tapable": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", + "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", + "dev": true, "engines": { - "node": ">=18" + "node": ">=6" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, - "packages/app-bridge": { - "name": "@epilot/app-bridge", - "version": "0.2.0", + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "dev": true, "license": "MIT", "dependencies": { - "common-tags": "^1.8.2" + "iconv-lite": "0.6.3" }, - "devDependencies": { - "@testing-library/jest-dom": "^6.6.3", - "@types/common-tags": "^1.8.4", - "jsdom": "^26.0.0", - "typescript": "~5.7.2", - "vite": "^6.2.0", - "vitest": "^3.0.9" + "engines": { + "node": ">=18" } }, - "packages/app-bridge/node_modules/@vitest/expect": { - "version": "3.2.4", + "node_modules/whatwg-encoding/node_modules/iconv-lite": { + "version": "0.6.3", "dev": true, "license": "MIT", "dependencies": { - "@types/chai": "^5.2.2", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", - "chai": "^5.2.0", - "tinyrainbow": "^2.0.0" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, - "funding": { - "url": "https://opencollective.com/vitest" + "engines": { + "node": ">=0.10.0" } }, - "packages/app-bridge/node_modules/@vitest/runner": { - "version": "3.2.4", + "node_modules/whatwg-mimetype": { + "version": "4.0.0", "dev": true, "license": "MIT", - "dependencies": { - "@vitest/utils": "3.2.4", - "pathe": "^2.0.3", - "strip-literal": "^3.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" + "engines": { + "node": ">=18" } }, - "packages/app-bridge/node_modules/@vitest/snapshot": { - "version": "3.2.4", + "node_modules/whatwg-url": { + "version": "11.0.0", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.2.4", - "magic-string": "^0.30.17", - "pathe": "^2.0.3" + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" }, - "funding": { - "url": "https://opencollective.com/vitest" + "engines": { + "node": ">=12" } }, - "packages/app-bridge/node_modules/@vitest/spy": { - "version": "3.2.4", + "node_modules/which": { + "version": "2.0.2", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "tinyspy": "^4.0.3" + "isexe": "^2.0.0" }, - "funding": { - "url": "https://opencollective.com/vitest" + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, - "packages/app-bridge/node_modules/@vitest/utils": { - "version": "3.2.4", - "dev": true, + "node_modules/which-typed-array": { + "version": "1.1.19", "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.2.4", - "loupe": "^3.1.4", - "tinyrainbow": "^2.0.0" + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { - "url": "https://opencollective.com/vitest" + "url": "https://github.com/sponsors/ljharb" } }, - "packages/app-bridge/node_modules/assertion-error": { - "version": "2.0.1", + "node_modules/why-is-node-running": { + "version": "2.3.0", "dev": true, "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, "engines": { - "node": ">=12" + "node": ">=8" } }, - "packages/app-bridge/node_modules/chai": { - "version": "5.2.1", + "node_modules/widest-line": { + "version": "3.1.0", "dev": true, "license": "MIT", "dependencies": { - "assertion-error": "^2.0.1", - "check-error": "^2.1.1", - "deep-eql": "^5.0.1", - "loupe": "^3.1.0", - "pathval": "^2.0.0" + "string-width": "^4.0.0" }, "engines": { - "node": ">=18" + "node": ">=8" } }, - "packages/app-bridge/node_modules/check-error": { - "version": "2.1.1", + "node_modules/wildcard": { + "version": "2.0.1", "dev": true, + "license": "MIT" + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, "engines": { - "node": ">= 16" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "packages/app-bridge/node_modules/deep-eql": { - "version": "5.0.2", + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", "dev": true, "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "packages/app-bridge/node_modules/js-tokens": { - "version": "9.0.1", - "dev": true, - "license": "MIT" - }, - "packages/app-bridge/node_modules/loupe": { - "version": "3.2.0", + "node_modules/wrappy": { + "version": "1.0.2", "dev": true, - "license": "MIT" + "license": "ISC" }, - "packages/app-bridge/node_modules/pathe": { - "version": "2.0.3", + "node_modules/write-file-atomic": { + "version": "4.0.2", "dev": true, - "license": "MIT" + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } }, - "packages/app-bridge/node_modules/pathval": { - "version": "2.0.1", + "node_modules/ws": { + "version": "8.18.3", "dev": true, "license": "MIT", "engines": { - "node": ">= 14.16" + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, - "packages/app-bridge/node_modules/picomatch": { - "version": "4.0.3", - "dev": true, - "license": "MIT", + "node_modules/wsl-utils": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", + "integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==", + "dependencies": { + "is-wsl": "^3.1.0" + }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "url": "https://github.com/sponsors/sindresorhus" } }, - "packages/app-bridge/node_modules/strip-literal": { - "version": "3.0.0", - "dev": true, - "license": "MIT", + "node_modules/wsl-utils/node_modules/is-wsl": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz", + "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==", "dependencies": { - "js-tokens": "^9.0.1" + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" }, "funding": { - "url": "https://github.com/sponsors/antfu" + "url": "https://github.com/sponsors/sindresorhus" } }, - "packages/app-bridge/node_modules/tinypool": { - "version": "1.1.1", + "node_modules/xml-name-validator": { + "version": "5.0.0", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": ">=18" } }, - "packages/app-bridge/node_modules/tinyspy": { - "version": "4.0.3", + "node_modules/xmlchars": { + "version": "2.2.0", "dev": true, + "license": "MIT" + }, + "node_modules/xtend": { + "version": "4.0.2", "license": "MIT", "engines": { - "node": ">=14.0.0" + "node": ">=0.4" } }, - "packages/app-bridge/node_modules/typescript": { - "version": "5.7.3", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, + "node_modules/y18n": { + "version": "5.0.8", + "license": "ISC", "engines": { - "node": ">=14.17" + "node": ">=10" } }, - "packages/app-bridge/node_modules/vite-node": { - "version": "3.2.4", + "node_modules/yallist": { + "version": "3.1.1", "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "17.7.2", "license": "MIT", "dependencies": { - "cac": "^6.7.14", - "debug": "^4.4.1", - "es-module-lexer": "^1.7.0", - "pathe": "^2.0.3", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" - }, - "bin": { - "vite-node": "vite-node.mjs" + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" + "node": ">=12" } }, - "packages/app-bridge/node_modules/vitest": { - "version": "3.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/chai": "^5.2.2", - "@vitest/expect": "3.2.4", - "@vitest/mocker": "3.2.4", - "@vitest/pretty-format": "^3.2.4", - "@vitest/runner": "3.2.4", - "@vitest/snapshot": "3.2.4", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", - "chai": "^5.2.0", - "debug": "^4.4.1", - "expect-type": "^1.2.1", - "magic-string": "^0.30.17", - "pathe": "^2.0.3", - "picomatch": "^4.0.2", - "std-env": "^3.9.0", - "tinybench": "^2.9.0", - "tinyexec": "^0.3.2", - "tinyglobby": "^0.2.14", - "tinypool": "^1.1.1", - "tinyrainbow": "^2.0.0", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", - "vite-node": "3.2.4", - "why-is-node-running": "^2.3.0" - }, - "bin": { - "vitest": "vitest.mjs" - }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "license": "ISC", "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@types/debug": "^4.1.12", - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.2.4", - "@vitest/ui": "3.2.4", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@types/debug": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } + "node": ">=12" } }, - "packages/app-bridge/node_modules/vitest/node_modules/@vitest/mocker": { - "version": "3.2.4", - "dev": true, - "license": "MIT", + "node_modules/yargs/node_modules/cliui": { + "version": "8.0.1", + "license": "ISC", "dependencies": { - "@vitest/spy": "3.2.4", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.17" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } + "engines": { + "node": ">=12" } }, - "packages/app-sdk": { - "name": "@epilot/app-sdk", - "version": "0.0.1-alpha.2", - "license": "MIT", - "dependencies": { - "msw": "^2.10.2", - "tslib": "~2.8" - }, - "devDependencies": { - "@tsconfig/node16": "^16.1.4", - "@types/node": "~20", - "@vitest/coverage-v8": "~2.1", - "globals": "~15.14", - "rimraf": "~6.0", - "ts-api-utils": "~2.0", - "typescript": "~5.7", - "vitest": "~2.1" + "node_modules/yarn": { + "version": "1.22.22", + "dev": true, + "hasInstallScript": true, + "license": "BSD-2-Clause", + "bin": { + "yarn": "bin/yarn.js", + "yarnpkg": "bin/yarn.js" }, "engines": { - "node": ">= 16" + "node": ">=4.0.0" } }, - "packages/app-sdk/node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "cpu": [ - "arm64" - ], + "node_modules/ylru": { + "version": "1.4.0", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], "engines": { - "node": ">=12" + "node": ">= 4.0.0" } }, - "packages/app-sdk/node_modules/@types/node": { - "version": "20.19.9", + "node_modules/yn": { + "version": "3.1.1", "dev": true, "license": "MIT", - "peer": true, - "dependencies": { - "undici-types": "~6.21.0" + "engines": { + "node": ">=6" } }, - "packages/app-sdk/node_modules/@vitest/coverage-v8": { - "version": "2.1.9", + "node_modules/yocto-queue": { + "version": "0.1.0", "dev": true, "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.3.0", - "@bcoe/v8-coverage": "^0.2.3", - "debug": "^4.3.7", - "istanbul-lib-coverage": "^3.2.2", - "istanbul-lib-report": "^3.0.1", - "istanbul-lib-source-maps": "^5.0.6", - "istanbul-reports": "^3.1.7", - "magic-string": "^0.30.12", - "magicast": "^0.3.5", - "std-env": "^3.8.0", - "test-exclude": "^7.0.1", - "tinyrainbow": "^1.2.0" + "engines": { + "node": ">=10" }, "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@vitest/browser": "2.1.9", - "vitest": "2.1.9" - }, - "peerDependenciesMeta": { - "@vitest/browser": { - "optional": true - } + "url": "https://github.com/sponsors/sindresorhus" } }, - "packages/app-sdk/node_modules/@vitest/expect": { - "version": "2.1.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "2.1.9", - "@vitest/utils": "2.1.9", - "chai": "^5.1.2", - "tinyrainbow": "^1.2.0" + "node_modules/yoctocolors-cjs": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", + "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==", + "engines": { + "node": ">=18" }, "funding": { - "url": "https://opencollective.com/vitest" + "url": "https://github.com/sponsors/sindresorhus" } }, - "packages/app-sdk/node_modules/@vitest/mocker": { - "version": "2.1.9", - "dev": true, + "packages/app-bridge": { + "name": "@epilot/app-bridge", + "version": "0.2.0", "license": "MIT", "dependencies": { - "@vitest/spy": "2.1.9", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.12" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^5.0.0" + "common-tags": "^1.8.2" }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } + "devDependencies": { + "@testing-library/jest-dom": "^6.6.3", + "@types/common-tags": "^1.8.4", + "jsdom": "^26.0.0", + "typescript": "~5.7.2", + "vite": "^6.2.0", + "vitest": "^3.0.9" } }, - "packages/app-sdk/node_modules/@vitest/pretty-format": { - "version": "2.1.9", + "packages/app-bridge/node_modules/@vitest/expect": { + "version": "3.2.4", "dev": true, "license": "MIT", "dependencies": { - "tinyrainbow": "^1.2.0" + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, - "packages/app-sdk/node_modules/@vitest/runner": { - "version": "2.1.9", + "packages/app-bridge/node_modules/@vitest/runner": { + "version": "3.2.4", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "2.1.9", - "pathe": "^1.1.2" + "@vitest/utils": "3.2.4", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, - "packages/app-sdk/node_modules/@vitest/snapshot": { - "version": "2.1.9", + "packages/app-bridge/node_modules/@vitest/snapshot": { + "version": "3.2.4", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.1.9", - "magic-string": "^0.30.12", - "pathe": "^1.1.2" + "@vitest/pretty-format": "3.2.4", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" }, "funding": { "url": "https://opencollective.com/vitest" } }, - "packages/app-sdk/node_modules/@vitest/spy": { - "version": "2.1.9", + "packages/app-bridge/node_modules/@vitest/spy": { + "version": "3.2.4", "dev": true, "license": "MIT", "dependencies": { - "tinyspy": "^3.0.2" + "tinyspy": "^4.0.3" }, "funding": { "url": "https://opencollective.com/vitest" } }, - "packages/app-sdk/node_modules/@vitest/utils": { - "version": "2.1.9", + "packages/app-bridge/node_modules/@vitest/utils": { + "version": "3.2.4", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.1.9", - "loupe": "^3.1.2", - "tinyrainbow": "^1.2.0" + "@vitest/pretty-format": "3.2.4", + "loupe": "^3.1.4", + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, - "packages/app-sdk/node_modules/assertion-error": { + "packages/app-bridge/node_modules/assertion-error": { "version": "2.0.1", "dev": true, "license": "MIT", @@ -27568,15 +23626,7 @@ "node": ">=12" } }, - "packages/app-sdk/node_modules/brace-expansion": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "packages/app-sdk/node_modules/chai": { + "packages/app-bridge/node_modules/chai": { "version": "5.2.1", "dev": true, "license": "MIT", @@ -27591,7 +23641,7 @@ "node": ">=18" } }, - "packages/app-sdk/node_modules/check-error": { + "packages/app-bridge/node_modules/check-error": { "version": "2.1.1", "dev": true, "license": "MIT", @@ -27599,7 +23649,7 @@ "node": ">= 16" } }, - "packages/app-sdk/node_modules/deep-eql": { + "packages/app-bridge/node_modules/deep-eql": { "version": "5.0.2", "dev": true, "license": "MIT", @@ -27607,116 +23657,52 @@ "node": ">=6" } }, - "packages/app-sdk/node_modules/esbuild": { - "version": "0.21.5", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" - } - }, - "packages/app-sdk/node_modules/glob": { - "version": "10.4.5", + "packages/app-bridge/node_modules/js-tokens": { + "version": "9.0.1", "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } + "license": "MIT" }, - "packages/app-sdk/node_modules/istanbul-lib-source-maps": { - "version": "5.0.6", + "packages/app-bridge/node_modules/loupe": { + "version": "3.2.0", "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.23", - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0" - }, - "engines": { - "node": ">=10" - } + "license": "MIT" }, - "packages/app-sdk/node_modules/loupe": { - "version": "3.2.0", + "packages/app-bridge/node_modules/pathe": { + "version": "2.0.3", "dev": true, "license": "MIT" }, - "packages/app-sdk/node_modules/minimatch": { - "version": "9.0.5", + "packages/app-bridge/node_modules/pathval": { + "version": "2.0.1", "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, + "license": "MIT", "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">= 14.16" } - }, - "packages/app-sdk/node_modules/pathval": { - "version": "2.0.1", + }, + "packages/app-bridge/node_modules/picomatch": { + "version": "4.0.3", "dev": true, "license": "MIT", "engines": { - "node": ">= 14.16" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "packages/app-sdk/node_modules/test-exclude": { - "version": "7.0.1", + "packages/app-bridge/node_modules/strip-literal": { + "version": "3.0.0", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^10.4.1", - "minimatch": "^9.0.4" + "js-tokens": "^9.0.1" }, - "engines": { - "node": ">=18" + "funding": { + "url": "https://github.com/sponsors/antfu" } }, - "packages/app-sdk/node_modules/tinypool": { + "packages/app-bridge/node_modules/tinypool": { "version": "1.1.1", "dev": true, "license": "MIT", @@ -27724,23 +23710,15 @@ "node": "^18.0.0 || >=20.0.0" } }, - "packages/app-sdk/node_modules/tinyrainbow": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "packages/app-sdk/node_modules/tinyspy": { - "version": "3.0.2", + "packages/app-bridge/node_modules/tinyspy": { + "version": "4.0.3", "dev": true, "license": "MIT", "engines": { "node": ">=14.0.0" } }, - "packages/app-sdk/node_modules/typescript": { + "packages/app-bridge/node_modules/typescript": { "version": "5.7.3", "dev": true, "license": "Apache-2.0", @@ -27752,132 +23730,71 @@ "node": ">=14.17" } }, - "packages/app-sdk/node_modules/undici-types": { - "version": "6.21.0", - "dev": true, - "license": "MIT" - }, - "packages/app-sdk/node_modules/vite": { - "version": "5.4.19", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "packages/app-sdk/node_modules/vite-node": { - "version": "2.1.9", + "packages/app-bridge/node_modules/vite-node": { + "version": "3.2.4", "dev": true, "license": "MIT", "dependencies": { "cac": "^6.7.14", - "debug": "^4.3.7", - "es-module-lexer": "^1.5.4", - "pathe": "^1.1.2", - "vite": "^5.0.0" + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "bin": { "vite-node": "vite-node.mjs" }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, - "packages/app-sdk/node_modules/vitest": { - "version": "2.1.9", + "packages/app-bridge/node_modules/vitest": { + "version": "3.2.4", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "@vitest/expect": "2.1.9", - "@vitest/mocker": "2.1.9", - "@vitest/pretty-format": "^2.1.9", - "@vitest/runner": "2.1.9", - "@vitest/snapshot": "2.1.9", - "@vitest/spy": "2.1.9", - "@vitest/utils": "2.1.9", - "chai": "^5.1.2", - "debug": "^4.3.7", - "expect-type": "^1.1.0", - "magic-string": "^0.30.12", - "pathe": "^1.1.2", - "std-env": "^3.8.0", + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.4", + "@vitest/mocker": "3.2.4", + "@vitest/pretty-format": "^3.2.4", + "@vitest/runner": "3.2.4", + "@vitest/snapshot": "3.2.4", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "std-env": "^3.9.0", "tinybench": "^2.9.0", - "tinyexec": "^0.3.1", - "tinypool": "^1.0.1", - "tinyrainbow": "^1.2.0", - "vite": "^5.0.0", - "vite-node": "2.1.9", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", "why-is-node-running": "^2.3.0" }, "bin": { "vitest": "vitest.mjs" }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { "@edge-runtime/vm": "*", - "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.1.9", - "@vitest/ui": "2.1.9", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.4", + "@vitest/ui": "3.2.4", "happy-dom": "*", "jsdom": "*" }, @@ -27885,6 +23802,9 @@ "@edge-runtime/vm": { "optional": true }, + "@types/debug": { + "optional": true + }, "@types/node": { "optional": true }, @@ -27902,867 +23822,1061 @@ } } }, - "packages/auth": { - "name": "@epilot/auth", - "version": "0.8.0", + "packages/app-bridge/node_modules/vitest/node_modules/@vitest/mocker": { + "version": "3.2.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.2.4", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "packages/app-sdk": { + "name": "@epilot/app-sdk", + "version": "0.0.1-alpha.2", + "license": "MIT", + "dependencies": { + "msw": "^2.10.2", + "tslib": "~2.8" + }, + "devDependencies": { + "@tsconfig/node16": "^16.1.4", + "@types/node": "~20", + "@vitest/coverage-v8": "~2.1", + "globals": "~15.14", + "rimraf": "~6.0", + "ts-api-utils": "~2.0", + "typescript": "~5.7", + "vitest": "~2.1" + }, + "engines": { + "node": ">= 16" + } + }, + "packages/app-sdk/node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "packages/app-sdk/node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/app-sdk/node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/app-sdk/node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/app-sdk/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@epilot/user-client": "^3.12.0", - "amazon-cognito-identity-js": "^5.2.5", - "debug": "^4.3.3", - "yargs-interactive": "^3.0.0" - }, - "bin": { - "print-token": "dist/script/print-token.js" - }, - "devDependencies": { - "@types/debug": "^4.1.7", - "@types/jest": "^27.4.0", - "@types/yargs-interactive": "^2.1.3", - "axios": "^1.11.0", - "jest": "^29.6.2", - "msw": "^0.36.8", - "openapi-client-axios": "^7.8.0", - "ts-jest": "^29.4.1", - "ts-node": "^10.4.0", - "typescript": "^4.5.5" - }, - "peerDependencies": { - "axios": "^1.0.0 || >=0.25.0 <1.0.0" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" } }, - "packages/auth/node_modules/@mswjs/interceptors": { - "version": "0.12.7", + "packages/app-sdk/node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@open-draft/until": "^1.0.3", - "@xmldom/xmldom": "^0.7.2", - "debug": "^4.3.2", - "headers-utils": "^3.0.2", - "outvariant": "^1.2.0", - "strict-event-emitter": "^0.2.0" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" } }, - "packages/auth/node_modules/@open-draft/until": { - "version": "1.0.3", + "packages/app-sdk/node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } }, - "packages/auth/node_modules/@types/cookie": { - "version": "0.4.1", + "packages/app-sdk/node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } }, - "packages/auth/node_modules/@types/inquirer": { - "version": "8.2.11", + "packages/app-sdk/node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@types/through": "*", - "rxjs": "^7.2.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "packages/auth/node_modules/@types/jest": { - "version": "27.5.2", + "packages/app-sdk/node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "jest-matcher-utils": "^27.0.0", - "pretty-format": "^27.0.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "packages/auth/node_modules/chalk": { - "version": "4.1.1", + "packages/app-sdk/node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=12" } }, - "packages/auth/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", + "packages/app-sdk/node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "packages/auth/node_modules/cookie": { - "version": "0.4.2", + "packages/app-sdk/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 0.6" + "node": ">=12" } }, - "packages/auth/node_modules/diff-sequences": { - "version": "27.5.1", + "packages/app-sdk/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=12" } }, - "packages/auth/node_modules/graphql": { - "version": "15.10.1", + "packages/app-sdk/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 10.x" + "node": ">=12" } }, - "packages/auth/node_modules/jest-diff": { - "version": "27.5.1", + "packages/app-sdk/node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=12" } }, - "packages/auth/node_modules/jest-get-type": { - "version": "27.5.1", + "packages/app-sdk/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=12" } }, - "packages/auth/node_modules/jest-matcher-utils": { - "version": "27.5.1", + "packages/app-sdk/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=12" } }, - "packages/auth/node_modules/msw": { - "version": "0.36.8", + "packages/app-sdk/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "@mswjs/cookies": "^0.1.7", - "@mswjs/interceptors": "^0.12.7", - "@open-draft/until": "^1.0.3", - "@types/cookie": "^0.4.1", - "@types/inquirer": "^8.1.3", - "@types/js-levenshtein": "^1.1.0", - "chalk": "4.1.1", - "chokidar": "^3.4.2", - "cookie": "^0.4.1", - "graphql": "^15.5.1", - "headers-utils": "^3.0.2", - "inquirer": "^8.2.0", - "is-node-process": "^1.0.1", - "js-levenshtein": "^1.1.6", - "node-fetch": "^2.6.7", - "path-to-regexp": "^6.2.0", - "statuses": "^2.0.0", - "strict-event-emitter": "^0.2.0", - "type-fest": "^1.2.2", - "yargs": "^17.3.0" - }, - "bin": { - "msw": "cli/index.js" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mswjs" + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" } }, - "packages/auth/node_modules/node-fetch": { - "version": "2.7.0", + "packages/app-sdk/node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "node": ">=12" } }, - "packages/auth/node_modules/pretty-format": { - "version": "27.5.1", + "packages/app-sdk/node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=12" } }, - "packages/auth/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", + "packages/app-sdk/node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=12" } }, - "packages/auth/node_modules/react-is": { - "version": "17.0.2", + "packages/app-sdk/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT" + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } }, - "packages/auth/node_modules/strict-event-emitter": { - "version": "0.2.8", + "packages/app-sdk/node_modules/@types/node": { + "version": "20.19.9", "dev": true, "license": "MIT", "dependencies": { - "events": "^3.3.0" + "undici-types": "~6.21.0" } }, - "packages/auth/node_modules/tr46": { - "version": "0.0.3", - "dev": true, - "license": "MIT" - }, - "packages/auth/node_modules/ts-jest": { - "version": "29.4.5", + "packages/app-sdk/node_modules/@vitest/coverage-v8": { + "version": "2.1.9", "dev": true, "license": "MIT", "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" + "@ampproject/remapping": "^2.3.0", + "@bcoe/v8-coverage": "^0.2.3", + "debug": "^4.3.7", + "istanbul-lib-coverage": "^3.2.2", + "istanbul-lib-report": "^3.0.1", + "istanbul-lib-source-maps": "^5.0.6", + "istanbul-reports": "^3.1.7", + "magic-string": "^0.30.12", + "magicast": "^0.3.5", + "std-env": "^3.8.0", + "test-exclude": "^7.0.1", + "tinyrainbow": "^1.2.0" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + "funding": { + "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" + "@vitest/browser": "2.1.9", + "vitest": "2.1.9" }, "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { + "@vitest/browser": { "optional": true } } }, - "packages/auth/node_modules/ts-jest/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/auth/node_modules/type-fest": { - "version": "1.4.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/auth/node_modules/webidl-conversions": { - "version": "3.0.1", - "dev": true, - "license": "BSD-2-Clause" - }, - "packages/auth/node_modules/whatwg-url": { - "version": "5.0.0", + "packages/app-sdk/node_modules/@vitest/expect": { + "version": "2.1.9", "dev": true, "license": "MIT", "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "packages/epilot-sdk": { - "version": "1.10.0", - "license": "MIT", - "dependencies": { - "@epilot/access-token-client": "^1.1.0", - "@epilot/address-suggestions-client": "^1.3.0", - "@epilot/audit-logs-client": "^0.4.0", - "@epilot/auth": "^0.8.0", - "@epilot/automation-client": "^2.24.0", - "@epilot/billing-client": "^0.5.0", - "@epilot/blueprint-manifest-client": "^3.1.0", - "@epilot/customer-portal-client": "^0.23.0", - "@epilot/design-client": "^0.3.0", - "@epilot/discussion-client": "^1.10.0", - "@epilot/document-client": "^0.18.0", - "@epilot/email-settings-client": "^0.6.0", - "@epilot/email-template-client": "^2.2.0", - "@epilot/entity-client": "^6.6.0", - "@epilot/entity-mapping-client": "^0.10.0", - "@epilot/file-client": "^1.15.0", - "@epilot/message-client": "^1.18.0", - "@epilot/metering-client": "^0.8.0", - "@epilot/notification-client": "^0.7.0", - "@epilot/organization-client": "^0.13.0", - "@epilot/partner-directory-client": "^0.10.0", - "@epilot/permissions-client": "^0.16.0", - "@epilot/pricing-client": "^3.50.0", - "@epilot/sandbox-client": "^0.4.0", - "@epilot/submission-client": "^1.8.0", - "@epilot/template-variables-client": "^1.15.0", - "@epilot/user-client": "^3.12.0", - "@epilot/workflow-client": "^1.15.0", - "@epilot/workflow-definition-client": "^1.17.0", - "axios": "^1.11.0", - "openapi-client-axios": "^7.8.0" + "@vitest/spy": "2.1.9", + "@vitest/utils": "2.1.9", + "chai": "^5.1.2", + "tinyrainbow": "^1.2.0" }, - "devDependencies": { - "@types/jest": "^27.4.0", - "jest": "^29.6.2", - "msw": "^0.49.2", - "ts-jest": "^29.4.1", - "ts-node": "^10.4.0", - "typescript": "^4.5.5" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "packages/epilot-sdk/node_modules/@epilot/access-token-client": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@epilot/access-token-client/-/access-token-client-1.2.0.tgz", - "integrity": "sha512-GpHuJY3K6WyEeiPWStOQCVCvylnfU5olGmLPZoeTJl1KRSGN+iZ1MVMqpbS3emdzQt/7xCNfRh4/zDvSlcjxSA==", + "packages/app-sdk/node_modules/@vitest/mocker": { + "version": "2.1.9", + "dev": true, "license": "MIT", "dependencies": { - "@dazn/lambda-powertools-correlation-ids": "^1.28.1", - "buffer": "^6.0.3", - "https-browserify": "^1.0.0", - "openapi-client-axios": "^7.8.0", - "stream-http": "^3.1.1", - "url": "^0.11.0", - "util": "^0.12.3" + "@vitest/spy": "2.1.9", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.12" }, - "peerDependencies": { - "axios": "^1.0.0 || >=0.25.0 <1.0.0" - } - }, - "packages/epilot-sdk/node_modules/@epilot/blueprint-manifest-client": { - "version": "3.10.0", - "license": "MIT", - "dependencies": { - "@dazn/lambda-powertools-correlation-ids": "^1.28.1", - "buffer": "^6.0.3", - "https-browserify": "^1.0.0", - "openapi-client-axios": "^7.8.0", - "stream-http": "^3.1.1", - "url": "^0.11.0", - "util": "^0.12.3" + "funding": { + "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "axios": "^1.0.0 || >=0.25.0 <1.0.0" - } - }, - "packages/epilot-sdk/node_modules/@epilot/customer-portal-client": { - "version": "0.23.1", - "license": "UNLICENSED", - "dependencies": { - "buffer": "^6.0.3", - "https-browserify": "^1.0.0", - "openapi-client-axios": "^7.6.0", - "stream-http": "^3.1.1", - "url": "^0.11.0", - "util": "^0.12.3" + "msw": "^2.4.9", + "vite": "^5.0.0" }, - "peerDependencies": { - "axios": "^1.6.2" + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } } }, - "packages/epilot-sdk/node_modules/@epilot/document-client": { - "version": "0.18.1", - "license": "UNLICENSED", + "packages/app-sdk/node_modules/@vitest/pretty-format": { + "version": "2.1.9", + "dev": true, + "license": "MIT", "dependencies": { - "buffer": "^6.0.3", - "https-browserify": "^1.0.0", - "openapi-client-axios": "^7.6.0", - "stream-http": "^3.1.1", - "url": "^0.11.0", - "util": "^0.12.3" + "tinyrainbow": "^1.2.0" }, - "peerDependencies": { - "axios": "^1.0.0 || >=0.25.0 <1.0.0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "packages/epilot-sdk/node_modules/@epilot/email-settings-client": { - "version": "0.6.1", - "license": "UNLICENSED", + "packages/app-sdk/node_modules/@vitest/runner": { + "version": "2.1.9", + "dev": true, + "license": "MIT", "dependencies": { - "@dazn/lambda-powertools-correlation-ids": "^1.28.1", - "buffer": "^6.0.3", - "https-browserify": "^1.0.0", - "openapi-client-axios": "^7.6.0", - "stream-http": "^3.1.1", - "url": "^0.11.0", - "util": "^0.12.3" + "@vitest/utils": "2.1.9", + "pathe": "^1.1.2" }, - "peerDependencies": { - "axios": "^1.0.0 || >=0.25.0 <1.0.0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "packages/epilot-sdk/node_modules/@epilot/entity-mapping-client": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@epilot/entity-mapping-client/-/entity-mapping-client-0.10.3.tgz", - "integrity": "sha512-xb31PXkLbAEPpc6u/kbXVh+VjaF7iG5sOGeHLpdQJ+slsaYGHGSNPIuci7fGvcc0761QFbh2kgO9+/PlLPz9pw==", + "packages/app-sdk/node_modules/@vitest/snapshot": { + "version": "2.1.9", + "dev": true, "license": "MIT", "dependencies": { - "@dazn/lambda-powertools-correlation-ids": "^1.28.1", - "buffer": "^6.0.3", - "https-browserify": "^1.0.0", - "openapi-client-axios": "^7.8.0", - "stream-http": "^3.1.1", - "url": "^0.11.0", - "util": "^0.12.3" + "@vitest/pretty-format": "2.1.9", + "magic-string": "^0.30.12", + "pathe": "^1.1.2" }, - "peerDependencies": { - "axios": "^1.0.0 || >=0.25.0 <1.0.0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "packages/epilot-sdk/node_modules/@epilot/metering-client": { - "version": "0.8.2", - "license": "UNLICENSED", - "dependencies": { - "buffer": "^6.0.3", - "https-browserify": "^1.0.0", - "openapi-client-axios": "^7.8.0", - "stream-http": "^3.1.1", - "url": "^0.11.0", - "util": "^0.12.3" + "packages/app-sdk/node_modules/@vitest/spy": { + "version": "2.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^3.0.2" }, - "peerDependencies": { - "axios": "^1.0.0 || >=0.25.0 <1.0.0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "packages/epilot-sdk/node_modules/@epilot/notification-client": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/@epilot/notification-client/-/notification-client-0.7.2.tgz", - "integrity": "sha512-fSYCnJj/fr2XWU1CpzaJWquD5JkNOY7ax7TOOueJSZtn2NL/k5tDgJuNFTkNbBeEGIYlgeebzBgR/MEqZKXtfw==", - "license": "UNLICENSED", + "packages/app-sdk/node_modules/@vitest/utils": { + "version": "2.1.9", + "dev": true, + "license": "MIT", "dependencies": { - "@dazn/lambda-powertools-correlation-ids": "^1.28.1", - "buffer": "^6.0.3", - "https-browserify": "^1.0.0", - "openapi-client-axios": "^7.8.0", - "stream-http": "^3.1.1", - "url": "^0.11.0", - "util": "^0.12.3" + "@vitest/pretty-format": "2.1.9", + "loupe": "^3.1.2", + "tinyrainbow": "^1.2.0" }, - "peerDependencies": { - "axios": "^1.0.0 || >=0.25.0 <1.0.0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "packages/epilot-sdk/node_modules/@epilot/partner-directory-client": { - "version": "0.10.1", - "license": "UNLICENSED", + "packages/app-sdk/node_modules/assertion-error": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "packages/app-sdk/node_modules/brace-expansion": { + "version": "2.0.2", + "dev": true, + "license": "MIT", "dependencies": { - "@dazn/lambda-powertools-correlation-ids": "^1.28.1", - "buffer": "^6.0.3", - "https-browserify": "^1.0.0", - "openapi-client-axios": "^7.6.0", - "stream-http": "^3.1.1", - "url": "^0.11.0", - "util": "^0.12.3" - }, - "peerDependencies": { - "axios": "^1.0.0 || >=0.25.0 <1.0.0" + "balanced-match": "^1.0.0" } }, - "packages/epilot-sdk/node_modules/@mswjs/cookies": { - "version": "0.2.2", + "packages/app-sdk/node_modules/chai": { + "version": "5.2.1", "dev": true, "license": "MIT", "dependencies": { - "@types/set-cookie-parser": "^2.4.0", - "set-cookie-parser": "^2.4.6" + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, - "packages/epilot-sdk/node_modules/@mswjs/interceptors": { - "version": "0.17.10", + "packages/app-sdk/node_modules/check-error": { + "version": "2.1.1", "dev": true, "license": "MIT", - "dependencies": { - "@open-draft/until": "^1.0.3", - "@types/debug": "^4.1.7", - "@xmldom/xmldom": "^0.8.3", - "debug": "^4.3.3", - "headers-polyfill": "3.2.5", - "outvariant": "^1.2.1", - "strict-event-emitter": "^0.2.4", - "web-encoding": "^1.1.5" - }, "engines": { - "node": ">=14" + "node": ">= 16" } }, - "packages/epilot-sdk/node_modules/@mswjs/interceptors/node_modules/headers-polyfill": { - "version": "3.2.5", + "packages/app-sdk/node_modules/deep-eql": { + "version": "5.0.2", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=6" + } }, - "packages/epilot-sdk/node_modules/@mswjs/interceptors/node_modules/strict-event-emitter": { - "version": "0.2.8", + "packages/app-sdk/node_modules/esbuild": { + "version": "0.21.5", "dev": true, + "hasInstallScript": true, "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "packages/app-sdk/node_modules/glob": { + "version": "10.4.5", + "dev": true, + "license": "ISC", "dependencies": { - "events": "^3.3.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "packages/epilot-sdk/node_modules/@open-draft/until": { - "version": "1.0.3", + "packages/app-sdk/node_modules/istanbul-lib-source-maps": { + "version": "5.0.6", "dev": true, - "license": "MIT" + "license": "BSD-3-Clause", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0" + }, + "engines": { + "node": ">=10" + } }, - "packages/epilot-sdk/node_modules/@types/cookie": { - "version": "0.4.1", + "packages/app-sdk/node_modules/loupe": { + "version": "3.2.0", "dev": true, "license": "MIT" }, - "packages/epilot-sdk/node_modules/@types/jest": { - "version": "27.5.2", + "packages/app-sdk/node_modules/minimatch": { + "version": "9.0.5", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "jest-matcher-utils": "^27.0.0", - "pretty-format": "^27.0.0" + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "packages/epilot-sdk/node_modules/@xmldom/xmldom": { - "version": "0.8.10", + "packages/app-sdk/node_modules/pathval": { + "version": "2.0.1", "dev": true, "license": "MIT", "engines": { - "node": ">=10.0.0" + "node": ">= 14.16" } }, - "packages/epilot-sdk/node_modules/chalk": { - "version": "4.1.1", + "packages/app-sdk/node_modules/test-exclude": { + "version": "7.0.1", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@istanbuljs/schema": "^0.1.2", + "glob": "^10.4.1", + "minimatch": "^9.0.4" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=18" } }, - "packages/epilot-sdk/node_modules/cookie": { - "version": "0.4.2", + "packages/app-sdk/node_modules/tinypool": { + "version": "1.1.1", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.6" + "node": "^18.0.0 || >=20.0.0" } }, - "packages/epilot-sdk/node_modules/diff-sequences": { - "version": "27.5.1", + "packages/app-sdk/node_modules/tinyrainbow": { + "version": "1.2.0", "dev": true, "license": "MIT", "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=14.0.0" } }, - "packages/epilot-sdk/node_modules/headers-polyfill": { - "version": "3.3.0", + "packages/app-sdk/node_modules/tinyspy": { + "version": "3.0.2", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } }, - "packages/epilot-sdk/node_modules/jest-diff": { - "version": "27.5.1", + "packages/app-sdk/node_modules/typescript": { + "version": "5.7.3", "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=14.17" } }, - "packages/epilot-sdk/node_modules/jest-get-type": { - "version": "27.5.1", + "packages/app-sdk/node_modules/undici-types": { + "version": "6.21.0", + "dev": true, + "license": "MIT" + }, + "packages/app-sdk/node_modules/vite": { + "version": "5.4.19", "dev": true, "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } } }, - "packages/epilot-sdk/node_modules/jest-matcher-utils": { - "version": "27.5.1", + "packages/app-sdk/node_modules/vite-node": { + "version": "2.1.9", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "cac": "^6.7.14", + "debug": "^4.3.7", + "es-module-lexer": "^1.5.4", + "pathe": "^1.1.2", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "packages/epilot-sdk/node_modules/msw": { - "version": "0.49.3", + "packages/app-sdk/node_modules/vitest": { + "version": "2.1.9", "dev": true, - "hasInstallScript": true, "license": "MIT", "dependencies": { - "@mswjs/cookies": "^0.2.2", - "@mswjs/interceptors": "^0.17.5", - "@open-draft/until": "^1.0.3", - "@types/cookie": "^0.4.1", - "@types/js-levenshtein": "^1.1.1", - "chalk": "4.1.1", - "chokidar": "^3.4.2", - "cookie": "^0.4.2", - "graphql": "^15.0.0 || ^16.0.0", - "headers-polyfill": "^3.1.0", - "inquirer": "^8.2.0", - "is-node-process": "^1.0.1", - "js-levenshtein": "^1.1.6", - "node-fetch": "^2.6.7", - "outvariant": "^1.3.0", - "path-to-regexp": "^6.2.0", - "strict-event-emitter": "^0.4.3", - "type-fest": "^2.19.0", - "yargs": "^17.3.1" + "@vitest/expect": "2.1.9", + "@vitest/mocker": "2.1.9", + "@vitest/pretty-format": "^2.1.9", + "@vitest/runner": "2.1.9", + "@vitest/snapshot": "2.1.9", + "@vitest/spy": "2.1.9", + "@vitest/utils": "2.1.9", + "chai": "^5.1.2", + "debug": "^4.3.7", + "expect-type": "^1.1.0", + "magic-string": "^0.30.12", + "pathe": "^1.1.2", + "std-env": "^3.8.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.1", + "tinypool": "^1.0.1", + "tinyrainbow": "^1.2.0", + "vite": "^5.0.0", + "vite-node": "2.1.9", + "why-is-node-running": "^2.3.0" }, "bin": { - "msw": "cli/index.js" + "vitest": "vitest.mjs" }, "engines": { - "node": ">=14" + "node": "^18.0.0 || >=20.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mswjs" + "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "typescript": ">= 4.4.x <= 4.9.x" + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "2.1.9", + "@vitest/ui": "2.1.9", + "happy-dom": "*", + "jsdom": "*" }, "peerDependenciesMeta": { - "typescript": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { "optional": true } } }, - "packages/epilot-sdk/node_modules/node-fetch": { - "version": "2.7.0", - "dev": true, + "packages/auth": { + "name": "@epilot/auth", + "version": "0.8.0", + "extraneous": true, "license": "MIT", "dependencies": { - "whatwg-url": "^5.0.0" + "@epilot/user-client": "^3.12.0", + "amazon-cognito-identity-js": "^5.2.5", + "debug": "^4.3.3", + "yargs-interactive": "^3.0.0" }, - "engines": { - "node": "4.x || >=6.0.0" + "bin": { + "print-token": "dist/script/print-token.js" }, - "peerDependencies": { - "encoding": "^0.1.0" + "devDependencies": { + "@types/debug": "^4.1.7", + "@types/jest": "^27.4.0", + "@types/yargs-interactive": "^2.1.3", + "axios": "^1.11.0", + "jest": "^29.6.2", + "msw": "^0.36.8", + "openapi-client-axios": "^7.8.0", + "ts-jest": "^29.4.1", + "ts-node": "^10.4.0", + "typescript": "^4.5.5" }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "peerDependencies": { + "axios": "^1.0.0 || >=0.25.0 <1.0.0" } }, - "packages/epilot-sdk/node_modules/pretty-format": { - "version": "27.5.1", - "dev": true, + "packages/cli": { + "name": "@epilot/cli", + "version": "0.1.7", "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "@inquirer/prompts": "^7.0.0", + "axios": "^1.11.0", + "citty": "^0.2.1", + "dereference-json-schema": "^0.2.2", + "jsonata": "^2.0.0", + "mock-json-schema": "^1.1.2", + "open": "^10.0.0", + "openapi-client-axios": "^7.8.0" + }, + "bin": { + "epilot": "dist/bin/epilot.js" + }, + "devDependencies": { + "msw": "^2.12.10", + "tsup": "^8.0.0", + "tsx": "^4.0.0", + "typescript": "^5.3.0", + "vitest": "^1.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=18" } }, - "packages/epilot-sdk/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, + "packages/cli-wrapper": { + "name": "epilot", + "version": "0.1.7", "license": "MIT", - "engines": { - "node": ">=10" + "dependencies": { + "@epilot/cli": "*" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "bin": { + "epilot": "bin/epilot.js" + }, + "engines": { + "node": ">=18" } }, - "packages/epilot-sdk/node_modules/react-is": { - "version": "17.0.2", - "dev": true, - "license": "MIT" - }, - "packages/epilot-sdk/node_modules/strict-event-emitter": { - "version": "0.4.6", - "dev": true, - "license": "MIT" - }, - "packages/epilot-sdk/node_modules/tr46": { - "version": "0.0.3", + "packages/cli/node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, - "license": "MIT" + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } }, - "packages/epilot-sdk/node_modules/ts-jest": { - "version": "29.4.5", - "dev": true, + "packages/epilot-sdk": { + "version": "1.10.0", + "extraneous": true, "license": "MIT", "dependencies": { - "bs-logger": "^0.2.6", - "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.7.3", - "type-fest": "^4.41.0", - "yargs-parser": "^21.1.1" + "@epilot/access-token-client": "^1.1.0", + "@epilot/address-suggestions-client": "^1.3.0", + "@epilot/audit-logs-client": "^0.4.0", + "@epilot/auth": "^0.8.0", + "@epilot/automation-client": "^2.24.0", + "@epilot/billing-client": "^0.5.0", + "@epilot/blueprint-manifest-client": "^3.1.0", + "@epilot/customer-portal-client": "^0.23.0", + "@epilot/design-client": "^0.3.0", + "@epilot/discussion-client": "^1.10.0", + "@epilot/document-client": "^0.18.0", + "@epilot/email-settings-client": "^0.6.0", + "@epilot/email-template-client": "^2.2.0", + "@epilot/entity-client": "^6.6.0", + "@epilot/entity-mapping-client": "^0.10.0", + "@epilot/file-client": "^1.15.0", + "@epilot/message-client": "^1.18.0", + "@epilot/metering-client": "^0.8.0", + "@epilot/notification-client": "^0.7.0", + "@epilot/organization-client": "^0.13.0", + "@epilot/partner-directory-client": "^0.10.0", + "@epilot/permissions-client": "^0.16.0", + "@epilot/pricing-client": "^3.50.0", + "@epilot/sandbox-client": "^0.4.0", + "@epilot/submission-client": "^1.8.0", + "@epilot/template-variables-client": "^1.15.0", + "@epilot/user-client": "^3.12.0", + "@epilot/workflow-client": "^1.15.0", + "@epilot/workflow-definition-client": "^1.17.0", + "axios": "^1.11.0", + "openapi-client-axios": "^7.8.0" }, + "devDependencies": { + "@types/jest": "^27.4.0", + "jest": "^29.6.2", + "msw": "^0.49.2", + "ts-jest": "^29.4.1", + "ts-node": "^10.4.0", + "typescript": "^4.5.5" + } + }, + "packages/epilot-sdk-v2": { + "name": "@epilot/sdk", + "version": "2.0.0", + "license": "MIT", "bin": { - "ts-jest": "cli.js" + "epilot-sdk": "dist/bin/cli.js" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + "devDependencies": { + "axios": "^1.11.0", + "msw": "^2.10.4", + "openapi-client-axios": "^7.8.0", + "tsup": "^8.0.0", + "tsx": "^4.0.0", + "typescript": "^5.3.0", + "vitest": "^1.0.0" }, "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0 || ^30.0.0", - "@jest/types": "^29.0.0 || ^30.0.0", - "babel-jest": "^29.0.0 || ^30.0.0", - "jest": "^29.0.0 || ^30.0.0", - "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jest-util": { - "optional": true - } + "axios": "^1.0.0", + "openapi-client-axios": "^7.0.0" } }, - "packages/epilot-sdk/node_modules/ts-jest/node_modules/type-fest": { - "version": "4.41.0", + "packages/epilot-sdk-v2/node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/epilot-sdk/node_modules/type-fest": { - "version": "2.19.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/epilot-sdk/node_modules/webidl-conversions": { - "version": "3.0.1", - "dev": true, - "license": "BSD-2-Clause" - }, - "packages/epilot-sdk/node_modules/whatwg-url": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "node": ">=14.17" } } } diff --git a/packages/cli-wrapper/LICENSE b/packages/cli-wrapper/LICENSE new file mode 100644 index 00000000..9169ae20 --- /dev/null +++ b/packages/cli-wrapper/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2026 epilot GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/cli-wrapper/README.md b/packages/cli-wrapper/README.md new file mode 100644 index 00000000..504b33b4 --- /dev/null +++ b/packages/cli-wrapper/README.md @@ -0,0 +1,386 @@ +

epilot
@epilot/cli

+ +

+ CI + npm version + License +

+ +

Command-line interface for all epilot APIs. One command to call any operation.

+ +Built for developers, automation scripts, and AI agents. The epilot CLI gives you direct access to the entire epilot platform from your terminal — no SDK setup, no boilerplate, just `npx epilot`. + +- **Quick API calls** — look up entities, search data, check configurations without writing code +- **Automation & scripting** — pipe JSON in/out, `--json` mode for `jq`-friendly output, `--no-interactive` for CI +- **AI agent tool use** — structured `--json` output and `--no-interactive` mode make it ideal as a tool for LLM agents and MCP servers +- **Explore & discover** — interactive operation picker, `--guided` mode, and built-in help with sample requests/responses for every operation + +## Install + +```bash +# Run directly (no install needed) +npx epilot --help + +# Or install globally +npm install -g @epilot/cli +``` + +## Usage + + +``` +epilot v0.1.9 — CLI for epilot APIs + +USAGE + epilot [params...] [flags] + epilot List operations for an API + epilot --help Show operation details + +FLAGS + -t, --token Bearer token for authentication + --profile Use a named profile (or EPILOT_PROFILE) + -s, --server Override server base URL + --json Output raw JSON (no formatting) + -v, --verbose Verbose output (show request details) + --jsonata JSONata expression to transform response + --guided Prompt for all parameters interactively + --no-interactive Disable interactive prompts + +PARAMETER FLAGS + -p key=value Set a named parameter + -d '{...}' Request body JSON + -H 'Key: Value' Custom header + -i, --include Include response headers in output + +COMMANDS + auth login Authenticate with epilot (browser) + auth token Store an API token directly + auth status Show authentication status + auth logout Remove stored credentials + profile Manage named profiles + completion Generate shell completion scripts + +APIs + access-token Access Token API + address Address API + address-suggestions Address Suggestions API + ai-agents AI Agents API - OpenAPI 3.0 + app App API + audit-logs Audit Log + automation Automation API + billing Billing API + blueprint-manifest Blueprint Manifest API + consent Consent API + customer-portal Portal API + dashboard Dashboard API + data-management Data Management API + deduplication Deduplication API + design Design Builder API v2 + document Document API + email-settings Messaging Settings API + email-template Email template API + entity Entity API + entity-mapping Entity Mapping API + environments Environments API + erp-integration ERP Integration API + event-catalog Event Catalog API + file File API + iban Iban API + journey Journey API + kanban Kanban API + message Message API + metering Metering API + notes Notes API + notification Notification API + organization Organization API + partner-directory Partner API + permissions Permissions API + pricing Pricing API + pricing-tier Pricing Tier API + purpose Purpose API + sandbox Sandbox API + submission Submission API + targeting Targeting API + template-variables Template Variables API + user User API + validation-rules Validation Rules API + webhooks Webhooks + workflow Workflows Executions + workflow-definition Workflows Definitions + +EXAMPLES + $ epilot auth login + $ epilot user getMeV2 + $ epilot entity getEntity contact abc123 + $ epilot entity searchEntities -d '{"q":"*"}' + $ epilot entity searchEntities --jsonata 'results[0]._title' + $ echo '{"q":"*"}' | epilot entity searchEntities + +Run epilot to list available operations. +Run epilot --help for operation details. +``` + + +## Authentication + +```bash +# Browser-based login (opens epilot portal) +epilot auth login + +# Manual token +epilot auth login --token + +# Or pass token per-command +epilot entity listSchemas --token + +# Or via environment variable +EPILOT_TOKEN= epilot entity listSchemas + +# Check auth status +epilot auth status + +# Logout +epilot auth logout +``` + +Token resolution order: +1. `--token` flag +2. `EPILOT_TOKEN` environment variable +3. Active profile token +4. Stored credentials (`~/.config/epilot/credentials.json`) +5. Interactive prompt (if TTY) + +## Profiles + +Manage multiple environments (like AWS CLI profiles): + +```bash +# Create profiles for different environments +epilot profile create dev --server https://entity.dev.sls.epilot.io --token +epilot profile create staging --server https://entity.staging.sls.epilot.io --token +epilot profile create prod --token + +# Switch active profile +epilot profile use dev + +# Or use per-command +epilot entity listSchemas --profile staging + +# Or via environment variable +EPILOT_PROFILE=dev epilot entity listSchemas + +# List profiles +epilot profile list + +# Show profile details +epilot profile show dev + +# Delete a profile +epilot profile delete dev +``` + +Profiles store server URL, auth token, org ID, and custom headers in `~/.config/epilot/profiles.json`. + +## Parameters + +```bash +# Named parameters with -p +epilot entity getEntity -p slug=contact -p id=abc123 + +# Positional args map to path parameters in order +epilot entity getEntity contact abc123 + +# Query parameters +epilot entity listSchemas -p unpublished=true +``` + +## Request Body + +```bash +# Inline JSON with -d +epilot entity createEntity -p slug=contact -d '{"first_name":"John","last_name":"Doe"}' + +# Pipe from file +cat entity.json | epilot entity createEntity -p slug=contact + +# Pipe from another command +echo '{"q":"*"}' | epilot entity searchEntities +``` + +## Response Formatting + +```bash +# Pretty-printed JSON (default in TTY) +epilot entity getEntity contact abc123 + +# Raw JSON (for piping) +epilot entity getEntity contact abc123 --json + +# Include response headers +epilot entity getEntity contact abc123 --include + +# Verbose (show request details) +epilot entity getEntity contact abc123 --verbose + +# JSONata transformation +epilot entity searchEntities -d '{"q":"*"}' --jsonata 'results[0]._title' +epilot user getMeV2 --jsonata 'email' +epilot entity listSchemas --jsonata 'results.slug' +``` + +## Server Override + +```bash +# Use a custom server URL +epilot entity listSchemas --server http://localhost:3000 + +# Or set it in a profile +epilot profile create local --server http://localhost:3000 +epilot profile use local +``` + +## OpenAPI Spec Override + +For unreleased API features, override the bundled OpenAPI spec: + +```bash +# From a local file +epilot entity getEntity -p slug=contact -p id=abc --definition ./my-spec.json + +# From a URL +epilot entity getEntity --definition https://example.com/openapi.json + +# Or place in .epilot/overrides/ +mkdir -p .epilot/overrides +cp my-entity-spec.json .epilot/overrides/entity.json +epilot entity getEntity contact abc123 # automatically uses override +``` + +## Interactive Mode + +When running in a TTY without required arguments, the CLI prompts interactively: + +- **No operation**: shows a searchable operation picker +- **Missing required params**: prompts for each one +- **No auth token**: prompts to paste a token + +Disable with `--no-interactive` for CI/scripts. + +### Guided Mode + +Use `--guided` to be prompted for **all** parameters, not just required ones. This is useful for exploring an API operation without having to look up every available parameter. + +```bash +# Walk through all parameters for getEntity +epilot entity getEntity --guided + +# Guided mode also opens the body editor for operations with a request body +epilot entity searchEntities --guided +``` + +Each optional parameter shows "(optional, press Enter to skip)" so you can quickly skip ones you don't need. + +## Shell Completions + +Tab completion for API names, operation IDs, and flags. + +```bash +# Auto-install for your current shell +epilot completion --install + +# Or install for a specific shell +epilot completion --install bash +epilot completion --install zsh +epilot completion --install fish +``` + +This adds the completion script to your shell config (`~/.bashrc`, `~/.zshrc`, or `~/.config/fish/completions/epilot.fish`). Restart your shell or source the config file to activate. + +You can also set up completions manually: + +```bash +# Bash — add to ~/.bashrc +eval "$(epilot completion bash)" + +# Zsh — add to ~/.zshrc +eval "$(epilot completion zsh)" + +# Fish — save to completions dir +epilot completion fish > ~/.config/fish/completions/epilot.fish +``` + +## API Reference + +Full documentation with sample calls and responses for all APIs: + +[**docs/index.md**](./docs/index.md) + + +| API | Command | Docs | +| --- | ------- | ---- | +| Access Token API | `epilot access-token` | [docs](./docs/access-token.md) | +| Address API | `epilot address` | [docs](./docs/address.md) | +| Address Suggestions API | `epilot address-suggestions` | [docs](./docs/address-suggestions.md) | +| AI Agents API - OpenAPI 3.0 | `epilot ai-agents` | [docs](./docs/ai-agents.md) | +| App API | `epilot app` | [docs](./docs/app.md) | +| Audit Log | `epilot audit-logs` | [docs](./docs/audit-logs.md) | +| Automation API | `epilot automation` | [docs](./docs/automation.md) | +| Billing API | `epilot billing` | [docs](./docs/billing.md) | +| Blueprint Manifest API | `epilot blueprint-manifest` | [docs](./docs/blueprint-manifest.md) | +| Consent API | `epilot consent` | [docs](./docs/consent.md) | +| Portal API | `epilot customer-portal` | [docs](./docs/customer-portal.md) | +| Dashboard API | `epilot dashboard` | [docs](./docs/dashboard.md) | +| Data Management API | `epilot data-management` | [docs](./docs/data-management.md) | +| Deduplication API | `epilot deduplication` | [docs](./docs/deduplication.md) | +| Design Builder API v2 | `epilot design` | [docs](./docs/design.md) | +| Document API | `epilot document` | [docs](./docs/document.md) | +| Messaging Settings API | `epilot email-settings` | [docs](./docs/email-settings.md) | +| Email template API | `epilot email-template` | [docs](./docs/email-template.md) | +| Entity API | `epilot entity` | [docs](./docs/entity.md) | +| Entity Mapping API | `epilot entity-mapping` | [docs](./docs/entity-mapping.md) | +| Environments API | `epilot environments` | [docs](./docs/environments.md) | +| ERP Integration API | `epilot erp-integration` | [docs](./docs/erp-integration.md) | +| Event Catalog API | `epilot event-catalog` | [docs](./docs/event-catalog.md) | +| File API | `epilot file` | [docs](./docs/file.md) | +| Iban API | `epilot iban` | [docs](./docs/iban.md) | +| Journey API | `epilot journey` | [docs](./docs/journey.md) | +| Kanban API | `epilot kanban` | [docs](./docs/kanban.md) | +| Message API | `epilot message` | [docs](./docs/message.md) | +| Metering API | `epilot metering` | [docs](./docs/metering.md) | +| Notes API | `epilot notes` | [docs](./docs/notes.md) | +| Notification API | `epilot notification` | [docs](./docs/notification.md) | +| Organization API | `epilot organization` | [docs](./docs/organization.md) | +| Partner API | `epilot partner-directory` | [docs](./docs/partner-directory.md) | +| Permissions API | `epilot permissions` | [docs](./docs/permissions.md) | +| Pricing API | `epilot pricing` | [docs](./docs/pricing.md) | +| Pricing Tier API | `epilot pricing-tier` | [docs](./docs/pricing-tier.md) | +| Purpose API | `epilot purpose` | [docs](./docs/purpose.md) | +| Sandbox API | `epilot sandbox` | [docs](./docs/sandbox.md) | +| Submission API | `epilot submission` | [docs](./docs/submission.md) | +| Targeting API | `epilot targeting` | [docs](./docs/targeting.md) | +| Template Variables API | `epilot template-variables` | [docs](./docs/template-variables.md) | +| User API | `epilot user` | [docs](./docs/user.md) | +| Validation Rules API | `epilot validation-rules` | [docs](./docs/validation-rules.md) | +| Webhooks | `epilot webhooks` | [docs](./docs/webhooks.md) | +| Workflows Executions | `epilot workflow` | [docs](./docs/workflow.md) | +| Workflows Definitions | `epilot workflow-definition` | [docs](./docs/workflow-definition.md) | + + +## Development + +```bash +# Install dependencies +pnpm install + +# Generate API commands + definitions + docs from client specs +pnpm generate + +# Run in dev mode +pnpm dev -- entity listSchemas + +# Build +pnpm build + +# Run tests +pnpm test +``` diff --git a/packages/cli-wrapper/bin/epilot.js b/packages/cli-wrapper/bin/epilot.js new file mode 100755 index 00000000..5459a382 --- /dev/null +++ b/packages/cli-wrapper/bin/epilot.js @@ -0,0 +1,5 @@ +#!/usr/bin/env node + +// Thin wrapper: forwards to @epilot/cli +// Install this package for `npx epilot` or install @epilot/cli directly +import('@epilot/cli/bin/epilot.js'); diff --git a/packages/cli-wrapper/package.json b/packages/cli-wrapper/package.json new file mode 100644 index 00000000..f0e8d147 --- /dev/null +++ b/packages/cli-wrapper/package.json @@ -0,0 +1,36 @@ +{ + "name": "epilot", + "version": "0.1.9", + "description": "CLI for epilot APIs (wrapper for @epilot/cli)", + "bin": { + "epilot": "./bin/epilot.js" + }, + "keywords": [ + "epilot", + "cli", + "api", + "openapi" + ], + "author": "epilot GmbH", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/epilot-dev/sdk-js.git", + "directory": "packages/cli-wrapper" + }, + "homepage": "https://github.com/epilot-dev/sdk-js/tree/main/packages/cli#readme", + "bugs": { + "url": "https://github.com/epilot-dev/sdk-js/issues" + }, + "dependencies": { + "@epilot/cli": "*" + }, + "engines": { + "node": ">=18" + }, + "files": [ + "bin", + "README.md", + "LICENSE" + ] +} diff --git a/packages/cli/LICENSE b/packages/cli/LICENSE new file mode 100644 index 00000000..9169ae20 --- /dev/null +++ b/packages/cli/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2026 epilot GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/cli/README.md b/packages/cli/README.md new file mode 100644 index 00000000..504b33b4 --- /dev/null +++ b/packages/cli/README.md @@ -0,0 +1,386 @@ +

epilot
@epilot/cli

+ +

+ CI + npm version + License +

+ +

Command-line interface for all epilot APIs. One command to call any operation.

+ +Built for developers, automation scripts, and AI agents. The epilot CLI gives you direct access to the entire epilot platform from your terminal — no SDK setup, no boilerplate, just `npx epilot`. + +- **Quick API calls** — look up entities, search data, check configurations without writing code +- **Automation & scripting** — pipe JSON in/out, `--json` mode for `jq`-friendly output, `--no-interactive` for CI +- **AI agent tool use** — structured `--json` output and `--no-interactive` mode make it ideal as a tool for LLM agents and MCP servers +- **Explore & discover** — interactive operation picker, `--guided` mode, and built-in help with sample requests/responses for every operation + +## Install + +```bash +# Run directly (no install needed) +npx epilot --help + +# Or install globally +npm install -g @epilot/cli +``` + +## Usage + + +``` +epilot v0.1.9 — CLI for epilot APIs + +USAGE + epilot [params...] [flags] + epilot List operations for an API + epilot --help Show operation details + +FLAGS + -t, --token Bearer token for authentication + --profile Use a named profile (or EPILOT_PROFILE) + -s, --server Override server base URL + --json Output raw JSON (no formatting) + -v, --verbose Verbose output (show request details) + --jsonata JSONata expression to transform response + --guided Prompt for all parameters interactively + --no-interactive Disable interactive prompts + +PARAMETER FLAGS + -p key=value Set a named parameter + -d '{...}' Request body JSON + -H 'Key: Value' Custom header + -i, --include Include response headers in output + +COMMANDS + auth login Authenticate with epilot (browser) + auth token Store an API token directly + auth status Show authentication status + auth logout Remove stored credentials + profile Manage named profiles + completion Generate shell completion scripts + +APIs + access-token Access Token API + address Address API + address-suggestions Address Suggestions API + ai-agents AI Agents API - OpenAPI 3.0 + app App API + audit-logs Audit Log + automation Automation API + billing Billing API + blueprint-manifest Blueprint Manifest API + consent Consent API + customer-portal Portal API + dashboard Dashboard API + data-management Data Management API + deduplication Deduplication API + design Design Builder API v2 + document Document API + email-settings Messaging Settings API + email-template Email template API + entity Entity API + entity-mapping Entity Mapping API + environments Environments API + erp-integration ERP Integration API + event-catalog Event Catalog API + file File API + iban Iban API + journey Journey API + kanban Kanban API + message Message API + metering Metering API + notes Notes API + notification Notification API + organization Organization API + partner-directory Partner API + permissions Permissions API + pricing Pricing API + pricing-tier Pricing Tier API + purpose Purpose API + sandbox Sandbox API + submission Submission API + targeting Targeting API + template-variables Template Variables API + user User API + validation-rules Validation Rules API + webhooks Webhooks + workflow Workflows Executions + workflow-definition Workflows Definitions + +EXAMPLES + $ epilot auth login + $ epilot user getMeV2 + $ epilot entity getEntity contact abc123 + $ epilot entity searchEntities -d '{"q":"*"}' + $ epilot entity searchEntities --jsonata 'results[0]._title' + $ echo '{"q":"*"}' | epilot entity searchEntities + +Run epilot to list available operations. +Run epilot --help for operation details. +``` + + +## Authentication + +```bash +# Browser-based login (opens epilot portal) +epilot auth login + +# Manual token +epilot auth login --token + +# Or pass token per-command +epilot entity listSchemas --token + +# Or via environment variable +EPILOT_TOKEN= epilot entity listSchemas + +# Check auth status +epilot auth status + +# Logout +epilot auth logout +``` + +Token resolution order: +1. `--token` flag +2. `EPILOT_TOKEN` environment variable +3. Active profile token +4. Stored credentials (`~/.config/epilot/credentials.json`) +5. Interactive prompt (if TTY) + +## Profiles + +Manage multiple environments (like AWS CLI profiles): + +```bash +# Create profiles for different environments +epilot profile create dev --server https://entity.dev.sls.epilot.io --token +epilot profile create staging --server https://entity.staging.sls.epilot.io --token +epilot profile create prod --token + +# Switch active profile +epilot profile use dev + +# Or use per-command +epilot entity listSchemas --profile staging + +# Or via environment variable +EPILOT_PROFILE=dev epilot entity listSchemas + +# List profiles +epilot profile list + +# Show profile details +epilot profile show dev + +# Delete a profile +epilot profile delete dev +``` + +Profiles store server URL, auth token, org ID, and custom headers in `~/.config/epilot/profiles.json`. + +## Parameters + +```bash +# Named parameters with -p +epilot entity getEntity -p slug=contact -p id=abc123 + +# Positional args map to path parameters in order +epilot entity getEntity contact abc123 + +# Query parameters +epilot entity listSchemas -p unpublished=true +``` + +## Request Body + +```bash +# Inline JSON with -d +epilot entity createEntity -p slug=contact -d '{"first_name":"John","last_name":"Doe"}' + +# Pipe from file +cat entity.json | epilot entity createEntity -p slug=contact + +# Pipe from another command +echo '{"q":"*"}' | epilot entity searchEntities +``` + +## Response Formatting + +```bash +# Pretty-printed JSON (default in TTY) +epilot entity getEntity contact abc123 + +# Raw JSON (for piping) +epilot entity getEntity contact abc123 --json + +# Include response headers +epilot entity getEntity contact abc123 --include + +# Verbose (show request details) +epilot entity getEntity contact abc123 --verbose + +# JSONata transformation +epilot entity searchEntities -d '{"q":"*"}' --jsonata 'results[0]._title' +epilot user getMeV2 --jsonata 'email' +epilot entity listSchemas --jsonata 'results.slug' +``` + +## Server Override + +```bash +# Use a custom server URL +epilot entity listSchemas --server http://localhost:3000 + +# Or set it in a profile +epilot profile create local --server http://localhost:3000 +epilot profile use local +``` + +## OpenAPI Spec Override + +For unreleased API features, override the bundled OpenAPI spec: + +```bash +# From a local file +epilot entity getEntity -p slug=contact -p id=abc --definition ./my-spec.json + +# From a URL +epilot entity getEntity --definition https://example.com/openapi.json + +# Or place in .epilot/overrides/ +mkdir -p .epilot/overrides +cp my-entity-spec.json .epilot/overrides/entity.json +epilot entity getEntity contact abc123 # automatically uses override +``` + +## Interactive Mode + +When running in a TTY without required arguments, the CLI prompts interactively: + +- **No operation**: shows a searchable operation picker +- **Missing required params**: prompts for each one +- **No auth token**: prompts to paste a token + +Disable with `--no-interactive` for CI/scripts. + +### Guided Mode + +Use `--guided` to be prompted for **all** parameters, not just required ones. This is useful for exploring an API operation without having to look up every available parameter. + +```bash +# Walk through all parameters for getEntity +epilot entity getEntity --guided + +# Guided mode also opens the body editor for operations with a request body +epilot entity searchEntities --guided +``` + +Each optional parameter shows "(optional, press Enter to skip)" so you can quickly skip ones you don't need. + +## Shell Completions + +Tab completion for API names, operation IDs, and flags. + +```bash +# Auto-install for your current shell +epilot completion --install + +# Or install for a specific shell +epilot completion --install bash +epilot completion --install zsh +epilot completion --install fish +``` + +This adds the completion script to your shell config (`~/.bashrc`, `~/.zshrc`, or `~/.config/fish/completions/epilot.fish`). Restart your shell or source the config file to activate. + +You can also set up completions manually: + +```bash +# Bash — add to ~/.bashrc +eval "$(epilot completion bash)" + +# Zsh — add to ~/.zshrc +eval "$(epilot completion zsh)" + +# Fish — save to completions dir +epilot completion fish > ~/.config/fish/completions/epilot.fish +``` + +## API Reference + +Full documentation with sample calls and responses for all APIs: + +[**docs/index.md**](./docs/index.md) + + +| API | Command | Docs | +| --- | ------- | ---- | +| Access Token API | `epilot access-token` | [docs](./docs/access-token.md) | +| Address API | `epilot address` | [docs](./docs/address.md) | +| Address Suggestions API | `epilot address-suggestions` | [docs](./docs/address-suggestions.md) | +| AI Agents API - OpenAPI 3.0 | `epilot ai-agents` | [docs](./docs/ai-agents.md) | +| App API | `epilot app` | [docs](./docs/app.md) | +| Audit Log | `epilot audit-logs` | [docs](./docs/audit-logs.md) | +| Automation API | `epilot automation` | [docs](./docs/automation.md) | +| Billing API | `epilot billing` | [docs](./docs/billing.md) | +| Blueprint Manifest API | `epilot blueprint-manifest` | [docs](./docs/blueprint-manifest.md) | +| Consent API | `epilot consent` | [docs](./docs/consent.md) | +| Portal API | `epilot customer-portal` | [docs](./docs/customer-portal.md) | +| Dashboard API | `epilot dashboard` | [docs](./docs/dashboard.md) | +| Data Management API | `epilot data-management` | [docs](./docs/data-management.md) | +| Deduplication API | `epilot deduplication` | [docs](./docs/deduplication.md) | +| Design Builder API v2 | `epilot design` | [docs](./docs/design.md) | +| Document API | `epilot document` | [docs](./docs/document.md) | +| Messaging Settings API | `epilot email-settings` | [docs](./docs/email-settings.md) | +| Email template API | `epilot email-template` | [docs](./docs/email-template.md) | +| Entity API | `epilot entity` | [docs](./docs/entity.md) | +| Entity Mapping API | `epilot entity-mapping` | [docs](./docs/entity-mapping.md) | +| Environments API | `epilot environments` | [docs](./docs/environments.md) | +| ERP Integration API | `epilot erp-integration` | [docs](./docs/erp-integration.md) | +| Event Catalog API | `epilot event-catalog` | [docs](./docs/event-catalog.md) | +| File API | `epilot file` | [docs](./docs/file.md) | +| Iban API | `epilot iban` | [docs](./docs/iban.md) | +| Journey API | `epilot journey` | [docs](./docs/journey.md) | +| Kanban API | `epilot kanban` | [docs](./docs/kanban.md) | +| Message API | `epilot message` | [docs](./docs/message.md) | +| Metering API | `epilot metering` | [docs](./docs/metering.md) | +| Notes API | `epilot notes` | [docs](./docs/notes.md) | +| Notification API | `epilot notification` | [docs](./docs/notification.md) | +| Organization API | `epilot organization` | [docs](./docs/organization.md) | +| Partner API | `epilot partner-directory` | [docs](./docs/partner-directory.md) | +| Permissions API | `epilot permissions` | [docs](./docs/permissions.md) | +| Pricing API | `epilot pricing` | [docs](./docs/pricing.md) | +| Pricing Tier API | `epilot pricing-tier` | [docs](./docs/pricing-tier.md) | +| Purpose API | `epilot purpose` | [docs](./docs/purpose.md) | +| Sandbox API | `epilot sandbox` | [docs](./docs/sandbox.md) | +| Submission API | `epilot submission` | [docs](./docs/submission.md) | +| Targeting API | `epilot targeting` | [docs](./docs/targeting.md) | +| Template Variables API | `epilot template-variables` | [docs](./docs/template-variables.md) | +| User API | `epilot user` | [docs](./docs/user.md) | +| Validation Rules API | `epilot validation-rules` | [docs](./docs/validation-rules.md) | +| Webhooks | `epilot webhooks` | [docs](./docs/webhooks.md) | +| Workflows Executions | `epilot workflow` | [docs](./docs/workflow.md) | +| Workflows Definitions | `epilot workflow-definition` | [docs](./docs/workflow-definition.md) | + + +## Development + +```bash +# Install dependencies +pnpm install + +# Generate API commands + definitions + docs from client specs +pnpm generate + +# Run in dev mode +pnpm dev -- entity listSchemas + +# Build +pnpm build + +# Run tests +pnpm test +``` diff --git a/packages/cli/bin/epilot.ts b/packages/cli/bin/epilot.ts new file mode 100644 index 00000000..aa785a9d --- /dev/null +++ b/packages/cli/bin/epilot.ts @@ -0,0 +1,137 @@ +import { runMain } from 'citty'; +import { main } from '../src/index.js'; +import { API_LIST } from '../src/generated/api-list.js'; + +// Gracefully handle EPIPE (e.g. piping to `head` or `jq` that closes early) +process.stdout.on('error', (err) => { + if (err.code === 'EPIPE') process.exit(0); + throw err; +}); +process.stderr.on('error', (err) => { + if (err.code === 'EPIPE') process.exit(0); + throw err; +}); + +declare const __CLI_VERSION__: string; +// tsup injects __CLI_VERSION__ at build time; fall back to package.json for dev (tsx) +const VERSION = + typeof __CLI_VERSION__ !== 'undefined' + ? __CLI_VERSION__ + : ((await import('../package.json', { with: { type: 'json' } })) as { default: { version: string } }).default + .version; + +const args = process.argv.slice(2); + +// Handle `epilot --_completions [api]` for shell autocomplete +const completionsIdx = args.indexOf('--_completions'); +if (completionsIdx >= 0) { + const { handleCompletions } = await import('../src/commands/completion.js'); + handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]); + process.exit(0); +} + +const hasHelp = args.includes('--help') || args.includes('-h'); +const hasVersion = args.includes('--version') || args.includes('-V'); +const hasNoSubcommand = args.filter((a) => !a.startsWith('-')).length === 0; + +// Intercept root --version +if (hasVersion && hasNoSubcommand) { + process.stdout.write(`${VERSION}\n`); + process.exit(0); +} + +// Intercept root --help (or no args at all) to show custom help instead of citty's auto-generated one +if (hasNoSubcommand && (hasHelp || args.length === 0)) { + printRootHelp(); + process.exit(0); +} + +// Intercept `epilot --help` and `epilot --help` +// before citty swallows it. citty handles --help itself and never calls our +// run(), so we strip it from argv and let our handler take over. +if (hasHelp) { + const apiArg = args.find((a) => !a.startsWith('-')); + const isApi = apiArg && API_LIST.some((api) => api.kebabName === apiArg); + + if (isApi) { + const positionals = args.filter((a) => !a.startsWith('-')); + const operationId = positionals[1]; + + // Strip --help/-h from argv so citty doesn't intercept it + const filteredArgs = args.filter((a) => a !== '--help' && a !== '-h'); + + if (operationId) { + // `epilot entity getEntity --help` → inject sentinel for operation-level help + process.argv = [process.argv[0], process.argv[1], ...filteredArgs, '--_ophelp']; + } else { + // `epilot entity --help` → strip --help, inject sentinel to show operations table + process.argv = [process.argv[0], process.argv[1], ...filteredArgs, '--_apihelp']; + } + } +} + +runMain(main); + +function printRootHelp() { + const DIM = '\x1b[2m'; + const BOLD = '\x1b[1m'; + const CYAN = '\x1b[36m'; + const GREEN = '\x1b[32m'; + const YELLOW = '\x1b[33m'; + const R = '\x1b[0m'; + + const w = (s: string) => process.stdout.write(s); + + w(`${BOLD}epilot${R} ${DIM}v${VERSION}${R} — CLI for epilot APIs\n`); + w(`\n`); + w(`${BOLD}USAGE${R}\n`); + w(` ${CYAN}epilot${R} [params...] [flags]\n`); + w(` ${CYAN}epilot${R} ${DIM}List operations for an API${R}\n`); + w(` ${CYAN}epilot${R} --help ${DIM}Show operation details${R}\n`); + w(`\n`); + w(`${BOLD}FLAGS${R}\n`); + w(` ${GREEN}-t, --token${R} Bearer token for authentication\n`); + w(` ${GREEN}--profile${R} Use a named profile ${DIM}(or EPILOT_PROFILE)${R}\n`); + w(` ${GREEN}-s, --server${R} Override server base URL\n`); + w(` ${GREEN}--json${R} Output raw JSON (no formatting)\n`); + w(` ${GREEN}-v, --verbose${R} Verbose output (show request details)\n`); + w(` ${GREEN}--jsonata${R} JSONata expression to transform response\n`); + w(` ${GREEN}--guided${R} Prompt for all parameters interactively\n`); + w(` ${GREEN}--no-interactive${R} Disable interactive prompts\n`); + w(`\n`); + w(`${BOLD}PARAMETER FLAGS${R}\n`); + w(` ${GREEN}-p${R} key=value Set a named parameter\n`); + w(` ${GREEN}-d${R} '{...}' Request body JSON\n`); + w(` ${GREEN}-H${R} 'Key: Value' Custom header\n`); + w(` ${GREEN}-i, --include${R} Include response headers in output\n`); + w(`\n`); + w(`${BOLD}COMMANDS${R}\n`); + w(` ${CYAN}auth login${R} Authenticate with epilot (browser)\n`); + w(` ${CYAN}auth token${R} Store an API token directly\n`); + w(` ${CYAN}auth status${R} Show authentication status\n`); + w(` ${CYAN}auth logout${R} Remove stored credentials\n`); + w(` ${CYAN}profile${R} Manage named profiles\n`); + w(` ${CYAN}completion${R} Generate shell completion scripts\n`); + w(` ${CYAN}upgrade${R} Upgrade to the latest version\n`); + w(`\n`); + w(`${BOLD}APIs${R}\n`); + + // Print APIs in columns + const maxName = Math.max(...API_LIST.map((a) => a.kebabName.length)); + for (const api of API_LIST) { + const padded = api.kebabName.padEnd(maxName + 2); + w(` ${CYAN}${padded}${R}${DIM}${api.title}${R}\n`); + } + + w(`\n`); + w(`${BOLD}EXAMPLES${R}\n`); + w(` ${YELLOW}$${R} epilot auth login\n`); + w(` ${YELLOW}$${R} epilot user getMeV2\n`); + w(` ${YELLOW}$${R} epilot entity getEntity contact abc123\n`); + w(` ${YELLOW}$${R} epilot entity searchEntities -d '{"q":"*"}'\n`); + w(` ${YELLOW}$${R} epilot entity searchEntities --jsonata 'results[0]._title'\n`); + w(` ${YELLOW}$${R} echo '{"q":"*"}' | epilot entity searchEntities\n`); + w(`\n`); + w(`Run ${CYAN}epilot ${R} to list available operations.\n`); + w(`Run ${CYAN}epilot --help${R} for operation details.\n`); +} diff --git a/packages/cli/definitions/access-token.json b/packages/cli/definitions/access-token.json new file mode 100644 index 00000000..8152bca2 --- /dev/null +++ b/packages/cli/definitions/access-token.json @@ -0,0 +1,663 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Access Token API", + "version": "0.4.0", + "description": "Generate Access Tokens for 3rd party applications that need access to epilot APIs.\n" + }, + "tags": [ + { + "name": "Access Tokens", + "description": "Create Access Tokens for epilot APIs" + }, + { + "name": "Public", + "description": "Well known endpoints to verify tokens generated by this API" + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "paths": { + "/v1/access-tokens": { + "post": { + "operationId": "createAccessToken", + "summary": "createAccessToken", + "description": "**Access Token type: `API`** (default if not specified):\n\nGenerates a new Access Token to use for calling epilot APIs.\n\nTakes optionally a list of Roles assigned to the Access Token. Defaults to current user's assignments\n\nSee [Permissions API docs](https://docs.epilot.io/api/permissions)\n\n**Access Token type: `JOURNEY`**:\n\nGenerates a Public Access Token related to a journey.\nThe journey id should be specfied.\n", + "tags": [ + "Access Tokens" + ], + "requestBody": { + "description": "Metadata for the Access Token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenParameters" + }, + "examples": { + "api": { + "value": { + "name": "API Access Token", + "token_type": "api", + "assignments": [] + } + }, + "journey": { + "value": { + "name": "Journey Access Token", + "token_type": "journey", + "journey_id": "u29g7-97gajsaog-028t02jag-a9a72tk" + } + }, + "portal": { + "value": { + "name": "Installer /End Customer Portal Access Token", + "token_type": "portal", + "portal_id": "END_CUSTOMER_PORTAL" + } + }, + "assume": { + "value": { + "name": "Assume Token intended for assuming a different role as a user", + "token_type": "assume", + "assignments": [ + "739224:employee" + ] + } + }, + "app": { + "value": { + "name": "App Access Token", + "token_type": "app", + "assignments": [ + "739224:e5c1f9b1-e41d-421d-83c4-c5626e464430" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "description": "The new generated Access Token", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "properties": { + "token": { + "$ref": "#/components/schemas/AccessToken" + } + } + }, + { + "$ref": "#/components/schemas/AccessTokenItem" + } + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "error": { + "type": "string" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "error": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "operationId": "listAccessTokens", + "summary": "listAccessTokens", + "description": "Lists all Access Tokens for current user (by default excludes system generated tokens)", + "parameters": [ + { + "in": "query", + "name": "token_type", + "description": "Filter by token types", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AccessTokenType" + } + } + } + ], + "tags": [ + "Access Tokens" + ], + "responses": { + "200": { + "description": "List of Access Tokens", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AccessTokenItem" + } + } + } + } + } + } + } + }, + "/v1/access-tokens/{id}": { + "delete": { + "operationId": "revokeAccessToken", + "summary": "revokeAccessToken", + "description": "Revokes an Access Token so it can't be used anymore.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "$ref": "#/components/schemas/AccessTokenId" + }, + "required": true + } + ], + "tags": [ + "Access Tokens" + ], + "responses": { + "200": { + "description": "The revoked generated Access Token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccessTokenItem" + } + } + } + } + } + } + }, + "/v1/access-tokens/.well-known/jwks.json": { + "get": { + "operationId": "getAccessTokenJwks", + "summary": "getAccessTokenJwks", + "description": "Get jwks public key set to verify access tokens generated by this API", + "tags": [ + "Public" + ], + "security": [], + "responses": { + "200": { + "description": "Set of jwks", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "alg": { + "type": "string", + "example": "RS256" + }, + "e": { + "type": "string", + "example": "AQAB" + }, + "kid": { + "type": "string", + "example": "tXWU5mPMbRPczpbQwi6vbhLF4GgF3wlMDSyqo7pfeiw=" + }, + "kty": { + "type": "string", + "example": "RSA" + }, + "n": { + "type": "string", + "example": "h_QDoCjZ8W_trtYXaP7_S22wf5r5Wd9XBLED78oT44bJjQXn8ddcFV8Hik65_4IYXVX_hTTU4zpxe3H8vx2j7-Zz3O59mYMp5S0MzODNEdf5Y_2o19eis0brmAJniixsNlQ9LlYkdrVamrgaxHu3ZpP_99zkfFybYeuYoQNzb3PyrT8xVnz_USs_nlFMHpGUxvvz7gfKPqxcLvgLJr4cwI9yzaSY9CD4qW181QVcnL_WzpQ8xx6AuhhHZQ1l_3GG4InTk8ahE7U2ZHVu8RrX6d01pMgc3piEcet9RgFLnhbTg3YIiKGoAbN42wJn_x3lgIAC42T9mbmTsHyUdS6nUQ" + }, + "use": { + "type": "string", + "example": "sig" + } + } + } + } + } + } + } + } + } + } + } + }, + "/v1/access-tokens/.well-known/openid-configuration": { + "get": { + "operationId": "getAccessTokenOIDC", + "summary": "getAccessTokenOIDC", + "description": "OpenID Connect configuration for Access Token API as identity provider\n\nNote: This API is not a fully compliant OAuth2.0 / OIDC identity provider, but this endpoint is useful to\nautomate the process of verifying JWT tokens.\n", + "tags": [ + "Public" + ], + "security": [], + "responses": { + "200": { + "description": "OpenID Configuration", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "issuer": { + "type": "string", + "format": "uri", + "example": "https://access-token.sls.epilot.io/v1/access-tokens" + }, + "jwks_uri": { + "type": "string", + "format": "uri", + "example": "https://access-token.sls.epilot.io/v1/access-tokens/.well-known/jwks.json" + } + } + } + } + } + } + } + } + }, + "/v1/access-tokens/public/.well-known/jwks.json": { + "get": { + "operationId": "getPublicTokenJwks", + "summary": "getPublicTokenJwks", + "description": "Get jwks public key set to verify public tokens generated by this API", + "tags": [ + "Public" + ], + "security": [], + "responses": { + "200": { + "description": "Set of jwks", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "alg": { + "type": "string", + "example": "RS256" + }, + "e": { + "type": "string", + "example": "AQAB" + }, + "kid": { + "type": "string", + "example": "tXWU5mPMbRPczpbQwi6vbhLF4GgF3wlMDSyqo7pfeiw=" + }, + "kty": { + "type": "string", + "example": "RSA" + }, + "n": { + "type": "string", + "example": "h_QDoCjZ8W_trtYXaP7_S22wf5r5Wd9XBLED78oT44bJjQXn8ddcFV8Hik65_4IYXVX_hTTU4zpxe3H8vx2j7-Zz3O59mYMp5S0MzODNEdf5Y_2o19eis0brmAJniixsNlQ9LlYkdrVamrgaxHu3ZpP_99zkfFybYeuYoQNzb3PyrT8xVnz_USs_nlFMHpGUxvvz7gfKPqxcLvgLJr4cwI9yzaSY9CD4qW181QVcnL_WzpQ8xx6AuhhHZQ1l_3GG4InTk8ahE7U2ZHVu8RrX6d01pMgc3piEcet9RgFLnhbTg3YIiKGoAbN42wJn_x3lgIAC42T9mbmTsHyUdS6nUQ" + }, + "use": { + "type": "string", + "example": "sig" + } + } + } + } + } + } + } + } + } + } + } + }, + "/v1/access-tokens/public/.well-known/openid-configuration": { + "get": { + "operationId": "getPublicTokenOIDC", + "summary": "getPublicTokenOIDC", + "description": "OpenID Connect configuration for Access Token API a a public identity provider\n\nNote: This API is not a fully compliant OAuth2.0 / OIDC identity provider, but this endpoint is useful to\nautomate the process of verifying JWT tokens.\n", + "tags": [ + "Public" + ], + "security": [], + "responses": { + "200": { + "description": "OpenID Configuration", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "issuer": { + "type": "string", + "format": "uri", + "example": "https://access-token.sls.epilot.io/v1/access-tokens" + }, + "jwks_uri": { + "type": "string", + "format": "uri", + "example": "https://access-token.sls.epilot.io/v1/access-tokens/.well-known/jwks.json" + } + } + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotOrg": { + "description": "Overrides the target organization to allow shared tenantaccess", + "name": "x-epilot-org-id", + "in": "header", + "type": "apiKey" + } + }, + "schemas": { + "AccessToken": { + "type": "string", + "description": "A JWT Access Token", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6Ikp..." + }, + "AccessTokenId": { + "type": "string", + "example": "api_5ZugdRXasLfWBypHi93Fk" + }, + "AccessTokenName": { + "type": "string", + "description": "Human readable name for access token", + "example": "Postman Access Token" + }, + "AccessTokenType": { + "type": "string", + "enum": [ + "api", + "journey", + "portal", + "assume", + "app" + ], + "description": "Access token type", + "example": "api" + }, + "AccessTokenJourneyId": { + "type": "string", + "description": "Journey ID for access token type \"journey\"" + }, + "PortalId": { + "type": "string", + "description": "Portal ID for access token type \"portal\"" + }, + "TokenParameters": { + "anyOf": [ + { + "$ref": "#/components/schemas/AccessTokenParameters" + }, + { + "$ref": "#/components/schemas/JourneyTokenParameters" + }, + { + "$ref": "#/components/schemas/PortalTokenParameters" + }, + { + "$ref": "#/components/schemas/AssumeTokenParameters" + }, + { + "$ref": "#/components/schemas/AppTokenParameters" + } + ] + }, + "ExpiresIn": { + "oneOf": [ + { + "type": "integer", + "format": "int32", + "description": "Expiration time in seconds", + "example": 3600, + "minimum": 30, + "maximum": 604800 + }, + { + "type": "string", + "description": "Expiration time as a string with time units (e.g., '10h', '7d', '2 days')", + "example": "1h", + "pattern": "^[0-9]+ ?(ms|milliseconds?|s|seconds?|m|minutes?|h|hours?|d|days?|w|weeks?|y|years?)?$" + } + ] + }, + "AccessTokenParameters": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "$ref": "#/components/schemas/AccessTokenName" + }, + "token_type": { + "type": "string", + "enum": [ + "api" + ] + }, + "assignments": { + "$ref": "#/components/schemas/Assignments" + }, + "expires_in": { + "$ref": "#/components/schemas/ExpiresIn" + } + }, + "required": [ + "name" + ] + }, + "JourneyTokenParameters": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "$ref": "#/components/schemas/AccessTokenName" + }, + "token_type": { + "type": "string", + "enum": [ + "journey" + ] + }, + "journey_id": { + "$ref": "#/components/schemas/AccessTokenJourneyId" + }, + "expires_in": { + "$ref": "#/components/schemas/ExpiresIn" + } + }, + "required": [ + "name", + "journey_id" + ] + }, + "PortalTokenParameters": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "$ref": "#/components/schemas/AccessTokenName" + }, + "token_type": { + "type": "string", + "enum": [ + "portal" + ] + }, + "portal_id": { + "$ref": "#/components/schemas/PortalId" + }, + "expires_in": { + "$ref": "#/components/schemas/ExpiresIn" + } + }, + "required": [ + "name", + "portal_id" + ] + }, + "AssumeTokenParameters": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "$ref": "#/components/schemas/AccessTokenName" + }, + "token_type": { + "type": "string", + "enum": [ + "assume" + ] + }, + "assignments": { + "$ref": "#/components/schemas/Assignments" + } + }, + "required": [ + "name" + ] + }, + "AppTokenParameters": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "$ref": "#/components/schemas/AccessTokenName" + }, + "token_type": { + "type": "string", + "enum": [ + "app" + ] + }, + "assignments": { + "$ref": "#/components/schemas/Assignments" + }, + "expires_in": { + "$ref": "#/components/schemas/ExpiresIn" + } + }, + "required": [ + "name" + ] + }, + "AccessTokenItem": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/AccessTokenId" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "name": { + "$ref": "#/components/schemas/AccessTokenName" + }, + "token_type": { + "$ref": "#/components/schemas/AccessTokenType" + }, + "journey_id": { + "$ref": "#/components/schemas/AccessTokenJourneyId" + }, + "portal_id": { + "$ref": "#/components/schemas/PortalId" + }, + "assignments": { + "$ref": "#/components/schemas/Assignments" + }, + "last_used": { + "type": "string", + "format": "date", + "description": "Last date the token was used (YYYY-MM-DD format, 1 day accuracy)", + "example": "2026-02-24" + } + }, + "required": [ + "id", + "created_at", + "name" + ] + }, + "RoleId": { + "type": "string", + "example": "123:owner", + "description": "Format: :" + }, + "Assignments": { + "type": "array", + "description": "List of role ids attached to an user", + "items": { + "$ref": "#/components/schemas/RoleId" + } + } + } + }, + "servers": [ + { + "url": "https://access-token.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/address-suggestions.json b/packages/cli/definitions/address-suggestions.json new file mode 100644 index 00000000..f0d43e5b --- /dev/null +++ b/packages/cli/definitions/address-suggestions.json @@ -0,0 +1,582 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Address Suggestions API", + "version": "1.0.0", + "termsOfService": "https://epilot.cloud/agb", + "contact": { + "name": "Support", + "email": "info@epilot.cloud", + "url": "https://help.epilot.cloud" + } + }, + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotPublicAuth": [] + } + ], + "servers": [ + { + "url": "https://address-suggestions-api.sls.epilot.io" + }, + { + "url": "https://address-suggestions-api.sls.epilot.io" + } + ], + "paths": { + "/v1/public/suggestions": { + "get": { + "description": "Get address suggestions for the given file id", + "parameters": [ + { + "in": "header", + "name": "X-Epilot-Org-ID", + "description": "The target Organization Id represented by the caller", + "schema": { + "type": "string" + }, + "required": true, + "example": 739224 + }, + { + "in": "query", + "name": "s3FileUrl", + "required": false, + "schema": { + "type": "string" + }, + "description": "file s3 reference", + "example": "https://epilot-dev-user-content.s3.eu-central-1.amazonaws.com/739224/0a3639af-d4c3-4f96-bfc1-9dcbafdfaa42/availability-file-template%2520(13).csv" + }, + { + "in": "query", + "name": "fileId", + "required": false, + "schema": { + "type": "string" + }, + "description": "file id to get suggestions from", + "example": "0a3639af-d4c3-4f96-bfc1-9dcbafdfaa42" + }, + { + "in": "query", + "name": "countryCodeSearchTerm", + "required": false, + "schema": { + "type": "string" + }, + "description": "country code search term", + "example": "de" + }, + { + "in": "query", + "name": "postalCodeSearchTerm", + "required": false, + "schema": { + "type": "string" + }, + "description": "postal code search term", + "example": 506 + }, + { + "in": "query", + "name": "streetSearchTerm", + "required": false, + "schema": { + "type": "string" + }, + "description": "street search term" + } + ], + "operationId": "getAddresses", + "summary": "get addresses from file", + "tags": [ + "Addresses API" + ], + "security": [ + {}, + { + "EpilotPublicAuth": [] + } + ], + "responses": { + "200": { + "description": "Suggestions list", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddressSuggestions" + }, + "examples": { + "address-suggestions": { + "$ref": "#/components/examples/address-suggestions" + } + } + } + } + }, + "404": { + "description": "File not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/suggestions:validate": { + "get": { + "description": "Validates an addresses file, it returns an array of errors if the file is invalid", + "operationId": "validateAddresses", + "summary": "validate addresses file", + "deprecated": true, + "tags": [ + "Addresses API" + ], + "parameters": [ + { + "in": "query", + "name": "s3FileUrl", + "schema": { + "type": "string" + }, + "description": "file s3 reference", + "example": "https://epilot-dev-user-content.s3.eu-central-1.amazonaws.com/739224/4e7b7d95-ced6-4f5f-9326-0c61f30dcadb/availability-file-template%2520(19).csv" + }, + { + "in": "query", + "name": "fileId", + "schema": { + "type": "string" + }, + "description": "file id to validate", + "example": "4e7b7d95-ced6-4f5f-9326-0c61f30dcadb" + } + ], + "responses": { + "200": { + "description": "The addresses validation result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateAddressSuggestionsFileResult" + }, + "examples": { + "Response when file has no errors": { + "value": { + "number_of_rules_parsed": 10, + "errors": [] + } + }, + "Response when file has errors": { + "value": { + "number_of_rules_parsed": 8, + "errors": [ + "File must be UTF-8 encoded", + "Line 3 - Postal code is missing or invalid" + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/availability:check": { + "get": { + "description": "Check the availability of a given address within multiple files", + "operationId": "checkAvailability", + "summary": "Check address availability", + "tags": [ + "Addresses API" + ], + "parameters": [ + { + "in": "header", + "name": "X-Epilot-Org-ID", + "description": "The target Organization Id represented by the caller", + "schema": { + "type": "string" + }, + "required": true, + "example": 739224 + }, + { + "in": "query", + "name": "files", + "required": true, + "schema": { + "type": "string" + }, + "description": "file ids to check, comma separated" + }, + { + "in": "query", + "name": "countryCode", + "required": true, + "schema": { + "type": "string" + }, + "description": "country code", + "example": "de" + }, + { + "in": "query", + "name": "postalCode", + "required": true, + "schema": { + "type": "string" + }, + "description": "postal code", + "example": 50667 + }, + { + "in": "query", + "name": "street", + "required": false, + "schema": { + "type": "string" + }, + "description": "street", + "example": "Breite Str." + }, + { + "in": "query", + "name": "streetNumber", + "required": false, + "schema": { + "type": "string" + }, + "description": "street number", + "example": 1 + } + ], + "security": [ + {}, + { + "EpilotPublicAuth": [] + } + ], + "responses": { + "200": { + "description": "Availability result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AvailabilityResult" + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Address not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/addresses-files:validate": { + "get": { + "description": "Validates an addresses file, it returns an array of errors if the file is invalid", + "operationId": "validateAddressesFile", + "summary": "validate addresses file", + "tags": [ + "Addresses API" + ], + "parameters": [ + { + "in": "query", + "name": "fileId", + "schema": { + "type": "string" + }, + "description": "file id to validate", + "example": "4e7b7d95-ced6-4f5f-9326-0c61f30dcadb" + } + ], + "responses": { + "200": { + "description": "The addresses validation result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateAddressFileResult" + }, + "examples": { + "Response when file has no errors": { + "value": { + "number_of_rules_parsed": 10, + "errors": [] + } + }, + "Response when file has errors": { + "value": { + "number_of_rules_parsed": 8, + "errors": [ + "File must be UTF-8 encoded", + "Line 3 - Postal code is missing or invalid" + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Epilot Bearer Token", + "bearerFormat": "JWT" + }, + "EpilotPublicAuth": { + "type": "http", + "scheme": "bearer", + "description": "Epilot Public Access Bearer Token", + "bearerFormat": "JWT" + } + }, + "examples": { + "address-suggestions": { + "value": [ + { + "postal_code": 10115, + "city": "Berlin", + "street": "Bernauer Str." + } + ] + } + }, + "schemas": { + "AvailabilityLocation": { + "type": "object", + "properties": { + "street": { + "type": "string", + "description": "The first line of the address. Typically the street address or PO Box number." + }, + "street_number": { + "type": "string", + "description": "The second line of the address. Typically the number of the apartment, suite, or unit." + }, + "postal_code": { + "type": "string", + "description": "The postal code for the address." + }, + "city": { + "type": "string", + "description": "The name of the city, district, village, or town." + }, + "country": { + "type": "string", + "description": "The name of the country." + } + } + }, + "AvailabilityResult": { + "type": "object", + "properties": { + "fileId": { + "type": "string", + "description": "The id of the file where the address was found", + "example": "4e7b7d95-ced6-4f5f-9326-0c61f30dcadb" + } + } + }, + "Error": { + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "description": "Error message" + }, + "status": { + "type": "number", + "description": "The HTTP status code" + }, + "cause": { + "type": "string", + "description": "The cause of the error (visible for bad requests - http 400)" + } + } + }, + "AddressSuggestion": { + "type": "object", + "description": "The address suggestions entity", + "properties": { + "country": { + "type": "string", + "description": "The country code" + }, + "postal_code": { + "type": "string", + "description": "The postal code" + }, + "city": { + "type": "string", + "description": "The city" + }, + "street": { + "type": "string", + "description": "The street" + }, + "street_number": { + "type": "string", + "description": "The street number" + } + } + }, + "AddressSuggestions": { + "type": "array", + "description": "The address suggestions entity array", + "items": { + "$ref": "#/components/schemas/AddressSuggestion" + } + }, + "ValidateAddressSuggestionsFileResult": { + "description": "The availability map file result payload", + "type": "object", + "properties": { + "status": { + "description": "The status of the validation", + "type": "string", + "enum": [ + "success", + "error" + ] + }, + "rules_parsed_count": { + "description": "The number of rules successfully parsed", + "type": "number" + }, + "errors": { + "description": "The errors found on the file", + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressSuggestionError" + } + } + } + }, + "ValidateAddressFileResult": { + "description": "The address file validation result payload", + "type": "object", + "properties": { + "status": { + "description": "The status of the validation", + "type": "string", + "enum": [ + "success", + "error" + ] + }, + "rules_parsed_count": { + "description": "The number of rules successfully parsed", + "type": "number" + }, + "errors": { + "description": "The errors found on the file", + "type": "array", + "items": { + "$ref": "#/components/schemas/ValidateAddressFileError" + } + } + } + }, + "AddressSuggestionError": { + "description": "The availability rule error", + "type": "object", + "properties": { + "line": { + "description": "The line number where the error was found", + "type": "number" + }, + "msg": { + "description": "The error message", + "type": "string" + }, + "data": { + "description": "Data related to the error", + "type": "string" + } + }, + "required": [ + "msg" + ] + }, + "ValidateAddressFileError": { + "description": "The address rule error", + "type": "object", + "properties": { + "line": { + "description": "The line number where the error was found", + "type": "number" + }, + "msg": { + "description": "The error message", + "type": "string" + }, + "data": { + "description": "Data related to the error", + "type": "string" + } + }, + "required": [ + "msg" + ] + } + } + } +} diff --git a/packages/cli/definitions/address.json b/packages/cli/definitions/address.json new file mode 100644 index 00000000..35f8c3ae --- /dev/null +++ b/packages/cli/definitions/address.json @@ -0,0 +1,578 @@ +{ + "openapi": "3.1.0", + "info": { + "version": "2.0.0", + "title": "Address API", + "description": "API for address based operations on the Epilot platform", + "termsOfService": "https://epilot.cloud/agb", + "contact": { + "name": "Support", + "email": "info@epilot.cloud", + "url": "https://help.epilot.cloud" + } + }, + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotPublicAuth": [] + } + ], + "servers": [ + { + "url": "https://address.sls.epilot.io" + } + ], + "tags": [ + { + "name": "Availability" + }, + { + "name": "Address Suggestion" + } + ], + "paths": { + "/v1/public/suggestions": { + "get": { + "description": "Get address suggestions for the given Availability File", + "parameters": [ + { + "in": "query", + "name": "fileRef", + "required": true, + "schema": { + "type": "string", + "maxLength": 255, + "format": "uri" + }, + "description": "Reference to the File URL", + "example": "https://epilot-dev-user-content.s3.eu-central-1.amazonaws.com/739224/0a3639af-d4c3-4f96-bfc1-9dcbafdfaa42/availability-file-template%2520(13).csv" + }, + { + "in": "query", + "name": "countryCodeSearchTerm", + "required": false, + "schema": { + "type": "string", + "maxLength": 2 + }, + "description": "Country code search term", + "example": "de" + }, + { + "in": "query", + "name": "postalCodeSearchTerm", + "required": false, + "schema": { + "type": "string", + "format": "postal-code", + "maxLength": 10 + }, + "description": "Postal code search term", + "example": "506" + }, + { + "in": "query", + "name": "streetSearchTerm", + "required": false, + "schema": { + "type": "string", + "format": "street-address", + "maxLength": 255 + }, + "description": "street search term" + } + ], + "operationId": "getAddressSuggestions", + "summary": "getAddressSuggestions", + "tags": [ + "Address Suggestion" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "200": { + "description": "Suggestions list", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddressSuggestions" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/public/availability": { + "post": { + "description": "Check for Entities that contain a matching availability range in related availability files.", + "operationId": "availabilityCheck", + "summary": "availabilityCheck", + "security": [ + { + "EpilotAuth": [] + } + ], + "tags": [ + "Availability" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AvailabilityCheckParams" + } + } + } + }, + "responses": { + "200": { + "description": "The availability check result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AvailabilityResult" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/availability/{id}/validate": { + "get": { + "description": "Validates an already uploaded availability file, it returns an array of errors if any errors are found in the file.", + "operationId": "validateAvailabilityFile", + "summary": "validateAvailabilityFile", + "tags": [ + "Availability" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "Entity ID of the File Entity with the Availability File. The accepted formats are `.csv` and `.xlsx`.", + "schema": { + "type": "string", + "format": "uuid", + "maxLength": 36 + }, + "example": "72c803b2-2e5d-4bd6-bffc-fad998bbbe36" + } + ], + "responses": { + "200": { + "description": "Result of the validation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateAvailabilityFileResult" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token. Supports RFC8725 for JWT validation.", + "bearerFormat": "JWT" + }, + "EpilotPublicAuth": { + "type": "http", + "scheme": "bearer", + "description": "Epilot Public Access Bearer Token. Supports RFC8725 for JWT validation.", + "bearerFormat": "JWT" + } + }, + "schemas": { + "AvailabilityCheckParams": { + "properties": { + "entities": { + "description": "Entity ID's to check the availability parameters against", + "type": "array", + "maxItems": 100, + "items": { + "type": "string", + "maxLength": 36, + "format": "uuid" + } + }, + "schemas": { + "description": "One or more schemas that should be used to query for the matching Entities. Defaults to all schemas if nore are specified.", + "type": "array", + "example": [ + "opportunity", + "offer" + ], + "items": { + "type": "string", + "maxLength": 255 + } + }, + "filters": { + "$ref": "#/components/schemas/AvailabilityFilters" + } + }, + "required": [ + "entities", + "filters" + ] + }, + "AvailabilityFilters": { + "description": "Availability filters dimensions", + "type": "object", + "properties": { + "location": { + "$ref": "#/components/schemas/AvailabilityLocation" + }, + "available_date": { + "$ref": "#/components/schemas/AvailabilityDate" + } + }, + "required": [ + "location" + ] + }, + "AvailabilityDate": { + "type": "string", + "format": "date", + "description": "A value to be matched against the availability window (start & end date)", + "example": "2017-07-21", + "maxLength": 10 + }, + "AvailabilityLocation": { + "type": "object", + "properties": { + "street": { + "type": "string", + "maxLength": 255, + "description": "Street address or PO Box number.", + "example": "MediaPark" + }, + "street_number": { + "type": "string", + "maxLength": 20, + "description": "Apartment, suite, or unit number.", + "example": "8a" + }, + "postal_code": { + "type": "string", + "maxLength": 10, + "description": "The postal code for the address.", + "example": "57008" + }, + "city": { + "type": "string", + "maxLength": 100, + "description": "The name of the city, district, village, or town.", + "example": "Cologne" + }, + "country": { + "type": "string", + "maxLength": 2, + "description": "Country code", + "example": "DE" + } + } + }, + "AvailabilityResult": { + "description": "The availability check result payload", + "type": "object", + "properties": { + "available_entities": { + "type": "array", + "items": { + "type": "string", + "description": "Available Entities", + "maxLength": 255 + } + }, + "check_results": { + "description": "The check result details", + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "format": "uuid", + "maxLength": 36 + }, + "matching_hits": { + "description": "The number of rules matched", + "type": "number" + }, + "matching_error": { + "description": "A set of matching errors when checking availability", + "type": "object" + } + }, + "required": [ + "entity_id", + "matching_hits" + ] + } + } + }, + "required": [ + "available_entities", + "check_results" + ], + "example": { + "available_entities": [], + "check_results": [ + { + "entity_id": "72c803b2-2e5d-4bd6-bffc-fad998bbbe36", + "matching_hits": 0 + }, + { + "entity_id": "72c803b2-2e5d-4bd6-bffc-fad998bbbe37", + "matching_hits": 0 + } + ] + } + }, + "ValidateAvailabilityFileResult": { + "description": "The availability map file result payload", + "type": "object", + "properties": { + "status": { + "description": "The status of the validation", + "type": "string", + "enum": [ + "success", + "error" + ] + }, + "rules_parsed_count": { + "description": "The number of rules successfully parsed", + "type": "number" + }, + "errors": { + "description": "The errors found on the file", + "type": "array", + "items": { + "$ref": "#/components/schemas/ValidateAvailabilityFileError" + } + } + }, + "required": [ + "status", + "rules_parsed_count", + "errors" + ] + }, + "ValidateAvailabilityFileError": { + "description": "The availability rule error", + "type": "object", + "properties": { + "line": { + "description": "The line number where the error was found", + "type": "number" + }, + "message": { + "description": "The error message", + "type": "string", + "maxLength": 255 + }, + "data": { + "description": "Data related to the error", + "type": "string", + "maxLength": 255 + } + }, + "required": [ + "message" + ] + }, + "AddressSuggestion": { + "type": "object", + "description": "The address suggestions entity", + "properties": { + "country": { + "type": "string", + "maxLength": 2, + "description": "The country code" + }, + "postal_code": { + "type": "string", + "maxLength": 10, + "format": "postal-code", + "description": "The postal code" + }, + "city": { + "type": "string", + "maxLength": 100, + "format": "city", + "description": "The city" + }, + "street": { + "type": "string", + "maxLength": 255, + "format": "street-address", + "description": "The street" + }, + "street_number": { + "type": "string", + "maxLength": 20, + "format": "street-number", + "description": "The street number" + } + } + }, + "AddressSuggestions": { + "type": "array", + "description": "The address suggestions entity array", + "items": { + "$ref": "#/components/schemas/AddressSuggestion" + } + }, + "ErrorResponse": { + "type": "object", + "properties": { + "error": { + "type": "string", + "maxLength": 255, + "description": "Error message" + } + }, + "required": [ + "error" + ] + } + } + } +} diff --git a/packages/cli/definitions/ai-agents.json b/packages/cli/definitions/ai-agents.json new file mode 100644 index 00000000..3152f38b --- /dev/null +++ b/packages/cli/definitions/ai-agents.json @@ -0,0 +1,1711 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "3.0.0", + "title": "AI Agents API - OpenAPI 3.0", + "description": "API for configuring and invoking AI agents in epilot platform", + "termsOfService": "https://epilot.cloud/agb", + "contact": { + "name": "Support", + "email": "info@epilot.cloud", + "url": "https://help.epilot.cloud" + } + }, + "security": [ + { + "EpilotAuth": [] + } + ], + "servers": [ + { + "url": "https://ai-agents.sls.epilot.io" + } + ], + "tags": [ + { + "name": "Agents Configuration", + "description": "Everything about AI Agent configuration" + }, + { + "name": "Agent Execution", + "description": "Execute AI agents and manage executions" + } + ], + "paths": { + "/v1/agents": { + "post": { + "tags": [ + "Agents Configuration" + ], + "summary": "Create Agent definition", + "description": "Creates a new custom agent. System skills cannot be created via this endpoint.", + "operationId": "createAgent", + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Agent Created Successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentDefinition" + } + } + } + }, + "400": { + "description": "Error while creating the agent", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "get": { + "tags": [ + "Agents Configuration" + ], + "summary": "List all agent configurations", + "description": "Lists agents from both system skills and custom agents.\nUse query parameters to filter by source, availability, or entity schema.\n", + "operationId": "listAgents", + "parameters": [ + { + "name": "source", + "in": "query", + "schema": { + "$ref": "#/components/schemas/AgentSource" + }, + "description": "Filter by agent source (system = pre-built skills, custom = user-created)" + }, + { + "name": "availability", + "in": "query", + "schema": { + "$ref": "#/components/schemas/SkillAvailability" + }, + "description": "Filter by availability context (flows, copilot)" + }, + { + "name": "entity_schema", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by allowed entity schema (e.g., \"message\" for email-related skills)" + } + ], + "responses": { + "200": { + "description": "List of agents", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListAgentsResponse" + } + } + } + }, + "400": { + "description": "Error fetching the agent configs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/agents/{agent_id}": { + "get": { + "tags": [ + "Agents Configuration" + ], + "summary": "Get the agent configuration by ID", + "description": "Retrieves an agent by ID. Supports both:\n- System skill IDs (prefixed): \"skill:email-categorizer\"\n- Custom agent IDs (UUID): \"0336a235-9417-4dd8-894c-fe81285bba75\"\n", + "operationId": "getAgentById", + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/AgentId" + } + } + ], + "responses": { + "200": { + "description": "Agent fetched Successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentDefinition" + } + } + } + }, + "400": { + "description": "Error while creating the agent", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "put": { + "tags": [ + "Agents Configuration" + ], + "summary": "Update the agent configuration by ID", + "description": "Updates a custom agent. System skills cannot be updated via this endpoint.", + "operationId": "updateAgentById", + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/AgentId" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAgentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Agent updated Successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentDefinition" + } + } + } + }, + "400": { + "description": "Error while updating the agent", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Agents Configuration" + ], + "summary": "Delete the agent configuration by ID", + "description": "Deletes a custom agent. System skills cannot be deleted via this endpoint.", + "security": [ + { + "EpilotAuth": [] + } + ], + "operationId": "deleteAgentById", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/AgentId" + } + } + ], + "responses": { + "204": { + "description": "Agent deleted Successfully" + }, + "400": { + "description": "Error while deleting the agent", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/agents/{agent_id}/execute": { + "post": { + "tags": [ + "Agent Execution" + ], + "summary": "Execute an agent", + "description": "Executes an agent (system skill or custom agent).\nSupports both:\n- System skill IDs (prefixed): \"skill:email-categorizer\"\n- Custom agent IDs (UUID): \"0336a235-9417-4dd8-894c-fe81285bba75\"\n", + "operationId": "executeAgent", + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/AgentId" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteAgentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Agent execution initiated or completed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionResponse" + } + } + } + }, + "400": { + "description": "Error while executing the agent", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Agent not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/executions": { + "get": { + "tags": [ + "Agent Execution" + ], + "summary": "List executions", + "operationId": "listExecutions", + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "agent_id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by agent ID" + }, + { + "name": "status", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ExecutionStatus" + }, + "description": "Filter by status" + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "default": 50 + }, + "description": "Maximum number of executions to return" + } + ], + "responses": { + "200": { + "description": "List of executions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListExecutionsResponse" + } + } + } + }, + "400": { + "description": "Error fetching executions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/executions/{execution_id}": { + "get": { + "tags": [ + "Agent Execution" + ], + "summary": "Get execution by ID", + "operationId": "getExecution", + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Execution details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionResponse" + } + } + } + }, + "404": { + "description": "Execution not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Agent Execution" + ], + "summary": "Cancel execution", + "operationId": "cancelExecution", + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Execution cancelled", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionResponse" + } + } + } + }, + "400": { + "description": "Cannot cancel execution (already completed or failed)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Execution not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/executions/{execution_id}/trace": { + "get": { + "tags": [ + "Agent Execution" + ], + "summary": "Get execution trace/iterations", + "description": "Returns the step-by-step reasoning and tool calls for ReAct mode executions. Returns empty iterations array for direct mode executions.", + "operationId": "getExecutionTrace", + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Execution trace", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionTrace" + } + } + } + }, + "404": { + "description": "Execution not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/executions/{execution_id}/approve": { + "post": { + "tags": [ + "Agent Execution" + ], + "summary": "Approve pending action", + "description": "Approves a pending tool action when execution is in waiting_approval status", + "operationId": "approveExecution", + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApproveExecutionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Action approved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionResponse" + } + } + } + }, + "400": { + "description": "No pending action to approve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Execution not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/executions/{execution_id}/reject": { + "post": { + "tags": [ + "Agent Execution" + ], + "summary": "Reject pending action", + "description": "Rejects a pending tool action when execution is in waiting_approval status", + "operationId": "rejectExecution", + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RejectExecutionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Action rejected", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionResponse" + } + } + } + }, + "400": { + "description": "No pending action to reject", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Execution not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token. Supports RFC8725 for JWT validation.", + "bearerFormat": "JWT" + } + }, + "schemas": { + "AgentId": { + "type": "string", + "description": "Agent identifier. Can be either:\n- System skill ID (prefixed): \"skill:email-categorizer\", \"skill:email-labeler\"\n- Custom agent UUID: \"0336a235-9417-4dd8-894c-fe81285bba75\"\n", + "example": "skill:email-categorizer" + }, + "CreateAgentRequest": { + "type": "object", + "required": [ + "name", + "system_prompt", + "execution_pattern" + ], + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100, + "example": "Email Reply Generator" + }, + "description": { + "type": "string", + "maxLength": 1000 + }, + "category": { + "$ref": "#/components/schemas/SkillCategory" + }, + "icon": { + "type": "string", + "example": "mail-reply" + }, + "system_prompt": { + "type": "string", + "minLength": 1, + "description": "Core LLM instructions" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tool IDs this agent can use", + "example": [ + "entity.search", + "message.draft" + ] + }, + "model_config": { + "$ref": "#/components/schemas/ModelConfig" + }, + "max_iterations": { + "type": "integer", + "minimum": 1, + "maximum": 20, + "default": 10, + "description": "Max ReAct loop iterations" + }, + "execution_pattern": { + "$ref": "#/components/schemas/ExecutionPattern" + }, + "execution_mode": { + "$ref": "#/components/schemas/ExecutionMode" + }, + "output_schema": { + "type": "object", + "description": "JSON Schema for expected output" + }, + "input_parameters_schema": { + "$ref": "#/components/schemas/InputParametersSchema" + } + } + }, + "UpdateAgentRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "description": { + "type": "string", + "maxLength": 1000 + }, + "category": { + "$ref": "#/components/schemas/SkillCategory" + }, + "icon": { + "type": "string" + }, + "system_prompt": { + "type": "string", + "minLength": 1 + }, + "tools": { + "type": "array", + "items": { + "type": "string" + } + }, + "model_config": { + "$ref": "#/components/schemas/ModelConfig" + }, + "max_iterations": { + "type": "integer", + "minimum": 1, + "maximum": 20 + }, + "execution_pattern": { + "$ref": "#/components/schemas/ExecutionPattern" + }, + "execution_mode": { + "$ref": "#/components/schemas/ExecutionMode" + }, + "output_schema": { + "type": "object" + }, + "input_parameters_schema": { + "$ref": "#/components/schemas/InputParametersSchema" + } + } + }, + "AgentDefinition": { + "type": "object", + "properties": { + "agent_id": { + "$ref": "#/components/schemas/AgentId" + }, + "org_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "category": { + "$ref": "#/components/schemas/SkillCategory" + }, + "icon": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/AgentSource" + }, + "availability": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SkillAvailability" + }, + "description": "Where this agent/skill is available (flows, copilot, or both)", + "example": [ + "flows", + "copilot" + ] + }, + "allowed_entity_schemas": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Entity schemas this skill is allowed to work with (e.g., [\"message\"] for email skills)", + "example": [ + "message" + ] + }, + "system_prompt": { + "type": "string" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + } + }, + "model_config": { + "$ref": "#/components/schemas/ModelConfig" + }, + "max_iterations": { + "type": "integer" + }, + "execution_pattern": { + "$ref": "#/components/schemas/ExecutionPattern" + }, + "execution_mode": { + "$ref": "#/components/schemas/ExecutionMode" + }, + "output_schema": { + "type": "object" + }, + "input_parameters_schema": { + "$ref": "#/components/schemas/InputParametersSchema" + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_by": { + "type": "string" + } + } + }, + "ListAgentsResponse": { + "type": "object", + "properties": { + "agents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentDefinition" + } + }, + "next_cursor": { + "type": "string", + "nullable": true + } + } + }, + "ListExecutionsResponse": { + "type": "object", + "properties": { + "executions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExecutionResponse" + } + }, + "next_cursor": { + "type": "string", + "nullable": true + } + } + }, + "ApproveExecutionRequest": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "Optional reason for approval" + } + } + }, + "RejectExecutionRequest": { + "type": "object", + "required": [ + "reason" + ], + "properties": { + "reason": { + "type": "string", + "description": "Reason for rejection" + } + } + }, + "ExecuteAgentRequest": { + "type": "object", + "properties": { + "input": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "description": "Primary entity ID for context" + }, + "entity_schema": { + "type": "string", + "description": "Schema of the primary entity (e.g., \"message\", \"contact\")" + }, + "workflow_id": { + "type": "string" + }, + "workflow_execution_id": { + "type": "string" + }, + "task_id": { + "type": "string" + }, + "custom_data": { + "type": "object", + "additionalProperties": true + }, + "flow_context": { + "type": "array", + "description": "Array of entities from the flow trigger context (e.g., the message entity when triggered by email receive)", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string" + }, + "entity_schema": { + "type": "string" + } + }, + "required": [ + "entity_id", + "entity_schema" + ] + } + } + } + }, + "parameters": { + "type": "object", + "additionalProperties": true, + "description": "Runtime parameters (validated against input_parameters_schema)" + }, + "execution_mode_override": { + "$ref": "#/components/schemas/ExecutionMode" + }, + "execution_context": { + "$ref": "#/components/schemas/ExecutionContext" + }, + "callback_url": { + "type": "string", + "format": "uri", + "description": "Webhook URL for async completion notification" + }, + "timeout_ms": { + "type": "integer", + "default": 30000, + "maximum": 300000, + "description": "Execution timeout in milliseconds" + } + } + }, + "ExecutionResponse": { + "type": "object", + "properties": { + "execution_id": { + "type": "string", + "format": "uuid" + }, + "agent_id": { + "$ref": "#/components/schemas/AgentId" + }, + "agent_source": { + "$ref": "#/components/schemas/AgentSource" + }, + "agent_name": { + "type": "string", + "description": "Human-readable agent name (denormalized for display)" + }, + "execution_context": { + "$ref": "#/components/schemas/ExecutionContext" + }, + "org_id": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/ExecutionStatus" + }, + "input": { + "type": "object" + }, + "parameters": { + "type": "object" + }, + "result": { + "type": "object", + "nullable": true, + "description": "Execution result (when status=completed)", + "properties": { + "response": { + "type": "string", + "description": "Text response from the agent" + }, + "structured_output": { + "type": "object", + "nullable": true, + "description": "Parsed structured output (only for direct mode with output_schema)" + } + } + }, + "error": { + "$ref": "#/components/schemas/ExecutionError" + }, + "pending_action": { + "$ref": "#/components/schemas/PendingAction" + }, + "metrics": { + "$ref": "#/components/schemas/ExecutionMetrics" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "ExecutionTrace": { + "type": "object", + "properties": { + "execution_id": { + "type": "string", + "format": "uuid" + }, + "iterations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExecutionIteration" + } + }, + "total_iterations": { + "type": "integer" + } + } + }, + "ExecutionIteration": { + "type": "object", + "properties": { + "iteration_index": { + "type": "integer" + }, + "thought": { + "type": "string", + "description": "LLM reasoning/thinking" + }, + "action": { + "type": "object", + "nullable": true, + "properties": { + "tool": { + "type": "string" + }, + "input": { + "type": "object" + } + } + }, + "observation": { + "type": "object", + "nullable": true, + "description": "Tool result" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "tokens_used": { + "type": "integer" + }, + "latency_ms": { + "type": "integer" + } + } + }, + "PendingAction": { + "type": "object", + "nullable": true, + "description": "Action waiting for approval (when status=waiting_approval)", + "properties": { + "tool": { + "type": "string", + "description": "Tool ID that requires approval" + }, + "input": { + "type": "object", + "description": "Tool input parameters" + }, + "description": { + "type": "string", + "description": "Human-readable description of the action" + }, + "preview": { + "$ref": "#/components/schemas/ToolPreview" + } + } + }, + "ExecutionError": { + "type": "object", + "nullable": true, + "properties": { + "code": { + "type": "string", + "enum": [ + "TIMEOUT", + "MAX_ITERATIONS_EXCEEDED", + "TOOL_EXECUTION_FAILED", + "LLM_ERROR", + "INVALID_OUTPUT", + "REJECTED", + "INTERNAL_ERROR" + ] + }, + "message": { + "type": "string" + }, + "details": { + "type": "object" + } + } + }, + "ExecutionMetrics": { + "type": "object", + "properties": { + "total_tokens": { + "type": "integer" + }, + "input_tokens": { + "type": "integer" + }, + "output_tokens": { + "type": "integer" + }, + "total_cost_usd": { + "type": "number", + "format": "float" + }, + "duration_ms": { + "type": "integer" + }, + "iteration_count": { + "type": "integer" + } + } + }, + "ToolPreview": { + "type": "object", + "description": "Structured preview data for approval UI. Provides a generic format that any tool can populate.", + "properties": { + "action": { + "type": "object", + "required": [ + "type", + "verb" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/PreviewActionType" + }, + "verb": { + "type": "string", + "description": "Human-readable action verb", + "example": "Move Thread" + } + } + }, + "source": { + "$ref": "#/components/schemas/PreviewEntity" + }, + "target": { + "$ref": "#/components/schemas/PreviewEntity" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PreviewChange" + }, + "description": "List of changes/modifications being made" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PreviewValue" + }, + "description": "Additional context information" + }, + "summary": { + "type": "string", + "description": "AI reasoning for why this action is recommended", + "example": "This email discusses solar panel installation and should be handled by the Service team." + } + } + }, + "PreviewActionType": { + "type": "string", + "enum": [ + "move", + "create", + "update", + "delete", + "apply", + "send", + "link", + "unlink" + ], + "description": "Type of action being previewed" + }, + "PreviewEntity": { + "type": "object", + "description": "Entity reference for preview display", + "properties": { + "type": { + "type": "string", + "description": "Entity type (e.g., \"inbox\", \"email\", \"contact\", \"label\")", + "example": "inbox" + }, + "id": { + "type": "string", + "description": "Entity ID" + }, + "name": { + "type": "string", + "description": "Human-readable name for display", + "example": "Support Inbox" + }, + "schema": { + "type": "string", + "description": "Entity schema (for epilot entities)" + }, + "icon": { + "type": "string", + "description": "Icon hint for UI" + }, + "url": { + "type": "string", + "description": "Optional URL to view the entity" + } + } + }, + "PreviewChange": { + "type": "object", + "description": "A single field change in the preview", + "properties": { + "field": { + "type": "string", + "description": "Field identifier" + }, + "label": { + "type": "string", + "description": "Human-readable field label" + }, + "from": { + "$ref": "#/components/schemas/PreviewValue" + }, + "to": { + "$ref": "#/components/schemas/PreviewValue" + } + } + }, + "PreviewValue": { + "type": "object", + "description": "Typed value for preview display", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "text", + "number", + "boolean", + "list", + "entity", + "badge" + ], + "description": "Value type for proper rendering" + }, + "value": { + "description": "The actual value (type depends on \"type\" field)" + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of values (for list type)" + }, + "id": { + "type": "string", + "description": "Entity ID (for entity type)" + }, + "name": { + "type": "string", + "description": "Display name (for entity type)" + }, + "schema": { + "type": "string", + "description": "Entity schema (for entity type)" + }, + "color": { + "type": "string", + "enum": [ + "success", + "warning", + "error", + "info" + ], + "description": "Badge color (for badge type)" + } + } + }, + "ToolDefinition": { + "type": "object", + "properties": { + "tool_id": { + "type": "string", + "example": "entity.search" + }, + "name": { + "type": "string", + "example": "Search Entities" + }, + "description": { + "type": "string", + "description": "Description for LLM to understand tool purpose" + }, + "category": { + "type": "string", + "enum": [ + "entity", + "email", + "taxonomy", + "rag", + "workflow" + ] + }, + "parameters": { + "type": "object", + "description": "JSON Schema for tool input" + }, + "returns": { + "type": "object", + "description": "JSON Schema for tool output" + }, + "requires_approval": { + "type": "boolean", + "default": false, + "description": "Whether this tool always requires human approval" + }, + "enabled": { + "type": "boolean", + "default": true + } + } + }, + "SkillCategory": { + "type": "string", + "enum": [ + "message", + "entity", + "document", + "classification", + "custom" + ] + }, + "AgentSource": { + "type": "string", + "enum": [ + "system", + "custom" + ], + "description": "- system: Pre-built by epilot (system skills)\n- custom: Created by organization\n" + }, + "SkillAvailability": { + "type": "string", + "enum": [ + "flows", + "copilot", + "all" + ], + "description": "Where the skill/agent is available:\n- flows: Available in workflow automations\n- copilot: Available as a sub-agent in copilot\n- all: Available everywhere\n" + }, + "ExecutionContext": { + "type": "string", + "enum": [ + "flows", + "copilot", + "api" + ], + "description": "Where the execution was triggered from:\n- flows: Triggered from workflow automation\n- copilot: Triggered from copilot assistant\n- api: Direct API call\n" + }, + "ExecutionPattern": { + "type": "string", + "enum": [ + "direct", + "react" + ], + "description": "- direct: Single LLM call, no tools\n- react: Multi-step reasoning with tool use\n" + }, + "ExecutionMode": { + "type": "string", + "enum": [ + "automatic", + "approval", + "draft" + ], + "description": "- automatic: Execute without human intervention\n- approval: Pause for human approval before tool execution\n- draft: Execute but mark output as draft for review\n" + }, + "ExecutionStatus": { + "type": "string", + "enum": [ + "pending", + "running", + "waiting_approval", + "completed", + "failed", + "cancelled" + ] + }, + "ParameterType": { + "type": "string", + "enum": [ + "text", + "textarea", + "number", + "boolean", + "select", + "entity-schema", + "entity-attribute", + "entity-id", + "taxonomy", + "taxonomy-classification", + "shared-inbox", + "label" + ], + "description": "Base types:\n- text: Text input field\n- textarea: Multi-line text input field\n- number: Numeric input field\n- boolean: Toggle switch\n- select: Dropdown selection (requires enum array)\n\nCustom types (domain-specific):\n- entity-schema: Entity schema selector (fetches from Entity API)\n- entity-attribute: Entity attribute selector (requires dependsOn)\n- entity-id: Entity picker (search and select entities)\n- taxonomy: Taxonomy selector (fetches from Taxonomy API)\n- taxonomy-classification: Classification selector (requires dependsOn)\n- shared-inbox: Shared inbox selector (fetches from Email Settings API)\n" + }, + "InputParameterDefinition": { + "type": "object", + "required": [ + "name", + "label", + "type" + ], + "properties": { + "name": { + "type": "string", + "description": "Unique identifier for the parameter (used in API)", + "example": "target_schema" + }, + "label": { + "type": "string", + "description": "Human-readable display label", + "example": "Target Schema" + }, + "type": { + "$ref": "#/components/schemas/ParameterType" + }, + "description": { + "type": "string", + "description": "Help text for the parameter" + }, + "default": { + "description": "Default value for the parameter" + }, + "multi": { + "type": "boolean", + "default": false, + "description": "Allow multiple selections (value becomes array)" + }, + "dependsOn": { + "type": "string", + "description": "Parent parameter this depends on (for entity-attribute, taxonomy-classification)" + }, + "visibleWhen": { + "type": "object", + "additionalProperties": { + "type": "array" + }, + "description": "Conditional visibility rules (show when parent has specific values)" + }, + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed values (required for 'select' type)" + }, + "minimum": { + "type": "number", + "description": "Minimum value (for number type)" + }, + "maximum": { + "type": "number", + "description": "Maximum value (for number type)" + }, + "step": { + "type": "number", + "description": "Step increment (for number type)" + }, + "minLength": { + "type": "integer", + "description": "Minimum length (for text type)" + }, + "maxLength": { + "type": "integer", + "description": "Maximum length (for text type)" + }, + "schemaFilter": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter to specific schemas (for entity-schema, entity-id)" + }, + "attributeTypeFilter": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter to specific attribute types (for entity-attribute)" + } + } + }, + "InputParametersSchema": { + "type": "object", + "required": [ + "type", + "parameters" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "object" + ], + "description": "Always \"object\"" + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InputParameterDefinition" + }, + "description": "Array of parameter definitions" + }, + "required": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of parameter names that are required" + } + }, + "example": { + "type": "object", + "parameters": [ + { + "name": "target_schema", + "label": "Target Schema", + "type": "entity-schema", + "description": "Entity type to create" + }, + { + "name": "confidence_threshold", + "label": "Confidence Threshold", + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 0.8 + }, + { + "name": "categories", + "label": "Categories", + "type": "select", + "enum": [ + "invoice", + "contract", + "letter" + ], + "multi": true + } + ], + "required": [ + "target_schema" + ] + } + }, + "ModelConfig": { + "type": "object", + "properties": { + "model_id": { + "type": "string", + "default": "anthropic.claude-3-5-sonnet-20241022-v2:0", + "description": "AWS Bedrock model ID" + }, + "temperature": { + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 0.7 + }, + "max_tokens": { + "type": "integer", + "default": 4096, + "maximum": 8192 + } + } + }, + "Error": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "details": { + "type": "object" + } + } + } + } + } +} diff --git a/packages/cli/definitions/app.json b/packages/cli/definitions/app.json new file mode 100644 index 00000000..66f9f498 --- /dev/null +++ b/packages/cli/definitions/app.json @@ -0,0 +1,4443 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "App API", + "description": "API for managing app publishing and installed app.", + "version": "2.0.0" + }, + "tags": [ + { + "name": "App Configuration", + "description": "Create and manage app configurations" + }, + { + "name": "App Installation", + "description": "Install and uninstall apps" + }, + { + "name": "App Analytics", + "description": "Analytics for installed apps" + } + ], + "servers": [ + { + "url": "https://app.sls.epilot.io" + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "paths": { + "/v1/public/app/{appId}/components/{componentId}": { + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration to install" + }, + { + "name": "componentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the component to retrieve" + } + ], + "get": { + "security": [ + { + "EpilotAuth": [] + } + ], + "summary": "getPublicFacingComponent", + "description": "Retrieve public facing components for an installed app", + "operationId": "getPublicFacingComponent", + "tags": [ + "App Installation" + ], + "responses": { + "200": { + "description": "Successful response with public app component details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/BaseComponent" + } + } + } + } + } + }, + "404": { + "description": "App Installation not found" + } + } + } + }, + "/v1/app-configurations": { + "get": { + "summary": "listConfigurations", + "description": "List all app configuration metadata owned by an organization. To get full app configuration details, use the /v1/app-configurations/{appId} endpoint.", + "operationId": "listConfigurations", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "description": "Page number for pagination" + }, + { + "name": "pageSize", + "in": "query", + "schema": { + "type": "integer", + "default": 20 + }, + "description": "Number of items per page" + } + ], + "responses": { + "200": { + "description": "List of app configurations", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "configurations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConfigurationMetadata" + } + }, + "pagination": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + } + } + } + } + } + } + } + } + } + }, + "post": { + "summary": "createConfiguration", + "description": "Create a new private app configuration. To make it public a verification process needs to be triggered", + "operationId": "createConfiguration", + "tags": [ + "App Configuration" + ], + "requestBody": { + "$ref": "#/components/requestBodies/CreateConfigRequest" + }, + "responses": { + "201": { + "description": "App configuration created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "app_id" + ], + "properties": { + "app_id": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/v1/app-configurations/public": { + "get": { + "summary": "listPublicConfigurations", + "description": "List all publicly available app configurations that can be installed. This endpoint returns apps that have at least one public version.", + "operationId": "listPublicConfigurations", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "description": "Page number for pagination" + }, + { + "name": "pageSize", + "in": "query", + "schema": { + "type": "integer", + "default": 20 + }, + "description": "Number of items per page" + } + ], + "responses": { + "200": { + "description": "List of public app configurations", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "configurations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConfigurationMetadata" + } + }, + "pagination": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + } + } + } + } + } + } + } + } + } + } + }, + "/v1/app-configurations/public/{appId}": { + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration to install" + } + ], + "get": { + "summary": "getPublicConfiguration", + "description": "Retrieve the public configuration of an app to install in your tenant", + "operationId": "getPublicConfiguration", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "version", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Version of the app configuration to retrieve" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicConfiguration" + } + } + } + }, + "404": { + "description": "App configuration not found" + } + } + } + }, + "/v1/app-configurations/{appId}": { + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + } + ], + "get": { + "summary": "getConfiguration", + "description": "Retrieve a specific app configuration", + "operationId": "getConfiguration", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "version", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Version of the app configuration to retrieve" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Configuration" + } + } + } + }, + "404": { + "description": "App configuration not found" + } + } + }, + "patch": { + "summary": "patchMetadata", + "description": "Patch non-versioned configuration metadata of a given app configuration.", + "operationId": "patchMetadata", + "tags": [ + "App Configuration" + ], + "requestBody": { + "$ref": "#/components/requestBodies/PatchConfigMetadataRequest" + }, + "responses": { + "204": { + "description": "Configuration patched successfully" + }, + "404": { + "description": "App configuration not found" + } + } + }, + "delete": { + "summary": "Delete app configuration", + "description": "Delete an app configuration and all its versions and components.", + "operationId": "deleteConfiguration", + "tags": [ + "App Configuration" + ], + "responses": { + "204": { + "description": "App configuration deleted successfully" + }, + "404": { + "description": "App configuration not found" + } + } + } + }, + "/v1/app-configurations/{appId}/events": { + "post": { + "summary": "queryEvents", + "description": "Query analytics events for a specific app with flexible filtering", + "operationId": "queryEvents", + "tags": [ + "App Analytics" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventsQuery" + } + } + } + }, + "responses": { + "200": { + "description": "Analytics events", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventsQueryResponse" + } + } + } + }, + "400": { + "description": "Invalid query parameters" + }, + "404": { + "description": "App configuration not found" + } + } + } + }, + "/v1/app-configurations/{appId}/bundle": { + "post": { + "summary": "createBundleUploadUrl", + "description": "Generate a presigned URL for uploading app bundle to //bundle.js path", + "operationId": "createBundleUploadUrl", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/CreateBundlePresignedRequest" + }, + "responses": { + "200": { + "description": "Upload URL generated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "upload_url" + ], + "properties": { + "component_id": { + "type": "string", + "description": "ID of the journye block component" + }, + "component_url": { + "type": "string", + "description": "URL of the web component object" + }, + "upload_url": { + "type": "string", + "description": "Presigned S3 URL for uploading the bundle" + }, + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the upload URL expires" + } + } + } + } + } + }, + "404": { + "description": "App configuration not found" + } + } + } + }, + "/v1/app-configurations/{appId}/zip": { + "post": { + "summary": "createZipUploadUrl", + "operationId": "createZipUploadUrl", + "description": "Generate a presigned URL to upload a zip file with artifacts that will be unpacked in a new directory under the // path\n", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "version": { + "type": "string", + "description": "Version of the app configuration", + "example": "1.0.0" + }, + "component_id": { + "type": "string", + "description": "ID of the journey block component" + }, + "filename": { + "type": "string", + "example": "dist.zip" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Upload URL generated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "upload_url", + "artifact_url" + ], + "properties": { + "component_id": { + "type": "string", + "description": "ID of the journye block component" + }, + "upload_url": { + "type": "string", + "description": "Presigned S3 URL for uploading the bundle" + }, + "artifact_url": { + "type": "string", + "description": "Public CDN URL for the unpacked artifacts" + }, + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the upload URL expires" + } + } + } + } + } + }, + "404": { + "description": "App configuration not found" + } + } + } + }, + "/v1/app-configurations/{appId}/logo": { + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + } + ], + "post": { + "summary": "createLogoUploadUrl", + "description": "Generate a presigned URL for uploading app logo to //logo.png path", + "operationId": "createLogoUploadUrl", + "tags": [ + "App Configuration" + ], + "requestBody": { + "$ref": "#/components/requestBodies/CreateLogoPresignedRequest" + }, + "responses": { + "200": { + "description": "Upload URL generated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "upload_url" + ], + "properties": { + "upload_url": { + "type": "string", + "description": "Presigned S3 URL for uploading the logo" + }, + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the upload URL expires" + } + } + } + } + } + }, + "404": { + "description": "App configuration not found" + } + } + }, + "delete": { + "summary": "deleteLogo", + "description": "Delete the app logo from //logo.png path", + "operationId": "deleteLogo", + "tags": [ + "App Configuration" + ], + "responses": { + "204": { + "description": "Logo deleted successfully" + }, + "404": { + "description": "App configuration not found" + } + } + } + }, + "/v1/app-configurations/{appId}/versions": { + "get": { + "summary": "listVersions", + "description": "Retrieve a list of versions for an app configuration", + "operationId": "listVersions", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + }, + { + "name": "page", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "description": "Page number for pagination" + }, + { + "name": "pageSize", + "in": "query", + "schema": { + "type": "integer", + "default": 20 + }, + "description": "Number of items per page" + } + ], + "responses": { + "200": { + "description": "List of app versions", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "versions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConfigurationVersion" + } + }, + "pagination": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid parameter" + } + } + } + }, + "/v1/app-configurations/{appId}/versions/{version}": { + "get": { + "summary": "getVersion", + "description": "Retrieve a specific version of an app configuration", + "operationId": "getVersion", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + }, + { + "name": "version", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Version of the app configuration to retrieve" + } + ], + "responses": { + "200": { + "description": "App configuration for specific version", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Configuration" + } + } + } + }, + "404": { + "description": "App configuration or version not found" + } + } + }, + "delete": { + "summary": "deleteVersion", + "description": "Delete a specific version of an app configuration", + "operationId": "deleteVersion", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + }, + { + "name": "version", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Version to delete" + } + ], + "responses": { + "204": { + "description": "Version deleted successfully" + }, + "400": { + "description": "Cannot delete the only remaining version" + }, + "404": { + "description": "Version not found" + }, + "409": { + "description": "Version is in use by installations" + } + } + }, + "patch": { + "summary": "patchVersion", + "description": "Patch an existing app version", + "operationId": "patchVersion", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + }, + { + "name": "version", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Version to update" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/PatchVersionRequest" + }, + "responses": { + "204": { + "description": "Version patched successfully" + }, + "400": { + "description": "Invalid version format" + }, + "404": { + "description": "Version not found" + } + } + } + }, + "/v1/app-configurations/{appId}/versions/{version}/review": { + "get": { + "summary": "getReview", + "description": "Retrieve the review status of a specific app version", + "operationId": "getReview", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + }, + { + "name": "version", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Version to retrieve the review status for" + } + ], + "responses": { + "200": { + "description": "Review status retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "review": { + "$ref": "#/components/schemas/Review" + } + } + } + } + } + }, + "404": { + "description": "Version not found or no review exists for this version" + } + } + }, + "post": { + "summary": "createReview", + "description": "Submit an app version for review to make it public", + "operationId": "createReview", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + }, + { + "name": "version", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Version to submit for review" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/CreateReviewRequest" + }, + "responses": { + "200": { + "description": "Version submitted for review successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "review": { + "$ref": "#/components/schemas/Review" + } + } + } + } + } + }, + "400": { + "description": "Invalid version format" + }, + "404": { + "description": "Version not found" + } + } + } + }, + "/v1/app-configurations/{appId}/versions/{version}/components": { + "post": { + "summary": "createComponent", + "description": "Patch an existing app version to create/add a component", + "operationId": "createComponent", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + }, + { + "name": "version", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Version to update" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/UpsertComponentRequest" + }, + "responses": { + "200": { + "description": "Component created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/BaseComponent" + } + } + } + } + } + }, + "400": { + "description": "Invalid version format" + }, + "404": { + "description": "Version not found" + } + } + } + }, + "/v1/app-configurations/{appId}/versions/{version}/components/{componentId}": { + "patch": { + "summary": "patchComponent", + "description": "Patch an existing app version to update its components", + "operationId": "patchComponent", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + }, + { + "name": "version", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Version to update" + }, + { + "name": "componentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the component to update" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/UpsertComponentRequest" + }, + "responses": { + "204": { + "description": "Component patched successfully" + }, + "400": { + "description": "Invalid version format" + }, + "404": { + "description": "Version or component not found" + } + } + }, + "delete": { + "summary": "deleteComponent", + "description": "Delete a specific component from an app version", + "operationId": "deleteComponent", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + }, + { + "name": "version", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Version to update" + }, + { + "name": "componentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the component to delete" + } + ], + "responses": { + "204": { + "description": "Component deleted successfully" + }, + "404": { + "description": "Version or component not found" + } + } + } + }, + "/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}": { + "post": { + "summary": "cloneVersion", + "description": "Clone an existing app version to create a new version", + "operationId": "cloneVersion", + "tags": [ + "App Configuration" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the app configuration" + }, + { + "name": "sourceVersion", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Source version to clone from" + }, + { + "name": "targetVersion", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Target version to create" + } + ], + "responses": { + "201": { + "description": "New version created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "app_id": { + "type": "string" + }, + "version": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "published" + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid version format or target version already exists" + }, + "404": { + "description": "Source version not found" + } + } + } + }, + "/v1/app": { + "get": { + "summary": "listInstallations", + "description": "Retrieve a list of installed apps for the organization.", + "operationId": "listInstallations", + "tags": [ + "App Installation" + ], + "parameters": [ + { + "name": "componentType", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ComponentType" + }, + "description": "Filter apps by specific component type", + "example": "CUSTOM_JOURNEY_BLOCK" + }, + { + "name": "enabled", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Filter apps by enabled status" + }, + { + "name": "page", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "description": "Page number for pagination" + }, + { + "name": "pageSize", + "in": "query", + "schema": { + "type": "integer", + "default": 20 + }, + "description": "Number of items per page" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "apps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Installation" + } + }, + "pagination": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + } + } + } + } + } + } + } + } + } + } + }, + "/v1/app/{appId}": { + "get": { + "summary": "getInstallation", + "description": "Retrieve details of an installed app by its ID.", + "operationId": "getInstallation", + "tags": [ + "App Installation" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Details about an app installation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Installation" + } + } + } + }, + "404": { + "description": "Installation not found." + } + } + }, + "post": { + "summary": "install", + "description": "Upsert app installation by its ID.", + "operationId": "install", + "tags": [ + "App Installation" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/InstallRequest" + }, + "responses": { + "201": { + "description": "App successfully installed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Installation" + } + } + } + }, + "404": { + "description": "App not found." + } + } + }, + "patch": { + "summary": "patchInstallation", + "description": "Patch an installed app by its ID.", + "operationId": "patchInstallation", + "tags": [ + "App Installation" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/InstallRequest" + }, + "responses": { + "204": { + "description": "App installation patched successfully." + }, + "404": { + "description": "App not found." + } + } + }, + "delete": { + "summary": "uninstall", + "description": "Uninstall an app by its ID.", + "operationId": "uninstall", + "tags": [ + "App Installation" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "App deleted successfully." + }, + "404": { + "description": "App not found." + } + } + } + }, + "/v1/app/{appId}/promote-to/{version}": { + "post": { + "summary": "promoteVersion", + "description": "Update an installed app to a new version", + "operationId": "promoteVersion", + "tags": [ + "App Installation" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "App successfully promoted to new version", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Installation" + } + } + } + }, + "400": { + "description": "Invalid version or version not available" + }, + "404": { + "description": "App installation not found" + } + } + } + }, + "/v1/app-events": { + "post": { + "summary": "ingestEvent", + "operationId": "ingestEvent", + "description": "Internal endpoint for services to submit app events for analytic purposes", + "tags": [ + "App Analytics" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/AppEventData" + }, + { + "$ref": "#/components/schemas/BatchEventRequest" + } + ] + } + } + } + }, + "responses": { + "202": { + "description": "Events accepted for processing" + }, + "400": { + "description": "Invalid event format" + } + } + } + } + }, + "components": { + "requestBodies": { + "CreateReviewRequest": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "technical_contact", + "marketing_contact" + ], + "properties": { + "technical_contact": { + "type": "string", + "description": "Email of the technical contact" + }, + "marketing_contact": { + "type": "string", + "description": "Email of the marketing contact" + }, + "demo_url": { + "type": "string", + "description": "URL to a demo of the app" + } + } + } + } + } + }, + "CreateLogoPresignedRequest": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "filename", + "mime_type" + ], + "properties": { + "filename": { + "type": "string", + "description": "Original filename of the logo", + "example": "company-logo.png" + }, + "mime_type": { + "type": "string", + "description": "MIME type of the logo file", + "enum": [ + "image/png", + "image/jpeg", + "image/jpg" + ], + "example": "image/png" + } + } + } + } + } + }, + "CreateBundlePresignedRequest": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string", + "description": "Version of the app" + }, + "component_id": { + "type": "string", + "description": "ID of the journey block component" + } + } + } + } + } + }, + "PatchConfigMetadataRequest": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the app" + }, + "description": { + "$ref": "#/components/schemas/TranslatedString" + }, + "category": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "notifications": { + "$ref": "#/components/schemas/NotificationConfig" + }, + "pricing": { + "$ref": "#/components/schemas/Pricing" + }, + "logo_url_key": { + "type": "string", + "description": "S3 key of the logo file" + }, + "support_email": { + "type": "string", + "description": "Email address for support requests" + }, + "dev_mode": { + "type": "boolean", + "description": "Flag to indicate if the app is in dev mode. If true, the app takes the override properties of components into account." + } + } + } + } + } + }, + "PatchVersionRequest": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "manifest_id": { + "type": "string", + "description": "ID of the manifest to use for this version" + }, + "role_id": { + "nullable": true, + "type": "string", + "description": "Name of the role" + }, + "grants": { + "$ref": "#/components/schemas/Grants" + } + } + } + } + } + }, + "UpsertComponentRequest": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseComponent" + } + } + } + }, + "CreateConfigRequest": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name", + "description" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the app" + }, + "description": { + "$ref": "#/components/schemas/TranslatedString" + }, + "category": { + "type": "string" + }, + "logo_url_key": { + "type": "string", + "description": "S3 key of the logo file" + } + } + } + } + } + }, + "InstallRequest": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Version of the app to update to" + }, + "option_values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptionsRef" + }, + "description": "Configuration values for the app components" + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the entity", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } + } + } + } + } + } + }, + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotOrg": { + "description": "Overrides the target organization to allow shared tenantaccess", + "name": "x-epilot-org-id", + "in": "header", + "type": "apiKey" + } + }, + "schemas": { + "Role": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Name of the role" + }, + "grants": { + "$ref": "#/components/schemas/Grants" + } + } + }, + "Options": { + "type": "object", + "description": "Options for the component configuration", + "required": [ + "key", + "type" + ], + "properties": { + "key": { + "type": "string", + "description": "Unique identifier for this configuration option" + }, + "label": { + "type": "string", + "description": "Human-readable label for the configuration option" + }, + "required": { + "type": "boolean", + "description": "Flag to indicate if this option is required" + }, + "description": { + "type": "string", + "description": "Detailed description of what this configuration option does" + }, + "value": { + "type": [ + "string", + "boolean", + "number" + ], + "description": "The configured value for this option. Is only present when the component is installed." + }, + "type": { + "type": "string", + "enum": [ + "text", + "number", + "boolean", + "secret" + ] + } + } + }, + "Option": { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "Key matching a config_option from the component" + }, + "value": { + "type": [ + "string", + "boolean", + "number" + ], + "description": "The configured value for this option" + } + } + }, + "OptionsRef": { + "type": "object", + "required": [ + "component_id", + "options" + ], + "properties": { + "component_id": { + "type": "string", + "description": "ID of the component these values are for" + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Option" + } + } + } + }, + "S3Reference": { + "type": "object", + "properties": { + "bucket": { + "type": "string", + "description": "The name of the S3 bucket where the JSON file for import is stored.", + "example": "my-bucket" + }, + "key": { + "type": "string", + "description": "The key or path to the JSON file within the S3 bucket.", + "example": "manifest.json" + } + }, + "required": [ + "bucket", + "key" + ] + }, + "ComponentType": { + "type": "string", + "enum": [ + "CUSTOM_JOURNEY_BLOCK", + "CUSTOM_PORTAL_BLOCK", + "PORTAL_EXTENSION", + "CUSTOM_FLOW_ACTION", + "ERP_INFORM_TOOLKIT", + "CUSTOM_CAPABILITY", + "EXTERNAL_PRODUCT_CATALOG", + "CUSTOM_PAGE" + ], + "description": "Type of app component" + }, + "Author": { + "type": "object", + "required": [ + "company" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the author", + "maxLength": 50 + }, + "company": { + "type": "string", + "description": "Company of the author", + "maxLength": 30 + }, + "email": { + "type": "string", + "description": "Email of the author", + "maxLength": 30 + } + } + }, + "NotificationConfig": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "description": "Email address to receive notifications", + "example": "developer@example.com" + }, + "events": { + "type": "array", + "description": "List of events to subscribe to", + "items": { + "$ref": "#/components/schemas/NotificationEvent" + }, + "minItems": 0 + } + } + }, + "NotificationEvent": { + "type": "string", + "enum": [ + "app.installed", + "app.uninstalled" + ] + }, + "BaseComponentCommon": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the component" + }, + "name": { + "allOf": [ + { + "description": "Name of the component" + }, + { + "$ref": "#/components/schemas/TranslatedString" + } + ] + }, + "description": { + "allOf": [ + { + "description": "Description of the component" + }, + { + "$ref": "#/components/schemas/TranslatedString" + } + ] + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Options" + }, + "description": "List of options for the app component" + }, + "surfaces": { + "type": "object" + } + } + }, + "BaseComponent": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseComponentCommon" + }, + { + "type": "object", + "discriminator": { + "propertyName": "component_type", + "mapping": { + "CUSTOM_JOURNEY_BLOCK": "#/components/schemas/JourneyBlockComponent", + "CUSTOM_PORTAL_BLOCK": "#/components/schemas/PortalBlockComponent", + "PORTAL_EXTENSION": "#/components/schemas/PortalExtensionComponent", + "CUSTOM_FLOW_ACTION": "#/components/schemas/CustomFlowActionComponent", + "ERP_INFORM_TOOLKIT": "#/components/schemas/ErpInformToolkitComponent", + "CUSTOM_CAPABILITY": "#/components/schemas/CustomCapabilityComponent", + "EXTERNAL_PRODUCT_CATALOG": "#/components/schemas/ExternalProductCatalogComponent", + "CUSTOM_PAGE": "#/components/schemas/CustomPageComponent" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/JourneyBlockComponent" + }, + { + "$ref": "#/components/schemas/PortalBlockComponent" + }, + { + "$ref": "#/components/schemas/PortalExtensionComponent" + }, + { + "$ref": "#/components/schemas/CustomFlowActionComponent" + }, + { + "$ref": "#/components/schemas/ErpInformToolkitComponent" + }, + { + "$ref": "#/components/schemas/CustomCapabilityComponent" + }, + { + "$ref": "#/components/schemas/ExternalProductCatalogComponent" + }, + { + "$ref": "#/components/schemas/CustomPageComponent" + } + ] + } + ] + }, + "CustomCapabilityComponent": { + "type": "object", + "required": [ + "component_type", + "configuration" + ], + "properties": { + "component_type": { + "type": "string", + "enum": [ + "CUSTOM_CAPABILITY" + ] + }, + "configuration": { + "type": "object", + "properties": { + "type": { + "description": "Define what type of capability this is", + "type": "string", + "enum": [ + "tab", + "group" + ] + }, + "allowed_schemas": { + "description": "Which schemas are supported by the capability. If empty, all schemas are supported.", + "type": "array", + "items": { + "type": "string", + "description": "Name of the schema", + "example": "opportunity" + } + } + } + }, + "surfaces": { + "type": "object", + "properties": { + "capability_config": { + "$ref": "#/components/schemas/AppBridgeSurfaceConfig" + } + } + } + } + }, + "CustomPageComponent": { + "type": "object", + "required": [ + "component_type", + "configuration" + ], + "properties": { + "component_type": { + "type": "string", + "enum": [ + "CUSTOM_PAGE" + ] + }, + "configuration": { + "$ref": "#/components/schemas/CustomPageConfig" + }, + "surfaces": { + "type": "object", + "properties": { + "page": { + "$ref": "#/components/schemas/AppBridgeSurfaceConfig" + } + } + } + } + }, + "CustomPageConfig": { + "type": "object", + "required": [ + "slug" + ], + "properties": { + "slug": { + "type": "string", + "description": "URL slug for the page route. Must be unique per organization.", + "pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$", + "example": "zapier" + }, + "nav_label": { + "type": "string", + "description": "Display label in the navigation sidebar.", + "example": "Zapier" + }, + "nav_icon": { + "type": "string", + "description": "Icon identifier for the navigation item.", + "example": "zap" + }, + "nav_description": { + "type": "string", + "description": "Optional tooltip or description for the navigation item." + } + } + }, + "JourneyBlockComponent": { + "type": "object", + "required": [ + "component_type", + "configuration" + ], + "properties": { + "component_type": { + "type": "string", + "enum": [ + "CUSTOM_JOURNEY_BLOCK" + ] + }, + "configuration": { + "$ref": "#/components/schemas/JourneyBlockConfig" + } + } + }, + "PortalBlockComponent": { + "type": "object", + "required": [ + "component_type", + "configuration" + ], + "properties": { + "component_type": { + "type": "string", + "enum": [ + "CUSTOM_PORTAL_BLOCK" + ] + }, + "configuration": { + "$ref": "#/components/schemas/PortalBlockConfig" + }, + "surfaces": { + "type": "object", + "properties": { + "portal_block": { + "$ref": "#/components/schemas/PortalBlockSurfaceConfig" + } + } + } + } + }, + "ErpInformToolkitComponent": { + "type": "object", + "required": [ + "component_type", + "configuration" + ], + "properties": { + "component_type": { + "type": "string", + "enum": [ + "ERP_INFORM_TOOLKIT" + ] + }, + "configuration": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "inbound", + "outbound" + ] + } + } + } + } + }, + "CustomFlowActionComponent": { + "type": "object", + "required": [ + "component_type", + "configuration" + ], + "properties": { + "component_type": { + "type": "string", + "enum": [ + "CUSTOM_FLOW_ACTION" + ] + }, + "configuration": { + "$ref": "#/components/schemas/CustomFlowConfig" + }, + "surfaces": { + "type": "object", + "properties": { + "flow_action_config": { + "$ref": "#/components/schemas/AppBridgeSurfaceConfig" + } + } + } + } + }, + "BaseCustomActionConfig": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the custom action" + }, + "description": { + "type": "string", + "description": "Description of the custom action" + }, + "wait_for_callback": { + "type": "boolean", + "description": "Wait for callback_url to be called before completing the action" + } + } + }, + "ExternalIntegrationCustomActionConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseCustomActionConfig" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "external_integration" + ] + }, + "external_integration_settings": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to call" + }, + "headers": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "required": [ + "type" + ] + } + ] + }, + "SandboxCustomActionConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseCustomActionConfig" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "sandbox" + ] + }, + "sandbox_settings": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "JavaScript code to execute for the sandbox action. Maximum size: 300KB (hard limit). Code is stored as raw JavaScript and will be syntax-validated on save. Security restrictions: eval() and Function() constructor are not allowed.\n", + "maxLength": 307200 + } + } + } + }, + "required": [ + "type" + ] + } + ] + }, + "CustomFlowConfig": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/ExternalIntegrationCustomActionConfig" + }, + { + "$ref": "#/components/schemas/SandboxCustomActionConfig" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "external_integration": "#/components/schemas/ExternalIntegrationCustomActionConfig", + "sandbox": "#/components/schemas/SandboxCustomActionConfig" + } + } + }, + "ExternalProductCatalogComponent": { + "type": "object", + "required": [ + "component_type", + "configuration" + ], + "properties": { + "component_type": { + "type": "string", + "enum": [ + "EXTERNAL_PRODUCT_CATALOG" + ] + }, + "configuration": { + "$ref": "#/components/schemas/ExternalProductCatalogConfig" + } + } + }, + "ExternalProductCatalogConfig": { + "type": "object", + "properties": { + "hooks": { + "type": "array", + "items": { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "products": "#/components/schemas/ExternalProductCatalogHookProducts", + "product-recommendations": "#/components/schemas/ExternalProductCatalogHookProductRecommendations" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/ExternalProductCatalogHookProducts" + }, + { + "$ref": "#/components/schemas/ExternalProductCatalogHookProductRecommendations" + } + ] + } + } + }, + "additionalProperties": false + }, + "ExternalProductCatalogHookProducts": { + "description": "Hook for getting products from an external catalog. This hook makes a call to retrieve product data from an external source. Check the docs or the response API call contract https://docs.api.epilot.io/pricing-api-external-catalog for more details.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Identifier of the hook. Should not change between updates." + }, + "name": { + "$ref": "#/components/schemas/TranslatedString" + }, + "type": { + "type": "string", + "enum": [ + "products" + ] + }, + "auth": { + "$ref": "#/components/schemas/ExternalProductCatalogAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for the call", + "default": "GET" + }, + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "JSON body to use for the call. Supports variable interpolation. If empty / not provided, the default request context will be used based on the consumer (e.g. Journey).", + "additionalProperties": true + } + }, + "required": [ + "url" + ], + "additionalProperties": false + } + }, + "required": [ + "type", + "call", + "id" + ], + "additionalProperties": false + }, + "ExternalProductCatalogHookProductRecommendations": { + "description": "Hook for getting product recommendations from an external catalog. This hook makes a call to retrieve product recommendations from an external source. Check the docs or the response API call contract https://docs.api.epilot.io/pricing-api-external-catalog for more details.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Identifier of the hook. Should not change between updates." + }, + "name": { + "$ref": "#/components/schemas/TranslatedString" + }, + "type": { + "type": "string", + "enum": [ + "product-recommendations" + ] + }, + "auth": { + "$ref": "#/components/schemas/ExternalProductCatalogAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for the call", + "default": "GET" + }, + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "JSON body to use for the call. Supports variable interpolation. If empty / not provided, the default request context will be used based on the consumer (e.g. Journey).", + "additionalProperties": true + } + }, + "required": [ + "url" + ], + "additionalProperties": false + } + }, + "required": [ + "type", + "call", + "id" + ], + "additionalProperties": false + }, + "PortalExtensionComponent": { + "type": "object", + "required": [ + "component_type", + "configuration" + ], + "properties": { + "component_type": { + "type": "string", + "enum": [ + "PORTAL_EXTENSION" + ] + }, + "configuration": { + "$ref": "#/components/schemas/PortalExtensionConfig" + } + } + }, + "PortalExtensionConfig": { + "type": "object", + "properties": { + "hooks": { + "type": "array", + "items": { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "registrationIdentifiersCheck": "#/components/schemas/PortalExtensionHookRegistrationIdentifiersCheck", + "contractIdentification": "#/components/schemas/PortalExtensionHookContractIdentification", + "priceDataRetrieval": "#/components/schemas/PortalExtensionHookPriceDataRetrieval", + "consumptionDataRetrieval": "#/components/schemas/PortalExtensionHookConsumptionDataRetrieval", + "costDataRetrieval": "#/components/schemas/PortalExtensionHookCostDataRetrieval", + "meterReadingPlausibilityCheck": "#/components/schemas/PortalExtensionHookMeterReadingPlausibilityCheck" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/PortalExtensionHookRegistrationIdentifiersCheck" + }, + { + "$ref": "#/components/schemas/PortalExtensionHookContractIdentification" + }, + { + "$ref": "#/components/schemas/PortalExtensionHookPriceDataRetrieval" + }, + { + "$ref": "#/components/schemas/PortalExtensionHookConsumptionDataRetrieval" + }, + { + "$ref": "#/components/schemas/PortalExtensionHookCostDataRetrieval" + }, + { + "$ref": "#/components/schemas/PortalExtensionHookMeterReadingPlausibilityCheck" + } + ] + } + }, + "links": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/PortalExtensionSeamlessLink" + } + ] + } + } + }, + "additionalProperties": false + }, + "PortalExtensionHookRegistrationIdentifiersCheck": { + "description": "Hook that replaces the built-in registration identifiers check. This hook makes a POST call whenever a user is trying to register to find the corresponding contact. The expected response to the call is:\n - 200 with contact id if exactly one contact is found\n - 404 if no contact is found or more than contact is found\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Identifier of the hook. Should not change between updates." + }, + "name": { + "$ref": "#/components/schemas/TranslatedString" + }, + "type": { + "type": "string", + "enum": [ + "registrationIdentifiersCheck" + ] + }, + "auth": { + "$ref": "#/components/schemas/PortalExtensionAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for the call", + "default": "POST" + }, + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "Optional JSON body to use for the call. Defaults to object with all configured identifiers grouped by entity, e.g. `{\"contract\": {\"contract_name\": \"Name\"}}`. Supports variable interpolation." + }, + "result": { + "type": "string", + "description": "Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. If no result is passed and the request suceeds, we attempt to resolve the Contact ID automatically. Supports variable interpolation." + } + }, + "required": [ + "url", + "headers", + "result" + ], + "additionalProperties": false + }, + "use_static_ips": { + "type": "boolean", + "description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.", + "default": false + } + }, + "required": [ + "id", + "type", + "call" + ], + "additionalProperties": false + }, + "PortalExtensionHookContractIdentification": { + "description": "Hook that replaces the built-in Contract identification for self-assignment. This hook involves an HTTP request whenever a user is trying to self-assign Contract(s).\nThe expected response http status code to the call is:\n - 200 if found\n - 404 if not found\n\nThe following assignment modes are supported:\n - `contracts`: We expect the response to contain Contract ids (customizable using `result` property).\n - `contact_to_contracts`: We expect the response to contain a Contact id (customizable using `result` property) and we will assign the Contact as a Customer to the Contracts and (optionally) update the Contact attribute specified by `contact_relation_attribute` to add the matched Contact.\n - `contact_to_portal_user`: We expect the response to contain a Contact id (customizable using `result` property) and we will assign the Contact to the Portal User. Portal User will be able to see all data including Contracts transitively.\n\nDefaults to `contact_to_contracts` for backwards compatibility. We recommend using `contact_to_portal_user` as it does not influence the data model of business entities.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Identifier of the hook. Should not change between updates." + }, + "name": { + "$ref": "#/components/schemas/TranslatedString" + }, + "type": { + "type": "string", + "enum": [ + "contractIdentification" + ] + }, + "auth": { + "$ref": "#/components/schemas/PortalExtensionAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for the call", + "default": "POST" + }, + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "Optional JSON body to use for the call. Defaults to object with all configured identifiers grouped by entity, e.g. `{\"contract\": {\"contract_name\": \"Name\"}}`. Supports variable interpolation." + }, + "result": { + "type": "string", + "description": "Contract or Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. If no result is passed and the request suceeds, we attempt to resolve the Contact ID automatically. Supports variable interpolation." + } + }, + "required": [ + "url", + "headers" + ], + "additionalProperties": false + }, + "assignment_mode": { + "type": "string", + "enum": [ + "contracts", + "contact_to_contracts", + "contact_to_portal_user" + ], + "description": "Mode of contract assignment. See hook description for mode details.", + "default": "contact_to_contracts" + }, + "contact_relation_attribute": { + "type": "string", + "description": "Name of the Contact attribute to update with the matched Contact ID when using `contact_to_contracts` mode. Must be a Contact relation attribute supporting multiple entities.", + "example": "represents_contact" + }, + "explanation": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "Explanation of the functionality shown to the end user.", + "example": "This process will give you access to the matching Contracts." + } + }, + "additionalProperties": { + "type": "string", + "description": "Explanation of the functionality in language denoted by ISO 3166-1 alpha-2 code." + }, + "required": [ + "en" + ], + "description": "Explanation of the hook." + }, + "use_static_ips": { + "type": "boolean", + "description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.", + "default": false + } + }, + "required": [ + "id", + "type", + "call" + ], + "additionalProperties": false + }, + "PortalExtensionHookMeterReadingPlausibilityCheck": { + "description": "Hook that checks the plausibility of meter readings before they are saved. This hook makes a POST call whenever a user is trying to save a meter reading. The expected response to the call is:\n - 200:\n If meter reading is plausible, the response should contain:\n - valid: true\n If meter reading is not plausible, the response should contain:\n - valid: false\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Identifier of the hook. Should not change between updates." + }, + "name": { + "$ref": "#/components/schemas/TranslatedString" + }, + "type": { + "type": "string", + "enum": [ + "meterReadingPlausibilityCheck" + ] + }, + "plausibility_mode": { + "type": "string", + "enum": [ + "check", + "range" + ], + "default": "check", + "description": "Mode for plausibility check:\n- \"check\": Validates meter reading and returns valid: boolean (used during submission)\n- \"range\": Returns min/max allowed values for each counter for validation before submission\n" + }, + "auth": { + "$ref": "#/components/schemas/PortalExtensionAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "body": { + "type": "object", + "description": "JSON body to use for the call. Supports variable interpolation.", + "additionalProperties": true + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + } + }, + "required": [ + "url", + "headers", + "body" + ], + "additionalProperties": false + }, + "resolved": { + "type": "object", + "description": "Response to the call", + "properties": { + "dataPath": { + "type": "string", + "description": "Optional path to an array in the response. If specified and the path points to an array,\nthe hook will map over each item using 'Item' variable for interpolation.\nRelevant only if plausibility_mode is \"range\".\n", + "example": "data.results" + }, + "counter_identifiers": { + "description": "Counter identifier(s) used to match against the meter's counters.\nCan be a string (counter ID) or an object with counter properties.\nThe backend resolves this to meter_counter_id in the final response.\nRelevant only if plausibility_mode is \"range\".\n", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "obis_code": "{{Item.obis}}" + } + }, + "valid": { + "type": "string", + "description": "Indicate whether the meter reading is plausible. Relevant only if plausibility_mode is \"check\".", + "example": "{{CallResponse.data.valid}}" + }, + "upper_limit": { + "type": "string", + "description": "Upper allowed limit of the meter reading", + "example": "{{CallResponse.data.upper_limit}}" + }, + "lower_limit": { + "type": "string", + "description": "Lower allowed limit of the meter reading", + "example": "{{CallResponse.data.lower_limit}}" + } + }, + "additionalProperties": false + }, + "use_static_ips": { + "type": "boolean", + "description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.", + "default": false + } + }, + "required": [ + "id", + "type", + "call", + "resolved" + ], + "additionalProperties": false + }, + "PortalExtensionHookPriceDataRetrieval": { + "description": "Hook that will allow using the specified source as data for price visualizations. This hook is triggered to fetch the data. Format of the request and response has to follow the following specification: TBD. The expected response to the call is:\n - 200 with the time series data\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Identifier of the hook. Should not change between updates." + }, + "name": { + "$ref": "#/components/schemas/TranslatedString" + }, + "type": { + "type": "string", + "enum": [ + "priceDataRetrieval" + ] + }, + "intervals": { + "type": "array", + "description": "Intervals supported by the API. If omitted, it is assumed that all intervals are supported.", + "items": { + "type": "string", + "enum": [ + "PT15M", + "PT1H", + "P1D", + "P1M" + ] + } + }, + "auth": { + "$ref": "#/components/schemas/PortalExtensionAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for the call", + "default": "GET" + }, + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.", + "additionalProperties": true + } + }, + "required": [ + "url" + ], + "additionalProperties": false + }, + "resolved": { + "type": "object", + "properties": { + "dataPath": { + "type": "string", + "description": "Optional path to the data (array) in the response. If omitted, the data is assumed to be on the top level." + } + }, + "additionalProperties": false + }, + "use_static_ips": { + "type": "boolean", + "description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.", + "default": false + } + }, + "required": [ + "id", + "type", + "call" + ], + "additionalProperties": false + }, + "PortalExtensionHookConsumptionDataRetrieval": { + "description": "Hook that will allow using the specified source as data for consumption visualizations. This hook is triggered to fetch the data. Format of the request and response has to follow the following specification: TBD. The expected response to the call is:\n - 200 with the time series data\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Identifier of the hook. Should not change between updates." + }, + "name": { + "$ref": "#/components/schemas/TranslatedString" + }, + "type": { + "type": "string", + "enum": [ + "consumptionDataRetrieval" + ] + }, + "intervals": { + "type": "array", + "description": "Intervals supported by the API. If omitted, it is assumed that all intervals are supported.", + "items": { + "type": "string", + "enum": [ + "PT15M", + "PT1H", + "P1D", + "P1M" + ] + } + }, + "auth": { + "$ref": "#/components/schemas/PortalExtensionAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for the call", + "default": "GET" + }, + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.", + "additionalProperties": true + } + }, + "required": [ + "url" + ], + "additionalProperties": false + }, + "resolved": { + "type": "object", + "properties": { + "dataPath": { + "type": "string", + "description": "Optional path to the data (array) in the response. If omitted, the data is assumed to be on the top level." + } + }, + "additionalProperties": false + }, + "use_static_ips": { + "type": "boolean", + "description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.", + "default": false + } + }, + "required": [ + "id", + "type", + "call" + ], + "additionalProperties": false + }, + "PortalExtensionHookCostDataRetrieval": { + "description": "Hook that will allow using the specified source as data for consumption visualizations. This hook is triggered to fetch the data. Format of the request and response has to follow the following specification: TBD. The expected response to the call is:\n - 200 with the time series data\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Identifier of the hook. Should not change between updates." + }, + "name": { + "$ref": "#/components/schemas/TranslatedString" + }, + "type": { + "type": "string", + "enum": [ + "costDataRetrieval" + ] + }, + "intervals": { + "type": "array", + "description": "Intervals supported by the API. If omitted, it is assumed that all intervals are supported.", + "items": { + "type": "string", + "enum": [ + "PT15M", + "PT1H", + "P1D", + "P1M" + ] + } + }, + "auth": { + "$ref": "#/components/schemas/PortalExtensionAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for the call", + "default": "GET" + }, + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.", + "additionalProperties": true + } + }, + "required": [ + "url" + ], + "additionalProperties": false + }, + "resolved": { + "type": "object", + "properties": { + "dataPath": { + "type": "string", + "description": "Optional path to the data (array) in the response. If omitted, the data is assumed to be on the top level." + } + }, + "additionalProperties": false + }, + "use_static_ips": { + "type": "boolean", + "description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.", + "default": false + } + }, + "required": [ + "id", + "type", + "call" + ], + "additionalProperties": false + }, + "PortalExtensionSeamlessLink": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Identifier of the link. Should not change between updates." + }, + "name": { + "$ref": "#/components/schemas/TranslatedString" + }, + "description": { + "$ref": "#/components/schemas/TranslatedString" + }, + "type": { + "type": "string", + "enum": [ + "seamless" + ] + }, + "condition": { + "type": "string", + "description": "Controls whether the link should be shown. Supports variable interpolation.", + "example": "{{Contact.customer_number | is_not_empty}}" + }, + "auth": { + "$ref": "#/components/schemas/PortalExtensionAuthBlock" + }, + "redirect": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to redirect to. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + } + }, + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "type", + "redirect" + ], + "additionalProperties": false + }, + "PortalExtensionAuthBlock": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for authentication", + "default": "GET" + }, + "url": { + "type": "string", + "description": "URL to use for authentication. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use for authentication. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "JSON body to use for authentication. Supports variable interpolation. Content format is determined by Content-Type header.", + "additionalProperties": true + }, + "cache": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Key to use to identify the auth response. Supports interpolation.", + "example": "{{Options.api_key}}" + }, + "ttl": { + "type": "string", + "description": "Time to live in seconds for the cache. Supports interpolation.", + "example": "{{AuthResponse.data.expires_in}}" + } + }, + "required": [ + "key", + "ttl" + ], + "additionalProperties": false + } + }, + "required": [ + "url" + ], + "additionalProperties": false + }, + "ExternalProductCatalogAuthBlock": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for authentication", + "default": "GET" + }, + "url": { + "type": "string", + "description": "URL to use for authentication. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use for authentication. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "JSON body to use for authentication. Supports variable interpolation. Content format is determined by Content-Type header.", + "additionalProperties": true + } + }, + "required": [ + "url" + ], + "additionalProperties": false + }, + "OverrideDevMode": { + "type": "object", + "description": "Override URL when app is in dev mode", + "properties": { + "override_url": { + "type": "string", + "description": "URL of the web component object in dev mode", + "example": "http://localhost:3000" + } + } + }, + "JourneyBlockConfig": { + "type": "object", + "required": [ + "component_url", + "component_tag" + ], + "properties": { + "override_dev_mode": { + "$ref": "#/components/schemas/OverrideDevMode" + }, + "component_url": { + "type": "string", + "description": "URL of the web component object", + "example": "https://cdn.apps.com/123/v1.0.0/bundle.js", + "readOnly": true + }, + "component_tag": { + "type": "string", + "description": "Custom element tag for the component" + }, + "component_args": { + "type": "array", + "description": "Arguments to pass to the component", + "items": { + "$ref": "#/components/schemas/JourneyBlockComponentArgs" + } + }, + "component_size": { + "type": "number", + "description": "Size of the bundle in bytes", + "readOnly": true + }, + "component_mapping": { + "description": "Define data which is mapped to entity mapping ui blocks", + "type": "object", + "additionalProperties": { + "type": "string", + "enum": [ + "string", + "boolean", + "date", + "datetime", + "link", + "number" + ] + } + } + } + }, + "PortalBlockConfig": { + "type": "object" + }, + "AppBridgeSurfaceConfig": { + "type": "object", + "properties": { + "app_url": { + "type": "string", + "description": "URL of the uploaded App Bridge App. This is the entrypoint for the app" + }, + "zip_url": { + "type": "string", + "description": "URL of the uploaded zip file containing the app" + }, + "override_url": { + "type": "string", + "description": "URL of the app in dev mode" + } + } + }, + "PortalBlockSurfaceConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/AppBridgeSurfaceConfig" + }, + { + "type": "object", + "properties": { + "section": { + "description": "Define which section of the portal this block can be placed in", + "type": "string", + "enum": [ + "main", + "footer" + ] + } + } + } + ] + }, + "JourneyBlockComponentArgs": { + "allOf": [ + { + "type": "object", + "required": [ + "key", + "label", + "type" + ], + "properties": { + "key": { + "type": "string", + "description": "Unique identifier for this component arg" + }, + "type": { + "type": "string", + "enum": [ + "text", + "boolean", + "enum" + ] + }, + "required": { + "type": "boolean", + "description": "Flag to indicate if this option is required", + "default": false + }, + "description": { + "allOf": [ + { + "description": "Description of what this component arg does" + }, + { + "$ref": "#/components/schemas/TranslatedString" + } + ] + }, + "label": { + "allOf": [ + { + "description": "Human-readable label for the component arg" + }, + { + "$ref": "#/components/schemas/TranslatedString" + } + ] + } + } + }, + { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "text": "#/components/schemas/TextArg", + "boolean": "#/components/schemas/BooleanArg", + "enum": "#/components/schemas/EnumArg" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/TextArg" + }, + { + "$ref": "#/components/schemas/BooleanArg" + }, + { + "$ref": "#/components/schemas/EnumArg" + } + ] + } + ] + }, + "TextArg": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ] + } + } + }, + "BooleanArg": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean" + ] + } + } + }, + "EnumArg": { + "type": "object", + "required": [ + "options" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "enum" + ] + }, + "isMulti": { + "type": "boolean", + "description": "If true, allows selection of multiple values", + "default": false + }, + "options": { + "type": "array", + "description": "List of options for enum type", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "id", + "label" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the option" + }, + "label": { + "allOf": [ + { + "description": "Display label for the option" + }, + { + "$ref": "#/components/schemas/TranslatedString" + } + ] + } + } + } + } + } + }, + "BillingFrequency": { + "type": "string", + "enum": [ + "MONTHLY", + "QUARTERLY", + "YEARLY", + "CUSTOM" + ], + "description": "How often the subscription is billed" + }, + "Pricing": { + "type": "object", + "properties": { + "pricing_type": { + "type": "string", + "enum": [ + "FREE", + "SUBSCRIPTION", + "USAGE_BASED", + "ONE_TIME", + "CUSTOM", + "UNKNOWN" + ] + }, + "billing_frequency": { + "$ref": "#/components/schemas/BillingFrequency" + } + } + }, + "Audit": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "description": "Timestamp of the creation", + "readOnly": true + }, + "created_by": { + "type": "string", + "description": "User ID of the creator", + "readOnly": true + }, + "updated_at": { + "type": "string", + "description": "Timestamp of the last update", + "readOnly": true + }, + "updated_by": { + "type": "string", + "description": "User ID of the last updater", + "readOnly": true + } + } + }, + "Review": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Version of the app that is under review", + "readOnly": true + }, + "review_status": { + "type": "string", + "enum": [ + "approved", + "rejected", + "pending" + ], + "description": "Status of the review" + }, + "requested_at": { + "type": "string", + "description": "Timestamp of the review", + "readOnly": true + }, + "requested_by": { + "type": "string", + "description": "User ID of the reviewer", + "readOnly": true + }, + "technical_contact": { + "type": "string", + "description": "Email of the technical contact" + }, + "marketing_contact": { + "type": "string", + "description": "Email of the marketing contact" + }, + "demo_url": { + "type": "string", + "description": "URL of the demo" + } + } + }, + "ConfigurationMetadata": { + "description": "Basic metadata about your app configuration which does not get versioned", + "type": "object", + "required": [ + "name", + "description", + "latest_version", + "owner_org_id", + "app_id", + "versions" + ], + "properties": { + "app_id": { + "type": "string", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Name of the app" + }, + "author": { + "$ref": "#/components/schemas/Author" + }, + "dev_mode": { + "type": "boolean", + "description": "Flag to indicate if the app is in dev mode. If true, the app takes the override_url property of components into account." + }, + "versions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of available versions of the app", + "readOnly": true + }, + "public_versions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of available public versions of the app", + "readOnly": true + }, + "support_email": { + "type": "string", + "description": "Email address for support requests" + }, + "latest_version": { + "type": "string", + "description": "Latest version of the app", + "readOnly": true + }, + "category": { + "type": "string", + "description": "Category of the app." + }, + "icon_url": { + "type": "string", + "description": "URL of the app icon." + }, + "documentation_url": { + "type": "string", + "description": "URL of the app documentation." + }, + "description": { + "allOf": [ + { + "description": "Markdown description of the app." + }, + { + "$ref": "#/components/schemas/TranslatedString" + } + ] + }, + "notifications": { + "allOf": [ + { + "description": "Configuration for developer notifications" + }, + { + "$ref": "#/components/schemas/NotificationConfig" + } + ] + }, + "owner_org_id": { + "type": "string", + "description": "Organization ID of the app owner, required for private apps or sandbox accounts", + "readOnly": true + }, + "internal": { + "type": "boolean", + "default": false, + "description": "Flag to indicate if the app is built by epilot.", + "readOnly": true + }, + "pricing": { + "allOf": [ + { + "description": "Pricing information for the app" + }, + { + "$ref": "#/components/schemas/Pricing" + } + ] + }, + "configuration_audit": { + "readOnly": true, + "allOf": [ + { + "description": "Audit information for the app" + }, + { + "$ref": "#/components/schemas/Audit" + } + ] + } + } + }, + "ConfigurationVersion": { + "description": "Configuration data about your app which is versionable", + "type": "object", + "required": [ + "version", + "components", + "app_id", + "version_audit", + "owner_org_id" + ], + "properties": { + "app_id": { + "type": "string", + "readOnly": true + }, + "owner_org_id": { + "type": "string", + "description": "Organization ID of the app owner", + "readOnly": true + }, + "components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseComponent" + }, + "minItems": 0 + }, + "visibility": { + "type": "string", + "enum": [ + "public", + "private" + ], + "description": "Visibility of the app version", + "default": "private", + "readOnly": true + }, + "public": { + "type": "boolean", + "default": false, + "deprecated": true, + "description": "Flag to indicate if the app is public.", + "readOnly": true + }, + "pending": { + "type": "boolean", + "default": false, + "description": "Flag to indicate if the app is pending for verification", + "readOnly": true + }, + "version": { + "type": "string", + "description": "Version of the app that is installed", + "readOnly": true, + "maxLength": 10 + }, + "is_beta": { + "type": "boolean", + "description": "Flag to indicate if the app is in beta.", + "readOnly": true + }, + "deprecated_at": { + "type": "string", + "description": "Timestamp when the app version is deprecated" + }, + "changelog": { + "type": "string", + "description": "Changelog for the app version", + "maxLength": 250 + }, + "review_status": { + "type": "string", + "enum": [ + "approved", + "rejected", + "pending" + ], + "description": "Status of the review process" + }, + "role": { + "$ref": "#/components/schemas/Role" + }, + "blueprint_ref": { + "$ref": "#/components/schemas/BlueprintRef" + }, + "version_audit": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/Audit" + }, + { + "type": "object", + "properties": { + "versioned_at": { + "type": "string", + "description": "Timestamp of the last version update", + "readOnly": true + }, + "versioned_by": { + "type": "string", + "description": "User ID of the user who last updated the app", + "readOnly": true + } + } + } + ] + } + } + }, + "Grants": { + "type": "array", + "description": "Required grants for the app in order to call APIs for the installing tenant", + "items": { + "type": "object", + "required": [ + "action" + ], + "properties": { + "action": { + "type": "string", + "description": "The action the app can perform" + }, + "resource": { + "type": "string", + "description": "The resource the app can access" + } + } + } + }, + "BlueprintRef": { + "type": "object", + "properties": { + "manifest_id": { + "type": "string", + "description": "ID of the blueprint" + }, + "job_id": { + "type": "string", + "description": "ID of the job that created the blueprint" + } + } + }, + "Installation": { + "description": "Information about the installed app. Has configuration data of the installed version", + "type": "object", + "required": [ + "app_id", + "installer_org_id", + "enabled", + "name", + "components", + "installed_version" + ], + "properties": { + "app_id": { + "type": "string", + "description": "ID of the app configuration", + "readOnly": true + }, + "installer_org_id": { + "type": "string", + "description": "Unique identifier for the organization the app is installed in", + "readOnly": true + }, + "owner_org_id": { + "type": "string", + "description": "Organization ID of the app creator", + "readOnly": true + }, + "enabled": { + "readOnly": true, + "type": "boolean", + "default": true, + "description": "Flag to indicate if the app is enabled. Enabled is set to true when required option values are set." + }, + "name": { + "type": "string", + "description": "Name of the app", + "readOnly": true + }, + "option_values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptionsRef" + }, + "description": "Configuration values for the app components" + }, + "components": { + "description": "List of component configurations for the installed version", + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseComponent" + }, + "minLength": 0, + "readOnly": true + }, + "installed_version": { + "type": "string", + "description": "Version of the app that is installed", + "readOnly": true + }, + "role": { + "type": "string", + "description": "The name of the role the app can use to access APIs" + }, + "blueprint_ref": { + "$ref": "#/components/schemas/BlueprintRef" + }, + "installation_audit": { + "readOnly": true, + "allOf": [ + { + "description": "Audit information for the app" + }, + { + "$ref": "#/components/schemas/Audit" + } + ] + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the entity", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } + } + }, + "PublicConfiguration": { + "description": "Public configuration of the published app", + "type": "object", + "required": [ + "version", + "components", + "owner_org_id", + "app_id", + "name" + ], + "properties": { + "app_id": { + "type": "string", + "description": "ID of the app configuration" + }, + "support_email": { + "type": "string", + "description": "Email address for support requests" + }, + "owner_org_id": { + "type": "string", + "description": "Organization ID of the app owner" + }, + "name": { + "type": "string", + "description": "Name of the app" + }, + "author": { + "$ref": "#/components/schemas/Author" + }, + "dev_mode": { + "type": "boolean", + "description": "Flag to indicate if the app is in dev mode." + }, + "category": { + "type": "string", + "description": "Category of the app." + }, + "icon_url": { + "type": "string", + "description": "URL of the app icon." + }, + "documentation_url": { + "type": "string", + "description": "URL of the app documentation." + }, + "description": { + "allOf": [ + { + "description": "Markdown description of the app." + }, + { + "$ref": "#/components/schemas/TranslatedString" + } + ] + }, + "pricing": { + "allOf": [ + { + "description": "Pricing information for the app" + }, + { + "$ref": "#/components/schemas/Pricing" + } + ] + }, + "components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseComponent" + }, + "minItems": 0 + }, + "is_beta": { + "type": "boolean", + "description": "Flag to indicate if the app is in beta.", + "readOnly": true + }, + "deprecated_at": { + "type": "string", + "description": "Timestamp when the app version is deprecated" + }, + "version": { + "type": "string", + "description": "Version of the app that is installed", + "readOnly": true + }, + "role": { + "$ref": "#/components/schemas/Role" + }, + "blueprint_ref": { + "$ref": "#/components/schemas/BlueprintRef" + }, + "latest_version": { + "type": "string", + "description": "Latest version of the app", + "readOnly": true + }, + "public": { + "type": "boolean", + "description": "Flag to indicate if the app is public.", + "readOnly": true + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConfigurationVersion" + }, + "description": "List of available versions of the app" + } + } + }, + "Configuration": { + "description": "Configuration of the published app", + "allOf": [ + { + "$ref": "#/components/schemas/ConfigurationMetadata" + }, + { + "$ref": "#/components/schemas/ConfigurationVersion" + } + ] + }, + "TranslatedString": { + "type": "object", + "required": [ + "de" + ], + "properties": { + "en": { + "type": "string", + "nullable": true, + "description": "English translation" + }, + "de": { + "type": "string", + "description": "German translation" + } + } + }, + "CallerIdentity": { + "type": "object", + "properties": { + "name": { + "description": "a human readable name of the caller (e.g. user name, token name or email address)", + "example": "manifest@epilot.cloud" + }, + "org_id": { + "description": "epilot organization id", + "type": "string", + "example": "911690" + }, + "user_id": { + "description": "epilot user id, when called by a user", + "type": "string", + "example": "11001045" + }, + "token_id": { + "description": "token id, when called by API token", + "type": "string", + "example": "api_5ZugdRXasLfWBypHi93Fk" + } + }, + "required": [ + "org_id" + ] + }, + "BatchEventRequest": { + "type": "object", + "required": [ + "events" + ], + "properties": { + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AppEventData" + }, + "maxItems": 100 + } + } + }, + "Actor": { + "type": "object", + "readOnly": true, + "required": [ + "type" + ], + "properties": { + "org_id": { + "type": "string", + "description": "Organization ID of the actor" + }, + "user_id": { + "type": "string", + "description": "User ID of the actor" + }, + "type": { + "type": "string", + "description": "Type of the actor (e.g., user, system)", + "enum": [ + "user", + "system" + ] + } + } + }, + "AppEventData": { + "type": "object", + "required": [ + "app_id", + "event_type", + "component_id", + "version", + "source", + "actor" + ], + "properties": { + "app_id": { + "type": "string", + "description": "ID of the app configuration" + }, + "version": { + "type": "string", + "description": "Version of the app configuration" + }, + "event_id": { + "type": "string", + "readOnly": true + }, + "component_id": { + "type": "string" + }, + "timestamp": { + "type": "string", + "readOnly": true + }, + "correlation_id": { + "type": "string" + }, + "event_type": { + "type": "string", + "enum": [ + "ERROR", + "WARNING", + "INFO" + ] + }, + "source": { + "$ref": "#/components/schemas/ComponentType" + }, + "actor": { + "$ref": "#/components/schemas/Actor" + }, + "details": { + "type": "object", + "description": "Details about the event", + "additionalProperties": true + } + } + }, + "EventsQuery": { + "type": "object", + "properties": { + "time_range": { + "type": "object", + "properties": { + "start": { + "type": "string", + "format": "date-time", + "description": "Start time (ISO 8601)" + }, + "end": { + "type": "string", + "format": "date-time", + "description": "End time (ISO 8601)" + }, + "preset": { + "type": "string", + "enum": [ + "1h", + "6h", + "24h", + "7d", + "30d" + ], + "description": "Predefined time range (alternative to start/end)" + } + }, + "description": "Either use preset OR start+end" + }, + "filters": { + "type": "object", + "properties": { + "source": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ComponentType" + }, + "description": "Filter by component types" + }, + "component_id": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by specific component IDs" + }, + "event_type": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ERROR", + "WARNING", + "INFO" + ] + }, + "description": "Filter by event types" + }, + "correlation_id": { + "type": "string", + "description": "Filter by correlation ID for tracing" + } + } + }, + "aggregation": { + "type": "object", + "properties": { + "group_by": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "source", + "component_id", + "event_type", + "hour", + "day" + ] + }, + "description": "Group results by specified fields" + }, + "metrics": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "count", + "error_rate", + "unique_users" + ] + }, + "default": [ + "count" + ], + "description": "Metrics to calculate" + } + } + }, + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "minimum": 1, + "default": 1 + }, + "page_size": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 100 + } + } + }, + "sort": { + "type": "object", + "properties": { + "field": { + "type": "string", + "enum": [ + "timestamp", + "event_type", + "component_id" + ], + "default": "timestamp" + }, + "order": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + } + } + } + } + }, + "EventsQueryResponse": { + "type": "object", + "properties": { + "query": { + "$ref": "#/components/schemas/EventsQuery" + }, + "results": { + "oneOf": [ + { + "$ref": "#/components/schemas/RawEvents" + }, + { + "$ref": "#/components/schemas/AggregatedEvents" + } + ] + }, + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "total_items": { + "type": "integer" + }, + "has_next": { + "type": "boolean" + } + } + } + } + }, + "RawEvents": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "raw" + ] + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AppEventData" + } + } + } + }, + "AggregatedEvents": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "aggregated" + ] + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "dimensions": { + "type": "object", + "description": "The grouped dimensions e.g., \"source\": \"CUSTOM_JOURNEY_BLOCK\", \"event_type\": \"ERROR\"", + "additionalProperties": true + }, + "metrics": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "error_rate": { + "type": "number" + } + } + } + } + } + } + } + } + } + } +} diff --git a/packages/cli/definitions/audit-logs.json b/packages/cli/definitions/audit-logs.json new file mode 100644 index 00000000..738869d2 --- /dev/null +++ b/packages/cli/definitions/audit-logs.json @@ -0,0 +1,305 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Audit Log", + "version": "1.0.0", + "description": "Service for managing and retrieving auditing logs in the scope of an organization\n" + }, + "servers": [ + { + "url": "https://audit-logs.sls.epilot.io" + }, + { + "url": "https://audit-logs.sls.epilot.io" + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "paths": { + "/v1/logs": { + "post": { + "operationId": "getLogs", + "summary": "getLogs", + "description": "Retrieve Audit Log events. Optionally, you can filter them by organization.", + "tags": [ + "Events" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchOptions" + } + } + } + }, + "responses": { + "200": { + "description": "Success - audit logs where loaded successfully. Empty array if org has no executions.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "logs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Event" + } + }, + "total": { + "type": "integer", + "description": "Total number of logs", + "example": 1 + } + } + } + } + } + } + } + } + }, + "/v1/logs/{logId}": { + "get": { + "operationId": "getLogById", + "summary": "getLogById", + "description": "Retrieve Audit Log events", + "tags": [ + "Audit Log" + ], + "parameters": [ + { + "in": "path", + "name": "logId", + "schema": { + "type": "string" + }, + "required": true, + "description": "ID of the log event", + "example": "2843c005-c5b0-4df2-94ee-1ca2ddd998ac" + } + ], + "responses": { + "200": { + "description": "Audit log was loaded successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "log": { + "$ref": "#/components/schemas/Event" + } + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "SearchOptions": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "description": "Maximum number of results to return", + "example": 50 + }, + "page": { + "type": "integer", + "description": "Page number to return", + "example": 0 + }, + "timestamp": { + "type": "object", + "description": "Timestamp of the event in ISO 8601 format", + "example": "2021-06-01T12:00:00Z", + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + } + } + }, + "service_name": { + "type": "string", + "description": "Name of the service that triggered the event", + "example": "workflows" + }, + "event_name": { + "type": "string", + "description": "Action that was performed (event name)", + "example": "deleteWorkflow" + }, + "outcome": { + "type": "string", + "description": "Outcome of the event i.e. success or failed events", + "enum": [ + "success", + "failure" + ] + }, + "method": { + "type": "string", + "description": "HTTP method", + "example": "POST" + }, + "user": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email of the user who initiated the event", + "example": "max.mustermann@mail.com" + }, + "user_id": { + "type": "string", + "description": "ID of the user who initiated the event", + "example": 123456 + } + } + } + } + }, + "HttpContext": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method", + "example": "GET" + }, + "ip": { + "type": "string", + "description": "IP address of the caller", + "example": null + }, + "headers": { + "type": "object", + "description": "HTTP headers", + "example": { + "Authorization": "Bearer token" + } + }, + "query": { + "type": "object", + "description": "Query parameters", + "example": { + "limit": 50, + "page": 0 + } + }, + "pathParams": { + "type": "object", + "description": "Path parameters", + "example": { + "eventId": "2843c005-c5b0-4df2-94ee-1ca2ddd998ac" + } + }, + "path": { + "type": "string", + "description": "Path of the request", + "example": "/v1/logs" + }, + "domainName": { + "type": "string", + "description": "Domain name of the request", + "example": "audit-logs.sls.epilot.io" + } + } + }, + "Caller": { + "type": "object", + "properties": { + "user_email": { + "type": "string", + "description": "Email of the user", + "example": "max.mustermann@mail.com" + }, + "user_id": { + "type": "string", + "description": "ID of the user", + "example": 123456 + }, + "trigger_type": { + "type": "string", + "enum": [ + "user", + "api", + "automation" + ] + } + } + }, + "Event": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the log event", + "example": "2843c005-c5b0-4df2-94ee-1ca2ddd998ac" + }, + "org_id": { + "type": "string", + "description": "ID of the organization", + "example": 123456 + }, + "service_name": { + "type": "string", + "description": "Name of the service", + "example": "workflows" + }, + "event_name": { + "type": "string", + "description": "Action that was performed", + "example": "deleteWorkflow" + }, + "status_code": { + "type": "integer", + "description": "HTTP status code", + "example": 200 + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the event", + "example": "2021-06-01T12:00:00Z" + }, + "caller": { + "$ref": "#/components/schemas/Caller" + }, + "http": { + "$ref": "#/components/schemas/HttpContext" + }, + "detail": { + "type": "string", + "description": "Contains the stringified request body", + "example": "{\"workflow_id\": \"123456\"}" + }, + "activity": { + "type": "string", + "description": "Description of the event", + "example": "Workflow with ID 123456 was deleted" + }, + "source_url": { + "type": "string", + "description": "URL of the ressource that was modified" + } + } + } + } + } +} diff --git a/packages/cli/definitions/automation.json b/packages/cli/definitions/automation.json new file mode 100644 index 00000000..bd161457 --- /dev/null +++ b/packages/cli/definitions/automation.json @@ -0,0 +1,4815 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Automation API", + "description": "API Backend for epilot Automation Workflows feature", + "version": "1.4.0" + }, + "tags": [ + { + "name": "flows", + "description": "Automation flows" + }, + { + "name": "executions", + "description": "Automation executions" + }, + { + "name": "bulk", + "description": "Bulk job for triggering automation executions" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v1/automation/flows": { + "get": { + "operationId": "searchFlows", + "summary": "searchFlows", + "description": "Search available automation flows", + "tags": [ + "flows" + ], + "parameters": [ + { + "name": "schema", + "in": "query", + "description": "Entity Schema", + "schema": { + "type": "string", + "example": "submission" + } + }, + { + "name": "size", + "in": "query", + "description": "Pagination: max number of results to return", + "schema": { + "type": "integer", + "default": 25 + } + }, + { + "name": "from", + "in": "query", + "description": "Pagination: starting for results", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "trigger_source_id", + "in": "query", + "description": "Trigger source identifier", + "schema": { + "type": "string", + "example": "600945fe-212e-4b97-acf7-391d64648384" + } + }, + { + "name": "include_flows", + "in": "query", + "description": "Include flow automations in the response", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "List of automation flows, including total count", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchAutomationsResp" + } + } + } + } + } + }, + "post": { + "operationId": "createFlow", + "summary": "createFlow", + "description": "Create new automation flow", + "tags": [ + "flows" + ], + "requestBody": { + "description": "Automation flow to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationFlow" + } + } + } + }, + "responses": { + "201": { + "description": "The created automation flow", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationFlow" + } + } + } + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + } + } + } + }, + "/v1/automation/flows:batchGet": { + "post": { + "operationId": "batchGetFlows", + "summary": "batchGetFlows", + "description": "Get multiple automation flows by their IDs", + "tags": [ + "flows" + ], + "requestBody": { + "description": "List of flow IDs to retrieve", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AutomationFlowId" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "List of automation flows", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchAutomationsResp" + } + } + } + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + } + } + } + }, + "/v1/automation/flows/{flow_id}": { + "get": { + "operationId": "getFlow", + "summary": "getFlow", + "description": "List available automation flows", + "tags": [ + "flows" + ], + "parameters": [ + { + "name": "flow_id", + "in": "path", + "required": true, + "description": "Automation Workflow ID", + "schema": { + "$ref": "#/components/schemas/AutomationFlowId" + } + } + ], + "responses": { + "200": { + "description": "The returned automation flow", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationFlow" + } + } + } + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "put": { + "operationId": "putFlow", + "summary": "putFlow", + "description": "Update automation flow by id", + "tags": [ + "flows" + ], + "parameters": [ + { + "name": "flow_id", + "in": "path", + "required": true, + "description": "Automation Workflow ID", + "schema": { + "$ref": "#/components/schemas/AutomationFlowId" + } + } + ], + "requestBody": { + "description": "Automation flow to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationFlow" + } + } + } + }, + "responses": { + "200": { + "description": "The updated automation flow", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationFlow" + } + } + } + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + } + } + }, + "delete": { + "operationId": "deleteFlow", + "summary": "deleteFlow", + "description": "Update automation flow by id", + "tags": [ + "flows" + ], + "parameters": [ + { + "name": "flow_id", + "in": "path", + "required": true, + "description": "Automation Workflow ID", + "schema": { + "$ref": "#/components/schemas/AutomationFlowId" + } + } + ], + "responses": { + "200": { + "description": "Flow deleted successfully" + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + }, + "/v1/automation/executions": { + "get": { + "operationId": "getExecutions", + "summary": "getExecutions", + "description": "List automation executions", + "parameters": [ + { + "name": "entity_id", + "in": "query", + "schema": { + "$ref": "#/components/schemas/EntityId" + } + }, + { + "name": "size", + "in": "query", + "description": "Pagination: max number of results to return", + "schema": { + "type": "integer", + "default": 25 + } + }, + { + "name": "from", + "in": "query", + "description": "Pagination: starting for results", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "include_flows", + "in": "query", + "description": "Include flow automations in the response", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "tags": [ + "executions" + ], + "responses": { + "200": { + "description": "List of automation executions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetExecutionsResp" + }, + "examples": { + "manual_trigger": { + "summary": "Manual trigger execution", + "value": { + "total": 1, + "results": [ + { + "id": "9baf184f-bc81-4128-bca3-d974c90a12c4", + "execution_status": "success", + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "org_id": "123", + "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f", + "flow_name": "Handle contact form", + "created_at": "2023-01-01T10:00:00Z", + "updated_at": "2023-01-01T10:05:00Z", + "actions": [], + "version": 1, + "trigger_event": { + "type": "manual", + "org_id": "123", + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "caller": { + "EpilotAuth": { + "claims": { + "userId": "10006129", + "email": "user@epilot.cloud" + }, + "userId": "10006129", + "organizationId": "123" + } + } + } + } + ] + } + }, + "entity_operation_trigger": { + "summary": "Entity operation trigger execution", + "value": { + "total": 1, + "results": [ + { + "id": "8cdf274e-ab70-4029-9ca2-c863b80a11c3", + "execution_status": "in_progress", + "entity_id": "f4e4fcbd-cbcc-4496-bf5f-60c6ce2c621e", + "activity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", + "org_id": "123", + "flow_id": "8e2e067e-3c63-4b1a-8e02-6150a3d1fd89", + "flow_name": "Contact updated automation", + "created_at": "2023-01-01T12:00:00Z", + "updated_at": "2023-01-01T12:02:00Z", + "actions": [], + "version": 1, + "trigger_event": { + "type": "entity_operation", + "entity_id": "f4e4fcbd-cbcc-4496-bf5f-60c6ce2c621e", + "org_id": "123", + "activity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", + "operation_type": "updateEntity" + } + } + ] + } + }, + "entity_activity_trigger": { + "summary": "Entity activity trigger execution", + "value": { + "total": 1, + "results": [ + { + "id": "7bde163d-9a5f-3f18-8b92-d752a79a10b2", + "execution_status": "failed", + "entity_id": "c2b1a9d8-7e6f-5040-3029-180716253f4e", + "activity_id": "b3c4d5e6-f7a8-9012-3456-789012bcdef0", + "org_id": "123", + "flow_id": "6d1d956d-2b52-4a0a-9e01-5049a2c0ee78", + "flow_name": "Document upload handler", + "created_at": "2023-01-01T14:00:00Z", + "updated_at": "2023-01-01T14:01:30Z", + "actions": [], + "version": 1, + "trigger_event": { + "type": "entity_activity", + "org_id": "123", + "activity_id": "b3c4d5e6-f7a8-9012-3456-789012bcdef0", + "activity_type": "DocUploadedFromPortal", + "entity_id": "c2b1a9d8-7e6f-5040-3029-180716253f4e" + } + } + ] + } + }, + "flow_automation_task_trigger": { + "summary": "Flow automation task trigger execution", + "value": { + "total": 1, + "results": [ + { + "id": "5ade051c-8a4e-2e07-7a81-c641968a0fa1", + "execution_status": "paused", + "entity_id": "d3c2b1a0-8f7e-6d5c-4b3a-291807364e5f", + "org_id": "123", + "flow_id": "9f0f178f-4c74-5b2b-af12-6160b3d1ee89", + "flow_name": "Journey completion follow-up", + "created_at": "2023-01-01T16:00:00Z", + "updated_at": "2023-01-01T16:03:00Z", + "actions": [], + "version": 1, + "resume_token": "eyJraWQiOiJrZXkifQ==", + "trigger_event": { + "type": "flow_automation_task", + "org_id": "123", + "entity_id": "d3c2b1a0-8f7e-6d5c-4b3a-291807364e5f", + "flow_execution_id": "wfwAJoT_cK", + "flow_automation_task_id": "2fa221ec-3aac-4655-ab8f-c062eca44a3", + "caller": { + "EpilotAuth": { + "claims": { + "userId": "10006129", + "email": "user@epilot.cloud" + }, + "userId": "10006129", + "organizationId": "123" + } + } + } + } + ] + } + }, + "mixed_execution_statuses": { + "summary": "Multiple executions with different trigger types and statuses", + "value": { + "total": 4, + "results": [ + { + "id": "1aef262e-9b5f-4f29-8c93-e763b90b21d3", + "execution_status": "success", + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "org_id": "123", + "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f", + "flow_name": "Send welcome email", + "created_at": "2023-01-01T09:00:00Z", + "updated_at": "2023-01-01T09:02:00Z", + "actions": [], + "version": 2, + "trigger_event": { + "type": "manual", + "org_id": "123", + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "caller": { + "EpilotAuth": { + "claims": { + "userId": "10006129", + "email": "admin@epilot.cloud" + }, + "userId": "10006129", + "organizationId": "123" + } + } + } + }, + { + "id": "2bef373f-ac60-5039-9da4-f874ca1c32e4", + "execution_status": "in_progress", + "entity_id": "f4e4fcbd-cbcc-4496-bf5f-60c6ce2c621e", + "activity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", + "org_id": "123", + "flow_id": "8e2e067e-3c63-4b1a-8e02-6150a3d1fd89", + "flow_name": "Update CRM system", + "created_at": "2023-01-01T10:30:00Z", + "updated_at": "2023-01-01T10:31:00Z", + "actions": [], + "version": 1, + "trigger_event": { + "type": "entity_operation", + "entity_id": "f4e4fcbd-cbcc-4496-bf5f-60c6ce2c621e", + "org_id": "123", + "activity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", + "operation_type": "createEntity" + } + }, + { + "id": "3cef484g-bd71-6149-ae04-0985db2d43f5", + "execution_status": "failed", + "entity_id": "c2b1a9d8-7e6f-5040-3029-180716253f4e", + "activity_id": "b3c4d5e6-f7a8-9012-3456-789012bcdef0", + "org_id": "123", + "flow_id": "6d1d956d-2b52-4a0a-9e01-5049a2c0ee78", + "flow_name": "Generate invoice", + "created_at": "2023-01-01T11:15:00Z", + "updated_at": "2023-01-01T11:16:30Z", + "actions": [], + "version": 1, + "trigger_event": { + "type": "entity_activity", + "org_id": "123", + "activity_id": "b3c4d5e6-f7a8-9012-3456-789012bcdef0", + "activity_type": "CreateMeterReading", + "entity_id": "c2b1a9d8-7e6f-5040-3029-180716253f4e" + } + }, + { + "id": "4def595h-ce82-7259-bf15-1a96ec3e54g6", + "execution_status": "scheduled", + "entity_id": "d3c2b1a0-8f7e-6d5c-4b3a-291807364e5f", + "org_id": "123", + "flow_id": "9f0f178f-4c74-5b2b-af12-6160b3d1ee89", + "flow_name": "Scheduled reminder", + "created_at": "2023-01-01T12:45:00Z", + "updated_at": "2023-01-01T12:45:00Z", + "actions": [], + "version": 1, + "trigger_event": { + "type": "flow_automation_task", + "org_id": "123", + "entity_id": "d3c2b1a0-8f7e-6d5c-4b3a-291807364e5f", + "flow_execution_id": "xgxBKpU_dL", + "flow_automation_task_id": "3gb332fd-4bbd-5766-bc9g-d173fdb55b4", + "caller": { + "EpilotAuth": { + "claims": { + "userId": "10006130", + "email": "scheduler@epilot.cloud" + }, + "userId": "10006130", + "organizationId": "123" + } + } + } + } + ] + } + } + } + } + } + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + } + } + }, + "post": { + "operationId": "startExecution", + "summary": "startExecution", + "description": "Start new automation execution", + "requestBody": { + "description": "Execution parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartExecutionRequest" + } + } + } + }, + "tags": [ + "executions" + ], + "responses": { + "201": { + "description": "The created execution", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationExecution" + } + } + } + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + } + } + } + }, + "/v1/automation/executions/bulk-jobs": { + "post": { + "operationId": "bulkTriggerExecutions", + "summary": "bulkTriggerExecutions", + "description": "Create a bulk job that triggers multiple automation executions", + "requestBody": { + "description": "Execution parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkTriggerRequest" + }, + "example": { + "flow_id": "8e2e067e-3c63-4b1a-8e02-6150a3d1fd89", + "entities_refs": [ + { + "entity_schema": "opportunity", + "entity_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f" + }, + { + "entity_schema": "opportunity", + "entity_id": "b35a6c51-2a15-4ef1-9623-20db37b0744f" + } + ], + "trigger_context": { + "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" + } + } + } + } + }, + "tags": [ + "bulk" + ], + "responses": { + "202": { + "description": "Trigger Executions Job Info", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkTriggerJob" + } + } + } + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + } + } + } + }, + "/v1/automation/executions/bulk-jobs/{job_id}": { + "get": { + "operationId": "getBulkJob", + "summary": "getBulkJob", + "description": "Get the status of a bulk job that triggers multiple automation executions", + "parameters": [ + { + "name": "job_id", + "in": "path", + "schema": { + "$ref": "#/components/schemas/JobId" + }, + "required": true + } + ], + "tags": [ + "bulk" + ], + "responses": { + "200": { + "description": "Bulk Job Info", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkTriggerJob" + } + } + } + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "patch": { + "operationId": "patchBulkJob", + "summary": "patchBulkJob", + "description": "Approve / Cancel bulk job that triggers multiple automation executions", + "parameters": [ + { + "name": "job_id", + "in": "path", + "schema": { + "$ref": "#/components/schemas/JobId" + }, + "required": true + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchBulkJobRequest" + }, + "example": { + "action": "APPROVE", + "task_token": "b35a6c51-2a15-4ef1-9623-20db37b0744f" + } + } + } + }, + "tags": [ + "bulk" + ], + "responses": { + "200": { + "description": "Bulk Job Info", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkTriggerJob" + } + } + } + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + }, + "/v1/automation/executions/{execution_id}": { + "get": { + "operationId": "getExecution", + "summary": "getExecution", + "description": "Get automation execution", + "parameters": [ + { + "name": "execution_id", + "in": "path", + "schema": { + "$ref": "#/components/schemas/AutomationExecutionId" + }, + "required": true + } + ], + "tags": [ + "executions" + ], + "responses": { + "200": { + "description": "The returned execution", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationExecution" + } + } + } + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "delete": { + "operationId": "cancelExecution", + "summary": "cancelExecution", + "description": "Cancel automation execution", + "parameters": [ + { + "name": "execution_id", + "in": "path", + "schema": { + "$ref": "#/components/schemas/AutomationExecutionId" + }, + "required": true + } + ], + "tags": [ + "executions" + ], + "responses": { + "200": { + "description": "The cancelled execution", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationExecution" + } + } + } + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + }, + "/v1/automation/executions/{execution_id}/{action_id}/retrigger": { + "post": { + "operationId": "retriggerAction", + "summary": "retriggerAction", + "description": "Retry a specific automation execution action which failed / is stuck.", + "tags": [ + "executions" + ], + "parameters": [ + { + "name": "execution_id", + "in": "path", + "description": "Execution Id", + "schema": { + "$ref": "#/components/schemas/AutomationExecutionId" + }, + "required": true + }, + { + "name": "action_id", + "in": "path", + "description": "Id of Action to retry.", + "schema": { + "$ref": "#/components/schemas/AutomationActionId" + }, + "required": true + } + ], + "requestBody": { + "description": "Retry request details.", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RetryReq" + } + } + } + }, + "responses": { + "200": { + "description": "action re-triggered with success" + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + }, + "/v1/automation/public/executions:resume": { + "post": { + "operationId": "resumeExecutionWithToken", + "summary": "resumeExecutionWithToken", + "description": "Resume a paused automation execution using a unique resume token.\n\nThis public API is normally called when a user lands on a confirmation page via email link.\n\nExample link: https://automation.epilot.io/confirm-email?token=eyJraWQiOiJrZXkifQ...\n", + "tags": [ + "executions" + ], + "security": [], + "requestBody": { + "description": "Retry request details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResumeReq" + } + } + } + }, + "responses": { + "200": { + "description": "execution resumed with success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResumeResp" + } + } + } + }, + "400": { + "description": "execution could not be resumed" + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + }, + "/v1/automation/executions/{execution_id}/schedules/{schedule_id}": { + "delete": { + "operationId": "cancelSchedule", + "summary": "cancelSchedule", + "description": "Cancel a scheduled automation", + "parameters": [ + { + "name": "execution_id", + "in": "path", + "schema": { + "$ref": "#/components/schemas/AutomationExecutionId" + }, + "required": true + }, + { + "name": "schedule_id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "ID of the schedule to cancel" + } + ], + "tags": [ + "executions" + ], + "responses": { + "200": { + "description": "The schedule was successfully cancelled", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActionSchedule" + } + } + } + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Epilot Bearer Token" + } + }, + "schemas": { + "AutomationFlowId": { + "type": "string", + "description": "ID of the Automation Flow", + "example": "7791b04a-16d2-44a2-9af9-2d59c25c512f", + "readOnly": true + }, + "AutomationActionId": { + "type": "string", + "example": "9ec3711b-db63-449c-b894-54d5bb622a8f" + }, + "AutomationFlow": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/AutomationFlowId" + }, + "flow_name": { + "type": "string", + "description": "A descriptive name for the Automation", + "example": "Handle contact form" + }, + "enabled": { + "type": "boolean", + "description": "Whether the automation is enabled or not" + }, + "disable_details": { + "type": "object", + "properties": { + "disabled_at": { + "type": "string", + "format": "date-time", + "description": "When the flow was disabled" + }, + "disabled_by": { + "type": "string", + "enum": [ + "system", + "user" + ], + "description": "Who disabled the flow (system or user)" + }, + "blame": { + "type": "string", + "description": "The 360 user email that disabled the flow" + } + }, + "required": [ + "disabled_at", + "disabled_by" + ] + }, + "triggers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AnyTrigger" + } + }, + "trigger_conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TriggerCondition" + } + }, + "entity_schema": { + "description": "The triggering entity schema", + "type": "string", + "example": "submission" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActionCondition" + } + }, + "schedules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActionSchedule" + } + }, + "actions": { + "type": "array", + "description": "The actions (nodes) of the automation flow", + "items": { + "$ref": "#/components/schemas/AnyAction" + }, + "readOnly": true + }, + "runs": { + "type": "number", + "example": 7, + "description": "Number of automation executions that ran" + }, + "max_executions": { + "type": "object", + "description": "Customized execution hot flow rate limit. Takes precedence over the default hot flow rate limit if specified.", + "properties": { + "count": { + "type": "number", + "description": "Maximum number of executions per time window", + "minimum": 1, + "example": 100 + }, + "window": { + "type": "string", + "description": "ISO 8601 duration time window for the threshold", + "example": "PT1M" + } + } + }, + "created_at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "created_by": { + "type": "string", + "example": "user:123", + "description": "User / service who created automation flow", + "readOnly": true + }, + "last_updated_by": { + "type": "string", + "example": "user:123", + "description": "User / service who last updated automation flow", + "readOnly": true + }, + "org_id": { + "type": "string", + "example": "123", + "description": "Organization the automation flow belongs to", + "readOnly": true + }, + "system_flow": { + "type": "boolean", + "description": "Determines if the flow is a system generated flow" + }, + "version": { + "type": "number", + "description": "Version of the flow", + "example": 2 + }, + "_manifest": { + "type": "array", + "description": "Source blueprint/manifest ID used when automation is created via blueprints.", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "nullable": true + } + }, + "required": [ + "flow_name", + "triggers", + "actions" + ] + }, + "WorkflowContextRole": { + "type": "string", + "description": "The role this automation plays in the workflow.", + "enum": [ + "trigger_workflow", + "run_task_automation" + ] + }, + "SearchAutomationsResp": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AutomationFlow" + } + } + }, + "required": [ + "total", + "results" + ] + }, + "AnyTrigger": { + "anyOf": [ + { + "$ref": "#/components/schemas/FrontendSubmitTrigger" + }, + { + "$ref": "#/components/schemas/JourneySubmitTrigger" + }, + { + "$ref": "#/components/schemas/ApiSubmissionTrigger" + }, + { + "$ref": "#/components/schemas/EntityOperationTrigger" + }, + { + "$ref": "#/components/schemas/ActivityTrigger" + }, + { + "$ref": "#/components/schemas/EntityManualTrigger" + }, + { + "$ref": "#/components/schemas/ReceivedEmailTrigger" + }, + { + "$ref": "#/components/schemas/NewEmailThreadTrigger" + }, + { + "$ref": "#/components/schemas/FlowsTrigger" + } + ] + }, + "AnyAction": { + "anyOf": [ + { + "$ref": "#/components/schemas/MapEntityAction" + }, + { + "$ref": "#/components/schemas/TriggerWorkflowAction" + }, + { + "$ref": "#/components/schemas/TriggerShareEntityAction" + }, + { + "$ref": "#/components/schemas/TriggerWebhookAction" + }, + { + "$ref": "#/components/schemas/InformERPAction" + }, + { + "$ref": "#/components/schemas/TriggerEventAction" + }, + { + "$ref": "#/components/schemas/CreateDocumentAction" + }, + { + "$ref": "#/components/schemas/SendEmailAction" + }, + { + "$ref": "#/components/schemas/CartCheckoutAction" + }, + { + "$ref": "#/components/schemas/CustomAction" + }, + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "$ref": "#/components/schemas/FlowExecutionCancelAction" + } + ] + }, + "AnyActionConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/MapEntityActionConfig" + }, + { + "$ref": "#/components/schemas/TriggerWorkflowActionConfig" + }, + { + "$ref": "#/components/schemas/TriggerShareEntityActionConfig" + }, + { + "$ref": "#/components/schemas/TriggerWebhookActionConfig" + }, + { + "$ref": "#/components/schemas/InformERPActionConfig" + }, + { + "$ref": "#/components/schemas/TriggerEventActionConfig" + }, + { + "$ref": "#/components/schemas/CreateDocumentActionConfig" + }, + { + "$ref": "#/components/schemas/SendEmailActionConfig" + }, + { + "$ref": "#/components/schemas/CartCheckoutActionConfig" + }, + { + "$ref": "#/components/schemas/CustomAction" + }, + { + "$ref": "#/components/schemas/AutomationActionConfig" + }, + { + "$ref": "#/components/schemas/FlowExecutionCancelActionConfig" + } + ] + }, + "AutomationActionConfig": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/AutomationActionId" + }, + "flow_action_id": { + "$ref": "#/components/schemas/AutomationActionId" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "config": { + "type": "object", + "additionalProperties": true + }, + "allow_failure": { + "description": "Whether to stop execution in a failed state if this action fails", + "type": "boolean" + }, + "created_automatically": { + "description": "Flag indicating whether the action was created automatically or manually", + "type": "boolean" + }, + "is_bulk_action": { + "description": "Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity", + "type": "boolean" + }, + "reason": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Why the action has to be skipped/failed", + "example": "There are no registered portal users for the given emails, hence skipping the action" + }, + "payload": { + "type": "object", + "additionalProperties": true, + "description": "Extra metadata about the skipping reason - such as a certain condition not met, etc." + } + } + }, + "condition_id": { + "type": "string", + "description": "Condition Id to be checked before executing the action" + }, + "schedule_id": { + "type": "string", + "description": "Schedule Id which indicates the schedule of the action" + } + } + }, + "AutomationActionExecutionState": { + "type": "object", + "properties": { + "execution_status": { + "$ref": "#/components/schemas/ExecutionStatus" + }, + "started_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "outputs": { + "type": "object", + "additionalProperties": true, + "example": {} + }, + "error_output": { + "$ref": "#/components/schemas/ErrorOutput" + }, + "retry_strategy": { + "$ref": "#/components/schemas/RetryStrategy" + } + } + }, + "RetryStrategy": { + "type": "string", + "description": "different behaviors for retrying failed execution actions.", + "enum": [ + "RETRY_AND_RESUME", + "RETRY_AND_STOP", + "RETRY_ALL_PARENT_CONDITION_ACTIONS" + ] + }, + "AutomationAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationActionConfig" + }, + { + "$ref": "#/components/schemas/AutomationActionExecutionState" + } + ] + }, + "ErrorOutput": { + "type": "object", + "properties": { + "error_code": { + "$ref": "#/components/schemas/ErrorCode" + }, + "error_reason": { + "type": "string" + }, + "error_info": { + "type": "object", + "additionalProperties": true, + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorDetail" + } + } + } + } + }, + "required": [ + "error_code", + "error_reason" + ] + }, + "ErrorCode": { + "type": "string", + "enum": [ + "MAPPING_ERROR", + "REFRESH_RELATIONS_ERROR", + "DUPLICATE_ENTITY_ERROR", + "TRIGGER_WORKFLOW_ERROR", + "TIMEOUT_ERROR", + "BAD_CONFIG", + "INTERNAL_ERROR", + "TRIGGER_WEBHOOK_ERROR", + "TEMPLATE_ERROR", + "INVALID_PAYLOAD", + "INVALID_SCHEDULE_CONFIG", + "CUSTOM_ACTION_ERROR", + "ORDER_CREATION_ERROR", + "DOCUMENT_GENERATION_ERROR", + "BULK_EMAIL_ERROR", + "SHARING_ERROR", + "CANCEL_FLOW_EXECUTION_ERROR", + "METER_READING_NOT_FOUND", + "ENTITY_NOT_FOUND" + ] + }, + "ErrorDetail": { + "type": "object", + "properties": { + "explanation": { + "type": "string" + }, + "context": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "explanation" + ] + }, + "CartCheckoutActionConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationActionConfig" + }, + { + "type": "object", + "description": "Creates an order entity with prices from journey", + "properties": { + "type": { + "enum": [ + "cart-checkout" + ] + }, + "config": { + "$ref": "#/components/schemas/CartCheckoutConfig" + } + } + } + ] + }, + "CartCheckoutAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "type": "object", + "description": "Creates an order entity with prices from journey", + "properties": { + "type": { + "enum": [ + "cart-checkout" + ] + }, + "config": { + "$ref": "#/components/schemas/CartCheckoutConfig" + } + } + } + ] + }, + "CartCheckoutConfig": { + "type": "object", + "properties": { + "version": { + "description": "Version of the config", + "type": "string", + "default": "1" + }, + "mapping_config": { + "$ref": "#/components/schemas/MappingConfigRef" + }, + "relation_attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RelationAttribute" + } + }, + "mapping_attributes": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/MappingAttributeV2" + }, + { + "$ref": "#/components/schemas/MappingAttribute" + } + ] + } + }, + "linkback_relation_attribute": { + "type": "string", + "default": "mapped_entities", + "description": "Relation attribute on the main entity where the target entity will be linked. Set to false to disable linkback\n" + }, + "linkback_relation_tags": { + "type": "array", + "description": "Relation tags (labels) to include in main entity linkback relation attribute", + "items": { + "type": "string" + } + }, + "target_unique": { + "type": "array", + "description": "Unique key for target entity (see upsertEntity of Entity API)", + "items": { + "type": "string" + } + } + } + }, + "MapEntityActionConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationActionConfig" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "map-entity" + ] + }, + "config": { + "$ref": "#/components/schemas/MapEntityConfig" + } + } + } + ], + "example": { + "id": "2520gja-2sgmsaga-0asg-822jgal", + "name": "Map Entity", + "type": "map-entity", + "config": { + "target_schema": "contact", + "target_unique": [ + "email.0.email" + ], + "relation_attributes": [ + { + "target": "company", + "mode": "append", + "source_filter": { + "schema": "account", + "limit": 1 + } + } + ], + "mapping_attributes": [ + { + "target": "_tags", + "operation": { + "_append": [ + "primary", + "payer" + ], + "_uniq": true + } + }, + { + "target": "email", + "operation": { + "_append": [ + { + "email": { + "_copy": "billing_contact.email" + } + } + ] + } + }, + { + "target": "first_name", + "operation": { + "_copy": "billing_contact.first_name" + } + }, + { + "target": "last_name", + "operation": { + "_copy": "billing_contact.last_name" + } + }, + { + "target": "contact_type", + "operation": { + "_set": "customer" + } + }, + { + "target": "address", + "operation": { + "_append": [ + { + "_tags": [ + "billing", + "primary" + ], + "street_name": { + "_copy": "billing_contact.street_name" + }, + "street_number": { + "_copy": "billing_contact.street_number" + }, + "city": { + "_copy": "billing_contact.city" + }, + "postal_code": { + "_copy": "billing_contact.postal_code" + }, + "country": { + "_copy": "billing_contact.country" + } + }, + { + "_tags": [ + "delivery" + ], + "street_name": { + "_copy": "delivery_contact.street_name" + }, + "street_number": { + "_copy": "delivery_contact.street_number" + }, + "city": { + "_copy": "delivery_contact.city" + }, + "postal_code": { + "_copy": "delivery_contact.postal_code" + }, + "country": { + "_copy": "delivery_contact.country" + } + } + ], + "_uniq": [ + "street_name", + "street_number", + "postal_code", + "country" + ] + } + } + ] + } + } + }, + "MapEntityAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "map-entity" + ] + }, + "config": { + "$ref": "#/components/schemas/MapEntityConfig" + } + } + } + ] + }, + "MapEntityConfig": { + "type": "object", + "properties": { + "mapping_config": { + "$ref": "#/components/schemas/MappingConfigRef" + }, + "target_schema": { + "type": "string", + "description": "Schema of target entity" + }, + "target_unique": { + "type": "array", + "description": "Unique key for target entity (see upsertEntity of Entity API)", + "items": { + "type": "string" + } + }, + "mapping_attributes": { + "type": "array", + "description": "Attribute mappings", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/MappingAttributeV2" + }, + { + "$ref": "#/components/schemas/MappingAttribute" + } + ] + } + }, + "relation_attributes": { + "type": "array", + "description": "Relation mappings", + "items": { + "$ref": "#/components/schemas/RelationAttribute" + } + }, + "linkback_relation_attribute": { + "type": "string", + "default": "mapped_entities", + "description": "Relation attribute on the main entity where the target entity will be linked. Set to false to disable linkback\n" + }, + "linkback_relation_tags": { + "type": "array", + "description": "Relation tags (labels) to include in main entity linkback relation attribute", + "items": { + "type": "string" + } + } + }, + "required": [ + "target_schema" + ] + }, + "MappingConfigRef": { + "type": "object", + "properties": { + "config_id": { + "type": "string", + "description": "Id of Entity Mapping Configuration to run for mapping." + }, + "target_id": { + "type": "string", + "description": "Id of TargetConfig to run for mapping." + }, + "version": { + "type": "number", + "description": "Version of Entity Mapping Configuration to run for mapping." + } + }, + "required": [ + "config_id", + "target_id" + ] + }, + "RelationAttribute": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target attribute to store the relation in" + }, + "target_tags": { + "type": "array", + "description": "Relation tags (labels) to set for the stored relations", + "items": { + "type": "string" + } + }, + "target_tags_include_source": { + "type": "boolean", + "description": "Include all relation tags (labels) present on the main entity relation", + "default": false + }, + "source_filter": { + "type": "object", + "description": "A filter to identify which source entities to pick as relations from main entity", + "properties": { + "limit": { + "type": "integer", + "description": "Limit relations to maximum number (default, all matched relations)", + "minimum": 0 + }, + "schema": { + "type": "string", + "description": "Filter by specific schema" + }, + "attribute": { + "type": "string", + "description": "Filter by a specific relation attribute on the main entity" + }, + "relation_tag": { + "type": "string", + "description": "Filter by relation tag (label) on the main entity" + }, + "tag": { + "type": "string", + "description": "Filter by a specific tag on the related entity" + }, + "self": { + "type": "boolean", + "description": "Picks main entity as relation (overrides other filters)", + "default": false + } + } + }, + "related_to": { + "type": "object", + "additionalProperties": true, + "deprecated": true + }, + "mode": { + "type": "string", + "enum": [ + "append", + "prepend", + "set" + ] + } + }, + "required": [ + "target", + "mode" + ] + }, + "MappingAttributeV2": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target JSON path for the attribute to set" + }, + "operation": { + "$ref": "#/components/schemas/OperationNode" + } + }, + "required": [ + "targetPath", + "operation" + ], + "example": { + "target": "_tags", + "operation": { + "_append": [ + "new", + "tags" + ], + "_uniq": true + } + } + }, + "OperationNode": { + "description": "Mapping operation nodes are either primitive values or operation node objects", + "oneOf": [ + { + "$ref": "#/components/schemas/OperationObjectNode" + }, + { + "$ref": "#/components/schemas/PrimitiveJSONValue" + } + ] + }, + "OperationObjectNode": { + "type": "object", + "properties": { + "_set": { + "$ref": "#/components/schemas/PrimitiveJSONValue" + }, + "_append": { + "description": "Append to array", + "items": { + "$ref": "#/components/schemas/PrimitiveJSONValue" + } + }, + "_uniq": { + "description": "Unique array", + "oneOf": [ + { + "type": "boolean", + "example": true + }, + { + "type": "array", + "description": "Unique key consisting of object keys", + "example": [ + "email" + ], + "items": { + "type": "string" + } + } + ] + }, + "_copy": { + "description": "Copy JSONPath value from source entity context", + "type": "string", + "example": "contact.first_name" + } + }, + "additionalProperties": true + }, + "PrimitiveJSONValue": {}, + "MappingAttribute": { + "anyOf": [ + { + "$ref": "#/components/schemas/SetValueMapper" + }, + { + "$ref": "#/components/schemas/CopyValueMapper" + }, + { + "$ref": "#/components/schemas/AppendValueMapper" + } + ] + }, + "MappingAttributeMode": { + "type": "string", + "enum": [ + "copy_if_exists", + "append_if_exists", + "set_value" + ], + "description": "- copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property.\n" + }, + "SetValueMapper": { + "type": "object", + "deprecated": true, + "properties": { + "mode": { + "$ref": "#/components/schemas/MappingAttributeMode" + }, + "target": { + "type": "string", + "description": "JSON like target path for the attribute. Eg. last_name" + }, + "value": { + "description": "Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\n" + } + }, + "required": [ + "mode", + "target", + "value" + ] + }, + "CopyValueMapper": { + "type": "object", + "deprecated": true, + "properties": { + "mode": { + "$ref": "#/components/schemas/MappingAttributeMode" + }, + "target": { + "type": "string", + "description": "JSON like target path for the attribute. Eg. last_name" + }, + "source": { + "type": "string", + "description": "JSON source path for the value to be extracted from the main entity. Eg: steps[1].['Product Info'].price\n" + } + }, + "required": [ + "mode", + "target", + "source" + ] + }, + "AppendValueMapper": { + "type": "object", + "deprecated": true, + "properties": { + "mode": { + "$ref": "#/components/schemas/MappingAttributeMode" + }, + "target": { + "type": "string", + "description": "JSON like target path for the attribute. Eg. last_name" + }, + "source": { + "type": "string", + "description": "JSON source path for the value to be extracted from the main entity. Eg: steps[1].['Product Info'].price\n" + }, + "value_json": { + "type": "string", + "description": "To be provided only when mapping json objects into a target attribute. Eg array of addresses.\n" + }, + "target_unique": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\n" + } + }, + "required": [ + "mode", + "target", + "value_json" + ] + }, + "MoveThreadAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "move-thread" + ] + }, + "config": { + "$ref": "#/components/schemas/MoveThreadConfig" + } + } + } + ] + }, + "AssignThreadAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "assign-thread" + ] + }, + "config": { + "$ref": "#/components/schemas/AssignThreadConfig" + } + } + } + ] + }, + "MoveThreadConfig": { + "type": "object", + "properties": { + "target_inbox_id": { + "type": "string", + "description": "ID of the inbox where the thread should be moved to" + } + } + }, + "AssignThreadConfig": { + "type": "object", + "properties": { + "remove": { + "type": "array", + "description": "Assignees to remove from the thread, if they exist", + "items": { + "type": "string" + } + }, + "add": { + "type": "array", + "description": "Assignees to add to the thread", + "items": { + "type": "string" + } + } + } + }, + "SendEmailActionConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationActionConfig" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "send-email" + ] + }, + "config": { + "$ref": "#/components/schemas/SendEmailConfig" + } + } + } + ], + "example": { + "id": "25jga0-gkasl26-0asg-908sgaj2", + "name": "Send Email", + "type": "send-email", + "config": { + "email_template_id": "gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2", + "language_code": "de" + } + } + }, + "SendEmailAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "send-email" + ] + }, + "config": { + "$ref": "#/components/schemas/SendEmailConfig" + } + } + } + ] + }, + "SendEmailConfig": { + "type": "object", + "properties": { + "email_template_id": { + "type": "string" + }, + "language_code": { + "type": "string", + "enum": [ + "de", + "en" + ] + }, + "notify_portal_user_only": { + "type": "boolean", + "description": "Send an email exclusively to the portal user if they are registered on the portal.", + "default": false + }, + "skip_creating_entities": { + "type": "boolean", + "description": "When true, it lets to send only the email by skip creating the thread & message entities.", + "default": false + }, + "wait_for_confirmation": { + "type": "boolean", + "description": "Pause automation execution after sending email to wait for a confirmation link to be clicked.\n\nThe email template should contain a confirmation link using the variable `{{confirmation_url}}`\n", + "default": false + }, + "attachments": { + "type": "array", + "description": "Include extra file attachments in sent email.\nAttachments in email template will be sent regardless of this configuration.\n", + "items": { + "type": "object", + "properties": { + "source_filter": { + "type": "object", + "description": "Specify filters to match file entities related to main entity", + "properties": { + "limit": { + "type": "integer", + "description": "Limit files to maximum number (default, all matched file relations)", + "minimum": 0, + "example": 1 + }, + "filename_regex": { + "type": "string", + "description": "Match by filename. Regex syntax supported", + "example": ".*" + }, + "attribute": { + "type": "string", + "description": "Filter by a specific relation attribute on the main entity", + "example": "_files" + }, + "relation_tag": { + "type": "string", + "description": "Filter by relation tag (label) on the main entity", + "example": "contract" + }, + "tag": { + "type": "string", + "description": "Filter by a specific tag on the related file entity" + }, + "document_type": { + "type": "string", + "description": "Filter by a specific document type (e.g. document)", + "enum": [ + "document", + "text", + "image", + "video", + "audio", + "spreadsheet", + "presentation", + "font", + "archive", + "application", + "unknown" + ] + }, + "self": { + "type": "boolean", + "description": "Picks main entity as file (only works if source entity is a file)", + "default": false + } + } + } + } + }, + "required": [ + "email_template_id" + ] + }, + "conditions": { + "type": "array", + "description": "Conditions necessary to send out email. Otherwise it will be skipped", + "items": { + "$ref": "#/components/schemas/SendEmailCondition" + } + } + } + }, + "SendEmailCondition": { + "type": "object", + "properties": { + "_equals": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + }, + "CreateDocumentActionConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationActionConfig" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "create-document" + ] + }, + "config": { + "$ref": "#/components/schemas/CreateDocumentConfig" + } + } + } + ], + "example": { + "id": "08g988-ojt2jtaga-292h-8978gsaga", + "name": "Create Document", + "type": "create-document", + "config": { + "template_id": { + "type": "string", + "example": "112b08ba-789c-42f2-9940-43b302f641e8\"" + }, + "filename": { + "type": "string", + "example": "newsletter.pdf\"" + } + } + } + }, + "CreateDocumentAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "create-document" + ] + }, + "config": { + "$ref": "#/components/schemas/CreateDocumentConfig" + } + } + } + ] + }, + "CreateDocumentConfig": { + "type": "object", + "properties": { + "template_id": { + "type": "string" + }, + "filename": { + "type": "string" + } + } + }, + "TriggerWorkflowActionConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationActionConfig" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "trigger-workflow" + ] + }, + "config": { + "$ref": "#/components/schemas/TriggerWorkflowConfig" + } + } + } + ], + "example": { + "id": "08g988-ojt2jtaga-292h-8978gsaga", + "name": "Trigger Workflow", + "type": "trigger-workflow", + "config": { + "target_workflow": "mfptvUMH", + "conditions": [ + { + "schema": "ivy-opportunity", + "source": "customer.type", + "comparison": "equals", + "value": "PRIVATE" + } + ], + "assign_steps": [ + { + "step_name": "Lead Sales", + "user_ids": [ + 10010729 + ] + }, + { + "step_name": "Operations", + "user_ids": [ + 10010728, + 10010729 + ] + } + ] + } + } + }, + "TriggerWorkflowAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "trigger-workflow" + ] + }, + "config": { + "$ref": "#/components/schemas/TriggerWorkflowConfig" + } + } + } + ] + }, + "TriggerWorkflowConfig": { + "type": "object", + "properties": { + "target_workflow": { + "type": "string" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TriggerWorkflowCondition" + } + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "assign_steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AssignUsersToStep" + } + }, + "filter_with_purposes": { + "type": "boolean" + } + } + }, + "TriggerWorkflowCondition": { + "allOf": [ + { + "$ref": "#/components/schemas/TriggerCondition" + }, + { + "type": "object", + "properties": { + "schema": { + "type": "string" + } + } + } + ], + "required": [ + "schema", + "source", + "comparison" + ], + "example": { + "schema": "contact", + "source": "email", + "comparison": "equals", + "value": "test@epilot.cloud" + } + }, + "TriggerShareEntityActionConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationActionConfig" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "trigger-workflow" + ] + }, + "config": { + "$ref": "#/components/schemas/TriggerShareEntityConfig" + } + } + } + ] + }, + "TriggerShareEntityAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "trigger-share-entity" + ] + }, + "config": { + "$ref": "#/components/schemas/TriggerShareEntityConfig" + } + } + } + ] + }, + "TriggerShareEntityConfig": { + "type": "object", + "properties": { + "partner_org_ids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "AssignUsersToStep": { + "type": "object", + "properties": { + "step_id": { + "type": "string" + }, + "step_name": { + "type": "string" + }, + "user_ids": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "example": [ + { + "step_id": "xyh9t2ha", + "step_name": "Lead Sales", + "user_ids": [ + 10010729 + ] + }, + { + "step_id": "29jgasl", + "step_name": "Operations", + "user_ids": [ + 10010728, + 10010729 + ] + } + ] + }, + "CustomAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom-action" + ] + }, + "config": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the custom action", + "example": "Credit Check" + }, + "description": { + "type": "string", + "description": "The description of the custom action", + "example": "Check if the customer has a credit limit" + }, + "app_id": { + "type": "string", + "description": "The ID of the app to fetch configuration from the app API", + "example": "c451c26a-cc7a-4c1c-92bf-1c6246cbfe88" + }, + "component_id": { + "type": "string", + "description": "The ID of the component from the app. As the app can potentially have multiple custom actions, this ID is used to identify the component", + "example": "2f1c26a-cc7a-4c1c-92bf-1c6246cbfe88" + }, + "wait_for_callback": { + "type": "boolean", + "description": "Whether to wait for the callback from the custom action", + "default": false + } + } + } + } + } + ] + }, + "TriggerWebhookActionConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationActionConfig" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "trigger-webhook" + ] + }, + "config": { + "$ref": "#/components/schemas/TriggerWebhookConfig" + } + } + } + ], + "example": { + "id": "2520gja-2sgmsaga-0asg-822jgal", + "name": "Trigger Webhook", + "type": "trigger-webhook", + "config": { + "entity_sources": [ + "contact", + "account" + ], + "target_webhook_id": "25jg9ag2ga" + } + } + }, + "TriggerWebhookAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "trigger-webhook" + ] + }, + "config": { + "$ref": "#/components/schemas/TriggerWebhookConfig" + } + } + } + ] + }, + "TriggerWebhookConfig": { + "type": "object", + "properties": { + "event_id": { + "type": "string", + "description": "The latest webhook event_id for an execution of this action" + }, + "entity_sources": { + "type": "array", + "items": { + "type": "string" + } + }, + "target_webhook_id": { + "type": "string" + }, + "sync": { + "type": "boolean", + "description": "Whether to wait for the request to finish before continuing automation execution", + "default": false + } + } + }, + "InformERPActionConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationActionConfig" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "inform-erp" + ] + }, + "config": { + "$ref": "#/components/schemas/InformERPConfig" + } + } + } + ], + "example": { + "id": "2520gja-2sgmsaga-0asg-822jgal", + "name": "Inform ERP", + "type": "inform-erp", + "config": { + "entity_sources": [ + "contact", + "account" + ], + "target_webhook_id": "25jg9ag2ga" + } + } + }, + "InformERPAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "inform-erp" + ] + }, + "config": { + "$ref": "#/components/schemas/InformERPConfig" + } + } + } + ] + }, + "InformERPConfig": { + "type": "object", + "properties": { + "entity_sources": { + "type": "array", + "items": { + "type": "string" + } + }, + "target_webhook_id": { + "type": "string" + }, + "sync": { + "type": "boolean", + "description": "Whether to wait for the request to finish before continuing automation execution", + "default": false + } + } + }, + "TriggerEventActionConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationActionConfig" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "trigger-event" + ] + }, + "config": { + "$ref": "#/components/schemas/TriggerEventConfig" + } + } + } + ], + "example": { + "id": "2520gja-2sgmsaga-0asg-822jgal", + "name": "Trigger Event", + "type": "trigger-event", + "config": { + "event_name": "my_custom_event", + "event_inputs": { + "key": "value" + } + } + } + }, + "TriggerEventAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "trigger-event" + ] + }, + "config": { + "$ref": "#/components/schemas/TriggerEventConfig" + } + } + } + ] + }, + "TriggerEventConfig": { + "type": "object", + "description": "Configuration for triggering an event catalog event", + "properties": { + "event_name": { + "type": "string", + "description": "The event catalog event name to trigger" + }, + "event_inputs": { + "type": "object", + "additionalProperties": true, + "description": "Inputs to be passed to trigger the event" + } + }, + "required": [ + "event_name" + ] + }, + "FlowExecutionCancelActionConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationActionConfig" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "cancel-flow-execution" + ] + }, + "config": { + "$ref": "#/components/schemas/FlowExecutionCancelConfig" + } + } + } + ], + "example": { + "id": "2520gja-2sgmsaga-0asg-822jgal", + "name": "Cancel Flow Execution", + "type": "cancel-flow-execution", + "config": { + "selected_reasons": [ + { + "id": "_6kITMwkv_0Uo4i7fO7Ja", + "title": "when you are done! that's when you close it." + }, + { + "id": "qgK9sGbKoS7NxlAbNReVn", + "title": "Client didn't want our services" + } + ], + "extra_description": "Test cancellation" + } + } + }, + "FlowExecutionCancelAction": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationAction" + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "cancel-flow-execution" + ] + }, + "config": { + "$ref": "#/components/schemas/FlowExecutionCancelConfig" + } + } + } + ] + }, + "FlowExecutionCancelConfig": { + "type": "object", + "description": "Configuration for cancelling a flow execution with selected reasons", + "properties": { + "selected_reasons": { + "type": "array", + "description": "List of reasons selected for this specific cancellation", + "items": { + "$ref": "#/components/schemas/CancellationReason" + } + }, + "extra_description": { + "type": "string", + "description": "Additional description or notes for the cancellation", + "example": "Process completed successfully" + } + }, + "required": [ + "configured_reasons" + ] + }, + "CancellationReason": { + "type": "object", + "description": "A reason for cancelling a flow execution", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the cancellation reason", + "example": "_6kITMwkv_0Uo4i7fO7Ja" + }, + "title": { + "type": "string", + "description": "Human-readable title for the cancellation reason", + "example": "Process completed successfully" + } + }, + "required": [ + "id", + "title" + ] + }, + "ConditionStatement": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "example": "1c8d3d9c-6d4c-4a83-aa22-aa0d630cbc2d" + }, + "source": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the action or trigger" + }, + "origin": { + "type": "string", + "enum": [ + "trigger", + "action" + ] + }, + "originType": { + "type": "string", + "enum": [ + "entity", + "workflow", + "journey_block" + ] + }, + "schema": { + "type": "string" + }, + "attribute": { + "type": "string" + }, + "attributeType": { + "type": "string", + "enum": [ + "string", + "text", + "number", + "boolean", + "date", + "datetime", + "tags", + "country", + "email", + "phone", + "product", + "price", + "status", + "relation", + "multiselect", + "select", + "radio", + "relation_user", + "purpose", + "label", + "payment", + "relation_payment_method" + ] + }, + "attributeRepeatable": { + "type": "boolean" + }, + "repeatableItemOp": { + "type": "boolean", + "description": "Whether to apply the operation to each item of the repeatable attribute" + }, + "attributeOperation": { + "enum": [ + "all", + "updated", + "added", + "deleted" + ] + } + } + }, + "operation": { + "type": "string", + "enum": [ + "equals", + "not_equals", + "any_of", + "none_of", + "contains", + "not_contains", + "starts_with", + "ends_with", + "greater_than", + "less_than", + "greater_than_or_equals", + "less_than_or_equals", + "is_empty", + "is_not_empty", + "entity_exists", + "entity_does_not_exist" + ] + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "example": { + "source": { + "origin": "trigger", + "originType": "entity", + "id": "trigger-id", + "schema": "contact", + "attribute": "email", + "attributeType": "text" + }, + "operation": "equals", + "values": [ + "hello@epilot.cloud" + ] + } + }, + "ActionCondition": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "schedule_id": { + "type": "string", + "description": "Schedule Id which indicates the schedule of the actions inside the condition" + }, + "evaluationResult": { + "type": "boolean", + "description": "Result of the condition evaluation" + }, + "statements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionStatement" + } + } + } + }, + "ActionScheduleSource": { + "type": "object", + "description": "The source of the schedule_at timestamp that will be used to schedule the action", + "properties": { + "id": { + "type": "string", + "description": "The id of the action or trigger" + }, + "origin": { + "type": "string", + "enum": [ + "trigger", + "action", + "action_task", + "automation" + ] + }, + "schema": { + "type": "string" + }, + "attribute": { + "type": "string" + } + }, + "required": [ + "id", + "origin" + ] + }, + "ActionSchedule": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Schedule Id" + }, + "scheduleApiId": { + "type": "string", + "description": "The id of the configured scheduler which will be added on automation triggered" + }, + "numberOfUnits": { + "type": "number" + }, + "timePeriod": { + "type": "string", + "enum": [ + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "timeRelation": { + "type": "string", + "enum": [ + "after", + "before" + ] + }, + "source": { + "$ref": "#/components/schemas/ActionScheduleSource" + } + }, + "required": [ + "id", + "source" + ] + }, + "AutomationExecutionId": { + "type": "string", + "example": "9baf184f-bc81-4128-bca3-d974c90a12c4" + }, + "AutomationExecution": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/AutomationExecutionId" + }, + "execution_status": { + "$ref": "#/components/schemas/ExecutionStatus" + }, + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "activity_id": { + "$ref": "#/components/schemas/ActivityId" + }, + "entity_snapshot": { + "$ref": "#/components/schemas/EntityItemSnapshot" + }, + "org_id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "flow_id": { + "$ref": "#/components/schemas/AutomationFlowId" + }, + "flow_name": { + "type": "string", + "example": "Handle contact form" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "current_action_id": { + "$ref": "#/components/schemas/AutomationActionId" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActionCondition" + } + }, + "schedules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActionSchedule" + } + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AnyAction" + } + }, + "resume_token": { + "$ref": "#/components/schemas/ResumeToken" + }, + "trigger_context": { + "$ref": "#/components/schemas/TriggerContext" + }, + "version": { + "type": "number", + "description": "Version of the flow", + "example": 2 + }, + "trigger_event": { + "oneOf": [ + { + "$ref": "#/components/schemas/TriggerEventManual" + }, + { + "$ref": "#/components/schemas/TriggerEventEntityActivity" + }, + { + "$ref": "#/components/schemas/TriggerEventEntityOperation" + }, + { + "$ref": "#/components/schemas/TriggerEventFlowAutomationTask" + }, + { + "$ref": "#/components/schemas/TriggerEventMessaging" + } + ] + }, + "workflow_context": { + "$ref": "#/components/schemas/WorkflowExecutionContext" + } + }, + "required": [ + "id", + "status", + "entity_id", + "org_id", + "flow_id", + "actions" + ] + }, + "WorkflowExecutionContext": { + "type": "object", + "required": [ + "workflow_exec_id", + "workflow_role" + ], + "properties": { + "workflow_exec_id": { + "type": "string" + }, + "workflow_exec_task_id": { + "type": "string" + }, + "workflow_role": { + "$ref": "#/components/schemas/WorkflowContextRole" + }, + "_execution_chain": { + "$ref": "#/components/schemas/ExecutionChain" + } + } + }, + "ExecutionChain": { + "type": "object", + "description": "[Internal] Tracks execution chain for infinite loop prevention. This is an internal property and should not be used by external consumers.", + "properties": { + "parent_execution_id": { + "type": "string", + "description": "ID of the parent flow execution that triggered this one" + }, + "parent_task_id": { + "type": "string", + "description": "ID of the automation task that triggered this execution" + }, + "depth": { + "type": "integer", + "description": "Current depth in the execution chain (0 = manual start)" + } + } + }, + "TriggerEventManual": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manual" + ] + }, + "org_id": { + "type": "string", + "example": "123" + }, + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "caller": { + "$ref": "#/components/schemas/ApiCallerContext" + } + }, + "required": [ + "org_id", + "entity_id" + ] + }, + "TriggerEventFlowAutomationTask": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "flow_automation_task" + ] + }, + "org_id": { + "type": "string", + "example": "123" + }, + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "flow_execution_id": { + "type": "string", + "example": "wfwAJoT_cK" + }, + "flow_automation_task_id": { + "type": "string", + "format": "UUID", + "example": "2fa221ec-3aac-4655-ab8f-c062eca44a3" + }, + "caller": { + "$ref": "#/components/schemas/ApiCallerContext" + } + }, + "required": [ + "org_id", + "entity_id", + "flow_execution_id", + "flow_automation_task_id" + ] + }, + "TriggerEventEntityActivity": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "entity_activity" + ] + }, + "org_id": { + "type": "string", + "example": "123" + }, + "activity_id": { + "$ref": "#/components/schemas/ActivityId" + }, + "activity_type": { + "type": "string" + }, + "entity_id": { + "$ref": "#/components/schemas/EntityId" + } + }, + "required": [ + "org_id", + "activity_id", + "activity_type" + ] + }, + "TriggerEventMessaging": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "new_email_thread" + ] + }, + "org_id": { + "type": "string", + "example": "123" + }, + "thread_id": { + "type": "string" + }, + "message_id": { + "type": "string" + }, + "entity_id": { + "$ref": "#/components/schemas/EntityId" + } + }, + "required": [ + "org_id", + "thread_id", + "message_id", + "entity_id" + ] + }, + "TriggerEventEntityOperation": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "entity_operation" + ] + }, + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "org_id": { + "type": "string", + "example": "123" + }, + "activity_id": { + "$ref": "#/components/schemas/ActivityId" + }, + "operation_type": { + "$ref": "#/components/schemas/EntityOperation" + } + }, + "required": [ + "entity_id", + "org_id", + "activity_id", + "operation_type" + ] + }, + "ApiCallerContext": { + "type": "object", + "additionalProperties": true, + "properties": { + "EpilotAuth": { + "type": "object", + "properties": { + "claims": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "example": "10006129" + }, + "sub": { + "type": "string", + "example": "476e9b48-42f4-4234-a2b0-4668b34626ce" + }, + "email": { + "type": "string", + "example": "example@epilot.cloud" + }, + "cognito:username": { + "type": "string", + "example": "example@epilot.cloud" + }, + "custom:ivy_user_id": { + "type": "string", + "example": "10006129" + } + }, + "example": { + "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce", + "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D", + "custom:ivy_org_id": "739224", + "cognito:username": "n.ahmad@epilot.cloud", + "custom:ivy_user_id": "10006129", + "aud": "6e0jbdnger7nmoktaaflarue1l", + "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75", + "token_use": "id", + "auth_time": 1614333023, + "exp": 1614336623, + "iat": 1614333023, + "email": "n.ahmad@epilot.cloud" + } + }, + "userId": { + "type": "string", + "example": "10006129" + }, + "organizationId": { + "type": "string", + "example": "739224" + }, + "token": { + "type": "string", + "example": "eyJraWQiOi..." + } + } + } + } + }, + "ExecutionStatus": { + "type": "string", + "enum": [ + "pending", + "starting", + "in_progress", + "paused", + "success", + "failed", + "cancelled", + "skipped", + "scheduled", + "hot" + ] + }, + "GetExecutionsResp": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AutomationExecution" + } + } + }, + "required": [ + "total", + "results" + ] + }, + "StartExecutionRequest": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "flow_id": { + "$ref": "#/components/schemas/AutomationFlowId" + }, + "workflow_context": { + "$ref": "#/components/schemas/WorkflowExecutionContext" + }, + "flow_execution_id": { + "type": "string", + "deprecated": true, + "description": "Use workflow_context.workflow_exec_id instead" + }, + "flow_automation_task_id": { + "type": "string", + "deprecated": true, + "description": "Use workflow_context.workflow_exec_task_id instead" + } + }, + "required": [ + "entity_id", + "flow_id" + ] + }, + "PatchBulkJobRequest": { + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "APPROVE", + "CANCEL" + ] + }, + "task_token": { + "type": "string" + } + }, + "required": [ + "action", + "task_token" + ] + }, + "BulkTriggerRequest": { + "oneOf": [ + { + "type": "object", + "properties": { + "flow_id": { + "$ref": "#/components/schemas/AutomationFlowId" + }, + "entities_refs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRef" + } + }, + "trigger_context": { + "$ref": "#/components/schemas/TriggerContext" + } + }, + "required": [ + "flow_id", + "entities_refs" + ] + }, + { + "type": "object", + "properties": { + "flow_id": { + "$ref": "#/components/schemas/AutomationFlowId" + }, + "entities_query": { + "type": "string" + }, + "trigger_context": { + "$ref": "#/components/schemas/TriggerContext" + } + }, + "required": [ + "flow_id", + "entities_query" + ] + }, + { + "type": "object", + "properties": { + "flow_id": { + "$ref": "#/components/schemas/AutomationFlowId" + }, + "entities_filter": { + "$ref": "#/components/schemas/EntitySearchFilter" + }, + "trigger_context": { + "$ref": "#/components/schemas/TriggerContext" + } + }, + "required": [ + "flow_id", + "entities_filter" + ] + } + ] + }, + "EntityRef": { + "type": "object", + "required": [ + "entity_id", + "entity_schema" + ], + "properties": { + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "entity_schema": { + "type": "string" + } + } + }, + "BulkTriggerJob": { + "type": "object", + "required": [ + "job_id", + "org_id", + "flow_id", + "status", + "created_by", + "created_at", + "updated_at" + ], + "properties": { + "job_id": { + "$ref": "#/components/schemas/JobId" + }, + "org_id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "flow_id": { + "$ref": "#/components/schemas/AutomationFlowId" + }, + "status": { + "type": "string", + "description": "Status of the bulk trigger automation job\n* approval: Waiting for user approval to start the bulk trigger automation\n* querying_entities: Loading entities in batches\n* entities_loaded: All entities have been loaded and stored\n* executing: Automation execution are currently running\n* monitoring: All executions have been started, now monitoring their completion\n* send_report: Automation executions finished running. Report is being created & sent to the user who initiated the bulk trigger automation\n* finished: Automation executions finished running. Some may have failed. Check the status of each entity.\n* failed: Bulk trigger automation execution failed. Some executions might have started. Check the status of each entity.\n* cancelled: Bulk trigger automation execution was cancelled\n", + "enum": [ + "approval", + "querying_entities", + "entities_loaded", + "executing", + "monitoring", + "send_report", + "finished", + "failed", + "cancelled" + ] + }, + "created_by": { + "type": "string", + "description": "User ID who created the bulk trigger automation job", + "example": "1234" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "approved_at": { + "type": "string", + "description": "Time when the bulk trigger automation executions job was approved", + "format": "date-time" + }, + "trigger_context": { + "$ref": "#/components/schemas/TriggerContext" + }, + "task_token": { + "type": "string", + "description": "Task token to approve/cancel the bulk automation job", + "example": "8c086140-f33e-4bb7-a993-50c0f2402c7b" + }, + "report_file_entity_id": { + "type": "string", + "description": "Entity ID of the report file entity" + }, + "entity_query": { + "type": "object", + "description": "Query configuration for loading entities", + "properties": { + "type": { + "type": "string", + "enum": [ + "refs", + "query", + "filter" + ] + }, + "data": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRef" + } + }, + { + "type": "string" + }, + { + "$ref": "#/components/schemas/EntitySearchFilter" + } + ] + } + }, + "required": [ + "type", + "data" + ] + }, + "pagination_state": { + "type": "object", + "description": "Pagination state for entity loading", + "properties": { + "page_size": { + "type": "integer", + "description": "Number of entities per page" + }, + "pages_processed": { + "type": "integer", + "description": "Number of pages processed so far" + }, + "total_processed": { + "type": "integer", + "description": "Total number of entities processed so far" + }, + "stable_query_id": { + "type": "string", + "description": "Stable query ID for pagination" + }, + "search_after": { + "type": "array", + "description": "Last sort value used for pagination", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "has_more": { + "type": "boolean", + "description": "Whether there are more entities to load" + } + } + }, + "execution_summary": { + "type": "array", + "description": "List of entities & their automation execution id & status", + "items": { + "$ref": "#/components/schemas/ExecItem" + } + } + } + }, + "ExecItem": { + "type": "object", + "description": "Execution item for bulk trigger automation. It maps each entity to its automation execution id & status", + "required": [ + "entity_id", + "execution_status" + ], + "properties": { + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "entity_schema": { + "type": "string" + }, + "execution_id": { + "$ref": "#/components/schemas/AutomationExecutionId" + }, + "execution_status": { + "$ref": "#/components/schemas/ExecutionStatus" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp in UTC ISO format", + "example": "2025-10-30T15:56:47.842Z" + }, + "error": { + "type": "string", + "description": "Error message for the failed automation execution" + } + } + }, + "JobId": { + "type": "string", + "description": "Job ID for tracking the status of bulk trigger automation executions", + "example": "8c086140-f33e-4bb7-a993-50c0f2402c7b" + }, + "EntityId": { + "type": "string", + "example": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74" + }, + "ActivityId": { + "type": "string", + "example": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74" + }, + "OrganizationId": { + "type": "string", + "example": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74" + }, + "TriggerContext": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.", + "example": { + "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" + } + }, + "AutomationTrigger": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "example": "12d4f45a-1883-4841-a94c-5928cb338a94" + } + } + }, + "FlowsTrigger": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationTrigger" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "flows_trigger" + ] + }, + "configuration": { + "type": "object", + "properties": { + "journey_id": { + "type": "string", + "format": "uuid", + "description": "When Journeys are linked to Workflows V2 as Journey Automations, this field will contain the ID of the Journey" + } + } + } + }, + "required": [ + "type" + ] + } + ] + }, + "JourneySubmitTrigger": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationTrigger" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "journey_submission" + ] + }, + "configuration": { + "type": "object", + "properties": { + "source_id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "source_id" + ] + } + }, + "required": [ + "type", + "configuration" + ] + } + ] + }, + "FrontendSubmitTrigger": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationTrigger" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "frontend_submission" + ] + }, + "configuration": { + "type": "object", + "properties": { + "source_id": { + "type": "string", + "example": "99" + } + } + } + }, + "required": [ + "type", + "configuration" + ] + } + ] + }, + "ApiSubmissionTrigger": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationTrigger" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "api_submission" + ] + }, + "configuration": { + "type": "object", + "properties": { + "source_id": { + "type": "string" + } + } + } + }, + "required": [ + "type", + "configuration" + ] + } + ] + }, + "NewEmailThreadTrigger": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationTrigger" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "new_email_thread" + ] + }, + "configuration": { + "type": "object", + "required": [ + "direction" + ], + "properties": { + "shared_inbox_ids": { + "type": "array", + "description": "A list of shared inbox IDs that the email thread should be matched against.", + "items": { + "type": "string" + } + }, + "direction": { + "type": "string", + "description": "Whether the trigger should be matched against only inbound, outbound emails or both.", + "enum": [ + "INBOUND", + "OUTBOUND", + "BOTH" + ] + } + } + } + }, + "required": [ + "type", + "configuration" + ] + } + ] + }, + "ReceivedEmailTrigger": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationTrigger" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "received_email" + ] + }, + "configuration": { + "type": "object", + "properties": { + "message_type": { + "type": "string", + "enum": [ + "RECEIVED" + ] + } + } + } + }, + "required": [ + "type", + "configuration" + ] + } + ] + }, + "EntityOperationTrigger": { + "description": "- If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs.\n- The conditions on a filter follows the event bridge patterns - `https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html`\n | Comparison | Example | Rule syntax |\n |------------------------|-----------------------------------------------------|----------------------------------------------------------|\n | Null | first_name is null | `\"first_name\": [ null ]` |\n | Empty | last_name is empty | `\"last_name\": [\"\"]` |\n | Equals | email is \"j.doe@email.com\" | `\"email\": [ \"j.doe@email.com\" ]` |\n | Equals (ignore case) | first_name is \"John\" | `\"first_name\": [ { \"equals-ignore-case\": \"john\" } ]` |\n | And | fist_name is \"John\" and last_name is \"Doe\" | `\"first_name\": [ \"John\" ], \"last_name\": [\"Doe\"]` |\n | Or | PaymentType is \"Invoice\" or \"SEPA\" | `\"PaymentType\": [ \"invoice\", \"sepa\"]` |\n | Or (multiple fields) | first_name is \"John\", or last_name is \"Doe\". | `\"$or\": [ { \"first_name\": [ \"John\" ] }, { \"last_name\": [ \"Doe\" ] } ]` |\n | Not | status is anything but \"cancelled\" | `\"status\": [ { \"anything-but\": [ \"cancelled\" ] } ]` |\n | Numeric (equals) | Price is 100 | `\"Price\": [ { \"numeric\": [ \"=\", 100 ] } ]` |\n | Numeric (range) | Price is more than 10, and less than or equal to 20 | `\"Price\": [ { \"numeric\": [ \">\", 10, \"<=\", 20 ] } ]` |\n | Exists | ProductName exists | `\"ProductName\": [ { \"exists\": true } ]` |\n | Does not exist | ProductName does not exist | `\"ProductName\": [ { \"exists\": false } ]` |\n | Begins with | OpportunityNumber starts with OPP- | `\"opportunity_number\": [ { \"prefix\": \"OPP-\" } ]` |\n | Ends with | FileName ends with a .png extension | `\"filename\": [ { \"suffix\": \".png\" } ]` |\n | Wildcard | search a string using a wildcard | `\"email\": [ { \"wildcard\": \"*@doe.com\" } ]` |\n - To run the execution on all update events\n ```\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"]\n }\n }\n }\n ```\n - To run the execution only when the updates are from a portal user\n ```\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"]\n },\n \"activity\": {\n \"type\": \"EntityUpdatedFromPortal\"\n }\n }\n }\n ```\n - To run the execution only when there is an update on a specific attribute\n ```\n Only starts the automation when the email on a contact is changed\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"],\n \"payload\": {\n \"_schema\": [\"contact\"]\n },\n \"diff\": {\n \"updated\": {\n \"email\": [{ \"exists\": true }]\n }\n }\n }\n }\n }\n ```\n - To run the execution only when a specific attribute is altered(created/updated/deleted)\n ```\n Only starts the automation when a price is altered on a contract\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"payload\": {\n \"_schema\": [\"contract\"]\n },\n \"diff\": {\n // Whether he first_name has been added, updated, or removed\n $or: [\n {\n 'added.first_name': [{ exists: true }]\n },\n {\n 'updated.first_name': [{ exists: true }]\n },\n {\n 'deleted.first_name': [{ exists: true }]\n }\n ]\n }\n }\n }\n }\n ```\n - To run the execution if an attribute is changed from one state to another\n ```\n Only starts the automation when the order status changes from `open_for_acceptance` to `placed`\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"],\n \"payload\": {\n \"_schema\": [\"order\"],\n \"status\": [\"placed\"]\n },\n \"diff\": {\n \"updated\": {\n \"status\": [\"open_for_acceptance\"]\n }\n }\n }\n }\n }\n ```\n", + "allOf": [ + { + "$ref": "#/components/schemas/AutomationTrigger" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "entity_operation" + ] + }, + "configuration": { + "type": "object", + "properties": { + "schema": { + "type": "string", + "example": "submission" + }, + "operations": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/EntityOperation" + } + }, + "include_activities": { + "type": "array", + "items": { + "type": "string", + "example": [ + "CreateEntity" + ] + } + }, + "exclude_activities": { + "type": "array", + "items": { + "type": "string", + "example": [ + "SyncEntity" + ] + } + }, + "filter_config": { + "type": "object", + "properties": { + "operation": { + "type": "object", + "properties": { + "operation": { + "type": "array", + "description": "Filter on operation type. If not specified, all operations will be matched on execution.\nExample:\n 1. Filter all the createEntity/updateEntity operations\n ```\n {\n \"operation\":{\n \"operation\": [\"createEntity\", \"updateEntity\"]\n }\n }\n ```\n", + "items": { + "$ref": "#/components/schemas/EntityOperation" + } + }, + "payload": { + "$ref": "#/components/schemas/FilterConditionOnEvent" + }, + "diff": { + "anyOf": [ + { + "$ref": "#/components/schemas/OrConditionForDiff" + }, + { + "type": "object", + "description": "Diff to it's prior state when an entity is updated", + "properties": { + "added": { + "$ref": "#/components/schemas/DiffAdded" + }, + "updated": { + "$ref": "#/components/schemas/DiffUpdated" + }, + "deleted": { + "$ref": "#/components/schemas/DiffDeleted" + } + } + } + ] + } + } + }, + "activity": { + "type": "object", + "properties": { + "type": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/EqualsIgnoreCaseCondition" + }, + { + "$ref": "#/components/schemas/AnythingButCondition" + }, + { + "$ref": "#/components/schemas/ExistsCondition" + }, + { + "$ref": "#/components/schemas/PrefixCondition" + }, + { + "$ref": "#/components/schemas/SuffixCondition" + }, + { + "$ref": "#/components/schemas/WildcardCondition" + } + ] + }, + "example": [ + "EntityUpdatedFromPortal", + "EntityUpdated", + "DocUploadedFromPortal" + ], + "description": "Filter on activity type. If not specified, all activities will be matched on execution.\nExample:\n 1. Filter the events when an entity is updated from portal\n ```\n {\n \"activity\":{\n \"type\": [\"EntityUpdatedFromPortal\"]\n }\n }\n ```\n 2. Filter the events when either a doc is uploaded/removed on an entity from a portal\n ```\n {\n \"activity\":{\n \"type\": [\"DocUploadedFromPortal\", \"DocRemovedFromPortal\"]\n }\n }\n ```\n" + } + } + } + } + }, + "ecp_config": { + "type": "object", + "properties": { + "origin": { + "type": "string", + "example": "END_CUSTOMER_PORTAL" + }, + "portal_id": { + "type": "string", + "example": "any-portal-id" + }, + "file_config": { + "type": "object", + "properties": { + "shared_with_end_customer": { + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "required": [ + "type", + "configuration" + ] + } + ] + }, + "ActivityTrigger": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationTrigger" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "activity" + ] + }, + "configuration": { + "type": "object", + "properties": { + "schema": { + "type": "string", + "example": "submission" + }, + "types": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "enum": [ + "CreateMeterReading", + "UpdateMeterReading", + "DocDownloadedFromPortal", + "PortalUserResetPassword", + "PortalUserResetForgotPassword", + "SelfAssignmentFromPortal" + ] + }, + { + "type": "string" + } + ] + } + } + } + } + }, + "required": [ + "type", + "configuration" + ] + } + ] + }, + "EntityOperation": { + "type": "string", + "nullable": true, + "enum": [ + "createEntity", + "updateEntity", + "deleteEntity", + "softDeleteEntity", + "restoreEntity" + ] + }, + "EntitySearchFilter": { + "type": "array", + "description": "A subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.", + "items": { + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "properties": { + "term": { + "description": "Returns documents that contain an exact term in a provided field.\n\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.\n\nYou likely DO NOT want to use this filter on text fields and want to target its .keyword instead.\n", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html" + }, + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": { + "$ref": "#/components/schemas/EntitySearchFilterValue" + }, + "example": { + "_schema": "contact" + } + }, + "terms": { + "description": "Returns documents that contain one of the exact terms in a provided field. See term filter for more info.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html" + }, + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySearchFilterValue" + } + }, + "example": { + "status": [ + "active" + ] + } + }, + "ids": { + "description": "Returns documents based on their IDs.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-ids-query.html" + }, + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "example": { + "values": [ + "550e8400-e29b-41d4-a716-446655440000" + ] + } + }, + "range": { + "description": "Returns documents with fields that have terms within a certain range.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html" + }, + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": { + "type": "object", + "properties": { + "gt": { + "$ref": "#/components/schemas/EntitySearchFilterValue" + }, + "gte": { + "$ref": "#/components/schemas/EntitySearchFilterValue" + }, + "lt": { + "$ref": "#/components/schemas/EntitySearchFilterValue" + }, + "lte": { + "$ref": "#/components/schemas/EntitySearchFilterValue" + }, + "format": { + "type": "string", + "description": "The date format used to parse date values." + }, + "relation": { + "type": "string", + "enum": [ + "INTERSECTS", + "CONTAINS", + "WITHIN" + ], + "description": "Indicates how the range query matches values for range fields." + }, + "time_zone": { + "type": "string", + "description": "Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC." + } + } + }, + "example": { + "_created_at": { + "gte": "2021-01-01T00:00:00.000Z", + "lte": "2021-01-31T23:59:59.999Z" + } + } + }, + "exists": { + "description": "Returns documents that have a value in the specified field.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html" + }, + "type": "object", + "properties": { + "field": { + "type": "string" + } + }, + "required": [ + "field" + ], + "example": { + "field": "_tags" + } + }, + "$and": { + "$ref": "#/components/schemas/EntitySearchFilter" + }, + "$or": { + "$ref": "#/components/schemas/EntitySearchFilter" + }, + "$not": { + "$ref": "#/components/schemas/EntitySearchFilter" + } + } + }, + "example": [ + { + "term": { + "_schema": "contact" + } + }, + { + "terms": { + "status": [ + "active" + ] + } + } + ] + }, + "EntitySearchFilterValue": { + "description": "A filter field value.", + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "EntityManualTrigger": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationTrigger" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "entity_manual" + ] + }, + "configuration": { + "type": "object", + "properties": { + "schema": { + "description": "Which entity type can this automation be triggered from", + "type": "string", + "example": "submission" + } + } + } + }, + "required": [ + "type", + "configuration" + ] + } + ] + }, + "TriggerCondition": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "comparison": { + "$ref": "#/components/schemas/Comparison" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + } + ] + } + }, + "required": [ + "source", + "comparison" + ], + "example": { + "source": "billing_contact.email", + "comparison": "exists" + } + }, + "Comparison": { + "type": "string", + "enum": [ + "equals", + "any_of", + "not_empty", + "is_empty" + ] + }, + "FilterConditionOnEvent": { + "anyOf": [ + { + "$ref": "#/components/schemas/OrCondition" + }, + { + "type": "object", + "description": "- Filter on entity payload that is modified. If not specified, entire entity be matched on execution.\n Example:\n ```\n {\n \"operation\": {\n \"payload\": {\n \"_schema\": [\"contact\"]\n \"address\": {\n \"country\": [\"Germany\"]\n }\n age: [ { \"numeric\": [ \">\", 25, \"<=\", 35 ] } ]\n }\n }\n }\n", + "additionalProperties": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/EqualsIgnoreCaseCondition" + }, + { + "$ref": "#/components/schemas/AnythingButCondition" + }, + { + "$ref": "#/components/schemas/NumericCondition" + }, + { + "$ref": "#/components/schemas/ExistsCondition" + }, + { + "$ref": "#/components/schemas/PrefixCondition" + }, + { + "$ref": "#/components/schemas/SuffixCondition" + }, + { + "$ref": "#/components/schemas/WildcardCondition" + } + ] + } + } + } + ] + }, + "EqualsIgnoreCaseCondition": { + "type": "object", + "properties": { + "equals-ignore-case": { + "type": "string" + } + } + }, + "AnythingButCondition": { + "type": "object", + "properties": { + "anything-but": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "NumericCondition": { + "type": "object", + "properties": { + "numeric": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + } + }, + "ExistsCondition": { + "type": "object", + "properties": { + "exists": { + "type": "boolean" + } + } + }, + "PrefixCondition": { + "type": "object", + "properties": { + "prefix": { + "type": "string" + } + } + }, + "SuffixCondition": { + "type": "object", + "properties": { + "suffix": { + "type": "string" + } + } + }, + "WildcardCondition": { + "type": "object", + "properties": { + "wildcard": { + "type": "string" + } + } + }, + "OrCondition": { + "type": "object", + "properties": { + "$or": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterConditionOnEvent" + } + } + } + }, + "DiffAdded": { + "$ref": "#/components/schemas/FilterConditionOnEvent" + }, + "DiffUpdated": { + "$ref": "#/components/schemas/FilterConditionOnEvent" + }, + "DiffDeleted": { + "$ref": "#/components/schemas/FilterConditionOnEvent" + }, + "OrConditionForDiff": { + "type": "object", + "properties": { + "$or": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DiffAdded" + }, + { + "$ref": "#/components/schemas/DiffUpdated" + }, + { + "$ref": "#/components/schemas/DiffDeleted" + } + ] + } + } + } + }, + "EntityItemSnapshot": { + "type": "object", + "properties": { + "_id": { + "$ref": "#/components/schemas/EntityId" + }, + "_title": { + "type": "string" + }, + "_org": { + "type": "string" + }, + "_schema": { + "type": "string" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "_created_at": { + "type": "string", + "format": "date-time" + }, + "_updated_at": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": true, + "required": [ + "_id", + "_title", + "_org", + "_schema", + "_created_at", + "_updated_at" + ] + }, + "RetryReq": { + "type": "object", + "properties": { + "condition_id": { + "type": "string", + "description": "The condition id to retry when retry strategy is RETRY_ALL_PARENT_CONDITION_ACTIONS" + }, + "retry_strategy": { + "$ref": "#/components/schemas/RetryStrategy" + } + } + }, + "ResumeToken": { + "type": "string", + "description": "A unique token to resume a paused automation execution", + "example": "eyJraWQiOiJrZXkifQ==" + }, + "ResumeReq": { + "type": "object", + "additionalProperties": false, + "properties": { + "resume_token": { + "$ref": "#/components/schemas/ResumeToken" + } + }, + "required": [ + "resume_token" + ] + }, + "ResumeResp": { + "type": "object", + "properties": { + "execution": { + "$ref": "#/components/schemas/AutomationExecution" + }, + "resumedAction": { + "$ref": "#/components/schemas/AnyAction" + } + }, + "required": [ + "execution", + "resumedAction" + ] + }, + "ErrorObject": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "description": "The HTTP status code of the error", + "example": 400 + }, + "error": { + "type": "string", + "description": "The error message" + } + } + } + }, + "responses": { + "NotFoundError": { + "description": "The requested resource was not found", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorObject" + }, + { + "example": { + "status": 404, + "error": "Not Found" + } + } + ] + } + } + } + }, + "ForbiddenError": { + "description": "The requested resource is forbidden", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorObject" + }, + { + "example": { + "status": 403, + "error": "Forbidden" + } + } + ] + } + } + } + } + } + }, + "servers": [ + { + "url": "https://automation.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/billing.json b/packages/cli/definitions/billing.json new file mode 100644 index 00000000..969848c6 --- /dev/null +++ b/packages/cli/definitions/billing.json @@ -0,0 +1,837 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Billing API", + "description": "API to manage billing data for epilot contracts and orders", + "version": "1.0.0" + }, + "tags": [ + { + "name": "Billing Events", + "description": "Manage installments, payments and reimbursements" + }, + { + "name": "Contracts", + "description": "Manage contracts within 360" + }, + { + "name": "Balance", + "description": "Get customer balance" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v1/billing/events": { + "get": { + "operationId": "getBillingEvents", + "summary": "getBillingEvents", + "description": "Get and filter billing events such as installments and reimbursements.", + "tags": [ + "Billing Events" + ], + "parameters": [ + { + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "number", + "description": "Initial offset to set for the search results", + "example": 0, + "default": 0 + } + }, + { + "in": "query", + "name": "size", + "required": false, + "schema": { + "type": "number", + "description": "Size of the search results", + "example": 100, + "default": 100 + } + }, + { + "name": "entity_id", + "in": "query", + "description": "Entity ID to filter billing events by", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "event_type", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "installment", + "reimbursement" + ], + "description": "Type of billing event to filter by" + } + }, + { + "name": "date_after", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "description": "List billing events after this date" + } + }, + { + "name": "date_before", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "description": "List billing events before this date" + } + } + ], + "responses": { + "200": { + "description": "List of billing events", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hits": { + "type": "integer" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BillingEvent" + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createBillingEvent", + "summary": "createBillingEvent", + "description": "Create a new billing event.", + "tags": [ + "Billing Events" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BillingEvent" + } + ] + } + } + } + }, + "responses": { + "201": { + "description": "Billing event created successfully", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BillingEvent" + } + ] + } + } + } + } + } + } + }, + "/v1/billing/events/{id}": { + "get": { + "operationId": "getBillingEvent", + "summary": "getBillingEvent", + "description": "Get a single billing event by ID.", + "tags": [ + "Billing Events" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "ID of the billing event to get", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Billing Event", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingEvent" + } + } + } + } + } + }, + "patch": { + "operationId": "updateBillingEvent", + "summary": "updateBillingEvent", + "description": "Update an existing billing event.", + "tags": [ + "Billing Events" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "ID of the billing event to update", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Billing Event updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingEvent" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteBillingEvent", + "summary": "deleteBillingEvent", + "description": "Delete an existing billing event.", + "tags": [ + "Billing Events" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "ID of the billing event to delete", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Billing Event deleted successfully" + } + } + } + }, + "/v1/billing/external/{external_id}": { + "get": { + "operationId": "getBillingEventByExternalId", + "summary": "getBillingEventByExternalId", + "description": "Get a single billing event by External ID.", + "tags": [ + "Billing Events" + ], + "parameters": [ + { + "name": "external_id", + "in": "path", + "required": true, + "description": "ID of the billing event to get", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Billing Event", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingEvent" + } + } + } + } + } + } + }, + "/v1/billing/contracts": { + "post": { + "operationId": "createContractEntity", + "summary": "createContractEntity", + "description": "Create a new contract entity.", + "tags": [ + "Contracts" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract" + } + } + } + }, + "responses": { + "201": { + "description": "Contract created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContractItem" + } + } + } + } + } + } + }, + "/v1/billing/contracts/{id}": { + "patch": { + "operationId": "updateContractEntity", + "summary": "updateContractEntity", + "description": "Update an existing contract entity.", + "tags": [ + "Contracts" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "ID of the contract entity to update", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract" + } + } + } + }, + "responses": { + "200": { + "description": "Contract updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContractItem" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteContractEntity", + "summary": "deleteContractEntity", + "description": "Delete an existing contract entity.", + "tags": [ + "Contracts" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "ID of the contract entity to delete", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Contract deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContractItem" + } + } + } + } + } + } + }, + "/v1/billing/customers/{id}/balance": { + "get": { + "operationId": "getCustomerBalance", + "summary": "getCustomerBalance", + "description": "Get total balance across all contracts and orders of a customer entity.", + "tags": [ + "Balance" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Customer entity ID (contact or account)", + "required": true, + "schema": { + "type": "string", + "example": "1e3f0d58-69d2-4dbb-9a43-3ee63d862e8e" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Balance" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Epilot 360 Bearer Token", + "bearerFormat": "JWT" + } + }, + "schemas": { + "BaseEntity": { + "type": "object", + "additionalProperties": true, + "properties": { + "_id": { + "$ref": "#/components/schemas/EntityId" + }, + "_title": { + "type": "string", + "description": "Title of entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to" + }, + "_schema": { + "$ref": "#/components/schemas/EntitySlug" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "_created_at": { + "type": "string" + }, + "_updated_at": { + "type": "string" + } + } + }, + "EntityId": { + "type": "string", + "description": "Entity ID", + "example": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "EntitySlug": { + "description": "URL-friendly identifier for the entity schema", + "type": "string", + "enum": [ + "contact", + "contract", + "file", + "order", + "opportunity", + "product", + "price", + "meter", + "meter_counter", + "billing_event" + ], + "example": "contact" + }, + "EntityRelationItem": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "description": "Entity ID for the related contract.", + "example": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + } + }, + "BaseBillingEvent": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + } + ], + "description": "A base billing event to be inherited by all billing events.", + "type": "object", + "required": [ + "type", + "contract", + "billing_amount", + "billing_amount_decimal", + "billing_currency" + ], + "additionalProperties": true, + "properties": { + "billing_amount": { + "type": "integer", + "description": "Amount to be paid in cents i.e. precision 2", + "example": 10050 + }, + "billing_amount_decimal": { + "type": "string", + "description": "Amount to be paid in cents in decimal string representation", + "example": "100.50" + }, + "billing_currency": { + "$ref": "#/components/schemas/Currency" + }, + "external_id": { + "type": "string", + "description": "Unique identifier for event, used to reference the event to a 3rd party resource such as a SAP Installment.", + "example": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e" + }, + "contract": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelationItem" + } + } + } + } + } + }, + "InstallmentEvent": { + "description": "An entity that describes an installment billing event.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseBillingEvent" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "installment" + ], + "description": "Type of the billing event.", + "example": "installment" + }, + "due_date": { + "type": "string", + "format": "date-time", + "description": "Date on which the installment is due." + }, + "paid_date": { + "type": "string", + "format": "date-time", + "description": "Date on which the installment is paid by the customer." + } + }, + "required": [ + "due_date" + ] + } + ] + }, + "ReimbursementEvent": { + "description": "An entity that describes a reimbursement billing event.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseBillingEvent" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "reimbursement" + ], + "description": "Type of the billing event.", + "example": "reimbursement" + }, + "paid_date": { + "type": "string", + "format": "date-time", + "description": "Date on which the customer is reimbursed." + } + } + } + ] + }, + "BillingEvent": { + "description": "An entity that describes a billing event such as a future installment or a reimbursement back to the customer.", + "oneOf": [ + { + "$ref": "#/components/schemas/InstallmentEvent" + }, + { + "$ref": "#/components/schemas/ReimbursementEvent" + } + ] + }, + "Contract": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "type": "object", + "properties": { + "contract_name": { + "type": "string", + "description": "The name of the contract.", + "example": "Grid Contract" + }, + "contract_number": { + "type": "string", + "description": "The unique identifier of the contract.", + "example": "12345" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "in_approval_process", + "approved", + "active", + "deactivated", + "revoked", + "terminated", + "expired" + ], + "default": "draft", + "description": "The status of the contract.", + "example": "approved" + }, + "description": { + "type": "string", + "description": "A brief description of the contract.", + "example": "This contract is for the supply of widgets." + }, + "account_number": { + "type": "string", + "description": "The account number associated with the contract.", + "example": "67890" + }, + "branch": { + "type": "string", + "enum": [ + "power", + "gas", + "water", + "waste_water", + "district_heating" + ], + "description": "The branch associated with the contract.", + "example": "power" + }, + "billing_address": { + "type": "string", + "description": "The billing address associated with the contract.", + "example": "123 Main St, Anytown" + }, + "delivery_address": { + "type": "string", + "description": "The delivery address associated with the contract.", + "example": "456 Elm St, Anytown" + }, + "additional_addresses": { + "type": "string", + "description": "Any additional addresses associated with the contract.", + "example": "789 Oak St, Anytown" + }, + "termination_date": { + "type": "string", + "description": "The date on which the contract was terminated.", + "example": "2022-01-01" + }, + "termination_reason": { + "type": "string", + "description": "The reason for the termination of the contract.", + "example": "Non-payment" + }, + "billing_period": { + "type": "string", + "enum": [ + "weekly", + "monthly", + "every_quarter", + "every_6_months", + "yearly" + ], + "default": "weekly", + "description": "The billing period associated with the contract.", + "example": "monthly" + }, + "billing_duration_amount": { + "type": "number", + "minimum": 0, + "description": "The duration of the billing period.", + "example": 30 + }, + "renewal_duration_amount": { + "type": "number", + "minimum": 0, + "description": "The duration of the renewal period.", + "example": 365 + }, + "renewal_duration_unit": { + "type": "string", + "enum": [ + "weeks", + "months", + "years" + ], + "default": "months", + "description": "The unit of time for the renewal period.", + "example": "years" + }, + "notice_time_amount": { + "type": "number", + "minimum": 0, + "description": "The amount of notice required for termination of the contract.", + "example": 30 + }, + "notice_time_unit": { + "type": "string", + "enum": [ + "weeks", + "months", + "years" + ], + "default": "months", + "description": "The unit of time for the notice period.", + "example": "months" + }, + "start_date": { + "type": "string", + "description": "The start date of the contract.", + "example": "2021-01-01" + }, + "billing_due_day": { + "type": "integer", + "description": "Defines the day of the month in which the installments are due.", + "minimum": 1, + "maximum": 31, + "example": 2 + }, + "installment_amount": { + "type": "integer", + "description": "Set amount for installments in cents. (precision 2)", + "example": 10050 + }, + "balance": { + "type": "integer", + "description": "Current balance of the contract in cents. (precision 2)", + "example": 8990 + }, + "balance_currency": { + "$ref": "#/components/schemas/Currency" + } + } + } + ] + }, + "ContractItem": { + "allOf": [ + { + "$ref": "#/components/schemas/Contract" + } + ], + "required": [ + "_id", + "_title", + "_org", + "_created_at", + "_updated_at" + ] + }, + "Balance": { + "type": "object", + "properties": { + "balance": { + "type": "integer", + "description": "Current balance of the customer in cents. (precision 2)", + "example": 8990 + }, + "balance_decimal": { + "type": "string", + "description": "Current balance of the customer in decimal string representation.", + "example": "89.90" + }, + "balance_currency": { + "$ref": "#/components/schemas/Currency" + } + } + }, + "Currency": { + "type": "string", + "description": "Currency code in ISO 4217 format", + "example": "EUR" + } + } + }, + "servers": [ + { + "url": "https://billing.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/blueprint-manifest.json b/packages/cli/definitions/blueprint-manifest.json new file mode 100644 index 00000000..919369d9 --- /dev/null +++ b/packages/cli/definitions/blueprint-manifest.json @@ -0,0 +1,3376 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Blueprint Manifest API", + "version": "4.5.0", + "description": "Service to create and install Blueprint Manifest files" + }, + "tags": [ + { + "name": "Jobs", + "description": "Manage Export and Import Jobs" + }, + { + "name": "Export", + "description": "Export a Blueprint Manifest" + }, + { + "name": "Import", + "description": "Install or update a Blueprint Manifest" + }, + { + "name": "Manifests", + "description": "Manage installed Manifests" + }, + { + "name": "Blueprints", + "description": "Manage Custom and Installed Blueprints" + }, + { + "name": "Installations", + "description": "Manage installation jobs" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "servers": [ + { + "url": "https://blueprint-manifest.sls.epilot.io" + } + ], + "paths": { + "/v1/blueprint-manifest/jobs/{job_id}": { + "get": { + "operationId": "getJob", + "summary": "getJob", + "description": "Get the current status of a blueprint (export or import)", + "deprecated": true, + "tags": [ + "Jobs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/JobID" + } + ], + "responses": { + "200": { + "description": "Current status of the blueprint", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + } + } + } + }, + "/v1/blueprint-manifest/jobs:createExport": { + "post": { + "operationId": "createExport", + "summary": "createExport", + "description": "Creates a new Export Job with a list of available resources to export from the passed root resource.\n\nMultiple root resources can be added by calling this multiple times with the same jobId\n", + "deprecated": true, + "tags": [ + "Export" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ResourceNodeType" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + }, + "minItems": 1 + }, + "jobId": { + "$ref": "#/components/schemas/JobID" + }, + "isExportingMultipleResources": { + "type": "boolean", + "description": "Temporary flag to indicate if multiple resources are being exported" + }, + "pipelineId": { + "type": "string", + "description": "Pipeline ID selected when doing the sandbox sync" + }, + "manifestId": { + "type": "string", + "description": "ID of the installed manifest to load the resource addresses from" + } + }, + "required": [ + "resources" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Created Export Job ID", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "jobId": { + "$ref": "#/components/schemas/JobID" + } + } + } + } + } + } + } + } + }, + "/v1/blueprint-manifest/jobs/{job_id}:exportManifest": { + "post": { + "operationId": "exportManifest", + "summary": "exportManifest", + "description": "Triggers exporting a manifest file using selected resoruce ids for a job created with `createExportJob`", + "deprecated": true, + "tags": [ + "Export" + ], + "parameters": [ + { + "$ref": "#/components/parameters/JobID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "selectedResourceIds": { + "description": "An array of resource IDs to export", + "type": "array", + "items": { + "type": "string" + } + }, + "resourceName": { + "type": "string", + "example": "journey_HouseConnectionJourney" + }, + "metadata": { + "type": "object", + "properties": { + "markdown": { + "type": "object", + "properties": { + "manifest": { + "type": "string" + }, + "preinstall": { + "type": "string" + }, + "postinstall": { + "type": "string" + } + } + }, + "docs_link": { + "type": "string" + }, + "source_blueprint_name": { + "type": "string" + }, + "source_blueprint_slug": { + "type": "string" + }, + "source_blueprint_version": { + "type": "string" + } + } + }, + "isExportingMultipleResources": { + "type": "boolean", + "description": "Temporary flag to indicate if multiple resources are being exported" + }, + "generateAISummary": { + "type": "boolean", + "default": false + }, + "language": { + "type": "string", + "enum": [ + "en", + "de" + ] + } + }, + "required": [ + "resourceName", + "selectedResourceIds" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Export Job ID", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "jobId": { + "$ref": "#/components/schemas/JobID" + } + } + } + } + } + } + } + } + }, + "/v1/blueprint-manifest:uploadManifest": { + "post": { + "operationId": "uploadManifest", + "summary": "uploadManifest", + "description": "Create pre-signed S3 URL to upload a manifest file.\n", + "tags": [ + "Import" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UploadFilePayload" + } + } + } + }, + "responses": { + "201": { + "description": "Pre-signed URL for POST / PUT upload", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + }, + "upload_url": { + "type": "string", + "format": "url", + "example": "https://epilot-dev-blueprints.s3.eu-central-1.amazonaws.com/templates/document.pdf" + } + } + } + } + } + } + } + } + }, + "/v1/blueprint-manifest/jobs:createPlan": { + "post": { + "operationId": "createPlan", + "summary": "createPlan", + "description": "Creates a new import job from an uploaded manifest file and returns the plan.\n\nCreates an updated plan for an installed manifest when `manifest_id` is passed\n", + "deprecated": true, + "tags": [ + "Import" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "properties": { + "s3ref": { + "allOf": [ + { + "description": "s3ref of manifest file uploaded via `uploadManifest`" + }, + { + "$ref": "#/components/schemas/S3Reference" + } + ] + }, + "manifest_id": { + "allOf": [ + { + "description": "Update an existing manifest (optional)" + }, + { + "$ref": "#/components/schemas/ManifestID" + } + ] + }, + "job_id": { + "allOf": [ + { + "description": "Continue a previous job" + }, + { + "$ref": "#/components/schemas/JobID" + } + ] + }, + "source": { + "allOf": [ + { + "description": "Source of the manifest" + }, + { + "$ref": "#/components/schemas/ManifestSource" + } + ] + }, + "resourcesToIgnore": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of resources to ignore changes for" + }, + "resourceReplacements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceReplacement" + }, + "description": "List of resource replacements to apply during import" + }, + "deployedFrom": { + "type": "object", + "properties": { + "sourceOrganizationId": { + "type": "string" + }, + "sourceManifestId": { + "type": "string" + }, + "sourceOrganizationType": { + "type": "string", + "enum": [ + "sandbox", + "production" + ] + } + }, + "required": [ + "sourceOrganizationId", + "sourceManifestId", + "sourceOrganizationType" + ] + } + }, + "required": [ + "s3ref" + ] + }, + { + "type": "object", + "deprecated": true, + "properties": { + "manifestFilePath": { + "deprecated": true, + "description": "Manifest s3 key uploaded via `uploadManifest`", + "type": "string" + }, + "manifest_id": { + "allOf": [ + { + "description": "Update an existing manifest (optional)" + }, + { + "$ref": "#/components/schemas/ManifestID" + } + ] + }, + "job_id": { + "allOf": [ + { + "description": "Continue a previous job" + }, + { + "$ref": "#/components/schemas/JobID" + } + ] + }, + "source": { + "allOf": [ + { + "description": "Source of the manifest" + }, + { + "$ref": "#/components/schemas/ManifestSource" + } + ] + }, + "resourcesToIgnore": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of resources to ignore changes for" + }, + "resourceReplacements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceReplacement" + }, + "description": "List of resource replacements to apply during import" + }, + "deployedFrom": { + "type": "object", + "properties": { + "sourceOrganizationId": { + "type": "string" + }, + "sourceManifestId": { + "type": "string" + }, + "sourceOrganizationType": { + "type": "string", + "enum": [ + "sandbox", + "production" + ] + } + }, + "required": [ + "sourceOrganizationId", + "sourceManifestId", + "sourceOrganizationType" + ] + } + }, + "required": [ + "manifestFilePath" + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Created Import Job ID", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "jobId": { + "type": "string", + "example": "4854bb2a-94f9-424d-a968-3fb17fb0bf89" + } + } + } + } + } + } + } + } + }, + "/v1/blueprint-manifest/jobs/{job_id}:applyPlan": { + "post": { + "operationId": "applyPlan", + "summary": "applyPlan", + "description": "Apply a plan returned by `createPlan`.", + "deprecated": true, + "tags": [ + "Import" + ], + "parameters": [ + { + "$ref": "#/components/parameters/JobID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "resourcesToIgnore": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of resources to ignore changes for" + }, + "resourceReplacements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceReplacement" + }, + "description": "List of resource replacements to apply during import" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Applied Import Job ID", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "jobId": { + "$ref": "#/components/schemas/JobID" + } + } + } + } + } + } + } + } + }, + "/v1/blueprint-manifest/manifests": { + "get": { + "operationId": "listInstalledManifests", + "summary": "listInstalledManifests", + "description": "List Blueprint Manifests installed to the organization", + "deprecated": true, + "tags": [ + "Manifests" + ], + "responses": { + "200": { + "description": "Installed Blueprint Manifests in the organization", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "example": 1 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ManifestItem" + } + } + } + } + } + } + } + } + } + }, + "/v1/blueprint-manifest/manifests/{manifest_id}": { + "get": { + "operationId": "getManifest", + "summary": "getManifest", + "description": "Get installed Manifest by ID", + "deprecated": true, + "tags": [ + "Manifests" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "manifest_id", + "schema": { + "$ref": "#/components/schemas/ManifestID" + } + } + ], + "responses": { + "200": { + "description": "Installed Blueprint Manifest in the Organization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Manifest" + } + } + } + } + } + }, + "put": { + "operationId": "updateManifest", + "summary": "updateManifest", + "description": "Update an installed manifest\n", + "deprecated": true, + "tags": [ + "Manifests" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "manifest_id", + "schema": { + "$ref": "#/components/schemas/ManifestID" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PutManifestPayload" + } + } + } + }, + "responses": { + "200": { + "description": "The updated Manifest", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Manifest" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteManifest", + "summary": "deleteManifest", + "description": "Remove installed manifest from the org\n\nNote that this does not delete the installed resources of the Manifest!\n", + "deprecated": true, + "tags": [ + "Manifests" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "manifest_id", + "schema": { + "$ref": "#/components/schemas/ManifestID" + } + } + ], + "responses": { + "200": { + "description": "The deleted Manifest", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Manifest" + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/blueprints": { + "get": { + "operationId": "listBlueprints", + "summary": "listBlueprints", + "description": "List Custom and Installed Blueprints", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "name": "archived", + "in": "query", + "description": "Filter blueprints by archived status. If true, returns only archived blueprints. If false or not provided, returns only non-archived blueprints.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Blueprints", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "example": 1 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Blueprint" + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createBlueprint", + "summary": "createBlueprint", + "description": "Create a Blueprint", + "tags": [ + "Blueprints" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Blueprint" + } + } + } + }, + "responses": { + "200": { + "description": "Created Blueprint", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Blueprint" + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/blueprints:marketplace": { + "get": { + "operationId": "listInstalledMarketplaceBlueprints", + "summary": "listInstalledMarketplaceBlueprints", + "description": "List installed Marketplace Blueprints for the organization.\nWhen multiple blueprints have the same slug, returns only the most recently created one.\n", + "tags": [ + "Blueprints" + ], + "responses": { + "200": { + "description": "Installed Marketplace Blueprints", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "example": 1 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstalledMarketplaceBlueprintItem" + } + } + } + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/blueprints:pre-install": { + "post": { + "operationId": "preInstallBlueprint", + "summary": "preInstallBlueprint", + "description": "Pre-install a Blueprint based on a blueprint file", + "tags": [ + "Blueprints" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "blueprint_file": { + "type": "string", + "description": "URL to the blueprint zip file" + }, + "source_blueprint_type": { + "type": "string", + "enum": [ + "marketplace" + ] + }, + "slug": { + "type": "string", + "description": "Slug to enforce in this blueprint. Used in marketplace blueprints to keep it consistent with webflow." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Blueprint preview data for UI display", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlueprintPreview" + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/blueprints:preview/{preview_id}": { + "get": { + "operationId": "getBlueprintPreview", + "summary": "getBlueprintPreview", + "description": "Get Blueprint Preview by ID", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "preview_id", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Blueprint Preview", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlueprintPreview" + } + } + } + }, + "404": { + "description": "Blueprint Preview not found" + } + } + } + }, + "/v2/blueprint-manifest/blueprint:install": { + "post": { + "operationId": "installBlueprint", + "summary": "installBlueprint", + "description": "Kick off a new blueprint installation job. Returns 202 Accepted with Location header pointing to the job resource\n", + "tags": [ + "Blueprints" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "source_org_id": { + "type": "string" + }, + "source_blueprint_id": { + "$ref": "#/components/schemas/BlueprintID" + }, + "source_blueprint_file": { + "type": "string", + "description": "URL to the blueprint zip file" + }, + "destination_org_id": { + "type": "string" + }, + "destination_blueprint_id": { + "$ref": "#/components/schemas/BlueprintID" + }, + "options": { + "$ref": "#/components/schemas/BlueprintInstallationJobOptions" + }, + "mode": { + "type": "string", + "enum": [ + "simple", + "advanced" + ], + "description": "Installation mode" + }, + "source_blueprint_type": { + "type": "string", + "enum": [ + "marketplace" + ] + }, + "slug": { + "type": "string", + "description": "Slug to enforce in this blueprint. Used in marketplace blueprints to keep it consistent with webflow." + } + }, + "required": [ + "mode" + ] + } + } + } + }, + "responses": { + "202": { + "description": "Blueprint installation job started", + "headers": { + "Location": { + "description": "URL to poll the job", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "job_id": { + "$ref": "#/components/schemas/BlueprintJobID" + }, + "destination_blueprint_id": { + "$ref": "#/components/schemas/BlueprintID" + } + } + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/blueprints/{blueprint_id}": { + "get": { + "operationId": "getBlueprint", + "summary": "getBlueprint", + "description": "Get Blueprint by ID", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "blueprint_id", + "schema": { + "$ref": "#/components/schemas/BlueprintID" + } + } + ], + "responses": { + "200": { + "description": "Blueprint", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Blueprint" + } + } + } + } + } + }, + "put": { + "operationId": "updateBlueprint", + "summary": "updateBlueprint", + "description": "Update a Blueprint", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "blueprint_id", + "schema": { + "$ref": "#/components/schemas/BlueprintID" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Blueprint" + } + } + } + }, + "responses": { + "200": { + "description": "Updated Blueprint", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Blueprint" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteBlueprint", + "summary": "deleteBlueprint", + "description": "Delete a Blueprint", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "blueprint_id", + "schema": { + "$ref": "#/components/schemas/BlueprintID" + } + } + ], + "responses": { + "200": { + "description": "Deleted Blueprint", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Blueprint" + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/blueprints/{blueprint_id}/validate": { + "post": { + "operationId": "validateBlueprint", + "summary": "validateBlueprint", + "description": "Start a blueprint validation job. Validates Terraform for the blueprint (all types).\nReturns 202 Accepted with job_id. Poll GET /jobs/{job_id} for status, valid, and errors.\n", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "blueprint_id", + "schema": { + "$ref": "#/components/schemas/BlueprintID" + } + } + ], + "responses": { + "202": { + "description": "Validation job started", + "headers": { + "Location": { + "description": "URL to poll the job", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "job_id": { + "$ref": "#/components/schemas/BlueprintJobID" + } + } + } + } + } + }, + "404": { + "description": "Blueprint not found" + } + } + } + }, + "/v2/blueprint-manifest/blueprints/{blueprint_id}:export": { + "post": { + "operationId": "exportBlueprint", + "summary": "exportBlueprint", + "description": "Kick off a new blueprint export job. Returns 202 Accepted with Location header pointing to the job resource.\n", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "blueprint_id", + "schema": { + "$ref": "#/components/schemas/BlueprintID" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "destination_org_id": { + "type": "string" + }, + "destination_blueprint_id": { + "type": "string" + }, + "validate": { + "type": "boolean", + "description": "When true, run terraform validate before creating the export zip. If validation fails, the job will be marked as FAILED with errors." + } + } + } + } + } + }, + "responses": { + "202": { + "description": "Blueprint export job started", + "headers": { + "Location": { + "description": "URL to poll the job", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "job_id": { + "$ref": "#/components/schemas/BlueprintJobID" + } + } + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/blueprints/{blueprint_id}:format-description": { + "post": { + "operationId": "formatBlueprintDescription", + "summary": "formatBlueprintDescription", + "description": "Format a blueprint description as markdown using AI.\n", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "blueprint_id", + "schema": { + "$ref": "#/components/schemas/BlueprintID" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string", + "description": "Plain text to format as markdown" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successfully formatted description", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "markdown": { + "type": "string", + "description": "AI-formatted markdown content" + } + } + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources": { + "post": { + "operationId": "addBlueprintResource", + "summary": "addBlueprintResource", + "description": "Add a resource to a Blueprint", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "blueprint_id", + "schema": { + "$ref": "#/components/schemas/BlueprintID" + } + }, + { + "in": "query", + "name": "add_dependencies", + "schema": { + "type": "boolean", + "default": false, + "description": "Whether to add this resource dependencies to the blueprint automatically" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + } + }, + "responses": { + "200": { + "description": "Added Blueprint Resource", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + } + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources:syncDependencies": { + "post": { + "operationId": "syncDependencies", + "summary": "syncDependencies", + "description": "Sync dependencies of all root resources in a Blueprint", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "blueprint_id", + "schema": { + "$ref": "#/components/schemas/BlueprintID" + } + } + ], + "responses": { + "202": { + "description": "Dependencies sync job started", + "headers": { + "Location": { + "description": "URL to poll the job", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "job_id": { + "$ref": "#/components/schemas/BlueprintJobID" + } + } + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources/bulk": { + "post": { + "operationId": "bulkAddBlueprintResources", + "summary": "bulkAddBlueprintResources", + "description": "Bulk Add resources in a Blueprint", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "blueprint_id", + "schema": { + "$ref": "#/components/schemas/BlueprintID" + } + }, + { + "in": "query", + "name": "add_dependencies", + "schema": { + "type": "boolean", + "default": false, + "description": "Whether to add this resource dependencies to the blueprint automatically" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + } + } + }, + "responses": { + "200": { + "description": "Bulk updated Blueprint Resources", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "bulkUpdateBlueprintResources", + "summary": "bulkUpdateBlueprintResources", + "description": "Bulk update resources in a Blueprint", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "blueprint_id", + "schema": { + "$ref": "#/components/schemas/BlueprintID" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + } + } + }, + "responses": { + "200": { + "description": "Bulk updated Blueprint Resources", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "bulkDeleteBlueprintResources", + "summary": "bulkDeleteBlueprintResources", + "description": "Bulk delete resources in a Blueprint", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "blueprint_id", + "schema": { + "$ref": "#/components/schemas/BlueprintID" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResourceID" + } + } + } + } + }, + "responses": { + "200": { + "description": "Bulk deleted Blueprint Resources", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + } + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources/{resource_id}": { + "put": { + "operationId": "updateBlueprintResource", + "summary": "updateBlueprintResource", + "description": "Update a resource in a Blueprint", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "blueprint_id", + "schema": { + "$ref": "#/components/schemas/BlueprintID" + } + }, + { + "in": "path", + "required": true, + "name": "resource_id", + "schema": { + "$ref": "#/components/schemas/BlueprintResourceID" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + } + }, + "responses": { + "200": { + "description": "Updated Blueprint Resource", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "deleteBlueprintResource", + "summary": "deleteBlueprintResource", + "description": "Delete a resource from a Blueprint", + "tags": [ + "Blueprints" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "blueprint_id", + "schema": { + "$ref": "#/components/schemas/BlueprintID" + } + }, + { + "in": "path", + "required": true, + "name": "resource_id", + "schema": { + "$ref": "#/components/schemas/BlueprintResourceID" + } + } + ], + "responses": { + "200": { + "description": "Deleted Blueprint Resource", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + } + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/jobs": { + "get": { + "operationId": "listBlueprintJobs", + "summary": "List Blueprint Jobs", + "description": "List all blueprint jobs", + "tags": [ + "Jobs" + ], + "responses": { + "200": { + "description": "Blueprint jobs", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "example": 1 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintJob" + } + } + } + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/jobs/{job_id}": { + "get": { + "operationId": "getBlueprintJob", + "summary": "Get Job", + "description": "Poll current state of a job.", + "tags": [ + "Jobs" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "job_id", + "schema": { + "$ref": "#/components/schemas/BlueprintJobID" + } + } + ], + "responses": { + "200": { + "description": "Job status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlueprintJob" + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/jobs/{job_id}:continue": { + "post": { + "operationId": "continueInstallationJob", + "summary": "Continue Installation Job", + "description": "Continue an installation job if it is waiting for user action.", + "tags": [ + "Jobs" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "job_id", + "schema": { + "$ref": "#/components/schemas/BlueprintJobID" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlueprintInstallationJobOptions" + } + } + } + }, + "responses": { + "200": { + "description": "Blueprint installation job continued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlueprintInstallationJob" + } + } + } + } + } + } + }, + "/v2/blueprint-manifest/jobs/{job_id}:cancel": { + "post": { + "operationId": "cancelBlueprintJob", + "summary": "Cancel Blueprint Job", + "description": "Cancel a blueprint job if it is still running.", + "tags": [ + "Jobs" + ], + "parameters": [ + { + "in": "path", + "required": true, + "name": "job_id", + "schema": { + "$ref": "#/components/schemas/BlueprintJobID" + } + } + ], + "responses": { + "200": { + "description": "Blueprint job cancelled", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlueprintJob" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "BlueprintID": { + "type": "string", + "description": "ID of a blueprint", + "example": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341" + }, + "BlueprintResourceID": { + "type": "string", + "description": "ID of a blueprint resource", + "example": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341" + }, + "CommonBlueprintFields": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/BlueprintID" + }, + "title": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "object", + "properties": { + "preinstall": { + "type": "string", + "description": "Markdown content shown before starting to install the blueprint", + "example": "This is the content of the preinstall.md file which contains the blueprint description.\n" + }, + "postinstall": { + "type": "string", + "description": "Markdown content to be displayed when showing the plan to install blueprint", + "example": "This is the content of the postinstall.md file\n" + } + } + }, + "version": { + "type": "string" + }, + "deployments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "source_org_id": { + "type": "string" + }, + "source_blueprint_id": { + "type": "string" + }, + "destination_org_id": { + "type": "string" + }, + "destination_blueprint_id": { + "type": "string" + }, + "triggered_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "is_verified": { + "type": "boolean", + "description": "Whether the blueprint is verified by epilot" + }, + "installation_status": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "CANCELED", + "PARTIAL", + "SUCCESS", + "FAILED" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_by": { + "$ref": "#/components/schemas/CallerIdentity" + }, + "updated_by": { + "$ref": "#/components/schemas/CallerIdentity" + }, + "installation_job_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintJobID" + } + }, + "source_blueprint_id": { + "description": "ID of the blueprint that brought this blueprint to the destination org (deployed or installed)", + "$ref": "#/components/schemas/BlueprintID" + }, + "archived": { + "type": "boolean", + "description": "Whether the blueprint is archived (soft-deleted). Archived blueprints are hidden from the main list.", + "default": false + }, + "docs_url": { + "type": "string", + "description": "URL to the blueprint documentation" + }, + "recommended_apps": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of recommended app IDs for the blueprint" + }, + "required_features": { + "type": "object", + "description": "Feature constraints for blueprint installation", + "properties": { + "enabled": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Features that must be enabled in the target org" + }, + "disabled": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Features that must be disabled in the target org" + } + } + }, + "zip_file_name": { + "type": "string", + "description": "Custom name for the exported zip file" + } + }, + "required": [ + "title" + ] + }, + "BlueprintResource": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/BlueprintResourceID" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/ResourceNodeType" + }, + "address": { + "type": "string" + }, + "is_root": { + "type": "boolean", + "description": "When a resource is marked as root, we'll be able to keep track of it's dependencies" + }, + "is_ready": { + "type": "boolean", + "description": "when editing a blueprint, this indicates if the resource is ready to be exported and when installing a blueprint, this indicates if the resource is ready to be used" + }, + "is_hidden": { + "type": "boolean", + "description": "When a resource is marked as hidden, it's used to hide it from the UI" + }, + "is_disabled": { + "type": "boolean", + "default": false, + "description": "When a resource is marked as disabled, it will be skipped during export" + }, + "hard_dependencies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceNodeType" + } + }, + "parent_resource_ids": { + "type": "array", + "description": "Used to automatically remove resources with hard dependencies and to block deletion of resources with hard dependencies", + "items": { + "$ref": "#/components/schemas/BlueprintResourceID" + } + }, + "depends_on_addresses": { + "type": "array", + "description": "Terraform addresses this resource references (for dependency-aware ignore)", + "items": { + "type": "string" + } + }, + "impact_on_install": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "create", + "update", + "internal-update", + "no-op", + "delete", + "ignored" + ] + } + }, + "impact_on_install_reason": { + "type": "array", + "description": "Fields causing the updates / internal updates on a resource install", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "type" + ] + }, + "BlueprintPreview": { + "type": "object", + "description": "Preview data for a blueprint before installation. Stored temporarily with TTL.", + "properties": { + "id": { + "type": "string", + "description": "Unique preview ID" + }, + "org_id": { + "type": "string", + "description": "Organization ID" + }, + "title": { + "type": "string" + }, + "description": { + "type": "object", + "properties": { + "preinstall": { + "type": "string" + } + } + }, + "version": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "source_type": { + "type": "string", + "enum": [ + "marketplace", + "file" + ] + }, + "blueprint_file_s3_key": { + "type": "string", + "description": "S3 key of the blueprint zip file" + }, + "is_verified": { + "type": "boolean" + }, + "docs_url": { + "type": "string" + }, + "recommended_apps": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "created_by": { + "$ref": "#/components/schemas/CallerIdentity" + }, + "is_updating": { + "type": "boolean", + "description": "Whether the blueprint is updating to the latest version in the marketplace" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + }, + "required": [ + "id", + "org_id", + "title", + "source_type", + "blueprint_file_s3_key", + "is_verified", + "created_at", + "created_by", + "resources", + "is_updating" + ] + }, + "CustomBlueprint": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonBlueprintFields" + }, + { + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + }, + "source_type": { + "type": "string", + "const": "custom" + } + } + } + ], + "required": [ + "source_type" + ] + }, + "FileBlueprint": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonBlueprintFields" + }, + { + "type": "object", + "properties": { + "source_type": { + "type": "string", + "const": "file" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + } + } + ], + "required": [ + "source_type" + ] + }, + "MarketplaceBlueprint": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonBlueprintFields" + }, + { + "type": "object", + "properties": { + "docs_url": { + "type": "string", + "description": "URL to the blueprint documentation" + }, + "source_type": { + "type": "string", + "const": "marketplace" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + }, + "recommended_apps": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of recommended app IDs for the blueprint" + }, + "has_update_available": { + "type": "boolean", + "description": "Whether a newer version is available in the marketplace." + }, + "latest_marketplace_version": { + "type": "string", + "description": "The latest version available in the marketplace.", + "example": "v2.0.0" + }, + "installation_link": { + "type": "string", + "description": "URL to install/update the blueprint from the marketplace." + } + } + } + ], + "required": [ + "source_type" + ] + }, + "InstalledMarketplaceBlueprintItem": { + "type": "object", + "description": "Summary of an installed marketplace blueprint for version tracking", + "properties": { + "id": { + "$ref": "#/components/schemas/BlueprintID" + }, + "slug": { + "type": "string", + "description": "URL slug of the blueprint from the epilot marketplace", + "example": "solar-b2b" + }, + "version": { + "type": "string", + "description": "Version of the installed blueprint", + "example": "v1.0.0" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "created_by": { + "$ref": "#/components/schemas/CallerIdentity" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "$ref": "#/components/schemas/CallerIdentity" + }, + "has_update_available": { + "type": "boolean", + "description": "Whether a newer version is available in the marketplace", + "example": true + }, + "latest_marketplace_version": { + "type": "string", + "description": "The latest version available in the marketplace", + "example": "v2.0.0" + }, + "installation_link": { + "type": "string", + "description": "URL to install/update the blueprint from the marketplace" + } + }, + "required": [ + "id", + "slug" + ] + }, + "DeployedBlueprint": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonBlueprintFields" + }, + { + "type": "object", + "properties": { + "source_type": { + "type": "string", + "const": "deploy" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + } + } + ], + "required": [ + "source_type" + ] + }, + "AppBlueprint": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonBlueprintFields" + }, + { + "type": "object", + "properties": { + "source_type": { + "type": "string", + "const": "app" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintResource" + } + } + } + } + ], + "required": [ + "source_type" + ] + }, + "Blueprint": { + "oneOf": [ + { + "$ref": "#/components/schemas/CustomBlueprint" + }, + { + "$ref": "#/components/schemas/FileBlueprint" + }, + { + "$ref": "#/components/schemas/MarketplaceBlueprint" + }, + { + "$ref": "#/components/schemas/DeployedBlueprint" + }, + { + "$ref": "#/components/schemas/AppBlueprint" + } + ] + }, + "BlueprintJobID": { + "type": "string", + "description": "ID of a job", + "example": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341" + }, + "CommonBlueprintJobFields": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/BlueprintJobID" + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlueprintJobEvent" + } + }, + "triggered_at": { + "type": "string", + "format": "date-time" + }, + "created_by": { + "$ref": "#/components/schemas/CallerIdentity" + } + } + }, + "BlueprintExportJob": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonBlueprintJobFields" + }, + { + "type": "object", + "properties": { + "blueprint_id": { + "$ref": "#/components/schemas/BlueprintID" + }, + "status": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "SUCCESS", + "FAILED", + "CANCELED" + ] + }, + "download_file": { + "$ref": "#/components/schemas/S3Reference" + } + } + } + ] + }, + "BlueprintInstallationJob": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonBlueprintJobFields" + }, + { + "type": "object", + "properties": { + "source_blueprint_id": { + "$ref": "#/components/schemas/BlueprintID" + }, + "source_blueprint_type": { + "type": "string", + "enum": [ + "custom", + "file", + "marketplace", + "deploy", + "app" + ] + }, + "source_org_id": { + "type": "string" + }, + "source_blueprint_file": { + "type": "string" + }, + "destination_blueprint_id": { + "$ref": "#/components/schemas/BlueprintID" + }, + "destination_org_id": { + "type": "string" + }, + "slug": { + "type": "string", + "description": "Blueprint slug for marketplace blueprints" + }, + "status": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "WAITING_USER_ACTION", + "CANCELED", + "SUCCESS", + "FAILED" + ] + } + } + } + ] + }, + "BlueprintJob": { + "oneOf": [ + { + "$ref": "#/components/schemas/BlueprintExportJob" + }, + { + "$ref": "#/components/schemas/BlueprintInstallationJob" + }, + { + "$ref": "#/components/schemas/BlueprintDependenciesSyncJob" + }, + { + "$ref": "#/components/schemas/BlueprintValidateJob" + } + ] + }, + "BlueprintDependenciesSyncJob": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonBlueprintJobFields" + }, + { + "type": "object", + "properties": { + "blueprint_id": { + "$ref": "#/components/schemas/BlueprintID" + }, + "status": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "SUCCESS", + "FAILED", + "CANCELED" + ] + } + } + } + ] + }, + "BlueprintValidateJob": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonBlueprintJobFields" + }, + { + "type": "object", + "properties": { + "blueprint_id": { + "$ref": "#/components/schemas/BlueprintID" + }, + "status": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "SUCCESS", + "FAILED" + ] + }, + "valid": { + "type": "boolean", + "description": "Present when status is SUCCESS or FAILED." + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FormattedError" + }, + "description": "Present when valid is false." + } + } + } + ] + }, + "BlueprintJobEvent": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "message": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FormattedError" + } + }, + "level": { + "type": "string", + "enum": [ + "info", + "warning", + "error" + ] + }, + "data": { + "type": "object", + "properties": { + "installed_blueprint_id": { + "$ref": "#/components/schemas/BlueprintID" + }, + "export_job_id": { + "$ref": "#/components/schemas/BlueprintJobID" + }, + "resources": { + "type": "number" + } + } + } + } + }, + "BlueprintInstallationJobOptions": { + "type": "object", + "properties": { + "resources_to_ignore": { + "description": "List of resource addresses to ignore changes for. When a resource is marked as create, it will be ignored and not created.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ManifestID": { + "type": "string", + "description": "ID of an imported / installed manifest", + "example": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341" + }, + "JobID": { + "type": "string", + "description": "ID of an import or export job (state machine)", + "example": "4854bb2a-94f9-424d-a968-3fb17fb0bf89" + }, + "ManifestSource": { + "type": "string", + "enum": [ + "file", + "marketplace", + "sandbox" + ] + }, + "Manifest": { + "allOf": [ + { + "type": "object", + "properties": { + "import_job_id": { + "$ref": "#/components/schemas/JobID" + }, + "previous_jobs_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of job IDs that were used to install the manifest" + }, + "previous_jobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Job" + }, + "description": "List of jobs that were used to install the manifest" + } + } + }, + { + "$ref": "#/components/schemas/CommonManifestFields" + }, + { + "$ref": "#/components/schemas/CommonMarkdownFields" + }, + { + "$ref": "#/components/schemas/CommonImportFields" + }, + { + "$ref": "#/components/schemas/ManifestTimestampFields" + } + ] + }, + "ManifestItem": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonManifestFields" + }, + { + "$ref": "#/components/schemas/ManifestTimestampFields" + } + ] + }, + "JobStatus": { + "type": "string", + "enum": [ + "PENDING", + "STARTED", + "WAITING_USER_ACTION", + "CANCELED", + "IN_PROGRESS", + "SUCCESS", + "FAILED" + ] + }, + "ResourceNodeType": { + "type": "string", + "description": "Type of the resource", + "enum": [ + "designbuilder", + "journey", + "product", + "price", + "product_recommendation", + "coupon", + "tax", + "automation_flow", + "entity_mapping", + "file", + "emailtemplate", + "schema", + "schema_attribute", + "schema_capability", + "schema_group", + "schema_group_headline", + "workflow_definition", + "closing_reason", + "taxonomy_classification", + "webhook", + "integration", + "dashboard", + "custom_variable", + "usergroup", + "saved_view", + "app", + "role", + "portal_config", + "target", + "kanban", + "validation_rule", + "flow_template", + "taxonomy", + "notification_template" + ] + }, + "PlanChanges": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "create", + "update", + "internal-update", + "no-op", + "delete", + "ignored" + ] + } + }, + "CommonResourceNode": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the resource" + }, + "type": { + "$ref": "#/components/schemas/ResourceNodeType" + }, + "name": { + "type": "string", + "description": "Name of the resource" + }, + "source_id": { + "type": "string", + "description": "Source ID of the resource" + }, + "is_virtual": { + "type": "boolean", + "description": "Whether the resource is virtual" + } + }, + "required": [ + "id", + "type" + ] + }, + "RootResourceNode": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonResourceNode" + }, + { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "Terraform address of the resource" + }, + "dependencies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VirtualResourceNodeGroup" + }, + "description": "Dependencies of the resource", + "nullable": true + }, + "changes": { + "$ref": "#/components/schemas/PlanChanges" + }, + "changes_reason": { + "type": "array", + "description": "Fields causing the updates / internal updates on a resource install", + "items": { + "type": "string" + } + } + } + } + ] + }, + "VirtualResourceNodeGroup": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonResourceNode" + }, + { + "type": "object", + "properties": { + "dependencies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceNode" + } + }, + "is_virtual": { + "type": "boolean", + "enum": [ + true + ] + } + } + } + ] + }, + "ResourceNode": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonResourceNode" + }, + { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "Terraform address of the resource" + }, + "dependencies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceNode" + }, + "description": "Dependencies of the resource", + "nullable": true + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/ResourceNodeType" + } + } + } + }, + "source_id": { + "description": "Original ID of the exported resource", + "type": "string" + }, + "changes": { + "$ref": "#/components/schemas/PlanChanges" + }, + "changes_reason": { + "type": "array", + "description": "Fields causing the updates / internal updates on a resource install", + "items": { + "type": "string" + } + } + } + } + ] + }, + "Job": { + "allOf": [ + { + "type": "object", + "properties": { + "job_id": { + "$ref": "#/components/schemas/JobID" + }, + "job_status": { + "$ref": "#/components/schemas/JobStatus" + }, + "manifest_file_path": { + "type": "string", + "description": "The S3 key of the manifest file" + }, + "message": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "plan_file_content": { + "type": "string", + "description": "An URL to download the plan file" + }, + "resources_to_export": { + "description": "An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import", + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/RootResourceNode" + } + }, + { + "$ref": "#/components/schemas/RootResourceNode" + } + ] + }, + "large_resources_to_export_url": { + "type": "string", + "description": "An URL to download the resources to export when the resources are too large to be included in the response" + }, + "resources_to_import": { + "description": "An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import", + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/RootResourceNode" + } + }, + { + "$ref": "#/components/schemas/RootResourceNode" + } + ] + }, + "large_resources_to_import_url": { + "type": "string", + "description": "An URL to download the resources to import when the resources are too large to be included in the response" + }, + "resource_replacements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceReplacement" + } + }, + "is_verified": { + "type": "boolean", + "description": "Whether the manifest comes from a trusted source and is signed by epilot" + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FormattedError" + } + } + } + }, + { + "$ref": "#/components/schemas/CommonImportFields" + }, + { + "$ref": "#/components/schemas/CommonMarkdownFields" + }, + { + "$ref": "#/components/schemas/CommonManifestFields" + } + ] + }, + "UploadFilePayload": { + "type": "object", + "properties": { + "filename": { + "type": "string", + "example": "example.manifest.zip" + } + }, + "required": [ + "filename" + ] + }, + "S3Reference": { + "type": "object", + "properties": { + "bucket": { + "type": "string", + "example": "blueprint-manifest-prod-blueprintsv2bucket-sybpsryropzw" + }, + "key": { + "type": "string", + "example": "templates/main.tf" + } + }, + "required": [ + "bucket", + "key" + ] + }, + "CommonManifestFields": { + "type": "object", + "properties": { + "manifest_id": { + "$ref": "#/components/schemas/ManifestID" + }, + "source_type": { + "$ref": "#/components/schemas/ManifestSource" + }, + "source_blueprint_name": { + "type": "string", + "example": "Solar B2B" + }, + "source_blueprint_slug": { + "type": "string", + "description": "URL slug of a blueprint from the epilot marketplace", + "example": "solar-b2b" + }, + "source_blueprint_version": { + "type": "string", + "description": "Version of the blueprint (semver)", + "example": "1.0.0" + }, + "pre_install_requirements": { + "$ref": "#/components/schemas/PreInstallRequirements" + }, + "source_blueprint_file": { + "type": "string", + "deprecated": true, + "description": "A URL to download the source blueprint file used to import the blueprint", + "example": "https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/manifest.zip" + }, + "docs_link": { + "type": "string", + "description": "Link to the blueprint documentation", + "example": "https://help.epilot.cloud" + }, + "source_blueprint_file_ref": { + "$ref": "#/components/schemas/S3Reference" + }, + "install_status": { + "$ref": "#/components/schemas/BlueprintInstallStatus" + }, + "install_status_description": { + "type": "string", + "example": "This blueprint installation resulted in a partial deployment; some resources were created successfully, but failed to complete the full resource setup." + }, + "is_verified": { + "type": "boolean", + "description": "Whether the manifest comes from a trusted source and is signed by epilot" + }, + "created_by": { + "$ref": "#/components/schemas/CallerIdentity" + }, + "updated_by": { + "$ref": "#/components/schemas/CallerIdentity" + }, + "manifest_version": { + "type": "string", + "description": "Version of the manifest (semver)", + "example": "1.0.0" + }, + "selected_resources_url": { + "type": "string", + "description": "All the resources that were selected to be exported, used to pre-select the resources when updating a sandbox manifest", + "example": "https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/selected_resources.json" + }, + "ready_imported_resources_url": { + "type": "string", + "description": "All the resources that were marked as ready by the user", + "example": "https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/ready_imported_resources.json" + }, + "deployed_from": { + "type": "object", + "properties": { + "source_organization_id": { + "type": "string", + "description": "ID of the organization that deployed the manifest" + }, + "source_manifest_id": { + "type": "string", + "description": "ID of the manifest that was deployed" + }, + "source_organization_type": { + "type": "string", + "enum": [ + "sandbox", + "production" + ] + }, + "last_triggered_at": { + "type": "string", + "format": "date-time", + "description": "When the deployment was last triggered" + } + }, + "description": "Information about the manifest that was deployed from, used to update existing deployments instead of always creating new ones" + }, + "deployed_to": { + "type": "array", + "items": { + "type": "object", + "properties": { + "destination_organization_id": { + "type": "string", + "description": "ID of the organization that the manifest was deployed to" + }, + "destination_manifest_id": { + "type": "string", + "description": "ID of the manifest that was deployed to" + }, + "destination_organization_type": { + "type": "string", + "enum": [ + "sandbox", + "production" + ] + }, + "last_triggered_at": { + "type": "string", + "format": "date-time", + "description": "When the deployment was last triggered" + } + } + }, + "description": "Information about the manifest that was deployed to, used to update existing deployments instead of always creating new ones" + } + } + }, + "ManifestTimestampFields": { + "type": "object", + "properties": { + "created_at": { + "description": "When the manifest was first installed (applied)", + "type": "string", + "format": "date-time" + }, + "updated_at": { + "description": "When the manifest was last updated (applied)", + "type": "string", + "format": "date-time" + } + } + }, + "CommonImportFields": { + "type": "object", + "properties": { + "source_type": { + "$ref": "#/components/schemas/ManifestSource" + }, + "imported_resources": { + "description": "An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import", + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/RootResourceNode" + } + }, + { + "$ref": "#/components/schemas/RootResourceNode" + } + ] + }, + "large_imported_resources_url": { + "type": "string", + "format": "uri", + "description": "An URL to download the imported resources when the resources are too large to be included in the response", + "example": "https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/large.json" + } + } + }, + "CommonMarkdownFields": { + "type": "object", + "properties": { + "markdown": { + "type": "object", + "description": "Markdown content part of a manifest file", + "properties": { + "manifest": { + "type": "string", + "description": "Markdown content shown before installing the manifest", + "example": "This is the content of the manifest.md file which contains the manifest descripton.\n" + }, + "preinstall": { + "type": "string", + "deprecated": true, + "description": "Markdown content to be displayed when showing the plan to install blueprint", + "example": "This is the content of the preinstall.md file\n" + }, + "postinstall": { + "type": "string", + "description": "Markdown content to be displayed when showing the plan to install blueprint", + "example": "This is the content of the postinstall.md file\n" + } + } + } + } + }, + "PreInstallRequirements": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of feature settings that must be enabled before installing the blueprint", + "example": [ + "journey_automation", + "ticket-entities", + "advanced_permissions" + ] + }, + "BlueprintInstallStatus": { + "type": "string", + "enum": [ + "SUCCESS", + "PARTIAL", + "FAILED" + ] + }, + "FormattedErrorCodes": { + "type": "string", + "enum": [ + "dependency_extraction", + "resource_not_found", + "resource_fetch_api_error", + "resource_fetch_unknown_error", + "terraform_cli_process_error", + "terraform_import_block_process_error", + "terraform_init_error", + "terraform_validate_error", + "terraform_plan_error", + "terraform_apply_error", + "terraform_show_error", + "generic_error", + "bad_request", + "forbidden", + "conflict", + "not_found", + "undeclared_resource", + "invalid_readonly_attribute", + "invalid_attribute_value", + "unsupported_attribute", + "self_referential_block", + "circular_dependency", + "state_mismatch", + "import_nonexistent_object", + "provider_install_error", + "stale_blueprint" + ] + }, + "FormattedErrorData": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "FormattedError": { + "type": "object", + "properties": { + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ] + }, + "code": { + "$ref": "#/components/schemas/FormattedErrorCodes" + }, + "data": { + "type": "object", + "properties": { + "formattedResource": { + "$ref": "#/components/schemas/FormattedErrorData" + }, + "resource": { + "type": "string" + }, + "resourceDependency": { + "type": "string" + }, + "resources": { + "type": "array", + "items": { + "type": "string" + } + }, + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "originalError": { + "type": "string" + } + } + } + } + }, + "CallerIdentity": { + "type": "object", + "properties": { + "name": { + "description": "a human readable name of the caller (e.g. user name, token name or email address)", + "example": "manifest@epilot.cloud" + }, + "org_id": { + "description": "epilot organization id", + "type": "string", + "example": "911690" + }, + "user_id": { + "description": "epilot user id, when called by a user", + "type": "string", + "example": "11001045" + }, + "token_id": { + "description": "token id, when called by API token", + "type": "string", + "example": "api_5ZugdRXasLfWBypHi93Fk" + } + }, + "required": [ + "org_id" + ] + }, + "SelectedResources": { + "type": "object", + "properties": { + "exported_root_resources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/ResourceNodeType" + }, + "address": { + "type": "string", + "description": "Terraform address of the resource" + } + }, + "required": [ + "id", + "type" + ] + } + }, + "selected_resources": { + "type": "array", + "items": { + "type": "string" + } + }, + "pipeline_id": { + "type": "string", + "description": "Pipeline ID selected when doing the sandbox sync" + } + }, + "required": [ + "exported_root_resources", + "selected_resources" + ] + }, + "ResourceReplacement": { + "type": "object", + "properties": { + "originalAddress": { + "type": "string", + "description": "Original resource ID to be replaced" + }, + "replacementId": { + "type": "string", + "description": "ID of the resource that will replace the original" + }, + "replacementName": { + "type": "string", + "description": "Name of the resource that will replace the original" + } + }, + "required": [ + "originalAddress", + "replacementId" + ] + }, + "PutManifestPayload": { + "type": "object", + "properties": { + "source_blueprint_name": { + "type": "string", + "description": "Name of the source blueprint" + }, + "markdown": { + "type": "string", + "description": "Markdown content of the manifest" + }, + "ready_resources": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of ids of resources selected to be ready by the user" + }, + "deployed_to": { + "type": "array", + "items": { + "type": "object", + "properties": { + "destination_organization_id": { + "type": "string", + "description": "ID of the organization that the manifest was deployed to" + }, + "destination_manifest_id": { + "type": "string", + "description": "ID of the manifest that was deployed to" + }, + "destination_organization_type": { + "type": "string", + "enum": [ + "sandbox", + "production" + ] + }, + "last_triggered_at": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": { + "JobID": { + "name": "job_id", + "in": "path", + "required": true, + "description": "ID of an import or export job", + "schema": { + "$ref": "#/components/schemas/JobID" + } + } + }, + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + } + } + } +} diff --git a/packages/cli/definitions/consent.json b/packages/cli/definitions/consent.json new file mode 100644 index 00000000..b0f0b568 --- /dev/null +++ b/packages/cli/definitions/consent.json @@ -0,0 +1,344 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Consent API", + "version": "1.0.0", + "description": "Consent Management for epilot customer entities\n" + }, + "tags": [ + { + "name": "consent", + "description": "Consent Management" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v1/consent/publish": { + "post": { + "operationId": "publishConsentEvent", + "summary": "publishConsentEvent", + "description": "Publishes consent event on event bus, which appends to consent store\n", + "tags": [ + "consent" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConsentEventRequestBody" + }, + "examples": { + "OptInEmailMarketing": { + "$ref": "#/components/examples/ConsentOptInEmailMarketing" + }, + "OptInSMSMarketing": { + "$ref": "#/components/examples/ConsentOptInSMSMarketing" + }, + "OptInPhoneCallMarketing": { + "$ref": "#/components/examples/ConsentOptInPhoneCallMarketing" + }, + "OptOutEmailMarketing": { + "$ref": "#/components/examples/ConsentOptOutEmailMarketing" + } + } + } + } + }, + "responses": { + "201": { + "description": "The created opt-in", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConsentEvent" + } + } + } + } + } + } + }, + "/v1/consent/{identifier}": { + "get": { + "operationId": "listConsentEvents", + "summary": "listConsentEvents", + "description": "List opt-ins and opt-outs by customer identifier\n", + "tags": [ + "consent" + ], + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ConsentIdentifier" + } + }, + { + "name": "topic", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ConsentTopic" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 50, + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "from", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + } + ], + "responses": { + "200": { + "description": "list of opt-ins and opt-outs", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConsentEvent" + } + }, + "total": { + "type": "integer", + "example": 1 + } + } + } + } + } + } + } + } + }, + "/v1/opt-in/{token}": { + "get": { + "operationId": "handleOptInWithToken", + "summary": "handleOptInWithToken", + "security": [], + "description": "Endpoint to handle opt-in links\n", + "tags": [ + "consent" + ], + "parameters": [ + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "lang", + "in": "query", + "schema": { + "type": "string", + "default": "de" + } + } + ], + "responses": { + "200": { + "description": "Handler page for opt in links", + "content": { + "text/html": { + "example": "

You are subscribed!

\n" + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Epilot Id Token\n" + } + }, + "schemas": { + "ConsentIdentifier": { + "type": "string", + "description": "Unique identifier for consent source (e.g. customer email or phone)", + "example": "exampleuser@epilot.cloud" + }, + "ConsentTopic": { + "type": "string", + "description": "Consent Topic (what the person is opting into)", + "example": "EMAIL_MARKETING" + }, + "ConsentSource": { + "type": "string", + "description": "Consent Source (Origin of the Consent Event)", + "example": "www.frontend.epilot.cloud" + }, + "ConsentMeta": { + "type": "object", + "additionalProperties": true, + "example": { + "double_opt_in": true, + "source_type": "journey", + "source_id": "0e4f2a26-14f0-4ada-9294-a7d7a0b9b214", + "ip_address": "1.1.1.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + } + }, + "ConsentEventRequestBody": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "OPT_IN", + "OPT_OUT" + ] + }, + "topic": { + "$ref": "#/components/schemas/ConsentTopic" + }, + "source": { + "$ref": "#/components/schemas/ConsentSource" + }, + "identifier": { + "$ref": "#/components/schemas/ConsentIdentifier" + }, + "meta": { + "$ref": "#/components/schemas/ConsentMeta" + } + }, + "required": [ + "type", + "topic", + "identifier" + ] + }, + "ConsentEvent": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "OPT_IN", + "OPT_OUT", + "DOUBLE_OPT_IN_REQUESTED", + "DOUBLE_OPT_IN" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "topic": { + "$ref": "#/components/schemas/ConsentTopic" + }, + "source": { + "$ref": "#/components/schemas/ConsentSource" + }, + "organization_id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "identifier": { + "$ref": "#/components/schemas/ConsentIdentifier" + }, + "meta": { + "$ref": "#/components/schemas/ConsentMeta" + } + }, + "required": [ + "type", + "topic", + "identifier" + ] + }, + "OrganizationId": { + "type": "string", + "example": "123" + } + }, + "examples": { + "ConsentOptInEmailMarketing": { + "value": { + "type": "OPT_IN", + "topic": "EMAIL_MARKETING", + "identifier": "exampleuser@epilot.cloud", + "source": "frontend.epilot.cloud", + "meta": { + "ip_address": "1.1.1.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + } + } + }, + "ConsentOptOutEmailMarketing": { + "value": { + "type": "OPT_OUT", + "topic": "EMAIL_MARKETING", + "identifier": "exampleuser@epilot.cloud", + "source": "unsubscribe via email", + "meta": { + "ip_address": "1.1.1.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + } + } + }, + "ConsentOptInSMSMarketing": { + "value": { + "type": "OPT_IN", + "topic": "SMS_MARKETING", + "identifier": "+49 123 1234567", + "source": "frontend.epilot.cloud", + "meta": { + "ip_address": "1.1.1.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + } + } + }, + "ConsentOptInPhoneCallMarketing": { + "value": { + "type": "OPT_IN", + "topic": "PHONE_CALL_MARKETING", + "identifier": "+49 123 1234567", + "source": "frontend.epilot.cloud", + "meta": { + "ip_address": "1.1.1.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + } + } + } + } + }, + "servers": [ + { + "url": "https://consent.sls.epilot.io" + }, + { + "url": "https://consent.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/customer-portal.json b/packages/cli/definitions/customer-portal.json new file mode 100644 index 00000000..81136dba --- /dev/null +++ b/packages/cli/definitions/customer-portal.json @@ -0,0 +1,15000 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Portal API", + "description": "Backend for epilot portals - End Customer Portal & Installer Portal", + "version": "1.0.0" + }, + "tags": [ + { + "name": "ECP", + "description": "APIs defined for a portal user" + }, + { + "name": "ECP Admin", + "description": "APIs defined for a ECP Admin" + }, + { + "name": "Public", + "description": "Public APIs" + }, + { + "name": "portal_user_schema", + "x-displayName": "Portal User", + "description": "\n" + } + ], + "x-tagGroups": [ + { + "name": "APIs", + "tags": [ + "ECP", + "ECP Admin", + "Public" + ] + }, + { + "name": "Schemas", + "tags": [ + "portal_user_schema" + ] + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "PortalAuth": [] + }, + { + "EitherAuth": [] + } + ], + "paths": { + "/v2/portal/portal": { + "post": { + "operationId": "upsertPortal", + "summary": "upsertPortal", + "description": "Upserts the settings for a portal of an organization.", + "security": [ + { + "EpilotAuth": [] + } + ], + "tags": [ + "ECP Admin" + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + }, + { + "in": "query", + "name": "portal_id", + "required": false, + "schema": { + "type": "string" + }, + "description": "Portal ID" + } + ], + "requestBody": { + "description": "Portal payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertPortalConfig" + } + } + } + }, + "responses": { + "200": { + "description": "Portal updated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PortalConfig" + } + } + } + }, + "201": { + "description": "Portal created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PortalConfig" + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/user": { + "post": { + "operationId": "createUser", + "summary": "createUser", + "description": "Registers a portal user", + "security": [], + "tags": [ + "Public" + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + } + ], + "requestBody": { + "description": "Portal user payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserRequest" + } + } + } + }, + "responses": { + "201": { + "description": "User created successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "response" + ], + "properties": { + "message": { + "type": "string", + "enum": [ + "User created successfully" + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/public/user": { + "post": { + "operationId": "createUserV3", + "summary": "createUserV3", + "description": "Registers a portal user with portal id", + "security": [], + "tags": [ + "Public" + ], + "parameters": [ + { + "in": "query", + "name": "portal_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PortalId" + }, + "description": "Origin of the portal" + } + ], + "requestBody": { + "description": "Portal user payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserRequest" + } + } + } + }, + "responses": { + "201": { + "description": "User created successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "response" + ], + "properties": { + "message": { + "type": "string", + "enum": [ + "User created successfully" + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/token/validate": { + "post": { + "operationId": "validateToken", + "summary": "validateToken", + "description": "Validates Portal Token is valid. Pass the token via Authorization Header.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "responses": { + "204": { + "description": "Tokens is valid for the given organization." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/token/revoke": { + "post": { + "operationId": "revokeToken", + "summary": "revokeToken", + "description": "Revokes all of the access tokens for the given Refresh Token.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "requestBody": { + "description": "Token payload", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "refresh_token" + ], + "properties": { + "refresh_token": { + "type": "string", + "description": "Refresh Token to be revoked", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Access Tokens revoked successfully for the given Refresh Token.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "enum": [ + "Token revoked successfully" + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/config": { + "get": { + "operationId": "getPortalConfigByDomain", + "summary": "getPortalConfigByDomain", + "description": "Retrieves the portal configuration by domain.", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "domain", + "required": true, + "schema": { + "type": "string", + "example": "example.com", + "description": "Domain of the portal" + } + } + ], + "responses": { + "200": { + "description": "Portal config retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PortalConfig" + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/config": { + "get": { + "operationId": "getPortalConfig", + "summary": "getPortalConfig", + "description": "Retrieves the portal configuration.", + "tags": [ + "ECP Admin", + "ECP" + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": false, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + } + ], + "security": [ + { + "EitherAuth": [] + } + ], + "responses": { + "200": { + "description": "Portal config retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PortalConfig" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deletePortal", + "summary": "deletePortal", + "description": "Deletes the portal.", + "tags": [ + "ECP Admin" + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "204": { + "description": "Portal deleted successfully." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/extensions": { + "get": { + "operationId": "getPortalExtensions", + "summary": "getPortalExtensions", + "description": "Retrieves the installed portal extensions.", + "tags": [ + "ECP Admin" + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": false, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "200": { + "description": "Portal extensions retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Extension" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/extensions": { + "get": { + "operationId": "getPublicPortalExtensionDetails", + "summary": "getPublicPortalExtensionDetails", + "description": "Get public extension details shown to end customers and configuring users.", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "org_id", + "required": true, + "schema": { + "type": "string", + "example": 12324, + "description": "Organization ID" + } + }, + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + } + ], + "responses": { + "200": { + "description": "Public details of extensions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicExtensionCapabilities" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/extensions": { + "get": { + "operationId": "getPortalExtensionsV3", + "summary": "getPortalExtensionsV3", + "description": "Retrieves the installed portal extensions.", + "tags": [ + "ECP Admin" + ], + "parameters": [ + { + "in": "query", + "name": "portal_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PortalId" + }, + "description": "Portal ID" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "200": { + "description": "Portal extensions retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Extension" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/public/extensions": { + "get": { + "operationId": "getPublicPortalExtensionDetailsV3", + "summary": "getPublicPortalExtensionDetailsV3", + "description": "Get public extension details shown to end customers and configuring users.\nSupports two identification methods:\n1. Using org_id + portal_id\n2. Using domain\n", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "org_id", + "required": false, + "schema": { + "type": "string", + "example": 12324 + }, + "description": "Organization ID (required if domain is not provided)" + }, + { + "in": "query", + "name": "portal_id", + "required": false, + "schema": { + "$ref": "#/components/schemas/PortalId" + }, + "description": "Portal ID (required if domain is not provided)" + }, + { + "in": "query", + "name": "domain", + "required": false, + "schema": { + "type": "string" + }, + "description": "Portal domain for identification (alternative to org_id + portal_id)" + } + ], + "responses": { + "200": { + "description": "Public details of extensions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicExtensionCapabilities" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/consumption": { + "get": { + "operationId": "getConsumption", + "summary": "Get Consumption", + "description": "Get energy consumption data between a given time period.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "app_id", + "schema": { + "type": "string" + }, + "required": false, + "description": "App ID for consumption data." + }, + { + "in": "query", + "name": "extensionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Extension ID for consumption data." + }, + { + "in": "query", + "name": "hookId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Hook ID for consumption data." + }, + { + "in": "query", + "name": "meter_id", + "schema": { + "type": "string" + }, + "required": false, + "deprecated": true, + "description": "Meter ID for consumption data. Deprecated - use context_entities instead." + }, + { + "in": "query", + "name": "from", + "schema": { + "type": "string", + "format": "date-time" + }, + "required": true, + "description": "Start date for consumption data (ISO 8601 format)." + }, + { + "in": "query", + "name": "to", + "schema": { + "type": "string", + "format": "date-time" + }, + "required": true, + "description": "End date for consumption data (ISO 8601 format)." + }, + { + "in": "query", + "name": "interval", + "schema": { + "type": "string", + "enum": [ + "PT15M", + "PT1H", + "P1D", + "P1M" + ] + }, + "required": true, + "description": "Interval between consumption data points (e.g., PT15M for 15 minutes, PT1H for hourly). Not all intervals have to be supported." + }, + { + "in": "query", + "name": "context_entities", + "required": false, + "description": "Additional entities to include in the context for variable interpolation in the hook.", + "schema": { + "$ref": "#/components/schemas/ContextEntities" + } + } + ], + "responses": { + "200": { + "description": "Consumption data returned successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "consumptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp of the consumption record." + }, + "value": { + "type": "number", + "description": "The consumption value." + }, + "type": { + "type": "string", + "description": "Optional type of the consumption, such as 'nt' (night time) or 'ht' (high time). Can be any string." + } + }, + "required": [ + "value", + "timestamp" + ] + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/costs": { + "get": { + "operationId": "getCosts", + "summary": "Get Costs", + "description": "Get energy cost data between a given time period.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "app_id", + "schema": { + "type": "string" + }, + "required": false, + "description": "App ID for consumption data." + }, + { + "in": "query", + "name": "extensionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Extension ID for cost data." + }, + { + "in": "query", + "name": "hookId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Hook ID for cost data." + }, + { + "in": "query", + "name": "meter_id", + "schema": { + "type": "string" + }, + "required": false, + "deprecated": true, + "description": "Meter ID for cost data. Deprecated - use context_entities instead." + }, + { + "in": "query", + "name": "from", + "schema": { + "type": "string", + "format": "date-time" + }, + "required": true, + "description": "Start date for cost data (ISO 8601 format)." + }, + { + "in": "query", + "name": "to", + "schema": { + "type": "string", + "format": "date-time" + }, + "required": true, + "description": "End date for cost data (ISO 8601 format)." + }, + { + "in": "query", + "name": "interval", + "schema": { + "type": "string", + "enum": [ + "PT15M", + "PT1H", + "P1D", + "P1M" + ] + }, + "required": true, + "description": "Interval between cost data points (e.g., PT15M for 15 minutes, PT1H for hourly). Not all intervals have to be supported." + }, + { + "in": "query", + "name": "context_entities", + "required": false, + "description": "Additional entities to include in the context for variable interpolation in the hook.", + "schema": { + "$ref": "#/components/schemas/ContextEntities" + } + } + ], + "responses": { + "200": { + "description": "Cost data returned successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "costs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp of the cost record." + }, + "unit_amount": { + "type": "integer", + "description": "Cost in cents, e.g. 1234 for 12,34 €.", + "example": 1234 + }, + "unit_amount_currency": { + "type": "string", + "description": "ISO 4217:2015 currency.", + "example": "EUR" + }, + "unit_amount_decimal": { + "type": "string", + "description": "Cost in decimal format, e.g. \"12.34\".", + "example": "12.34" + }, + "tax_behavior": { + "type": "string", + "description": "Is the tax (typically Value Added Tax) included in the amounts. Typically should NOT be included - exclusive of tax.", + "enum": [ + "inclusive", + "exclusive" + ], + "example": "exclusive" + }, + "tax_rate": { + "type": "integer", + "description": "Tax rate in percent, e.g. 19 for 19%.", + "example": 19 + } + }, + "required": [ + "timestamp", + "unit_amount", + "unit_amount_currency", + "unit_amount_decimal", + "tax_behavior", + "tax_rate" + ] + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/prices": { + "get": { + "operationId": "getPrices", + "summary": "Get Prices", + "description": "Get energy prices data between a given time period.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "app_id", + "schema": { + "type": "string" + }, + "required": false, + "description": "App ID for consumption data." + }, + { + "in": "query", + "name": "extensionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Extension ID for price data." + }, + { + "in": "query", + "name": "hookId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Hook ID for price data." + }, + { + "in": "query", + "name": "meter_id", + "schema": { + "type": "string" + }, + "required": false, + "deprecated": true, + "description": "Meter ID for price data. Deprecated - use context_entities instead." + }, + { + "in": "query", + "name": "from", + "schema": { + "type": "string", + "format": "date-time" + }, + "required": true, + "description": "Start date for price data (ISO 8601 format)." + }, + { + "in": "query", + "name": "to", + "schema": { + "type": "string", + "format": "date-time" + }, + "required": true, + "description": "End date for price data (ISO 8601 format)." + }, + { + "in": "query", + "name": "interval", + "schema": { + "type": "string", + "enum": [ + "PT15M", + "PT1H", + "P1D", + "P1M" + ] + }, + "required": true, + "description": "Interval between price data points (e.g., PT15M for 15 minutes, PT1H for hourly). Not all intervals have to be supported." + }, + { + "in": "query", + "name": "context_entities", + "required": false, + "description": "Additional entities to include in the context for variable interpolation in the hook.", + "schema": { + "$ref": "#/components/schemas/ContextEntities" + } + } + ], + "responses": { + "200": { + "description": "Price data returned successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "prices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp of the price record." + }, + "unit_amount": { + "type": "integer", + "description": "Cost in cents, e.g. 1234 for 12,34 €.", + "example": 1234 + }, + "unit_amount_currency": { + "type": "string", + "description": "ISO 4217:2015 currency.", + "example": "EUR" + }, + "unit_amount_decimal": { + "type": "string", + "description": "Cost in decimal format, e.g. \"12.34\".", + "example": "12.34" + }, + "components": { + "type": "object", + "description": "Optional price components.", + "properties": { + "auction_price_amount": { + "type": "integer", + "description": "Market price in cents, e.g. 1000 for 10,00 €.", + "example": 1000 + }, + "auction_price_amount_decimal": { + "type": "string", + "description": "Market price in decimal format, e.g. \"10.00\".", + "example": "10.00" + }, + "taxes_levies_amount": { + "type": "integer", + "description": "Taxes/Levies other than tax specified on the price level in cents, e.g. 50 for 00,50 €.", + "example": 50 + }, + "taxes_levies_amount_decimal": { + "type": "string", + "description": "Taxes/Levies other than tax specified on the price level in decimal format, e.g. \"0.50\".", + "example": "0.50" + }, + "source_fee_amount": { + "type": "integer", + "description": "Fee associated with the source, e.g. Green Energy Certificate fee in cents, e.g. 50 for 00,50 €.", + "example": 50 + }, + "source_fee_amount_decimal": { + "type": "string", + "description": "Fee associated with the source, e.g. Green Energy Certificate fee in decimal format, e.g. \"0.50\".", + "example": "0.50" + }, + "grid_fee_amount": { + "type": "integer", + "description": "Fee associated with the transmission/distribution in cents, e.g. 100 for 1,00 €.", + "example": 100 + }, + "grid_fee_amount_decimal": { + "type": "string", + "description": "Fee associated with the transmission/distribution in decimal format, e.g. \"1.00\".", + "example": "1.00" + }, + "margin_amount": { + "type": "integer", + "description": "Margin in cents, e.g. 34 for 0,34 €.", + "example": 34 + }, + "margin_amount_decimal": { + "type": "string", + "description": "Margin in decimal format, e.g. \"0.34\".", + "example": "0.34" + } + } + }, + "tax_behavior": { + "type": "string", + "description": "Is the tax (typically Value Added Tax) included in the amounts. Typically should NOT be included - exclusive of tax.", + "enum": [ + "inclusive", + "exclusive" + ], + "example": "exclusive" + }, + "tax_rate": { + "type": "integer", + "description": "Tax rate in percent, e.g. 19 for 19%.", + "example": 19 + } + }, + "required": [ + "timestamp", + "unit_amount", + "unit_amount_currency", + "unit_amount_decimal", + "tax_behavior", + "tax_rate" + ] + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/external-links": { + "get": { + "operationId": "getExternalLinks", + "summary": "getExternalLinks", + "description": "Retrieves the portal configuration external links.", + "tags": [ + "ECP Admin", + "ECP" + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": false, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + }, + { + "in": "query", + "name": "contactId", + "required": false, + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "description": "Contact ID of the user" + } + ], + "security": [ + { + "EitherAuth": [] + } + ], + "responses": { + "200": { + "description": "Portal config links retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalLink" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/resolve:external-link/{id}": { + "get": { + "operationId": "getResolvedExternalLink", + "summary": "getResolvedExternalLink", + "deprecated": true, + "description": "Retrieves a resolved portal external link. Use /v2/portal/resolve:seamless-link/{id} instead.", + "tags": [ + "ECP Admin", + "ECP" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "description": "ID of the External Link" + }, + { + "in": "query", + "name": "origin", + "required": false, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + }, + { + "in": "query", + "name": "contactId", + "required": false, + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "description": "Contact ID of the user" + } + ], + "security": [ + { + "EitherAuth": [] + } + ], + "responses": { + "200": { + "description": "Resolved portal config link retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalLink" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/external-links": { + "get": { + "operationId": "getExternalLinksV3", + "summary": "getExternalLinksV3", + "description": "Retrieves the portal configuration external links.", + "tags": [ + "ECP Admin", + "ECP" + ], + "parameters": [ + { + "in": "query", + "name": "portal_id", + "required": false, + "schema": { + "$ref": "#/components/schemas/PortalId" + }, + "description": "PortalId of the portal" + }, + { + "in": "query", + "name": "contactId", + "required": false, + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "description": "Contact ID of the user" + } + ], + "security": [ + { + "EitherAuth": [] + } + ], + "responses": { + "200": { + "description": "Portal config links retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalLink" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/resolve:external-link/{id}": { + "get": { + "operationId": "getResolvedExternalLinkV3", + "summary": "getResolvedExternalLinkV3", + "deprecated": true, + "description": "Retrieves a resolved portal external link. Use /v2/portal/resolve:seamless-link/{id} instead.", + "tags": [ + "ECP Admin", + "ECP" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "description": "ID of the External Link" + }, + { + "in": "query", + "name": "portal_id", + "required": false, + "schema": { + "$ref": "#/components/schemas/PortalId" + }, + "description": "PortalId of the portal" + }, + { + "in": "query", + "name": "contactId", + "required": false, + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "description": "Contact ID of the user" + } + ], + "security": [ + { + "EitherAuth": [] + } + ], + "responses": { + "200": { + "description": "Resolved portal config link retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalLink" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/resolve:seamless-link": { + "get": { + "operationId": "getResolvedSeamlessLink", + "summary": "getResolvedSeamlessLink", + "description": "Retrieves a resolved seamless portal link.", + "tags": [ + "ECP" + ], + "parameters": [ + { + "in": "query", + "name": "app_id", + "required": false, + "schema": { + "type": "string" + }, + "description": "ID of the App if the Portal Extension was installed from an App" + }, + { + "in": "query", + "name": "extension_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the Portal Extension" + }, + { + "in": "query", + "name": "link_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the Seamless Link" + }, + { + "in": "query", + "name": "context_entities", + "required": false, + "description": "If the request is in a context of certain entities (i.e. the user in in a context of a specific contract), links can be customized for that. Portal User and Contact entities are automatically part of the context.", + "schema": { + "$ref": "#/components/schemas/ContextEntities" + } + } + ], + "security": [ + { + "PortalAuth": [] + } + ], + "responses": { + "200": { + "description": "Resolved portal seamless link retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "link": { + "type": "string", + "description": "Resolved link" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/portal/config": { + "get": { + "operationId": "getPublicPortalConfig", + "summary": "getPublicPortalConfig", + "description": "Retrieves the public portal configuration.", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "org_id", + "required": true, + "schema": { + "type": "string", + "example": 12324, + "description": "Organization ID" + } + }, + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + } + ], + "responses": { + "200": { + "description": "Portal config retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PortalConfig" + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/org/portal/config": { + "get": { + "operationId": "getOrgPortalConfig", + "summary": "getOrgPortalConfig", + "description": "Retrieves the portal configuration for the organization.", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + } + ], + "responses": { + "200": { + "description": "Portal config retrieved successfully.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PortalConfig" + }, + { + "type": "object", + "properties": { + "certificate_details": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Status of the certificate", + "enum": [ + "PENDING_VALIDATION", + "ISSUED", + "INACTIVE", + "EXPIRED", + "VALIDATION_TIMED_OUT", + "REVOKED", + "FAILED", + "PENDING_AUTO_RENEWAL" + ] + }, + "failed_reason": { + "type": "string", + "description": "Reason for failed certificate", + "example": "CAA_ERROR" + } + } + } + } + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/public/portal/config": { + "get": { + "operationId": "getPublicPortalConfigV3", + "summary": "getPublicPortalConfigV3", + "description": "Retrieves the public portal configuration.", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "org_id", + "required": true, + "schema": { + "type": "string", + "example": 12324, + "description": "Organization ID" + } + }, + { + "in": "query", + "name": "portal_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PortalId" + }, + "description": "PortalId of the portal" + } + ], + "responses": { + "200": { + "description": "Portal config retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PortalConfig" + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/org/portal/config": { + "get": { + "operationId": "getOrgPortalConfigV3", + "summary": "getOrgPortalConfigV3", + "description": "Retrieves the portal configuration for the organization.", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "portal_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PortalId" + }, + "description": "PortalId of the portal" + } + ], + "responses": { + "200": { + "description": "Portal config retrieved successfully.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PortalConfig" + }, + { + "type": "object", + "properties": { + "certificate_details": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Status of the certificate", + "enum": [ + "PENDING_VALIDATION", + "ISSUED", + "INACTIVE", + "EXPIRED", + "VALIDATION_TIMED_OUT", + "REVOKED", + "FAILED", + "PENDING_AUTO_RENEWAL" + ] + }, + "failed_reason": { + "type": "string", + "description": "Reason for failed certificate", + "example": "CAA_ERROR" + } + } + } + } + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/configs": { + "get": { + "operationId": "getAllPortalConfigs", + "summary": "getAllPortalConfigs", + "description": "Retrieves all portal configurations.", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "200": { + "description": "All portal configs retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PortalConfig" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/email-templates": { + "post": { + "operationId": "upsertEmailTemplates", + "summary": "upsertEmailTemplates", + "description": "Upserts the email templates of a portal", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + } + ], + "requestBody": { + "description": "Email templates payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplates" + } + } + } + }, + "responses": { + "200": { + "description": "Upserted email templates of the portal successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "emailTemplates" + ], + "properties": { + "message": { + "type": "string", + "enum": [ + "Email Templates upserted successfully" + ] + }, + "emailTemplates": { + "$ref": "#/components/schemas/EmailTemplates" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "get": { + "operationId": "getEmailTemplates", + "summary": "getEmailTemplates", + "description": "Retrieves the email templates of a portal", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + } + ], + "responses": { + "200": { + "description": "Retrieved the email templates successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplates" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/email-templates/{portal_id}": { + "post": { + "operationId": "upsertEmailTemplatesByPortalId", + "summary": "upsertEmailTemplatesByPortalId", + "description": "Upserts the email templates of a portal by portal ID", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "portal_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the portal" + } + ], + "requestBody": { + "description": "Email templates payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplates" + } + } + } + }, + "responses": { + "200": { + "description": "Upserted email templates of the portal successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "emailTemplates" + ], + "properties": { + "message": { + "type": "string", + "enum": [ + "Email Templates upserted successfully" + ] + }, + "emailTemplates": { + "$ref": "#/components/schemas/EmailTemplates" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "get": { + "operationId": "getEmailTemplatesByPortalId", + "summary": "getEmailTemplatesByPortalId", + "description": "Retrieves the email templates of a portal by portal ID", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "portal_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the portal" + } + ], + "responses": { + "200": { + "description": "Retrieved the email templates successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplates" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public-widgets": { + "get": { + "operationId": "getPublicPortalWidgets", + "summary": "getPublicPortalWidgets", + "description": "Retrieves the public widgets of a portal", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "org_id", + "required": true, + "schema": { + "type": "string", + "description": "Organization ID", + "example": 123 + } + }, + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + } + ], + "responses": { + "200": { + "description": "Retrieved the portal public widgets successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertPortalWidget" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/widgets": { + "post": { + "operationId": "upsertPortalWidget", + "summary": "upsertPortalWidget", + "description": "Upsert widget for a portal of an organization.", + "security": [ + { + "EpilotAuth": [] + } + ], + "tags": [ + "ECP Admin" + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + } + ], + "requestBody": { + "description": "Portal widgets payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertPortalWidget" + } + } + } + }, + "responses": { + "201": { + "description": "Portal widget configuration upserted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertPortalWidget" + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "get": { + "operationId": "getPortalWidgets", + "summary": "getPortalWidgets", + "description": "Retrieves the widgets of a portal", + "tags": [ + "ECP Admin", + "ECP" + ], + "security": [ + { + "EitherAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": false, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + }, + { + "in": "query", + "name": "contract_id", + "required": false, + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "description": "Contract context for widgets" + } + ], + "responses": { + "200": { + "description": "Retrieved the portal widgets successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertPortalWidget" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/replace-ecp-template-variables": { + "post": { + "operationId": "replaceECPTemplateVariables", + "summary": "replaceECPTemplateVariables", + "description": "Replaces the template variables of a portal", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "description": "ECPVariables payload", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template_id": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the template" + }, + "entity_context": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "_id": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the entity" + }, + "is_main_entity": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Replaced portal template variables successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "customerPortal": { + "type": "object", + "properties": { + "invitationLink": { + "type": "string", + "example": "https://end-customer-portal.ecp.dev.epilot.io/register?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com" + }, + "newDocumentLink": { + "type": "string", + "example": "https://end-customer-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b" + }, + "entityLink": { + "type": "string", + "example": "https://end-customer-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b" + }, + "userEmailsOnEntity": { + "type": "array", + "example": [ + "john@doe.com", + "mary@doe.com" + ], + "items": { + "type": "string" + } + } + } + }, + "installerPortal": { + "type": "object", + "properties": { + "invitationLink": { + "type": "string", + "example": "https://installer-portal.ecp.dev.epilot.io/register?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com" + }, + "newDocumentLink": { + "type": "string", + "example": "https://installer-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b" + }, + "entityLink": { + "type": "string", + "example": "https://installer-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b" + }, + "userEmailsOnEntity": { + "type": "array", + "example": [ + "peter@doe.com", + "jane@doe.com" + ], + "items": { + "type": "string" + } + } + } + }, + "portalUser": { + "type": "object", + "properties": { + "invitationLink": { + "type": "string", + "example": "https://employee-portal.ecp.dev.epilot.io/register?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com" + }, + "newDocumentLink": { + "type": "string", + "example": "https://employee-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b" + }, + "entityLink": { + "type": "string", + "example": "https://employee-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b" + }, + "userEmailsOnEntity": { + "type": "array", + "example": [ + "peter@doe.com", + "jane@doe.com" + ], + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/org/settings": { + "get": { + "operationId": "getOrganizationSettings", + "summary": "getOrganizationSettings", + "description": "Retrieves the organization settings. This endpoint is deprecated, use org_settings from the portal config or getOrganizationSettingsByDomain instead.", + "deprecated": true, + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "responses": { + "200": { + "description": "Retrieved the settings for an organization successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/OrganizationSettings" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/schemas": { + "get": { + "operationId": "getSchemas", + "summary": "getSchemas", + "description": "Retrieves the schemas. Only schemas usable in the private part of the portal are returned.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "responses": { + "200": { + "description": "Retrieved schemas for an organization successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schemas": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Schema" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/schemas": { + "get": { + "operationId": "getSchemasByDomain", + "summary": "getSchemasByDomain", + "description": "Retrieves schemas by domain. Only schemas and attributes used on public pages are returned.", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "domain", + "required": true, + "schema": { + "type": "string", + "description": "Domain of the portal", + "example": "ecp.dev.epilot.io" + } + } + ], + "responses": { + "200": { + "description": "Retrieved schemas for an organization successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schemas": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Schema" + } + } + } + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/org/settings": { + "get": { + "operationId": "getOrganizationSettingsByDomain", + "summary": "getOrganizationSettingsByDomain", + "description": "Retrieves organization settings by domain. Only public organization settings are returned.", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "domain", + "required": true, + "schema": { + "type": "string", + "description": "Domain of the portal", + "example": "ecp.dev.epilot.io" + } + } + ], + "responses": { + "200": { + "description": "Retrieved organization settings successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/OrganizationSettings" + } + } + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/extra-permission-attributes": { + "get": { + "operationId": "extraPermissionAttributes", + "summary": "extraPermissionAttributes", + "description": "Retrieves the extra permission attributes.", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "200": { + "description": "Retrieved extra permission attributes successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "contact": { + "$ref": "#/components/schemas/ExtraSchemaAttributes" + }, + "contract": { + "$ref": "#/components/schemas/ExtraSchemaAttributes" + }, + "order": { + "$ref": "#/components/schemas/ExtraSchemaAttributes" + }, + "opportunity": { + "$ref": "#/components/schemas/ExtraSchemaAttributes" + }, + "meter": { + "$ref": "#/components/schemas/ExtraSchemaAttributes" + }, + "meter_counter": { + "$ref": "#/components/schemas/ExtraSchemaAttributes" + } + } + } + } + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/validate/caa-records": { + "post": { + "operationId": "validateCaaRecords", + "summary": "validateCaaRecords", + "description": "Validates the CAA records of a portal", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + } + } + ], + "responses": { + "200": { + "description": "Validated CAA records successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "retry": { + "type": "boolean", + "description": "Whether to retry the validation to continue the domain setup" + }, + "message": { + "type": "string", + "description": "Message of the validation" + }, + "isDNSConfigured": { + "type": "boolean", + "description": "Whether the DNS is configured from the customer side" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/validate/caa-records": { + "post": { + "operationId": "validateCaaRecordsV3", + "summary": "validateCaaRecordsV3", + "description": "Validates the CAA records of a portal", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "portal_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PortalId" + }, + "description": "PortalId of the portal" + } + ], + "responses": { + "200": { + "description": "Validated CAA records successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "retry": { + "type": "boolean", + "description": "Whether to retry the validation to continue the domain setup" + }, + "message": { + "type": "string", + "description": "Message of the validation" + }, + "isDNSConfigured": { + "type": "boolean", + "description": "Whether the DNS is configured from the customer side" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/contact": { + "get": { + "operationId": "getContact", + "summary": "getContact", + "description": "Retrieves the contact of the logged in user.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "responses": { + "200": { + "description": "Retrieves the mapped contact of the logged in user successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/Contact" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/File" + } + }, + "relations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityItem" + } + }, + "journey_actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JourneyActions" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "patch": { + "operationId": "updateContact", + "summary": "updateContact", + "description": "Updates the contact details.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Entity" + } + } + } + }, + "responses": { + "200": { + "description": "Updated the contact details successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Contact" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/ForbiddenByRule" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/ecp/contact": { + "get": { + "operationId": "getECPContact", + "summary": "getECPContact", + "description": "Get the Contact by id", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + } + ], + "responses": { + "200": { + "description": "The contact returned successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Contact" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/contact/exists": { + "post": { + "operationId": "checkContactExists", + "summary": "checkContactExists", + "description": "True if contact with given identifiers exists.", + "security": [], + "tags": [ + "Public" + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + } + ], + "requestBody": { + "description": "Request payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContactExistsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Return result true|false if the contact with given identifiers exists.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "exists": { + "type": "boolean", + "description": "Whether the contact exists with the given identifier values", + "example": true + }, + "contactId": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the contact if exists" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/public/contact/exists": { + "post": { + "operationId": "checkContactExistsV3", + "summary": "checkContactExistsV3", + "description": "True if contact with given identifiers exists.", + "security": [], + "tags": [ + "Public" + ], + "parameters": [ + { + "in": "query", + "name": "portal_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PortalId" + }, + "description": "PortalId of the portal" + } + ], + "requestBody": { + "description": "Request payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContactExistsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Return result true|false if the contact with given identifiers exists.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "exists": { + "type": "boolean", + "description": "Whether the contact exists with the given identifier values", + "example": true + }, + "contactId": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the contact if exists" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/contact/valid/secondary/attributes": { + "get": { + "operationId": "getValidSecondaryAttributes", + "summary": "getValidSecondaryAttributes", + "description": "Get valid secondary attributes that are used while mapping a contact on registration", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "200": { + "description": "Valid secondary attributes for the contact entity are returned successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the secondary attribute", + "example": "first_name" + }, + "type": { + "type": "string", + "description": "Type of the secondary attribute", + "example": "string" + } + } + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/user": { + "get": { + "operationId": "getPortalUser", + "summary": "getPortalUser", + "description": "Get the portal user details", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "responses": { + "200": { + "description": "Portal user returned successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PortalUser" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "patch": { + "operationId": "updatePortalUser", + "summary": "updatePortalUser", + "description": "Update the portal user details", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Entity" + } + } + } + }, + "responses": { + "200": { + "description": "The portal user updated successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PortalUser" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deletePortalUser", + "summary": "deletePortalUser", + "description": "Delete the portal user", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "responses": { + "200": { + "description": "Portal user deleted successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "enum": [ + "User Succesfully Deleted" + ] + }, + "data": { + "$ref": "#/components/schemas/EntityId" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/user/update/email": { + "put": { + "operationId": "updatePortalUserEmail", + "summary": "updatePortalUserEmail", + "description": "Update portal user email", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "requestBody": { + "description": "Request payload", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email", + "password" + ], + "properties": { + "email": { + "type": "string", + "description": "New email address of the portal user", + "example": "john@doe.com" + }, + "password": { + "type": "string", + "description": "Password of the portal user for confirmation" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Portal user email updated successfully and will receive a confirmation email soon.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "enum": [ + "You will receive a confirmation mail soon on your updated email address." + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/user/resend/confirmation-email/{id}": { + "post": { + "operationId": "resendConfirmationEmail", + "summary": "resendConfirmationEmail", + "description": "Resend confirmation email", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The ID of portal user id" + } + ], + "responses": { + "200": { + "description": "Confirmation email resent successfully for the portal user.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "enum": [ + "Confirmation email sent successfully." + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/users/by-related-entity": { + "get": { + "operationId": "fetchPortalUsersByRelatedEntity", + "summary": "fetchPortalUsersByRelatedEntity", + "description": "Get all users for a given entity", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "entity_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + }, + { + "in": "query", + "name": "slug", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntitySlug" + } + } + ], + "responses": { + "200": { + "description": "Returns the portal users under the given entity.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "portalUsers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PortalUser" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/user/confirm": { + "get": { + "operationId": "confirmUser", + "summary": "confirmUser", + "description": "Confirm a portal user", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "confirmation_link_token", + "required": true, + "schema": { + "type": "string", + "description": "Confirmation link token" + } + }, + { + "in": "query", + "name": "use_redirect", + "required": false, + "schema": { + "type": "boolean", + "description": "Should the operation result in a 301 redirect", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Returned in case of successful user confirmation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "confirmed": { + "type": "boolean", + "description": "Is the user confirmed", + "example": true + }, + "user_already_confirmed": { + "type": "boolean", + "description": "Is the user previously confirmed", + "example": true + } + } + } + } + } + }, + "301": { + "description": "User is confirmed and redirected to the portal successfully." + }, + "400": { + "$ref": "#/components/responses/ConfirmUserInvalidRequest" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/user/confirm/{id}": { + "get": { + "operationId": "confirmUserWithUserId", + "summary": "confirmUserWithUserId", + "description": "Confirm a portal user", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + } + }, + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The ID of portal user id" + }, + { + "in": "query", + "name": "org_id", + "required": true, + "schema": { + "type": "string", + "example": 123 + }, + "description": "Organization ID" + } + ], + "responses": { + "301": { + "description": "User is confirmed and redirected to the portal successfully." + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/user/exists": { + "get": { + "operationId": "userExists", + "summary": "userExists", + "description": "Checks whether a user exists in the portal", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "email", + "required": true, + "schema": { + "type": "string", + "description": "Email Address of the portal user", + "example": "user@example.com" + } + }, + { + "in": "query", + "name": "org_id", + "required": true, + "schema": { + "type": "string", + "description": "Organization ID", + "example": 123 + } + }, + { + "in": "query", + "name": "origin", + "required": false, + "description": "Checkes if user exists in the given portal origin. If not provided, checks in all origins.", + "schema": { + "$ref": "#/components/schemas/Origin" + } + } + ], + "responses": { + "200": { + "description": "Returned whether the user exists in the portal or not successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "exists" + ], + "properties": { + "exists": { + "type": "boolean", + "description": "Whether the user exists in the portal", + "example": true + } + } + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/public/user/exists": { + "get": { + "operationId": "userExistsV3", + "summary": "userExistsV3", + "description": "Checks whether a user exists in the portal", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "email", + "required": true, + "schema": { + "type": "string", + "description": "Email Address of the portal user", + "example": "user@example.com" + } + }, + { + "in": "query", + "name": "org_id", + "required": true, + "schema": { + "type": "string", + "description": "Organization ID", + "example": 123 + } + }, + { + "in": "query", + "name": "portal_id", + "required": false, + "description": "Checkes if user exists in the given portal ID. If not provided, checks in all portals.", + "schema": { + "$ref": "#/components/schemas/PortalId" + } + } + ], + "responses": { + "200": { + "description": "Returned whether the user exists in the portal or not successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "exists" + ], + "properties": { + "exists": { + "type": "boolean", + "description": "Whether the user exists in the portal", + "example": true + } + } + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/recipients-to-notify": { + "post": { + "operationId": "getRecipientsToNotifyOnAutomation", + "summary": "getRecipientsToNotifyOnAutomation", + "description": "Get recipients to notify on automation", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "emails", + "template_id", + "context_id" + ], + "properties": { + "emails": { + "type": "array", + "example": [ + "john@doe.com" + ], + "description": "Emails array that are part of the automation", + "items": { + "type": "string" + } + }, + "template_id": { + "$ref": "#/components/schemas/EntityId", + "description": "Email template ID that used on the automation" + }, + "context_id": { + "$ref": "#/components/schemas/EntityId", + "description": "Entity ID that is part of the automation" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Returns the valid recipients to notify successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "emails" + ], + "properties": { + "recipients": { + "type": "array", + "description": "Filtered recipients to notify", + "items": { + "type": "object", + "required": [ + "email", + "recipient_id" + ], + "properties": { + "email": { + "type": "string", + "description": "Email of the recipient", + "example": "john@doe.com" + }, + "recipient_id": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the recipient" + } + } + } + }, + "message": { + "type": "string", + "description": "Reason to not notify the user" + } + } + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/configure-distribution": { + "get": { + "operationId": "configureDistribution", + "summary": "configureDistribution", + "description": "Configure the distribution for the portal's custom domain", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": true, + "schema": { + "$ref": "#/components/schemas/Origin" + } + } + ], + "responses": { + "200": { + "description": "The cloudfront distribution has been configure successfully for the custom domain.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "domainName": { + "type": "string", + "description": "The domain name of the configured distribution", + "example": "dsj8op4ha01jha23.cloudfront.net" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/configure-distribution": { + "get": { + "operationId": "configureDistributionV3", + "summary": "configureDistributionV3", + "description": "Configure the distribution for the portal's custom domain", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "portal_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PortalId" + } + } + ], + "responses": { + "200": { + "description": "The cloudfront distribution has been configure successfully for the custom domain.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "domainName": { + "type": "string", + "description": "The domain name of the configured distribution", + "example": "dsj8op4ha01jha23.cloudfront.net" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/order": { + "get": { + "operationId": "getAllOrders", + "summary": "getAllOrders", + "description": "Get all orders for the portal user", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "number", + "description": "Initial offset to set for the search results", + "example": 0, + "default": 0 + } + }, + { + "in": "query", + "name": "size", + "required": false, + "schema": { + "type": "number", + "description": "Size of the search results", + "example": 100, + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "The orders for the portal user returned successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/Order" + }, + { + "type": "object", + "properties": { + "journey_actions": { + "$ref": "#/components/schemas/JourneyActions" + } + } + } + ] + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/order/{id}/acceptance": { + "post": { + "operationId": "postOrderAcceptance", + "summary": "postOrderAcceptance", + "description": "Accept/decline an offer by id", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The ID of order" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptanceDecision" + } + } + } + }, + "responses": { + "200": { + "description": "Order was accepted/declined successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Order" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/order/{id}": { + "get": { + "operationId": "getOrder", + "summary": "getOrder", + "description": "Get an order by id", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The ID of order" + } + ], + "responses": { + "200": { + "description": "The requested order has been retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/Order" + }, + "files": { + "type": "array", + "description": "The related files of the requested order", + "items": { + "$ref": "#/components/schemas/File" + } + }, + "relations": { + "type": "array", + "description": "The related entities of the requested order", + "items": { + "$ref": "#/components/schemas/EntityItem" + } + }, + "products": { + "type": "array", + "description": "The related products of the requested order", + "items": { + "$ref": "#/components/schemas/Product" + } + }, + "crossSellableProducts": { + "type": "array", + "description": "The related cross sellable products of the requested order", + "items": { + "$ref": "#/components/schemas/Product" + } + }, + "workflow": { + "type": "array", + "description": "The related workflows of the requested order", + "items": { + "$ref": "#/components/schemas/WorkflowExecution" + } + }, + "journey_actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JourneyActions" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "patch": { + "operationId": "updateOrder", + "summary": "updateOrder", + "description": "Update an order by id", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The ID of order" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Entity" + } + } + } + }, + "responses": { + "200": { + "description": "Updated the order details successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Order" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/opportunity": { + "get": { + "operationId": "getAllOpportunities", + "summary": "getAllOpportunities", + "description": "Get all opportunities of a portal user", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "number", + "description": "Initial offset to set for the search results", + "example": 0, + "default": 0 + } + }, + { + "in": "query", + "name": "size", + "required": false, + "schema": { + "type": "number", + "description": "Size of the search results", + "example": 100, + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "The opportunities is retrieved successfully for the portal user.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/Opportunity" + }, + { + "type": "object", + "properties": { + "journey_actions": { + "$ref": "#/components/schemas/JourneyActions" + } + } + } + ] + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/opportunities/searchable-attributes": { + "get": { + "operationId": "getSearchableAttributesForOpportunities", + "summary": "getSearchableAttributesForOpportunities", + "description": "Get all opportunity searchable attributes for a portal user", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "number", + "description": "Initial offset to set for the search results", + "example": 0, + "default": 0 + } + }, + { + "in": "query", + "name": "size", + "required": false, + "schema": { + "type": "number", + "description": "Size of the search results", + "example": 1000, + "default": 1000 + } + } + ], + "responses": { + "200": { + "description": "The opportunities is retrieved successfully for the portal user.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Opportunity" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/opportunities/search": { + "post": { + "operationId": "getSearchResultsForOpportunities", + "summary": "getSearchResultsForOpportunities", + "description": "Get all opportunity with the given serached attributes", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "number", + "description": "Initial offset to set for the search results", + "example": 0, + "default": 0 + } + }, + { + "in": "query", + "name": "size", + "required": false, + "schema": { + "type": "number", + "description": "Size of the search results", + "example": 1000, + "default": 1000 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "customers": { + "type": "array", + "items": { + "type": "string" + } + }, + "purposes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + } + }, + "workflows": { + "type": "array", + "items": { + "items": { + "$ref": "#/components/schemas/WorfklowIdentifier" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The opportunities is retrieved successfully for the portal user.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Opportunity" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/opportunities/{id}": { + "get": { + "operationId": "getOpportunity", + "summary": "getOpportunity", + "description": "Get an opportunity by id", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The ID of opportunity" + } + ], + "responses": { + "200": { + "description": "The returned opportunities", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/Opportunity" + }, + "orders": { + "type": "array", + "description": "The related orders of the requested opportunity", + "items": { + "$ref": "#/components/schemas/Order" + } + }, + "files": { + "type": "array", + "description": "The related files of the requested opportunity", + "items": { + "$ref": "#/components/schemas/File" + } + }, + "relations": { + "type": "array", + "description": "The related entities of the requested opportunity", + "items": { + "$ref": "#/components/schemas/EntityItem" + } + }, + "workflow": { + "type": "array", + "description": "The related workflows of the requested opportunity", + "items": { + "$ref": "#/components/schemas/WorkflowExecution" + } + }, + "journey_actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JourneyActions" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "patch": { + "operationId": "updateOpportunity", + "summary": "updateOpportunity", + "description": "Update an opportunity by id", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The ID of opportunity" + } + ], + "requestBody": { + "description": "Requested opportunity body to update", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Entity" + } + } + } + }, + "responses": { + "200": { + "description": "Updated the opportunity successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Opportunity" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/request": { + "get": { + "operationId": "getAllRequests", + "summary": "getAllRequests", + "description": "Get all opportunities & orders of a portal user", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "number", + "description": "Initial offset to set for the search results", + "example": 0, + "default": 0 + } + }, + { + "in": "query", + "name": "size", + "required": false, + "schema": { + "type": "number", + "description": "Size of the search results", + "example": 100, + "default": 200 + } + } + ], + "responses": { + "200": { + "description": "The opportunities is retrieved successfully for the portal user.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hits": { + "type": "number", + "description": "Total number of hits", + "example": 1 + }, + "results": { + "type": "array", + "items": { + "allOf": [ + { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/Opportunity" + }, + { + "$ref": "#/components/schemas/Order" + } + ] + }, + { + "type": "object", + "properties": { + "journey_actions": { + "$ref": "#/components/schemas/JourneyActions" + } + } + } + ] + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/contract": { + "get": { + "operationId": "getAllContracts", + "summary": "getAllContracts", + "description": "Get all contracts for a portal user", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "number", + "description": "Initial offset to set for the search results", + "example": 0, + "default": 0 + } + }, + { + "in": "query", + "name": "size", + "required": false, + "schema": { + "type": "number", + "description": "Size of the search results", + "example": 100, + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "Contracts have been retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/Contract" + }, + { + "type": "object", + "properties": { + "journey_actions": { + "$ref": "#/components/schemas/JourneyActions" + } + } + } + ] + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/contract/{id}": { + "get": { + "operationId": "getContract", + "summary": "getContract", + "description": "Get a contract by id", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The ID of the contract" + } + ], + "responses": { + "200": { + "description": "The requested contract returned successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/Contract" + }, + "orders": { + "type": "array", + "description": "The related orders of the requested contract", + "items": { + "$ref": "#/components/schemas/Order" + } + }, + "meters": { + "type": "array", + "description": "The related meters of the requested contract", + "items": { + "$ref": "#/components/schemas/Meter" + } + }, + "files": { + "type": "array", + "description": "The related files of the requested contract", + "items": { + "$ref": "#/components/schemas/File" + } + }, + "relations": { + "type": "array", + "description": "The related entities of the requested contract", + "items": { + "$ref": "#/components/schemas/EntityItem" + } + }, + "workflow": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowExecution" + } + }, + "journey_actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JourneyActions" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "patch": { + "operationId": "updateContract", + "summary": "updateContract", + "description": "Update a contract by id", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The ID of the contract" + } + ], + "requestBody": { + "description": "Requested contract body to update", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Entity" + } + } + } + }, + "responses": { + "200": { + "description": "Updated the contract successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Contract" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/ForbiddenByRule" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/contract/by-identifiers": { + "post": { + "operationId": "addContractByIdentifiers", + "summary": "addContractByIdentifiers", + "description": "Self-assign contract(s) by pre-configured identifiers.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "requestBody": { + "description": "Identifiers to search by. Have to be pre-configured in Portal Configuration Permissions.", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Identifier-value pairs per schema to identify the contract", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "example": { + "contract": { + "contract_number": "123456" + }, + "meter": { + "meter_number": "123456" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Contract(s) assigned successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityItem" + } + }, + "hits": { + "type": "number", + "minimum": 0 + } + }, + "required": [ + "hits" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "409": { + "$ref": "#/components/responses/ContractAssignmentConflict" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/entity/identifiers/{slug}": { + "get": { + "operationId": "getEntityIdentifiers", + "summary": "getEntityIdentifiers", + "description": "Retrieve a list of entity identifiers used for entity search by portal users.", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "$ref": "#/components/schemas/EntitySlug" + }, + "required": true, + "description": "The slug of an entity" + } + ], + "responses": { + "200": { + "description": "The identifiers of the requested entity returned successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the identifier", + "example": "contract_number" + }, + "type": { + "type": "string", + "description": "The type of the identifier", + "example": "string" + } + } + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/entity/{slug}/{id}/activity": { + "get": { + "operationId": "getEntityActivityFeed", + "summary": "getEntityActivityFeed", + "description": "Get activity feed for an entity\n", + "tags": [ + "Activity" + ], + "parameters": [ + { + "in": "path", + "name": "slug", + "description": "Entity Type", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntitySlug" + } + }, + { + "in": "path", + "name": "id", + "description": "Entity id", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + }, + { + "in": "query", + "name": "after", + "description": "Get activities after this timestamp", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "in": "query", + "name": "before", + "description": "get activities before this timestamp", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "in": "query", + "name": "from", + "description": "start from page", + "schema": { + "type": "integer", + "minimum": 0, + "default": 0 + } + }, + { + "in": "query", + "name": "size", + "description": "max number of results to return", + "schema": { + "type": "integer", + "minimum": 1, + "default": 25 + } + }, + { + "in": "query", + "name": "type", + "description": "Filter by activity type", + "schema": { + "type": "string", + "example": "SyncActivity" + } + }, + { + "in": "query", + "name": "include_relations", + "description": "Include activities from related entities", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "example": 1 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityItem" + } + } + } + } + } + } + } + } + } + }, + "/v2/portal/{slug}/{id}:validateRule": { + "get": { + "operationId": "validateCadenceEntityEditRules", + "summary": "validateCadenceEntityEditRules", + "description": "Validate if cadence rule is valid for an entity\n", + "tags": [ + "ECP" + ], + "parameters": [ + { + "in": "path", + "name": "slug", + "description": "Entity Type", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntitySlug" + } + }, + { + "in": "path", + "name": "id", + "description": "Entity id", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + }, + { + "in": "query", + "name": "attribute", + "description": "Get activities after this timestamp", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isBlockedByRules": { + "type": "boolean", + "example": false + }, + "failedRule": { + "$ref": "#/components/schemas/EntityEditRule" + } + } + } + } + } + } + } + } + }, + "/v2/portal/entities-by-payment/{id}": { + "get": { + "operationId": "searchPaymentRelationsInEntities", + "summary": "searchPaymentRelationsInEntities", + "description": "Search for entities that have the payment relation with the given payment id\n", + "tags": [ + "ECP" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Entity id", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + } + ], + "responses": { + "200": { + "description": "Entities that have the payment relation.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityItem" + } + }, + "hits": { + "type": "number", + "description": "Total number of files for entities found", + "example": 50 + } + } + } + } + } + } + } + } + }, + "/v2/portal/entity/activity": { + "put": { + "operationId": "createCustomEntityActivity", + "summary": "createCustomEntityActivity", + "description": "Create a custom activity that can be displayed in activity feed of an entity.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "entities", + "description": "Comma-separated list of entities which the activity primarily concerns. Deprecated - ignored as the list of entities is automatically determined now.", + "deprecated": true, + "style": "form", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + }, + "minItems": 1, + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "PortalUserResetPassword" + ], + "description": "One of supported activity types" + } + }, + "required": [ + "type" + ] + } + } + } + }, + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityItem" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/entity/file": { + "post": { + "operationId": "saveEntityFile", + "summary": "saveEntityFile", + "description": "Add files to an entity", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "requestBody": { + "description": "The request of an file entity", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveEntityFile" + } + } + } + }, + "responses": { + "201": { + "description": "The files have been saved to the entitiy successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "createdFiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/File" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deleteEntityFile", + "summary": "deleteEntityFile", + "description": "Delete files from an entity", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "requestBody": { + "description": "Delete file", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteEntityFile" + } + } + } + }, + "responses": { + "202": { + "description": "The files are removed from the requested entity successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deletedFiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId", + "description": "File ID" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/portal/files": { + "post": { + "operationId": "savePortalFiles", + "summary": "savePortalFiles", + "description": "Add files to portal", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "description": "portal files request", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SavePortalFile" + } + } + } + }, + "responses": { + "201": { + "description": "The files have been saved to the portal successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "createdFiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/File" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/registration/identifiers": { + "get": { + "operationId": "getRegistrationIdentifiers", + "summary": "getRegistrationIdentifiers", + "description": "Get valid attributes from entities that can be used as identifier to map contact to user on registration", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "200": { + "description": "A dictionary of identifier attributes per entity schema are returned successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IdentifierAttribute" + } + }, + "example": { + "contact": [ + { + "label": "First name", + "name": "first_name", + "type": "string" + } + ], + "contract": [ + { + "label": "Contract number", + "name": "contract_number", + "type": "string" + } + ] + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/user/files": { + "get": { + "operationId": "getAllFiles", + "summary": "getAllFiles", + "description": "Fetch all documents under the related entities of a contact. Use searchPortalUserEntities instead.", + "deprecated": true, + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "from", + "schema": { + "type": "number", + "description": "Initial offset to set for the search results", + "example": 0 + }, + "required": true + }, + { + "in": "query", + "name": "size", + "schema": { + "type": "number", + "description": "Size of the search results", + "example": 0 + }, + "required": true + }, + { + "in": "query", + "name": "entity_ids", + "description": "List of entity ids to filter the results", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + }, + "minItems": 1, + "uniqueItems": true, + "example": [ + "4910096f-000a-4504-bf5a-d3774ec3032a", + "7c9f8536-6266-42e8-a0de-c60b61aa81a7" + ] + } + }, + { + "in": "query", + "name": "file_types", + "description": "List of `File.type`'s to filter the results", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true, + "example": [ + "document", + "image" + ] + } + } + ], + "responses": { + "200": { + "description": "The files have been fetched successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileItem" + } + }, + "hits": { + "type": "number", + "description": "Total number of files for pagination", + "example": 50 + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/user/file/{id}": { + "get": { + "operationId": "getFileById", + "summary": "getFileById", + "description": "Fetch a document with ID", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The Id of a file" + } + ], + "responses": { + "200": { + "description": "The files have been fetched successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "file": { + "$ref": "#/components/schemas/FileItem" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/user/file/{id}/downloaded": { + "post": { + "operationId": "trackFileDownloaded", + "summary": "trackFileDownloaded", + "description": "Track that user has downloaded a file", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The Id of a file" + } + ], + "responses": { + "200": { + "description": "File download tracked successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "file": { + "$ref": "#/components/schemas/FileItem" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/user/files/count-by-entity": { + "get": { + "operationId": "getFilesCountByEntity", + "summary": "getFileCountByEntity", + "description": "Fetch file counts for all ECP user related entities", + "deprecated": true, + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "responses": { + "200": { + "description": "The file counts have been fetched successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityFileCount" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/billing/events": { + "get": { + "operationId": "getBillingEvents", + "summary": "getBillingEvents", + "description": "Fetch billing events for a portal user", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "number", + "description": "Initial offset to set for the search results", + "default": 0, + "minimum": 0, + "example": 0 + } + }, + { + "in": "query", + "name": "size", + "required": false, + "schema": { + "type": "number", + "description": "Size of the search results.", + "default": 100, + "minimum": 0, + "maximum": 1000, + "example": 100 + } + }, + { + "name": "entity_id", + "in": "query", + "description": "Entity ID to filter billing events by", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + }, + "minItems": 1, + "uniqueItems": true + } + }, + { + "name": "event_type", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "installment", + "reimbursement" + ], + "description": "Type of billing event to filter by" + } + }, + { + "name": "paid", + "in": "query", + "schema": { + "type": "boolean", + "description": "Filter billing events by paid status" + } + }, + { + "name": "date_after", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "description": "List billing events after this date" + } + }, + { + "name": "date_before", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "description": "List billing events before this date" + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "type": "string", + "description": "Key to sort by", + "example": "due_date:asc" + } + } + ], + "responses": { + "200": { + "description": "List billing events for all contracts/orders of specific customer", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BillingEvent" + } + }, + "hits": { + "type": "number", + "description": "Total number of billing events for pagination", + "example": 50 + } + } + } + } + } + } + } + } + }, + "/v2/portal/billing/customers/balance": { + "get": { + "operationId": "getCustomerBalance", + "summary": "getCustomerBalance", + "description": "Get total balance across all contracts and orders of a customer entity.", + "security": [ + { + "PortalAuth": [] + } + ], + "tags": [ + "Balance" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Balance" + } + } + } + } + } + } + }, + "/v2/portal/billing/accounts/{id}": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + } + ], + "get": { + "operationId": "getBillingAccount", + "summary": "getBillingAccount", + "description": "Get a billing account by id.", + "security": [ + { + "PortalAuth": [] + } + ], + "tags": [ + "Billing Accounts", + "ECP" + ], + "responses": { + "200": { + "description": "The billing account has been fetched successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/BillingAccount" + }, + "relations": { + "type": "array", + "description": "The related entities of the requested billing account", + "items": { + "$ref": "#/components/schemas/EntityItem" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/admin:login-as-user": { + "post": { + "operationId": "loginToPortalAsUser", + "summary": "loginToPortalAsUser", + "description": "Generate a token to log in to a portal impersonating a users.\n\nToken is valid for 5 minutes.\n", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "description": "The request body to log in to a portal impersonating a user", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The email address of the user to log in as", + "example": "portal-customer@email.com" + }, + "origin": { + "$ref": "#/components/schemas/Origin" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The token has been generated successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "login_as_token": { + "type": "string", + "description": "A generated login_as_token to log in to a portal impersonating a user." + } + } + } + } + } + } + } + } + }, + "/v2/portal/entity/{schema}/access": { + "post": { + "operationId": "triggerEntityAccessEvent", + "summary": "triggerEntityAccessEvent", + "description": "Trigger entity access event for a portal user", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "name": "schema", + "in": "path", + "required": true, + "description": "Entity schema", + "schema": { + "type": "string", + "example": "contract" + } + }, + { + "name": "entity_id", + "in": "query", + "required": false, + "description": "Entity ID", + "schema": { + "$ref": "#/components/schemas/EntityId" + } + }, + { + "name": "origin", + "in": "query", + "required": true, + "description": "Portal origin", + "schema": { + "$ref": "#/components/schemas/Origin", + "description": "Origin of the portal" + } + } + ], + "responses": { + "200": { + "description": "The event has been triggered successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "eventId": { + "type": "string", + "description": "Event ID" + } + } + } + } + } + } + } + } + }, + "/v3/portal/entity/{schema}/access": { + "post": { + "operationId": "triggerEntityAccessEventV3", + "summary": "triggerEntityAccessEventV3", + "description": "Trigger entity access event for a portal user", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "name": "schema", + "in": "path", + "required": true, + "description": "Entity schema", + "schema": { + "type": "string", + "example": "contract" + } + }, + { + "name": "entity_id", + "in": "query", + "required": false, + "description": "Entity ID", + "schema": { + "$ref": "#/components/schemas/EntityId" + } + }, + { + "name": "portal_id", + "in": "query", + "required": true, + "description": "Portal ID", + "schema": { + "$ref": "#/components/schemas/PortalId" + } + } + ], + "responses": { + "200": { + "description": "The event has been triggered successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "eventId": { + "type": "string", + "description": "Event ID" + } + } + } + } + } + } + } + } + }, + "/v2/portal/entity:get": { + "post": { + "operationId": "getPortalUserEntity", + "summary": "getPortalUserEntity", + "description": "Get a single entity for a portal user", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGetParams" + } + } + } + }, + "responses": { + "200": { + "description": "The entity has been retrieved successfully for the portal user.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityResponse" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/entity:search": { + "post": { + "operationId": "searchPortalUserEntities", + "summary": "searchPortalUserEntities", + "description": "Search all entities of a portal user", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySearchParams" + } + } + } + }, + "responses": { + "200": { + "description": "The entities have been retrieved successfully for the portal user.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/EntityResponseWithHits" + }, + { + "$ref": "#/components/schemas/EntityResponseGroupedWithHits" + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/can-trigger-portal-flow": { + "post": { + "operationId": "canTriggerPortalFlow", + "summary": "canTriggerPortalFlow", + "description": "Returns whether the user can trigger a portal flow", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": false, + "deprecated": true, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + }, + { + "in": "query", + "name": "portal_id", + "required": true, + "schema": { + "type": "string", + "description": "Portal ID", + "example": "123" + } + } + ], + "requestBody": { + "description": "Request of trigger portal flow", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerPortalFlow" + } + } + } + }, + "responses": { + "200": { + "description": "Can Trigger Portal Flow", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "can_trigger": { + "type": "boolean", + "description": "Whether the flow can be triggered", + "example": true + } + } + } + } + } + } + } + } + }, + "/v2/portal/automation-context": { + "get": { + "operationId": "getAutomationContext", + "summary": "getAutomationContext", + "description": "Retrieves the automation context.", + "tags": [ + "ECP" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "activity_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ActivityId" + }, + "description": "Activity ID" + }, + { + "in": "query", + "name": "type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "file" + ] + }, + "description": "Type of the context to retrieve" + } + ], + "responses": { + "200": { + "description": "Retrieved the automation context successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Entity" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/workflow/{workflow_id}/{step_id}:markDone": { + "put": { + "operationId": "updateWorkflowStepAsDone", + "summary": "updateWorkflowStepAsDone", + "description": "Update a workflow step as done", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "workflow_id", + "required": true, + "schema": { + "type": "string", + "description": "ID of a workflow", + "example": "0bjwcxc827t" + } + }, + { + "in": "path", + "name": "step_id", + "required": true, + "schema": { + "type": "string", + "description": "ID of a step", + "example": "q1d6vcbsqvn" + } + } + ], + "responses": { + "200": { + "description": "Updated workflow step successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowStep" + } + } + } + } + } + } + }, + "/v2/portal/entity/{slug}/{id}/workflows": { + "get": { + "operationId": "getEntityWorkflows", + "summary": "Get workflows for an entity", + "description": "Get all workflows associated with an entity (requires access to the entity)", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "slug", + "required": true, + "schema": { + "type": "string", + "description": "Schema slug of the entity", + "example": "contact" + } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string", + "description": "ID of the entity", + "example": "abc123" + } + } + ], + "responses": { + "200": { + "description": "List of workflows for the entity", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "workflow_executions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowExecution" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/metering/reading/photo": { + "post": { + "operationId": "uploadMeterReadingPhoto", + "summary": "Upload Meter Reading Photo", + "description": "Uploads a Meter Reading photo and - if enabled - gives back data extracted from the photo.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "requestBody": { + "description": "Upload Meter reading photo payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MeterReadingPhoto" + } + } + } + }, + "responses": { + "200": { + "description": "Meter reading photo saved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MeterReadingPhotoData" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/metering/reading": { + "post": { + "operationId": "createMeterReading", + "summary": "Create Meter Reading", + "description": "Inserts a new meter reading.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "name": "override_plausibility", + "in": "query", + "required": false, + "description": "Override plausibility check", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "description": "Meter reading payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MeterReading" + } + } + } + }, + "responses": { + "200": { + "description": "Meter reading created successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MeterReading" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequestCreateMeterReading" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/metering/reading/allowed-range/{meter_id}": { + "get": { + "operationId": "getAllowedMeterReadingRange", + "description": "Get allowed reading range for all counters of a meter from the configured \nthird-party plausibility check hook using 'range' mode. This endpoint requires \na plausibility check hook to be configured for the portal.\n", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "meter_id", + "schema": { + "type": "string" + }, + "required": true, + "description": "The ID of the meter." + }, + { + "in": "query", + "name": "origin", + "required": false, + "schema": { + "$ref": "#/components/schemas/Origin" + }, + "description": "Origin of the portal" + }, + { + "in": "query", + "name": "timestamp", + "required": false, + "description": "If not provided, the system will default to now.", + "schema": { + "type": "string", + "example": "2022-10-01T10:10:00.000Z" + } + }, + { + "in": "query", + "name": "context_entities", + "required": false, + "description": "Additional entities to include in the context for variable interpolation in the hook.", + "schema": { + "$ref": "#/components/schemas/ContextEntities" + } + } + ], + "responses": { + "200": { + "description": "Allowed reading ranges for the meter.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "meter_counter_id": { + "type": "string", + "description": "The ID of the counter" + }, + "min_value": { + "type": "number", + "description": "Minimum allowed reading value", + "nullable": true + }, + "max_value": { + "type": "number", + "description": "Maximum allowed reading value", + "nullable": true + } + } + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/sso/login": { + "post": { + "operationId": "ssoLogin", + "summary": "ssoLogin", + "description": "Initiate login using external SSO identity.\n\nVerifies the user with the issuer and matches the identity to an epilot user (or creates a new user).\n\nReturns parameters to be used with CUSTOM_AUTH flow against Cognito\n", + "security": [ + { + "ExternalOIDCAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "origin", + "required": true, + "description": "Origin of the Portal", + "schema": { + "$ref": "#/components/schemas/Origin" + } + }, + { + "in": "query", + "name": "org_id", + "description": "epilot organization id", + "required": true, + "schema": { + "type": "string", + "example": 123 + } + }, + { + "in": "query", + "name": "contact_id", + "description": "contact id in the epilot system", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "example": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + } + ], + "tags": [ + "Login" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "provider_slug": { + "$ref": "#/components/schemas/ProviderSlug" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Cognito login parameters to use with the CUSTOM_AUTH_FLOW", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "$ref": "#/components/schemas/SSOLoginToken" + }, + "email": { + "type": "string", + "description": "The email address of the user to log in as", + "example": "portal-customer@email.com" + } + } + } + } + } + } + } + } + }, + "/v3/portal/public/sso/login": { + "post": { + "operationId": "ssoLoginV3", + "summary": "ssoLoginV3", + "description": "Initiate login using external SSO identity.\n\nVerifies the user with the issuer and matches the identity to an epilot user (or creates a new user).\n\nReturns parameters to be used with CUSTOM_AUTH flow against Cognito\n", + "security": [ + { + "ExternalOIDCAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "portal_id", + "required": true, + "description": "ID of the Portal", + "schema": { + "$ref": "#/components/schemas/PortalId" + } + }, + { + "in": "query", + "name": "org_id", + "description": "epilot organization id", + "required": true, + "schema": { + "type": "string", + "example": 123 + } + }, + { + "in": "query", + "name": "contact_id", + "description": "contact id in the epilot system", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "example": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + } + ], + "tags": [ + "Login" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "provider_slug": { + "$ref": "#/components/schemas/ProviderSlug" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Cognito login parameters to use with the CUSTOM_AUTH_FLOW", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "$ref": "#/components/schemas/SSOLoginToken" + }, + "email": { + "type": "string", + "description": "The email address of the user to log in as", + "example": "portal-customer@email.com" + } + } + } + } + } + } + } + } + }, + "/v2/portal/public/sso/redirect": { + "post": { + "operationId": "ssoRedirect", + "summary": "ssoRedirect", + "description": "Handles the redirect from the external SSO provider. Validates the authorization `code` and `state` received from the provider.\nRedirects the user to the provided `web_uri` with the validated credentials.\n", + "security": [], + "tags": [ + "Public" + ], + "parameters": [ + { + "in": "query", + "name": "web_uri", + "required": true, + "description": "The URI to redirect to after the SSO login", + "schema": { + "type": "string", + "example": "https://customer-portal.com" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The code received from the external SSO provider", + "example": "123456" + }, + "state": { + "type": "string", + "description": "The state received from the external SSO provider", + "example": "123456" + } + } + } + } + } + }, + "responses": { + "301": { + "description": "Redirect to the login page with the code", + "headers": { + "Location": { + "schema": { + "type": "string", + "example": "https://customer-portal.com/login?code=123456&state=123456" + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/sso/callback": { + "post": { + "operationId": "ssoCallback", + "summary": "ssoCallback", + "description": "Handles the callback from the external SSO provider, validates the authorization `code`\nand generates a external provider token to be used with the CUSTOM_AUTH flow against Cognito.\n", + "security": [], + "tags": [ + "Public" + ], + "parameters": [ + { + "in": "query", + "name": "domain", + "schema": { + "type": "string", + "example": "customer-portal.epilot.io", + "description": "The domain of the portal" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SSOCallbackRequest" + } + } + } + }, + "responses": { + "200": { + "description": "The token to be used with the CUSTOM_AUTH flow against Cognito", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SSOCallbackResponse" + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/pages/{id}": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + } + ], + "get": { + "operationId": "getPortalPage", + "summary": "getPortalPage", + "description": "Fetch a portal page by id", + "tags": [ + "ECP", + "ECP Admin" + ], + "security": [ + { + "EitherAuth": [] + } + ], + "responses": { + "200": { + "description": "The portal page has been fetched successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "put": { + "operationId": "updatePortalPage", + "summary": "updatePortalPage", + "description": "Update a portal page by id", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "description": "The portal page to update", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageRequest" + } + } + } + }, + "responses": { + "200": { + "description": "The portal page has been fetched successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deletePortalPage", + "summary": "deletePortalPage", + "description": "Delete a portal page by id", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "204": { + "description": "The portal page has been fetched successfully." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/pages": { + "parameters": [ + { + "in": "query", + "name": "domain", + "required": true, + "schema": { + "type": "string", + "example": "customer-portal.epilot.io", + "description": "The domain of the portal" + } + } + ], + "get": { + "operationId": "getPortalPages", + "summary": "getPortalPages", + "description": "Fetch all portal pages", + "tags": [ + "ECP", + "ECP Admin" + ], + "security": [ + { + "EitherAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "fields", + "required": false, + "description": "The fields to include in the response", + "schema": { + "type": "string", + "example": "id,slug,description" + } + }, + { + "in": "query", + "name": "filter", + "required": false, + "description": "The filter to apply to the response", + "schema": { + "type": "string", + "example": "slug=contracts" + } + }, + { + "in": "query", + "name": "contract_id", + "required": false, + "deprecated": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "description": "Contract context for blocks. Use context_entities instead." + }, + { + "in": "query", + "name": "context_entities", + "required": false, + "description": "If the request is in a context of certain entities (i.e. the user in in a context of a specific contract), pages can be customized for that. Portal User and Contact entities are automatically part of the context.", + "schema": { + "$ref": "#/components/schemas/ContextEntities" + } + } + ], + "responses": { + "200": { + "description": "The portal pages have been fetched successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Page" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "post": { + "operationId": "createPortalPage", + "summary": "createPortalPage", + "description": "Create a new portal page", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "description": "The portal page to create", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageRequest" + } + } + } + }, + "responses": { + "200": { + "description": "The portal page has been created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/pages": { + "get": { + "operationId": "getPublicPages", + "summary": "getPublicPages", + "description": "Fetch all public portal pages", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "domain", + "required": true, + "schema": { + "type": "string", + "example": "customer-portal.epilot.io", + "description": "The domain of the portal" + } + }, + { + "in": "query", + "name": "fields", + "required": false, + "description": "The fields to include in the response", + "schema": { + "type": "string", + "example": "id,slug,description" + } + }, + { + "in": "query", + "name": "filter", + "required": false, + "description": "The filter to apply to the response", + "schema": { + "type": "string", + "example": "schema=contract,slug=contracts" + } + } + ], + "responses": { + "200": { + "description": "The portal pages have been fetched successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Page" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/pages/default": { + "get": { + "operationId": "getDefaultPages", + "summary": "getDefaultPages", + "description": "Fetch all default portal pages", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "200": { + "description": "The default portal pages have been fetched successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Page" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/pages/{id}/blocks": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + } + ], + "post": { + "operationId": "createPortalPageBlock", + "summary": "createPortalPageBlock", + "description": "Create a new portal page block", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "description": "The portal page block to create", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlockRequest" + } + } + } + }, + "responses": { + "200": { + "description": "The portal page block has been created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Block" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "get": { + "operationId": "getPortalPageBlocks", + "summary": "getPortalPageBlocks", + "description": "Fetch all portal page blocks", + "tags": [ + "ECP", + "ECP Admin" + ], + "security": [ + { + "EitherAuth": [] + } + ], + "responses": { + "200": { + "description": "The portal page blocks have been fetched successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Block" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/pages/{id}/blocks/{block_id}": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + }, + { + "in": "path", + "name": "block_id", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + } + ], + "get": { + "operationId": "getPortalPageBlock", + "summary": "getPortalPageBlock", + "description": "Fetch a portal page block by id", + "tags": [ + "ECP", + "ECP Admin" + ], + "security": [ + { + "EitherAuth": [] + } + ], + "responses": { + "200": { + "description": "The portal page block has been fetched successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Block" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "put": { + "operationId": "updatePortalPageBlock", + "summary": "updatePortalPageBlock", + "description": "Update a portal page block by id", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "description": "The portal page block to update", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlockRequest" + } + } + } + }, + "responses": { + "200": { + "description": "The portal page block has been fetched successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Block" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deletePortalPageBlock", + "summary": "deletePortalPageBlock", + "description": "Delete a portal page block by id", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "204": { + "description": "The portal page block has been fetched successfully." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/user/entry-point": { + "get": { + "operationId": "getUserEntryPoint", + "summary": "getUserEntryPoint", + "description": "Get the entry point for the user", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "email", + "required": true, + "schema": { + "type": "string", + "description": "Email Address of the portal user", + "example": "user@example.com" + } + }, + { + "in": "query", + "name": "domain", + "required": true, + "schema": { + "type": "string", + "description": "Domain of the portal", + "example": "customer-portal.epilot.io" + } + } + ], + "responses": { + "200": { + "description": "Returned the entry point for the user", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "entry_point", + "user_exists" + ], + "properties": { + "user_exists": { + "type": "boolean", + "description": "Whether the user exists in the portal", + "example": true + }, + "entry_point": { + "type": "string", + "description": "The entry point for the user", + "enum": [ + "PASSWORD", + "SSO" + ] + }, + "preferred_sso_providers": { + "type": "array", + "description": "The SSO providers for the user", + "items": { + "$ref": "#/components/schemas/ProviderSlug" + } + }, + "is_soft_deleted": { + "type": "boolean", + "description": "Whether the user is soft deleted", + "example": true + } + } + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/campaign/{campaign_id}/entity:status": { + "put": { + "operationId": "updateCampaignPortalBlockStatus", + "summary": "Update Campaign Portal Block Status", + "description": "Updates the status of a campaign portal block for multiple recipients.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "campaign_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the campaign" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "status", + "entity_refs" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "seen", + "dismissed", + "clicked" + ], + "description": "The status to set for the campaign portal block" + }, + "entity_refs": { + "type": "array", + "items": { + "type": "object", + "required": [ + "entity_id", + "entity_schema" + ], + "properties": { + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "entity_schema": { + "type": "string", + "description": "Schema of the entity (e.g., contact, contract, opportunity, order, meter)" + } + } + }, + "description": "Array of entity references with their schemas" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Campaign portal block status updated successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "success", + "updated", + "failed", + "total" + ], + "properties": { + "success": { + "type": "boolean", + "description": "Whether the operation completed successfully", + "example": true + }, + "updated": { + "type": "integer", + "description": "Number of entities successfully updated", + "example": 2 + }, + "failed": { + "type": "integer", + "description": "Number of entities that failed to update", + "example": 0 + }, + "total": { + "type": "integer", + "description": "Total number of entities processed", + "example": 2 + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/notifications/entity:status": { + "put": { + "operationId": "updateNotificationsStatus", + "summary": "updateNotificationsStatus", + "description": "Updates the statuses of multiple notifications at once.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "notifications" + ], + "properties": { + "notifications": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "ID of the notification" + }, + "status": { + "type": "string", + "enum": [ + "read", + "important" + ], + "description": "The status to set for the notification" + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Notifications status updated successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Message indicating the status of the notifications", + "example": "Notifications status updated successfully." + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/m-login/deregister/{client_id}/{user_id}": { + "delete": { + "operationId": "deRegisterMLoginUser", + "summary": "deRegisterMLoginUser", + "description": "Deregisters a user from the M Login client", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "client_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "Client ID" + }, + { + "in": "path", + "name": "user_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "User ID" + } + ], + "responses": { + "204": { + "description": "User deregistered successfully" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/public/m-login/notify-interest-change/{client_id}/{user_id}": { + "post": { + "operationId": "notifyMLoginInterestChange", + "summary": "notifyMLoginInterestChange", + "description": "Notifies the interest change of a user in the M Login client", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "client_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "Client ID" + }, + { + "in": "path", + "name": "user_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "User ID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "properties": { + "resource_id": { + "type": "string", + "description": "Resource ID" + }, + "user_id": { + "type": "string", + "description": "Resource type" + }, + "interest_tag": { + "type": "string", + "description": "Interest tag" + }, + "action": { + "type": "string", + "description": "Action" + }, + "resource": { + "type": "object", + "additionalProperties": true, + "properties": { + "resource_id": { + "type": "string", + "description": "Resource ID" + }, + "description": { + "type": "string", + "description": "Description", + "nullable": true + }, + "contact": { + "type": "string", + "description": "Contact" + }, + "kind": { + "type": "string", + "description": "Kind" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Interest change acknowledged successfully" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/config": { + "post": { + "operationId": "createPortalConfig", + "summary": "createPortalConfig", + "description": "Creates a new portal configuration.", + "tags": [ + "ECP Admin" + ], + "requestBody": { + "description": "Portal configuration payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertPortalConfigV3" + } + } + } + }, + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "201": { + "description": "Portal config created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PortalConfigV3" + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/config/{portal_id}": { + "get": { + "operationId": "getPortalConfigV3", + "summary": "getPortalConfigV3", + "description": "Retrieves a specific portal configuration by ID.", + "tags": [ + "ECP Admin", + "ECP" + ], + "parameters": [ + { + "in": "path", + "name": "portal_id", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "description": "Portal ID (readonly UUID generated on portal creation)" + } + ], + "security": [ + { + "EitherAuth": [] + } + ], + "responses": { + "200": { + "description": "Portal config retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PortalConfigV3" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "put": { + "operationId": "putPortalConfig", + "summary": "putPortalConfig", + "description": "Updates a specific portal configuration by ID.", + "tags": [ + "ECP Admin" + ], + "parameters": [ + { + "in": "path", + "name": "portal_id", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "description": "Portal ID (readonly UUID generated on portal creation)" + } + ], + "requestBody": { + "description": "Portal configuration payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PortalConfigV3" + } + } + } + }, + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "200": { + "description": "Portal config updated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PortalConfigV3" + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deletePortalConfig", + "summary": "deletePortalConfig", + "description": "Deletes a specific portal configuration by ID.", + "tags": [ + "ECP Admin" + ], + "parameters": [ + { + "in": "path", + "name": "portal_id", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "description": "Portal ID (readonly UUID generated on portal creation)" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "204": { + "description": "Portal config deleted successfully." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/configs": { + "get": { + "operationId": "listAllPortalConfigs", + "summary": "listAllPortalConfigs", + "description": "Retrieves all portal configurations.", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "200": { + "description": "All portal configs retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PortalConfigV3" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/config/swap": { + "post": { + "operationId": "swapPortalConfig", + "summary": "swapPortalConfig", + "description": "Swaps the portal configuration of two portals.", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "description": "Source and target portal IDs", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "source_portal_id", + "target_portal_id" + ], + "properties": { + "source_portal_id": { + "$ref": "#/components/schemas/PortalId" + }, + "target_portal_id": { + "$ref": "#/components/schemas/PortalId" + }, + "items_to_swap": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SwappableConfig" + }, + "description": "Items to swap" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Domain and users swapped successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Domain and users swapped successfully." + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/partner/invite": { + "post": { + "operationId": "invitePartner", + "summary": "invitePartner", + "description": "Invites a partner to a portal", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "requestBody": { + "description": "Partner to invite", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email" + ], + "properties": { + "email": { + "type": "string", + "description": "Email address of the partner to invite" + }, + "represents_contact_list": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId", + "description": "List of contact IDs representing the contacts / business partners the invited user should be added to.\nWhen omitted, the user is automatically added to all contacts / business partners linked to the account.\n" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "User invited successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "User invited successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/partner/list": { + "get": { + "operationId": "listBusinessPartners", + "summary": "listBusinessPartners", + "description": "Lists all business partners linked to the businessaccount", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "responses": { + "200": { + "description": "Business partners listed successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BusinessPartnerItem" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/partner/{partner_id}/resend-invitation": { + "post": { + "operationId": "resendPartnerInvitation", + "summary": "resendPartnerInvitation", + "description": "Resends an invitation email to a partner", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "name": "partner_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the partner to resend invitation to" + } + } + ], + "responses": { + "200": { + "description": "Partner invitation resent successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Partner invitation resent successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/partner/{partner_id}/revoke": { + "delete": { + "operationId": "revokePartner", + "summary": "revokePartner", + "description": "Revokes a partner from a portal", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "name": "partner_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the partner to revoke from the portal" + } + } + ], + "responses": { + "200": { + "description": "Partner revoked from portal successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Partner revoked from portal successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/partner/{partner_id}/disable": { + "post": { + "operationId": "disablePartner", + "summary": "disablePartner", + "description": "Disables a partner from a portal", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "name": "partner_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the partner to disable from the portal" + } + } + ], + "responses": { + "200": { + "description": "Partner disabled from portal successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Partner disabled from portal successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/portal/partner/{partner_id}/enable": { + "post": { + "operationId": "enablePartner", + "summary": "enablePartner", + "description": "Enables a partner from a portal", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "name": "partner_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the partner to enable from the portal" + } + } + ], + "responses": { + "200": { + "description": "Partner enabled from portal successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Partner enabled from portal successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + } + }, + "components": { + "responses": { + "InvalidRequest": { + "description": "The request could not be validated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "Unauthorized": { + "description": "Could not authenticate the user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "Forbidden": { + "description": "The user is not allowed to access this resource", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "ForbiddenByRule": { + "description": "The user is not allowed to access this resource", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorResp" + }, + { + "$ref": "#/components/schemas/FailedRuleErrorResp" + } + ] + } + } + } + }, + "Conflict": { + "description": "The request conflicts with the current state of the target resource.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "ContractAssignmentConflict": { + "description": "Contract was found but is not assignable in its current state.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResp" + }, + { + "properties": { + "reason": { + "type": "string", + "description": "Reason why the contract is not assignable. If the reason is \"MULTIPLE\", the contract is not assignable because multiple contracts were found and the business logic does not allow it.", + "enum": [ + "DRAFT", + "MULTIPLE" + ] + } + }, + "required": [ + "reason" + ] + } + ] + } + } + } + }, + "NotFound": { + "description": "The specified resource was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "InternalServerError": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "ConfirmUserInvalidRequest": { + "description": "The request could not be validated", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResp" + }, + { + "properties": { + "reason": { + "type": "string", + "enum": [ + "invalid_token" + ] + } + }, + "required": [ + "reason" + ] + } + ] + } + } + } + }, + "InvalidRequestCreateMeterReading": { + "description": "The request could not be validated", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResp" + }, + { + "properties": { + "reason": { + "type": "string", + "enum": [ + "contract_period", + "no_counter", + "no_direction", + "timestamp_future", + "less_than_previous", + "greater_than_subsequent", + "meter_decommissioned", + "plausibility_check_failed" + ] + } + } + }, + { + "oneOf": [ + { + "properties": { + "reason": { + "enum": [ + "plausibility_check_failed" + ] + }, + "upper_limit": { + "type": "number" + }, + "lower_limit": { + "type": "number" + } + }, + "required": [ + "upper_limit", + "lower_limit" + ] + }, + { + "not": { + "properties": { + "reason": { + "enum": [ + "plausibility_check_failed" + ] + } + } + } + } + ] + } + ] + } + } + } + } + }, + "securitySchemes": { + "PortalAuth": { + "type": "http", + "scheme": "bearer", + "description": "Portal Cognito Token" + }, + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Epilot Bearer Token" + }, + "EitherAuth": { + "type": "http", + "scheme": "bearer", + "description": "Portal or Epilot Bearer Token" + }, + "AsOrganization": { + "type": "apiKey", + "in": "header", + "name": "x-ivy-org-id", + "description": "Set organization id as internal user" + }, + "ExternalOIDCAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with id token from external OIDC provider", + "bearerFormat": "JWT" + } + }, + "schemas": { + "ContextEntity": { + "type": "object", + "description": "An entity reference for context-aware operations", + "properties": { + "entity_schema": { + "type": "string", + "description": "Entity schema", + "example": "contract" + }, + "entity_id": { + "type": "string", + "format": "uuid", + "description": "Entity id", + "example": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + }, + "required": [ + "entity_id", + "entity_schema" + ] + }, + "ContextEntities": { + "type": "array", + "description": "Additional entities to include in the context for variable interpolation. Portal User and Contact entities are automatically part of the context.", + "items": { + "$ref": "#/components/schemas/ContextEntity" + }, + "example": [ + { + "entity_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "entity_schema": "contract" + } + ] + }, + "ErrorResp": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "FailedRuleErrorResp": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Error message" + }, + "failed_rule": { + "type": "object", + "description": "Failed validation rule" + } + } + }, + "EmailTemplates": { + "type": "object", + "description": "Email templates used for authentication and internal processes", + "properties": { + "confirmAccount": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the confirmation email template upon registration" + }, + "advancedAuth": { + "$ref": "#/components/schemas/EntityId", + "nullable": true, + "description": "ID of the advanced Auth with login link and login code" + }, + "advancedMFA": { + "$ref": "#/components/schemas/EntityId", + "nullable": true, + "deprecated": true, + "description": "ID of the advanced MFA with login link and login code" + }, + "journeySignUp": { + "$ref": "#/components/schemas/EntityId", + "nullable": true, + "description": "ID of the email template for signing up from Journeys" + }, + "journeySignInOneTimePassword": { + "$ref": "#/components/schemas/EntityId", + "nullable": true, + "description": "ID of the email template for OTP to sign in from Journeys" + }, + "journeyLoginOTP": { + "$ref": "#/components/schemas/EntityId", + "nullable": true, + "description": "ID of the email template for OTP to sign in from Journeys", + "deprecated": true + }, + "forgotPassword": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the email template for forgot password" + }, + "invitation": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the email template for invitation when the user is just invited to register on the portal." + }, + "partnerInvitation": { + "$ref": "#/components/schemas/EntityId", + "nullable": true, + "description": "ID of the email template for invitation when a partner invites another partner within the portal." + }, + "onNewQuote": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the email template for new quote" + }, + "onMapAPendingUser": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the email template for mapping a pending portal user with a contact" + }, + "onDocUpload": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the email template for document upload" + }, + "onWorkflowStepAssigned": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the email template for workflow step assignment" + }, + "confirmEmailUpdate": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the email template for setting password while updating email" + }, + "verifyCodeToSetPassword": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the email template for setting password while verifying code" + } + } + }, + "DeleteEntityFile": { + "type": "object", + "required": [ + "file_entity_ids", + "entity_type", + "entity_id" + ], + "properties": { + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "entity_type": { + "type": "string", + "example": "order", + "description": "Entity type" + }, + "file_entity_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + }, + "minItems": 1, + "uniqueItems": true, + "description": "Array of file entity IDs" + } + } + }, + "SaveEntityFile": { + "type": "object", + "required": [ + "entity_id", + "entity_type", + "files" + ], + "properties": { + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "entity_type": { + "type": "string", + "example": "order", + "description": "Entity type" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "required": [ + "filename", + "s3ref" + ], + "properties": { + "filename": { + "type": "string", + "example": "document.pdf", + "description": "File name" + }, + "access_control": { + "type": "string", + "default": "private", + "enum": [ + "private", + "public-read" + ], + "description": "Access control level for the file. Deprecated - all files are private.", + "deprecated": true + }, + "s3ref": { + "type": "object", + "required": [ + "bucket", + "key" + ], + "properties": { + "bucket": { + "type": "string", + "example": 12345, + "description": "S3 bucket name" + }, + "key": { + "type": "string", + "example": 12345, + "description": "S3 key" + } + } + } + } + } + } + } + }, + "SavePortalFile": { + "type": "object", + "required": [ + "files", + "origin" + ], + "properties": { + "origin": { + "$ref": "#/components/schemas/Origin", + "description": "Origin of the portal" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "required": [ + "file_type" + ], + "properties": { + "filename": { + "type": "string", + "example": 12345, + "description": "File name" + }, + "file_type": { + "type": "string", + "example": "orderRightTeaser", + "description": "File type" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": 12345, + "description": "Array of file tags" + }, + "s3ref": { + "type": "object", + "required": [ + "bucket", + "key" + ], + "properties": { + "bucket": { + "type": "string", + "example": 12345, + "description": "S3 bucket name" + }, + "key": { + "type": "string", + "example": 12345, + "description": "S3 key" + } + } + } + } + } + } + } + }, + "ExtraSchemaAttributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "name", + "label", + "group" + ], + "properties": { + "name": { + "type": "string", + "description": "Attribute name" + }, + "label": { + "type": "string", + "description": "Attribute label" + }, + "group": { + "type": "string", + "description": "Attribute group" + } + } + } + }, + "Origin": { + "type": "string", + "description": "Origin of the portal" + }, + "AllowedFileExtensions": { + "type": "object", + "description": "Allowed file extensions for upload", + "properties": { + "document": { + "type": "array", + "items": { + "type": "string", + "example": "pdf" + } + }, + "image": { + "type": "array", + "items": { + "type": "string", + "example": "jpg" + } + }, + "spreadsheet": { + "type": "array", + "items": { + "type": "string", + "example": "xls" + } + }, + "presentation": { + "type": "array", + "items": { + "type": "string", + "example": "ppt" + } + }, + "audioVideo": { + "type": "array", + "items": { + "type": "string", + "example": "mp4" + } + }, + "email": { + "type": "array", + "items": { + "type": "string", + "example": "eml" + } + }, + "archive": { + "type": "array", + "items": { + "type": "string", + "example": "zip" + } + }, + "cad": { + "type": "array", + "items": { + "type": "string", + "example": "cad" + } + }, + "calendar": { + "type": "array", + "items": { + "type": "string", + "example": "ics" + } + }, + "other": { + "type": "array", + "items": { + "type": "string", + "example": "txt" + } + } + }, + "additionalProperties": false + }, + "UpdateOnlyPortalConfigAttributes": { + "type": "object", + "properties": { + "entity_actions": { + "type": "array", + "description": "Journey actions allowed on an entity by a portal user", + "items": { + "type": "object", + "properties": { + "journey_id": { + "$ref": "#/components/schemas/EntityId" + }, + "slug": { + "$ref": "#/components/schemas/EntitySlug" + }, + "action_Label": { + "type": "object", + "properties": { + "en": { + "type": "string" + }, + "de": { + "type": "string" + } + } + } + } + } + }, + "extensions": { + "type": "array", + "description": "Configured Portal extensions", + "items": { + "$ref": "#/components/schemas/ExtensionConfig" + } + }, + "extension_hooks": { + "type": "object", + "description": "Configured Portal extensions hooks", + "additionalProperties": { + "$ref": "#/components/schemas/ExtensionHookSelection" + } + }, + "default_user_to_notify": { + "type": "object", + "description": "Default 360 user to notify upon an internal notification", + "properties": { + "onPendingUser": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminUser" + }, + "description": "Default admin users for pending user notification to notify" + } + } + } + } + }, + "CommonConfigAttributes": { + "type": "object", + "required": [ + "domain" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable the portal access" + }, + "name": { + "type": "string", + "description": "A short name to identify your portal", + "example": "Installer Portal" + }, + "domain": { + "type": "string", + "description": "The URL on which the portal is accessible", + "example": "abc.com" + }, + "is_epilot_domain": { + "type": "boolean", + "description": "Mark true if the domain is an Epilot domain" + }, + "epilot_domain": { + "type": "string", + "description": "The URL on which the portal is accessible", + "example": "example-portal-12345.ecp.epilot.cloud" + }, + "domain_settings": { + "$ref": "#/components/schemas/DomainSettings" + }, + "design_id": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the design used to build the portal" + }, + "self_registration_setting": { + "type": "string", + "enum": [ + "ALLOW_WITH_CONTACT_CREATION", + "ALLOW_WITHOUT_CONTACT_CREATION", + "DENY", + "ALWAYS_CREATE_CONTACT", + "DISALLOW_COMPLETELY", + "BLOCK_IF_PORTAL_USER_EXISTS" + ] + }, + "user_account_self_management": { + "type": "boolean", + "description": "Enable or disable user account self management", + "example": false + }, + "feature_settings": { + "type": "object", + "description": "Feature settings for the portal", + "properties": { + "start_page": { + "type": "boolean", + "description": "Start page feature flag" + }, + "billing": { + "type": "boolean", + "description": "Billing feature flag" + }, + "change_due_date": { + "type": "boolean", + "description": "Change due date feature flag" + }, + "new_design": { + "type": "boolean", + "description": "Enable or disable the new design for the portal" + } + } + }, + "accessToken": { + "type": "string", + "description": "Access token for the portal" + }, + "advanced_mfa": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Advanced MFA feature flag" + } + } + }, + "auth_settings": { + "type": "object", + "description": "Authentication settings for the portal", + "properties": { + "passwordless_login": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Passwordless login feature flag" + } + } + }, + "entry_point": { + "type": "string", + "enum": [ + "PASSWORD", + "SSO" + ] + }, + "preferred_sso_providers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProviderSlug" + } + }, + "auto_redirect_to_sso": { + "type": "boolean", + "description": "Decide whether to automatically redirect to the provider page during login, which would completely bypass showing the portal authentication page." + } + } + }, + "cognito_details": { + "type": "object", + "description": "AWS Cognito Pool details for the portal", + "properties": { + "cognito_user_pool_client_id": { + "type": "string", + "example": "6bsd0jkgoie74k2i8mrhc1vest", + "description": "Cognito user pool client ID" + }, + "cognito_user_pool_arn": { + "type": "string", + "example": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "description": "Cognito user pool ARN" + }, + "cognito_user_pool_id": { + "type": "string", + "example": "eu-central-1_CUEQRNbUb", + "description": "Cognito user pool ID" + }, + "password_policy": { + "type": "object", + "description": "Password policy for the portal", + "properties": { + "minimum_length": { + "type": "integer", + "example": 8, + "description": "Minimum password length" + }, + "maximum_length": { + "type": "integer", + "example": 256, + "description": "Maximum password length" + }, + "require_lowercase": { + "type": "boolean", + "example": true, + "description": "Require lowercase characters" + }, + "require_uppercase": { + "type": "boolean", + "example": true, + "description": "Require uppercase characters" + }, + "require_numbers": { + "type": "boolean", + "example": true, + "description": "Require numbers" + }, + "require_symbols": { + "type": "boolean", + "example": true, + "description": "Require symbols" + } + } + } + } + }, + "config": { + "type": "string", + "description": "Stringified object with configuration details" + }, + "contact_identifiers": { + "type": "array", + "description": "Deprecated. Use registration_identifiers instead.", + "deprecated": true, + "items": { + "type": "string" + }, + "example": [ + "email", + "last_name" + ] + }, + "approval_state_attributes": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": { + "contact": [ + "name", + "address" + ], + "contract": [ + "installment_amount" + ] + } + }, + "email_templates": { + "$ref": "#/components/schemas/EmailTemplates" + }, + "images": { + "type": "object", + "description": "Teaser & Banner Image web links", + "properties": { + "orderLeftTeaser": { + "type": "string", + "nullable": true, + "example": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "description": "URL of the order left teaser image" + }, + "orderRightTeaser": { + "type": "string", + "nullable": true, + "example": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "description": "URL of the order right teaser image" + }, + "welcomeBanner": { + "type": "string", + "nullable": true, + "example": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg", + "description": "URL of the welcome banner image" + } + } + }, + "entity_identifiers": { + "type": "object", + "description": "Identifiers used to identify an entity by a portal user. Deprecated. Use contract_identifiers instead.", + "deprecated": true, + "properties": { + "type": { + "type": "object", + "properties": { + "isEnabled": { + "type": "boolean", + "description": "Enable/Disable the entity identifier" + }, + "attributes": { + "type": "array", + "description": "Attributes used to identify an entity", + "items": { + "type": "string", + "example": "contract_number" + } + } + } + } + } + }, + "contract_identifiers": { + "type": "array", + "description": "Identifiers to identify a contract by a portal user.", + "items": { + "$ref": "#/components/schemas/ContractIdentifier" + }, + "example": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ] + }, + "contract_selector_config": { + "type": "object", + "description": "Configuration for contract selector in the portal", + "properties": { + "show_inactive": { + "type": "boolean", + "description": "Whether to show inactive contracts in the selector" + }, + "title_path": { + "type": "string", + "description": "Path to the property to use as the contract title" + } + } + }, + "registration_identifiers": { + "type": "array", + "description": "Identifiers to identify a contact of a portal user during the registration.", + "items": { + "$ref": "#/components/schemas/ContractIdentifier" + }, + "example": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ] + }, + "triggered_journeys": { + "type": "array", + "description": "Journeys automatically opened on a portal user action", + "items": { + "type": "object", + "properties": { + "trigger_name": { + "type": "string", + "enum": [ + "FIRST_LOGIN", + "ACCEPT_ORDER", + "DECLINE_ORDER" + ] + }, + "journey_id": { + "$ref": "#/components/schemas/EntityId" + } + } + } + }, + "entity_edit_rules": { + "type": "array", + "description": "Rules for editing an entity by a portal user", + "items": { + "type": "object", + "properties": { + "slug": { + "$ref": "#/components/schemas/EntitySlug" + }, + "attribute": { + "type": "string", + "example": "first_name" + }, + "rule_type": { + "type": "string", + "enum": [ + "cadence", + "relative_to_current_value", + "days_before_date", + "overdue_payments" + ] + }, + "cadence_period_type": { + "type": "string", + "enum": [ + "days", + "weeks", + "months" + ] + }, + "cadence_period": { + "type": "number", + "example": 1 + }, + "changes_allowed": { + "type": "integer", + "example": 1 + }, + "grace_period": { + "type": "integer", + "example": 1 + }, + "allowed_increment": { + "type": "string", + "example": "10%" + }, + "allowed_decrement": { + "type": "string", + "example": "10%" + }, + "number_of_days_before_restriction": { + "type": "integer", + "example": 10 + } + } + } + }, + "allowed_file_extensions": { + "$ref": "#/components/schemas/AllowedFileExtensions" + }, + "prevent_search_engine_indexing": { + "type": "boolean", + "description": "Prevent indexing by search engines" + }, + "meter_reading_grace_period": { + "type": "number", + "description": "Grace period in days for meter readings" + }, + "inactive_contract_cutoff_years": { + "type": "number", + "description": "Number of years to look back for showing inactive contracts in the portal" + }, + "is_dummy": { + "type": "boolean", + "description": "Whether this is a dummy/test portal configuration" + }, + "is_v3_item": { + "type": "boolean", + "description": "Whether this is a v3 portal configuration" + }, + "portal_id": { + "$ref": "#/components/schemas/PortalId" + }, + "portal_sk_v3": { + "type": "string", + "example": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "description": "Key of the portal config" + }, + "origin": { + "$ref": "#/components/schemas/Origin" + }, + "pages": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "UpsertPortalConfig": { + "required": [ + "domain" + ], + "allOf": [ + { + "$ref": "#/components/schemas/UpdateOnlyPortalConfigAttributes" + }, + { + "$ref": "#/components/schemas/CommonConfigAttributes" + } + ] + }, + "PortalConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonConfigAttributes" + }, + { + "properties": { + "id": { + "type": "string", + "example": 12345, + "description": "ID of the organization", + "deprecated": true + }, + "organization_id": { + "type": "string", + "example": 12345, + "description": "ID of the organization" + }, + "org_settings": { + "type": "object", + "description": "Organization settings", + "properties": { + "canary": { + "type": "object", + "description": "Canary feature flag", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable the canary feature" + } + } + }, + "notracking": { + "type": "object", + "description": "Disable Advanced Usage Metrics", + "properties": { + "enabled": { + "type": "boolean", + "description": "Disable browser-side scripts that track advanced usage metrics" + } + } + } + } + }, + "feature_flags": { + "type": "object", + "description": "Feature flags for the portal", + "additionalProperties": { + "type": "boolean" + } + }, + "grants": { + "type": "array", + "description": "Permissions granted to a portal user while accessing entities", + "items": { + "$ref": "#/components/schemas/Grant" + } + }, + "identity_providers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProviderPublicConfig" + } + } + } + } + ] + }, + "UpsertPortalWidget": { + "type": "object", + "required": [ + "widgets" + ], + "properties": { + "widgets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PortalWidget" + } + } + } + }, + "DomainSettings": { + "type": "object", + "description": "Domain settings for the portal", + "properties": { + "is_custom_domain_enabled": { + "type": "boolean", + "description": "Whether the custom domain is enabled" + }, + "is_epilot_domain_enabled": { + "type": "boolean", + "description": "Whether the Epilot domain is enabled" + }, + "is_redirection_enabled": { + "type": "boolean", + "description": "Whether the redirection is enabled" + } + } + }, + "WidgetBase": { + "type": "object", + "required": [ + "id", + "type", + "listIndex" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "ACTION_WIDGET", + "CONTENT_WIDGET", + "ENTITY_WIDGET", + "TEASER_WIDGET", + "DOCUMENT_WIDGET", + "PAYMENT_WIDGET", + "METER_READING_WIDGET", + "METER_CHART_WIDGET", + "CAMPAIGN_WIDGET" + ] + }, + "listIndex": { + "type": "integer", + "description": "Index of the widget in the list, used for ordering (left or right)" + }, + "headline": { + "type": "object", + "properties": { + "en": { + "type": "string" + }, + "de": { + "type": "string" + } + } + }, + "subHeadline": { + "type": "object", + "properties": { + "en": { + "type": "string" + }, + "de": { + "type": "string" + } + } + } + } + }, + "EntityWidget": { + "allOf": [ + { + "$ref": "#/components/schemas/WidgetBase" + }, + { + "type": "object", + "properties": { + "schema": { + "type": "string" + } + } + } + ] + }, + "MeterReadingWidget": { + "allOf": [ + { + "$ref": "#/components/schemas/WidgetBase" + }, + { + "type": "object", + "properties": { + "schema": { + "type": "string" + } + } + } + ] + }, + "MeterChartWidget": { + "allOf": [ + { + "$ref": "#/components/schemas/WidgetBase" + }, + { + "type": "object", + "properties": { + "schema": { + "type": "string" + } + } + } + ] + }, + "WidgetAction": { + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "link", + "journey" + ] + }, + "label": { + "type": "object", + "properties": { + "en": { + "type": "string" + }, + "de": { + "type": "string" + } + } + }, + "url": { + "type": "string" + }, + "rules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "attribute": { + "type": "string" + }, + "attribute_value": { + "type": "string" + }, + "entity": { + "type": "string" + } + }, + "required": [ + "attribute", + "attribute_value", + "entity" + ] + } + } + }, + "required": [ + "type", + "label", + "url", + "_id" + ] + }, + "ActionWidget": { + "allOf": [ + { + "$ref": "#/components/schemas/WidgetBase" + }, + { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WidgetAction" + } + } + } + } + ] + }, + "TeaserWidget": { + "allOf": [ + { + "$ref": "#/components/schemas/WidgetBase" + }, + { + "type": "object", + "properties": { + "imageUrl": { + "type": "string" + }, + "button": { + "type": "object", + "properties": { + "label": { + "type": "object", + "properties": { + "en": { + "type": "string" + }, + "de": { + "type": "string" + } + } + }, + "url": { + "type": "string" + } + } + } + } + } + ] + }, + "ContentWidget": { + "allOf": [ + { + "$ref": "#/components/schemas/WidgetBase" + }, + { + "type": "object", + "properties": { + "content": { + "type": "string" + } + } + } + ] + }, + "DocumentWidget": { + "allOf": [ + { + "$ref": "#/components/schemas/WidgetBase" + } + ] + }, + "PaymentWidget": { + "allOf": [ + { + "$ref": "#/components/schemas/WidgetBase" + } + ] + }, + "CampaignWidget": { + "allOf": [ + { + "$ref": "#/components/schemas/TeaserWidget" + }, + { + "type": "object", + "properties": { + "campaign_id": { + "type": "string", + "description": "ID of the campaign" + } + } + } + ] + }, + "PortalWidget": { + "anyOf": [ + { + "$ref": "#/components/schemas/EntityWidget" + }, + { + "$ref": "#/components/schemas/ContentWidget" + }, + { + "$ref": "#/components/schemas/ActionWidget" + }, + { + "$ref": "#/components/schemas/TeaserWidget" + }, + { + "$ref": "#/components/schemas/DocumentWidget" + }, + { + "$ref": "#/components/schemas/PaymentWidget" + }, + { + "$ref": "#/components/schemas/MeterReadingWidget" + }, + { + "$ref": "#/components/schemas/MeterChartWidget" + }, + { + "$ref": "#/components/schemas/CampaignWidget" + } + ] + }, + "ContactCountRequest": { + "type": "object", + "required": [ + "contactIdentifiers", + "orgId" + ], + "properties": { + "orgId": { + "type": "string", + "example": 728, + "description": "ID of the organization" + }, + "contactIdentifiers": { + "type": "object", + "description": "Identifiers to identify a contact", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ContactExistsRequest": { + "type": "object", + "required": [ + "registration_identifiers", + "org_id" + ], + "properties": { + "org_id": { + "type": "string", + "example": 728, + "description": "ID of the organization" + }, + "registration_identifiers": { + "type": "object", + "description": "Identifier-value pairs per schema to identify a contact of a portal user during the resgistration", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "example": { + "contact": { + "email": "john.doe@example.com" + }, + "contract": { + "contract_number": "123456" + } + } + } + } + }, + "UserRequest": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "testemail921@yopmail.com", + "description": "User's email address" + }, + "first_name": { + "type": "string", + "example": "John", + "description": "First Name of the portal user" + }, + "last_name": { + "type": "string", + "example": "Doe", + "description": "Last Name of the portal user" + }, + "contactId": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the contact" + } + } + }, + "CreateUserRequest": { + "required": [ + "email", + "orgId", + "password" + ], + "allOf": [ + { + "$ref": "#/components/schemas/UserRequest" + }, + { + "properties": { + "orgId": { + "type": "string", + "example": 728, + "description": "ID of the organization" + }, + "password": { + "type": "string", + "example": "124n$aAJs*d41h4", + "description": "User's password" + }, + "contactIdentifiers": { + "type": "object", + "description": "Deprecated. Use registration_identifiers instead.", + "deprecated": true, + "additionalProperties": { + "type": "string" + } + }, + "registration_identifiers": { + "type": "object", + "description": "Identifier-value pairs per schema to identify a contact of a portal user during the resgistration", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "example": { + "contact": { + "email": "john.doe@example.com" + }, + "contract": { + "contract_number": "123456" + } + } + }, + "account_id": { + "type": "string", + "description": "ID of the account" + } + } + } + ] + }, + "OrganizationSettings": { + "type": "object", + "properties": { + "automation_entity_mapping": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable automation entity mapping" + } + } + }, + "automation_preview": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable automation preview" + } + } + }, + "central_inbox_preview_setting": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable central inbox preview setting" + } + } + }, + "contracts_preview_setting": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable contracts preview setting" + } + } + }, + "disable_ivy": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable Ivy" + } + } + }, + "double_opt_in": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable double opt-in" + } + } + }, + "ecommerce_catalog_preview": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable ecommerce catalog preview" + } + } + }, + "ecommerce_opportunities_preview": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable ecommerce opportunities preview" + } + } + }, + "ecommerce_preview": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable ecommerce preview" + } + } + }, + "end_customer_portal": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable end customer portal" + } + } + }, + "installer_portal": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable installer portal" + } + } + }, + "entity_schema_builder": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable entity schema builder" + } + } + }, + "logic_editor_preview": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable logic editor preview" + } + } + }, + "new_navigation": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable new navigation" + } + } + }, + "partnering": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable partnering" + } + } + }, + "product-availability": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable product availability" + } + } + }, + "sso": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable single sign-on (SSO)" + } + } + }, + "submission_preview": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable submission preview" + } + } + }, + "user_roles_preview": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable user roles preview" + } + } + } + } + }, + "AuthConfig": { + "type": "object", + "properties": { + "user_pool_id": { + "type": "string", + "example": "eu-central-1_CUEQRNbUb", + "description": "AWS Cognito User Pool ID" + }, + "user_pool_client_id": { + "type": "string", + "example": "6bsd0jkgoie74k2i8mrhc1vest", + "description": "AWS Cognito User Pool Client ID" + }, + "user_pool_identity_pool_id": { + "type": "string", + "example": "eu-central-1:a63af1f7-ab86-4ab5-a0eb-f461cb37c2b1", + "description": "AWS Cognito User Pool Identity Pool ID" + }, + "portal_id": { + "type": "string", + "example": "7h2hwdj7hhjsdcjkq03eidna3ep", + "description": "Portal ID" + } + }, + "required": [ + "user_pool_id", + "user_pool_client_id", + "portal_id" + ] + }, + "Exists": { + "type": "object", + "required": [ + "exists" + ], + "properties": { + "exists": { + "type": "boolean", + "description": "Indicate whether the item exists" + }, + "active": { + "type": "boolean", + "description": "Indicate whether the item is active" + } + }, + "example": { + "exists": true, + "active": false + } + }, + "EntitySlug": { + "description": "URL-friendly identifier for the entity schema", + "type": "string", + "example": "contact" + }, + "EntityId": { + "type": "string", + "format": "uuid", + "description": "Entity ID", + "example": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "BaseEntity": { + "type": "object", + "properties": { + "_id": { + "$ref": "#/components/schemas/EntityId", + "description": "Entity ID", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "_title": { + "type": "string", + "description": "Title of the entity", + "example": "Example Entity" + }, + "_org": { + "type": "string", + "description": "Organization ID the entity belongs to", + "example": "123" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of entity tags", + "example": [ + "example", + "mock" + ] + }, + "_created_at": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp of the entity", + "example": "2021-02-09T12:41:43.662Z" + }, + "_updated_at": { + "type": "string", + "format": "date-time", + "description": "Last update timestamp of the entity", + "example": "2021-02-09T12:41:43.662Z" + } + }, + "required": [ + "_id", + "_title", + "_org", + "_created_at", + "_updated_at" + ] + }, + "Schema": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "description": "Slug of the schema", + "example": "contact" + } + }, + "additionalProperties": true + }, + "Entity": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "EntityTemplates": { + "type": "object", + "properties": { + "templates_output": { + "type": "object", + "description": "Resolved template strings corresponding to the templates parameter. Supports both string values and nested objects of strings.", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + ] + }, + "example": { + "content_top_name": "Customer #123456", + "main_content_name": "Orange Flexible A2 (654321)", + "content_bottom_name": "Porscheplatz 1, 70435 Stuttgart, Germany", + "nested_content": { + "title": "Orange Flexible A2", + "subtitle": "654321" + } + } + } + } + }, + "EntityItem": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Entity" + }, + { + "$ref": "#/components/schemas/EntityTemplates" + }, + { + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "$ref": "#/components/schemas/EntitySlug", + "description": "Entity schema identifier" + } + } + } + ] + }, + "EntityResponse": { + "type": "object", + "description": "Response for entity get request", + "properties": { + "result": { + "$ref": "#/components/schemas/EntityItem" + } + } + }, + "EntityResponseWithHits": { + "type": "object", + "description": "Response for entity search requests", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityItem" + } + }, + "pagination": { + "type": "object", + "description": "Pagination metadata", + "properties": { + "from": { + "type": "number", + "description": "Starting offset for the current page", + "example": 0 + }, + "size": { + "type": "number", + "description": "Number of entities per page", + "example": 10 + }, + "total": { + "type": "number", + "description": "Total number of entities available", + "example": 50 + }, + "has_more": { + "type": "boolean", + "description": "Whether there are more entities available beyond the current page" + } + } + }, + "hits": { + "type": "number", + "description": "Number of entities returned in this response", + "example": 10 + } + } + }, + "EntityResponseGroupedWithHits": { + "type": "object", + "description": "Response for entity search requests, but with groupings", + "properties": { + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "group": { + "type": "string", + "description": "Group title", + "example": "active" + }, + "group_title": { + "type": "string", + "description": "Resolved group title from variable", + "example": "Account #987654321" + }, + "count": { + "type": "number", + "description": "Total number of entities in this group", + "example": 10 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityItem" + } + }, + "pagination": { + "type": "object", + "description": "Pagination metadata for entities within this group", + "properties": { + "from": { + "type": "number", + "description": "Starting offset for entities in this group", + "example": 0 + }, + "size": { + "type": "number", + "description": "Number of entities returned for this group", + "example": 5 + }, + "total": { + "type": "number", + "description": "Total number of entities available in this group", + "example": 10 + }, + "has_more": { + "type": "boolean", + "description": "Whether there are more entities available in this group beyond the current page" + } + } + } + } + } + }, + "groups_pagination": { + "type": "object", + "description": "Group pagination metadata", + "properties": { + "has_more": { + "type": "boolean", + "description": "Whether there are more groups available" + }, + "after_key": { + "type": "object", + "description": "Composite aggregation key for the next page", + "additionalProperties": { + "type": "string" + } + } + } + }, + "hits": { + "type": "number", + "description": "Number of groups returned in this response", + "example": 5 + } + } + }, + "PortalUser": { + "description": "The portal user entity", + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "type": "string", + "enum": [ + "portal_user" + ] + } + } + } + ] + }, + "Contact": { + "description": "The mapped contact of the portal user", + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "type": "string", + "enum": [ + "contact" + ] + } + } + } + ] + }, + "WorfklowIdentifier": { + "description": "Workflow identifier object", + "allOf": [ + { + "type": "object", + "properties": { + "defition_id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + ] + }, + "Meter": { + "description": "The meter entity", + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "type": "string", + "enum": [ + "meter" + ] + } + } + } + ] + }, + "Order": { + "description": "The order entity", + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "type": "string", + "enum": [ + "order" + ] + } + } + } + ] + }, + "Opportunity": { + "description": "The opportunity entity", + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "type": "string", + "enum": [ + "opportunity" + ] + } + } + } + ] + }, + "Contract": { + "description": "The contract entity", + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "contract_name": { + "type": "string", + "description": "The name of the contract.", + "example": "Grid Contract" + }, + "contract_number": { + "type": "string", + "description": "The unique identifier of the contract.", + "example": "12345" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "in_approval_process", + "approved", + "active", + "deactivated", + "revoked", + "terminated", + "expired" + ], + "default": "draft", + "description": "The status of the contract.", + "example": "approved" + }, + "description": { + "type": "string", + "description": "A brief description of the contract.", + "example": "This contract is for the supply of widgets." + }, + "account_number": { + "type": "string", + "description": "The account number associated with the contract.", + "example": "67890" + }, + "branch": { + "type": "string", + "enum": [ + "power", + "gas", + "water", + "waste_water", + "district_heating" + ], + "description": "The branch associated with the contract.", + "example": "power" + }, + "billing_address": { + "type": "string", + "description": "The billing address associated with the contract.", + "example": "123 Main St, Anytown" + }, + "delivery_address": { + "type": "string", + "description": "The delivery address associated with the contract.", + "example": "456 Elm St, Anytown" + }, + "additional_addresses": { + "type": "string", + "description": "Any additional addresses associated with the contract.", + "example": "789 Oak St, Anytown" + }, + "termination_date": { + "type": "string", + "description": "The date on which the contract was terminated.", + "example": "2022-01-01" + }, + "termination_reason": { + "type": "string", + "description": "The reason for the termination of the contract.", + "example": "Non-payment" + }, + "billing_period": { + "type": "string", + "enum": [ + "weekly", + "monthly", + "every_quarter", + "every_6_months", + "yearly" + ], + "default": "weekly", + "description": "The billing period associated with the contract.", + "example": "monthly" + }, + "billing_duration_amount": { + "type": "number", + "minimum": 0, + "description": "The duration of the billing period.", + "example": 30 + }, + "renewal_duration_amount": { + "type": "number", + "minimum": 0, + "description": "The duration of the renewal period.", + "example": 365 + }, + "renewal_duration_unit": { + "type": "string", + "enum": [ + "weeks", + "months", + "years" + ], + "default": "months", + "description": "The unit of time for the renewal period.", + "example": "years" + }, + "notice_time_amount": { + "type": "number", + "minimum": 0, + "description": "The amount of notice required for termination of the contract.", + "example": 30 + }, + "notice_time_unit": { + "type": "string", + "enum": [ + "weeks", + "months", + "years" + ], + "default": "months", + "description": "The unit of time for the notice period.", + "example": "months" + }, + "start_date": { + "type": "string", + "description": "The start date of the contract.", + "example": "2021-01-01" + }, + "billing_due_day": { + "type": "integer", + "description": "Defines the day of the month in which the installments are due.", + "minimum": 1, + "maximum": 31, + "example": 2 + }, + "installment_amount": { + "type": "integer", + "description": "Set amount for installments in cents. (precision 2)", + "example": 10050 + }, + "balance": { + "type": "integer", + "description": "Current balance of the contract in cents. (precision 2)", + "example": 8990 + }, + "balance_currency": { + "$ref": "#/components/schemas/Currency" + } + } + } + ] + }, + "File": { + "description": "The file entity", + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "type": "string", + "enum": [ + "file" + ] + } + } + } + ] + }, + "Product": { + "description": "The product entity", + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "type": "string", + "enum": [ + "product" + ] + } + } + } + ] + }, + "ActivityId": { + "type": "string", + "format": "ulid", + "description": "See https://github.com/ulid/spec", + "example": "01F130Q52Q6MWSNS8N2AVXV4JN" + }, + "ActivityCallerContext": { + "type": "object", + "additionalProperties": true, + "properties": { + "PortalAuth": { + "type": "object", + "properties": { + "token": { + "type": "object", + "properties": { + "sub": { + "type": "string", + "example": "8cc73157-3dc4-47f3-b163-d3a5039bba72" + }, + "email": { + "type": "string", + "example": "john@doe.com" + }, + "cognito:username": { + "type": "string", + "example": "john@doe.com" + }, + "custom:portal_user_id": { + "$ref": "#/components/schemas/EntityId" + }, + "custom:contact_entity_id": { + "$ref": "#/components/schemas/EntityId" + } + }, + "example": { + "cognito:username": "john@doe.com", + "custom:contact_entity_id": "7579d22f-9400-41d1-b460-04730239ee91", + "custom:org_id": "123456", + "custom:origin": "END_CUSTOMER_PORTAL", + "custom:portal_user_id": "06c78f9d-af75-4483-893d-a3fad524400f", + "email": "john@doe.com", + "email_verified": true, + "exp": 1694693219, + "iat": 1694689619, + "sub": "8cc73157-3dc4-47f3-b163-d3a5039bba72" + } + } + } + } + } + }, + "Activity": { + "type": "object", + "properties": { + "type": { + "type": "string", + "example": "MyCustomActivity" + }, + "title": { + "type": "string", + "description": "Title for activity. Supports handlebars syntax.", + "example": "My custom activity" + }, + "message": { + "type": "string", + "description": "Message for activity. Supports handlebars syntax.", + "example": "{{caller}} did something with {{entity payload.entity.id}}." + }, + "payload": { + "type": "object", + "properties": {}, + "additionalProperties": true, + "example": { + "entity": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "schema": "contact" + } + } + } + }, + "required": [ + "type", + "title", + "message" + ] + }, + "EntityEditRule": { + "type": "object", + "properties": { + "slug": { + "$ref": "#/components/schemas/EntitySlug" + }, + "attribute": { + "type": "string" + }, + "rule_type": { + "type": "string" + }, + "cadence_period_type": { + "type": "string" + }, + "changes_allowed": { + "type": "number" + }, + "cadence_period": { + "type": "number" + }, + "allowed_decrement": { + "type": "string" + }, + "allowed_increment": { + "type": "string" + }, + "number_of_days_before_restriction": { + "type": "number" + }, + "grace_period": { + "type": "number" + } + } + }, + "ActivityItem": { + "allOf": [ + { + "type": "object", + "properties": { + "_id": { + "$ref": "#/components/schemas/ActivityId" + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + } + }, + { + "$ref": "#/components/schemas/Activity" + }, + { + "type": "object", + "properties": { + "payload": { + "type": "object", + "properties": { + "entity": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/EntityId" + }, + "schema": { + "type": "string" + } + } + }, + "caller": { + "$ref": "#/components/schemas/ActivityCallerContext" + } + } + } + } + } + ] + }, + "FileItem": { + "allOf": [ + { + "$ref": "#/components/schemas/File" + }, + { + "type": "object", + "properties": { + "filename": { + "type": "string", + "example": "document.pdf" + }, + "access_control": { + "type": "string", + "default": "private", + "enum": [ + "private", + "public-read" + ] + }, + "file_date": { + "type": "string", + "format": "date-time", + "description": "The date used for sorting the file", + "example": "2021-02-09T12:41:43.662Z" + }, + "public_url": { + "description": "Direct URL for file (public only if file access control is public-read)", + "type": "string", + "format": "url", + "example": "https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + }, + "type": { + "description": "Human readable type for file", + "type": "string", + "enum": [ + "document", + "document_template", + "text", + "image", + "video", + "audio", + "spreadsheet", + "presentation", + "font", + "archive", + "application", + "unknown" + ] + }, + "mime_type": { + "type": "string", + "description": "MIME type of the file", + "example": "application/pdf" + }, + "_relations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/components/schemas/EntityId", + "description": "The ID of the parent entity" + }, + "_schema": { + "$ref": "#/components/schemas/EntitySlug" + }, + "_title": { + "type": "string", + "description": "The title of the parent entity", + "example": "Opportunity ABC" + } + } + } + }, + "is_new": { + "type": "boolean", + "description": "Indicate whether the user has not seen/downloaded the file before" + } + } + } + ] + }, + "EntityFileCount": { + "type": "object", + "required": [ + "entity_id", + "file_count", + "_schema" + ], + "properties": { + "entity_id": { + "$ref": "#/components/schemas/EntityId", + "description": "The ID of the parent entity" + }, + "_schema": { + "$ref": "#/components/schemas/EntitySlug" + }, + "_title": { + "type": "string", + "description": "The title of the parent entity", + "example": "Opportunity ABC" + }, + "file_count": { + "type": "integer", + "description": "Number of files associated with the entity and shared with portal user", + "example": 2 + } + } + }, + "AdminUser": { + "type": "object", + "additionalProperties": true, + "properties": { + "type": { + "type": "string", + "example": "user", + "nullable": true + }, + "user_id": { + "type": "string", + "example": "123456" + }, + "display_name": { + "type": "string", + "example": "John", + "nullable": true + }, + "image_uri": { + "type": "object", + "nullable": true, + "properties": { + "original": { + "type": "string", + "example": "https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original", + "nullable": true + }, + "thumbnail_32": { + "type": "string", + "example": "https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32", + "nullable": true + }, + "thumbnail_64": { + "type": "string", + "example": "https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64", + "nullable": true + }, + "key": { + "type": "string", + "example": "fuafjvoHKsudhfagweucjasdvga", + "nullable": true + } + } + }, + "org_id": { + "type": "string", + "example": "123" + }, + "email": { + "type": "string", + "example": "j.doe@epilot.cloud", + "nullable": true + }, + "phone": { + "type": "string", + "example": "12345 67890", + "nullable": true + } + } + }, + "Grant": { + "type": "object", + "properties": { + "action": { + "type": "string", + "example": "entity-read", + "description": "Action for granting permission" + }, + "resource": { + "type": "string", + "example": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "description": "Resource for granting permission" + }, + "effect": { + "type": "string", + "default": "allow", + "enum": [ + "allow", + "deny" + ], + "description": "Effect of the permission" + } + }, + "required": [ + "action" + ] + }, + "ActionLabel": { + "type": "object", + "properties": { + "en": { + "type": "string", + "nullable": true + }, + "de": { + "type": "string", + "nullable": true + } + } + }, + "Rule": { + "type": "object", + "properties": { + "entity": { + "type": "string", + "nullable": true + }, + "attribute": { + "type": "string", + "nullable": true + }, + "attribute_value": { + "type": "string", + "nullable": true + } + } + }, + "JourneyActions": { + "type": "object", + "properties": { + "journey_id": { + "type": "string", + "nullable": true + }, + "action_label": { + "type": "object", + "$ref": "#/components/schemas/ActionLabel", + "nullable": true + }, + "slug": { + "type": "string", + "nullable": true + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Rule" + }, + "nullable": true + } + } + }, + "ExternalLink": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the external link" + }, + "label": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "type": { + "type": "string", + "enum": [ + "link", + "journey", + "seamless" + ] + }, + "link": { + "type": "string", + "description": "The URL of the external link" + }, + "rules": { + "type": "array", + "items": { + "type": "object" + } + }, + "attribute": { + "type": "string", + "description": "Attribute associated with the link" + }, + "entity": { + "type": "string", + "description": "Entity associated with the link" + }, + "attribute_value": { + "type": "string", + "description": "Attribute value for the link" + }, + "icon": { + "type": "object", + "description": "Configuration of the icon for the external link", + "properties": { + "name": { + "type": "string", + "description": "The name of the icon" + }, + "color": { + "type": "string", + "description": "The color of the icon" + }, + "size": { + "type": "integer", + "description": "Size of the icon in pixels" + } + } + }, + "extension_link_id": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Seamless link identifier in a form of [extensionId, linkId]" + } + }, + "required": [ + "id", + "label", + "type", + "link" + ] + }, + "WorkflowExecution": { + "type": "object", + "properties": {}, + "additionalProperties": true, + "example": { + "id": "8gja72h6kas6h", + "name": "Lead Qualification", + "trigger": "MANUAL", + "status": "STARTED", + "creationTime": "2021-04-27T12:01:13.000Z", + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:01:13.000Z", + "assignedTo": [ + "252", + "29052" + ], + "flow": [ + { + "id": "sectionId1", + "name": "Initial Information Gathering", + "steps": [ + { + "id": "sada5641f3a21", + "name": "Call client and confirm address and product", + "status": "ASSIGNED", + "assignedTo": [ + "11" + ] + }, + { + "id": "sada5641f3a22", + "name": "Check product availability", + "status": "UNASSIGNED" + }, + { + "id": "sada5641f3a23", + "name": "Send email confirming contact with the client", + "status": "SKIPPED" + } + ] + }, + { + "id": "firstLevelStepId1", + "name": "Print and send catalog", + "status": "SKIPPED", + "dueDate": "2023-01-15T20:00:00" + } + ] + } + }, + "WorkflowStep": { + "type": "object", + "properties": {}, + "additionalProperties": true, + "example": { + "startedTime": "2024-01-12T13:29:55.942Z", + "requirements": [], + "created": "2023-10-20T17:41:10.256Z", + "executionType": "MANUAL", + "assignedToInProgress": "-", + "sectionId": "lzxsw2sblj7", + "type": "STEP", + "entityRefId": "q1d6vcbsqvn", + "assignedTo": [ + "10014532" + ], + "lastUpdated": "2024-01-13T05:18:43.838Z", + "ecp": {}, + "userIds": [], + "name": "Hinterlege den vereinbarten LIC Termin", + "id": "q1d6vcbsqvn", + "definitionId": "9UjHKq", + "status": "COMPLETED", + "manuallyCreated": false, + "enabled": true, + "completedTime": "2024-01-13T05:18:43.827Z" + } + }, + "BaseBillingEvent": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Entity" + } + ], + "description": "A base billing event to be inherited by all billing events.", + "type": "object", + "required": [ + "type", + "contract" + ], + "additionalProperties": true, + "properties": { + "billing_amount": { + "type": "integer", + "description": "Amount to be paid in cents i.e. precision 2", + "example": 10050 + }, + "billing_amount_decimal": { + "type": "string", + "description": "Amount to be paid in cents in decimal string representation", + "example": "100.50" + }, + "billing_currency": { + "$ref": "#/components/schemas/Currency" + }, + "external_id": { + "type": "string", + "description": "Unique identifier for event, used to reference the event to a 3rd party resource such as a SAP Installment.", + "example": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e" + }, + "contract": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "description": "Entity ID for the related contract.", + "example": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + } + } + } + } + } + } + }, + "InstallmentEvent": { + "description": "An entity that describes an installment billing event.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseBillingEvent" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "installment" + ], + "description": "Type of the billing event.", + "example": "installment" + }, + "due_date": { + "type": "string", + "format": "date", + "description": "Date on which the installment is due." + }, + "paid_date": { + "type": "string", + "format": "date", + "description": "Date on which the installment is paid by the customer." + } + }, + "required": [ + "due_date" + ] + } + ], + "properties": { + "billing_amount_decimal": { + "type": "string", + "description": "Amount to be paid in cents in decimal string representation", + "example": "100.50" + } + } + }, + "ReimbursementEvent": { + "description": "An entity that describes a reimbursement billing event.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseBillingEvent" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "reimbursement" + ], + "description": "Type of the billing event.", + "example": "reimbursement" + }, + "due_date": { + "type": "string", + "format": "date", + "description": "Date on which the installment is due." + }, + "paid_date": { + "type": "string", + "format": "date", + "description": "Date on which the customer is reimbursed." + } + } + } + ] + }, + "BillingEvent": { + "description": "An entity that describes a billing event such as a future installment or a reimbursement back to the customer.", + "oneOf": [ + { + "$ref": "#/components/schemas/InstallmentEvent" + }, + { + "$ref": "#/components/schemas/ReimbursementEvent" + } + ], + "properties": { + "billing_amount_decimal": { + "type": "string", + "description": "Amount to be paid in cents in decimal string representation", + "example": "100.50" + } + } + }, + "BillingAccount": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Entity" + } + ], + "description": "A billing account", + "type": "object", + "properties": { + "billing_account_number": { + "type": "string", + "description": "Billing account number" + }, + "balance": { + "type": "number", + "description": "Balance of the billing account" + }, + "balance_decimal": { + "type": "string", + "description": "Balance of the billing account in decimal string representation" + }, + "balance_currency": { + "$ref": "#/components/schemas/Currency" + }, + "billing_contact": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "description": "Entity ID for the related billing contact.", + "example": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + } + } + } + } + }, + "billing_address": { + "type": "object", + "properties": { + "$relation_ref": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "description": "Entity ID for the related billing address.", + "example": "f589786b-3024-43cd-9cb3-5a3c953f2896" + }, + "path": { + "type": "string", + "description": "Path to the related billing address.", + "example": "address" + }, + "_id": { + "type": "string", + "description": "ID of the related billing address.", + "example": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + } + } + } + } + } + } + }, + "Balance": { + "type": "object", + "properties": { + "balance": { + "type": "integer", + "description": "Current balance of the customer in cents. (precision 2)", + "example": 8990 + }, + "balance_decimal": { + "type": "number", + "description": "Current balance of the customer in decimal string representation.", + "example": "89.90" + }, + "balance_currency": { + "$ref": "#/components/schemas/Currency" + } + } + }, + "Currency": { + "type": "string", + "description": "Currency code in ISO 4217 format", + "example": "EUR" + }, + "EntityGetParams": { + "type": "object", + "properties": { + "slug": { + "$ref": "#/components/schemas/EntitySlug", + "description": "Single entity schema slug" + }, + "entity_id": { + "type": "string", + "format": "uuid", + "description": "Optional entity ID to filter by. If provided, creates a filter for _id.", + "example": "3ec28ab5-8598-41ef-9486-b57fca1d5e2a" + }, + "hydrate": { + "type": "boolean", + "description": "When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place.", + "default": false + }, + "fields": { + "type": "array", + "description": "List of entity fields to include in search results", + "items": { + "type": "string" + }, + "example": [ + "_id", + "_title" + ] + }, + "templates": { + "type": "object", + "description": "Template strings to parse and return as synthetic fields. Supports both string values and nested objects of strings.", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + ] + }, + "example": { + "content_top_name": "Customer #{{contract.customer_number}}", + "main_content_name": "{{contract.contract_name}} ({{contract.contract_number}})", + "content_bottom_name": "{{custom_contract_delivery_address}}", + "nested_content": { + "title": "{{contract.contract_name}}", + "subtitle": "{{contract.contract_number}}" + } + } + }, + "filters": { + "type": "array", + "description": "Additional filters to apply to the search query", + "items": { + "type": "object", + "description": "Elasticsearch filter object" + }, + "example": [ + { + "term": { + "status.keyword": "active" + } + }, + { + "range": { + "_created_at": { + "gte": "2023-01-01" + } + } + } + ] + }, + "filters_context": { + "type": "array", + "description": "Context-based filters for entity relations.", + "items": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ] + } + }, + "example": [ + { + "portal_user": true + }, + { + "contact": true + }, + { + "contract": "3ec28ab5-8598-41ef-9486-b57fca1d5e2a" + } + ] + }, + "targets": { + "type": "array", + "description": "Filters from these targets will be applied to the search query.", + "items": { + "type": "string", + "format": "uuid" + }, + "example": [ + "3ec28ab5-8598-41ef-9486-b57fca1d5e2a" + ] + } + }, + "required": [ + "slug" + ] + }, + "EntitySearchParams": { + "type": "object", + "properties": { + "slug": { + "oneOf": [ + { + "$ref": "#/components/schemas/EntitySlug" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySlug" + }, + "minItems": 1 + } + ], + "description": "Single entity schema slug or array of slugs" + }, + "q": { + "type": "string", + "description": "Keyword search query", + "example": "contract" + }, + "q_fields": { + "type": "array", + "description": "List of fields that can be searched", + "items": { + "type": "string" + }, + "example": [ + "_title", + "customer._title", + "customer.first_name", + "customer.last_name" + ] + }, + "group": { + "type": "string", + "description": "Field to group results by", + "example": "customer._title" + }, + "group_title": { + "type": "string", + "description": "Template for group title using variables", + "example": "{{customer[Primary].first_name}} {{customer[Primary].last_name}}" + }, + "group_size": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 100, + "description": "Number of groups to return" + }, + "group_sort": { + "type": "string", + "description": "Sort order for groups", + "enum": [ + "asc", + "desc" + ], + "default": "asc", + "example": "desc" + }, + "group_after_key": { + "type": "object", + "description": "Composite aggregation key for group pagination", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "sort": { + "type": "string", + "example": "_created_at:desc" + }, + "from": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "size": { + "type": "integer", + "minimum": 0, + "default": 100, + "description": "Max search size is 1000 with higher values defaulting to 1000" + }, + "hydrate": { + "type": "boolean", + "description": "When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place.", + "default": false + }, + "fields": { + "type": "array", + "description": "List of entity fields to include in search results", + "items": { + "type": "string" + }, + "example": [ + "_id", + "_title" + ] + }, + "templates": { + "type": "object", + "description": "Template strings to parse and return as synthetic fields", + "additionalProperties": { + "type": "string" + }, + "example": { + "content_top_name": "Customer #{{contract.customer_number}}", + "main_content_name": "{{contract.contract_name}} ({{contract.contract_number}})", + "content_bottom_name": "{{custom_contract_delivery_address}}" + } + }, + "filters": { + "type": "array", + "description": "Additional filters to apply to the search query", + "items": { + "type": "object", + "description": "Elasticsearch filter object" + }, + "example": [ + { + "term": { + "status.keyword": "active" + } + }, + { + "range": { + "_created_at": { + "gte": "2023-01-01" + } + } + } + ] + }, + "filters_context": { + "type": "array", + "description": "Context-based filters for entity relations.", + "items": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ] + } + }, + "example": [ + { + "portal_user": true + }, + { + "contact": true + }, + { + "contract": "3ec28ab5-8598-41ef-9486-b57fca1d5e2a" + } + ] + }, + "targets": { + "type": "array", + "description": "Filters from these targets will be applied to the search query.", + "items": { + "type": "string", + "format": "uuid" + }, + "example": [ + "3ec28ab5-8598-41ef-9486-b57fca1d5e2a" + ] + } + }, + "required": [ + "slug" + ] + }, + "IdentifierAttribute": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Label attribute" + }, + "name": { + "type": "string", + "description": "Name of the attribute" + }, + "type": { + "type": "string", + "description": "Type of the secondary attribute" + } + } + }, + "RegistrationIdentifier": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the identifier/attribute" + }, + "schema": { + "$ref": "#/components/schemas/EntitySlug" + } + } + }, + "ContractIdentifier": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the identifier/attribute" + }, + "schema": { + "$ref": "#/components/schemas/EntitySlug" + } + } + }, + "AcceptanceDecision": { + "type": "object", + "properties": { + "decision": { + "type": "string", + "enum": [ + "accept", + "decline" + ], + "description": "Acceptance decision" + } + }, + "required": [ + "decision" + ], + "additionalProperties": false + }, + "TriggerPortalFlow": { + "type": "object", + "properties": { + "activity_id": { + "type": "string", + "description": "Id of the activity", + "example": "01F130Q52Q6MWSNS8N2AVXV4JN" + }, + "ecp_config": { + "type": "object", + "properties": { + "file_config": { + "type": "object", + "properties": { + "shared_with_end_customer": { + "type": "boolean", + "description": "Indicate whether the file is shared with the end customer" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of entity tags", + "example": [ + "example", + "mock" + ] + } + } + } + } + } + } + }, + "ExtensionConfig": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Name of the extension" + }, + "status": { + "type": "string", + "enum": [ + "installed", + "enabled" + ], + "description": "Status of the extension", + "default": "installed" + }, + "options": { + "type": "object", + "description": "Extension option values.", + "additionalProperties": { + "type": "string" + }, + "default": {} + } + }, + "required": [ + "id", + "status" + ] + }, + "ExtensionHookSelection": { + "type": "object", + "nullable": true, + "properties": { + "app_id": { + "type": "string", + "description": "The ID of the selected app." + }, + "extension_id": { + "type": "string", + "description": "The ID of the selected extension." + }, + "hook_id": { + "type": "string", + "description": "The ID of the selected hook." + } + }, + "required": [ + "app_id", + "extension_id", + "hook_id" + ] + }, + "PublicExtensionCapabilities": { + "type": "object", + "properties": { + "consumptionDataRetrieval": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataRetrievalItem" + } + }, + "priceDataRetrieval": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataRetrievalItem" + } + }, + "costDataRetrieval": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataRetrievalItem" + } + }, + "contractIdentification": { + "type": "object", + "properties": { + "extension": { + "$ref": "#/components/schemas/PublicExtensionDetails" + }, + "hook": { + "$ref": "#/components/schemas/PublicContractIdentificationDetails" + } + } + }, + "meterReadingPlausibilityCheck": { + "type": "object", + "properties": { + "extension": { + "$ref": "#/components/schemas/PublicExtensionDetails" + }, + "hook": { + "$ref": "#/components/schemas/PublicMeterReadingPlausibilityCheckDetails" + } + } + } + } + }, + "DataRetrievalItem": { + "type": "object", + "properties": { + "extension": { + "$ref": "#/components/schemas/PublicExtensionDetails" + }, + "hook": { + "$ref": "#/components/schemas/PublicDataRetrievalHookDetails" + } + } + }, + "PublicExtensionDetails": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the extension." + }, + "name": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "Name of the extension in English." + } + }, + "additionalProperties": { + "type": "string", + "description": "Name of the extension in some other language denoted by ISO 3166-1 alpha-2 code." + }, + "required": [ + "en" + ] + } + } + }, + "PublicDataRetrievalHookDetails": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the hook." + }, + "name": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "Name of the extension in English." + } + }, + "additionalProperties": { + "type": "string", + "description": "Name of the extension in some other language denoted by ISO 3166-1 alpha-2 code." + }, + "required": [ + "en" + ] + }, + "intervals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The intervals associated with the hook." + } + } + }, + "PublicContractIdentificationDetails": { + "type": "object", + "properties": { + "explanation": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "Explanation of the functionality shown to the end user.", + "example": "This process will give you access to all Contracts kept" + } + }, + "additionalProperties": { + "type": "string", + "description": "Explanation of the functionality in language denoted by ISO 3166-1 alpha-2 code." + }, + "required": [ + "en" + ], + "description": "Explanation of the hook." + } + } + }, + "PublicMeterReadingPlausibilityCheckDetails": { + "type": "object", + "properties": { + "plausibility_mode": { + "type": "string", + "enum": [ + "check", + "range" + ], + "description": "Mode for plausibility check:\n- \"check\": Validates meter reading and returns valid: boolean (used during submission)\n- \"range\": Returns min/max allowed values for validation before submission\n" + } + } + }, + "Extension": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the extension. Should not change between updates." + }, + "app_id": { + "type": "string", + "description": "Identifier of the app from which the extension was installed. Should not change between updates." + }, + "app_name": { + "type": "string", + "description": "Name of the app from which the extension was installed. Should not change between updates." + }, + "name": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "Name of the extension in English." + } + }, + "additionalProperties": { + "type": "string", + "description": "Name of the extension in some other language denoted by ISO 3166-1 alpha-2 code." + }, + "required": [ + "en" + ], + "description": "Name of the extension." + }, + "description": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "Name of the extension in English." + } + }, + "additionalProperties": { + "type": "string", + "description": "Name of the extension in some other language denoted by ISO 3166-1 alpha-2 code." + }, + "required": [ + "en" + ], + "description": "Name of the extension." + }, + "version": { + "type": "string", + "description": "Version of the extension." + }, + "options": { + "type": "array", + "description": "Options available to the extension configurable by the portal administrator.", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the option. Should not change between updates." + }, + "name": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "Name of the option in English." + } + }, + "additionalProperties": { + "type": "string", + "description": "Name of the option in some other language denoted by ISO 3166-1 alpha-2 code." + }, + "required": [ + "en" + ], + "description": "Name of the option." + }, + "type": { + "type": "string", + "enum": [ + "text", + "secret" + ], + "description": "Type of the option." + }, + "description": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "Description of the option in English." + } + }, + "additionalProperties": { + "type": "string", + "description": "Description of the option in some other language denoted by ISO 3166-1 alpha-2 code." + }, + "required": [ + "en" + ], + "description": "Description of the option." + }, + "default": { + "type": "string", + "description": "Default value of the option." + }, + "required": { + "type": "boolean", + "description": "Indicate whether the option is required.", + "default": false + } + }, + "required": [ + "id", + "name", + "type" + ] + } + }, + "links": { + "type": "array", + "description": "External links added to the portal.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/ExtensionSeamlessLink" + } + ] + } + }, + "hooks": { + "type": "array", + "description": "Hooks that influence the behavior of Portal.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/ExtensionHook" + }, + { + "oneOf": [ + { + "$ref": "#/components/schemas/ExtensionHookRegistrationIdentifiersCheck" + }, + { + "$ref": "#/components/schemas/ExtensionHookContractIdentification" + }, + { + "$ref": "#/components/schemas/ExtensionHookPriceDataRetrieval" + }, + { + "$ref": "#/components/schemas/ExtensionHookConsumptionDataRetrieval" + }, + { + "$ref": "#/components/schemas/ExtensionHookCostDataRetrieval" + }, + { + "$ref": "#/components/schemas/ExtensionHookMeterReadingPlausibilityCheck" + } + ] + } + ] + } + } + }, + "required": [ + "id", + "name" + ] + }, + "ExtensionSeamlessLink": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the link. Should not change between updates." + }, + "name": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "Name of the extension in English." + } + }, + "additionalProperties": { + "type": "string", + "description": "Name of the extension in some other language denoted by ISO 3166-1 alpha-2 code." + }, + "required": [ + "en" + ], + "description": "Name of the extension." + }, + "description": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "Name of the extension in English." + } + }, + "additionalProperties": { + "type": "string", + "description": "Name of the extension in some other language denoted by ISO 3166-1 alpha-2 code." + }, + "required": [ + "en" + ], + "description": "Name of the extension." + }, + "type": { + "type": "string", + "enum": [ + "seamless" + ] + }, + "condition": { + "type": "string", + "description": "Controls whether the link should be shown. Supports variable interpolation.", + "example": "{{Contact.customer_number | is_not_empty}}" + }, + "auth": { + "$ref": "#/components/schemas/ExtensionAuthBlock" + }, + "redirect": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to redirect to. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + } + } + } + }, + "required": [ + "id", + "name", + "type", + "redirect" + ] + }, + "ExtensionHook": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the hook. Should not change between updates." + } + } + }, + "ExtensionHookRegistrationIdentifiersCheck": { + "description": "Hook that replaces the built-in registration identifiers check. This hook makes a POST call whenever a user is trying to register to find the corresponding contact. The expected response to the call is:\n - 200 with contact id if exactly one contact is found\n - 404 if no contact is found or more than contact is found\n", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "registrationIdentifiersCheck" + ] + }, + "auth": { + "$ref": "#/components/schemas/ExtensionAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for the call", + "default": "POST" + }, + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "Optional JSON body to use for the call. Defaults to object with all configured identifiers grouped by entity, e.g. `{\"contract\": {\"contract_name\": \"Name\"}}`. Supports variable interpolation." + }, + "result": { + "type": "string", + "description": "Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. If no result is passed and the request suceeds, we attempt to resolve the Contact ID automatically. Supports variable interpolation." + } + }, + "required": [ + "url", + "headers" + ] + }, + "use_static_ips": { + "type": "boolean", + "description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.", + "default": false + } + }, + "required": [ + "type", + "call" + ] + }, + "ExtensionHookContractIdentification": { + "description": "Hook that replaces the built-in Contract identification for self-assignment. This hook involves an HTTP request whenever a user is trying to self-assign Contract(s).\nThe expected response http status code to the call is:\n - 200 if found\n - 404 if not found\n\nThe following assignment modes are supported:\n - `contracts`: We expect the response to contain Contract ids (customizable using `result` property).\n - `contact_to_contracts`: We expect the response to contain a Contact id (customizable using `result` property) and we will assign the Contact as a Customer to the Contracts and (optionally) update the Contact attribute specified by `contact_relation_attribute` to add the matched Contact.\n - `contact_to_portal_user`: We expect the response to contain a Contact id (customizable using `result` property) and we will assign the Contact to the Portal User. Portal User will be able to see all data including Contracts transitively.\n\nDefaults to `contact_to_contracts` for backwards compatibility. We recommend using `contact_to_portal_user` as it does not influence the data model of business entities.\n", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "contractIdentification" + ] + }, + "auth": { + "$ref": "#/components/schemas/ExtensionAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for the call", + "default": "POST" + }, + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "Optional JSON body to use for the call. Defaults to object with all configured identifiers grouped by entity, e.g. `{\"contract\": {\"contract_name\": \"Name\"}}`. Supports variable interpolation." + }, + "result": { + "type": "string", + "description": "Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. If no result is passed and the request suceeds, we attempt to resolve the Contact ID automatically. Supports variable interpolation." + } + }, + "required": [ + "url", + "headers" + ] + }, + "assignment_mode": { + "type": "string", + "enum": [ + "contracts", + "contact_to_contracts", + "contact_to_portal_user" + ], + "description": "Mode of contract assignment. See hook description for mode details.", + "default": "contact_to_contracts" + }, + "contact_relation_attribute": { + "type": "string", + "description": "Name of the Contact attribute to update with the matched Contact ID when using `contact_to_contracts` mode. Must be a Contact relation attribute supporting multiple entities.", + "example": "represents_contact" + }, + "explanation": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "Explanation of the functionality shown to the end user.", + "example": "This process will give you access to the matching Contracts." + } + }, + "additionalProperties": { + "type": "string", + "description": "Explanation of the functionality in language denoted by ISO 3166-1 alpha-2 code." + }, + "required": [ + "en" + ], + "description": "Explanation of the hook." + }, + "use_static_ips": { + "type": "boolean", + "description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.", + "default": false + } + }, + "required": [ + "type", + "call" + ] + }, + "ExtensionHookMeterReadingPlausibilityCheck": { + "description": "Hook that checks the plausibility of meter readings before they are saved. This hook makes a POST call whenever a user is trying to save a meter reading. The expected response to the call is:\n - 200:\n If meter reading is plausible, the response should contain:\n - valid: true\n If meter reading is not plausible, the response should contain:\n - valid: false\n", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "meterReadingPlausibilityCheck" + ] + }, + "plausibility_mode": { + "type": "string", + "enum": [ + "check", + "range" + ], + "default": "check", + "description": "Mode for plausibility check:\n- \"check\": Validates meter reading and returns valid: boolean (used during submission)\n- \"range\": Returns min/max allowed values for each counter for validation before submission\n" + }, + "auth": { + "$ref": "#/components/schemas/ExtensionAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "body": { + "type": "object", + "description": "JSON body to use for the call. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + } + }, + "required": [ + "url", + "headers", + "body" + ] + }, + "resolved": { + "type": "object", + "description": "Response to the call", + "properties": { + "dataPath": { + "type": "string", + "description": "Optional path to an array in the response. If specified and the path points to an array,\nthe hook will map over each item using 'Item' variable for interpolation.\nRelevant only if plausibility_mode is \"range\".\n", + "example": "data.results" + }, + "counter_identifiers": { + "description": "Counter identifier(s) used to match against the meter's counters.\nCan be a string (counter ID) or an object with counter properties.\nThe backend resolves this to meter_counter_id in the final response.\nRelevant only if plausibility_mode is \"range\".\n", + "oneOf": [ + { + "type": "string", + "example": "{{Item.counter_id}}" + }, + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "obis_code": "{{Item.obis}}" + } + } + ] + }, + "valid": { + "type": "string", + "description": "Indicate whether the meter reading is plausible. Relevant only if plausibility_mode is \"check\".", + "example": "{{CallResponse.data.valid}}" + }, + "upper_limit": { + "type": "string", + "description": "Upper allowed limit of the meter reading", + "example": "{{CallResponse.data.upper_limit}}" + }, + "lower_limit": { + "type": "string", + "description": "Lower allowed limit of the meter reading", + "example": "{{CallResponse.data.lower_limit}}" + } + } + }, + "use_static_ips": { + "type": "boolean", + "description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.", + "default": false + } + }, + "required": [ + "type", + "call", + "resolved" + ] + }, + "ExtensionHookPriceDataRetrieval": { + "description": "Hook that will allow using the specified source as data for price visualizations. This hook is triggered to fetch the data. Format of the request and response has to follow the following specification: TBD. The expected response to the call is:\n - 200 with the time series data\n", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "priceDataRetrieval" + ] + }, + "auth": { + "$ref": "#/components/schemas/ExtensionAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for the call", + "default": "GET" + }, + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.", + "additionalProperties": { + "type": "string" + }, + "default": {} + } + }, + "required": [ + "url" + ] + }, + "resolved": { + "type": "object", + "properties": { + "dataPath": { + "type": "string", + "description": "Optional path to the data (array) in the response. If omitted, the data is assumed to be on the top level." + } + } + }, + "use_static_ips": { + "type": "boolean", + "description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.", + "default": false + } + }, + "required": [ + "type", + "call" + ] + }, + "ExtensionHookConsumptionDataRetrieval": { + "description": "Hook that will allow using the specified source as data for consumption visualizations. This hook is triggered to fetch the data. Format of the request and response has to follow the following specification: TBD. The expected response to the call is:\n - 200 with the time series data\n", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "consumptionDataRetrieval" + ] + }, + "auth": { + "$ref": "#/components/schemas/ExtensionAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for the call", + "default": "GET" + }, + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.", + "additionalProperties": { + "type": "string" + }, + "default": {} + } + }, + "required": [ + "url" + ] + }, + "resolved": { + "type": "object", + "properties": { + "dataPath": { + "type": "string", + "description": "Optional path to the data (array) in the response. If omitted, the data is assumed to be on the top level." + } + } + }, + "use_static_ips": { + "type": "boolean", + "description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.", + "default": false + } + }, + "required": [ + "type", + "call" + ] + }, + "ExtensionHookCostDataRetrieval": { + "description": "Hook that will allow using the specified source as data for consumption visualizations. This hook is triggered to fetch the data. Format of the request and response has to follow the following specification: TBD. The expected response to the call is:\n - 200 with the time series data\n", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "costDataRetrieval" + ] + }, + "auth": { + "$ref": "#/components/schemas/ExtensionAuthBlock" + }, + "call": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for the call", + "default": "GET" + }, + "url": { + "type": "string", + "description": "URL to call. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.", + "additionalProperties": { + "type": "string" + }, + "default": {} + } + }, + "required": [ + "url" + ] + }, + "resolved": { + "type": "object", + "properties": { + "dataPath": { + "type": "string", + "description": "Optional path to the data (array) in the response. If omitted, the data is assumed to be on the top level." + } + } + }, + "use_static_ips": { + "type": "boolean", + "description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.", + "default": false + } + }, + "required": [ + "type", + "call" + ] + }, + "ExtensionAuthBlock": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method to use for authentication", + "default": "GET" + }, + "url": { + "type": "string", + "description": "URL to use for authentication. Supports variable interpolation." + }, + "params": { + "type": "object", + "description": "Parameters to append to the URL. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "headers": { + "type": "object", + "description": "Headers to use for authentication. Supports variable interpolation.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "body": { + "type": "object", + "description": "JSON body to use for authentication. Supports variable interpolation. Content format is determined by Content-Type header.", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "cache": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Key to use to identify the auth response. Supports interpolation.", + "example": "{{Options.api_key}}" + }, + "ttl": { + "type": "string", + "description": "Time to live in seconds for the cache. Supports interpolation.", + "example": "{{AuthResponse.data.expires_in}}" + } + }, + "required": [ + "key", + "ttl" + ] + } + }, + "required": [ + "url" + ] + }, + "Direction": { + "type": "string", + "enum": [ + "feed-in", + "feed-out" + ] + }, + "TariffType": { + "type": "string", + "enum": [ + "ht", + "nt" + ] + }, + "Source": { + "type": "string", + "enum": [ + "ECP", + "ERP", + "360", + "journey-submission" + ] + }, + "Reason": { + "type": "string", + "nullable": true, + "example": "Storing the feed-in record", + "description": "The reason for recording the reading\nIf no reason is specified or left empty, the Epilot UI will show 'Regular' as the default display text\n", + "enum": [ + "", + "regular", + "irregular", + "last", + "first", + "meter_change", + "contract_change", + "meter_adjustment" + ] + }, + "ReadBy": { + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "The person who recorded the reading" + }, + "ReadingStatus": { + "type": "string", + "nullable": true, + "enum": [ + "valid", + "in-validation", + "implausible", + null, + "" + ] + }, + "MeterReading": { + "type": "object", + "required": [ + "value", + "meter_id", + "source" + ], + "properties": { + "value": { + "type": "number", + "example": 240, + "description": "The reading value of the meter" + }, + "read_by": { + "$ref": "#/components/schemas/ReadBy" + }, + "reason": { + "$ref": "#/components/schemas/Reason" + }, + "meter_id": { + "$ref": "#/components/schemas/EntityId", + "description": "The ID of the associated meter" + }, + "counter_id": { + "$ref": "#/components/schemas/EntityId", + "description": "The ID of the associated meter counter" + }, + "direction": { + "$ref": "#/components/schemas/Direction", + "description": "The direction of the reading (feed-in or feed-out)" + }, + "timestamp": { + "type": "string", + "description": "If the value is not provided, the system will be set with the time the request is processed.", + "example": "2022-10-10T00:00:00.000Z" + }, + "source": { + "$ref": "#/components/schemas/Source", + "description": "The source of the reading" + }, + "status": { + "$ref": "#/components/schemas/ReadingStatus", + "description": "The status of the reading" + }, + "external_id": { + "type": "string", + "description": "The external ID of the reading" + }, + "remark": { + "type": "string", + "nullable": true, + "description": "A remark or comment for the reading", + "example": "Customer reported unusual consumption" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional metadata for the reading", + "example": { + "registration_id": "1234567890", + "business_unit": "ABC" + } + } + } + }, + "MeterReadingPhoto": { + "type": "object", + "required": [ + "filename", + "mime_type", + "contents", + "meter_id" + ], + "properties": { + "filename": { + "type": "string", + "example": "Reading 10.01.2025.jpg" + }, + "mime_type": { + "type": "string", + "example": "image/jpeg" + }, + "contents": { + "type": "string", + "description": "Base64 encoded image", + "example": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMTEhUTExMWFhUXGBgYGBgYGBgYGBgYGBgYFxgYFxgYHSggGBolHRgXITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGhAQGy0lHyUt" + }, + "meter_id": { + "$ref": "#/components/schemas/EntityId", + "description": "The ID of the associated Meter" + } + } + }, + "MeterReadingPhotoData": { + "type": "object", + "required": [ + "filename", + "s3ref" + ], + "properties": { + "filename": { + "type": "string", + "example": "Reading 10.01.2025.jpg" + }, + "s3ref": { + "type": "object", + "required": [ + "bucket", + "key" + ], + "properties": { + "bucket": { + "type": "string", + "example": "meter-readings", + "description": "S3 bucket name" + }, + "key": { + "type": "string", + "example": "uuid/reading-10.01.2025.jpg", + "description": "S3 key" + } + } + }, + "reading": { + "type": "string", + "description": "Recognized meter reading.", + "example": "000123.45" + }, + "sector": { + "type": "string", + "description": "Recognized sector of the meter.", + "example": "water" + }, + "meter_numbers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Recognized list of (potential) meter numbers.", + "example": [ + "00123456" + ] + } + } + }, + "SSOLoginToken": { + "type": "string" + }, + "ProviderSlug": { + "type": "string", + "example": "office-365-login", + "description": "URL-friendly slug to use as organization-unique identifier for Provider", + "pattern": "[0-9a-z-]+" + }, + "ProviderDisplayName": { + "type": "string", + "example": "Office 365 Login", + "description": "Human-readable display name for identity provider shown in login" + }, + "ProviderConfig": { + "type": "object", + "properties": { + "slug": { + "$ref": "#/components/schemas/ProviderSlug" + }, + "display_name": { + "$ref": "#/components/schemas/ProviderDisplayName" + }, + "provider_type": { + "type": "string", + "enum": [ + "OIDC" + ] + }, + "attribute_mappings": { + "$ref": "#/components/schemas/AttributeMappingConfig" + }, + "entity_matching": { + "$ref": "#/components/schemas/EntityMatchingConfig" + }, + "oidc_config": { + "$ref": "#/components/schemas/OIDCProviderConfig" + }, + "mobile_oidc_config": { + "$ref": "#/components/schemas/MoblieOIDCConfig" + } + }, + "required": [ + "display_name", + "provider_type" + ] + }, + "ProviderPublicConfig": { + "type": "object", + "properties": { + "slug": { + "$ref": "#/components/schemas/ProviderSlug" + }, + "display_name": { + "$ref": "#/components/schemas/ProviderDisplayName" + }, + "oidc_config": { + "$ref": "#/components/schemas/OIDCProviderConfig" + }, + "mobile_oidc_config": { + "$ref": "#/components/schemas/MoblieOIDCConfig" + } + }, + "required": [ + "slug", + "display_name" + ] + }, + "AttributeMappingConfig": { + "type": "object", + "description": "Dictionary of epilot user attributes to claims", + "properties": { + "contact": { + "additionalProperties": true, + "type": "object", + "required": [ + "email" + ], + "properties": { + "email": { + "type": "string", + "example": "email" + }, + "first_name": { + "type": "string", + "example": "first_name" + }, + "last_name": { + "type": "string", + "example": "last_name" + }, + "phone": { + "type": "string", + "example": "tel" + }, + "preferred_language": { + "type": "string", + "example": "language" + }, + "concession": { + "type": "string", + "example": "GPE", + "description": "The concession of the user. For eg: GPE, EPE, WPE" + }, + "installer_number": { + "type": "string", + "example": 123456, + "description": "The installer number of the user" + } + } + }, + "account": { + "additionalProperties": true, + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "company_name" + }, + "street": { + "type": "string", + "example": "street_name" + }, + "house_number": { + "type": "string", + "example": "house_number" + }, + "postal_code": { + "type": "string", + "example": "postal_code" + }, + "city": { + "type": "string", + "example": "city" + } + } + }, + "portal_user": { + "additionalProperties": true, + "type": "object", + "properties": { + "access_status": { + "type": "string", + "example": "access_status" + }, + "expires_at": { + "type": "string", + "example": "expires_at" + } + } + }, + "concession_attributes": { + "type": "object", + "properties": { + "water": { + "type": "string", + "example": "water" + }, + "energy": { + "type": "string", + "example": "energy" + }, + "gas": { + "type": "string", + "example": "gas" + } + } + } + }, + "required": [ + "contact" + ] + }, + "EntityMatchingConfig": { + "type": "object", + "description": "Configuration for matching existing entities during SSO login using token claims", + "properties": { + "portal_user": { + "type": "object", + "description": "Mapping of portal_user attributes to token claim paths. All configured fields must match (AND logic).", + "additionalProperties": { + "type": "string" + }, + "example": { + "external_id": "sub" + } + }, + "contact": { + "type": "object", + "description": "Mapping of contact attributes to token claim paths. All configured fields must match (AND logic).", + "additionalProperties": { + "type": "string" + }, + "example": { + "customer_number": "customer_id", + "external_id": "sub" + } + }, + "auto_create_cognito_user": { + "type": "boolean", + "description": "Whether to automatically create Cognito user when matched portal_user has no authentication data. Defaults to true.", + "default": true + } + } + }, + "OIDCProviderConfig": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "authorization_code", + "implicit" + ], + "default": "implicit" + }, + "oidc_issuer": { + "type": "string", + "description": "Issuing Authority URL", + "example": "https://login.microsoftonline.com/33d4f3e5-3df2-421e-b92e-a63cfa680a88/v2.0" + }, + "redirect_uri": { + "type": "string", + "description": "Redirect URI for the OIDC flow", + "example": "https://customer-portal.com/login" + }, + "client_id": { + "type": "string", + "example": "ab81daf8-8b1f-42d6-94ca-c51621054c75" + }, + "client_secret": { + "type": "string", + "example": "7BIUnn~6shh.7fNtXb..3k1Mp3s6k6WK3B" + }, + "has_client_secret": { + "type": "boolean", + "description": "Whether the client secret is present", + "example": true + }, + "scope": { + "type": "string", + "description": "Space-separated list of OAuth 2.0 scopes to request from OpenID Connect", + "example": "openid email" + }, + "metadata": { + "$ref": "#/components/schemas/OIDCProviderMetadata" + }, + "prompt": { + "type": "string", + "enum": [ + "login", + "select_account", + "consent" + ] + } + }, + "required": [ + "oidc_issuer", + "client_id", + "scope" + ] + }, + "MoblieOIDCConfig": { + "type": "object", + "properties": { + "client_id": { + "type": "string", + "description": "Client ID for the mobile app", + "example": 123456 + }, + "client_secret": { + "type": "string", + "description": "Client Secret for the mobile app", + "example": 123456 + } + } + }, + "OIDCProviderMetadata": { + "type": "object", + "properties": { + "authorization_endpoint": { + "type": "string", + "description": "URL of the authorization endpoint", + "example": "https://www.facebook.com/v12.0/dialog/oauth" + }, + "token_endpoint": { + "type": "string", + "description": "URL of the token endpoint", + "example": "https://graph.facebook.com/v12.0/oauth/access_token" + }, + "userinfo_endpoint": { + "type": "string", + "description": "URL of the userinfo endpoint", + "example": "https://graph.facebook.com/me" + }, + "logout_uri": { + "type": "string", + "description": "URL of the logout/end session endpoint", + "example": "https://login.microsoftonline.com/common/oauth2/v2.0/logout" + }, + "logout_redirect_uri": { + "type": "string", + "description": "URL to redirect to after logout completes", + "example": "https://customer-portal.com/login" + }, + "skip_login_as_logout": { + "type": "boolean", + "description": "When true, skip SSO logout redirect during \"login as\" flow. Use this for providers that cannot redirect back after logout and would break log in as.", + "default": false + }, + "mobile_redirect_uri": { + "type": "string", + "description": "URL of the mobile redirect URI", + "example": "msauth.io.epilot.ecp://auth" + }, + "test_auth_username": { + "type": "string", + "description": "The username for the test auth, only used for testing on auth code flow", + "example": "test@epilot.io" + }, + "test_auth_password": { + "type": "string", + "description": "The password for the test auth, only used for testing on auth code flow" + } + } + }, + "SAMLProviderConfig": { + "type": "object" + }, + "SSOCallbackRequest": { + "type": "object", + "required": [ + "token_endpoint", + "grant_type", + "code", + "redirect_uri", + "client_id", + "code_verifier" + ], + "properties": { + "provider_slug": { + "$ref": "#/components/schemas/ProviderSlug" + }, + "token_endpoint": { + "type": "string", + "description": "URL of the authorization endpoint", + "example": "https://www.facebook.com/v12.0/dialog/oauth" + }, + "grant_type": { + "type": "string", + "description": "The grant type", + "example": "authorization_code" + }, + "code": { + "type": "string", + "description": "The code received from the external SSO provider", + "example": "123456" + }, + "redirect_uri": { + "type": "string", + "description": "The redirect uri", + "example": "https://customer-portal.com/login" + }, + "client_id": { + "type": "string", + "description": "The client id", + "example": "123456" + }, + "code_verifier": { + "type": "string", + "description": "The code verifier", + "example": "123456" + } + } + }, + "SSOCallbackResponse": { + "type": "object", + "required": [ + "access_token", + "token_type", + "expires_in", + "refresh_token" + ], + "properties": { + "access_token": { + "type": "string", + "description": "The access token", + "example": "123456" + }, + "token_type": { + "type": "string", + "description": "The token type", + "example": "Bearer" + }, + "expires_in": { + "type": "number", + "description": "The expires in", + "example": 3600 + }, + "refresh_token": { + "type": "string", + "description": "The refresh token", + "example": "123456" + }, + "id_token": { + "type": "string", + "description": "The id token", + "example": "123456" + }, + "scope": { + "type": "string", + "description": "The scope of the access token", + "example": "openid email" + } + } + }, + "BlockProps": { + "type": "object", + "additionalProperties": true, + "properties": { + "visibility": { + "type": "object", + "description": "The conditions that need to be met for the block to be shown", + "additionalProperties": true + }, + "content": { + "type": "object", + "description": "The content of the block", + "additionalProperties": true + }, + "design": { + "type": "object", + "description": "The design of the block", + "additionalProperties": true + } + } + }, + "BlockType": { + "type": "string", + "description": "The type of the block. eg; tabs, tab, group, attribute", + "example": "tab" + }, + "BlockRequest": { + "type": "object", + "additionalProperties": true, + "required": [ + "type", + "order" + ], + "properties": { + "props": { + "$ref": "#/components/schemas/BlockProps" + }, + "parentId": { + "type": "string", + "description": "The id of the parent block", + "example": "c495fef9-eeca-4019-a989-8390dcd9825b" + }, + "type": { + "$ref": "#/components/schemas/BlockType" + }, + "order": { + "type": "number", + "description": "The order of the block", + "example": 1 + } + } + }, + "BlockId": { + "type": "string", + "description": "The id of the block", + "format": "uuid", + "example": "c495fef9-eeca-4019-a989-8390dcd9825b" + }, + "Block": { + "allOf": [ + { + "$ref": "#/components/schemas/BlockRequest" + }, + { + "type": "object", + "additionalProperties": true, + "properties": { + "id": { + "type": "string", + "description": "The id of the block", + "format": "uuid", + "example": "c495fef9-eeca-4019-a989-8390dcd9825b" + } + } + } + ] + }, + "PageRequest": { + "type": "object", + "additionalProperties": true, + "required": [ + "slug", + "order" + ], + "properties": { + "slug": { + "type": "string", + "description": "The slug of the page", + "example": "dashboard" + }, + "path": { + "type": "string", + "deprecated": true, + "description": "The path of the page", + "example": "/dashboard" + }, + "schema": { + "type": "array", + "items": { + "type": "string", + "description": "The schema of the page" + } + }, + "visibility": { + "type": "object", + "description": "The conditions that need to be met for the page to be shown", + "additionalProperties": true + }, + "content": { + "type": "object", + "description": "The content of the page", + "additionalProperties": true + }, + "design": { + "type": "object", + "description": "The design of the page", + "additionalProperties": true + }, + "blocks": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Block" + } + }, + "order": { + "type": "number", + "description": "The order of the block", + "example": 1 + }, + "is_system": { + "type": "boolean", + "description": "Whether the page is a system page", + "example": false + }, + "is_detail": { + "type": "boolean", + "description": "Whether the page is a detail page", + "example": false + }, + "detail_schema": { + "type": "string", + "description": "The schema of the detail page", + "example": "contact" + }, + "is_public": { + "type": "boolean", + "description": "Whether the page is public", + "example": true + }, + "parentId": { + "type": "string", + "description": "The id of the parent page", + "example": "c495fef9-eeca-4019-a989-8390dcd9825b" + }, + "is_entry_route": { + "type": "boolean", + "description": "Whether the page is the entry route", + "example": false + }, + "is_deleted": { + "type": "boolean", + "description": "Send the flag as true to delete the page", + "example": false + } + } + }, + "Page": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/PageRequest" + }, + { + "type": "object", + "additionalProperties": true, + "properties": { + "id": { + "type": "string", + "description": "The id of the page", + "format": "uuid", + "example": "c495fef9-eeca-4019-a989-8390dcd9825b" + }, + "last_modified_at": { + "type": "string", + "format": "date-time", + "description": "Last modified timestamp of the Page", + "example": "2021-02-09T12:41:43.662Z" + } + } + } + ] + }, + "CommonConfigAttributesV3": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable the portal access" + }, + "name": { + "type": "string", + "description": "A short name to identify your portal", + "example": "Installer Portal" + }, + "domain": { + "type": "string", + "description": "The URL on which the portal is accessible", + "example": "abc.com" + }, + "is_epilot_domain": { + "type": "boolean", + "description": "Mark true if the domain is an Epilot domain" + }, + "epilot_domain": { + "type": "string", + "description": "The Epilot domain on which the portal is accessible", + "example": "example-portal-1.ecp.epilot.io" + }, + "domain_settings": { + "$ref": "#/components/schemas/DomainSettings" + }, + "design_id": { + "$ref": "#/components/schemas/EntityId", + "description": "ID of the design used to build the portal" + }, + "self_registration_setting": { + "type": "string", + "enum": [ + "ALLOW_WITH_CONTACT_CREATION", + "ALLOW_WITHOUT_CONTACT_CREATION", + "DENY", + "ALWAYS_CREATE_CONTACT", + "DISALLOW_COMPLETELY", + "BLOCK_IF_PORTAL_USER_EXISTS" + ] + }, + "user_account_self_management": { + "type": "boolean", + "description": "Enable or disable user account self management", + "example": false + }, + "feature_settings": { + "type": "object", + "description": "Feature settings for the portal", + "properties": { + "start_page": { + "type": "boolean", + "description": "Start page feature flag" + }, + "billing": { + "type": "boolean", + "description": "Billing feature flag" + }, + "change_due_date": { + "type": "boolean", + "description": "Change due date feature flag" + }, + "new_design": { + "type": "boolean", + "description": "Enable or disable the new design for the portal" + } + } + }, + "accessToken": { + "type": "string", + "description": "Access token for the portal" + }, + "advanced_mfa": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Advanced MFA feature flag" + } + } + }, + "auth_settings": { + "type": "object", + "description": "Authentication settings for the portal", + "properties": { + "passwordless_login": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Passwordless login feature flag" + } + } + }, + "entry_point": { + "type": "string", + "enum": [ + "PASSWORD", + "SSO" + ] + }, + "preferred_sso_providers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProviderSlug" + } + }, + "auto_redirect_to_sso": { + "type": "boolean", + "description": "Decide whether to automatically redirect to the provider page during login, which would completely bypass showing the portal authentication page." + } + } + }, + "cognito_details": { + "type": "object", + "description": "AWS Cognito Pool details for the portal", + "properties": { + "cognito_user_pool_client_id": { + "type": "string", + "example": "6bsd0jkgoie74k2i8mrhc1vest", + "description": "Cognito user pool client ID" + }, + "cognito_user_pool_arn": { + "type": "string", + "example": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "description": "Cognito user pool ARN" + }, + "cognito_user_pool_id": { + "type": "string", + "example": "eu-central-1_CUEQRNbUb", + "description": "Cognito user pool ID" + }, + "password_policy": { + "type": "object", + "description": "Password policy for the portal", + "properties": { + "minimum_length": { + "type": "integer", + "example": 8, + "description": "Minimum password length" + }, + "maximum_length": { + "type": "integer", + "example": 256, + "description": "Maximum password length" + }, + "require_lowercase": { + "type": "boolean", + "example": true, + "description": "Require lowercase characters" + }, + "require_uppercase": { + "type": "boolean", + "example": true, + "description": "Require uppercase characters" + }, + "require_numbers": { + "type": "boolean", + "example": true, + "description": "Require numbers" + }, + "require_symbols": { + "type": "boolean", + "example": true, + "description": "Require symbols" + } + } + } + } + }, + "config": { + "type": "string", + "description": "Stringified object with configuration details" + }, + "contact_identifiers": { + "type": "array", + "description": "Deprecated. Use registration_identifiers instead.", + "deprecated": true, + "items": { + "type": "string" + }, + "example": [ + "email", + "last_name" + ] + }, + "approval_state_attributes": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": { + "contact": [ + "name", + "address" + ], + "contract": [ + "installment_amount" + ] + } + }, + "email_templates": { + "$ref": "#/components/schemas/EmailTemplates" + }, + "images": { + "type": "object", + "description": "Teaser & Banner Image web links", + "properties": { + "orderLeftTeaser": { + "type": "string", + "nullable": true, + "example": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "description": "URL of the order left teaser image" + }, + "orderRightTeaser": { + "type": "string", + "nullable": true, + "example": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "description": "URL of the order right teaser image" + }, + "welcomeBanner": { + "type": "string", + "nullable": true, + "example": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg", + "description": "URL of the welcome banner image" + } + } + }, + "entity_identifiers": { + "type": "object", + "description": "Identifiers used to identify an entity by a portal user. Deprecated. Use contract_identifiers instead.", + "deprecated": true, + "properties": { + "type": { + "type": "object", + "properties": { + "isEnabled": { + "type": "boolean", + "description": "Enable/Disable the entity identifier" + }, + "attributes": { + "type": "array", + "description": "Attributes used to identify an entity", + "items": { + "type": "string", + "example": "contract_number" + } + } + } + } + } + }, + "contract_identifiers": { + "type": "array", + "description": "Identifiers to identify a contract by a portal user.", + "items": { + "$ref": "#/components/schemas/ContractIdentifier" + }, + "example": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ] + }, + "contract_selector_config": { + "type": "object", + "description": "Configuration for contract selector in the portal", + "properties": { + "show_inactive": { + "type": "boolean", + "description": "Whether to show inactive contracts in the selector" + }, + "title_path": { + "type": "string", + "description": "Path to the property to use as the contract title" + } + } + }, + "registration_identifiers": { + "type": "array", + "description": "Identifiers to identify a contact of a portal user during the registration.", + "items": { + "$ref": "#/components/schemas/ContractIdentifier" + }, + "example": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ] + }, + "triggered_journeys": { + "type": "array", + "description": "Journeys automatically opened on a portal user action", + "items": { + "type": "object", + "properties": { + "trigger_name": { + "type": "string", + "enum": [ + "FIRST_LOGIN", + "ACCEPT_ORDER", + "DECLINE_ORDER" + ] + }, + "journey_id": { + "$ref": "#/components/schemas/EntityId" + } + } + } + }, + "entity_edit_rules": { + "type": "array", + "description": "Rules for editing an entity by a portal user", + "items": { + "type": "object", + "properties": { + "slug": { + "$ref": "#/components/schemas/EntitySlug" + }, + "attribute": { + "type": "string", + "example": "first_name" + }, + "rule_type": { + "type": "string", + "enum": [ + "cadence", + "relative_to_current_value", + "days_before_date", + "overdue_payments" + ] + }, + "cadence_period_type": { + "type": "string", + "enum": [ + "days", + "weeks", + "months" + ] + }, + "cadence_period": { + "type": "number", + "example": 1 + }, + "changes_allowed": { + "type": "integer", + "example": 1 + }, + "grace_period": { + "type": "integer", + "example": 1 + }, + "allowed_increment": { + "type": "string", + "example": "10%" + }, + "allowed_decrement": { + "type": "string", + "example": "10%" + }, + "number_of_days_before_restriction": { + "type": "integer", + "example": 10 + } + } + } + }, + "allowed_file_extensions": { + "$ref": "#/components/schemas/AllowedFileExtensions" + }, + "prevent_search_engine_indexing": { + "type": "boolean", + "description": "Prevent indexing by search engines" + }, + "meter_reading_grace_period": { + "type": "number", + "description": "Grace period in days for meter readings" + }, + "inactive_contract_cutoff_years": { + "type": "number", + "description": "Number of years to look back for showing inactive contracts in the portal" + }, + "is_dummy": { + "type": "boolean", + "description": "Whether this is a dummy/test portal configuration" + }, + "is_v3_item": { + "type": "boolean", + "description": "Whether this is a v3 portal configuration" + }, + "portal_id": { + "$ref": "#/components/schemas/PortalId" + }, + "portal_sk_v3": { + "type": "string", + "example": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "description": "Key of the portal config" + }, + "origin": { + "$ref": "#/components/schemas/Origin" + } + } + }, + "PortalId": { + "type": "string", + "description": "ID of the portal", + "example": "453ad7bf-86d5-46c8-8252-bcc868df5e3c" + }, + "UpsertPortalConfigV3": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateOnlyPortalConfigAttributes" + }, + { + "$ref": "#/components/schemas/CommonConfigAttributesV3" + }, + { + "properties": { + "origin": { + "$ref": "#/components/schemas/Origin" + }, + "pages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PageRequest" + } + } + } + } + ] + }, + "PortalConfigV3": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateOnlyPortalConfigAttributes" + }, + { + "$ref": "#/components/schemas/CommonConfigAttributesV3" + }, + { + "properties": { + "organization_id": { + "type": "string", + "example": 12345, + "description": "ID of the organization" + }, + "org_settings": { + "type": "object", + "description": "Organization settings", + "properties": { + "canary": { + "type": "object", + "description": "Canary feature flag", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable/Disable the canary feature" + } + } + }, + "notracking": { + "type": "object", + "description": "Disable Advanced Usage Metrics", + "properties": { + "enabled": { + "type": "boolean", + "description": "Disable browser-side scripts that track advanced usage metrics" + } + } + } + } + }, + "feature_flags": { + "type": "object", + "description": "Feature flags for the portal", + "additionalProperties": { + "type": "boolean" + } + }, + "grants": { + "type": "array", + "description": "Permissions granted to a portal user while accessing entities", + "items": { + "$ref": "#/components/schemas/Grant" + } + }, + "identity_providers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProviderPublicConfig" + } + }, + "pages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Page" + } + } + } + } + ] + }, + "JuiceSettings": { + "type": "object", + "properties": { + "is_dummy": { + "type": "boolean", + "description": "Whether the org is in dummy mode" + }, + "is_canary": { + "type": "boolean", + "description": "Whether the org is in canary mode" + }, + "redirect_to": { + "type": "string", + "description": "The URL to redirect to", + "example": "https://example.com" + } + } + }, + "SwappableConfig": { + "type": "string", + "enum": [ + "all", + "domain", + "users", + "email_templates" + ] + }, + "PortalUserRegistrationStatus": { + "type": "string", + "enum": [ + "Registration Pending", + "Confirmation Email Sent", + "Registered", + "Email Update In Progress" + ] + }, + "BusinessPartnerItem": { + "type": "object", + "properties": { + "_id": { + "$ref": "#/components/schemas/EntityId" + }, + "has_portal_user": { + "type": "boolean", + "example": true + }, + "registration_status": { + "$ref": "#/components/schemas/PortalUserRegistrationStatus" + }, + "email": { + "type": "string", + "example": "john.doe@example.com" + }, + "_title": { + "type": "string", + "example": "John Doe" + }, + "first_name": { + "type": "string", + "example": "John" + }, + "last_name": { + "type": "string", + "example": "Doe" + }, + "access_status": { + "type": "boolean", + "example": true + } + } + } + } + }, + "servers": [ + { + "url": "https://customer-portal-api.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/dashboard.json b/packages/cli/definitions/dashboard.json new file mode 100644 index 00000000..464b9230 --- /dev/null +++ b/packages/cli/definitions/dashboard.json @@ -0,0 +1,484 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Dashboard API", + "version": "0.0.1", + "description": "API to store the dashboard configuration for the epilot 360 dashboard\n" + }, + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "tags": [ + { + "name": "Dashboards" + }, + { + "name": "Visualisations" + }, + { + "name": "Examples" + } + ], + "paths": { + "/v1/dashboard/dashboards": { + "get": { + "operationId": "listDashboards", + "summary": "listDashboards", + "description": "List dashboards available to the user", + "tags": [ + "Dashboards" + ], + "responses": { + "200": { + "description": "List of dashboards available to the user", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dashboard" + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createDashboard", + "summary": "createDashboard", + "description": "Create new dashboard", + "tags": [ + "Dashboards" + ], + "requestBody": { + "description": "The dashboard to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dashboard" + } + } + } + }, + "responses": { + "201": { + "description": "The created dashboard", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dashboard" + } + } + } + } + } + } + }, + "/v1/dashboard/dashboards/{id}": { + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/DashboardID" + } + } + ], + "get": { + "operationId": "getDashboard", + "summary": "getDashboard", + "description": "Get dashboard by ID", + "tags": [ + "Dashboards" + ], + "responses": { + "200": { + "description": "The dashboard with the passed ID", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dashboard" + } + } + } + } + } + }, + "put": { + "operationId": "putDashboard", + "summary": "putDashboard", + "description": "Update a dashboard by ID", + "tags": [ + "Dashboards" + ], + "requestBody": { + "description": "The updated dashboard", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dashboard" + } + } + } + }, + "responses": { + "200": { + "description": "The dashboard with the passed ID", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dashboard" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteDashboard", + "summary": "deleteDashboard", + "description": "Delete a dashboard by ID", + "tags": [ + "Dashboards" + ], + "responses": { + "200": { + "description": "The deleted dashboard", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dashboard" + } + } + } + } + } + } + }, + "/v1/dashboard/visualisations": { + "get": { + "operationId": "listAvailableVisualisations", + "summary": "listAvailableVisualisations", + "description": "Returns list of available Visualisations to configure new dashboard tiles", + "tags": [ + "Visualisations" + ], + "responses": { + "200": { + "description": "List of available Visualisations to configure new dashboard tiles", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Visualisation" + }, + "example": [ + { + "visualisation": "timechart", + "title": "Time Series Visualisation", + "description": "Visualise your metrics with respect to time series", + "package_name": "@epilot360/highcharts" + }, + { + "visualisation": "kpi", + "title": "KPI Visualisation", + "description": "Visualise your key performance indicators", + "package_name": "@epilot360/kpi" + } + ] + } + } + } + } + } + } + } + } + }, + "/v1/dashboard/examples": { + "get": { + "operationId": "listAvailableExamples", + "summary": "listAvailableExamples", + "description": "Returns list of available exampless for visualisations to configure new dashboard tiles", + "tags": [ + "Examples" + ], + "responses": { + "200": { + "description": "List of available exampless for visualisations to configure new dashboard tiles", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Example" + } + } + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "DashboardID": { + "description": "Unique identifier for dashboard", + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "Dashboard": { + "type": "object", + "description": "Adashboard configuration with tiles", + "properties": { + "id": { + "$ref": "#/components/schemas/DashboardID" + }, + "title": { + "type": "string", + "example": "Employee Dashboard" + }, + "tiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DashboardTile" + }, + "example": [ + { + "id": "e4af1297-1fd6-440f-9846-f475f580d40f", + "coordinates": {}, + "visualisation": "timechart", + "visualisation_config": { + "query": { + "dataset": "entity_operations", + "measure": "count_operations", + "filters": [ + { + "operation": [ + "createEntity" + ] + }, + { + "entity_schema": [ + "opportunity" + ] + } + ], + "dimensions": [ + { + "time_with_granularity": "month" + }, + { + "entity_attribute": "source.title" + } + ] + }, + "options": { + "type": "line" + } + } + } + ] + } + }, + "required": [ + "title", + "tiles" + ] + }, + "DashboardTileID": { + "description": "Unique identifier for a tile in a dashboard", + "type": "string", + "format": "uuid", + "example": "e4af1297-1fd6-440f-9846-f475f580d40f" + }, + "DashboardTile": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/DashboardTileID" + }, + "coordinates": { + "type": "object" + }, + "title": { + "type": "string", + "example": "Number of opportunities created by journeys every month" + }, + "visualisation_id": { + "$ref": "#/components/schemas/VisualisationId" + }, + "visualisation_config": { + "$ref": "#/components/schemas/VisualisationConfig" + } + } + }, + "VisualisationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/timechartVisualisationConfig" + } + ] + }, + "timechartVisualisationConfig": { + "type": "object", + "properties": { + "query": { + "$ref": "#/components/schemas/DatalakeQuery" + }, + "options": { + "type": "object", + "additionalProperties": true, + "example": { + "type": "bar" + } + } + } + }, + "ExampleID": { + "description": "Unique identifier for a visualisation examples for tiles in a dashboard", + "type": "string", + "format": "uuid", + "example": "e4af1297-1fd6-440f-9846-f475f580d40f" + }, + "Example": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/ExampleID" + }, + "title": { + "type": "string", + "example": "Number of opportunities created by journeys every month" + }, + "visualisation": { + "$ref": "#/components/schemas/VisualisationId" + }, + "query": { + "$ref": "#/components/schemas/DatalakeQuery" + } + } + }, + "DatalakeQuery": { + "type": "object", + "properties": { + "dataset": { + "type": "string", + "example": "entity_operations" + }, + "measure": { + "type": "string", + "example": "count_operations" + }, + "dimensions": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "example": { + "time_with_granularity": "year-month" + } + } + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "example": { + "entity_schema": "opportunity" + } + } + } + }, + "additionalProperties": true + }, + "VisualisationId": { + "description": "Unique identifier for a Visualisation", + "type": "string", + "example": "timechart", + "enum": [ + "kpi", + "funnel", + "toplist", + "timechart", + "pie", + "bar", + "entity_list", + "markdown", + "news_feed", + "workflow" + ] + }, + "Visualisation": { + "type": "object", + "description": "A Visualisation that can be used to configure tiles in dashboards", + "properties": { + "visualisation": { + "$ref": "#/components/schemas/VisualisationId" + }, + "title": { + "type": "string", + "example": "Time Series Visualisation" + }, + "description": { + "type": "string" + }, + "package_name": { + "type": "string", + "description": "Package name of the Visualisation MFE bundle to import", + "example": "@epilot360/highcharts" + }, + "import_url": { + "type": "string", + "format": "uri", + "description": "URL to Visualisation MFE bundle to import", + "example": "https://epilot-dashboard-visualisations.epilot.io/epilot360-datalake-visualisation/bundle.js?version=1650592827" + } + } + } + }, + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotOrg": { + "description": "Overrides the target organization to allow shared tenantaccess", + "name": "x-epilot-org-id", + "in": "header", + "type": "apiKey" + } + } + }, + "servers": [ + { + "url": "https://dashboard.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/data-management.json b/packages/cli/definitions/data-management.json new file mode 100644 index 00000000..779b32d8 --- /dev/null +++ b/packages/cli/definitions/data-management.json @@ -0,0 +1,962 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Data Management API", + "version": "1.2.0" + }, + "tags": [ + { + "name": "Data Management", + "description": "Data Management endpoints" + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "paths": { + "/data-management/v1/{entity_schema}/query": { + "post": { + "operationId": "queryEntities", + "summary": "Query entities using a saved view with additional data filters", + "description": "Executes a query against the specified entity schema using the saved view definition, optionally combined with additional filters. Returns the entities matching the composed query.\n", + "tags": [ + "Data Management" + ], + "parameters": [ + { + "name": "entity_schema", + "in": "path", + "required": true, + "description": "Target entity schema to query (for example: \"contact\", \"opportunity\", \"order\").\n", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryEntitiesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Query results", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryEntitiesResult" + } + } + } + } + } + } + }, + "/data-management/v1/{entity_schema}/jobs": { + "post": { + "operationId": "createJob", + "summary": "Create a new job run", + "tags": [ + "Data Management" + ], + "parameters": [ + { + "name": "entity_schema", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Job created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + } + } + } + }, + "/data-management/v1/{entity_schema}/jobs/{job_id}": { + "patch": { + "operationId": "updateJob", + "summary": "Update an existing job run", + "tags": [ + "Data Management" + ], + "parameters": [ + { + "name": "entity_schema", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "job_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateJobRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Job updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "404": { + "description": "Job not found" + } + } + } + }, + "/data-management/v1/jobs/{job_id}": { + "get": { + "operationId": "getJob", + "summary": "Get a job by id", + "description": "Returns details of a single job run.\n", + "tags": [ + "Data Management" + ], + "parameters": [ + { + "name": "job_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Job", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "404": { + "description": "Job not found" + } + } + } + }, + "/data-management/v1/jobs/{job_id}/report-url": { + "get": { + "operationId": "getJobReportUrl", + "summary": "Get report download URL for a job", + "description": "Returns a short-lived, pre-signed URL to download the report file for the given job.\n", + "tags": [ + "Data Management" + ], + "parameters": [ + { + "name": "job_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Pre-signed report download URL", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobReportUrlResponse" + } + } + } + }, + "404": { + "description": "Job or report not found" + } + } + } + }, + "/data-management/v1/configs/{config_id}": { + "get": { + "operationId": "getConfig", + "summary": "Get a config by id", + "description": "Returns a data management config by its id.\n", + "tags": [ + "Data Management" + ], + "parameters": [ + { + "name": "config_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Config", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Config" + } + } + } + }, + "404": { + "description": "Config not found" + } + } + } + }, + "/data-management/v1/configs/{config_id}/jobs": { + "post": { + "operationId": "createJobForConfig", + "summary": "Trigger a manual job run for a config", + "description": "Creates a job run for the given config and triggers asynchronous execution. Returns a job id which can be used to poll job status.\n", + "tags": [ + "Data Management" + ], + "parameters": [ + { + "name": "config_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "Job created and queued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "404": { + "description": "Config not found" + } + } + } + }, + "/data-management/v1/{entity_schema}/configs": { + "post": { + "operationId": "upsertConfig", + "summary": "Upsert config", + "description": "Creates or updates a config for the given entity schema. The config is later used by a scheduled background process to periodically query and act on matching entities (for example, deletion).\n", + "tags": [ + "Data Management" + ], + "parameters": [ + { + "name": "entity_schema", + "in": "path", + "required": true, + "description": "Target entity schema for the config\n", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertConfigRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Config updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Config" + } + } + } + }, + "201": { + "description": "Config created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Config" + } + } + } + } + } + } + }, + "/data-management/v1/configs": { + "get": { + "operationId": "listConfigs", + "summary": "List configs", + "description": "Returns a paginated list of configs\n", + "tags": [ + "Data Management" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 25 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "entity_schema", + "in": "query", + "required": false, + "description": "Optional entity schema to filter configs.", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Optional config type to filter configs.", + "schema": { + "$ref": "#/components/schemas/ConfigType" + } + }, + { + "name": "next_run_at", + "in": "query", + "required": false, + "description": "Optional next run date (YYYY-MM-DD) to filter configs.", + "schema": { + "type": "string", + "format": "date" + } + }, + { + "name": "enabled", + "in": "query", + "required": false, + "description": "Optional enabled status to filter configs.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "List of configs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListConfigsResponse" + } + } + } + } + } + } + }, + "/data-management/v1/jobs": { + "get": { + "operationId": "listJobs", + "summary": "List jobs", + "description": "Returns a paginated list of jobs\n", + "tags": [ + "Data Management" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 25 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "entity_schema", + "in": "query", + "required": false, + "description": "Optional entity schema to filter jobs.", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Optional job type to filter jobs.", + "schema": { + "$ref": "#/components/schemas/ConfigType" + } + }, + { + "name": "status", + "in": "query", + "required": false, + "description": "Optional job status to filter jobs.", + "schema": { + "$ref": "#/components/schemas/JobStatus" + } + }, + { + "name": "config_id", + "in": "query", + "required": false, + "description": "Optional config id to filter jobs.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "List of jobs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListJobsResponse" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotOrg": { + "description": "Overrides the target organization to allow shared tenantaccess", + "name": "x-epilot-org-id", + "in": "header", + "type": "apiKey" + } + }, + "schemas": { + "ConfigType": { + "type": "string", + "description": "Type of configuration (e.g. deletion)", + "enum": [ + "deletion" + ] + }, + "JobStatus": { + "type": "string", + "enum": [ + "in_progress", + "success", + "failed" + ] + }, + "JobTrigger": { + "type": "string", + "enum": [ + "schedule", + "manual" + ] + }, + "JobReportFormat": { + "type": "string", + "enum": [ + "csv" + ] + }, + "JobReport": { + "type": "object", + "additionalProperties": false, + "properties": { + "bucket": { + "type": "string" + }, + "key": { + "type": "string" + }, + "format": { + "$ref": "#/components/schemas/JobReportFormat" + } + } + }, + "CreateJobRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "config_id", + "scheduled_for" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ConfigType" + }, + "config_id": { + "type": "string" + }, + "scheduled_for": { + "type": "string", + "format": "date" + }, + "status": { + "$ref": "#/components/schemas/JobStatus", + "default": "in_progress" + }, + "started_at": { + "type": "string", + "format": "date-time" + } + } + }, + "JobDetails": { + "type": "object", + "description": "Generic, type-specific job details payload (e.g. matched count, deleted count, failed count, etc.).", + "additionalProperties": true + }, + "UpdateJobRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "$ref": "#/components/schemas/JobStatus" + }, + "details": { + "$ref": "#/components/schemas/JobDetails" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "error": { + "type": "string" + }, + "report": { + "$ref": "#/components/schemas/JobReport" + } + } + }, + "Job": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "type", + "config_id", + "entity_schema", + "scheduled_for", + "status", + "created_at", + "last_updated_at" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/ConfigType" + }, + "config_id": { + "type": "string" + }, + "entity_schema": { + "type": "string" + }, + "scheduled_for": { + "type": "string", + "format": "date" + }, + "status": { + "$ref": "#/components/schemas/JobStatus" + }, + "details": { + "$ref": "#/components/schemas/JobDetails" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "error": { + "type": "string" + }, + "report": { + "$ref": "#/components/schemas/JobReport" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "last_updated_at": { + "type": "string", + "format": "date-time" + }, + "trigger": { + "$ref": "#/components/schemas/JobTrigger" + }, + "triggered_by": { + "type": "string", + "nullable": true + } + } + }, + "ListJobsResponse": { + "type": "object", + "properties": { + "jobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Job" + } + }, + "cursor": { + "type": "string", + "nullable": true + } + } + }, + "JobReportUrlResponse": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "expires_in": { + "type": "integer" + } + } + }, + "QueryFilterType": { + "type": "string", + "enum": [ + "entity_workflows_only_in_closed_or_cancelled_status", + "no_related_entities", + "related_entities_all_in_closed_or_cancelled_status", + "related_entities_workflows_only_in_closed_or_cancelled_status", + "no_email_communication_since" + ] + }, + "QueryFilter": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/QueryFilterType" + }, + "related_entity_schemas": { + "type": "array", + "items": { + "type": "string" + } + }, + "lookback_period_days": { + "type": "integer" + } + } + }, + "QueryConfig": { + "type": "object", + "required": [ + "saved_view_id" + ], + "properties": { + "saved_view_id": { + "type": "string" + }, + "include_deleted": { + "type": "string", + "enum": [ + "true", + "false", + "only" + ] + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryFilter" + } + } + } + }, + "QueryEntitiesRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/QueryConfig" + }, + { + "type": "object", + "properties": { + "from": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "hydrate": { + "type": "boolean" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "QueryEntitiesResult": { + "type": "object", + "properties": { + "hits": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "ConfigSchedule": { + "$ref": "#/components/schemas/IntervalConfigSchedule" + }, + "IntervalConfigSchedule": { + "type": "object", + "required": [ + "frequency", + "interval_days" + ], + "properties": { + "frequency": { + "type": "string", + "enum": [ + "interval" + ] + }, + "interval_days": { + "type": "integer", + "minimum": 1, + "description": "Interval in days between executions" + }, + "start_date": { + "type": "string", + "format": "date" + }, + "end_date": { + "type": "string", + "format": "date" + } + } + }, + "UpsertConfigRequest": { + "type": "object", + "required": [ + "type", + "query", + "schedule" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ConfigType" + }, + "query": { + "$ref": "#/components/schemas/QueryConfig" + }, + "schedule": { + "$ref": "#/components/schemas/ConfigSchedule" + }, + "relations_for_deletion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeletionRelationEntitySchema" + } + }, + "enabled": { + "type": "boolean", + "default": true, + "description": "Whether this configuration is active" + } + } + }, + "Config": { + "type": "object", + "required": [ + "id", + "entity_schema", + "query", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/ConfigType", + "description": "Type of configuration. Currently only 'deletion' is supported." + }, + "entity_schema": { + "type": "string" + }, + "query": { + "$ref": "#/components/schemas/QueryConfig" + }, + "schedule": { + "$ref": "#/components/schemas/ConfigSchedule" + }, + "enabled": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "last_updated_at": { + "type": "string", + "format": "date-time" + }, + "next_run_at": { + "type": "string", + "format": "date" + }, + "relations_for_deletion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeletionRelationEntitySchema" + } + }, + "last_run_at": { + "type": "string", + "format": "date-time" + } + } + }, + "DeletionRelationEntitySchema": { + "type": "string", + "enum": [ + "contact", + "file", + "opportunity", + "order", + "meter", + "ticket", + "message", + "account", + "submission", + "contract" + ] + }, + "ListConfigsResponse": { + "type": "object", + "properties": { + "configs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Config" + } + }, + "cursor": { + "type": "string", + "nullable": true + } + } + } + } + }, + "servers": [ + { + "url": "https://data-management.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/deduplication.json b/packages/cli/definitions/deduplication.json new file mode 100644 index 00000000..ff74421d --- /dev/null +++ b/packages/cli/definitions/deduplication.json @@ -0,0 +1,183 @@ +{ + "openapi": "3.0.2", + "info": { + "version": "2.0.0", + "title": "Deduplication API", + "description": "Backend for Epilot Deduplication feature" + }, + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v1/deduplicate": { + "post": { + "operationId": "deduplicate", + "summary": "deduplicate", + "description": "Deduplicates Entities", + "tags": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeduplicateRequestBody" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response with Deduplication content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeduplicateRequestResponse" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + } + }, + "schemas": { + "DeduplicateRequestBody": { + "type": "array", + "items": { + "type": "object", + "properties": { + "toKeep": { + "type": "string" + }, + "toDelete": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "toKeep", + "toDelete" + ] + } + }, + "DeduplicateRequestResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Entity" + } + }, + "Entity": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "Entity ID of the Deduplication entry" + }, + "_org": { + "type": "string", + "description": "ID of the Organization that owns this Deduplication" + }, + "_schema": { + "type": "string", + "description": "The Entity schema of this Deduplication" + }, + "_created_at": { + "type": "string", + "description": "The timestamp of when this Deduplication was created", + "format": "date-time" + }, + "_updated_at": { + "type": "string", + "description": "The timestamp of when this Deduplication was last updated", + "format": "date-time" + }, + "_created_by": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ], + "description": "The Entity ID of the User that created this Deduplication" + }, + "created_by": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ], + "description": "The Entity ID of the User that created this Deduplication" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags associated with this Deduplication" + }, + "_acl": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Access Control List for this Deduplication entry" + }, + "_owners": { + "type": "array", + "items": { + "type": "object", + "properties": { + "org_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "required": [ + "org_id", + "user_id" + ] + } + }, + "type": { + "type": "string", + "description": "Entity ID of the Deduplication entry" + } + }, + "required": [ + "_id" + ], + "description": "Base Entity schema" + } + } + }, + "servers": [ + { + "url": "https://deduplication.sls.epilot.io" + }, + { + "url": "https://deduplication.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/design.json b/packages/cli/definitions/design.json new file mode 100644 index 00000000..a4b05e7a --- /dev/null +++ b/packages/cli/definitions/design.json @@ -0,0 +1,1423 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Design Builder API v2", + "version": "0.0.1" + }, + "tags": [ + { + "name": "design-builder", + "description": "Available design-builder over designs provided by Design Builder v2" + } + ], + "servers": [ + { + "url": "https://design-builder-api.epilot.io" + } + ], + "security": [ + { + "custom_authorizer": [] + } + ], + "paths": { + "/v1/designs": { + "get": { + "operationId": "getAllDesigns", + "summary": "getAllDesigns", + "description": "Scan all designs linked to a organization, based in orgId attribute from JWT auth token", + "tags": [ + "design-builder" + ], + "responses": { + "200": { + "description": "Success - designs loaded with success. Empty array if org has no designs.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetAllDesignsRes" + } + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "post": { + "operationId": "addDesign", + "summary": "addDesign", + "description": "Create a brand new design linked to a organization, based in orgId attribute from JWT auth token", + "tags": [ + "design-builder" + ], + "requestBody": { + "description": "Design payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddDesignReq" + } + } + } + }, + "responses": { + "201": { + "description": "Success - design created with success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddDesignRes" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/designs/{designId}": { + "get": { + "operationId": "getDesign", + "summary": "getDesign", + "description": "Search for a especific design owned by user organization", + "tags": [ + "design-builder" + ], + "parameters": [ + { + "in": "path", + "name": "designId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the design", + "example": "4a062990-a6a3-11eb-9828-4f3da7d4935a" + } + ], + "responses": { + "200": { + "description": "Success - design loaded with success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetDesignRes" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "No design found" + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteDesign", + "summary": "deleteDesign", + "description": "Search and delete for a especific design owned by user organization", + "tags": [ + "design-builder" + ], + "parameters": [ + { + "in": "path", + "name": "designId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the design", + "example": "4a062990-a6a3-11eb-9828-4f3da7d4935a" + } + ], + "responses": { + "204": { + "description": "Success - design deleted with success." + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "No design found" + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "put": { + "operationId": "updateDesign", + "summary": "updateDesign", + "description": "Update a especific design owned by user organization", + "tags": [ + "design-builder" + ], + "parameters": [ + { + "in": "path", + "name": "designId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the design", + "example": "4a062990-a6a3-11eb-9828-4f3da7d4935a" + } + ], + "requestBody": { + "description": "Design payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDesignReq" + } + } + } + }, + "responses": { + "204": { + "description": "Success - design updated with success." + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "No design found" + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/designs/{designId}/parse": { + "get": { + "operationId": "getThemeFromDesign", + "summary": "getThemeFromDesign", + "description": "Search for a especific design owned by user organization and parse them to a new or old theme", + "security": [], + "tags": [ + "design-builder" + ], + "parameters": [ + { + "in": "path", + "name": "designId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the design", + "example": "4a062990-a6a3-11eb-9828-4f3da7d4935a" + }, + { + "in": "query", + "name": "orgId", + "schema": { + "type": "string" + }, + "description": "Organization id of the user" + }, + { + "in": "query", + "name": "theme", + "schema": { + "type": "string", + "enum": [ + "NEW", + "OLD" + ] + }, + "required": true, + "description": "Type of theme to be parsed and returned", + "example": "NEW" + } + ], + "responses": { + "200": { + "description": "Success - design parsed with success.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "No design found" + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/designs/files": { + "post": { + "operationId": "uploadFile", + "summary": "uploadFile", + "description": "Upload a new file for the user organization bucket", + "tags": [ + "design-builder" + ], + "requestBody": { + "description": "Upload file payload", + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/UploadFileReq" + }, + "encoding": { + "file_data": { + "contentType": "image/*, application/x-font-ttf, application/x-font-opentype, application/font-woff, application/font-woff2" + } + } + } + } + }, + "responses": { + "201": { + "description": "Success - upload with success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UploadFileRes" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "get": { + "operationId": "getFiles", + "summary": "getFiles", + "description": "List all files for the user organization bucket", + "tags": [ + "design-builder" + ], + "parameters": [ + { + "in": "query", + "name": "type", + "schema": { + "type": "string", + "enum": [ + "LOGO", + "FONT" + ] + }, + "required": false, + "description": "Type of files to be returned", + "example": "LOGO" + } + ], + "responses": { + "200": { + "description": "Success - files loaded with success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetFilesRes" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/designs/limit": { + "get": { + "deprecated": true, + "operationId": "getLimit", + "summary": "getLimit", + "description": "Gets designs number limit from database per organization", + "tags": [ + "design-builder" + ], + "responses": { + "200": { + "description": "Success - limit loaded with success.", + "content": { + "application/json": { + "schema": { + "type": "number" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/brands": { + "get": { + "deprecated": true, + "operationId": "getBrands", + "summary": "getBrands", + "description": "Scan all brands linked to a organization, based in orgId attribute from JWT auth token", + "tags": [ + "design-builder" + ], + "responses": { + "200": { + "description": "Success - brands loaded with success. Empty array if org has no designs.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetBrandsRes" + } + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/designs/consumer/{application}/{consumerId}": { + "get": { + "operationId": "getConsumerDesign", + "summary": "getConsumerDesign", + "description": "Search for a especific design owned by user organization", + "tags": [ + "design-builder" + ], + "parameters": [ + { + "in": "path", + "name": "consumerId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the design", + "example": "4a062990-a6a3-11eb-9828-4f3da7d4935a" + }, + { + "in": "path", + "name": "application", + "schema": { + "type": "string" + }, + "required": true, + "description": "Type of application that uses the design", + "example": "journey" + } + ], + "responses": { + "200": { + "description": "Success - design loaded with success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetDesignRes" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "No design found" + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/designs/addConsumer/{application}/{designId}": { + "put": { + "operationId": "addConsumer", + "summary": "addConsumer", + "description": "Add a consumer that uses a specific design", + "tags": [ + "design-builder" + ], + "parameters": [ + { + "in": "path", + "name": "designId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the design", + "example": "4a062990-a6a3-11eb-9828-4f3da7d4935a" + }, + { + "in": "path", + "name": "application", + "schema": { + "type": "string" + }, + "required": true, + "description": "Type of application that uses the design", + "example": "journey" + } + ], + "requestBody": { + "description": "widget id payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddConsumerReq" + } + } + } + }, + "responses": { + "204": { + "description": "Success - design updated with success." + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "No design found" + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/designs/removeConsumer/{application}/{designId}": { + "put": { + "operationId": "removeConsumer", + "summary": "removeConsumer", + "description": "Remove a consumer that uses a specific design", + "tags": [ + "design-builder" + ], + "parameters": [ + { + "in": "path", + "name": "designId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the design", + "example": "4a062990-a6a3-11eb-9828-4f3da7d4935a" + }, + { + "in": "path", + "name": "application", + "schema": { + "type": "string" + }, + "required": true, + "description": "Type of application that uses the design", + "example": "journey" + } + ], + "requestBody": { + "description": "widget id payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddConsumerReq" + } + } + } + }, + "responses": { + "204": { + "description": "Success - design updated with success." + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "No design found" + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "custom_authorizer": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + }, + "schemas": { + "UploadFileReq": { + "type": "object", + "properties": { + "file_type": { + "type": "string", + "enum": [ + "LOGO", + "FONT" + ] + }, + "file_data": { + "type": "string", + "format": "base64" + }, + "display_name": { + "type": "string" + }, + "file_name": { + "type": "string" + } + }, + "required": [ + "file_type", + "file_name", + "file_data" + ] + }, + "UploadFileRes": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/FileData" + } + ] + }, + "GetFilesRes": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/FileData" + } + ] + } + }, + "GetAllDesignsRes": { + "type": "object", + "properties": { + "designs": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/ItemMetada" + }, + { + "$ref": "#/components/schemas/DesignItem" + }, + { + "$ref": "#/components/schemas/Custom_Style" + }, + { + "$ref": "#/components/schemas/Journey" + } + ] + } + } + } + }, + "GetBrandsRes": { + "type": "object", + "properties": { + "brands": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/BrandItem" + } + ] + } + } + } + }, + "AddDesignReq": { + "type": "object", + "properties": { + "design": { + "allOf": [ + { + "$ref": "#/components/schemas/DesignItem" + }, + { + "$ref": "#/components/schemas/Custom_Style" + }, + { + "$ref": "#/components/schemas/Journey" + } + ] + } + }, + "required": [ + "design" + ] + }, + "AddDesignRes": { + "type": "object", + "properties": { + "design": { + "allOf": [ + { + "$ref": "#/components/schemas/ItemMetada" + }, + { + "$ref": "#/components/schemas/DesignItem" + }, + { + "$ref": "#/components/schemas/Custom_Style" + }, + { + "$ref": "#/components/schemas/Journey" + } + ] + } + } + }, + "GetDesignRes": { + "type": "object", + "properties": { + "design": { + "allOf": [ + { + "$ref": "#/components/schemas/ItemMetada" + }, + { + "$ref": "#/components/schemas/DesignItem" + }, + { + "$ref": "#/components/schemas/Custom_Style" + }, + { + "$ref": "#/components/schemas/Journey" + } + ] + } + } + }, + "UpdateDesignReq": { + "type": "object", + "properties": { + "design": { + "allOf": [ + { + "$ref": "#/components/schemas/DesignItem" + }, + { + "$ref": "#/components/schemas/Custom_Style" + }, + { + "$ref": "#/components/schemas/Journey" + } + ] + } + }, + "required": [ + "design" + ] + }, + "ItemMetada": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string", + "description": "Creation date and time", + "example": "2021-01-30T08:30:00Z" + }, + "created_by": { + "type": "string" + }, + "edited": { + "type": "boolean" + }, + "last_modified_at": { + "type": "string" + } + } + }, + "AddConsumerReq": { + "type": "object", + "properties": { + "consumer_id": { + "type": "string" + }, + "consumer_name": { + "type": "string" + }, + "should_delete": { + "type": "string" + } + }, + "required": [ + "consumer_id", + "consumer_name" + ] + }, + "DesignItem": { + "type": "object", + "properties": { + "brand_id": { + "type": "string" + }, + "brand_name": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "emailaddress": { + "type": "string" + }, + "fullname": { + "type": "string" + }, + "name": { + "type": "string" + }, + "userid": { + "type": "string" + } + } + }, + "style_name": { + "type": "string" + }, + "style": { + "type": "object", + "properties": { + "logo": { + "type": "object", + "$ref": "#/components/schemas/LogoData" + }, + "palette": { + "type": "object", + "$ref": "#/components/schemas/PaletteData" + }, + "typography": { + "type": "object", + "$ref": "#/components/schemas/TypographyData" + }, + "shape": { + "type": "object", + "$ref": "#/components/schemas/ShapeData" + }, + "consumer": { + "type": "object", + "$ref": "#/components/schemas/ConsumerData" + } + }, + "required": [ + "palette", + "typography", + "consumer" + ] + }, + "is_default": { + "type": "boolean" + } + }, + "required": [ + "style_name", + "status", + "edited", + "style" + ] + }, + "BrandItem": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "created_by": { + "type": "string" + }, + "created_date": { + "type": "string" + }, + "main_brand": { + "type": "string" + }, + "organization_id": { + "type": "string" + }, + "updated_date": { + "type": "string" + }, + "updated_by": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "Custom_Style": { + "type": "object", + "properties": { + "custom_theme": { + "type": "string" + }, + "use_custom_theme": { + "type": "boolean" + } + } + }, + "Journey": { + "type": "object", + "properties": { + "design_tokens": { + "type": "object", + "properties": { + "coupon": { + "type": "string" + }, + "cashback": { + "type": "string" + }, + "custom_css": { + "type": "string" + } + } + } + } + }, + "ConsumerData": { + "type": "object", + "properties": { + "widgets": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/WidgetData" + } + ] + } + }, + "customer_portals": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/CustomerPortalData" + } + ] + } + } + }, + "required": [ + "widgets", + "customer_portals" + ] + }, + "WidgetData": { + "allOf": [ + { + "$ref": "#/components/schemas/WidgetPortalData" + } + ] + }, + "CustomerPortalData": { + "allOf": [ + { + "$ref": "#/components/schemas/WidgetPortalData" + } + ] + }, + "LogoData": { + "type": "object", + "properties": { + "main": { + "type": "object", + "$ref": "#/components/schemas/FileData" + } + } + }, + "PaletteData": { + "type": "object", + "properties": { + "primary": { + "type": "string" + }, + "secondary": { + "type": "string" + }, + "error": { + "type": "string" + }, + "background": { + "type": "string" + }, + "paper": { + "type": "string" + }, + "navbar": { + "type": "string" + }, + "portal_login_background": { + "type": "string" + } + }, + "required": [ + "primary", + "secondary", + "error", + "background", + "paper", + "navbar" + ] + }, + "TypographyData": { + "type": "object", + "properties": { + "font": { + "type": "object", + "$ref": "#/components/schemas/FontData" + }, + "primary": { + "type": "string" + }, + "secondary": { + "type": "string" + } + }, + "required": [ + "font", + "primary", + "secondary" + ] + }, + "ShapeData": { + "type": "object", + "properties": { + "border_radius": { + "type": "number" + } + } + }, + "FontData": { + "type": "object", + "properties": { + "font_id": { + "type": "string" + }, + "font_name": { + "type": "string" + }, + "font_family": { + "type": "string" + }, + "font_weight_regular": { + "type": "string" + }, + "font_weight_medium": { + "type": "string" + }, + "font_weight_bold": { + "type": "string" + }, + "urls": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/FontResponseUrl" + } + ] + } + } + }, + "required": [ + "font_id", + "font_name", + "urls" + ] + }, + "FontResponseUrl": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "WOFF2", + "WOFF", + "TTF", + "EOT" + ] + }, + "url": { + "type": "string" + } + } + }, + "WidgetPortalData": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "ErrorResp": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "FileData": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "display_name": { + "type": "string" + }, + "file_type": { + "type": "string", + "enum": [ + "LOGO", + "FONT" + ] + }, + "s3_object_key": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "s3_object_key", + "url" + ] + } + } + } +} diff --git a/packages/cli/definitions/document.json b/packages/cli/definitions/document.json new file mode 100644 index 00000000..40d2cfb6 --- /dev/null +++ b/packages/cli/definitions/document.json @@ -0,0 +1,758 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Document API", + "version": "1.0.0", + "description": "A document generation API that allows you to generate documents from templates with variables.\n\n[Feature Documentation](https://docs.epilot.io/docs/files/document-generation)\n" + }, + "tags": [ + { + "name": "Documents", + "description": "Document Generation" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v2/documents:meta": { + "post": { + "operationId": "getTemplateMeta", + "summary": "getTemplateMeta", + "description": "Get metadata for a document template\n\nSupported input document types:\n- .docx\n", + "tags": [ + "Documents" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentMetaRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Document metadata", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentMetaResponse" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorOutput" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorOutput" + } + } + } + }, + "415": { + "description": "Unsupported media type", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorOutput" + } + } + } + } + } + } + }, + "/v2/documents:generate": { + "post": { + "operationId": "generateDocumentV2", + "summary": "generateDocumentV2", + "description": "Generates documents from templates with variables.\n\nSupported document types as input:\n- .docx\n- .ics\n\nSupported document types as output:\n- .pdf\n- .docx but limited to only text based variables\n- .ics\n\nUses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the input document.\n", + "parameters": [ + { + "in": "query", + "name": "job_id", + "description": "Job ID for tracking the status of document generation action", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "mode", + "description": "Type of mode used for document generation flow:\n- partial_generation will have a intermediate step for users to validate and replace the variable values before generating the final document.\n- full_generation, goes through all the steps for the full generation of final document\n", + "schema": { + "type": "string", + "enum": [ + "partial_generation", + "full_generation" + ], + "default": "full_generation" + } + }, + { + "in": "query", + "name": "preview_mode", + "description": "Type of mode used for document generation preview:\n- open - preview_url provides a link to open the file in a browser\n- download - preview_url provides a link to download the file\n", + "schema": { + "type": "string", + "enum": [ + "open", + "download" + ], + "default": "open" + } + } + ], + "tags": [ + "Documents" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentGenerationV2Request" + } + } + } + }, + "responses": { + "200": { + "description": "Generated document output", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentGenerationV2Response" + } + } + } + } + } + } + }, + "/v2/documents:convert": { + "post": { + "operationId": "convertDocument", + "summary": "convertDocument", + "description": "Converts a document to a different format.\n\nSupported input document types:\n- .docx\n\nSupported output document types:\n- .pdf\n", + "tags": [ + "Documents" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConvertDocumentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Conversion job output", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConvertDocumentResponse" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + } + }, + "schemas": { + "S3Reference": { + "type": "object", + "properties": { + "bucket": { + "type": "string", + "example": "document-api-prod" + }, + "key": { + "type": "string", + "example": "uploads/my-template.pdf" + } + }, + "required": [ + "bucket", + "key" + ] + }, + "ErrorOutput": { + "type": "object", + "properties": { + "error_message": { + "description": "Error message", + "type": "string" + }, + "error_code": { + "$ref": "#/components/schemas/ErrorCode" + }, + "error_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/InvalidCustomVariableErrorDetails" + }, + { + "$ref": "#/components/schemas/InternalErrorDetails" + }, + { + "$ref": "#/components/schemas/DocxTemplaterErrorDetails" + } + ] + } + } + }, + "InvalidCustomVariableErrorDetails": { + "description": "Error details for invalid custom variables. This error will appear under 'PARSE_ERROR' error code.", + "type": "array", + "items": { + "$ref": "#/components/schemas/InvalidCustomVariableErrorDetail" + } + }, + "InvalidCustomVariableErrorDetail": { + "type": "object", + "additionalProperties": true, + "properties": { + "explanation": { + "description": "Explanation for the error", + "type": "string" + }, + "context": { + "description": "Context for the error", + "type": "object", + "properties": { + "invalid_variables": { + "description": "List of invalid variables", + "type": "array", + "items": { + "type": "object", + "description": "Invalid variable", + "properties": { + "variable": { + "description": "Variable name", + "type": "string" + }, + "error": { + "description": "Explanation for the error", + "type": "string" + } + } + } + } + } + } + } + }, + "InternalErrorDetails": { + "description": "Error details for internal error. This error will appear under 'INTERNAL_ERROR' error code.", + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "$ref": "#/components/schemas/InternalErrorDetail" + } + } + } + }, + "InternalErrorDetail": { + "type": "object", + "description": "Internal error detail", + "properties": { + "name": { + "description": "Name of the error", + "type": "string" + }, + "message": { + "description": "Error message", + "type": "string" + }, + "stack": { + "description": "Stack trace", + "type": "string" + }, + "cause": { + "description": "Cause of the error", + "type": "string" + } + } + }, + "DocxTemplaterErrorDetails": { + "description": "Error details for DocxTemplater error. This error will appear under 'PARSE_ERROR' error code.\nSee https://docxtemplater.com/docs/errors/#error-schema for more details.\n", + "type": "array", + "items": { + "$ref": "#/components/schemas/DocxTemplaterErrorDetail" + } + }, + "DocxTemplaterErrorDetail": { + "type": "object", + "description": "DocxTemplater error detail", + "properties": { + "id": { + "description": "Id of the error", + "type": "string" + }, + "context": { + "description": "Context of the error", + "type": "string" + }, + "explanation": { + "description": "Explanation of the error", + "type": "string" + } + } + }, + "ErrorCode": { + "description": "Error codes for document generation:\n- PARSE_ERROR - Error while parsing the document. Normally related with a bad template using the wrong DocxTemplater syntax.\n- DOC_TO_PDF_CONVERT_ERROR - Error while converting the document to PDF. Normally related with a ConvertAPI failure.\n- INTERNAL_ERROR - Internal error. Please contact support.\n- INVALID_TEMPLATE_FORMAT - Invalid template format (only .docx is supported). This can happen due to a bad word file or an unsupported file extension.\n", + "type": "string", + "enum": [ + "PARSE_ERROR", + "DOC_TO_PDF_CONVERT_ERROR", + "INTERNAL_ERROR", + "INVALID_TEMPLATE_FORMAT" + ] + }, + "TemplateSettings": { + "type": "object", + "description": "Template Settings for document generation", + "properties": { + "custom_margins": { + "description": "Custom margins for the document", + "type": "object", + "properties": { + "top": { + "description": "Top margin in cm", + "type": "number", + "example": 2.54 + }, + "bottom": { + "description": "Bottom margin in cm", + "type": "number", + "example": 2.54 + } + } + }, + "suggested_margins": { + "description": "Suggested margins for the document", + "type": "object", + "properties": { + "top": { + "description": "Top margin in cm", + "type": "number", + "example": 2.54 + }, + "bottom": { + "description": "Bottom margin in cm", + "type": "number", + "example": 2.54 + } + } + }, + "display_margin_guidelines": { + "description": "Display margin guidelines (applicable to partial generation only)", + "type": "boolean", + "example": true + }, + "enable_data_table_margin_autofix": { + "description": "Enable data table margin autofix", + "type": "boolean", + "example": false + }, + "template_with_datatable": { + "description": "A flag that indicates whether the template has 1 or more data tables in it", + "type": "boolean", + "example": false + }, + "enabled_template_settings_persistence": { + "description": "Enables the persistance of template settings", + "type": "boolean", + "example": false + }, + "misconfigured_margins": { + "description": "An indication that the page margins are misconfigured", + "type": "boolean", + "example": false + }, + "file_entity_id": { + "description": "The file entity id, used when persisting a new template version with updated settings", + "type": "string", + "format": "uuid", + "example": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p" + } + } + }, + "DocumentMetaRequest": { + "type": "object", + "properties": { + "template_document": { + "description": "Input template document", + "type": "object", + "properties": { + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + } + } + } + } + }, + "DocumentMetaResponse": { + "type": "object", + "properties": { + "page_margins": { + "description": "Page margins for the document", + "type": "object", + "properties": { + "top": { + "description": "Top margin in cm", + "type": "number", + "example": 2.54 + }, + "bottom": { + "description": "Bottom margin in cm", + "type": "number", + "example": 2.54 + }, + "left": { + "description": "Left margin in cm", + "type": "number", + "example": 2.54 + }, + "right": { + "description": "Right margin in cm", + "type": "number", + "example": 2.54 + }, + "header": { + "description": "Header margin in cm", + "type": "number", + "example": 2.54 + }, + "footer": { + "description": "Footer margin in cm", + "type": "number", + "example": 2.54 + } + } + }, + "variables": { + "description": "List of variables in the document", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "order.billing_contact.0.salutation", + "order.billing_contact.0.title", + "order_table", + "stayHardStatic", + "opportunity[attribute_name]", + "opportunity[\"attribute_name\"]", + "opportunity.[attribute_name]", + "attribute_name", + "opportunities.0.attribute_name", + "opportunities[0].attribute_name", + "contact.opportunities[0].attribute_name", + "opportunities[Primary].attribute_name" + ] + } + } + }, + "DocumentGenerationV2Request": { + "type": "object", + "properties": { + "template_document": { + "description": "Input template document", + "type": "object", + "properties": { + "filename": { + "type": "string", + "description": "Document original filename", + "example": "my-template-{{order.order_number}}.docx" + }, + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + } + } + }, + "context_entity_id": { + "type": "string", + "format": "uuid", + "description": "Entity to use for variable context", + "example": "bcd0aab9-b544-42b0-8bfb-6d449d02eacc" + }, + "user_id": { + "type": "string", + "description": "User Id for variable context", + "example": 100321 + }, + "language": { + "type": "string", + "description": "Language", + "example": "de" + }, + "variable_payload": { + "description": "Custom values for variables in the template. Takes the higher precedence than others.", + "type": "object", + "properties": { + "additionalProperties": { + "type": "string" + } + } + }, + "context_data": { + "description": "Custom values for variables in the template. Takes the higher precedence than others.", + "type": "object", + "properties": { + "additionalProperties": { + "type": "string" + } + } + }, + "template_settings": { + "$ref": "#/components/schemas/TemplateSettings" + } + }, + "required": [ + "template_document" + ] + }, + "DocumentGenerationV2Response": { + "type": "object", + "properties": { + "job_id": { + "type": "string", + "format": "uuid" + }, + "job_status": { + "description": "Status of the job", + "type": "string", + "enum": [ + "STARTED", + "PROCESSING", + "SUCCESS", + "FAILED" + ] + }, + "message": { + "description": "A message explaining the progress", + "type": "string" + }, + "ics_output": { + "type": "object", + "properties": { + "output_document": { + "type": "object", + "properties": { + "filename": { + "description": "Generated document filename for ICS", + "type": "string", + "example": "my-appointment-OR-001.ics" + }, + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + } + }, + "example": { + "s3ref": { + "bucket": "document-api-preview-prod", + "key": "preview/my-appointment.ics" + } + } + } + } + }, + "pdf_output": { + "type": "object", + "properties": { + "preview_url": { + "description": "Pre-signed S3 GET URL for PDF preview", + "type": "string", + "example": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf" + }, + "output_document": { + "type": "object", + "properties": { + "filename": { + "description": "Generated document filename for PDF", + "type": "string", + "example": "my-template-OR-001.pdf" + }, + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + } + }, + "example": { + "s3ref": { + "bucket": "document-api-preview-prod", + "key": "preview/my-template.pdf" + } + } + } + } + }, + "docx_output": { + "type": "object", + "properties": { + "preview_url": { + "description": "Pre-signed S3 GET URL for DOCX preview", + "type": "string", + "example": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx" + }, + "output_document": { + "type": "object", + "properties": { + "filename": { + "description": "Generated document filename for DOCX", + "type": "string", + "example": "my-template-OR-001.docx" + }, + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + } + }, + "example": { + "s3ref": { + "bucket": "document-api-preview-prod", + "key": "preview/my-template.docx" + } + } + } + } + }, + "xlsx_output": { + "type": "object", + "properties": { + "preview_url": { + "description": "Pre-signed S3 GET URL for XLSX preview", + "type": "string", + "example": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.xlsx" + }, + "output_document": { + "type": "object", + "properties": { + "filename": { + "description": "Generated document filename for XLSX", + "type": "string", + "example": "my-template-OR-001.xlsx" + }, + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + } + }, + "example": { + "s3ref": { + "bucket": "document-api-preview-prod", + "key": "preview/my-template.xlsx" + } + } + } + } + }, + "error_output": { + "$ref": "#/components/schemas/ErrorOutput" + }, + "variable_payload": { + "description": "List of variables and its corresponding replaced values from the document template", + "type": "object", + "properties": { + "additionalProperties": { + "type": "string" + } + } + }, + "template_settings": { + "$ref": "#/components/schemas/TemplateSettings" + } + } + }, + "ConvertDocumentRequest": { + "type": "object", + "properties": { + "language": { + "type": "string", + "description": "Language", + "example": "de" + }, + "input_document": { + "description": "Input document", + "type": "object", + "properties": { + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + } + }, + "required": [ + "s3ref" + ] + }, + "output_format": { + "description": "Output format of the document", + "type": "string", + "enum": [ + "pdf" + ] + }, + "output_filename": { + "description": "Filename of the output document (optional)", + "type": "string", + "example": "converted.pdf" + } + }, + "required": [ + "input_document", + "output_format" + ] + }, + "ConvertDocumentResponse": { + "type": "object", + "properties": { + "output_document": { + "type": "object", + "properties": { + "preview_url": { + "description": "Pre-signed URL for the converted document", + "type": "string", + "example": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/converted.pdf" + }, + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + } + } + } + } + } + } + }, + "servers": [ + { + "url": "https://document.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/email-settings.json b/packages/cli/definitions/email-settings.json new file mode 100644 index 00000000..6f8d905a --- /dev/null +++ b/packages/cli/definitions/email-settings.json @@ -0,0 +1,2627 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Messaging Settings API", + "version": "1.5.0", + "description": "The Messaging Settings API provides comprehensive management of email configurations for epilot organizations.\n\n## Overview\n\nThis API enables organizations to:\n- **Email Addresses**: Configure sender email addresses, set primary addresses, and manage email aliases\n- **Email Signatures**: Create and manage HTML email signatures that can be associated with email addresses\n- **Custom Domains**: Add and verify custom email domains for professional branding\n- **Shared Inboxes**: Organize incoming emails into categorized inboxes with team assignments\n- **Microsoft 365 Integration**: Connect Outlook mailboxes for seamless email synchronization\n\n## Key Concepts\n\n### Email Addresses\nEmail addresses represent the sender identities used when composing emails. Each address can have:\n- A display name (e.g., \"Sales Team\")\n- Assigned users and groups who can send from this address\n- A default signature\n- Association with a shared inbox\n\n### Shared Inboxes\nShared inboxes help teams organize and manage incoming emails. Features include:\n- Color-coded categorization\n- Team member assignments\n- Routing rules for incoming messages\n\n### Email Signatures\nHTML signatures that are automatically appended to outgoing emails. Signatures can include:\n- Rich text formatting\n- Images and logos\n- Contact information\n\n### Custom Domains\nOrganizations can configure custom email domains to send emails from their own domain (e.g., `support@yourcompany.com`). This requires:\n1. Adding the domain\n2. Configuring DNS records\n3. Verifying domain ownership\n\n## Authentication\n\nAll endpoints require authentication via Bearer token (JWT) unless otherwise specified.\nUse the `x-epilot-org-id` header to specify the target organization when using shared tenant access.\n" + }, + "tags": [ + { + "name": "Email settings", + "description": "Legacy settings endpoints for managing various email configuration types including signatures,\ncustom domains, email addresses, and duplicate detection settings.\n" + }, + { + "name": "Email addresses", + "description": "Manage email sender addresses for your organization. Email addresses define the identities\nfrom which emails can be sent. Each address can be configured with display names, user/group\nassignments, default signatures, and shared inbox associations.\n" + }, + { + "name": "Shared inboxes", + "description": "Shared inboxes provide team-based email organization. They allow multiple users to collaborate\non incoming messages with features like color-coding, assignee management, and email routing.\nA default inbox is always available and does not need to be explicitly created.\n" + }, + { + "name": "Inbox buckets", + "description": "Inbox buckets are internal storage containers associated with shared inboxes. Each shared inbox\nhas a corresponding bucket for message storage. The default bucket is always available.\n" + }, + { + "name": "O365 Outlook Connection", + "description": "Microsoft Office 365 Outlook integration endpoints. These endpoints enable organizations to:\n- Initiate OAuth connections with Microsoft 365\n- Connect Outlook shared mailboxes\n- Manage connection status and tokens\n- Disconnect integrations when needed\n\nThe integration supports multiple Azure AD tenants and handles token refresh automatically.\n" + }, + { + "name": "Settings", + "description": "Generic settings management for various email configuration types:\n- **signature**: HTML email signatures\n- **email_domain**: Custom email domains\n- **email_address**: Sender email addresses\n- **whitelist_email_address**: Addresses exempt from duplicate detection\n- **restrict_duplicates_within**: Time window for duplicate email detection\n" + }, + { + "name": "Domains", + "description": "Custom email domain management. Add, verify, and configure custom domains to send emails\nfrom your organization's domain. Domain verification requires proper DNS configuration\nincluding MX records and SPF/DKIM settings.\n" + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "AsOrganization": [] + }, + { + "EpilotOrg": [] + } + ], + "paths": { + "/v2/email-settings/email-addresses/epilot:provision": { + "put": { + "operationId": "provisionEpilotEmailAddress", + "summary": "provisionEpilotEmailAddress", + "description": "Provisions or reactivates an epilot-managed email address for the organization.\n\nWhen provisioning a new epilot email address, any previously active epilot email addresses\nwill be automatically deactivated. Only one epilot email address can be active at a time.\n\nEpilot email addresses use the `@epilot.cloud` domain and are fully managed by the platform.\n", + "tags": [ + "Email addresses" + ], + "requestBody": { + "description": "The epilot email address to provision", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProvisionEpilotEmailAddressPayload" + }, + "example": { + "address": "mycompany@epilot.cloud" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/ProvisionEpilotEmailAddressSuccessResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/email-settings/email-addresses/primary": { + "post": { + "operationId": "setEmailAddressPrimary", + "summary": "setEmailAddressPrimary", + "description": "Sets the specified email address as the primary address for the organization.\n\nThe primary email address is used as the default sender address when composing new emails.\nOnly one email address can be primary at a time; setting a new primary will unset the previous one.\n", + "tags": [ + "Email addresses" + ], + "requestBody": { + "description": "The email address to set as primary", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetEmailAddressPrimaryPayload" + }, + "example": { + "address": "sales@yourcompany.com" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/SetEmailAddressPrimarySuccessResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/email-settings/email-addresses/{id}": { + "get": { + "operationId": "getEmailAddress", + "summary": "getEmailAddress", + "description": "Retrieves the details of a specific email address by its ID.\n\nReturns the full configuration including display name, assigned users/groups,\ndefault signature, and shared inbox association.\n", + "tags": [ + "Email addresses" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EmailAddressId" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/GetEmailAddressSuccessResponse" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deleteEmailAddress", + "summary": "deleteEmailAddress", + "description": "Permanently deletes an email address from the organization.\n\n**Warning**: This action cannot be undone. Users will no longer be able to send\nemails from this address after deletion.\n", + "tags": [ + "Email addresses" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EmailAddressId" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/NoContent" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "put": { + "operationId": "updateEmailAddress", + "summary": "updateEmailAddress", + "description": "Updates the configuration of an existing email address.\n\nYou can modify:\n- Display name\n- Assigned users and groups\n- Default signature\n- Shared inbox association\n- Active status\n", + "tags": [ + "Email addresses" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EmailAddressId" + } + ], + "requestBody": { + "description": "The fields to update on the email address", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEmailAddressPayload" + }, + "example": { + "name": "Sales Team", + "user_ids": [ + "user-123", + "user-456" + ], + "default_signature_id": "sig-789", + "is_active": true + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/UpdateEmailAddressSuccessResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/email-settings/email-addresses": { + "get": { + "operationId": "listEmailAddresses", + "summary": "listEmailAddresses", + "description": "Retrieves all email addresses configured for the organization.\n\nReturns an array of email address configurations including their IDs, display names,\nassigned users/groups, signatures, and status flags.\n", + "tags": [ + "Email addresses" + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListEmailAddressesSuccessResponse" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "post": { + "operationId": "addEmailAddress", + "summary": "addEmailAddress", + "description": "Adds a new email address to the organization.\n\nThe email address can be from a custom domain (if configured) or any external\nemail provider. Optionally assign users, groups, and a default signature.\n", + "tags": [ + "Email addresses" + ], + "requestBody": { + "description": "The email address configuration to create", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEmailAddressPayload" + }, + "example": { + "address": "support@yourcompany.com", + "name": "Customer Support", + "user_ids": [ + "user-123" + ], + "group_ids": [ + "group-456" + ], + "default_signature_id": "sig-789", + "shared_inbox_id": "inbox-abc" + } + } + } + }, + "responses": { + "201": { + "$ref": "#/components/responses/CreateEmailAddressSuccessResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/email-settings/shared-inboxes/{id}": { + "get": { + "operationId": "getSharedInbox", + "summary": "getSharedInbox", + "description": "Retrieves the details of a specific shared inbox by its ID.\n\nReturns the inbox configuration including name, color, description, assigned team members,\nand the associated bucket ID.\n", + "tags": [ + "Shared inboxes" + ], + "parameters": [ + { + "$ref": "#/components/parameters/SharedInboxId" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/GetSharedInboxSuccessResponse" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deleteSharedInbox", + "summary": "deleteSharedInbox", + "description": "Deletes a shared inbox and reroutes all associated emails to a successor inbox.\n\nWhen a shared inbox is deleted:\n- All email addresses associated with this inbox will be reassigned to the successor\n- If no successor is specified, emails are routed to the default inbox\n- The inbox's message history is preserved in the successor inbox\n\n**Note**: The default inbox cannot be deleted.\n", + "tags": [ + "Shared inboxes" + ], + "parameters": [ + { + "$ref": "#/components/parameters/SharedInboxId" + }, + { + "name": "successorInboxId", + "description": "ID of the inbox that will receive emails from the deleted inbox.\nIf not provided, the default inbox (`default`) will be used as the successor.\n", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "example": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/NoContent" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "put": { + "operationId": "updateSharedInbox", + "summary": "updateSharedInbox", + "description": "Updates the configuration of an existing shared inbox.\n\nYou can modify the inbox name, color, description, and team member assignments.\nChanges take effect immediately for all associated email addresses.\n", + "tags": [ + "Shared inboxes" + ], + "parameters": [ + { + "$ref": "#/components/parameters/SharedInboxId" + } + ], + "requestBody": { + "description": "The fields to update on the shared inbox", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSharedInboxPayload" + }, + "example": { + "name": "Customer Support", + "color": "#4CAF50", + "description": "Incoming customer support requests", + "assignees": [ + "user-123", + "user-456" + ] + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/UpdateSharedInboxSuccessResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/email-settings/shared-inboxes": { + "get": { + "operationId": "listSharedInboxes", + "summary": "listSharedInboxes", + "description": "Retrieves all shared inboxes configured for the organization.\n\n**Note**: The default inbox (with ID `default`) is not included in this list but is\nalways available for all organizations. You do not need to create it explicitly.\n", + "tags": [ + "Shared inboxes" + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListSharedInboxesSuccessResponse" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "post": { + "operationId": "addSharedInbox", + "summary": "addSharedInbox", + "description": "Creates a new shared inbox for the organization.\n\nShared inboxes help teams organize and categorize incoming emails.\nEach inbox requires a name and color for visual identification.\n", + "tags": [ + "Shared inboxes" + ], + "requestBody": { + "description": "The shared inbox configuration to create", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSharedInboxPayload" + }, + "example": { + "name": "Sales Inquiries", + "color": "#2196F3", + "description": "Inbound sales and pricing requests", + "assignees": [ + "user-123", + "user-456" + ] + } + } + } + }, + "responses": { + "201": { + "$ref": "#/components/responses/CreateSharedInboxSuccessResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/email-settings/inbox-buckets": { + "get": { + "operationId": "listInboxBuckets", + "summary": "listInboxBuckets", + "description": "Retrieves all inbox buckets for the organization.\n\nInbox buckets are internal storage containers that correspond to shared inboxes.\nEach shared inbox has an associated bucket for storing messages.\n\n**Note**: The default bucket (with ID `default`) is not included in this list but\nis always available for all organizations.\n", + "tags": [ + "Inbox buckets" + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListInboxBucketsSuccessResponse" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/outlook/connect": { + "get": { + "operationId": "connectOutlook", + "summary": "connectOutlook", + "description": "Returns Microsoft authorization URL for Outlook OAuth.", + "tags": [ + "O365 Outlook Connection" + ], + "responses": { + "200": { + "description": "Authorization URL", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorization_url": { + "type": "string" + } + } + } + } + } + }, + "403": { + "$ref": "#/components/responses/OutlookErrorResponse" + } + } + } + }, + "/v2/outlook/connection/status": { + "get": { + "operationId": "getOutlookConnectionStatus", + "summary": "getOutlookConnectionStatus", + "description": "Returns all Microsoft 365 / Outlook connections for the organization.\nSupports multiple connections (one per Azure AD tenant).\n\nEach connection includes an `action` field that tells the UI what button to show\nand what endpoint to call. All actions use GET /outlook/connect.\n", + "tags": [ + "O365 Outlook Connection" + ], + "responses": { + "200": { + "description": "Connection status retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "connections", + "has_connections" + ], + "properties": { + "connections": { + "type": "array", + "description": "List of Outlook connections (one per tenant)", + "items": { + "$ref": "#/components/schemas/OutlookConnectionStatus" + } + }, + "has_connections": { + "type": "boolean", + "description": "Whether any connections exist" + } + } + } + } + } + }, + "400": { + "description": "Bad request - missing organization ID" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v2/outlook/connection/disconnect": { + "post": { + "operationId": "disconnectOutlook", + "summary": "disconnectOutlook", + "description": "Removes the Microsoft 365 / Outlook connection for a specific tenant.\nThis deletes the stored tokens and disconnects the integration.\n", + "tags": [ + "O365 Outlook Connection" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "tenant_id" + ], + "properties": { + "tenant_id": { + "type": "string", + "description": "Azure AD Tenant ID of the connection to disconnect" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successfully disconnected", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "tenant_id": { + "type": "string", + "description": "The tenant ID that was disconnected" + }, + "affected_shared_inboxes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of shared inbox IDs that were affected by the disconnection" + } + } + } + } + } + }, + "400": { + "description": "Bad request - missing tenant_id or organization ID" + }, + "404": { + "description": "Connection not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v2/outlook/mailbox/connect": { + "post": { + "operationId": "connectOutlookMailbox", + "summary": "connectOutlookMailbox", + "description": "Connects an Outlook mailbox:\n 1. Validates the user has access to the mailbox via Microsoft Graph API\n 2. Creates a mapping between the email address of the mailbox and the outlook connection\n 3. Enables the user to send emails as the mailbox's email address\n", + "tags": [ + "O365 Outlook Connection" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email" + ], + "properties": { + "email": { + "type": "string", + "format": "email", + "description": "Email address of the Outlook mailbox to connect" + }, + "shared_inbox_id": { + "type": "string", + "description": "Shared inbox ID to associate with the mailbox. Defaults to the default shared inbox.", + "default": "default" + }, + "mailboxSyncTimeframe": { + "type": "string", + "enum": [ + "5m", + "1w", + "2w", + "1m" + ], + "description": "Optional timeframe for initial mailbox sync. When provided, triggers an automatic\nmailbox sync after connecting the mailbox, syncing emails from the specified period.\n" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Mailbox connected successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email_address", + "outlook_email", + "tenant_id", + "provider" + ], + "properties": { + "email_address": { + "$ref": "#/components/schemas/EmailAddressResponse" + }, + "outlook_email": { + "type": "string", + "format": "email", + "description": "The email of the connected mailbox" + }, + "tenant_id": { + "type": "string", + "description": "Azure AD Tenant ID that provisions this mailbox" + }, + "provider": { + "type": "string", + "enum": [ + "outlook" + ], + "description": "The provider type" + } + } + } + } + } + }, + "400": { + "description": "Bad request - missing email parameter" + }, + "401": { + "description": "Not connected to Microsoft 365" + }, + "403": { + "description": "Access denied - user does not have access to the mailbox" + }, + "409": { + "description": "A mailbox email already connected to an Outlook connection" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v2/outlook/mailbox/{email}/disconnect": { + "post": { + "operationId": "disconnectOutlookMailbox", + "summary": "Disconnect Outlook Mailbox", + "description": "Disconnects a single Outlook mailbox by email address.\nDeletes the email address entity, Outlook email mapping, and Graph API subscriptions.\nDoes not affect the tenant-level Outlook connection.\n", + "tags": [ + "O365 Outlook Connection" + ], + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "email" + }, + "description": "Email address of the Outlook mailbox to disconnect" + } + ], + "responses": { + "200": { + "description": "Mailbox disconnected successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "success", + "email" + ], + "properties": { + "success": { + "type": "boolean" + }, + "email": { + "type": "string", + "format": "email", + "description": "The email address that was disconnected" + } + } + } + } + } + }, + "404": { + "description": "No Outlook mapping found for this email address" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v2/outlook/mailbox/{email}/sync": { + "post": { + "operationId": "startMailboxSync", + "summary": "Start Mailbox Sync", + "description": "Triggers an Outlook mailbox sync for the specified email address.\nSyncs existing emails (inbox + sent items) for the specified timeframe.\n", + "tags": [ + "O365 Outlook Connection" + ], + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "email" + }, + "description": "Email address of the Outlook mailbox to sync" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "timeframe" + ], + "properties": { + "timeframe": { + "$ref": "#/components/schemas/MailboxSyncTimeframePeriods", + "description": "Sync period:\n- 5m: last 5 minutes (quick sync)\n- 1w: 1 week\n- 2w: 2 weeks\n- 1m: 1 month\n" + } + } + } + } + } + }, + "responses": { + "202": { + "description": "Sync started successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "execution_id", + "status", + "timeframe" + ], + "properties": { + "execution_id": { + "type": "string", + "description": "The execution ID" + }, + "status": { + "$ref": "#/components/schemas/MailboxSyncStatuses" + }, + "timeframe": { + "$ref": "#/components/schemas/MailboxSyncTimeframePeriods" + } + } + } + } + } + }, + "400": { + "description": "Invalid input provided" + }, + "404": { + "description": "Mailbox not connected for the provided email address" + }, + "409": { + "description": "A sync in progress for the provided mailbox" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v2/outlook/mailbox/{email}/sync/status": { + "get": { + "operationId": "getMailboxSyncStatus", + "summary": "Get Mailbox Sync Status", + "description": "Returns the current or latest sync status for the specified mailbox.\nPoll this endpoint to track sync progress.\n", + "tags": [ + "O365 Outlook Connection" + ], + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "email" + }, + "description": "Email address of the Outlook mailbox" + } + ], + "responses": { + "200": { + "description": "Sync status retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MailboxSyncStatus" + } + } + } + }, + "404": { + "description": "No sync found for this mailbox" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v2/outlook/mailbox/{email}/sync/retry": { + "post": { + "operationId": "retryMailboxSync", + "summary": "Retry Failed Messages", + "description": "Retries failed messages from a previous sync execution.\nOnly retries messages with status FAILED (not PERMANENTLY_FAILED).\nMessages that fail 3+ retries become PERMANENTLY_FAILED.\n", + "tags": [ + "O365 Outlook Connection" + ], + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "email" + }, + "description": "Email address of the Outlook mailbox" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "sync_id" + ], + "properties": { + "sync_id": { + "type": "string", + "description": "Execution ID of the sync to retry" + }, + "scope": { + "type": "string", + "enum": [ + "all_failed" + ], + "description": "Retry scope. Use 'all_failed' to retry all retryable failed messages." + }, + "message_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Specific Graph message IDs to retry (alternative to scope)" + } + } + } + } + } + }, + "responses": { + "202": { + "description": "Retry started", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "retry_execution_id", + "messages_queued" + ], + "properties": { + "retry_execution_id": { + "type": "string", + "description": "Execution ID for the retry sync" + }, + "messages_queued": { + "type": "integer", + "description": "Number of messages queued for retry" + } + } + } + } + } + }, + "404": { + "description": "No sync found or no retryable messages" + }, + "409": { + "description": "A sync is already running for this mailbox" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v2/outlook/mailbox/mappings": { + "get": { + "operationId": "getConnectedOutlookEmails", + "summary": "getConnectedOutlookEmails", + "description": "Returns all Outlook email addresses connected to the organization.\n", + "tags": [ + "O365 Outlook Connection" + ], + "responses": { + "200": { + "description": "Outlook emails retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "outlook_emails", + "count" + ], + "properties": { + "outlook_emails": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectedOutlookEmail" + } + }, + "count": { + "type": "integer", + "description": "Number of Outlook emails" + } + } + } + } + } + }, + "400": { + "description": "Bad request - missing organization ID" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v2/outlook/oauth/callback": { + "get": { + "operationId": "outlookOAuthCallback", + "summary": "outlookOAuthCallback", + "description": "Exchanges authorization code for tokens and stores them.", + "tags": [ + "O365 Outlook Connection" + ], + "security": [], + "parameters": [ + { + "name": "code", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "session_state", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "error", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "error_description", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "error_subcode", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "client_info", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "error_uri", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "admin_consent", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "tenant", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Stored", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "connected": { + "type": "boolean" + }, + "expires_at": { + "type": "string", + "format": "date-time" + }, + "scope": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/v1/email-settings": { + "get": { + "operationId": "getSettings", + "summary": "getSettings", + "description": "Retrieves settings of a specific type for the organization.\n\nIf an `id` is provided, returns only that specific setting.\nOtherwise, returns all settings of the specified type.\n\n## Setting Types\n\n| Type | Description |\n|------|-------------|\n| `signature` | HTML email signatures |\n| `email_domain` | Custom email domains |\n| `email_address` | Sender email addresses |\n| `whitelist_email_address` | Addresses exempt from duplicate detection |\n| `restrict_duplicates_within` | Time window for duplicate email detection |\n", + "tags": [ + "Settings" + ], + "parameters": [ + { + "name": "type", + "description": "The type of settings to retrieve. Determines which category of\nemail settings will be returned.\n", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/SettingType" + }, + "example": "signature" + }, + { + "name": "id", + "description": "Optional ID to retrieve a specific setting. If omitted, all settings\nof the specified type are returned.\n", + "in": "query", + "schema": { + "type": "string" + }, + "example": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved settings. Returns either a single setting object\n(when `id` is provided) or an array of settings.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SettingsResponse" + }, + "examples": { + "signature_list": { + "summary": "List of email signatures", + "value": [ + { + "id": "sig-123", + "type": "signature", + "name": "Default Signature", + "value": "Best regards", + "html": "

Best regards,
The Team

", + "created_at": "2024-01-15T10:30:00Z" + } + ] + }, + "single_signature": { + "summary": "Single signature by ID", + "value": { + "id": "sig-123", + "type": "signature", + "name": "Default Signature", + "value": "Best regards", + "html": "

Best regards,
The Team

", + "created_at": "2024-01-15T10:30:00Z" + } + } + } + } + } + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + }, + "post": { + "operationId": "addSetting", + "summary": "addSetting", + "description": "Creates a new setting of the specified type.\n\nThe setting type determines which fields are applicable:\n- **signature**: Requires `name`, `value` (plain text), and `html` (HTML content)\n- **email_domain**: Requires `value` (domain name)\n- **whitelist_email_address**: Requires `value` (email address)\n- **restrict_duplicates_within**: Requires `value` (time duration like \"5m\", \"1d\")\n", + "tags": [ + "Settings" + ], + "requestBody": { + "description": "The setting to create", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Setting" + }, + "examples": { + "create_signature": { + "summary": "Create an email signature", + "value": { + "type": "signature", + "name": "Sales Signature", + "value": "Best regards, Sales Team", + "html": "

Best regards,
Sales Team

" + } + }, + "create_whitelist": { + "summary": "Whitelist an email address from duplicate detection", + "value": { + "type": "whitelist_email_address", + "value": "noreply@automated-system.com" + } + }, + "set_duplicate_window": { + "summary": "Set duplicate detection time window", + "value": { + "type": "restrict_duplicates_within", + "value": "5m" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Setting created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SettingsResponse" + } + } + } + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + }, + "delete": { + "operationId": "deleteSetting", + "summary": "deleteSetting", + "description": "Deletes a setting by its ID and type.\n\nBoth the `id` and `type` are required to uniquely identify the setting to delete.\n\n**Warning**: This action cannot be undone.\n", + "tags": [ + "Settings" + ], + "requestBody": { + "description": "The setting identifier to delete", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/SettingType" + }, + "id": { + "type": "string", + "description": "The unique identifier of the setting to delete", + "example": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7" + } + } + }, + "example": { + "type": "signature", + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7" + } + } + } + }, + "responses": { + "200": { + "description": "Setting deleted successfully. Returns the deleted setting.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Setting" + } + } + } + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/email-settings/{id}": { + "post": { + "operationId": "updateSetting", + "summary": "updateSetting", + "description": "Updates an existing setting identified by its ID.\n\nInclude the `type` field in the request body to specify which setting type\nis being updated. Only the fields provided will be updated.\n", + "tags": [ + "Settings" + ], + "parameters": [ + { + "name": "id", + "description": "The unique identifier of the setting to update", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "example": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7" + } + ], + "requestBody": { + "description": "The setting fields to update", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Setting" + }, + "example": { + "type": "signature", + "name": "Updated Signature Name", + "html": "

Updated signature content

" + } + } + } + }, + "responses": { + "200": { + "description": "Setting updated successfully. Returns the updated setting.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Setting" + } + } + } + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/email-settings/domain": { + "post": { + "operationId": "addDomain", + "summary": "addDomain", + "description": "Adds a custom email domain to the organization.\n\nAfter adding the domain, you must:\n1. Configure the required DNS records (provided in the response)\n2. Verify the domain using the verification endpoint\n\nUntil verification is complete, the domain cannot be used for sending emails.\n", + "tags": [ + "Domains" + ], + "requestBody": { + "description": "The domain to add", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + }, + "example": { + "domain": "mail.yourcompany.com" + } + } + } + }, + "responses": { + "200": { + "description": "Domain added successfully. The response includes DNS records that must be\nconfigured before verification.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SettingsResponse" + } + } + } + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + }, + "delete": { + "operationId": "deleteDomain", + "summary": "deleteDomain", + "description": "Removes a custom email domain from the organization.\n\n**Warning**: Deleting a domain will prevent sending emails from any addresses\nusing this domain. Existing email addresses on this domain should be removed\nor reassigned before deleting the domain.\n", + "tags": [ + "Domains" + ], + "requestBody": { + "description": "The domain to delete", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + }, + "example": { + "domain": "mail.yourcompany.com" + } + } + } + }, + "responses": { + "204": { + "description": "Domain deleted successfully" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/email-settings/domain/name-servers:verify": { + "post": { + "operationId": "verifyNameServers", + "summary": "verifyNameServers", + "description": "Verifies that the domain's name server (NS) records are correctly configured.\n\nThis check ensures that DNS resolution is properly set up for the domain\nbefore proceeding with full domain verification.\n\nRun this verification after configuring NS records in your DNS provider.\n", + "tags": [ + "Domains" + ], + "requestBody": { + "description": "The domain to verify name servers for", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + }, + "example": { + "domain": "mail.yourcompany.com" + } + } + } + }, + "responses": { + "200": { + "description": "Name server verification result. Check the response to see if\nverification passed or if additional DNS configuration is needed.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SettingsResponse" + } + } + } + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/email-settings/domain:verify": { + "post": { + "operationId": "verifyDomain", + "summary": "verifyDomain", + "description": "Verifies ownership and configuration of a custom email domain.\n\nDomain verification checks:\n- DNS TXT records for domain ownership\n- MX records for email routing\n- SPF records for sender authentication\n- DKIM records for email signing\n\nOnce verified, the domain can be used to create email addresses and send emails.\n", + "tags": [ + "Domains" + ], + "requestBody": { + "description": "The domain to verify", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + }, + "example": { + "domain": "mail.yourcompany.com" + } + } + } + }, + "responses": { + "200": { + "description": "Domain verification result. The response indicates whether verification\npassed and which DNS records (if any) still need configuration.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SettingsResponse" + } + } + } + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + } + }, + "components": { + "responses": { + "ListInboxBucketsSuccessResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InboxBucketResponse" + } + } + } + } + }, + "ProvisionEpilotEmailAddressSuccessResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailAddressResponse" + } + } + } + }, + "SetEmailAddressPrimarySuccessResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailAddressResponse" + } + } + } + }, + "CreateEmailAddressSuccessResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailAddressResponse" + } + } + } + }, + "UpdateEmailAddressSuccessResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailAddressResponse" + } + } + } + }, + "GetEmailAddressSuccessResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailAddressResponse" + } + } + } + }, + "ListEmailAddressesSuccessResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EmailAddressResponse" + } + } + } + } + }, + "NoContent": { + "description": "Success" + }, + "CreateSharedInboxSuccessResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedInboxResponse" + } + } + } + }, + "UpdateSharedInboxSuccessResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedInboxResponse" + } + } + } + }, + "GetSharedInboxSuccessResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedInboxResponse" + } + } + } + }, + "ListSharedInboxesSuccessResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SharedInboxResponse" + } + } + } + } + }, + "BadRequest": { + "description": "The request was malformed or contains invalid data.\nCheck the error message for details on which fields are invalid.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "example": { + "error": "Invalid email address format", + "status": 400 + } + } + } + }, + "Forbidden": { + "description": "Access denied. The authenticated user does not have permission to perform\nthis operation. This may occur if:\n- The user lacks the required role or permissions\n- The resource belongs to a different organization\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "example": { + "error": "Insufficient permissions to access this resource", + "status": 403 + } + } + } + }, + "NotFound": { + "description": "The requested resource was not found. Verify that:\n- The resource ID is correct\n- The resource exists in your organization\n- The resource has not been deleted\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "example": { + "error": "Email address not found", + "status": 404 + } + } + } + }, + "Conflict": { + "description": "The request conflicts with the current state of the resource.\nCommon causes include:\n- Attempting to create a resource that already exists\n- Concurrent modification conflicts\n- Business rule violations (e.g., duplicate email address)\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "example": { + "error": "Email address already exists in another configuration", + "status": 409 + } + } + } + }, + "InternalServerError": { + "description": "An unexpected error occurred on the server. If this error persists,\nplease contact support with the request details and timestamp.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "example": { + "error": "An unexpected error occurred", + "status": 500 + } + } + } + }, + "OutlookErrorResponse": { + "description": "An error response from the Outlook OAuth flow.\nMay include an admin consent URL if admin permissions are required.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OutlookConnectionError" + }, + "example": { + "error": "access_denied", + "error_description": "Access denied", + "admin_consent_url": "https://login.microsoftonline.com/common/adminconsent?client_id=..." + } + } + } + } + }, + "parameters": { + "EmailAddressId": { + "name": "id", + "description": "Unique identifier of the email address. This can be either the UUID assigned\nwhen the email address was created, or the email address string itself.\n", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "examples": { + "uuid": { + "summary": "UUID identifier", + "value": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7" + }, + "email": { + "summary": "Email address string", + "value": "sales@yourcompany.com" + } + } + }, + "SharedInboxId": { + "name": "id", + "description": "Unique identifier (UUID) of the shared inbox.\nUse `default` to reference the organization's default inbox.\n", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "examples": { + "uuid": { + "summary": "UUID identifier", + "value": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7" + }, + "default": { + "summary": "Default inbox", + "value": "default" + } + } + } + }, + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Primary authentication using epilot OAuth2 bearer token.\nInclude the JWT token in the Authorization header: `Authorization: Bearer `\n", + "bearerFormat": "JWT" + }, + "AsOrganization": { + "type": "apiKey", + "in": "header", + "name": "x-ivy-org-id", + "description": "**Internal use only.** Sets the organization context when using internal service-to-service\nauthentication. Not intended for external API consumers.\n" + }, + "EpilotOrg": { + "type": "apiKey", + "name": "x-epilot-org-id", + "in": "header", + "description": "Overrides the target organization for shared tenant access.\nUse this header when you have access to multiple organizations and need to\nspecify which organization's data to access.\n" + } + }, + "schemas": { + "MailboxSyncStatus": { + "type": "object", + "required": [ + "execution_id", + "status", + "timeframe", + "started_at" + ], + "properties": { + "execution_id": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/MailboxSyncStatuses" + }, + "timeframe": { + "$ref": "#/components/schemas/MailboxSyncTimeframePeriods" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "inbox": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/MailboxSyncFolderStatuses" + }, + "total_messages": { + "type": "integer" + }, + "processed_messages": { + "type": "integer" + }, + "failed_messages": { + "type": "integer" + } + } + }, + "sent_items": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/MailboxSyncFolderStatuses" + }, + "total_messages": { + "type": "integer" + }, + "processed_messages": { + "type": "integer" + }, + "failed_messages": { + "type": "integer" + } + } + } + } + }, + "MailboxSyncStatuses": { + "type": "string", + "enum": [ + "RUNNING", + "COMPLETED", + "COMPLETED_WITH_ERRORS", + "FAILED", + "CANCELLED" + ] + }, + "MailboxSyncFolderStatuses": { + "type": "string", + "enum": [ + "PENDING", + "RUNNING", + "COMPLETED", + "FAILED", + "SKIPPED" + ] + }, + "MailboxSyncTimeframePeriods": { + "type": "string", + "enum": [ + "5m", + "1w", + "2w", + "1m" + ] + }, + "InboxBucketResponse": { + "type": "object", + "description": "Inbox bucket representing the storage container for a shared inbox.", + "required": [ + "id", + "inbox_id" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the bucket", + "example": "bucket-abc" + }, + "inbox_id": { + "type": "string", + "description": "ID of the shared inbox associated with this bucket", + "example": "inbox-xyz" + } + } + }, + "ProvisionEpilotEmailAddressPayload": { + "type": "object", + "description": "Request payload for provisioning an epilot-managed email address.", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string", + "description": "The epilot email address to provision (must be on @epilot.cloud domain)", + "example": "mycompany@epilot.cloud" + } + } + }, + "SetEmailAddressPrimaryPayload": { + "type": "object", + "description": "Request payload for setting an email address as the organization's primary address.", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string", + "description": "The email address to set as primary", + "example": "sales@yourcompany.com" + } + } + }, + "UpdateEmailAddressPayload": { + "type": "object", + "description": "Request payload for updating an email address configuration.\nAll fields are optional; only provided fields will be updated.\n", + "properties": { + "name": { + "type": "string", + "description": "Display name shown as the sender name in emails", + "example": "Sales Team" + }, + "user_ids": { + "type": "array", + "description": "List of user IDs who can send from this address", + "items": { + "type": "string" + }, + "example": [ + "user-123", + "user-456" + ] + }, + "group_ids": { + "type": "array", + "description": "List of group IDs whose members can send from this address", + "items": { + "type": "string" + }, + "example": [ + "group-789" + ] + }, + "default_signature_id": { + "type": "string", + "description": "ID of the signature to use by default when sending from this address", + "example": "sig-abc" + }, + "shared_inbox_id": { + "type": "string", + "description": "ID of the shared inbox to associate with this address", + "example": "inbox-xyz" + }, + "is_active": { + "type": "boolean", + "description": "Whether the email address is active and can be used for sending", + "example": true + } + } + }, + "CreateEmailAddressPayload": { + "type": "object", + "description": "Request payload for creating a new email address.", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string", + "description": "The email address to add (e.g., from a custom domain or external provider)", + "example": "support@yourcompany.com" + }, + "name": { + "type": "string", + "description": "Display name shown as the sender name in emails", + "example": "Customer Support" + }, + "user_ids": { + "type": "array", + "description": "List of user IDs who can send from this address", + "items": { + "type": "string" + }, + "example": [ + "user-123" + ] + }, + "group_ids": { + "type": "array", + "description": "List of group IDs whose members can send from this address", + "items": { + "type": "string" + }, + "example": [ + "group-456" + ] + }, + "default_signature_id": { + "type": "string", + "description": "ID of the signature to use by default when sending from this address", + "example": "sig-789" + }, + "shared_inbox_id": { + "type": "string", + "description": "ID of the shared inbox to associate with this address", + "example": "inbox-abc" + } + } + }, + "EmailAddressResponse": { + "description": "Email address configuration with all associated metadata.", + "allOf": [ + { + "$ref": "#/components/schemas/SettingMeta" + }, + { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string", + "description": "The email address string", + "example": "sales@yourcompany.com" + }, + "name": { + "type": "string", + "description": "Display name shown as the sender name", + "example": "Sales Team" + }, + "user_ids": { + "type": "array", + "description": "IDs of users who can send from this address", + "items": { + "type": "string" + }, + "example": [ + "user-123", + "user-456" + ] + }, + "group_ids": { + "type": "array", + "description": "IDs of groups whose members can send from this address", + "items": { + "type": "string" + }, + "example": [ + "group-789" + ] + }, + "default_signature_id": { + "type": "string", + "description": "ID of the default signature for this address", + "example": "sig-abc" + }, + "shared_inbox_id": { + "type": "string", + "description": "ID of the associated shared inbox", + "example": "inbox-xyz" + }, + "is_active": { + "type": "boolean", + "description": "Whether the address is currently active for sending", + "example": true + }, + "is_primary": { + "type": "boolean", + "description": "Whether this is the organization's primary email address", + "example": false + }, + "is_epilot_email_address": { + "type": "boolean", + "description": "Whether this is an epilot-managed address (@epilot.cloud)", + "example": false + } + } + } + ] + }, + "ErrorResponse": { + "type": "object", + "description": "Standard error response format for all API errors.", + "required": [ + "error", + "status" + ], + "properties": { + "error": { + "type": "string", + "description": "Human-readable error message describing what went wrong", + "example": "Resource not found" + }, + "status": { + "type": "integer", + "description": "HTTP status code of the error", + "example": 404 + } + } + }, + "SettingMeta": { + "type": "object", + "description": "Common metadata fields for all settings and resources.", + "required": [ + "id", + "created_at" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier (UUID) for the resource", + "example": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the resource was created", + "example": "2024-01-15T10:30:00Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the resource was last updated", + "example": "2024-01-20T14:45:00Z" + }, + "created_by": { + "type": "string", + "description": "User ID of the user who created the resource", + "example": "user-123" + }, + "updated_by": { + "type": "string", + "description": "User ID of the user who last updated the resource", + "example": "user-456" + } + } + }, + "UpdateSharedInboxPayload": { + "type": "object", + "description": "Request payload for updating a shared inbox configuration.\nAll fields are optional; only provided fields will be updated.\n", + "properties": { + "color": { + "type": "string", + "description": "Hex color code for visual identification in the UI", + "example": "#4CAF50" + }, + "name": { + "type": "string", + "description": "Display name of the shared inbox", + "example": "Customer Support" + }, + "assignees": { + "type": "array", + "description": "List of user IDs assigned to this inbox", + "items": { + "type": "string" + }, + "example": [ + "user-123", + "user-456" + ] + }, + "description": { + "type": "string", + "description": "Optional description of the inbox purpose", + "example": "Incoming customer support requests" + } + } + }, + "CreateSharedInboxPayload": { + "type": "object", + "description": "Request payload for creating a new shared inbox.", + "required": [ + "name", + "color" + ], + "properties": { + "id": { + "type": "string", + "description": "Optional custom ID for the inbox (auto-generated if not provided)", + "example": "support-inbox" + }, + "color": { + "type": "string", + "description": "Hex color code for visual identification in the UI (required)", + "example": "#2196F3" + }, + "name": { + "type": "string", + "description": "Display name of the shared inbox (required)", + "example": "Sales Inquiries" + }, + "assignees": { + "type": "array", + "description": "List of user IDs to assign to this inbox", + "default": [], + "items": { + "type": "string" + }, + "example": [ + "user-123", + "user-456" + ] + }, + "description": { + "type": "string", + "description": "Optional description of the inbox purpose", + "example": "Inbound sales and pricing requests" + } + } + }, + "SharedInboxResponse": { + "description": "Shared inbox configuration with all associated metadata.", + "allOf": [ + { + "$ref": "#/components/schemas/SettingMeta" + }, + { + "type": "object", + "required": [ + "id", + "name", + "color", + "assignees", + "bucket_id" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the shared inbox", + "example": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7" + }, + "name": { + "type": "string", + "description": "Display name of the shared inbox", + "example": "Customer Support" + }, + "color": { + "type": "string", + "description": "Hex color code for visual identification", + "example": "#4CAF50" + }, + "assignees": { + "type": "array", + "description": "List of user IDs assigned to this inbox", + "default": [], + "items": { + "type": "string" + }, + "example": [ + "user-123", + "user-456" + ] + }, + "description": { + "type": "string", + "description": "Description of the inbox purpose", + "example": "Incoming customer support requests" + }, + "bucket_id": { + "type": "string", + "description": "ID of the associated storage bucket for messages", + "example": "bucket-xyz" + } + } + } + ] + }, + "SettingsResponse": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Setting" + } + }, + { + "$ref": "#/components/schemas/Setting" + } + ] + }, + "ConnectedOutlookEmail": { + "type": "object", + "description": "Mapping between an Outlook email and its Outlook Connection.\nThis tracks which provider/tenant provisions each Outlook email.\n", + "required": [ + "outlook_email" + ], + "properties": { + "outlook_email": { + "type": "string", + "format": "email", + "description": "The Outlook shared mailbox email address" + }, + "tenant_id": { + "type": "string", + "description": "Azure AD Tenant ID that provisions this mailbox" + }, + "provider": { + "type": "string", + "enum": [ + "outlook" + ], + "description": "Provider type (for future extensibility)" + }, + "connected_at": { + "type": "string", + "format": "date-time", + "description": "When the mailbox was connected" + }, + "connected_by_user_id": { + "type": "string", + "description": "User who connected this mailbox" + } + } + }, + "OutlookConnectionError": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "description": "Error code or message from the OAuth flow." + }, + "error_description": { + "type": "string", + "description": "Human-readable description of the error." + }, + "admin_consent_url": { + "type": "string", + "format": "uri", + "description": "URL for tenant admin to grant consent, if applicable." + } + } + }, + "OutlookConnectionStatus": { + "type": "object", + "required": [ + "status", + "action", + "action_label", + "tenant_id" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "connected", + "expired", + "pending_auth", + "not_connected" + ], + "description": "Current connection status:\n- pending_auth: Admin consent granted, waiting for user OAuth\n- connected: Fully connected with valid tokens\n- expired: Tokens expired, need to re-authenticate\n- not_connected: No connection, initiate OAuth\n" + }, + "action": { + "type": "string", + "enum": [ + "connect", + "authorize", + "reconnect", + "none" + ], + "description": "Action for UI to take (all call GET /outlook/connect):\n- connect: No connection, initiate OAuth\n- authorize: Admin consent done, complete OAuth\n- reconnect: Re-authenticate expired session\n- none: Fully connected, no action needed\n" + }, + "connected_by_display_name": { + "type": "string", + "description": "Display name of user who connected" + }, + "connected_by_email": { + "type": "string", + "format": "email", + "description": "Email of the user who connected" + }, + "connected_by_user_id": { + "type": "string", + "description": "Azure AD Object ID of user who connected" + }, + "connected_at": { + "type": "string", + "format": "date-time", + "description": "When the connection was established" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "When the connection was last updated" + }, + "tenant_id": { + "type": "string", + "description": "Microsoft Azure AD tenant ID" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Granted permission scopes" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "description": "When the current access token expires" + }, + "is_token_valid": { + "type": "boolean", + "description": "Whether the current token is still valid" + } + } + }, + "SignatureSetting": { + "type": "string", + "description": "Setting that allows to add a signature.", + "enum": [ + "signature" + ] + }, + "EmailDomainSetting": { + "type": "string", + "description": "Setting that allows to add a custom domain. For e.g; doe.com", + "enum": [ + "email_domain" + ] + }, + "EmailAddressSetting": { + "type": "string", + "description": "Setting that allows to add an email address on the custom domain. For e.g; john@doe.com", + "enum": [ + "email_address" + ] + }, + "WhitelistEmailAddressSetting": { + "type": "string", + "description": "- Setting that specifies a list of addresses exempt from being flagged as duplicate emails.\n- An email will be flagged as a duplicate if it has the same content and is sent to the same recipient within the time frame specified in the RestrictDuplicatesWithinSetting.\n", + "enum": [ + "whitelist_email_address" + ] + }, + "RestrictDuplicatesWithinSetting": { + "type": "string", + "description": "- Restrict duplicates within:\n * 10s\n * 5m\n * 1d\n * 5000 // It converts to 5 seconds.When expressed as a numerical value, it will be interpreted as being in milliseconds.\n- Defaults to 3 minutes\n- Negative values will be treated same as positive values\n- If not set, defaults to 3 min\n- If set as 0, then the no email will be treated as a duplicate\n- Cannot have multiple values\n", + "enum": [ + "restrict_duplicates_within" + ] + }, + "SettingType": { + "oneOf": [ + { + "$ref": "#/components/schemas/SignatureSetting" + }, + { + "$ref": "#/components/schemas/EmailDomainSetting" + }, + { + "$ref": "#/components/schemas/EmailAddressSetting" + }, + { + "$ref": "#/components/schemas/WhitelistEmailAddressSetting" + }, + { + "$ref": "#/components/schemas/RestrictDuplicatesWithinSetting" + } + ] + }, + "Setting": { + "type": "object", + "description": "Generic setting object used for various email configuration types.\nThe applicable fields depend on the setting type:\n- **signature**: Uses `name`, `value` (plain text), and `html` (rich text)\n- **email_domain**: Uses `value` (domain name)\n- **whitelist_email_address**: Uses `value` (email address)\n- **restrict_duplicates_within**: Uses `value` (time duration)\n", + "required": [ + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the setting", + "example": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7" + }, + "name": { + "type": "string", + "description": "Display name of the setting (used for signatures)", + "example": "Default Signature" + }, + "org_id": { + "type": "string", + "description": "Organization ID that owns this setting", + "example": "org-123" + }, + "type": { + "$ref": "#/components/schemas/SettingType" + }, + "value": { + "type": "string", + "description": "The setting value. Interpretation depends on type:\n- signature: Plain text version of the signature\n- email_domain: Domain name (e.g., \"yourcompany.com\")\n- whitelist_email_address: Email address to whitelist\n- restrict_duplicates_within: Time duration (e.g., \"5m\", \"1d\")\n", + "example": "Best regards, The Team" + }, + "html": { + "type": "string", + "description": "HTML content (only applicable for signature type)", + "example": "

Best regards,
The Team

" + }, + "created_at": { + "type": "string", + "description": "ISO 8601 timestamp when the setting was created", + "example": "2024-01-15T10:30:00Z" + }, + "updated_at": { + "type": "string", + "description": "ISO 8601 timestamp when the setting was last updated", + "example": "2024-01-20T14:45:00Z" + }, + "created_by": { + "type": "string", + "description": "User ID of the creator", + "example": "user-123" + }, + "updated_by": { + "type": "string", + "description": "User ID of the last editor", + "example": "user-456" + } + }, + "additionalProperties": true + }, + "Domain": { + "type": "object", + "description": "Custom email domain configuration.", + "properties": { + "domain": { + "type": "string", + "description": "The domain name to add or verify. Can be a root domain or subdomain.\nExamples: \"yourcompany.com\", \"mail.yourcompany.com\"\n", + "example": "mail.yourcompany.com" + } + } + } + } + }, + "servers": [ + { + "url": "https://email-settings.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/email-template.json b/packages/cli/definitions/email-template.json new file mode 100644 index 00000000..7d3ae002 --- /dev/null +++ b/packages/cli/definitions/email-template.json @@ -0,0 +1,1419 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Email template API", + "version": "1.0.0-RFC", + "description": "Email template API service\n" + }, + "tags": [ + { + "name": "Email templates", + "description": "Email template service" + }, + { + "name": "Variables", + "description": "Variable service" + }, + { + "name": "email_template_schema", + "x-displayName": "Email Template", + "description": "\n" + } + ], + "x-tagGroups": [ + { + "name": "APIs", + "tags": [ + "Email templates", + "Variables" + ] + }, + { + "name": "Schemas", + "tags": [ + "email_template_schema" + ] + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "AsOrganization": [] + }, + { + "EpilotOrg": [] + } + ], + "paths": { + "/v1/email-template/templates": { + "post": { + "operationId": "saveTemplate", + "summary": "saveTemplate", + "description": "Create or update a template. If `id` is provided, it will update the template.", + "tags": [ + "Email templates" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplateEntity" + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/email-template/templates/{id}": { + "get": { + "operationId": "getTemplateDetail", + "summary": "getTemplateDetail", + "description": "Get email template by ID", + "tags": [ + "Email templates" + ], + "parameters": [ + { + "name": "id", + "description": "Template entity ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplateResponse" + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + }, + "put": { + "operationId": "updateTemplateDetail", + "summary": "updateTemplateDetail", + "description": "Update email template by ID", + "tags": [ + "Email templates" + ], + "parameters": [ + { + "name": "id", + "description": "Template entity ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplateEntity" + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/v1/email-template/templates:replace": { + "post": { + "operationId": "replaceVariables", + "summary": "replaceVariables", + "description": "Get template detail and replace all variables (template variables and document generation)", + "deprecated": true, + "tags": [ + "Variables" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email_template_id" + ], + "properties": { + "email_template_id": { + "type": "string", + "example": "511ceb90-f738-47aa-8b1e-915ace0ae13c" + }, + "variable_parameters": { + "$ref": "#/components/schemas/VariableParameters" + }, + "must_include_unsubscribe_link": { + "type": "boolean", + "description": "If true then include unsubscribe link in the email body\n", + "default": false + }, + "skip_document_generation": { + "type": "boolean", + "description": "If true then skip document generation. This is useful when you want to replace html variables only. Speeds up the process.\n", + "default": false + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplateResponse" + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/email-template/templates:replaceAsync": { + "post": { + "operationId": "replaceVariablesAsync", + "summary": "replaceVariablesAsync", + "description": "This endpoint allows to initiate an asynchronous process in replacing the template details & generating the documents.\nOn initial request, a jobId and STARTED status are returned. Subsequent requests can use this jobId to poll for the resolved template.\nIf still processing, it returns the jobId and IN-PROGRESS status. Upon completion or failure, it returns the final template or a failure status with reason.\n", + "tags": [ + "Variables" + ], + "parameters": [ + { + "in": "query", + "name": "job_id", + "description": "Job ID for tracking the status of document generation action", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email_template_id": { + "type": "string", + "example": "511ceb90-f738-47aa-8b1e-915ace0ae13c" + }, + "variable_parameters": { + "$ref": "#/components/schemas/VariableParameters" + }, + "must_include_unsubscribe_link": { + "type": "boolean", + "description": "If true then include unsubscribe link in the email body\n", + "default": false + }, + "skip_document_generation": { + "type": "boolean", + "description": "If true then skip document generation. This is useful when you want to replace html variables only. Speeds up the process.\n", + "default": false + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncEmailTemplateResponse" + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/email-template/templates:bulkSendMessage": { + "post": { + "operationId": "bulkSendMessage", + "summary": "bulkSendMessage", + "description": "Send emails to multiple recipients using a template", + "tags": [ + "Email templates" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/BulkSendMessageRequestWithQuery" + }, + { + "$ref": "#/components/schemas/BulkSendMessageRequest" + }, + { + "type": "object", + "required": [ + "job_id" + ], + "properties": { + "job_id": { + "type": "string", + "description": "Job ID for tracking the status of a bulk message request", + "example": "8c086140-f33e-4bb7-a993-50c0f2402c7b" + }, + "action": { + "type": "string", + "description": "Trigger an APPROVE OR CANCEL action for the bulk message request.\n\n* APPROVE: Alias for APPROVE_WITH_CONSENT\n* APPROVE_WITH_CONSENT: Approve the bulk message request and send emails to queued recipients with consent\n* APPROVE_ALL: Approve the bulk message request and send emails to all queued recipients, including those without consent\n* CANCEL: Cancel the bulk message request\n", + "enum": [ + "APPROVE", + "APPROVE_WITH_CONSENT", + "APPROVE_ALL", + "CANCEL" + ] + } + } + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkSendMessageJob" + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/email-template/templates:revert": { + "post": { + "operationId": "revertToOriginalTemplate", + "summary": "revertToOriginalTemplate", + "description": "Revert to the original system generated email template", + "tags": [ + "Email templates" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email_template_id" + ], + "properties": { + "email_template_id": { + "type": "string", + "example": "511ceb90-f738-47aa-8b1e-915ace0ae13c" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotOrg": { + "description": "Overrides the target organization to allow shared tenant access", + "name": "x-epilot-org-id", + "in": "header", + "type": "apiKey" + } + }, + "schemas": { + "BaseEntity": { + "type": "object", + "required": [ + "_id", + "_title", + "_org", + "_schema", + "_created_at", + "_updated_at" + ], + "properties": { + "_id": { + "type": "string", + "description": "Entity ID", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "_title": { + "type": "string", + "description": "Entity title" + }, + "_org": { + "type": "string", + "description": "Ivy Organization ID the entity belongs to", + "example": "206801" + }, + "_schema": { + "type": "string", + "description": "URL-friendly identifier for the entity schema", + "example": "message" + }, + "_tags": { + "type": "array", + "description": "Entity tags", + "items": { + "type": "string" + }, + "example": [ + "automatic email template" + ] + }, + "_created_at": { + "type": "string", + "description": "Created date", + "format": "date-time", + "example": "2021-02-09T12:41:43.662Z" + }, + "_updated_at": { + "type": "string", + "description": "Updated date", + "format": "date-time", + "example": "2021-02-10T09:14:31.990Z" + }, + "_purpose": { + "type": "array", + "description": "Entity Purposes", + "items": { + "type": "string" + }, + "example": [ + "a0ec23ac-12f8-4d89-9a63-91cba3787f2a", + "310cd388-2f15-4b5b-8f98-ca14c1e03304" + ] + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the entity", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } + } + }, + "EmailTemplateRequest": { + "type": "object", + "required": [ + "name", + "subject" + ], + "properties": { + "_id": { + "type": "string", + "example": "cd7809ba-a111-4dd9-8d15-18eb4de0faed" + }, + "_tags": { + "type": "array", + "description": "Entity tags", + "items": { + "type": "string" + }, + "example": [ + "template" + ] + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the entity", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "_purpose": { + "type": "array", + "description": "Entity Purposes", + "items": { + "type": "string" + }, + "example": [ + "a0ec23ac-12f8-4d89-9a63-91cba3787f2a", + "310cd388-2f15-4b5b-8f98-ca14c1e03304" + ] + }, + "name": { + "description": "name", + "type": "string", + "example": "Order confirmation" + }, + "brand_id": { + "description": "Brand ID. Equal 0 if available for All brands", + "type": "number", + "nullable": true, + "example": 0 + }, + "from": { + "description": "From", + "$ref": "#/components/schemas/From" + }, + "to": { + "description": "To", + "type": "array", + "items": { + "$ref": "#/components/schemas/To" + } + }, + "cc": { + "description": "Cc", + "type": "array", + "items": { + "$ref": "#/components/schemas/To" + } + }, + "bcc": { + "description": "Bcc", + "type": "array", + "items": { + "$ref": "#/components/schemas/To" + } + }, + "subject": { + "description": "Subject", + "type": "string", + "example": "We have received your order!" + }, + "body": { + "description": "Body", + "type": "string", + "example": "Hi Ms Ny Huynh,
Thank you for your order. We will contact you shortly" + }, + "attachments": { + "type": "array", + "nullable": true, + "description": "Email template attachments", + "items": { + "$ref": "#/components/schemas/Attachment" + } + }, + "file": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "description": "Entity tags", + "items": { + "type": "object" + } + } + } + }, + "system_template": { + "description": "If template is created by system (Double Opt-in, CMD invitation,...) then true, and some attributes can not be edited such as Name, To,...\nRemember to add default content of template to [system-template.ts](https://gitlab.com/e-pilot/product/email-templates/svc-email-templates-api/-/blob/main/lambda/HandlerFunction/src/enum/system-template.ts) enum for revert to original feature\n", + "type": "boolean", + "example": false + }, + "created_by": { + "description": "Created by", + "type": "string", + "example": 1234 + }, + "updated_by": { + "description": "Updated by", + "type": "string", + "example": 1234 + } + } + }, + "EmailTemplateEntity": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "name", + "type": "string", + "example": "Order confirmation" + }, + "brand_id": { + "description": "Brand ID. Equal 0 if available for All brands", + "type": "number", + "nullable": true, + "example": 0 + }, + "from": { + "description": "From", + "$ref": "#/components/schemas/From" + }, + "to": { + "description": "To", + "type": "array", + "items": { + "$ref": "#/components/schemas/To" + } + }, + "cc": { + "description": "Cc", + "type": "array", + "items": { + "$ref": "#/components/schemas/To" + } + }, + "bcc": { + "description": "Bcc", + "type": "array", + "items": { + "$ref": "#/components/schemas/To" + } + }, + "subject": { + "description": "Subject", + "type": "string", + "example": "We have received your order!" + }, + "body": { + "description": "Body", + "type": "string", + "example": "Hi Ms Ny Huynh,
Thank you for your order. We will contact you shortly" + }, + "attachments": { + "type": "array", + "nullable": true, + "description": "Email template attachments", + "items": { + "$ref": "#/components/schemas/Attachment" + } + }, + "file": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "description": "Entity tags", + "items": { + "type": "object" + } + } + } + }, + "created_by": { + "description": "Created by", + "type": "string", + "example": 1234 + }, + "updated_by": { + "description": "Updated by", + "type": "string", + "example": 1234 + }, + "system_template": { + "description": "If template is created by system (Double Opt-in, CMD invitation,...) then true, and some attributes can not be edited such as Name, To,...\nRemember to add default content of template to system_template enum for revert to original feature\n", + "type": "boolean", + "example": false + } + } + } + ] + }, + "Attachment": { + "type": "object", + "nullable": true, + "required": [ + "filename", + "size", + "content_type", + "bucket", + "object_key" + ], + "properties": { + "cid": { + "type": "string", + "description": "Attachment ID", + "example": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f" + }, + "filename": { + "type": "string", + "description": "File name", + "example": "Produktinformationen_epilot360_Double_Opt_in.pdf" + }, + "size": { + "type": "number", + "description": "File size in bytes", + "example": 451349 + }, + "content_type": { + "type": "string", + "description": "Content type", + "example": "application/pdf" + }, + "url": { + "type": "string", + "description": "URL to download the attachment.", + "example": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf" + }, + "bucket": { + "type": "string", + "description": "S3 bucket where file is stored", + "example": "893487340562-message-attachment" + }, + "object_key": { + "type": "string", + "description": "S3 object apiKey", + "example": "attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf" + }, + "inline": { + "type": "boolean", + "description": "If true then this attachment should not be offered for download (at least not in the main attachments list).\\\nThe usecase is CID embedded image (aka inline image).\n", + "default": false + }, + "send_as_link": { + "type": "boolean", + "description": "If true then this attachment is sent via link. The link is already inserted to email body by API caller. In this case, service doesn't process this attachment.", + "default": false + }, + "type": { + "type": "string", + "description": "File type such as Document template, Document,... Use for replace variables on document template", + "example": "Document template" + }, + "copy_to_message": { + "type": "boolean", + "description": "If true then this attachment is copied to the message and replaces corresponding one", + "default": true + } + } + }, + "From": { + "type": "object", + "required": [ + "email" + ], + "properties": { + "name": { + "type": "string", + "example": "epilot" + }, + "email": { + "type": "string", + "example": "no-reply@epilot.cloud" + } + } + }, + "To": { + "type": "object", + "required": [ + "email" + ], + "properties": { + "name": { + "type": "string", + "example": "Ny Huynh" + }, + "email": { + "type": "string", + "example": "ny.huynh@axonactive.com" + } + } + }, + "PresignedRequest": { + "type": "object", + "required": [ + "id", + "filename", + "content_type" + ], + "properties": { + "id": { + "description": "UUID", + "type": "string", + "example": "8c086140-f33e-4bb7-a993-50c0f2402c7b" + }, + "filename": { + "description": "File name", + "type": "string", + "example": "order.pdf" + }, + "content_type": { + "description": "Content type", + "type": "string", + "example": "application/pdf" + } + } + }, + "PresignedResponse": { + "type": "object", + "required": [ + "download_url", + "upload_url" + ], + "properties": { + "download_url": { + "type": "string", + "description": "URL to download the attachment. This URL is not accessible until attachment is uploaded successfully.", + "example": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf" + }, + "upload_url": { + "description": "Post presigned URL to upload file", + "type": "object", + "required": [ + "url", + "fields" + ], + "properties": { + "url": { + "type": "number", + "description": "URL to upload the attachment", + "example": "https://s3.eu-central-1.amazonaws.com/893487340562-message-attachment" + }, + "fields": { + "type": "object", + "description": "Fields are provided by AWS to authenticate and validate the request. All fields should be included in form-data when performing upload request.", + "example": {} + } + } + } + } + }, + "AttachmentResponse": { + "type": "object", + "properties": { + "total": { + "description": "Total attachments", + "type": "number", + "example": 10 + }, + "attachments": { + "description": "List attachments", + "type": "array", + "items": { + "type": "object", + "properties": { + "filename": { + "description": "File name", + "type": "string", + "example": "order.docx" + }, + "bucket": { + "description": "Bucket name", + "type": "string", + "example": "epilot-playground-upload-document" + }, + "object_key": { + "description": "Object key", + "type": "string", + "example": "9f561bea-f0d9-4e96-b7a9-879fc1643ac0.docx" + }, + "url": { + "description": "URL", + "type": "string", + "example": "https://epilot-playground-upload-document.s3.eu-central-1.amazonaws.com/9f561bea-f0d9-4e96-b7a9-879fc1643ac0.docx" + }, + "document_type": { + "description": "Document type:\n* 0: Static docs\n* 1: Templates\n", + "type": "number", + "example": 0 + } + } + } + } + } + }, + "UserResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "organization_id": { + "type": "string" + }, + "display_name": { + "type": "string", + "description": "User's display name (default: email address)", + "example": "Example User" + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string", + "nullable": true, + "example": 1234567890 + }, + "preferred_language": { + "type": "string", + "example": "de" + }, + "image_uri": { + "type": "object", + "additionalProperties": true, + "properties": { + "original": { + "type": "string", + "format": "uri" + }, + "thumbnail_32": { + "type": "string", + "format": "uri" + } + }, + "example": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + } + }, + "properties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "profileImageName" + }, + "value": { + "type": "string", + "example": "avatar.png" + } + }, + "required": [ + "name", + "value" + ] + } + } + } + }, + "VariableParameters": { + "type": "object", + "properties": { + "template_type": { + "$ref": "#/components/schemas/TemplateType" + }, + "language": { + "type": "string", + "enum": [ + "en", + "de" + ] + }, + "main_entity_id": { + "type": "string", + "description": "The main entity ID. Use main entity in order to use the variable without schema slug prefix - or just pass directly to other object ID.", + "example": "63753437-c9e2-4e83-82bb-b1c666514561" + }, + "user_id": { + "type": "string", + "description": "User ID", + "example": "123452" + }, + "custom_variables": { + "$ref": "#/components/schemas/CustomVariables" + } + }, + "required": [ + "template_type" + ] + }, + "TemplateType": { + "type": "string", + "enum": [ + "email", + "document" + ] + }, + "EmailTemplateResponse": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/EmailTemplateEntity" + }, + "relations": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "AsyncEmailTemplateResponse": { + "type": "object", + "required": [ + "job_id", + "status" + ], + "properties": { + "job_id": { + "type": "string", + "description": "Job ID of the email template that is requested to replace and generate docs", + "example": "8c086140-f33e-4bb7-a993-50c0f2402c7b" + }, + "status": { + "type": "string", + "enum": [ + "STARTED", + "PROCESSING", + "SUCCESS", + "FAILED" + ] + }, + "message": { + "type": "string", + "description": "Error message" + }, + "doc_progress_count": { + "type": "object", + "description": "Progress count of the documents that are needed to generate", + "required": [ + "total", + "completed" + ], + "properties": { + "total": { + "type": "number", + "description": "Total count", + "example": 10 + }, + "completed": { + "type": "number", + "description": "Completed count", + "example": 5 + } + } + }, + "result": { + "type": "object", + "description": "Result of the email template that is replaced along with generated docs", + "properties": { + "entity": { + "$ref": "#/components/schemas/EmailTemplateEntity" + }, + "relations": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + } + }, + "SkipCreatingEntities": { + "type": "boolean", + "description": "When true, it lets to send only the email by skip creating the thread & message entities." + }, + "BulkSendMessageRequest": { + "type": "object", + "description": "It takes a list of entity ids, treating each as a separate mainEntity to construct individual messages.\nFor e.g; if there some opportunityIds are provided, then each opportunityId is treated as a separate mainEntity to construct individual messages.\n", + "required": [ + "email_template_id", + "recipient_ids" + ], + "properties": { + "skip_creating_entities": { + "$ref": "#/components/schemas/SkipCreatingEntities" + }, + "email_template_id": { + "type": "string", + "description": "ID of email template to use for sending bulk emails", + "example": "511ceb90-f738-47aa-8b1e-915ace0ae13c" + }, + "must_include_unsubscribe_link": { + "type": "boolean", + "description": "If true then include unsubscribe link in the email body\n", + "default": true + }, + "recipient_ids": { + "type": "array", + "description": "List of entity ids to use as recipients", + "items": { + "type": "string" + }, + "example": [ + "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "3fa85f64-5717-4562-b3fc-2c963f66afa7", + "3fa85f64-5717-4562-b3fc-2c963f66afa8" + ] + }, + "custom_variables": { + "$ref": "#/components/schemas/CustomVariables" + } + } + }, + "BulkSendMessageRequestWithQuery": { + "type": "object", + "description": "It takes an entity query to derive recipient_ids, treating each as a separate mainEntity to construct individual messages.\nFor e.g; if the query is provided as `_schema:opportunity AND status:PENDING`,\n then all the opportunity Ids with status PENDING are treated as separate mainEntity to construct individual messages.\n", + "required": [ + "email_template_id", + "recipient_query" + ], + "properties": { + "skip_creating_entities": { + "$ref": "#/components/schemas/SkipCreatingEntities" + }, + "email_template_id": { + "type": "string", + "description": "ID of email template to use for sending bulk emails", + "example": "511ceb90-f738-47aa-8b1e-915ace0ae13c" + }, + "must_include_unsubscribe_link": { + "type": "boolean", + "description": "If true then include unsubscribe link in the email body\n", + "default": true + }, + "recipient_query": { + "type": "string", + "description": "Entity search query to select recipients", + "example": "_schema:contact AND consent_email_marketing:active" + }, + "custom_variables": { + "$ref": "#/components/schemas/CustomVariables" + } + } + }, + "CustomVariables": { + "description": "Custom variables to be replaced in the email template", + "type": "array", + "items": { + "type": "object", + "properties": { + "variable": { + "type": "string", + "description": "Template Variable Name", + "example": "{{abc.xyz}}" + }, + "value": { + "type": "string", + "description": "Value to be Replaced", + "example": "ReplacedValue" + } + } + } + }, + "BulkSendMessageJob": { + "type": "object", + "required": [ + "job_id", + "status", + "request" + ], + "properties": { + "org_id": { + "$ref": "#/components/schemas/OrgId" + }, + "job_id": { + "type": "string", + "description": "Job ID for tracking the status of bulk message action", + "example": "8c086140-f33e-4bb7-a993-50c0f2402c7b" + }, + "skip_creating_entities": { + "$ref": "#/components/schemas/SkipCreatingEntities" + }, + "status": { + "type": "string", + "description": "Status of the bulk message action\n* PROCESSING: Bulk message action is processing the request\n* QUEUEING: Bulk message action is generating emails to send in a queue\n* SENDING: Bulk message action is sending emails from the queue\n* SUCCESS: Bulk message action is completed successfully\n* FAILED: Bulk message action is failed\n* CANCELLED: Bulk message action was cancelled\n", + "enum": [ + "PROCESSING", + "QUEUEING", + "APPROVAL", + "SENDING", + "SUCCESS", + "FAILED", + "CANCELLED" + ] + }, + "request": { + "oneOf": [ + { + "$ref": "#/components/schemas/BulkSendMessageRequest" + }, + { + "$ref": "#/components/schemas/BulkSendMessageRequestWithQuery" + } + ] + }, + "created_by": { + "$ref": "#/components/schemas/CreatedBy" + }, + "created_at": { + "$ref": "#/components/schemas/CreatedAt" + }, + "updated_at": { + "$ref": "#/components/schemas/UpdatedAt" + }, + "approved_at": { + "$ref": "#/components/schemas/ApprovedAt" + }, + "approve_action": { + "$ref": "#/components/schemas/ApproveAction" + }, + "task_token": { + "$ref": "#/components/schemas/TaskToken" + }, + "total_queued": { + "type": "integer", + "description": "Total number of emails generated and queued for sending", + "example": 100, + "deprecated": true + }, + "queued": { + "type": "array", + "description": "List of entity ids that are queued for sending", + "items": { + "type": "object", + "required": [ + "entity_id", + "email_to", + "email_with_consent" + ], + "properties": { + "entity_id": { + "type": "string", + "description": "Recipient Entity ID", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "email_to": { + "description": "Recipient emails", + "type": "array", + "items": { + "type": "string", + "description": "Recipient email address", + "example": "recipient@example.com" + } + }, + "email_with_consent": { + "description": "Recipient emails with consent", + "type": "array", + "items": { + "type": "string", + "description": "Recipient email address", + "example": "recipient@example.com" + } + } + } + } + }, + "sent": { + "type": "array", + "description": "List of entity ids and message ids that were sent successfully", + "items": { + "type": "object", + "required": [ + "entity_id", + "message_id" + ], + "properties": { + "entity_id": { + "type": "string", + "description": "Recipient Entity ID", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "message_id": { + "type": "string", + "description": "Message ID", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "email_to": { + "type": "array", + "items": { + "type": "string", + "description": "Recipient email address", + "example": "recipient@example.com" + } + } + } + } + }, + "failed": { + "type": "array", + "description": "List of entity ids that were skipped or failed", + "items": { + "type": "object", + "required": [ + "entity_id", + "error" + ], + "properties": { + "entity_id": { + "type": "string", + "description": "Recipient Entity ID", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "error": { + "type": "string", + "description": "Error message" + }, + "email_to": { + "type": "array", + "items": { + "type": "string", + "description": "Recipient email address", + "example": "recipient@example.com" + } + } + } + } + } + } + }, + "CreateSystemTemplatesReq": { + "type": "object", + "properties": { + "template_names": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "DoubleOptIn_Email_DE", + "Einladung Kundenportal", + "Partner_Kooperation_Email_DE" + ] + } + }, + "required": [ + "template_names" + ] + }, + "CreateSystemTemplatesResp": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseEntity" + } + }, + "OrgId": { + "type": "string", + "description": "Organization ID", + "example": "206801", + "readOnly": true + }, + "CreatedBy": { + "type": "string", + "description": "User ID who created the bulk message action", + "example": "1234", + "readOnly": true + }, + "CreatedAt": { + "type": "string", + "description": "Time when the bulk message action was created", + "format": "date-time", + "readOnly": true + }, + "UpdatedAt": { + "type": "string", + "description": "Time when the bulk message action was last updated", + "format": "date-time", + "readOnly": true + }, + "ApprovedAt": { + "type": "string", + "description": "Time when the bulk message action was last approved", + "format": "date-time", + "readOnly": true + }, + "ApproveAction": { + "type": "string", + "description": "Type of approval action for the bulk message request.\n* APPROVE_WITH_CONSENT: Approve the bulk message request and send emails to queued recipients with consent\n* APPROVE_ALL: Approve the bulk message request and send emails to all queued recipients, including those without consent\n", + "enum": [ + "APPROVE_WITH_CONSENT", + "APPROVE_ALL" + ], + "readOnly": true + }, + "TaskToken": { + "type": "string", + "description": "Task token to approve or cancel the bulk message action", + "example": "8c086140-f33e-4bb7-a993-50c0f2402c7b", + "readOnly": true + } + } + }, + "servers": [ + { + "url": "https://email-template.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/entity-mapping.json b/packages/cli/definitions/entity-mapping.json new file mode 100644 index 00000000..3f96c23c --- /dev/null +++ b/packages/cli/definitions/entity-mapping.json @@ -0,0 +1,1642 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Entity Mapping API", + "description": "API Backend for mapping source entity into target entities", + "version": "1.0.0" + }, + "tags": [ + { + "name": "mappings", + "description": "Entity Mapping Configs" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v1/mappings": { + "post": { + "operationId": "storeConfig", + "summary": "storeConfig", + "description": "Store new MappingConfig", + "tags": [ + "mappings" + ], + "parameters": [ + { + "name": "with_id", + "in": "query", + "required": false, + "description": "Whether ids are part of the body or not", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Mapping Config to store", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingConfig" + } + } + } + }, + "responses": { + "201": { + "description": "The updated entity mapping config", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingConfig" + } + } + } + } + } + } + }, + "/v1/mappings/{id}": { + "get": { + "operationId": "getConfig", + "summary": "getConfig", + "description": "Get latest version of a mapping config by id", + "tags": [ + "mappings" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Mapping Config Id", + "schema": { + "type": "string", + "example": "70542580-2b38-4bfc-af8d-bb90102f9f47" + } + } + ], + "responses": { + "200": { + "description": "Entity Mapping Config", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingConfig" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteConfig", + "summary": "deleteConfig", + "description": "Delete entity mapping config", + "tags": [ + "mappings" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Mapping Config Id", + "schema": { + "type": "string", + "example": "70542580-2b38-4bfc-af8d-bb90102f9f47" + } + } + ], + "responses": { + "200": { + "description": "The deleted mapping config", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingConfig" + } + } + } + } + } + } + }, + "/v1/mappings/{id}/versions": { + "get": { + "operationId": "getAllVersions", + "summary": "getAllVersions", + "description": "Get all version of MappingConfig", + "tags": [ + "mappings" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Mapping Config Id", + "schema": { + "type": "string", + "example": "70542580-2b38-4bfc-af8d-bb90102f9f47" + } + } + ], + "responses": { + "200": { + "description": "All versions of a MappingConfig", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingConfigsResp" + } + } + } + } + } + }, + "post": { + "operationId": "storeNewVersion", + "summary": "storeNewVersion", + "description": "Store new version of MappingConfig", + "tags": [ + "mappings" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Mapping Config Id", + "schema": { + "type": "string", + "example": "70542580-2b38-4bfc-af8d-bb90102f9f47" + } + } + ], + "requestBody": { + "description": "Mapping Config to store", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingConfig" + } + } + } + }, + "responses": { + "200": { + "description": "The updated entity mapping config", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingConfig" + } + } + } + } + } + } + }, + "/v1/mappings/{id}/versions/{version}": { + "get": { + "operationId": "getConfigVersion", + "summary": "getConfigVersion", + "description": "Get specific version of a mapping config by id & version", + "tags": [ + "mappings" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Mapping Config Id", + "schema": { + "type": "string", + "example": "70542580-2b38-4bfc-af8d-bb90102f9f47" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "Version to be loaded", + "schema": { + "type": "number", + "example": 3 + } + } + ], + "responses": { + "200": { + "description": "Entity Mapping Config", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingConfig" + } + } + } + } + } + } + }, + "/v1/mappings:execute": { + "post": { + "operationId": "executeMapping", + "summary": "executeMapping", + "description": "Execute entity mapping based on a config", + "parameters": [ + { + "name": "preview_mode", + "in": "query", + "required": false, + "description": "True, if you want to preview the entities which will result", + "schema": { + "type": "boolean", + "example": true + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteMappingReq" + } + } + } + }, + "tags": [ + "mappings" + ], + "responses": { + "200": { + "description": "The target entities which were mapped", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteMappingResp" + } + } + } + } + } + } + }, + "/v1/mappings:search": { + "post": { + "operationId": "searchConfigs", + "summary": "searchConfigs", + "description": "Search mapping configs", + "tags": [ + "mappings" + ], + "requestBody": { + "description": "Search Mapping Configs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchMappingReq" + } + } + } + }, + "responses": { + "200": { + "description": "Entity Mapping Config", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingConfig" + } + } + } + } + } + } + }, + "/v1/mappings/history": { + "get": { + "operationId": "queryMappingHistory", + "summary": "queryMappingHistory", + "description": "Get the Mapping History", + "tags": [ + "mappings" + ], + "parameters": [ + { + "in": "query", + "name": "from", + "schema": { + "type": "string", + "format": "datetime" + }, + "required": false, + "description": "filter the history from this date on" + }, + { + "in": "query", + "name": "to", + "schema": { + "type": "string", + "format": "datetime" + }, + "required": false, + "description": "filter the history to this date on" + }, + { + "in": "query", + "name": "targetEntityId", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "in": "query", + "name": "sourceEntityId", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Query result of mapping history", + "content": { + "application/json": { + "schema": { + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingHistoryResp" + } + } + } + } + } + } + } + } + } + }, + "/v1/relations:execute": { + "post": { + "operationId": "executeRelations", + "summary": "executeRelations", + "description": "Execute relation mapping between source entity and target entities", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteRelationsReq" + } + } + } + }, + "tags": [ + "mappings" + ], + "responses": { + "200": { + "description": "The relations which were for both source entity and main entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteRelationsResp" + } + } + } + } + } + } + }, + "/v2/mappings/{id}": { + "get": { + "operationId": "getMappingConfig", + "summary": "getMappingConfig", + "description": "Get latest version of a mapping config by id V2", + "tags": [ + "mappings" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Mapping Config Id", + "schema": { + "type": "string", + "example": "70542580-2b38-4bfc-af8d-bb90102f9f47" + } + } + ], + "responses": { + "200": { + "description": "Entity Mapping Config", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingConfigV2" + } + } + } + } + } + }, + "put": { + "operationId": "putMappingConfig", + "summary": "putMappingConfig", + "description": "Stores new version of entity mapping config", + "tags": [ + "mappings" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Mapping Config Id", + "schema": { + "type": "string", + "example": "70542580-2b38-4bfc-af8d-bb90102f9f47" + } + } + ], + "requestBody": { + "description": "Mapping Config to store", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingConfigV2" + } + } + } + }, + "responses": { + "200": { + "description": "The updated entity mapping config", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingConfigV2" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Epilot Bearer Token" + } + }, + "schemas": { + "SearchMappingReq": { + "type": "object", + "properties": { + "source": { + "$ref": "#/components/schemas/SourceConfig" + } + } + }, + "MappingConfigsResp": { + "type": "object", + "properties": { + "configs": { + "$ref": "#/components/schemas/MappingConfigs" + } + }, + "required": [ + "configs" + ] + }, + "MappingConfigs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingConfig" + } + }, + "MappingConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/MappingConfigCommonFields" + }, + { + "type": "object", + "properties": { + "org_id": { + "type": "string", + "example": "66" + }, + "version": { + "type": "integer", + "example": 2 + } + } + } + ], + "required": [ + "org_id", + "version" + ] + }, + "MappingConfigV2": { + "allOf": [ + { + "$ref": "#/components/schemas/MappingConfigCommonFields" + }, + { + "type": "object", + "properties": { + "org_id": { + "type": "string", + "example": "66", + "readOnly": true + }, + "version": { + "type": "integer", + "example": 2, + "readOnly": true + } + } + } + ] + }, + "MappingConfigCommonFields": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/SourceConfig" + }, + "targets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TargetConfig" + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_by": { + "$ref": "#/components/schemas/Owner", + "description": "User / service who created the entity mapping config", + "example": { + "type": "internal_service" + } + }, + "last_updated_by": { + "$ref": "#/components/schemas/Owner", + "description": "User / service who last updated entity mapping config", + "example": { + "type": "user", + "org_id": 255151, + "user_id": 99252 + } + } + }, + "required": [ + "id", + "source", + "targets" + ] + }, + "Owner": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "user", + "internal_service" + ] + }, + "org_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "ExecuteRelationsReq": { + "type": "object", + "description": "Build relations between a source entity and one or more target entities, dynamically identified", + "properties": { + "source_ref": { + "$ref": "#/components/schemas/EntityRef", + "description": "Entity for which to add relations." + }, + "target": { + "type": "object", + "properties": { + "main_entity_ref": { + "$ref": "#/components/schemas/EntityRef", + "description": "Main Entity from where to locate target entities. Eg. submisssion entity" + }, + "relation_attributes": { + "type": "array", + "description": "Relation mappings", + "items": { + "$ref": "#/components/schemas/RelationAttribute" + } + }, + "linkback": { + "type": "object", + "description": "For cases where you want to store a relation between main entity (eg. submission) and current source entity.", + "properties": { + "attribute": { + "type": "string", + "default": "mapped_entities", + "description": "Relation attribute on the main entity (submission) where the target entity will be linked. Set to false to disable linkback\n" + }, + "relation_tags": { + "type": "array", + "description": "Relation tags (labels) to include in main entity linkback relation attribute", + "items": { + "type": "string" + } + } + }, + "required": [ + "attribute", + "relation_tags" + ] + } + }, + "required": [ + "main_entity_ref", + "relation_attributes" + ] + }, + "additional_relations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RelationItem" + } + } + }, + "required": [ + "source_ref" + ] + }, + "ExecuteRelationsResp": { + "type": "object", + "properties": { + "relations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NewRelationItem" + } + } + } + }, + "NewRelationItem": { + "type": "object", + "properties": { + "source_entity_id": { + "type": "string" + }, + "target_entity_id": { + "type": "string" + }, + "relation_attr": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "source_entity_id", + "target_entity_id", + "relation_attr" + ] + }, + "RelationItem": { + "type": "object", + "properties": { + "entity_id": { + "type": "string" + }, + "attribute": { + "type": "string" + } + }, + "required": [ + "entity_id", + "attribute" + ] + }, + "ExecuteMappingReq": { + "type": "object", + "description": "Pass either source or source_entity", + "properties": { + "source_ref": { + "$ref": "#/components/schemas/EntityRef", + "description": "A reference (id and schema) to the entity to be used as source." + }, + "targets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TargetConfig" + }, + "description": "Mapping Configuration to apply." + } + }, + "required": [ + "source_ref", + "targets" + ] + }, + "ExecuteMappingResp": { + "type": "object", + "properties": { + "mapped_entities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Entity" + } + }, + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingFailure" + } + }, + "warnings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingWarning" + } + } + }, + "required": [ + "mapped_entities" + ] + }, + "MappingFailure": { + "type": "object", + "properties": { + "target": { + "$ref": "#/components/schemas/TargetConfig" + }, + "error": { + "type": "object", + "properties": { + "isSilent": { + "type": "boolean" + }, + "message": { + "type": "string" + } + }, + "additionalProperties": true + } + } + }, + "MappingWarning": { + "type": "object", + "properties": { + "explanation": { + "type": "string" + }, + "context": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "explanation" + ] + }, + "Entity": { + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "_schema": { + "type": "string" + }, + "_title": { + "type": "string", + "nullable": true + }, + "_org": { + "type": "string" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "_created_at": { + "type": "string", + "nullable": true + }, + "_updated_at": { + "type": "string", + "nullable": true + }, + "required": [ + "_id", + "_schema", + "_org", + "_created_at", + "_updated_at" + ] + }, + "additionalProperties": true + }, + "EntityRef": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "description": "id of the source entity to be mapped" + }, + "entity_schema": { + "description": "schema of the source entity", + "type": "string", + "example": "submission" + } + }, + "required": [ + "entity_id" + ] + }, + "SourceConfig": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "journey", + "entity" + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/JourneyRef" + }, + { + "$ref": "#/components/schemas/EntityRef" + } + ] + } + } + }, + "JourneyRef": { + "type": "object", + "properties": { + "journey_id": { + "type": "string" + } + } + }, + "Loop_Index_String": { + "type": "string", + "description": "This string value will be replaced with the value of the loop index, when mapping in loop mode", + "enum": [ + "##LOOP_INDEX##" + ] + }, + "TargetConfig": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Identifier for target configuration. Useful for later usages when trying to identify which target config to map to." + }, + "name": { + "type": "string", + "description": "A name for this configuration" + }, + "allow_failure": { + "type": "boolean", + "description": "Pass it as true, when you don't want failures to interrupt the mapping process." + }, + "target_schema": { + "type": "string", + "description": "Schema of target entity" + }, + "target_unique": { + "type": "array", + "description": "Unique key for target entity (see upsertEntity of Entity API)", + "items": { + "type": "string" + } + }, + "loop_config": { + "type": "object", + "description": "contains config in case of running in loop mode", + "properties": { + "source_path": { + "type": "string", + "description": "path to the array from the entity payload" + }, + "length": { + "type": "number", + "description": "a hard limit of how many times the loop is allowed to run.", + "default": "the length of the array" + } + } + }, + "conditionMode": { + "description": "Mode of how conditions are considered valid", + "type": "string", + "enum": [ + "oneOf", + "anyOf", + "allOf" + ] + }, + "conditions": { + "type": "array", + "description": "Conditions necessary to hold for the target entity to be mapped", + "items": { + "$ref": "#/components/schemas/MapCondition" + } + }, + "mapping_attributes": { + "type": "array", + "description": "Attribute mappings", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/MappingAttributeV2" + }, + { + "$ref": "#/components/schemas/MappingAttribute" + } + ] + } + }, + "relation_attributes": { + "type": "array", + "description": "Relation mappings", + "items": { + "$ref": "#/components/schemas/RelationAttribute" + } + }, + "linkback_relation_attribute": { + "type": "string", + "default": "mapped_entities", + "description": "Relation attribute on the main entity where the target entity will be linked. Set to false to disable linkback\n" + }, + "linkback_relation_tags": { + "type": "array", + "description": "Relation tags (labels) to include in main entity linkback relation attribute", + "items": { + "type": "string" + } + } + }, + "required": [ + "target_schema", + "mapping_attributes" + ] + }, + "MapCondition": { + "type": "object", + "properties": { + "_exists": { + "$ref": "#/components/schemas/ConditionNode" + }, + "_equals": { + "$ref": "#/components/schemas/ConditionNode" + }, + "_not_exists": { + "$ref": "#/components/schemas/ConditionNode" + }, + "_any_of": { + "$ref": "#/components/schemas/ConditionNode" + } + } + }, + "ConditionNode": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "array", + "items": { + "type": "object" + } + } + ] + } + } + }, + "RelationAttribute": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target attribute to store the relation in" + }, + "target_tags": { + "type": "array", + "description": "Relation tags (labels) to set for the stored relations", + "items": { + "type": "string" + } + }, + "target_tags_include_source": { + "type": "boolean", + "description": "Include all relation tags (labels) present on the main entity relation", + "default": false + }, + "override_with_source_filter": { + "type": "boolean", + "description": "Whether to override the relation source_filter with the specified one", + "default": false + }, + "source_filter": { + "type": "object", + "description": "A filter to identify which source entities to pick as relations from main entity", + "properties": { + "limit": { + "type": "integer", + "description": "Limit relations to maximum number (default, all matched relations)", + "minimum": 0 + }, + "schema": { + "type": "string", + "description": "Filter by specific schema" + }, + "attribute": { + "type": "string", + "description": "Filter by a specific relation attribute on the main entity" + }, + "relation_tag": { + "type": "string", + "description": "Filter by relation tag (label) on the main entity" + }, + "tag": { + "type": "string", + "description": "Filter by a specific tag on the related entity" + }, + "self": { + "type": "boolean", + "description": "Picks main entity as relation (overrides other filters)", + "default": false + } + } + }, + "related_to": { + "type": "object", + "additionalProperties": true, + "deprecated": true + }, + "mode": { + "type": "string", + "enum": [ + "append", + "prepend", + "set" + ] + }, + "origin": { + "$ref": "#/components/schemas/AttributeOrigin" + } + }, + "required": [ + "target", + "mode" + ] + }, + "MappingAttributeV2": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target JSON path for the attribute to set" + }, + "operation": { + "$ref": "#/components/schemas/OperationNode" + }, + "origin": { + "$ref": "#/components/schemas/AttributeOrigin" + } + }, + "required": [ + "target", + "operation" + ], + "example": { + "target": "_tags", + "operation": { + "_append": [ + "new", + "tags" + ], + "_uniq": true + } + } + }, + "AttributeOrigin": { + "type": "string", + "description": "Origin of an attribute.", + "enum": [ + "system_recommendation", + "user_manually", + "entity_updating_system_recommendation" + ] + }, + "OperationNode": { + "description": "Mapping operation nodes are either primitive values or operation node objects", + "oneOf": [ + { + "$ref": "#/components/schemas/OperationObjectNode" + }, + { + "$ref": "#/components/schemas/PrimitiveJSONValue" + } + ] + }, + "OperationObjectNode": { + "type": "object", + "properties": { + "_set": { + "$ref": "#/components/schemas/PrimitiveJSONValue" + }, + "_append": { + "description": "Append to array", + "items": { + "$ref": "#/components/schemas/PrimitiveJSONValue" + } + }, + "_prepend": { + "description": "Prepend to an array", + "items": { + "$ref": "#/components/schemas/OperationNode" + } + }, + "_uniq": { + "description": "Unique array", + "oneOf": [ + { + "type": "boolean", + "example": true + }, + { + "type": "array", + "description": "Unique key consisting of object keys", + "example": [ + "email" + ], + "items": { + "type": "string" + } + } + ] + }, + "_retain_old_values": { + "description": "Merge strategy when _uniq is defined", + "type": "boolean", + "example": true + }, + "_copy": { + "description": "Copy JSONPath value from source entity context", + "type": "string", + "example": "contact.first_name" + }, + "_template": { + "description": "Define handlebars template to output a string", + "type": "string", + "example": "{{contact.first_name}} {{contact.last_name}}" + }, + "_random": { + "description": "Generate random ids / numbers", + "$ref": "#/components/schemas/RandomOperation" + } + }, + "additionalProperties": true + }, + "PrimitiveJSONValue": { + "description": "Represents any primitive JSON value", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "object", + "additionalProperties": true + }, + { + "type": "array" + } + ] + }, + "RandomOperation": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "uuid", + "nanoid" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "number" + ] + }, + "min": { + "type": "number", + "default": 0 + }, + "max": { + "type": "number", + "default": 1 + } + }, + "required": [ + "type" + ] + } + ] + }, + "MappingAttribute": { + "anyOf": [ + { + "$ref": "#/components/schemas/SetValueMapper" + }, + { + "$ref": "#/components/schemas/CopyValueMapper" + }, + { + "$ref": "#/components/schemas/AppendValueMapper" + } + ] + }, + "MappingAttributeMode": { + "type": "string", + "enum": [ + "copy_if_exists", + "append_if_exists", + "set_value" + ], + "description": "- copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property.\n" + }, + "SetValueMapper": { + "type": "object", + "deprecated": true, + "properties": { + "mode": { + "$ref": "#/components/schemas/MappingAttributeMode" + }, + "target": { + "type": "string", + "description": "JSON like target path for the attribute. Eg. last_name" + }, + "value": { + "description": "Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\n" + } + }, + "required": [ + "mode", + "target", + "value" + ] + }, + "CopyValueMapper": { + "type": "object", + "deprecated": true, + "properties": { + "mode": { + "$ref": "#/components/schemas/MappingAttributeMode" + }, + "target": { + "type": "string", + "description": "JSON like target path for the attribute. Eg. last_name" + }, + "source": { + "type": "string", + "description": "JSON source path for the value to be extracted from the main entity. Eg: steps[1].['Product Info'].price\n" + } + }, + "required": [ + "mode", + "target", + "source" + ] + }, + "AppendValueMapper": { + "type": "object", + "deprecated": true, + "properties": { + "mode": { + "$ref": "#/components/schemas/MappingAttributeMode" + }, + "target": { + "type": "string", + "description": "JSON like target path for the attribute. Eg. last_name" + }, + "source": { + "type": "string", + "description": "JSON source path for the value to be extracted from the main entity. Eg: steps[1].['Product Info'].price\n" + }, + "value_json": { + "type": "string", + "description": "To be provided only when mapping json objects into a target attribute. Eg array of addresses.\n" + }, + "target_unique": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\n" + } + }, + "required": [ + "mode", + "target", + "value_json" + ] + }, + "MappingHistoryResp": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingHistoryEntry" + } + } + }, + "required": [ + "results" + ] + }, + "MappingHistoryEntry": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "70542580-2b38-4bfc-af8d-bb90102f9f47" + }, + "timestamp": { + "type": "string", + "format": "ISO datetime" + }, + "source_entity_snapshot": { + "$ref": "#/components/schemas/Entity" + }, + "mapped_entities_snapshot": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Entity" + } + }, + "target_configs_snapshot": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TargetConfig" + } + } + }, + "required": [ + "id", + "timestamp", + "source_entity_snapshot", + "target_configs_snapshot", + "mapped_entities_snapshot" + ] + }, + "MappingSource": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Key aiming to identify source" + }, + "sub_properties": { + "description": "Each item describes a property under the main source and a possibly, a default value for its target attribute", + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingSourceProperty" + } + }, + "source_type": { + "type": "string", + "description": "Data Structure type of source" + }, + "group": { + "type": "string", + "description": "A group this source belongs to. Used for grouping sources in the UI" + }, + "possible_target_types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingSourceTargetType" + }, + "description": "Data Structure Type of the underlaying output value" + }, + "initial_relation": { + "description": "Initial value of a relation to be added", + "$ref": "#/components/schemas/RelationAttribute" + }, + "title": { + "type": "string", + "description": "Human readable name of the Source" + }, + "sub_title": { + "type": "string", + "description": "Human readable type of the source" + }, + "repeatable": { + "type": "boolean", + "description": "Whether the source (block or attribute) is a repeatable, aka holds a list of values" + }, + "target_settings": { + "type": "object", + "properties": { + "allowed_ui_actions": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "schema-select", + "attribute-select", + "target-delete", + "target-add", + "target" + ] + }, + "description": "Describes which actions the user can perform on each target, if specified. If not specified, all actions are allowed" + }, + "locked": { + "type": "string", + "enum": [ + "each", + "first", + "system_recommendation" + ], + "description": "Whether its a read-only ui or not. Can be each target, or only the first. Overwrites uiActions" + }, + "isSingleTarget": { + "type": "boolean", + "description": "Whether all source mappings flow into a single attribute (e.g. address)" + }, + "visibility": { + "description": "Determines whether a mapping target should be shown or not. Use if there are targets which cannot be manipulated by the UI. E.g journey_data", + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "hide", + "show", + "message" + ] + }, + "if": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "message": { + "type": "string" + } + }, + "required": [ + "mode", + "if" + ] + } + } + } + }, + "required": [ + "key", + "title", + "source_type" + ] + }, + "MappingSourceProperty": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + }, + "initial_target_value": { + "type": "string" + }, + "possible_target_types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingSourceTargetType" + }, + "description": "Data Structure Type of the underlaying output value" + }, + "raw": { + "type": "boolean", + "description": "Whether the raw value should be used, or whether the value is enriched by a path" + } + }, + "required": [ + "value", + "label" + ] + }, + "MappingSourceTargetType": { + "type": "string", + "enum": [ + "string", + "date", + "datetime", + "boolean", + "number", + "image", + "file", + "address", + "email", + "phone", + "select", + "multiselect", + "payment", + "link", + "currency", + "sequence", + "relation", + "array" + ] + } + } + }, + "servers": [ + { + "url": "https://entity-mapping.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/entity.json b/packages/cli/definitions/entity.json new file mode 100644 index 00000000..11ea6ae7 --- /dev/null +++ b/packages/cli/definitions/entity.json @@ -0,0 +1,10074 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Entity API", + "version": "2.8.0", + "description": "Flexible data layer for epilot Entities.\n\nUse this API configure and access your business objects like Contacts, Opportunities and Products.\n\n[Feature Documentation](https://docs.epilot.io/docs/entities/flexible-entities)\n" + }, + "tags": [ + { + "name": "Schemas", + "description": "Model Entities" + }, + { + "name": "Entities", + "description": "CRUD Access for Entities" + }, + { + "name": "Relations", + "description": "Entity Relationships" + }, + { + "name": "Activity", + "description": "Entity Events" + }, + { + "name": "Import-Export", + "description": "Import and Export entities via portable files (CSV)" + }, + { + "name": "Saved Views", + "description": "Saved Views for Entities" + }, + { + "name": "Taxonomy", + "description": "Taxonomies and Classifications" + }, + { + "name": "Elastic Cluster Assignment", + "description": "Elastic Cluster assignment for organizations" + }, + { + "name": "Internal", + "description": "Internal APIs" + }, + { + "name": "Public", + "description": "Public" + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "paths": { + "/v1/entity/schemas": { + "get": { + "operationId": "listSchemas", + "summary": "listSchemas", + "description": "Get the latest versions of all schemas", + "parameters": [ + { + "in": "query", + "name": "unpublished", + "description": "Return unpublished draft schemas", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "exclude", + "description": "List of schema slugs to exclude from the results. Accepts a comma-separated list of slugs to exclude from the results.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form", + "explode": false + } + ], + "tags": [ + "Schemas" + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySchemaItem" + } + } + } + } + } + } + } + } + } + }, + "/v1/entity/schemas/{slug}": { + "get": { + "operationId": "getSchema", + "summary": "getSchema", + "description": "By default gets the latest version of the Schema and to get the specific version of schema pass the id.", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "in": "query", + "name": "id", + "schema": { + "$ref": "#/components/schemas/SchemaId" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySchemaItem" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "put": { + "operationId": "putSchema", + "summary": "putSchema", + "description": "Create or update a schema with a new version", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "in": "query", + "name": "draft", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySchema" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySchemaItem" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + }, + "delete": { + "operationId": "deleteSchema", + "summary": "deleteSchema", + "description": "Delete a schema, or a specific version of a schema", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + } + ], + "responses": { + "200": { + "description": "Success" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/schemas/{slug}/json/schema": { + "get": { + "operationId": "getJsonSchema", + "summary": "getJsonSchema", + "description": "Get formal JSON schema definition draft 2020-12 for the given epilot schema", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "in": "query", + "name": "dereference", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "example": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "_id": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true + }, + "_owners": { + "type": "array", + "readOnly": true, + "items": { + "description": "The user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n", + "type": "object", + "properties": { + "org_id": { + "type": "string", + "example": "123" + }, + "user_id": { + "type": "string", + "example": "123" + } + }, + "required": [ + "org_id" + ] + } + }, + "_schema": { + "readOnly": true, + "type": "string" + }, + "_title": { + "readOnly": true, + "type": "string" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the entity", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "_acl": { + "readOnly": true, + "type": "object", + "description": "Access control list (ACL) for an entity. Defines sharing access to external orgs or users.", + "additionalProperties": true, + "properties": { + "view": { + "type": "array", + "items": { + "type": "string", + "example": "org:456" + } + }, + "edit": { + "type": "array", + "items": { + "type": "string", + "example": "org:456" + } + }, + "delete": { + "type": "array", + "items": { + "type": "string", + "example": "org:456" + } + } + } + }, + "title": { + "type": "string", + "nullable": true, + "enum": [ + "Dr.", + "Prof.", + "Prof. Dr.", + null + ] + }, + "salutation": { + "type": "string", + "nullable": true, + "enum": [ + "Mr.", + "Ms. / Mrs.", + "Company", + "Contact Person", + "Company/Contact Person", + "Spouse", + "Family", + "Ownership", + "Assembly", + "Other", + null + ] + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "customer_number": { + "type": "string", + "nullable": true + }, + "birthdate": { + "type": "string", + "format": "date", + "nullable": true + }, + "account": { + "type": "object", + "nullable": true, + "properties": { + "$relation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + "required": [ + "entity_id" + ] + } + } + }, + "additionalProperties": true + }, + "address": { + "type": "array", + "nullable": true, + "description": "Addresses as a list of object, the element with index 0 is treated as the primary one.\n", + "items": { + "type": "object", + "properties": { + "street": { + "type": "string", + "nullable": true + }, + "street_number": { + "type": "string", + "nullable": true + }, + "postal_code": { + "type": "string", + "nullable": true + }, + "city": { + "type": "string", + "nullable": true + }, + "country": { + "type": "string", + "nullable": true, + "enum": [ + "DE", + "AT", + "CH", + null + ] + }, + "additional_info": { + "type": "string", + "nullable": true + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "_id": { + "type": "string", + "example": "xHcOoJCa07eysJ1GaQeSb" + } + }, + "required": [ + "street", + "street_number", + "postal_code", + "city", + "country" + ] + } + }, + "email": { + "type": "array", + "nullable": true, + "description": "Email addresses as a list of object, the element with index 0 is treated as the primary one.\n", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "xHcOoJCa07eysJ1GaQeSb" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "email": { + "type": "string" + } + }, + "required": [ + "email" + ] + } + }, + "phone": { + "type": "array", + "description": "Phone numbers as a list of object, the element with index 0 is treated as the primary one.\n", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "xHcOoJCa07eysJ1GaQeSb" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "phone": { + "type": "string" + } + }, + "required": [ + "phone" + ] + } + } + }, + "required": [ + "first_name", + "last_name", + "_id", + "_org", + "_owners", + "_schema", + "_title", + "_tags", + "_created_at", + "_updated_at", + "_acl" + ] + } + } + } + } + } + } + } + }, + "/v1/entity/schemas/{slug}/json/example": { + "get": { + "operationId": "getSchemaExample", + "summary": "getSchemaExample", + "description": "Get a full example entity for the given schema", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "contact": { + "$ref": "#/components/examples/ContactEntity" + } + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/schemas/{slug}/versions": { + "get": { + "operationId": "getSchemaVersions", + "summary": "getSchemaVersions", + "description": "Get all versions of this schema ordered by the latest versions including drafts.", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "in": "query", + "name": "versions_from", + "schema": { + "type": "number", + "default": 0 + } + }, + { + "in": "query", + "name": "versions_size", + "schema": { + "type": "number", + "default": 20 + } + }, + { + "in": "query", + "name": "drafts_from", + "schema": { + "type": "number", + "default": 0 + } + }, + { + "in": "query", + "name": "drafts_size", + "schema": { + "type": "number", + "default": 0 + } + }, + { + "in": "query", + "name": "fields", + "required": false, + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "id", + "attributes", + "capabilites" + ] + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "versions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySchemaItem" + } + }, + "drafts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySchemaItem" + } + }, + "versions_more": { + "description": "Pagination: Whether more versions are available", + "type": "boolean" + }, + "drafts_more": { + "description": "Pagination: Whether more drafts are available", + "type": "boolean" + } + }, + "required": [ + "versions", + "versions_more" + ] + } + } + } + } + } + } + }, + "/v1/entity/schemas/{slug}/capabilities/available": { + "get": { + "operationId": "listAvailableCapabilities", + "summary": "listAvailableCapabilities", + "description": "List available capabilities for schema", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityCapability" + } + } + } + } + } + } + } + } + } + }, + "/v1/entity/schemas/blueprints": { + "get": { + "operationId": "listSchemaBlueprints", + "summary": "listSchemaBlueprints", + "description": "List canonical versions of all available schemas", + "tags": [ + "Schemas" + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySchemaItem" + } + } + } + } + } + } + } + } + } + }, + "/v1/entity:search": { + "post": { + "operationId": "searchEntities", + "summary": "searchEntities", + "x-rate-limit": { + "limit": 5000, + "window": 60, + "pool": "search" + }, + "description": "Search for entities. Supports ordering and pagination. [Lucene query syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax) supported for complex querying.\n\nPassing comma-separated `x-epilot-org-id` is supported for cross-org entity search.\n\n## Relations\n\nWhen `hydrate=true`, relation attributes are replaced in-place with nested entity values.\n\nExample:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": {\n \"$relation\": [\n { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n ]\n },\n \"addresses\": {\n \"$relation_ref\": [\n { \"entity_id\": \"123\", \"_tags\": [\"primary\"], \"path\": \"address.0\" },\n { \"entity_id\": \"234\", \"_tags\": [\"secondary\"], \"path\": \"address.0\" },\n ]\n }\n}\n```\n\nBecomes:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": [\n {\n \"$relation\": { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n \"_id\": \"456\",\n \"name\": \"child 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation\": { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n \"_id\": \"789\",\n \"name\": \"child 2\",\n \"_tags\": [\"child\"]\n }\n ],\n \"addresses\": [\n {\n \"$relation_ref\": { \"entity_id\": \"123\", \"_tags\": [\"primary\"], \"path\": \"address.0\" },\n \"_id\": \"123\",\n \"address\": \"address 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation_ref\": { \"entity_id\": \"234\", \"_tags\": [\"secondary\"], \"path\": \"address.0\" },\n \"_id\": \"234\",\n \"address\": \"address 2\",\n \"_tags\": [\"child\"]\n }\n ]\n}\n```\n", + "tags": [ + "Entities" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySearchParams" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySearchResults" + } + }, + "text/csv": { + "schema": { + "type": "string" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity:list": { + "post": { + "operationId": "listEntities", + "summary": "listEntities", + "x-rate-limit": { + "limit": 5000, + "window": 60, + "pool": "search" + }, + "description": "List entities that meet the specified conditions.\n\nSupports the same options as entity search but utilizes filtering using a subset of [Elastic Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html) and does not perform scoring.\n", + "tags": [ + "Entities" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityListParams" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySearchResults" + } + }, + "text/csv": { + "schema": { + "type": "string" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity:graph": { + "post": { + "operationId": "queryEntityGraph", + "summary": "queryEntityGraph", + "description": "Traverse an entity relationship graph starting from a seed entity.\n\nDefine the shape of the graph using nodes (entity schemas) and edges (relationships with cardinality).\nThe API will traverse the graph bidirectionally and return all discovered entity IDs.\n\nExample: Find all entities connected to a contact through portal_user -> contact -> billing_account -> files\n", + "tags": [ + "Entities" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GraphQueryRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Graph traversal result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GraphQueryResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequestError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + }, + "/v1/entity/{slug}": { + "post": { + "operationId": "createEntity", + "summary": "createEntity", + "description": "Creates a new entity using a key.\n\n## Activity\n\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityCreated`\n\n## Relations\n\nTo create a relation, store a property object that defines a `$relation` array.\n\nExample:\n\n```json\n{\n \"contacts\": {\n \"$relation\": [\n { \"entity_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\" }\n ]\n }\n}\n```\n\nThe items in `$relation` support two properties:\n- `entity_id` - The ID of the entity to link\n- `_tags` - Tags or labels for the relation (optional)\n", + "tags": [ + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + }, + { + "$ref": "#/components/parameters/FillActivityQueryParam" + }, + { + "$ref": "#/components/parameters/AsyncOperationQueryParam" + }, + { + "$ref": "#/components/parameters/ValidateEntityQueryParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Entity" + }, + "examples": { + "contact": { + "$ref": "#/components/examples/ContactEntity" + }, + "account": { + "$ref": "#/components/examples/AccountEntity" + }, + "product": { + "$ref": "#/components/examples/ProductEntity" + }, + "price": { + "$ref": "#/components/examples/PriceEntity" + }, + "tax": { + "$ref": "#/components/examples/TaxEntity" + }, + "order": { + "$ref": "#/components/examples/OrderEntity" + }, + "opportunity": { + "$ref": "#/components/examples/OpportunityEntity" + }, + "email template": { + "$ref": "#/components/examples/EmailTemplateEntity" + }, + "file": { + "$ref": "#/components/examples/FileEntity" + }, + "workflow step": { + "$ref": "#/components/examples/WorkflowStepEntity" + }, + "submission": { + "$ref": "#/components/examples/SubmissionEntity" + } + } + } + } + }, + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityItem" + } + } + } + }, + "422": { + "description": "Entity validation error when `?validate=true`", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityValidationV2ResultError" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/{slug}:validate": { + "post": { + "operationId": "validateEntity", + "summary": "validateEntity", + "description": "Validates an entity against the schema.", + "tags": [ + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathPriceParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Entity" + }, + "examples": { + "Valid Price": { + "$ref": "#/components/examples/PriceEntity" + }, + "Invalid Price": { + "$ref": "#/components/examples/EmptyGenericEntity" + } + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityValidationResultSuccess" + } + } + } + }, + "422": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityValidationResultError" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v2/entity/{slug}:validate": { + "post": { + "operationId": "validateEntityV2", + "summary": "validateEntityV2", + "description": "Validates an entity against the schema.", + "tags": [ + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathPriceParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Entity" + }, + "examples": { + "Valid Price": { + "$ref": "#/components/examples/PriceEntity" + }, + "Invalid Price": { + "$ref": "#/components/examples/EmptyGenericEntity" + } + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityValidationV2ResultSuccess" + } + } + } + }, + "422": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityValidationV2ResultError" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/{slug}:upsert": { + "patch": { + "operationId": "upsertEntity", + "summary": "upsertEntity", + "description": "Create or update an entity using `unique_key`\n\n- If no entities are matched, a new entity is created.\n- If exactly one entity is matched, a `PATCH`-style update is applied to the existing entity.\n\n## Activity\n\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityCreated` or `EntityUpdated`\n", + "tags": [ + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + }, + { + "$ref": "#/components/parameters/FillActivityQueryParam" + }, + { + "$ref": "#/components/parameters/DryRunQueryParam" + }, + { + "$ref": "#/components/parameters/AsyncOperationQueryParam" + }, + { + "$ref": "#/components/parameters/ValidateEntityQueryParam" + }, + { + "name": "strict", + "description": "Strict mode = return 409 if more than one entity is matched", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "unique_key": { + "type": "array", + "items": { + "type": "string", + "example": "email.0.email" + }, + "example": [ + "_id" + ] + }, + "entity": { + "$ref": "#/components/schemas/Entity" + } + }, + "required": [ + "unique_key", + "entity" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Entity was updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityItem" + } + } + } + }, + "201": { + "description": "Entity was created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityItem" + } + } + } + }, + "405": { + "description": "Deleted entities cannot be updated. You'll need to recover the entity first before updating." + }, + "409": { + "description": "Conflict: multiple entities were matched with `unique_key`" + }, + "422": { + "description": "Entity validation error when `?validate=true`", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityValidationV2ResultError" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v2/entity/{slug}/{id}": { + "get": { + "operationId": "getEntityV2", + "summary": "getEntityV2", + "description": "Gets Entity by id.\n\nSupports `hydrate` and `fields` parameters to control the shape of the response.\n", + "tags": [ + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/HydrateEntitiesQueryParam" + }, + { + "in": "query", + "name": "fields", + "description": "List of entity fields to include in results", + "style": "form", + "explode": false, + "schema": { + "$ref": "#/components/schemas/FieldsParam" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityItem" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + }, + "/v1/entity/{slug}/{id}:restore": { + "patch": { + "operationId": "restoreEntity", + "summary": "restoreEntity", + "description": "Restores an entity by id\n\n## Activity\n\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityRestore`\n", + "tags": [ + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "This endpoint doesn't require a payload, but an empty object can be sent to satisfy certain HTTP clients." + } + } + } + }, + "responses": { + "200": { + "description": "The restored entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityItem" + } + } + } + }, + "400": { + "description": "The entity is not deleted" + }, + "404": { + "description": "The entity was not found" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/{slug}/{id}:reindex": { + "post": { + "operationId": "reindexEntity", + "summary": "reindexEntity", + "description": "Triggers a reindex for the Entity for search.\n", + "tags": [ + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "$ref": "#/components/parameters/EntitySlugPathParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "This endpoint doesn't require a payload, but an empty object can be sent to satisfy certain HTTP clients." + } + } + } + }, + "responses": { + "200": { + "description": "The reindexed entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityItem" + } + } + } + }, + "404": { + "description": "The entity was not found" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + }, + "500": { + "description": "The entity could not be indexed" + } + } + } + }, + "/v1/entity/{slug}/{id}": { + "get": { + "operationId": "getEntity", + "summary": "getEntity", + "description": "Gets Entity and relations by id.\n\n## Relations\n\nWhen `hydrate=true`, relation attributes are replaced in-place with nested entity values.\n\nExample:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": {\n \"$relation\": [\n { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n ]\n },\n \"addresses\": {\n \"$relation_ref\": [\n { \"entity_id\": \"123\", \"_tags\": [\"primary\"], \"path\": \"address.0\" },\n { \"entity_id\": \"234\", \"_tags\": [\"secondary\"], \"path\": \"address.0\" },\n ]\n }\n}\n```\n\nBecomes:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": [\n {\n \"$relation\": { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n \"_id\": \"456\",\n \"name\": \"child 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation\": { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n \"_id\": \"789\",\n \"name\": \"child 2\",\n \"_tags\": [\"child\"]\n }\n ],\n \"addresses\": [\n {\n \"$relation_ref\": { \"entity_id\": \"123\", \"_tags\": [\"primary\"], \"path\": \"address.0\" },\n \"_id\": \"123\",\n \"address\": \"address 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation_ref\": { \"entity_id\": \"234\", \"_tags\": [\"secondary\"], \"path\": \"address.0\" },\n \"_id\": \"234\",\n \"address\": \"address 2\",\n \"_tags\": [\"child\"]\n }\n ]\n}\n```\n", + "tags": [ + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/HydrateEntitiesQueryParam" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/EntityItem" + }, + "relations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityItem" + } + } + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "put": { + "operationId": "updateEntity", + "summary": "updateEntity", + "description": "Updates an Entity\n\n## Activity\n\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityUpdated`\n\n## Relations\n\nTo create a relation, store a property that defines a `$relation` array.\n\nExample:\n\n```json\n{\n \"contacts\": {\n \"$relation\": [\n { \"entity_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\" }\n ]\n }\n}\n```\n\nThe items in `$relation` support two properties:\n- `entity_id` - The ID of the entity to link\n- `_tags` - Tags or labels for the relation (optional)\n", + "tags": [ + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + }, + { + "$ref": "#/components/parameters/FillActivityQueryParam" + }, + { + "$ref": "#/components/parameters/AsyncOperationQueryParam" + }, + { + "$ref": "#/components/parameters/ValidateEntityQueryParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Entity" + }, + "example": {} + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityItem" + } + } + } + }, + "422": { + "description": "Entity validation error when `?validate=true`", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityValidationV2ResultError" + } + } + } + } + } + }, + "patch": { + "operationId": "patchEntity", + "summary": "patchEntity", + "description": "Partially updates an entity with the passed in entity data.\n\n- If an _updated_at is passed and the server contains a newer version of the entity a `409` Error is returned\n\n## Activity\n\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityUpdated`\n\n## Relations\n\nTo create a relation, store a property that defines a `$relation` array.\n\nExample:\n\n```json\n{\n \"contacts\": {\n \"$relation\": [\n { \"entity_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\" }\n ]\n }\n}\n```\n\nThe items in `$relation` support two properties:\n- `entity_id` - The ID of the entity to link\n- `_tags` - Tags or labels for the relation (optional)\n", + "tags": [ + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + }, + { + "$ref": "#/components/parameters/FillActivityQueryParam" + }, + { + "$ref": "#/components/parameters/DryRunQueryParam" + }, + { + "$ref": "#/components/parameters/AsyncOperationQueryParam" + }, + { + "$ref": "#/components/parameters/ValidateEntityQueryParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Entity" + }, + "example": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Entity was updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityItem" + } + } + } + }, + "409": { + "description": "Conflict: newer version exists" + }, + "422": { + "description": "Entity validation error when `?validate=true`", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityValidationV2ResultError" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteEntity", + "summary": "deleteEntity", + "description": "Deletes an Entity\n\n## Activity\n\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityDeleted`\n\n## Deletion Mode\n\nAll entities are soft deleted by default. To force an actual deletion from the system, provide `purge:true` to delete the entity and all its activity history permanently.\n", + "tags": [ + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + }, + { + "in": "query", + "name": "purge", + "description": "Permanently deletes the entity when set to `true`", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Success" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity:autocomplete": { + "get": { + "operationId": "autocomplete", + "summary": "autocomplete", + "description": "Autocomplete entity attributes\n", + "tags": [ + "Entities" + ], + "parameters": [ + { + "name": "input", + "in": "query", + "description": "Input to autocomplete", + "schema": { + "type": "string" + } + }, + { + "name": "attribute", + "in": "query", + "description": "Autocomplete attribute", + "schema": { + "type": "string", + "example": "_tags" + }, + "required": true + }, + { + "name": "slug", + "in": "query", + "description": "Limit results to entity schema", + "schema": { + "$ref": "#/components/schemas/EntitySlug" + } + }, + { + "name": "size", + "in": "query", + "description": "Maximum number of results to return", + "schema": { + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 250 + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hits": { + "type": "number", + "example": 1 + }, + "results": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": true + } + ] + }, + "example": [ + "value" + ] + } + } + } + } + } + } + } + } + }, + "/v1/entity:wipeAllEntities": { + "post": { + "operationId": "wipeAllEntities", + "summary": "wipeAllEntities", + "description": "Creates a request to queue the deletion of all entities in the system. This is a destructive operation and should only be used in sandbox environments.\n", + "tags": [ + "Entities" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schemas": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySlug" + } + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Wipe request was created" + } + } + } + }, + "/v1/entity/activity": { + "post": { + "operationId": "createActivity", + "summary": "createActivity", + "description": "Create an activity that can be displayed in activity feeds.\n\n- All activites are published as events on the event bus\n- Entity mutations are always part of an activity\n", + "tags": [ + "Activity" + ], + "parameters": [ + { + "in": "query", + "name": "entities", + "description": "Comma-separated list of entities which the activity primarily concerns", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + } + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Activity" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseActivityItem" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/activity/{id}": { + "get": { + "operationId": "getActivity", + "summary": "getActivity", + "description": "Get activity by id", + "tags": [ + "Activity" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ActivityIdPathParam" + }, + { + "in": "query", + "name": "operations_size", + "description": "Maximum number of operations to include in response (default: 10)\n", + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 1000, + "default": 25 + } + }, + { + "in": "query", + "name": "operations_from", + "description": "Pagination offset for operations\n", + "schema": { + "type": "integer", + "minimum": 0, + "default": 0 + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityItem" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + }, + "/v1/entity/activity/{id}:attach": { + "post": { + "operationId": "attachActivity", + "summary": "attachActivity", + "description": "Attach existing activity to entity activity feeds", + "tags": [ + "Activity" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ActivityIdPathParam" + }, + { + "in": "query", + "name": "entities", + "description": "Comma-separated list of entities which the activity primarily concerns", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + } + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseActivityItem" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/{slug}/{id}/activity": { + "get": { + "operationId": "getEntityActivityFeed", + "summary": "getEntityActivityFeed", + "description": "Get activity feed for an entity\n", + "tags": [ + "Activity" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "in": "query", + "name": "after", + "description": "Get activities strictly after this timestamp. Cannot be used with 'before', 'start_date', 'end_date', or 'preset_range'.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "in": "query", + "name": "before", + "description": "Get activities strictly before this timestamp. Cannot be used with 'after', 'start_date', 'end_date', or 'preset_range'.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "in": "query", + "name": "start_date", + "description": "The inclusive start timestamp for a date range filter. Requires 'end_date' to also be provided. Cannot be used with 'before', 'after', or 'preset_range'.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "in": "query", + "name": "end_date", + "description": "The inclusive end timestamp for a date range filter. Requires 'start_date' to also be provided. Cannot be used with 'before', 'after', or 'preset_range'.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "in": "query", + "name": "preset_range", + "description": "Get activities within a predefined date range (e.g., 'today', 'last_week'). Cannot be used with 'before', 'after', 'start_date', or 'end_date'.", + "schema": { + "type": "string", + "example": "last_week", + "enum": [ + "today", + "this_week", + "last_week" + ] + } + }, + { + "$ref": "#/components/parameters/FromPageQueryParam" + }, + { + "in": "query", + "name": "size", + "description": "max number of results to return", + "schema": { + "type": "integer", + "minimum": 1, + "default": 25 + } + }, + { + "in": "query", + "name": "type", + "description": "Filter by activity type(s)", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "EntityUpdated", + "EntityCreated" + ] + } + }, + { + "in": "query", + "name": "include_relations", + "description": "Include activities from related entities", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "exclude_activity_groups", + "description": "Exclude all activity types that are part of an activity group from results", + "schema": { + "type": "string", + "example": "workflow" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "example": 1 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityItem" + } + } + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + }, + "/v1/entity/{slug}/{id}/relations": { + "get": { + "operationId": "getRelations", + "summary": "getRelations", + "description": "Returns 1st level direct relations for an entity.\n\nYou can control whether to return the full entity or just the relation item with the `?hydrate` query param.\n\nReverse relations i.e. entities referring to this entity are included with the `?include_reverse` query param.\n", + "tags": [ + "Relations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "$ref": "#/components/parameters/HydrateEntitiesQueryParam" + }, + { + "$ref": "#/components/parameters/IncludeReverseQueryParam" + }, + { + "$ref": "#/components/parameters/FromPageQueryParam" + }, + { + "in": "query", + "name": "size", + "description": "Number of results to return per page", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 100 + } + }, + { + "$ref": "#/components/parameters/IncludeSchemasQueryParam" + }, + { + "$ref": "#/components/parameters/ExcludeSchemasQueryParam" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRelationsResp" + }, + "example": [ + { + "attribute": "contacts", + "entity_id": "ed27830b-984c-4bca-9b87-2849bb5789ca", + "_tags": [ + "primary", + "billing" + ] + }, + { + "attribute": "contacts", + "entity_id": "fadfc950-6e43-4e38-bae0-ffcf4b8b90e1" + }, + { + "_id": "9924c4de-d3ed-4752-821d-fc0b9bd57c1b", + "_title": "John Doe", + "attribute": "contacts", + "entity_id": "9924c4de-d3ed-4752-821d-fc0b9bd57c1b", + "order_number": "a34234jd", + "customer_email": "johndoe@epilot.cloud", + "billing_first_name": "john", + "billing_last_name": "doe", + "billing_company_name": "ePilot Gmbh", + "billing_vat": "234823948,", + "billing_email": "johndoe@nowhere.com", + "billing_phone": "1234234545,", + "billing_address": "wallstreet, 1", + "billing_contact": "villy or zilly", + "$relation": { + "attribute": "orders", + "entity_id": "9924c4de-d3ed-4752-821d-fc0b9bd57c1b", + "_tags": [ + "solar_panel", + "one_time" + ] + } + } + ] + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "post": { + "operationId": "addRelations", + "summary": "addRelations", + "description": "Relates one or more entities to parent entity by adding items to a relation attribute", + "tags": [ + "Relations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "$ref": "#/components/parameters/AsyncOperationQueryParam" + }, + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RelationItem" + } + }, + "example": [ + { + "attribute": "contacts", + "entity_id": "e8878f62-2d3d-4c86-bfe7-01a4180ff048", + "_tags": [ + "billing" + ] + }, + { + "attribute": "contacts", + "entity_id": "ee8a2af9-fb36-4981-b848-4e65275851af" + }, + { + "attribute": "opportunities", + "entity_id": "30990430-a53d-41a2-83db-2de072dc4dd4" + } + ] + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RelationItem" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "delete": { + "operationId": "removeRelations", + "summary": "removeRelations", + "description": "Disassociate one or more entities to parent entity by removing items to a relation attribute", + "tags": [ + "Relations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "$ref": "#/components/parameters/AsyncOperationQueryParam" + }, + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RelationItem" + } + }, + "example": [ + { + "attribute": "contacts", + "entity_id": "e8878f62-2d3d-4c86-bfe7-01a4180ff048", + "_tags": [ + "billing" + ] + }, + { + "attribute": "contacts", + "entity_id": "ee8a2af9-fb36-4981-b848-4e65275851af" + }, + { + "attribute": "opportunities", + "entity_id": "30990430-a53d-41a2-83db-2de072dc4dd4" + } + ] + } + } + }, + "responses": { + "204": { + "description": "Relations deleted with success." + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v2/entity/{slug}/{id}/relations": { + "get": { + "operationId": "getRelationsV2", + "summary": "getRelationsV2", + "description": "Returns 1st level direct relations for an entity with pagination.\n\nYou can control whether to return the full entity or just the relation item with the `?hydrate` query param.\n\nReverse relations i.e. entities referring to this entity are included with the `?include_reverse` query param.\n", + "tags": [ + "Relations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "$ref": "#/components/parameters/HydrateEntitiesQueryParam" + }, + { + "in": "query", + "name": "query", + "description": "Input to filter search results", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/IncludeReverseQueryParam" + }, + { + "$ref": "#/components/parameters/FromPageQueryParam" + }, + { + "in": "query", + "name": "size", + "description": "Number of results to return per page", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 50 + } + }, + { + "in": "query", + "name": "fields", + "description": "List of entity fields to include in results", + "schema": { + "$ref": "#/components/schemas/FieldsParam" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRelationsRespWithPagination" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + }, + "/v3/entity/{slug}/{id}/relations": { + "get": { + "operationId": "getRelationsV3", + "summary": "getRelationsV3", + "description": "Returns 1st level direct relations for an entity with pagination.\n\nYou can control whether to return the full entity or just the relation item with the `?hydrate` query param.\n\nReverse relations i.e. entities referring to this entity are included with the `?include_reverse` query param.\n", + "tags": [ + "Relations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "$ref": "#/components/parameters/HydrateEntitiesQueryParam" + }, + { + "$ref": "#/components/parameters/IncludeReverseDeprecatedQueryParam" + }, + { + "$ref": "#/components/parameters/FromPageQueryParam" + }, + { + "in": "query", + "name": "size", + "description": "Number of results to return per page", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 100 + } + }, + { + "$ref": "#/components/parameters/IncludeSchemasQueryParam" + }, + { + "$ref": "#/components/parameters/ExcludeSchemasQueryParam" + }, + { + "$ref": "#/components/parameters/EntityRelationsModeQueryParam" + }, + { + "in": "query", + "name": "fields", + "description": "List of entity fields to include in results", + "schema": { + "$ref": "#/components/schemas/FieldsParam" + } + }, + { + "in": "query", + "name": "include_deleted", + "description": "Whether to include relations to/from deleted entities\n- `true`: include relations to/from deleted entities\n- `false`: exclude relations to/from deleted entities (default)\n- `only`: include only relations to/from deleted entities\n", + "required": false, + "schema": { + "$ref": "#/components/schemas/EntitySearchIncludeDeletedParam" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRelationsRespWithPagination" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + }, + "/v2/entity/{slug}/{id}/relations/count": { + "get": { + "operationId": "getRelatedEntitiesCount", + "summary": "getRelatedEntitiesCount", + "description": "Returns the amount of unique related entities for an entity - includes direct and reverse relations.\n", + "tags": [ + "Relations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "$ref": "#/components/parameters/ExcludeSchemasQueryParam" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRelatedEntitiesCount" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + }, + "/v1/entity/{slug}/{id}/relations/{attribute}/{entity_id}": { + "put": { + "operationId": "updateRelation", + "summary": "updateRelation", + "description": "Updates an existing relation between two entities.", + "tags": [ + "Relations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "in": "path", + "name": "attribute", + "description": "The attribute that express meaning", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "entity_id", + "description": "The attribute that express meaning", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/AsyncOperationQueryParam" + }, + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "example": { + "_tags": [ + "billing", + "prepaid" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RelationItem" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "delete": { + "operationId": "deleteRelation", + "summary": "deleteRelation", + "description": "Removes relation between two entities", + "tags": [ + "Relations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "in": "path", + "name": "attribute", + "description": "The attribute that express meaning", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "entity_id", + "description": "The attribute that express meaning", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/AsyncOperationQueryParam" + }, + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + } + ], + "responses": { + "204": { + "description": "Relation deleted with success." + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity:export": { + "post": { + "operationId": "exportEntities", + "summary": "exportEntities", + "description": "Export entity data in a CSV-format. The export will export data as close as possible to what is visible on Entity UI tables.\nThe values exported as in some cases, transformed to human-readable values.\n\nTo force the export of raw values, use the `#` prefix in front of your field name when specifying the field on the `fields` param.\n", + "tags": [ + "Import-Export" + ], + "parameters": [ + { + "in": "query", + "name": "job_id", + "description": "Export Job Id to get the result", + "schema": { + "$ref": "#/components/schemas/ExportJobId" + } + }, + { + "in": "query", + "name": "is_template", + "description": "Pass 'true' to generate import template", + "schema": { + "$ref": "#/components/schemas/IsTemplate" + } + }, + { + "in": "query", + "name": "language", + "description": "Export headers translation language", + "schema": { + "$ref": "#/components/schemas/Language" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySearchParams" + } + } + } + }, + "responses": { + "201": { + "description": "created export url and download url" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity:import": { + "post": { + "operationId": "importEntities", + "summary": "Import Entities", + "description": "This endpoint enables the import of entities into the platform.\nThe entities should be provided in a CSV format inside an S3 bucket.\nThis API will return the `job_id`` which can be used to fetch the status of the import process.\n", + "tags": [ + "Import-Export" + ], + "parameters": [ + { + "in": "query", + "name": "job_id", + "description": "The ID of the import job. This ID is used to track the progress and fetch the result of the import operation.", + "schema": { + "$ref": "#/components/schemas/ExportJobId" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityImportParams" + } + } + } + }, + "responses": { + "201": { + "description": "The import operation was initiated successfully.\nThe response includes the URLs for the files containing the successful and failed imported entities.\n" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/views": { + "get": { + "operationId": "listSavedViews", + "summary": "listSavedViews", + "description": "Get the Saved Views based on the schema", + "tags": [ + "Saved Views" + ], + "parameters": [ + { + "in": "query", + "name": "slug", + "description": "Return views belonging to this schema", + "required": false, + "schema": { + "$ref": "#/components/schemas/EntitySlug" + } + }, + { + "in": "query", + "name": "sort", + "description": "The sort key to use if present", + "required": false, + "schema": { + "type": "string", + "default": "name:asc" + } + }, + { + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "default": 0 + } + }, + { + "in": "query", + "name": "size", + "description": "Number of saved views to return", + "required": false, + "schema": { + "type": "integer", + "default": 80, + "minimum": 1, + "maximum": 250 + } + }, + { + "in": "query", + "name": "fields", + "required": false, + "schema": { + "$ref": "#/components/schemas/FieldsParam" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListSavedViewsResults" + } + } + } + } + } + } + }, + "/v1/entity/view": { + "post": { + "operationId": "createSavedView", + "summary": "createSavedView", + "description": "Creates a new saved view", + "tags": [ + "Saved Views" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SavedView" + } + } + } + }, + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SavedViewItem" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/view/{id}": { + "get": { + "operationId": "getSavedView", + "summary": "getSavedView", + "description": "Gets Saved View configuration by id.", + "tags": [ + "Saved Views" + ], + "parameters": [ + { + "$ref": "#/components/parameters/SavedViewIdPathParam" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SavedViewItem" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "put": { + "operationId": "updateSavedView", + "summary": "updateSavedView", + "description": "Updates a saved view", + "tags": [ + "Saved Views" + ], + "parameters": [ + { + "$ref": "#/components/parameters/SavedViewIdPathParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SavedViewItem" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SavedViewItem" + } + } + } + } + } + }, + "patch": { + "operationId": "patchSavedView", + "summary": "patchSavedView", + "description": "Partially updates a saved view with the provided payload. If an updated_at is passed and the server contains a newer version of the view a `409` error is returned", + "tags": [ + "Saved Views" + ], + "parameters": [ + { + "$ref": "#/components/parameters/SavedViewIdPathParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SavedViewPartial" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SavedViewItem" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteSavedView", + "summary": "deleteSavedView", + "description": "Deletes a saved view", + "parameters": [ + { + "$ref": "#/components/parameters/SavedViewIdPathParam" + } + ], + "tags": [ + "Saved Views" + ], + "responses": { + "200": { + "description": "List of all available saved views" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/views/favorites": { + "get": { + "operationId": "listFavoriteViewsForUser", + "summary": "listFavoriteViewsForUser", + "description": "Get the Favorite Saved Views for user based on the schema", + "tags": [ + "Saved Views" + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SavedViewItem" + } + } + } + } + } + } + } + } + } + }, + "/v1/entity/taxonomies": { + "get": { + "operationId": "listTaxonomies", + "summary": "listTaxonomies", + "description": "List taxonomies in an organization", + "parameters": [ + { + "in": "query", + "name": "include_disabled", + "description": "Include disabled taxonomies", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "type", + "description": "Type of taxonomy to include", + "schema": { + "type": "string", + "enum": [ + "entity", + "relation" + ], + "default": "entity" + } + } + ], + "tags": [ + "Taxonomy" + ], + "responses": { + "200": { + "description": "Returns list of taxonomies in an organization", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Taxonomy" + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createTaxonomy", + "summary": "createTaxonomy", + "description": "Create a new taxonomy", + "tags": [ + "Taxonomy" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Taxonomy" + } + } + } + }, + "responses": { + "201": { + "description": "Taxonomy created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Taxonomy" + } + } + } + }, + "409": { + "description": "Taxonomy already exists" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/taxonomies/{taxonomySlug}": { + "get": { + "operationId": "getTaxonomy", + "summary": "getTaxonomy", + "description": "Get taxonomy by slug", + "tags": [ + "Taxonomy" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TaxonomySlugPathParam" + } + ], + "responses": { + "200": { + "description": "Taxonomy", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Taxonomy" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "put": { + "operationId": "updateTaxonomy", + "summary": "updateTaxonomy", + "description": "Update a taxonomy", + "tags": [ + "Taxonomy" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TaxonomySlugPathParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Taxonomy" + } + } + } + }, + "responses": { + "200": { + "description": "Taxonomy updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Taxonomy" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteTaxonomy", + "summary": "deleteTaxonomy", + "description": "Delete a taxonomy", + "tags": [ + "Taxonomy" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TaxonomySlugPathParam" + }, + { + "in": "query", + "x-implemented": false, + "name": "permanent", + "description": "⚠️ NOT IMPLEMENTED - If true, the taxonomy will be permanently deleted", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "204": { + "description": "Taxonomy deleted" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/taxonomies/{taxonomySlug}/classifications": { + "post": { + "operationId": "updateClassificationsForTaxonomy", + "summary": "updateClassificationsForTaxonomy", + "description": "Update the classifications for a taxonomy", + "tags": [ + "Taxonomy" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TaxonomySlugPathParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClassificationsUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Taxonomies classifications", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "created": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomyClassification" + } + }, + "updated": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomyClassification" + } + }, + "deleted": { + "type": "object", + "items": { + "$ref": "#/components/schemas/ClassificationId" + } + } + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v2/entity/taxonomies/classifications": { + "post": { + "operationId": "createTaxonomyClassification", + "summary": "createTaxonomyClassification", + "description": "Create a new classification for a taxonomy\n", + "tags": [ + "Taxonomy" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaxonomyClassification" + } + } + } + }, + "responses": { + "201": { + "description": "Created taxonomy classification", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaxonomyClassification" + } + } + } + }, + "409": { + "description": "Taxonomy classification already exists" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v2/entity/taxonomies/classifications/{classificationSlug}": { + "get": { + "operationId": "getTaxonomyClassification", + "summary": "getTaxonomyClassification", + "description": "Get a classification for a taxonomy by slug\n\nFor backwards compatibility with purposes, you can also pass the classification id instead of the slug.\n", + "tags": [ + "Taxonomy" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TaxonomyClassificationSlugPathParam" + } + ], + "responses": { + "200": { + "description": "Taxonomy classification", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaxonomyClassification" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "put": { + "operationId": "updateTaxonomyClassification", + "summary": "updateTaxonomyClassification", + "description": "Update a classification for a taxonomy", + "tags": [ + "Taxonomy" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TaxonomyClassificationSlugPathParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaxonomyClassification" + } + } + } + }, + "responses": { + "200": { + "description": "Taxonomy classification updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaxonomyClassification" + } + } + } + }, + "404": { + "description": "Taxonomy classification not found" + } + } + }, + "delete": { + "operationId": "deleteTaxonomyClassification", + "summary": "deleteTaxonomyClassification", + "description": "Delete a classification for a taxonomy", + "tags": [ + "Taxonomy" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TaxonomyClassificationSlugPathParam" + } + ], + "responses": { + "200": { + "description": "Taxonomy classification deleted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaxonomyClassification" + } + } + } + }, + "403": { + "description": "Taxonomy classification deletion not allowed" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/taxonomies/{taxonomySlug}:autocomplete": { + "get": { + "operationId": "taxonomyAutocomplete", + "summary": "taxonomyAutocomplete", + "description": "Taxonomies autocomplete", + "tags": [ + "Taxonomy" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TaxonomySlugPathParam" + }, + { + "in": "query", + "name": "query", + "description": "Input to autocomplete", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "size", + "description": "Minimum number of results to return", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Taxonomy classifications", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomyClassification" + } + } + } + } + } + } + } + } + } + }, + "/v1/entity/taxonomies/classifications:search": { + "post": { + "operationId": "taxonomiesClassificationsSearch", + "summary": "taxonomiesClassificationsSearch", + "description": "List taxonomy classifications in an organization based on taxonomy slug", + "tags": [ + "Taxonomy" + ], + "parameters": [ + { + "in": "query", + "name": "taxonomySlug", + "description": "The taxonomy slug(s) to search within. When provided with multiple taxonomy slugs, the search will be performed across all the provided taxonomies.\n", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + { + "in": "query", + "name": "query", + "description": "The label names to search for (lowercase insensitive)", + "schema": { + "type": "string", + "example": "sales" + } + }, + { + "in": "query", + "name": "archived", + "description": "Filter by archived status. Deprecated. Use `include_archived` instead.", + "deprecated": true, + "schema": { + "type": "boolean", + "example": false + } + }, + { + "in": "query", + "name": "include_archived", + "schema": { + "$ref": "#/components/schemas/TaxonomySearchIncludeArchivedParam" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "classificationIds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassificationIdOrPattern" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Returns the classifications for the taxonomy slug provided", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomyClassification" + } + }, + "hits": { + "type": "integer", + "example": 10 + } + } + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/schemas/{slug}/taxonomy/{taxonomySlug}": { + "get": { + "operationId": "listTaxonomyClassificationsForSchema", + "summary": "listTaxonomyClassificationsForSchema", + "description": "List taxonomy classifications for a given schema", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntitySlugPathParam" + }, + { + "$ref": "#/components/parameters/TaxonomySlugPathParam" + }, + { + "in": "query", + "name": "query", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "size", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "List of taxonomy classifications", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomyClassification" + } + } + } + } + } + } + } + } + } + }, + "/v1/entity/taxonomies/bulk-jobs": { + "get": { + "operationId": "getTaxonomyBulkActionJobs", + "summary": "getTaxonomyBulkActionJobs", + "description": "Gets bulk actions jobs by job status:\n- = all active jobs\n- PENDING = all active jobs\n- FAILED = all failed jobs\n- COMPLETED = all completed jobs\n", + "tags": [ + "Taxonomy" + ], + "parameters": [ + { + "in": "query", + "description": "The status of the jobs to return", + "name": "status", + "schema": { + "description": "A comma separated list of job statuses to return", + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "size", + "schema": { + "description": "The maximum number of jobs to return (defaults to 20)", + "type": "number", + "default": 20 + } + }, + { + "in": "query", + "name": "created_after", + "schema": { + "description": "ISO 8601 timestamp to filter jobs created after this time (e.g., 2023-01-01T00:00:00Z).", + "type": "string", + "format": "date-time", + "example": "2023-01-01T00:00:00.000Z" + } + }, + { + "in": "query", + "name": "sort_pending_first", + "schema": { + "description": "When true, sorts PENDING status jobs to the top of the results.", + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "scope", + "schema": { + "description": "Scope of jobs to return. 'me' returns only jobs created by the current user, 'all' returns jobs from all users in the organization.", + "type": "string", + "enum": [ + "me", + "all" + ], + "default": "me" + } + } + ], + "responses": { + "200": { + "description": "Returns the jobs matching the given query or the active jobs if no status is provided", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomyBulkJob" + } + } + } + } + } + } + } + }, + "/v1/entity/taxonomies/bulk-jobs/{job_id}": { + "get": { + "operationId": "getTaxonomyBulkActionJobById", + "summary": "getTaxonomyBulkActionJobById", + "description": "Gets a bulk action job by job id", + "tags": [ + "Taxonomy" + ], + "parameters": [ + { + "in": "path", + "name": "job_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns the job matching the given job id", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaxonomyBulkJob" + } + } + } + } + } + } + }, + "/v1/entity/taxonomies/bulk-jobs/{job_id}/cancel": { + "post": { + "operationId": "cancelBulkAction", + "summary": "cancelBulkAction", + "description": "Cancels a running bulk action job. The job status will be updated to CANCELLED\nand the job will be stopped.\n", + "tags": [ + "Taxonomy" + ], + "parameters": [ + { + "name": "job_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Job ID of the bulk operation to cancel" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaxonomyBulkJob" + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/v1/entity/taxonomies/classifications:move": { + "post": { + "operationId": "bulkMoveClassifications", + "summary": "bulkMoveClassifications", + "description": "Moves classifications from one taxonomy to another, through a bulk async operation which\nalso updates all references from the old classification to the new one under the target taxonomy.\n", + "tags": [ + "Taxonomy" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "job_id": { + "description": "Job ID for tracking the status of a bulk operation request", + "type": "string" + }, + "target_taxonomy": { + "allOf": [ + { + "description": "The target taxonomy to which the classifications will be moved" + }, + { + "$ref": "#/components/schemas/TaxonomySlug" + } + ] + }, + "classification_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassificationId" + } + } + } + }, + "example": { + "classification_ids": [ + "taxonomy-slug:classification-slug" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Returns the job id for the async job and current status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaxonomyBulkJobTriggerResponse" + }, + "example": { + "job_id": "5684fcb1-62ef-45e4-9187-ebf96dcbff12", + "status": "PENDING" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/taxonomies/classifications:merge": { + "post": { + "operationId": "bulkMergeClassifications", + "summary": "bulkMergeClassifications", + "description": "Merges classifications from one taxonomy into one individual classification, through a bulk async operation which\nalso updates all references from the old Classifications to the new one.\n", + "tags": [ + "Taxonomy" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "job_id": { + "description": "Job ID for tracking the status of a bulk operation request", + "type": "string" + }, + "target_classification": { + "allOf": [ + { + "description": "The target classification id to which the classifications will be merged into" + }, + { + "$ref": "#/components/schemas/TaxonomySlug" + } + ] + }, + "classification_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassificationId" + } + } + } + }, + "example": { + "classification_ids": [ + "taxonomy-slug:classification-slug" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Returns the job id for the async job and current status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaxonomyBulkJobTriggerResponse" + }, + "example": { + "job_id": "5684fcb1-62ef-45e4-9187-ebf96dcbff12", + "status": "PENDING" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/taxonomies/classifications:delete": { + "post": { + "operationId": "bulkDeleteClassifications", + "summary": "bulkDeleteClassifications", + "description": "Permanently deletes taxonomy classifications. The classifications are deleted through a bulk\nasync operation which also deletes all references of the deleted classifications from the entities\nreferencing them.\n", + "tags": [ + "Taxonomy" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "job_id": { + "description": "Job ID for tracking the status of a bulk operation request", + "type": "string" + }, + "classification_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassificationId" + } + } + } + }, + "example": { + "classification_ids": [ + "taxonomy-slug:classification-slug" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Returns the job id for the async job and current status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaxonomyBulkJobTriggerResponse" + }, + "example": { + "job_id": "5684fcb1-62ef-45e4-9187-ebf96dcbff12", + "status": "PENDING" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/schemas/attributes": { + "post": { + "operationId": "createSchemaAttribute", + "summary": "createSchemaAttribute", + "description": "Create a schema attribute", + "tags": [ + "Schemas" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttributeWithCompositeID" + } + } + } + }, + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttributeWithCompositeID" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/schemas/attributes/{composite_id}": { + "get": { + "operationId": "getSchemaAttribute", + "summary": "getSchemaAttribute", + "description": "Get a schema attribute from given attribute ID", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "name": "composite_id", + "description": "Schema Slug and the Attribute ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+:.+$", + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttributeWithCompositeID" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "put": { + "operationId": "putSchemaAttribute", + "summary": "putSchemaAttribute", + "description": "Updates an attribute in the schema", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "name": "composite_id", + "description": "Schema Slug and the Attribute ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+:.+$", + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttributeWithCompositeID" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttributeWithCompositeID" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteSchemaAttribute", + "summary": "deleteSchemaAttribute", + "description": "Deletes an attribute from a schema", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "name": "composite_id", + "description": "Schema Slug and the Attribute ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+:.+$", + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttributeWithCompositeID" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/schemas/capabilities": { + "post": { + "operationId": "createSchemaCapability", + "summary": "createSchemaCapability", + "description": "Create a schema capability", + "tags": [ + "Schemas" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityCapabilityWithCompositeID" + } + } + } + }, + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityCapabilityWithCompositeID" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/schemas/capabilities/{composite_id}": { + "get": { + "operationId": "getSchemaCapability", + "summary": "getSchemaCapability", + "description": "Get a schema capability from given capability ID", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "name": "composite_id", + "description": "Schema Slug and the Attribute ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+:.+$", + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityCapabilityWithCompositeID" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "put": { + "operationId": "putSchemaCapability", + "summary": "putSchemaCapability", + "description": "Adds or updates an capability in the schema", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "name": "composite_id", + "description": "Schema Slug and the Attribute ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+:.+$", + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityCapabilityWithCompositeID" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityCapabilityWithCompositeID" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteSchemaCapability", + "summary": "deleteSchemaCapability", + "description": "Deletes a Capability from a schema", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "name": "composite_id", + "description": "Schema Slug and the Attribute ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+:.+$", + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityCapabilityWithCompositeID" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/schemas/group": { + "post": { + "operationId": "createSchemaGroup", + "summary": "createSchemaGroup", + "description": "Create a schema group", + "tags": [ + "Schemas" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySchemaGroupWithCompositeID" + } + } + } + }, + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySchemaGroupWithCompositeID" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/schemas/group/{composite_id}": { + "get": { + "operationId": "getSchemaGroup", + "summary": "getSchemaGroup", + "description": "Get a schema group from given group composite ID", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "name": "composite_id", + "description": "Schema Slug and the Group ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+:.+$", + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySchemaGroupWithCompositeID" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "put": { + "operationId": "putSchemaGroup", + "summary": "putSchemaGroup", + "description": "Adds or updates an capability in the schema", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "name": "composite_id", + "description": "Schema Slug and the Group ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+:.+$", + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySchemaGroupWithCompositeID" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySchemaGroupWithCompositeID" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteSchemaGroup", + "summary": "deleteSchemaGroup", + "description": "Deletes a Capability from a schema", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "name": "composite_id", + "description": "Schema Slug and the Group ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+:.+$", + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitySchemaGroupWithCompositeID" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/schemas/headline": { + "post": { + "operationId": "createSchemaGroupHeadline", + "summary": "createSchemaGroupHeadline", + "description": "Create a headline in a schema group", + "tags": [ + "Schemas" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupHeadlineWithCompositeID" + } + } + } + }, + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupHeadlineWithCompositeID" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + }, + "/v1/entity/schemas/headline/{composite_id}": { + "get": { + "operationId": "getSchemaGroupHeadline", + "summary": "getSchemaGroupHeadline", + "description": "Get a group headline from schema from given headline composite ID", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "name": "composite_id", + "description": "Schema Slug and the Schema Group ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+:.+$", + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupHeadlineWithCompositeID" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "put": { + "operationId": "putSchemaGroupHeadline", + "summary": "putSchemaGroupHeadline", + "description": "Adds or updates a group headline in the schema", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "name": "composite_id", + "description": "Schema Slug and the Schema Group ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+:.+$", + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupHeadlineWithCompositeID" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupHeadlineWithCompositeID" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteSchemaGroupHeadline", + "summary": "deleteSchemaGroupHeadline", + "description": "Deletes a group headline from a schema", + "tags": [ + "Schemas" + ], + "parameters": [ + { + "name": "composite_id", + "description": "Schema Slug and the Schema Group ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+:.+$", + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupHeadlineWithCompositeID" + } + } + } + }, + "429": { + "$ref": "#/components/responses/TooManyRequestsError" + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotOrg": { + "description": "Overrides the target organization to allow shared tenantaccess", + "name": "x-epilot-org-id", + "in": "header", + "type": "apiKey" + } + }, + "schemas": { + "ExportJobId": { + "description": "The unique identifier of the import job.", + "type": "string", + "example": "abc123" + }, + "Language": { + "description": "Export headers translation Language", + "type": "string" + }, + "IsTemplate": { + "description": "Pass 'true' to generate import template", + "type": "boolean" + }, + "SchemaId": { + "description": "Generated uuid for schema", + "type": "string", + "format": "uuid" + }, + "EntitySchema": { + "description": "The \"type\" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities.", + "type": "object", + "properties": { + "slug": { + "$ref": "#/components/schemas/EntitySlug" + }, + "version": { + "type": "integer", + "minimum": 1 + }, + "blueprint": { + "$ref": "#/components/schemas/BlueprintEntityId" + }, + "feature_flag": { + "type": "string", + "example": "FF_MY_FEATURE_FLAG", + "description": "This schema should only be active when the feature flag is enabled" + }, + "enable_setting": { + "description": "This schema should only be active when one of the organization settings is enabled", + "type": "array", + "items": { + "type": "string", + "example": "360_features" + } + }, + "name": { + "description": "User-friendly identifier for the entity schema", + "type": "string", + "example": "Contact" + }, + "plural": { + "type": "string", + "example": "Contacts" + }, + "description": { + "type": "string", + "example": "Example description" + }, + "docs_url": { + "type": "string", + "format": "uri", + "example": "https://docs.epilot.io/docs/pricing/entities" + }, + "category": { + "type": "string", + "example": "customer_relations" + }, + "published": { + "type": "boolean", + "example": false + }, + "draft": { + "type": "boolean", + "example": false + }, + "icon": { + "type": "string", + "example": "person" + }, + "title_template": { + "type": "string", + "description": "Template for rendering the title field. Uses handlebars", + "example": "{{first_name}} {{last_name}}" + }, + "ui_config": { + "type": "object", + "properties": { + "table_view": { + "anyOf": [ + { + "$ref": "#/components/schemas/EntityDefaultTable" + }, + { + "$ref": "#/components/schemas/RedirectEntityView" + }, + { + "$ref": "#/components/schemas/EntityViewDisabled" + } + ] + }, + "create_view": { + "anyOf": [ + { + "$ref": "#/components/schemas/EntityDefaultCreate" + }, + { + "$ref": "#/components/schemas/RedirectEntityView" + }, + { + "$ref": "#/components/schemas/EntityViewDisabled" + } + ] + }, + "edit_view": { + "anyOf": [ + { + "$ref": "#/components/schemas/EntityDefaultEdit" + }, + { + "$ref": "#/components/schemas/RedirectEntityView" + }, + { + "$ref": "#/components/schemas/EntityViewDisabled" + } + ] + }, + "single_view": { + "anyOf": [ + { + "$ref": "#/components/schemas/EntityDefaultEdit" + }, + { + "$ref": "#/components/schemas/RedirectEntityView" + }, + { + "$ref": "#/components/schemas/EntityViewDisabled" + } + ] + }, + "list_item": { + "type": "object", + "properties": { + "summary_attributes": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/SummaryAttribute" + }, + { + "type": "string", + "description": "List of attributes to show in list item", + "example": "email" + } + ] + } + }, + "quick_actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityAction" + } + }, + "ui_config": { + "type": "object", + "properties": { + "content_direction": { + "type": "string", + "enum": [ + "row", + "column" + ], + "description": "Show attributes in a row or column" + } + } + } + } + }, + "sharing": { + "type": "object", + "properties": { + "show_sharing_button": { + "type": "boolean", + "description": "Show the sharing button in entity detail view", + "example": true + } + } + } + } + }, + "capabilities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityCapability" + } + }, + "group_settings": { + "type": "array", + "description": "A list of Group Titles and associated settings if present.", + "items": { + "$ref": "#/components/schemas/EntitySchemaGroup" + }, + "example": [ + { + "id": "e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "label": "Contact Details", + "expanded": true, + "order": 1 + }, + { + "id": "e9a1ae28-27ba-4fa0-a79c-e279cc5c4a6e", + "label": "Address Details", + "expanded": false, + "order": 2, + "info_tooltip_title": { + "key": "partner.partner_information_group_tooltip", + "default": "These informations are provided by the partner company and cannot be edited." + } + } + ] + }, + "layout_settings": { + "type": "object", + "description": "Custom grid definitions for the layout. These settings are composed by managed and un-managed properties:\n- Managed Properties: are interpreted and transformed into layout styles\n- Un-managed Properties: are appended as styles into the attribute mounting node\n", + "additionalProperties": true, + "properties": { + "grid_gap": { + "type": "string", + "description": "Defines the grid gap for the mounting node of the attribute." + }, + "grid_template_columns": { + "type": "string", + "description": "Defines the grid column template for the mounting node of the attribute." + } + } + }, + "dialog_config": { + "type": "object", + "additionalProperties": true + }, + "attributes": { + "description": "An ordered list of attributes the entity contains", + "type": "array", + "items": { + "$ref": "#/components/schemas/Attribute" + }, + "example": [ + { + "name": "email", + "type": "email", + "label": "Email", + "required": true + }, + { + "name": "first_name", + "type": "string", + "label": "First Name" + }, + { + "name": "last_name", + "type": "string", + "label": "Last Name" + }, + { + "name": "birthdate", + "type": "date", + "label": "Birthdate" + }, + { + "name": "salutation", + "type": "select", + "label": "Salutation", + "options": [ + "Mr.", + "Ms. / Mrs.", + "Other" + ] + }, + { + "name": "marketing_permission", + "type": "boolean", + "label": "Marketing permission" + }, + { + "name": "image", + "type": "file", + "label": "Image" + } + ] + }, + "_purpose": { + "type": "array", + "items": { + "type": "string" + } + }, + "explicit_search_mappings": { + "$ref": "#/components/schemas/SearchMappings" + }, + "group_headlines": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupHeadline" + } + } + }, + "required": [ + "slug", + "name", + "plural", + "attributes", + "capabilities" + ] + }, + "EntitySchemaItem": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/SchemaId" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "comment": { + "type": "string" + }, + "source": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + }, + { + "$ref": "#/components/schemas/EntitySchema" + } + ] + }, + "GenerateEntityTableAIFiltersRequest": { + "type": "object", + "properties": { + "prompt": { + "type": "string", + "description": "The prompt to generate the filters", + "example": "Show me all contacts that are not customers", + "maxLength": 300 + }, + "main_entity_slug": { + "type": "string", + "description": "The main entity slug", + "example": "order" + }, + "filter_options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityTableFilterOption" + } + } + }, + "required": [ + "prompt", + "main_entity_slug", + "filter_options" + ] + }, + "GenerateEntityTableAIFiltersResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityTableFilterSearch" + } + }, + "EntityTableFilterSearch": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "The label for the search filter" + }, + "type": { + "type": "string", + "description": "The type for the search filter" + }, + "value": { + "type": "string", + "description": "The value for the search filter" + } + }, + "required": [ + "label", + "type", + "value" + ] + }, + "EntityTableFilterOption": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of filter option", + "enum": [ + "search", + "filter" + ] + }, + "label": { + "type": "string", + "description": "The label for the filter option" + }, + "label_type": { + "type": "string", + "description": "The label type for the filter option" + }, + "name": { + "type": "string", + "description": "The name for the filter option" + }, + "group": { + "type": "string", + "description": "The group for the filter option" + }, + "allowedSchemas": { + "type": "array", + "items": { + "type": "string", + "description": "The allowed schemas for the filter option" + } + }, + "relatedOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityTableFilterOption" + }, + "description": "The related options for the filter option" + } + }, + "required": [ + "label" + ] + }, + "EntitySchemaGroup": { + "type": "object", + "properties": { + "label": { + "type": "string", + "example": "Contact Details" + }, + "id": { + "type": "string", + "example": "e18a532b-ae79-4d86-a6a5-e5dbfb579d14" + }, + "order": { + "description": "Render order of the group", + "type": "integer", + "default": 0 + }, + "expanded": { + "description": "Expanded by default", + "type": "boolean", + "default": false + }, + "render_condition": { + "description": "Only render group when render_condition resolves to true", + "type": "string", + "example": "_is_composite_price = \"false\"" + }, + "_purpose": { + "description": "Only render group when one of the purposes is enabled", + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassificationId" + } + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the schema group", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "nullable": true + }, + "feature_flag": { + "type": "string", + "example": "FF_MY_FEATURE_FLAG", + "description": "This group should only be active when the feature flag is enabled" + }, + "settings_flag": { + "type": "array", + "description": "This group should only be active when all the settings have the correct value", + "items": { + "$ref": "#/components/schemas/SettingFlag" + } + }, + "info_tooltip_title": { + "type": "object", + "properties": { + "key": { + "description": "Translation key for info tooltip", + "type": "string" + }, + "default": { + "description": "Default string for info tooltip", + "type": "string" + } + } + } + }, + "required": [ + "label" + ] + }, + "EntitySchemaGroupWithCompositeID": { + "allOf": [ + { + "$ref": "#/components/schemas/EntitySchemaGroup" + }, + { + "type": "object", + "description": "a readonly computed ID for the group including schema slug and the group ID", + "properties": { + "composite_id": { + "type": "string", + "readOnly": true, + "example": "contact:e18a532b-ae79-4d86-a6a5-e5dbfb579d14" + }, + "schema": { + "type": "string", + "description": "Schema slug the group belongs to", + "example": "contact" + } + } + } + ] + }, + "Attribute": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextAttribute" + }, + { + "$ref": "#/components/schemas/LinkAttribute" + }, + { + "$ref": "#/components/schemas/DateAttribute" + }, + { + "$ref": "#/components/schemas/CountryAttribute" + }, + { + "$ref": "#/components/schemas/BooleanAttribute" + }, + { + "$ref": "#/components/schemas/SelectAttribute" + }, + { + "$ref": "#/components/schemas/MultiSelectAttribute" + }, + { + "$ref": "#/components/schemas/StatusAttribute" + }, + { + "$ref": "#/components/schemas/SequenceAttribute" + }, + { + "$ref": "#/components/schemas/RelationAttribute" + }, + { + "$ref": "#/components/schemas/UserRelationAttribute" + }, + { + "$ref": "#/components/schemas/AddressAttribute" + }, + { + "$ref": "#/components/schemas/AddressRelationAttribute" + }, + { + "$ref": "#/components/schemas/PaymentMethodRelationAttribute" + }, + { + "$ref": "#/components/schemas/CurrencyAttribute" + }, + { + "$ref": "#/components/schemas/TagsAttribute" + }, + { + "$ref": "#/components/schemas/MessageEmailAddressAttribute" + }, + { + "$ref": "#/components/schemas/NumberAttribute" + }, + { + "$ref": "#/components/schemas/ConsentAttribute" + }, + { + "$ref": "#/components/schemas/InternalAttribute" + }, + { + "$ref": "#/components/schemas/OrderedListAttribute" + }, + { + "$ref": "#/components/schemas/FileAttribute" + }, + { + "$ref": "#/components/schemas/ComputedAttribute" + }, + { + "$ref": "#/components/schemas/PartnerStatusAttribute" + }, + { + "$ref": "#/components/schemas/InvitationEmailAttribute" + }, + { + "$ref": "#/components/schemas/AutomationAttribute" + }, + { + "$ref": "#/components/schemas/InternalUserAttribute" + }, + { + "$ref": "#/components/schemas/PurposeAttribute" + }, + { + "$ref": "#/components/schemas/PartnerOrganisationAttribute" + }, + { + "$ref": "#/components/schemas/PortalAccessAttribute" + }, + { + "$ref": "#/components/schemas/PhoneAttribute" + }, + { + "$ref": "#/components/schemas/EmailAttribute" + }, + { + "$ref": "#/components/schemas/PaymentAttribute" + }, + { + "$ref": "#/components/schemas/PriceComponentAttribute" + } + ] + }, + "AttributeWithCompositeID": { + "allOf": [ + { + "$ref": "#/components/schemas/Attribute" + }, + { + "type": "object", + "description": "a readonly computed ID for the attribute including schema slug and the attribute ID", + "properties": { + "composite_id": { + "type": "string", + "readOnly": true, + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + }, + "schema": { + "type": "string", + "description": "Schema slug the attribute belongs to", + "example": "contact" + } + } + } + ] + }, + "BaseAttribute": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID for the entity attribute", + "example": "d5839b94-ba20-4225-a78e-76951d352bd6" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "placeholder": { + "type": "string" + }, + "hidden": { + "description": "Do not render attribute in entity views", + "type": "boolean", + "default": false + }, + "show_in_table": { + "description": "Render as a column in table views. When defined, overrides `hidden`", + "type": "boolean" + }, + "sortable": { + "description": "Allow sorting by this attribute in table views if `show_in_table` is true", + "type": "boolean", + "default": true + }, + "required": { + "type": "boolean", + "default": false + }, + "readonly": { + "type": "boolean", + "default": false + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "default_value": {}, + "group": { + "description": "Which group the attribute should appear in. Accepts group ID or group name", + "type": "string" + }, + "order": { + "description": "Attribute sort order (ascending) in group", + "type": "integer", + "example": 0 + }, + "layout": { + "type": "string", + "example": "full_width" + }, + "hide_label": { + "type": "boolean", + "description": "When set to true, will hide the label of the field." + }, + "icon": { + "type": "string", + "description": "Code name of the icon to used to represent this attribute.\nThe value must be a valid @epilot/base-elements Icon name\n" + }, + "render_condition": { + "type": "string", + "description": "Defines the conditional rendering expression for showing this field.\nWhen a valid expression is parsed, their evaluation defines the visibility of this attribute.\nNote: Empty or invalid expression have no effect on the field visibility.\n" + }, + "_purpose": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassificationId" + } + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the schema attribute", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "nullable": true + }, + "constraints": { + "type": "object", + "description": "A set of constraints applicable to the attribute.\nThese constraints should and will be enforced by the attribute renderer.\n", + "example": { + "disablePast": true + } + }, + "feature_flag": { + "type": "string", + "example": "FF_MY_FEATURE_FLAG", + "description": "This attribute should only be active when the feature flag is enabled" + }, + "settings_flag": { + "type": "array", + "description": "This attribute should only be active when one of the provided settings have the correct value", + "items": { + "$ref": "#/components/schemas/SettingFlag" + } + }, + "value_formatter": { + "type": "string" + }, + "preview_value_formatter": { + "type": "string" + }, + "entity_builder_disable_edit": { + "description": "Setting to `true` disables editing the attribute on the entity builder UI", + "type": "boolean", + "default": false + }, + "protected": { + "description": "Setting to `true` prevents the attribute from being modified / deleted", + "type": "boolean" + }, + "info_helpers": { + "description": "A set of configurations meant to document and assist the user in filling the attribute.", + "type": "object", + "properties": { + "hint_text": { + "type": "string", + "description": "The text to be displayed in the attribute hint helper.\nWhen specified it overrides the `hint_text_key` configuration.\n" + }, + "hint_text_key": { + "type": "string", + "description": "The key of the hint text to be displayed in the attribute hint helper.\nThe key should be a valid i18n key.\n" + }, + "hint_custom_component": { + "type": "string", + "description": "The name of the custom component to be used as the hint helper.\nThe component should be registered in the `@epilot360/entity-ui` on the index of the components directory.\nWhen specified it overrides the `hint_text` or `hint_text_key` configuration.\n" + }, + "hint_tooltip_placement": { + "type": "string", + "description": "The placement of the hint tooltip.\nThe value should be a valid `@mui/core` tooltip placement.\n", + "example": "top" + } + } + }, + "explicit_searchable": { + "type": "boolean", + "description": "When set to true, this attribute will always be searchable regardless of\nthe ELASTIC_MAX_SEARCH_FIELDS limit. Use this for critical search fields\nthat must always be included in search operations.\n", + "default": false + }, + "exclude_from_search": { + "type": "boolean", + "description": "When set to true, this attribute will be excluded from search fields.\nUse this for fields that should not be matched during entity search operations,\nsuch as internal hashes or identifiers that might accidentally match search terms.\n", + "default": false + }, + "repeatable": { + "description": "The attribute is a repeatable", + "type": "boolean" + }, + "has_primary": { + "type": "boolean" + } + }, + "required": [ + "name", + "label", + "type" + ] + }, + "TextAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Textarea or text input", + "properties": { + "type": { + "type": "string", + "enum": [ + "string" + ] + }, + "multiline": { + "type": "boolean" + }, + "rich_text": { + "type": "boolean" + }, + "rows": { + "description": "Number of rows for rich_text textarea", + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "example": 3 + } + } + } + ] + }, + "LinkAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Link with title and href", + "properties": { + "type": { + "type": "string", + "enum": [ + "link" + ] + } + } + } + ] + }, + "InternalAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "No UI representation", + "properties": { + "type": { + "type": "string", + "enum": [ + "internal" + ] + } + } + } + ] + }, + "BooleanAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Yes / No Toggle", + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean" + ] + }, + "display_type": { + "type": "string", + "enum": [ + "switch", + "checkbox" + ], + "default": "switch" + } + } + } + ] + }, + "DateAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Date or Datetime picker", + "properties": { + "type": { + "type": "string", + "enum": [ + "date", + "datetime" + ] + } + } + } + ] + }, + "CountryAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Country picker", + "properties": { + "type": { + "type": "string", + "enum": [ + "country" + ] + } + } + } + ] + }, + "SelectAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Dropdown select", + "properties": { + "type": { + "type": "string", + "enum": [ + "select", + "radio" + ] + }, + "options": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + { + "type": "string", + "nullable": true + } + ] + } + }, + "allow_any": { + "type": "boolean", + "description": "Allow arbitrary input values in addition to provided options" + } + } + } + ] + }, + "MultiSelectAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Multi Choice Selection", + "properties": { + "type": { + "type": "string", + "enum": [ + "multiselect", + "checkbox" + ] + }, + "disable_case_sensitive": { + "type": "boolean", + "nullable": true, + "description": "controls if the matching of values against the options is case sensitive or not" + }, + "allow_extra_options": { + "type": "boolean", + "nullable": true, + "description": "controls if the 360 ui will allow the user to enter a value which is not defined by the options" + }, + "options": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "allow_any": { + "type": "boolean", + "description": "Allow arbitrary input values in addition to provided options" + } + } + } + ] + }, + "StatusAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Status select", + "properties": { + "type": { + "type": "string", + "enum": [ + "status" + ] + }, + "options": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "object", + "properties": { + "value": { + "description": "The stored value of the option", + "type": "string" + }, + "title": { + "description": "The displayed title of the option", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + } + } + ] + }, + "SequenceAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Sequence of unique identifiers", + "properties": { + "type": { + "type": "string", + "enum": [ + "sequence" + ] + }, + "prefix": { + "description": "Prefix added before the sequence number", + "type": "string", + "example": "OR-" + }, + "start_number": { + "type": "integer", + "minimum": 0 + } + } + } + ] + }, + "FileAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "File or Image Attachment", + "properties": { + "type": { + "type": "string", + "enum": [ + "image", + "file" + ] + }, + "multiple": { + "type": "boolean" + }, + "allowed_extensions": { + "description": "List of file extensions (without the dot suffix)", + "type": "array", + "items": { + "type": "string", + "example": "csv" + } + }, + "display_images_landscaped": { + "type": "boolean", + "description": "Controls how the images are presented to the user during upload on the Entity Details view." + }, + "enable_description": { + "type": "boolean", + "description": "When set to true, an i18n description will be used alongside the attribute label.\nThis description should be set through the platform locales in the form: `file.{attribute_name}.description_text`.\n" + }, + "default_access_control": { + "type": "string", + "enum": [ + "public-read", + "private" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "CurrencyAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Currency input", + "properties": { + "type": { + "type": "string", + "enum": [ + "currency" + ] + }, + "currency_selector_only": { + "type": "boolean", + "default": false + }, + "currency": { + "description": "An array of currency configurations with a country code (ISO-4217)", + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "description": "A currency configuration", + "properties": { + "code": { + "type": "string" + }, + "description": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "flag": { + "type": "string" + } + }, + "required": [ + "code", + "description", + "symbol" + ], + "example": { + "code": "EUR", + "description": "Euro", + "symbol": "€", + "flag": "🇪🇺" + } + } + ] + } + } + }, + "required": [ + "type", + "currency" + ] + } + ] + }, + "SummaryField": { + "type": "object", + "description": "Summary Fields are displayed inside list view as a resume of the relation entity.", + "properties": { + "field": { + "type": "string", + "description": "The field from the entity attributes to display" + }, + "display_as": { + "type": "string", + "description": "An hint on how to display the summary field" + } + } + }, + "EntityAction": { + "type": "object", + "description": "An entity action configured from the entity schema", + "properties": { + "action": { + "type": "string", + "description": "A unique action name", + "example": "preview_file" + }, + "label": { + "type": "string", + "example": "Preview File" + }, + "icon": { + "type": "string", + "example": "visibility" + }, + "permission": { + "type": "string", + "example": "entity:edit", + "description": "Permission required to show the action.\nIf not provided, the action will be shown to all users.\n" + } + }, + "required": [ + "action", + "label" + ] + }, + "RelationAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Entity Relationship", + "properties": { + "type": { + "type": "string", + "enum": [ + "relation" + ] + }, + "relation_type": { + "type": "string", + "enum": [ + "has_many", + "has_one" + ] + }, + "reverse_attributes": { + "description": "Map of schema slug to target relation attribute", + "type": "object", + "additionalProperties": { + "type": "string", + "example": "contact.account" + }, + "example": { + "contact": "account", + "opportunity": "customer" + } + }, + "relation_affinity_mode": { + "description": "Weak relation attributes are kept when duplicating an entity. Strong relation attributes are discarded when duplicating an entity.", + "type": "string", + "enum": [ + "weak", + "strong" + ] + }, + "enable_relation_picker": { + "type": "boolean", + "default": true, + "description": "When enable_relation_picker is set to true the user will be able to pick existing relations as values. Otherwise, the user will need to create new relation to link." + }, + "edit_mode": { + "type": "string", + "enum": [ + "list-view" + ] + }, + "details_view_mode_enabled": { + "type": "boolean", + "default": false, + "description": "Enables the preview, edition, and creation of relation items on a Master-Details view mode." + }, + "relation_picker_filter": { + "description": "Additional entity search filter for relation picker", + "type": "object", + "properties": { + "q": { + "type": "string", + "example": "NOT is_composite_price:true", + "nullable": true + } + }, + "required": [ + "q" + ] + }, + "actions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "action_type": { + "type": "string", + "enum": [ + "add_existing", + "create_new", + "create_from_existing" + ], + "description": "The action type. Currently supported actions:\n\n| action | description |\n|--------|-------------|\n| add_existing | Enables the user to pick an existing entity to link as relation |\n| create_new | Enables the user to create a new entity using the first/main `allowed_schemas` schema\n| create_from_existing | Enables the user to pick an existing entity to clone from, while creating a blank new entity to link as relation |\n" + }, + "label": { + "type": "string", + "description": "The action label or action translation key (i18n)" + }, + "default": { + "type": "boolean", + "description": "Sets the action as the default action, visible as the main action button." + }, + "feature_flag": { + "type": "string", + "description": "Name of the feature flag that enables this action" + }, + "settings_flag": { + "type": "array", + "description": "This action should only be active when all the settings have the correct value", + "items": { + "$ref": "#/components/schemas/SettingFlag" + } + }, + "new_entity_item": { + "description": "Default field values for new entity to create", + "nullable": true, + "type": "object", + "additionalProperties": true, + "example": { + "_schema": "order" + } + } + } + }, + "example": [ + { + "action_type": "add_existing", + "label": "entityrelation.add_existing", + "default": true + }, + { + "action_type": "create_new", + "label": "entityrelation.create_new" + }, + { + "action_type": "create_from_existing", + "label": "entityrelation.create_from_existing" + } + ] + }, + "drawer_size": { + "type": "string", + "enum": [ + "small", + "medium", + "large" + ] + }, + "icon": { + "type": "string" + }, + "summary_fields": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "The field name from the entity attributes to display" + }, + { + "$ref": "#/components/schemas/SummaryField" + } + ] + } + }, + "has_primary": { + "type": "boolean" + }, + "allowedSchemas": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySlug" + } + }, + "enable_relation_tags": { + "type": "boolean", + "default": true, + "description": "When enable_relation_tags is set to true the user will be able to set tags(labels) in each relation item." + }, + "add_button_label": { + "type": "string", + "description": "Optional label for the add button. The translated value for add_button_lable is used, if found else the string is used as is." + }, + "search_placeholder": { + "type": "string", + "description": "Optional placeholder text for the relation search input. The translated value for search_placeholder is used, if found else the string is used as is." + }, + "repeatable": { + "description": "Relations are always repeatables", + "type": "boolean", + "default": true + } + } + } + ] + }, + "UserRelationAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "User Relationship", + "properties": { + "type": { + "type": "string", + "enum": [ + "relation_user" + ] + }, + "multiple": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "PartnerOrganisationAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Shared Partner Organisations", + "properties": { + "type": { + "type": "string", + "enum": [ + "partner_organisation" + ] + } + } + } + ] + }, + "PortalAccessAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Portal access configuration", + "properties": { + "type": { + "type": "string", + "enum": [ + "portal_access" + ] + } + } + } + ] + }, + "DefaultAddressFields": { + "type": "array", + "nullable": true, + "description": "Default fields visible on addresses\n\nValid values are:\n - postal_code (default)\n - city (default)\n - street (default)\n - street_number (default)\n - plot_area\n - plot_of_land\n - suburb\n - country\n - postbox\n - additional_info\n - coordinates\n - start_date\n - end_date\n - salutation\n - title\n - first_name\n - last_name\n - name_suffix\n - company_name\n", + "items": { + "type": "string" + } + }, + "AddressAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Address attribute", + "properties": { + "type": { + "type": "string", + "enum": [ + "address" + ] + }, + "default_address_fields": { + "$ref": "#/components/schemas/DefaultAddressFields" + } + } + } + ] + }, + "AddressRelationAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Reference to an address attribute of another entity", + "properties": { + "type": { + "type": "string", + "enum": [ + "relation_address" + ] + }, + "has_primary": { + "type": "boolean" + }, + "default_address_fields": { + "$ref": "#/components/schemas/DefaultAddressFields" + } + } + } + ] + }, + "PaymentMethodRelationAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Reference to a payment method attribute of another entity", + "properties": { + "type": { + "type": "string", + "enum": [ + "relation_payment_method" + ] + }, + "has_primary": { + "type": "boolean" + } + } + } + ] + }, + "InvitationEmailAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Email address for send invitation", + "properties": { + "type": { + "type": "string", + "enum": [ + "invitation_email" + ] + } + } + } + ] + }, + "AutomationAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Automation entity", + "properties": { + "type": { + "type": "string", + "enum": [ + "automation" + ] + } + } + } + ] + }, + "InternalUserAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Epilot internal user info", + "properties": { + "type": { + "type": "string", + "enum": [ + "internal_user" + ] + } + } + } + ] + }, + "PurposeAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Entity Taxonomy", + "properties": { + "type": { + "type": "string", + "enum": [ + "purpose" + ] + } + } + } + ] + }, + "RepeatableAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Repeatable (add N number of fields)", + "properties": { + "repeatable": { + "type": "boolean" + }, + "has_primary": { + "type": "boolean" + } + } + } + ] + }, + "TagsAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Tags", + "properties": { + "type": { + "type": "string", + "enum": [ + "tags" + ] + }, + "options": { + "type": "array", + "items": { + "type": "string" + } + }, + "suggestions": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "MessageEmailAddressAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Message emil address", + "properties": { + "type": { + "type": "string", + "enum": [ + "message_email_address" + ] + }, + "address": { + "type": "string" + }, + "name": { + "type": "string" + }, + "send_status": { + "type": "string" + }, + "email_type": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "NumberAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Numeric input", + "properties": { + "type": { + "type": "string", + "enum": [ + "number" + ] + }, + "data_type": { + "type": "string", + "enum": [ + "number", + "string" + ], + "default": "string", + "description": "Optional data type override. When set to 'number', the value is stored as a number instead of a string. Defaults to 'string'." + }, + "format": { + "type": "string" + }, + "show_separator": { + "description": "Whether or not to show a thousands separator", + "type": "boolean", + "default": true + } + } + } + ] + }, + "ConsentAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Consent Management", + "properties": { + "type": { + "type": "string", + "enum": [ + "consent" + ] + }, + "topic": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type", + "topic" + ] + } + ] + }, + "OrderedListAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Type of attribute to render N number of ordered fields", + "properties": { + "type": { + "type": "string", + "enum": [ + "ordered_list" + ] + } + } + } + ] + }, + "EmailAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Email address", + "properties": { + "type": { + "type": "string", + "enum": [ + "email" + ] + } + } + } + ] + }, + "PhoneAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Phone number", + "properties": { + "type": { + "type": "string", + "enum": [ + "phone" + ] + } + } + } + ] + }, + "PaymentAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Payment method", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment" + ] + } + } + } + ] + }, + "PriceComponentAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Price component", + "properties": { + "type": { + "type": "string", + "enum": [ + "price_component" + ] + } + } + } + ] + }, + "ComputedAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "An attribute that is computed from the entity data. For more details on how to use them, check the docs [here](https://e-pilot.atlassian.net/wiki/spaces/EO/pages/5642977476/How+To+Computed+Schema+Attributes)", + "properties": { + "type": { + "type": "string", + "enum": [ + "computed" + ] + }, + "computed": { + "type": "boolean", + "default": true + }, + "value_formatter": { + "type": "string", + "description": "Variable template used to format the computed value", + "example": "{{formatCurrencyAttribute entity attribute locale}}" + }, + "preview_value_formatter": { + "type": "string", + "description": "Variable template used to format a preview for the computed value", + "example": "{{formatCurrencyAttribute entity attribute locale}}" + }, + "amount_field": { + "type": "string", + "description": "A source amount field that is used to compute the value of the attribute" + }, + "currency_field": { + "type": "string", + "description": "A currency field used to format a computed currency value" + } + }, + "required": [ + "value_formatter" + ] + } + ] + }, + "PartnerStatusAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Partner Status", + "properties": { + "type": { + "type": "string", + "enum": [ + "partner_status" + ] + } + } + } + ] + }, + "SummaryAttribute": { + "description": "Represents an expanded version of an attribute to be displayed in the list item summary.\nThis configuration can be used in the following way:\n```js\n{\n \"label\": \"Price components\"\n \"value\": \"{{item.prices.length}} price components\"\n \"show_as_tag\": true\n \"render_condition\": \"is_composite_price = \"true\"\"\n}\n```\nThe value field supports handlebar expressions from which you can pick any field from the entity state.\n", + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Label to be shown on the top of the value." + }, + "value": { + "type": "string", + "description": "A static value or an handlebar expression." + }, + "show_as_tag": { + "type": "boolean", + "description": "Displays the value within a tag chip." + }, + "tag_color": { + "type": "string", + "description": "CSS hex color or CSS color name for the tag chip." + }, + "render_condition": { + "type": "string", + "description": "Defines the conditional rendering expression for showing this field.\nWhen a valid expression is parsed, their evaluation defines the visibility of this attribute.\nNote: Empty or invalid expression have no effect on the field visibility.\n" + }, + "feature_flag": { + "type": "string", + "description": "Binds summary field visibility to the feature flag state." + }, + "settings_flag": { + "type": "array", + "description": "This summary attribute should only be visible when all the settings have the correct value", + "items": { + "$ref": "#/components/schemas/SettingFlag" + } + }, + "display_mode": { + "type": "string", + "enum": [ + "inline", + "block" + ], + "description": "Defines the display mode of the summary attribute.\nWhen set to `inline`, the label and value will be displayed in the same line.\nWhen set to `block`, the label and value will be displayed in separate lines.\n" + }, + "content_line_cap": { + "type": "number", + "description": "Defines the line numbers of the content.\nFor instance, When set to 1, the content will be displayed in a single line.\n" + }, + "content_wrap": { + "type": "string", + "enum": [ + "normal", + "nowrap", + "pre", + "pre-wrap" + ], + "description": "Defines white-space of the content.\n" + }, + "hide_label": { + "type": "boolean", + "description": "When set to true, will hide the label of the field." + }, + "highlight_container": { + "type": "boolean", + "description": "When set to true, will highlight the container of the field." + } + }, + "required": [ + "label", + "value" + ] + }, + "GroupHeadline": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "layout": { + "type": "string" + }, + "group": { + "type": "string", + "description": "The group of headline attribute" + }, + "order": { + "type": "integer", + "description": "The order of headline attribute" + }, + "type": { + "type": "string", + "enum": [ + "headline" + ] + }, + "enable_divider": { + "type": "boolean", + "default": false + }, + "divider": { + "type": "string", + "enum": [ + "top_divider", + "bottom_divider" + ] + }, + "_purpose": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassificationId" + } + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the schema group headline", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "nullable": true + } + }, + "required": [ + "name", + "label", + "group", + "type" + ] + }, + "GroupHeadlineWithCompositeID": { + "allOf": [ + { + "$ref": "#/components/schemas/GroupHeadline" + }, + { + "type": "object", + "description": "a readonly computed ID for the entity group headline including schema slug and the headline ID", + "properties": { + "composite_id": { + "type": "string", + "readOnly": true, + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + }, + "schema": { + "type": "string", + "description": "Schema slug the capability belongs to", + "example": "contact" + } + } + } + ] + }, + "EntitySlug": { + "description": "URL-friendly identifier for the entity schema", + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "contact" + }, + "EntityCapability": { + "description": "Capabilities the Entity has. Turn features on/off for entities.", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID for the entity capability", + "example": "d5839b94-ba20-4225-a78e-76951d352bd6" + }, + "name": { + "type": "string", + "description": "Unique name for the capability", + "example": "customer_messaging" + }, + "title": { + "type": "string", + "description": "Human readable title of the capability", + "example": "Messaging" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attribute" + } + }, + "_purpose": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassificationId" + } + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the schema capabilility", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "nullable": true + }, + "app_id": { + "type": "string", + "description": "ID of the app if the capability is provided by an app", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "ui_config": { + "type": "object", + "properties": { + "is_filterable": { + "type": "boolean", + "description": "Whether the capability is filterable", + "example": true, + "default": false + } + } + }, + "ui_hooks": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "hook": { + "type": "string", + "description": "name of the hook to use", + "example": "EntityDetailsV2:Tab" + }, + "render_condition": { + "type": "string", + "example": "_is_composite_price = \"false\"" + }, + "order": { + "type": "integer", + "description": "render order (ascending)", + "example": 10 + }, + "title": { + "type": "string", + "example": "Notes" + }, + "group_expanded": { + "type": "boolean", + "description": "Sets the group expand/collapse default state" + }, + "import": { + "type": "string", + "description": "package to be imported", + "example": "@epilot360/notes" + }, + "component": { + "type": "string", + "description": "the component to be dynamically loaded", + "example": "PricingItems" + }, + "route": { + "type": "string", + "description": "route for specified capability", + "example": "notes" + }, + "icon": { + "type": "string", + "description": "Preview icon name(As in Base elements) for the capability", + "example": "email" + }, + "disabled": { + "type": "boolean", + "description": "Whether capability should be disabled" + }, + "header": { + "type": "boolean", + "description": "Specific to Activity pilot" + }, + "requiredPermission": { + "type": "object", + "description": "Require a permission to display UI hook", + "properties": { + "action": { + "type": "string", + "example": "note:view" + }, + "resource": { + "type": "string", + "example": "123" + } + }, + "required": [ + "action" + ] + } + }, + "required": [ + "hook" + ] + } + }, + "feature_flag": { + "type": "string", + "example": "FF_MY_FEATURE_FLAG", + "description": "This capability should only be active when the feature flag is enabled" + }, + "settings_flag": { + "type": "array", + "description": "This capability should only be active when all the settings have the correct value", + "items": { + "$ref": "#/components/schemas/SettingFlag" + } + } + }, + "required": [ + "name" + ] + }, + "EntityCapabilityWithCompositeID": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityCapability" + }, + { + "type": "object", + "description": "a readonly computed ID for the entity capability including schema slug and the capability ID", + "properties": { + "composite_id": { + "type": "string", + "readOnly": true, + "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d" + }, + "schema": { + "type": "string", + "description": "Schema slug the capability belongs to", + "example": "contact" + } + } + } + ] + }, + "EntityViewDisabled": { + "type": "object", + "properties": { + "view_type": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + "EntityDefaultTable": { + "type": "object", + "properties": { + "view_type": { + "type": "string", + "enum": [ + "default" + ] + }, + "row_actions": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/EntityAction" + } + ] + } + }, + "bulk_actions": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/EntityAction" + } + ] + } + }, + "navbar_actions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "params": { + "type": "object" + } + }, + "required": [ + "label" + ] + } + } + }, + "required": [ + "type" + ] + } + }, + "enable_thumbnails": { + "description": "Enable the thumbnail column", + "type": "boolean", + "default": false + } + } + }, + "EntityDefaultCreate": { + "type": "object", + "properties": { + "view_type": { + "type": "string", + "enum": [ + "default" + ] + }, + "search_params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "EntityDefaultEdit": { + "type": "object", + "properties": { + "view_type": { + "type": "string", + "enum": [ + "default" + ] + }, + "search_params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "summary_attributes": { + "description": "List of attribute names that we show in the summary header", + "type": "array", + "items": { + "type": "string", + "example": "email" + } + } + } + }, + "RedirectEntityView": { + "type": "object", + "properties": { + "view_type": { + "type": "string", + "enum": [ + "redirect" + ] + }, + "route": { + "type": "string", + "example": "/app/pricing-hub/product/:entityId" + } + }, + "example": { + "type": "redirect", + "route": "/app/pricing-hub/product/:entityId" + } + }, + "EntityId": { + "type": "string", + "format": "uuid" + }, + "BaseEntity": { + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "required": [ + "_id", + "_title", + "_org", + "_schema", + "_created_at", + "_updated_at" + ] + } + ] + }, + "Entity": { + "type": "object", + "additionalProperties": true, + "properties": { + "_id": { + "allOf": [ + { + "readOnly": true + }, + { + "$ref": "#/components/schemas/EntityId" + } + ] + }, + "_org": { + "type": "string", + "readOnly": true, + "description": "Organization Id the entity belongs to" + }, + "_owners": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/EntityOwner" + } + }, + "_schema": { + "$ref": "#/components/schemas/EntitySlug" + }, + "_title": { + "type": "string", + "description": "Title of entity", + "nullable": true + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "_created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "_updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "_deleted_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "_acl": { + "allOf": [ + { + "readOnly": true + }, + { + "$ref": "#/components/schemas/EntityAcl" + } + ] + }, + "_purpose": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "_purpose_name": { + "description": "Automatically computed purpose names from _purpose attribute", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the entity", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "nullable": true + } + }, + "example": { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": [ + "example", + "mock" + ], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": [ + "org:456", + "org:789" + ], + "edit": [ + "org:456" + ], + "delete": [ + "org:456" + ] + }, + "_manifest": [ + "123e4567-e89b-12d3-a456-426614174000" + ] + } + }, + "NullableEntity": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + } + ] + }, + "EntityOwner": { + "description": "The user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n", + "type": "object", + "properties": { + "org_id": { + "type": "string", + "example": "123" + }, + "user_id": { + "type": "string", + "example": "123" + } + }, + "required": [ + "org_id" + ] + }, + "EntityAcl": { + "description": "Access control list (ACL) for an entity. Defines sharing access to external orgs or users.", + "type": "object", + "properties": { + "view": { + "type": "array", + "items": { + "type": "string", + "example": "org:456" + } + }, + "edit": { + "type": "array", + "items": { + "type": "string", + "example": "org:456" + } + }, + "delete": { + "type": "array", + "items": { + "type": "string", + "example": "org:456" + } + } + }, + "additionalProperties": true + }, + "HydratedEntity": { + "type": "object", + "description": "Entity with relation data resolved into the attribute values", + "properties": { + "_relations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/components/schemas/EntityId" + } + }, + "required": [ + "entity_id" + ] + } + } + }, + "additionalProperties": true, + "required": [ + "_relations" + ], + "example": { + "_relations": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + } + ], + "status": "active", + "customer_number": "abc123", + "email": [ + { + "label": "work", + "email": "user@example.com" + } + ], + "phone": [ + { + "label": "work", + "phone": "+49123456789" + } + ], + "first_name": "First Name", + "middle_name": "Middle Name", + "last_name": "Last Name", + "date_of_birth": "2019-08-24", + "title": "Mr.", + "account": [ + { + "status": "active", + "name": "Company name", + "company_email": [ + { + "label": "Company email", + "email": "company@example.com" + } + ], + "company_phone": [ + { + "label": "Support phone", + "phone": "+49123456789" + } + ], + "company_website": "https://example.com", + "tax_id": "DE123456789", + "tax_exemption": "2019-08-24", + "contacts": { + "$relation": [ + { + "_tags": [ + "CEO" + ], + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + } + ] + } + } + ] + } + }, + "EntityItem": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Entity" + } + ] + }, + "EntityValidationError": { + "type": "object", + "description": "Validation error for an entity attribute", + "properties": { + "code": { + "type": "string", + "description": "Error code identifier", + "example": "custom" + }, + "params": { + "type": "object", + "description": "Additional parameters for the error", + "properties": { + "type": { + "type": "string", + "description": "The type of the error", + "example": "missing_field" + } + } + }, + "path": { + "type": "array", + "description": "The path to the attribute that failed validation", + "items": { + "type": "string" + }, + "example": [ + "first_name" + ] + }, + "message": { + "type": "string", + "description": "A human-readable message describing the error", + "example": "Invalid input" + } + }, + "required": [ + "code", + "params", + "path", + "message" + ] + }, + "EntityValidationResultSuccess": { + "type": "object", + "description": "Validation result for a successful validation", + "properties": { + "status": { + "type": "string", + "enum": [ + "success" + ] + }, + "errors": { + "type": "array", + "maxItems": 0, + "items": { + "$ref": "#/components/schemas/EntityValidationError" + } + } + }, + "required": [ + "status", + "errors" + ] + }, + "EntityValidationResultError": { + "type": "object", + "description": "Validation result for a failed validation", + "properties": { + "status": { + "type": "string", + "enum": [ + "error" + ] + }, + "errors": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/EntityValidationError" + } + } + }, + "required": [ + "status", + "errors" + ] + }, + "EntityValidationResult": { + "oneOf": [ + { + "$ref": "#/components/schemas/EntityValidationResultSuccess" + }, + { + "$ref": "#/components/schemas/EntityValidationResultError" + } + ] + }, + "EntityValidationV2Error": { + "type": "object", + "properties": { + "keyword": { + "type": "string", + "description": "validation keyword." + }, + "instance_path": { + "type": "string", + "description": "JSON Pointer to the location in the data instance (e.g., `\"/prop/1/subProp\"`)." + }, + "schema_path": { + "type": "string", + "description": "JSON Pointer to the location of the failing keyword in the schema." + }, + "params": { + "type": "object", + "description": "Additional information about error.", + "additionalProperties": true + }, + "property_name": { + "type": "string", + "description": "Set for errors in `propertyNames` keyword schema. `instance_path` still points to the object in this case." + }, + "message": { + "type": "string", + "description": "The error message." + }, + "schema": { + "type": "object", + "description": "The value of the failing keyword in the schema." + }, + "parent_schema": { + "type": "object", + "description": "The schema containing the keyword.", + "additionalProperties": true + }, + "data": { + "type": "object", + "description": "The data validated by the keyword.", + "additionalProperties": true + } + }, + "required": [ + "keyword", + "instance_path", + "schema_path", + "params" + ] + }, + "EntityValidationV2ResultSuccess": { + "type": "object", + "description": "Validation result for a successful validation", + "properties": { + "status": { + "type": "string", + "enum": [ + "success" + ] + }, + "errors": { + "type": "array", + "maxItems": 0, + "items": { + "$ref": "#/components/schemas/EntityValidationV2Error" + } + } + }, + "required": [ + "status", + "errors" + ] + }, + "EntityValidationV2ResultError": { + "type": "object", + "description": "Validation result for a failed validation", + "properties": { + "status": { + "type": "string", + "enum": [ + "error" + ] + }, + "errors": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/EntityValidationV2Error" + } + } + }, + "required": [ + "status", + "errors" + ] + }, + "EntityValidationV2Result": { + "oneOf": [ + { + "$ref": "#/components/schemas/EntityValidationV2ResultSuccess" + }, + { + "$ref": "#/components/schemas/EntityValidationV2ResultError" + } + ] + }, + "HydratedEntityItem": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/HydratedEntity" + } + ] + }, + "GetRelationsResp": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/RelationItem" + }, + { + "$ref": "#/components/schemas/RelationEntity" + } + ] + } + }, + "GetRelationsRespWithPagination": { + "type": "object", + "properties": { + "hits": { + "type": "number", + "example": 1 + }, + "relations": { + "$ref": "#/components/schemas/GetRelationsResp" + } + } + }, + "GetRelatedEntitiesCount": { + "type": "object", + "properties": { + "hits": { + "type": "integer", + "example": 1 + } + } + }, + "RelationEntity": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "type": "object", + "properties": { + "$relation": { + "$ref": "#/components/schemas/RelationItem" + } + } + } + ] + }, + "RelationItem": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "org_id": { + "type": "string", + "description": "Organization Id the entity belongs to" + }, + "_schema": { + "$ref": "#/components/schemas/EntitySlug" + }, + "attribute": { + "type": "string" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "reverse": { + "description": "Whether this is a reverse relation", + "type": "boolean" + } + }, + "required": [ + "entity_id", + "attribute" + ] + }, + "EntitySearchIncludeDeletedParam": { + "type": "string", + "enum": [ + "true", + "false", + "only" + ], + "description": "Whether to include deleted entities in the search results\n- `true`: include deleted entities\n- `false`: exclude deleted entities\n- `only`: include only deleted entities\n\nBy default, no deleted entities are included in the search results.\n", + "default": "false" + }, + "EntitySearchParams": { + "allOf": [ + { + "type": "object", + "properties": { + "q": { + "description": "Lucene [queries supported with ElasticSearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax)", + "type": "string", + "example": "_schema:contact AND status:active" + }, + "include_scores": { + "type": "boolean", + "default": false, + "description": "Adds a `_score` number field to results that can be used to rank by match score" + }, + "sort": {}, + "from": {}, + "size": {}, + "hydrate": {}, + "fields": {}, + "aggs": {}, + "include_deleted": {}, + "highlight": {}, + "stable_for": {}, + "stable_query_id": {}, + "search_after": {} + }, + "additionalProperties": false, + "required": [ + "q" + ] + }, + { + "$ref": "#/components/schemas/EntitySearchOptions" + } + ] + }, + "EntityListParams": { + "allOf": [ + { + "type": "object", + "properties": { + "query": { + "description": "Query configuration object for searching entities", + "type": "object", + "properties": { + "query_string": { + "description": "Query string configuration based on Elasticsearch query_string query", + "type": "object", + "properties": { + "query": { + "description": "The actual query string using Lucene query syntax", + "type": "string", + "example": "status:active" + }, + "fields": { + "description": "List of fields to search in. If not provided, searches in default fields", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "_title", + "_tags", + "status" + ] + }, + "default_operator": { + "description": "The default boolean operator used if no explicit operator is specified", + "type": "string", + "enum": [ + "AND", + "OR" + ], + "default": "OR" + }, + "lenient": { + "description": "If true, format-based errors are ignored", + "type": "boolean", + "default": true + } + }, + "required": [ + "query" + ] + } + }, + "required": [ + "query_string" + ] + }, + "filter": { + "$ref": "#/components/schemas/SearchFilter" + }, + "allow_targeting_all_schemas": { + "type": "boolean", + "default": false, + "description": "Allow running the listing without any schema filter. This is disabled by default to prevent security and performance issues if done by an accident." + }, + "sort": {}, + "from": {}, + "size": {}, + "hydrate": {}, + "fields": {}, + "aggs": {}, + "include_deleted": {}, + "include_scores": {}, + "highlight": {}, + "stable_for": {}, + "stable_query_id": {}, + "search_after": {} + }, + "additionalProperties": false, + "required": [ + "filter" + ] + }, + { + "$ref": "#/components/schemas/EntitySearchOptions" + } + ] + }, + "SearchFilter": { + "type": "array", + "description": "A subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.", + "items": { + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "properties": { + "term": { + "description": "Returns documents that contain an exact term in a provided field.\n\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.\n\nYou likely DO NOT want to use this filter on text fields and want to target its .keyword instead.\n", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html" + }, + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": { + "$ref": "#/components/schemas/SearchFilterValue" + }, + "example": { + "_schema": "contact" + } + }, + "terms": { + "description": "Returns documents that contain one of the exact terms in a provided field. See term filter for more info.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html" + }, + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchFilterValue" + } + }, + "example": { + "status": [ + "active" + ] + } + }, + "ids": { + "description": "Returns documents based on their IDs.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-ids-query.html" + }, + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "example": { + "values": [ + "550e8400-e29b-41d4-a716-446655440000" + ] + } + }, + "range": { + "description": "Returns documents with fields that have terms within a certain range.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html" + }, + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": { + "type": "object", + "properties": { + "gt": { + "$ref": "#/components/schemas/SearchFilterValue" + }, + "gte": { + "$ref": "#/components/schemas/SearchFilterValue" + }, + "lt": { + "$ref": "#/components/schemas/SearchFilterValue" + }, + "lte": { + "$ref": "#/components/schemas/SearchFilterValue" + }, + "format": { + "type": "string", + "description": "The date format used to parse date values." + }, + "relation": { + "type": "string", + "enum": [ + "INTERSECTS", + "CONTAINS", + "WITHIN" + ], + "description": "Indicates how the range query matches values for range fields." + }, + "time_zone": { + "type": "string", + "description": "Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC." + } + } + }, + "example": { + "_created_at": { + "gte": "2021-01-01T00:00:00.000Z", + "lte": "2021-01-31T23:59:59.999Z" + } + } + }, + "exists": { + "description": "Returns documents that have a value in the specified field.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html" + }, + "type": "object", + "properties": { + "field": { + "type": "string" + } + }, + "required": [ + "field" + ], + "example": { + "field": "_tags" + } + }, + "$and": { + "$ref": "#/components/schemas/SearchFilter" + }, + "$or": { + "$ref": "#/components/schemas/SearchFilter" + }, + "$not": { + "$ref": "#/components/schemas/SearchFilter" + } + } + }, + "example": [ + { + "term": { + "_schema": "contact" + } + }, + { + "terms": { + "status": [ + "active" + ] + } + } + ] + }, + "SearchFilterValue": { + "description": "A filter field value.", + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "EntitySearchOptions": { + "type": "object", + "properties": { + "sort": { + "description": "You can pass one sort field or an array of sort fields. Each sort field can be a string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "from": { + "type": "integer", + "minimum": 0, + "default": 0, + "description": "The offset from which to start the search results.\nOnly one of `from` or `search_after` should be used.\n" + }, + "size": { + "type": "integer", + "minimum": 0, + "default": 10, + "description": "Max search size is 1000 with higher values defaulting to 1000" + }, + "hydrate": { + "type": "boolean", + "description": "When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place.", + "default": false + }, + "fields": { + "$ref": "#/components/schemas/FieldsParam" + }, + "aggs": { + "type": "object", + "description": "Aggregation supported by ElasticSearch allows summarizing data as metrics, statistics, or other analytics.", + "example": { + "contact-count-per-tag": { + "terms": { + "field": "_tags.keyword" + } + } + } + }, + "include_deleted": { + "$ref": "#/components/schemas/EntitySearchIncludeDeletedParam" + }, + "include_scores": { + "type": "boolean", + "description": "Adds a `_score` number field to results that can be used to rank by match score", + "default": false + }, + "stable_for": { + "type": "integer", + "minimum": 0, + "maximum": 60, + "description": "A TTL (in seconds) that specifies how long the context should be maintained.\nDefaults to 30 seconds; configurable up to 60 seconds to prevent abuse.\nA value of 0 can be provided the close the context after the query.\nDefaults to none.\n" + }, + "stable_query_id": { + "type": "string", + "description": "A unique identifier of the query context from the last stable query.\nThe context is maintained for the duration of the stable_for value.\n" + }, + "search_after": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + } + ] + }, + "description": "The sort values from which to start the search results.\nOnly one of `from` or `search_after` should be used.\nIt is strongly recommended to always use the `sort_end` field from the last search result.\nUsed for deep pagination, typically together with `stable_query_id` to maintain the context between requests.\nRequires explicit sort to work reliably.\nTypically used sort fields are `_id` or `_created_at`.\n" + } + } + }, + "FieldsParam": { + "type": "array", + "description": "List of entity fields to include or exclude in the response\n\nUse ! to exclude fields, e.g. `!_id` to exclude the `_id` field.\n\nGlobbing and globstart (**) is supported for nested fields.\n", + "items": { + "type": "string" + }, + "example": [ + "_id", + "_title", + "first_name", + "account", + "!account.*._files", + "**._product" + ] + }, + "EntityImportParams": { + "type": "object", + "additionalProperties": false, + "properties": { + "S3Reference": { + "type": "object", + "properties": { + "bucket": { + "type": "string", + "description": "The name of the S3 bucket where the JSON file for import is stored.", + "example": "my-bucket" + }, + "key": { + "type": "string", + "description": "The key or path to the JSON file within the S3 bucket.", + "example": "imports/my-import.json" + } + }, + "required": [ + "bucket", + "key" + ], + "description": "The S3 bucket and key where the JSON file for import is located." + }, + "schema": { + "type": "string", + "description": "The schema of the entities being imported. This must match the schema of the entities on the platform.", + "example": "contact" + } + }, + "required": [ + "S3Reference", + "schema" + ], + "description": "The parameters for importing entities." + }, + "GraphQueryRequest": { + "type": "object", + "required": [ + "seed", + "graph" + ], + "properties": { + "seed": { + "$ref": "#/components/schemas/GraphSeed" + }, + "graph": { + "$ref": "#/components/schemas/GraphDefinition" + }, + "hydrate": { + "type": "boolean", + "description": "If true, return full entity objects in entityNodes instead of just entity IDs in nodes", + "default": false + } + } + }, + "GraphSeed": { + "type": "object", + "required": [ + "entity_id", + "node_id" + ], + "properties": { + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "node_id": { + "type": "string", + "description": "The node ID in the graph definition that corresponds to the seed entity", + "example": "contact" + } + } + }, + "GraphDefinition": { + "type": "object", + "required": [ + "nodes", + "edges" + ], + "properties": { + "nodes": { + "type": "array", + "description": "List of node definitions in the graph", + "items": { + "$ref": "#/components/schemas/GraphNode" + }, + "example": [ + { + "id": "portal_user", + "schema": "portal_user", + "cardinality": "one" + }, + { + "id": "contact", + "schema": "contact", + "cardinality": "one" + }, + { + "id": "billing_accounts", + "schema": "billing_account", + "cardinality": "many" + } + ] + }, + "edges": { + "type": "array", + "description": "List of edge definitions connecting nodes", + "items": { + "$ref": "#/components/schemas/GraphEdge" + }, + "example": [ + { + "from": "portal_user", + "to": "contact" + }, + { + "from": "contact", + "to": "billing_accounts" + } + ] + } + } + }, + "GraphNode": { + "type": "object", + "required": [ + "id", + "schema" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this node in the graph definition", + "example": "contact" + }, + "schema": { + "type": "string", + "description": "Entity schema slug for this node", + "example": "contact" + }, + "cardinality": { + "type": "string", + "enum": [ + "one", + "many" + ], + "description": "Optional cardinality for this node when used with hydrate=true:\n- \"one\": Node can only contain one entity, return single Entity object in entityNodes\n- \"many\": Node can contain multiple entities, return array of Entity objects in entityNodes\nIf not specified, defaults to \"many\" (returns array). The seed node always returns a single entity regardless of this setting.\n", + "example": "one" + }, + "fields": { + "allOf": [ + { + "$ref": "#/components/schemas/FieldsParam" + }, + { + "description": "Optional array of field names to include in the hydrated entity response for this node.\nWhen specified, only the requested fields plus required internal fields (_id, _schema, _org) will be returned.\nOnly applies when hydrate=true.\n" + } + ] + } + } + }, + "GraphEdge": { + "type": "object", + "required": [ + "from", + "to" + ], + "properties": { + "from": { + "type": "string", + "description": "Source node ID", + "example": "contact" + }, + "to": { + "type": "string", + "description": "Target node ID", + "example": "billing_account" + } + } + }, + "GraphQueryResponse": { + "type": "object", + "properties": { + "nodes": { + "type": "object", + "description": "Map of node IDs to arrays of entity IDs found for that node (present when hydrate=false)", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + } + }, + "example": { + "portal_user": [ + "550e8400-e29b-41d4-a716-446655440001" + ], + "contact": [ + "550e8400-e29b-41d4-a716-446655440002" + ], + "billing_accounts": [ + "550e8400-e29b-41d4-a716-446655440003", + "550e8400-e29b-41d4-a716-446655440004" + ] + } + }, + "entityNodes": { + "type": "object", + "description": "Map of node IDs to entity objects or arrays of entity objects (present when hydrate=true).\nThe seed node and nodes with cardinality=\"one\" return a single Entity object, or null if no entity was found.\nNodes with cardinality=\"many\" return an array of Entity objects.\n", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/NullableEntity" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Entity" + } + } + ] + }, + "example": { + "portal_user": { + "_id": "550e8400-e29b-41d4-a716-446655440001", + "_schema": "portal_user" + }, + "contact": { + "_id": "550e8400-e29b-41d4-a716-446655440002", + "_schema": "contact" + }, + "billing_accounts": [ + { + "_id": "550e8400-e29b-41d4-a716-446655440003", + "_schema": "billing_account" + }, + { + "_id": "550e8400-e29b-41d4-a716-446655440004", + "_schema": "billing_account" + } + ] + } + }, + "edges": { + "type": "array", + "description": "List of edges as defined in the request", + "items": { + "$ref": "#/components/schemas/GraphEdge" + }, + "example": [ + { + "from": "portal_user", + "to": "contact" + }, + { + "from": "contact", + "to": "billing_accounts" + } + ] + } + }, + "required": [ + "edges" + ] + }, + "EntitySearchResults": { + "type": "object", + "properties": { + "hits": { + "type": "number", + "example": 1 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityItem" + } + }, + "aggregations": { + "type": "object", + "example": { + "contact-count-per-tag": { + "doc_count_error_upper_bound": 0, + "sum_other_doc_count": 23, + "buckets": [ + { + "key": "automation", + "doc_count": 108 + }, + { + "key": "primary", + "doc_count": 66 + } + ] + } + } + }, + "stable_query_id": { + "type": "string", + "description": "A unique identifier of the query context.\nShould be used on the input for the next query that needs to be executed in the same context.\n" + }, + "sort_end": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + } + ] + }, + "description": "The sort value of the last item returned in `results`.\nCan be used as the input for the `search_after` in the next query.\n", + "example": [ + 1747905443332, + "0.000023312468" + ] + } + } + }, + "SearchMappings": { + "description": "Advanced: explicit Elasticsearch index mapping definitions for entity data\n", + "example": { + "image": { + "type": "keyword", + "index": false + } + }, + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "index": { + "type": "boolean", + "default": true + }, + "type": { + "type": "string", + "enum": [ + "keyword", + "text", + "boolean", + "integer", + "long", + "float", + "date", + "flattened", + "nested" + ] + }, + "fields": { + "additionalProperties": true + } + } + } + }, + "ActivityId": { + "type": "string", + "format": "ulid", + "description": "See https://github.com/ulid/spec", + "example": "01F130Q52Q6MWSNS8N2AVXV4JN", + "pattern": "^01[0-9a-zA-Z]{24}$" + }, + "ActivityCallerContext": { + "type": "object", + "additionalProperties": true, + "properties": { + "EpilotAuth": { + "type": "object", + "properties": { + "token": { + "type": "object", + "properties": { + "sub": { + "type": "string", + "example": "476e9b48-42f4-4234-a2b0-4668b34626ce" + }, + "email": { + "type": "string", + "example": "example@epilot.cloud" + }, + "cognito:username": { + "type": "string", + "example": "example@epilot.cloud" + }, + "custom:ivy_user_id": { + "type": "string", + "example": "10006129" + } + }, + "example": { + "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce", + "cognito:groups": [ + "Administrator" + ], + "cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role", + "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D", + "custom:ivy_org_id": "739224", + "cognito:username": "n.ahmad@epilot.cloud", + "custom:ivy_user_id": "10006129", + "cognito:roles": [ + "arn:aws:iam::912468240823:role/base-administrator-role" + ], + "aud": "6e0jbdnger7nmoktaaflarue1l", + "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75", + "token_use": "id", + "auth_time": 1614333023, + "exp": 1614336623, + "iat": 1614333023, + "email": "n.ahmad@epilot.cloud" + } + } + } + } + } + }, + "ActivityType": { + "type": "string", + "description": "A type for the activity. Used to categorize activities in the activity feed and for event subscriptions.\n\nBuilt-in entity activity types (custom activities can be defined as well):\n- EntityCreated\n- EntityUpdated\n- EntityDeleted\n- EntitySoftDeleted\n- EntityRestored\n- RelationsAdded\n- RelationsRemoved\n- RelationsSoftDeleted\n- RelationsRestored\n- RelationsDeleted\n" + }, + "Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "$ref": "#/components/schemas/ActivityType" + }, + "title": { + "type": "string", + "description": "Title for activity. Supports handlebars syntax.", + "example": "My custom activity" + }, + "message": { + "type": "string", + "description": "Message for activity. Supports handlebars syntax.", + "example": "{{caller}} did something with {{entity payload.entity.id}}." + }, + "payload": { + "type": "object", + "properties": {}, + "additionalProperties": true, + "example": { + "entity": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "schema": "contact" + } + } + }, + "pending": { + "type": "boolean", + "description": "Indicates whether the activity is in the pending state.\nPending activities are not yet visible in the activity feed and events are not yet dispatched.\n", + "default": false + } + }, + "required": [ + "type", + "title", + "message" + ] + }, + "EntityOperation": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/EntityId" + }, + "org": { + "type": "string", + "example": "123" + }, + "activity_id": { + "$ref": "#/components/schemas/ActivityId" + }, + "activity_type": { + "$ref": "#/components/schemas/ActivityType" + }, + "operation": { + "type": "string", + "enum": [ + "createEntity", + "updateEntity", + "deleteEntity", + "softDeleteEntity", + "restoreEntity", + "relationsAdded", + "relationsRemoved", + "relationsSoftDeleted", + "relationsRestored", + "relationsDeleted" + ] + }, + "params": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/EntityId" + }, + "slug": { + "$ref": "#/components/schemas/EntitySlug" + } + }, + "example": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "slug": "contact" + } + }, + "payload": { + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "example": { + "_schema": "contact", + "_org": "123", + "status": "Inactive" + } + } + ] + }, + "diff": { + "type": "object", + "properties": { + "added": { + "allOf": [ + { + "description": "New attributes added to the entity as part of the operation" + }, + { + "$ref": "#/components/schemas/Entity" + } + ] + }, + "updated": { + "allOf": [ + { + "description": "Attributes updated in the entity. Note: These values contain the previous values before the update!" + }, + { + "$ref": "#/components/schemas/Entity" + } + ] + }, + "deleted": { + "allOf": [ + { + "description": "Attributes removed from the entity as part of the operation" + }, + { + "$ref": "#/components/schemas/Entity" + } + ] + } + } + } + }, + "required": [ + "entity", + "org", + "operation" + ] + }, + "BaseActivityItem": { + "allOf": [ + { + "type": "object", + "properties": { + "_id": { + "$ref": "#/components/schemas/ActivityId" + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + } + }, + { + "$ref": "#/components/schemas/Activity" + }, + { + "type": "object", + "properties": { + "caller": { + "$ref": "#/components/schemas/ActivityCallerContext" + } + } + } + ] + }, + "ActivityItem": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseActivityItem" + }, + { + "type": "object", + "properties": { + "operations_total": { + "type": "integer", + "description": "Count of total operations attached to this activity", + "example": 1 + }, + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityOperation" + } + } + } + } + ] + }, + "BlueprintEntityId": { + "description": "Reference to blueprint", + "type": "string", + "format": "uuid" + }, + "ListSavedViewsResults": { + "type": "object", + "properties": { + "hits": { + "type": "number", + "example": 1 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SavedViewItem" + } + } + } + }, + "SavedViewId": { + "description": "Generated uuid for a saved view", + "type": "string", + "format": "uuid" + }, + "SavedViewItem": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/SavedViewId" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + { + "$ref": "#/components/schemas/SavedView" + } + ] + }, + "SavedViewPartial": { + "description": "A saved entity view", + "type": "object", + "properties": { + "slug": { + "type": "array", + "description": "list of schemas a view can belong to", + "items": { + "$ref": "#/components/schemas/EntitySlug" + } + }, + "name": { + "description": "User-friendly identifier for the saved view", + "type": "string", + "example": "View listing German", + "minLength": 1, + "maxLength": 100 + }, + "org": { + "description": "Organisation ID a view belongs to", + "type": "string", + "example": "66" + }, + "shared": { + "description": "boolean property for if a view is shared with organisation", + "type": "boolean", + "example": true + }, + "isFavoritedBy": { + "description": "List of users (IDs) that have favorited the view", + "type": "array", + "items": { + "type": "string", + "example": "11701" + } + }, + "created_by": { + "anyOf": [ + { + "type": "object", + "description": "A user that created the view", + "properties": { + "user_id": { + "type": "string", + "example": "10598" + } + } + }, + { + "type": "object", + "description": "A system-created view", + "properties": { + "source": { + "type": "string", + "enum": [ + "SYSTEM", + "BLUEPRINT" + ] + } + }, + "additionalProperties": true + } + ] + }, + "ui_config": { + "type": "object", + "additionalProperties": true, + "example": { + "filters": { + "customer_name": "suresh test", + "_tags": "360" + }, + "table_layout": { + "opportunity": { + "page": 1, + "sort": "_created_at:desc", + "pageSize": 25, + "columnSettings": [] + } + } + } + }, + "shared_with": { + "type": "array", + "description": "List of users ('${userId}'), user groups ('group_${groupId}'), or partner users ('${partnerOrgId}_${partnerUserId}') that the view is shared with", + "items": { + "type": "string", + "example": "112233" + } + } + } + }, + "SavedView": { + "description": "A saved entity view", + "allOf": [ + { + "$ref": "#/components/schemas/SavedViewPartial" + }, + { + "type": "object", + "required": [ + "slug", + "name", + "ui_config" + ] + } + ] + }, + "Taxonomy": { + "type": "object", + "properties": { + "slug": { + "$ref": "#/components/schemas/TaxonomySlug" + }, + "name": { + "type": "string", + "description": "A human friendly name of a Taxonomy e.g. Purpose, Product Category, Folder, Tag", + "example": "Purpose" + }, + "plural": { + "type": "string", + "description": "Plural name of a Taxonomy e.g. Purposes, Product Categories, Folders, Tags. Defaults to name is not provided.", + "example": "Purposes" + }, + "kind": { + "readOnly": true, + "type": "string", + "enum": [ + "system", + "user_defined" + ], + "description": "Kind of taxonomy e.g. system or user_defined. By default, it's empty, which means 'user_defined'", + "example": "system" + }, + "type": { + "type": "string", + "enum": [ + "entity", + "relation", + "system", + "file_collection" + ], + "description": "Type of taxonomy. Whether it classifies:\n- entity (default)\n- relation (for relations)\n- system (for system taxonomies - default for all slugs starting with _system_)\n- file_collection (for file collections)\n", + "default": "entity", + "example": "entity" + }, + "icon": { + "type": "string", + "description": "Icon name for the taxonomy (from epilot360/icons icon set)", + "example": "purpose" + }, + "color": { + "type": "string", + "description": "HEX Color code for the taxonomy", + "example": "#FF5733" + }, + "created_at": { + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "deleted_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "Date when the taxonomy was soft-deleted (enabled: false)" + }, + "created_by": { + "readOnly": true, + "type": "string", + "description": "User ID of the creator", + "example": "10598" + }, + "enabled": { + "type": "boolean", + "description": "Whether the taxonomy is enabled or not", + "example": true + }, + "order": { + "type": "number", + "description": "Position of the taxonomy", + "example": 10 + }, + "enabled_locations": { + "description": "List of locations where the taxonomy is enabled to be used. If empty, it's enabled for all locations.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TaxonomyLocationId" + }, + { + "type": "string" + } + ] + } + } + } + }, + "TaxonomyLocationId": { + "type": "string", + "enum": [ + "account", + "contact", + "contract", + "email_template", + "file", + "journey", + "meter_counter", + "meter", + "opportunity", + "order", + "partner", + "price", + "product", + "submission", + "tax", + "message", + "portal_user", + "request", + "comment" + ] + }, + "TaxonomySearchIncludeArchivedParam": { + "type": "string", + "enum": [ + "true", + "false", + "only" + ], + "description": "Whether to include archived labels in the search results\n- `true`: include archived labels\n- `false`: exclude archived labels\n- `only`: include only archived labels\n\nBy default, no archived labels are included in the search results.\n", + "default": "false" + }, + "TaxonomyClassification": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/ClassificationId" + }, + "slug": { + "type": "string", + "description": "URL-friendly identifier for the classification", + "example": "wallbox-pv" + }, + "name": { + "type": "string", + "example": "Wallbox PV" + }, + "parents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassificationId" + } + }, + "color": { + "type": "string", + "description": "Color of the classification", + "example": "#FF5733" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "archived": { + "type": "boolean", + "description": "Archived classification are not visible in the UI", + "default": false + }, + "starred": { + "type": "boolean", + "description": "Starred taxonomy classifications can represent \"favorites\" or commonly used classifications", + "default": false + }, + "enabled_locations": { + "description": "List of locations where the classification is enabled to be used. If empty, it's enabled for all locations.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TaxonomyLocationId" + }, + { + "type": "string" + } + ] + } + }, + "enabled_purposes": { + "description": "List of purpose slugs where the classification is enabled to be used. If empty, it's enabled for all purposes.", + "type": "array", + "items": { + "type": "string" + } + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the taxonomy classification", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "nullable": true + } + }, + "required": [ + "name", + "slug" + ] + }, + "ClassificationId": { + "type": "string", + "example": "taxonomy-slug:classification-slug", + "readOnly": true + }, + "ClassificationIdOrPattern": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClassificationId" + }, + { + "type": "object", + "properties": { + "pattern": { + "type": "string", + "example": "taxonomy-slug:*", + "description": "Wildcard pattern to match classification IDs starting with the prefix before ':*'" + } + }, + "required": [ + "pattern" + ] + } + ] + }, + "ClassificationSlug": { + "type": "string", + "description": "URL-friendly identifier for the classification", + "example": "wallbox-pv" + }, + "TaxonomySlug": { + "type": "string", + "description": "URL-friendly name for taxonomy", + "example": "purpose" + }, + "ClassificationsUpdate": { + "type": "object", + "properties": { + "create": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomyClassification" + } + }, + "update": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomyClassification" + } + }, + "delete": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClassificationId" + }, + { + "type": "string", + "example": "taxonomy-slug:classification-slug" + } + ] + } + } + } + }, + "TaxonomyBulkJobTriggerResponse": { + "type": "object", + "properties": { + "job_id": { + "type": "string", + "format": "uuid" + }, + "status": { + "$ref": "#/components/schemas/TaxonomyBulkJobStatus" + } + } + }, + "TaxonomyBulkJobStatus": { + "type": "string", + "description": "The status of the bulk job", + "enum": [ + "PENDING", + "FAILED", + "COMPLETED", + "CANCELLED" + ] + }, + "TaxonomyBulkJobActionType": { + "type": "string", + "enum": [ + "MOVE_CLASSIFICATIONS", + "MERGE_CLASSIFICATIONS", + "DELETE_CLASSIFICATIONS" + ] + }, + "TaxonomyBulkJob": { + "type": "object", + "properties": { + "job_id": { + "type": "string", + "format": "uuid" + }, + "job_status": { + "$ref": "#/components/schemas/TaxonomyBulkJobStatus" + }, + "failure_reason": { + "type": "string" + }, + "action_type": { + "$ref": "#/components/schemas/TaxonomyBulkJobActionType" + }, + "request": { + "type": "object", + "properties": { + "target_taxonomy": { + "$ref": "#/components/schemas/TaxonomySlug" + }, + "target_classification": { + "$ref": "#/components/schemas/ClassificationId" + }, + "classification_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassificationId" + } + } + } + }, + "output": { + "type": "object", + "properties": { + "target_entities_count": { + "type": "number" + }, + "affected_entities_count": { + "type": "number" + }, + "failures_count": { + "type": "number" + }, + "failed_entities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + } + } + } + }, + "created_by": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "org": { + "type": "string" + } + }, + "example": { + "job_id": "123e4567-e89b-12d3-a456-426614174000", + "status": "PENDING", + "action_type": "MOVE_CLASSIFICATIONS", + "created_by": "10598", + "created_at": "2024-01-01T00:00:00.000Z", + "updated_at": "2024-01-01T00:00:00.000Z", + "org": "66" + } + }, + "ESClusterAssignment": { + "type": "object", + "properties": { + "orgId": { + "type": "string", + "description": "The organization for which the cluster assignment is returned" + }, + "cluster": { + "type": "string", + "description": "Name of the elastic cluster the organization is assigned to" + } + } + }, + "SettingFlag": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the organization setting to check" + }, + "enabled": { + "type": "boolean", + "description": "Whether the setting should be enabled or not" + } + } + }, + "ErrorObject": { + "description": "A generic error returned by the API", + "type": "object", + "properties": { + "status": { + "type": "integer", + "description": "The HTTP status code of the error", + "example": 400 + }, + "error": { + "type": "string", + "description": "The error message", + "example": "Bad Request" + } + } + } + }, + "parameters": { + "EntityIdPathParam": { + "name": "id", + "description": "Entity id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + }, + "EntitySlugPathParam": { + "name": "slug", + "description": "Entity Type", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntitySlug" + } + }, + "EntitySlugPathPriceParam": { + "name": "slug", + "description": "Entity Type", + "in": "path", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EntitySlug" + } + ], + "example": "price" + } + }, + "TaxonomySlugQueryParam": { + "name": "taxonomySlug", + "description": "Taxonomy slug", + "in": "query", + "schema": { + "type": "string" + }, + "required": true + }, + "TaxonomySlugPathParam": { + "name": "taxonomySlug", + "description": "Taxonomy slug", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + "TaxonomySlugQueryParamOptional": { + "name": "taxonomySlug", + "description": "Taxonomy slug", + "in": "query", + "schema": { + "type": "string" + } + }, + "TaxonomyClassificationSlugPathParam": { + "name": "classificationSlug", + "description": "Taxonomy Classification slug", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "example": "purpose:" + }, + "SavedViewIdPathParam": { + "name": "id", + "description": "View id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/SavedViewId" + } + }, + "AsyncOperationQueryParam": { + "name": "async", + "description": "Don't wait for updated entity to become available in Search API. Useful for large migrations", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + "HydrateEntitiesQueryParam": { + "name": "hydrate", + "description": "When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place.", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + } + }, + "ActivityIdQueryParam": { + "name": "activity_id", + "description": "Activity to include in event feed", + "in": "query", + "required": false, + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ActivityId" + }, + { + "type": "string", + "nullable": true, + "enum": [ + "", + null + ] + } + ] + } + }, + "ActivityIdPathParam": { + "name": "id", + "description": "Activity Id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ActivityId" + } + }, + "FromPageQueryParam": { + "name": "from", + "description": "Starting page number", + "in": "query", + "schema": { + "type": "integer", + "minimum": 0, + "default": 0 + } + }, + "IncludeReverseDeprecatedQueryParam": { + "name": "include_reverse", + "description": "When true, includes reverse relations in response (other entities pointing to this entity)\n*It gets overriden by mode query parameter.*\n", + "in": "query", + "deprecated": true, + "schema": { + "default": false, + "type": "boolean" + } + }, + "IncludeReverseQueryParam": { + "name": "include_reverse", + "description": "When true, includes reverse relations in response (other entities pointing to this entity)", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + } + }, + "IncludeSchemasQueryParam": { + "name": "include_schemas", + "description": "Filter results to only include schemas", + "in": "query", + "required": false, + "style": "form", + "explode": false, + "example": [ + "contact", + "account" + ], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySlug" + } + } + }, + "ExcludeSchemasQueryParam": { + "name": "exclude_schemas", + "description": "Filter results to exclude schemas", + "in": "query", + "required": false, + "style": "form", + "explode": false, + "example": [ + "file", + "message" + ], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySlug" + } + } + }, + "EntityRelationsModeQueryParam": { + "name": "mode", + "description": "Options to determine how relations will be included in the result.\n*It overrides the include_reverse query param.*\nExplanation of possible options:\n- direct: include relations to which the searched entity refers\n- reverse: include relations that refer to the entity you are looking for\n- both: both direct and reverse relations\n", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "direct", + "reverse", + "both" + ] + } + }, + "DryRunQueryParam": { + "name": "dry_run", + "description": "Dry Run mode = return results but does not perform the operation.", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + "FillActivityQueryParam": { + "name": "fill_activity", + "description": "Update the diff and entity for the custom activity included in the query.\nPending state on activity is automatically ended when activity is filled.\n", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + "ValidateEntityQueryParam": { + "name": "validate", + "description": "When true, enables entity validation against the entity schema.", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + } + } + }, + "examples": { + "EmptyGenericEntity": { + "description": "Example of an empty, generic entity", + "value": {} + }, + "TaxEntity": { + "description": "Example of a Tax Rate entity", + "value": { + "active": true, + "type": "VAT", + "region": "Germany", + "region_label": "All Regions", + "rate": 19, + "behavior": "Exclusive", + "description": "MwSt. 19%" + } + }, + "ContactEntity": { + "description": "Example of a contact entity", + "value": { + "status": "Active", + "customer_number": "abc123", + "first_name": "First", + "middle_name": "Middle", + "last_name": "Last", + "title": "Herr Prof. Dr.", + "email": [ + { + "email": "user@example.com", + "_tags": [ + "work" + ] + } + ], + "phone": [ + { + "phone": "+49123456789", + "_tags": [ + "personal", + "mobile" + ] + } + ], + "address": [ + { + "country": "Germany", + "city": "Koln", + "postal_code": 81475, + "street": "Melatengürtel", + "street_number": 71, + "additional_info": "5. Etage", + "_tags": [ + "billing", + "delivery" + ] + } + ], + "birthdate": "2019-08-24", + "account": { + "$relation": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_tags": [ + "company" + ] + } + ] + }, + "consent_email_marketing": { + "status": "OPTED_IN", + "events": [ + { + "type": "OPT_IN", + "organization_id": "123", + "created_at": "2021-07-05T09:12:29.352Z", + "topic": "EMAIL_MARKETING", + "identifier": "user@example.com", + "source": "https://consent.sls.epilot.io/optin?token=abc123", + "meta": { + "ip_address": "1.1.1.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + } + }, + { + "type": "DOUBLE_OPT_IN_REQUEST", + "organization_id": "123", + "created_at": "2021-07-05T08:12:29.352Z", + "topic": "EMAIL_MARKETING", + "identifier": "user@example.com", + "source": "consent-api", + "meta": { + "token": "abc123" + } + }, + { + "type": "OPT_IN", + "organization_id": "123", + "created_at": "2021-07-04T09:12:29.352Z", + "topic": "EMAIL_MARKETING", + "identifier": "user@example.com", + "source": "https://frontend.epilot.cloud", + "meta": { + "ip_address": "1.1.1.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + } + } + ] + } + } + }, + "AccountEntity": { + "description": "Example of an account entity", + "value": { + "status": "Active", + "name": "Example Company", + "tax_id": "DE123456789", + "email": [ + { + "email": "user@example.com", + "_tags": [ + "work" + ] + } + ], + "phone": [ + { + "phone": "+49123456789", + "_tags": [ + "personal", + "mobile" + ] + } + ], + "address": [ + { + "country": "Germany", + "city": "Koln", + "postal_code": 81475, + "street": "Melatengürtel", + "street_number": 71, + "additional_info": "5. Etage", + "_tags": [ + "billing", + "delivery" + ] + } + ], + "website": "http://company.com", + "tax_exemption": "2021-02-23T09:08:57.320Z", + "registry_court": "Amtsgericht Köln", + "registry_number": "HRB 95505", + "company_size": "50-99", + "industry": [ + "ecommerce", + "tech" + ], + "annual_revenue": "5000000", + "contact": { + "$relation": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_tags": [ + "CEO" + ] + } + ] + } + } + }, + "ProductEntity": { + "description": "Example of a product entity", + "value": { + "code": "SunrockSolar375", + "type": "Product", + "name": "Sunrock Solar Panel", + "description": "Sunrock Solar Panel, provide high capacity power generation even at night.", + "shippable": "true,", + "_files": { + "type": "file", + "attachments": [ + { + "key": "f001-32123-asdasd-23213", + "mime": "application/pdf", + "name": "wallbox-premium.pdf", + "size": 6933430, + "image_url": "https://s3-bucket.epilot.cloud/uid/f001-32123-asdasd-23213", + "download_url": "https://s3-bucket.epilot.cloud/uid/f001-32123-asdasd-23213" + } + ] + }, + "_images": { + "type": "image", + "attachments": [ + { + "key": "i001-32123-asdasd-23213", + "mime": "application/pdf", + "name": "wallbox-premium.pdf", + "size": 6933430, + "image_url": "https://s3-bucket.epilot.cloud/uid/f001-32123-asdasd-23213", + "download_url": "https://s3-bucket.epilot.cloud/uid/f001-32123-asdasd-23213" + } + ] + }, + "prices": { + "$relation": [ + { + "entity_id": "a38cca03-18a2-4e9c-8516-0918d81e7830", + "_tags": [ + "price" + ] + }, + { + "entity_id": "3d10c912-c419-42d7-9270-02b7d05294e5", + "_tags": [ + "price" + ] + } + ] + } + } + }, + "PriceEntity": { + "description": "Example of a price entity", + "value": { + "code": "MODEL_375KW_PREMIUM", + "type": "One Time", + "description": "Solar Panel 375 kWp Premium", + "internal_description": "Solar Panel 375 kWp Premium", + "billing_scheme": "per_unit", + "unit_amount": "€ 28500", + "tiers_mode": "Standard" + } + }, + "OrderEntity": { + "description": "Example of a Order entity", + "value": { + "amount_subtotal": 23045, + "amount_total": 27424, + "billing_address": [ + { + "additional_info": "", + "city": "City", + "country": "DE", + "postal_code": "123", + "street": "Street 1", + "street_number": "2", + "_tags": [] + } + ], + "billing_company_name": "Epilot", + "billing_contact": { + "$relation": [ + { + "entity_id": "0691f503-5a3c-4e9e-b036-ffb21ea1d284", + "relationText": "Daniel Test", + "_schema": "contact", + "_tags": [] + } + ] + }, + "billing_email": "x@email.xyz", + "billing_first_name": "Paulo", + "billing_last_name": "Henriques", + "billing_phone": "00351912611099", + "billing_vat": "123456789", + "currency": "EUR", + "delivery_address": [ + { + "additional_info": "", + "city": "City", + "country": "DE", + "postal_code": "123", + "street": "Street 1", + "street_number": "2", + "_tags": [] + } + ], + "footer_notes": "Footer", + "line_items": [ + { + "amount_subtotal": 23045, + "amount_total": 27424, + "currency": "EUR", + "description": "Basic Model - No Wifi", + "price_id": "efe9ff76-865c-4287-8de9-422cfc741ff9", + "product_id": "beefa9f1-29a8-448e-94d5-ebf1963428f8", + "quantity": 1, + "taxes": [ + { + "amount": 4379, + "rate": "standard" + } + ], + "unit_amount": 23045, + "_price": { + "active": false, + "billing_duration_amount": "2", + "billing_duration_unit": "years", + "billing_period": "monthly", + "description": "Basic Model - No Wifi", + "notice_time_amount": "1", + "notice_time_unit": "months", + "price_display_in_journeys": "show_price", + "renewal_duration_amount": "1", + "renewal_duration_unit": "years", + "sales_tax": "standard", + "tax_behavior": "exclusive", + "termination_time_amount": "1", + "termination_time_unit": "months", + "type": "recurring", + "unit_amount": 23045, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "230.4524", + "_created_at": "2021-12-15T12:34:59.579Z", + "_id": "efe9ff76-865c-4287-8de9-422cfc741ff9", + "_org": "739224", + "_schema": "price", + "_tags": [ + "basic-model", + "wifi" + ], + "_title": "Basic Model - No Wifi", + "_updated_at": "2021-12-31T13:07:51.392Z" + }, + "_product": { + "active": true, + "code": "PWB", + "feature": [ + { + "_tags": [], + "feature": "Pure Energon Fueled" + }, + { + "_tags": [], + "feature": "Mobile App Available" + } + ], + "name": "Pinho Walls in a Box", + "price_options": { + "$relation": [ + { + "entity_id": "efe9ff76-865c-4287-8de9-422cfc741ff9" + } + ] + }, + "type": "product", + "_created_at": "2021-12-15T12:35:08.438Z", + "_id": "beefa9f1-29a8-448e-94d5-ebf1963428f8", + "_org": "739224", + "_schema": "product", + "_tags": [ + "energon", + "eco-friendly", + "wallbox" + ], + "_title": "Pinho Walls in a Box", + "_updated_at": "2022-01-03T17:14:41.042Z" + } + } + ], + "memo": "Memo", + "status": "Paid", + "total_details": { + "amount_tax": 4379, + "breakdown": { + "recurrences": [ + { + "amount_subtotal": 23045, + "amount_tax": 4379, + "amount_total": 27424, + "billing_period": "monthly", + "type": "recurring" + } + ], + "taxes": [ + { + "amount": 4379, + "rate": "standard" + } + ] + } + } + } + }, + "OpportunityEntity": { + "description": "Example of an Opportunity entity", + "value": { + "amount_subtotal": 23045, + "amount_total": 27424, + "assignees": { + "$relation": [ + { + "entity_id": "66a1a6a3-38ee-4ffe-b68d-ee90e3bb1a77", + "relationText": "Claudius Iohannis", + "_schema": "contact", + "_tags": [] + } + ] + }, + "billing_address": [ + { + "additional_info": "", + "city": "City", + "country": "DE", + "postal_code": "123", + "street": "Street 1", + "street_number": "2", + "_tags": [] + } + ], + "billing_company_name": "Epilot", + "billing_contact": { + "$relation": [ + { + "entity_id": "0691f503-5a3c-4e9e-b036-ffb21ea1d284", + "relationText": "Daniel Test", + "_schema": "contact", + "_tags": [] + } + ] + }, + "billing_email": "customer@email.xyz", + "billing_first_name": "Customer First Name", + "billing_last_name": "Customer Last Name", + "billing_phone": "00351912611098", + "billing_vat": "123456789", + "currency": "EUR", + "delivery_address": [ + { + "additional_info": "", + "city": "City", + "country": "DE", + "postal_code": "123", + "street": "Street 1", + "street_number": "2", + "_tags": [] + } + ], + "line_items": [ + { + "amount_subtotal": 23045, + "amount_total": 27424, + "currency": "EUR", + "description": "Basic Model - No Wifi", + "price_id": "efe9ff76-865c-4287-8de9-422cfc741ff9", + "product_id": "beefa9f1-29a8-448e-94d5-ebf1963428f8", + "quantity": 1, + "taxes": [ + { + "amount": 4379, + "rate": "standard" + } + ], + "unit_amount": 23045, + "_price": { + "active": false, + "billing_duration_amount": "2", + "billing_duration_unit": "years", + "billing_period": "monthly", + "description": "Basic Model - No Wifi", + "notice_time_amount": "1", + "notice_time_unit": "months", + "price_display_in_journeys": "show_price", + "renewal_duration_amount": "1", + "renewal_duration_unit": "years", + "sales_tax": "standard", + "tax_behavior": "exclusive", + "termination_time_amount": "1", + "termination_time_unit": "months", + "type": "recurring", + "unit_amount": 23045, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "230.4524", + "_created_at": "2021-12-15T12:34:59.579Z", + "_id": "efe9ff76-865c-4287-8de9-422cfc741ff9", + "_org": "739224", + "_schema": "price", + "_tags": [ + "basic-model", + "wifi" + ], + "_title": "Basic Model - No Wifi", + "_updated_at": "2021-12-31T13:07:51.392Z" + }, + "_product": { + "active": true, + "code": "PWB", + "feature": [ + { + "_tags": [], + "feature": "Pure Energon Fueled" + }, + { + "_tags": [], + "feature": "Mobile App Available" + } + ], + "name": "Pinho Walls in a Box", + "price_options": { + "$relation": [ + { + "entity_id": "efe9ff76-865c-4287-8de9-422cfc741ff9" + } + ] + }, + "type": "product", + "_created_at": "2021-12-15T12:35:08.438Z", + "_id": "beefa9f1-29a8-448e-94d5-ebf1963428f8", + "_org": "739224", + "_schema": "product", + "_tags": [ + "energon", + "eco-friendly", + "wallbox" + ], + "_title": "Pinho Walls in a Box", + "_updated_at": "2022-01-03T17:14:41.042Z" + } + } + ], + "opportunity_number": "20220105-768854819", + "participants": { + "$relation": [ + { + "entity_id": "9bbfdaa9-22b2-4100-a256-67600202e3f4", + "relationText": "Alex Marques", + "_schema": "contact", + "_tags": [] + } + ] + }, + "status": "Lead", + "total_details": { + "amount_tax": 4379, + "breakdown": { + "recurrences": [ + { + "amount_subtotal": 23045, + "amount_tax": 4379, + "amount_total": 27424, + "billing_period": "monthly", + "type": "recurring" + } + ], + "taxes": [ + { + "amount": 4379, + "rate": "standard" + } + ] + } + } + } + }, + "EmailTemplateEntity": { + "description": "Example of an email template entity", + "value": { + "attachments": [], + "body": "

Variablen - Kontakt

", + "brand_id": 7066103, + "from": { + "name": "Name", + "email": "admin@email.xyz" + }, + "name": "PH Test", + "subject": "Example Subject", + "system_template": false, + "to": [ + { + "id": "1", + "name": "Contact Name", + "email": "Contact email" + } + ], + "_tags": [ + "Bestellung" + ] + } + }, + "FileEntity": { + "description": "Example of a file template entity", + "value": { + "access_control": "private", + "filename": "solar_panel_ph.jpeg", + "s3ref": { + "bucket": "epilot-staging-user-content", + "key": "728/temp/6d450fd1-2d63-435f-b598-c605dfb89cbc/solar_panel_ph.jpeg" + } + } + }, + "WorkflowStepEntity": { + "description": "Example of a workflow step template entity", + "value": { + "name": "Name", + "assigned_to\"": [ + "10000563" + ], + "status": "Unassigned", + "order": 123, + "tags": [ + "tag1" + ] + } + }, + "SubmissionEntity": { + "description": "Example of a submission step template entity", + "value": { + "mapped_entities": { + "$relation": [ + { + "entity_id": "4ffb071c-2821-4505-86d0-09b801ffd97a", + "relationText": "4ffb071c-2821-4505-86d0-09b801ffd97a", + "_schema": "price", + "_tags": [] + } + ] + } + } + }, + "EntityValidationError": { + "description": "Example of an entity validation error", + "value": { + "code": "string", + "params": { + "type": "string" + }, + "path": [ + "string" + ], + "message": "string" + } + }, + "EntityValidationResultSuccess": { + "description": "Example of a successful entity validation result", + "value": { + "status": "success", + "errors": [] + } + }, + "EntityValidationResultError": { + "description": "Example of a failed entity validation result", + "value": { + "status": "error", + "errors": [ + { + "$ref": "#/components/examples/EntityValidationError" + } + ] + } + } + }, + "responses": { + "BadRequestError": { + "description": "Bad request - invalid input parameters", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorObject" + }, + { + "example": { + "status": 400, + "error": "Bad Request" + } + } + ] + } + } + } + }, + "NotFoundError": { + "description": "The requested resource was not found", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorObject" + }, + { + "example": { + "status": 404, + "error": "Not Found" + } + } + ] + } + } + } + }, + "TooManyRequestsError": { + "description": "Too many requests", + "headers": { + "Retry-After": { + "description": "Time to wait in seconds before retrying", + "schema": { + "type": "integer", + "example": 10 + } + } + }, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorObject" + }, + { + "example": { + "status": 429, + "error": "Too many requests. Try again later." + } + } + ] + } + } + } + } + } + }, + "servers": [ + { + "url": "https://entity.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/environments.json b/packages/cli/definitions/environments.json new file mode 100644 index 00000000..6e1f862b --- /dev/null +++ b/packages/cli/definitions/environments.json @@ -0,0 +1,363 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Environments API", + "description": "API for managing organization environment variables and secrets", + "version": "1.0.0" + }, + "tags": [ + { + "name": "environments", + "description": "Environment variables and secrets management" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v1/environments": { + "get": { + "operationId": "listEnvironmentVariables", + "summary": "List environment variables", + "description": "List all environment variables for the organization. Returns metadata only, no secret values.", + "tags": [ + "environments" + ], + "responses": { + "200": { + "description": "List of environment variables", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableList" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal server error" + } + } + }, + "post": { + "operationId": "createEnvironmentVariable", + "summary": "Create environment variable", + "description": "Create a new environment variable or secret for the organization.", + "tags": [ + "environments" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableCreateRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Created environment variable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "409": { + "description": "Environment variable with this key already exists" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v1/environments/{key}": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Environment variable key", + "schema": { + "type": "string", + "pattern": "^[a-z0-9][a-z0-9_.\\-]{0,127}$" + } + } + ], + "get": { + "operationId": "getEnvironmentVariable", + "summary": "Get environment variable", + "description": "Get an environment variable by key. Returns value only for String type, omitted for SecretString.", + "tags": [ + "environments" + ], + "responses": { + "200": { + "description": "Environment variable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Environment variable not found" + }, + "500": { + "description": "Internal server error" + } + } + }, + "put": { + "operationId": "updateEnvironmentVariable", + "summary": "Update environment variable", + "description": "Create or update an environment variable. Acts as an upsert — creates the variable if it does not exist.", + "tags": [ + "environments" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Updated environment variable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + }, + "201": { + "description": "Created environment variable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal server error" + } + } + }, + "delete": { + "operationId": "deleteEnvironmentVariable", + "summary": "Delete environment variable", + "description": "Delete an environment variable by key.", + "tags": [ + "environments" + ], + "responses": { + "204": { + "description": "Environment variable deleted" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Environment variable not found" + }, + "500": { + "description": "Internal server error" + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + }, + "schemas": { + "EnvironmentValueType": { + "type": "string", + "enum": [ + "String", + "SecretString" + ] + }, + "EnvironmentVariable": { + "type": "object", + "required": [ + "key", + "type", + "created_at", + "updated_at" + ], + "properties": { + "key": { + "type": "string", + "pattern": "^[a-z0-9][a-z0-9_.\\-]{0,127}$" + }, + "type": { + "$ref": "#/components/schemas/EnvironmentValueType" + }, + "description": { + "type": "string" + }, + "value": { + "type": "string", + "description": "Value is returned for String type, omitted for SecretString" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + }, + "EnvironmentVariableListItem": { + "type": "object", + "required": [ + "key", + "type", + "created_at", + "updated_at" + ], + "properties": { + "key": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/EnvironmentValueType" + }, + "description": { + "type": "string" + }, + "value": { + "type": "string", + "description": "Value is returned for String type, omitted for SecretString" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + }, + "EnvironmentVariableList": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentVariableListItem" + } + } + } + }, + "EnvironmentVariableCreateRequest": { + "type": "object", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "pattern": "^[a-z0-9][a-z0-9_.\\-]{0,127}$" + }, + "type": { + "$ref": "#/components/schemas/EnvironmentValueType" + }, + "description": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "EnvironmentVariableUpdateRequest": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "type": { + "description": "Type of variable. Used when creating a new variable. Defaults to String.", + "allOf": [ + { + "$ref": "#/components/schemas/EnvironmentValueType" + } + ] + }, + "value": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + } + }, + "servers": [{"url":"https://environments.sls.epilot.io"}] +} diff --git a/packages/cli/definitions/erp-integration.json b/packages/cli/definitions/erp-integration.json new file mode 100644 index 00000000..0e8dd3a8 --- /dev/null +++ b/packages/cli/definitions/erp-integration.json @@ -0,0 +1,5845 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "ERP Integration API", + "version": "0.46.0", + "description": "API for integrating with ERP systems, handling tracking acknowledgments, triggering ERP processes, and processing ERP updates." + }, + "tags": [ + { + "name": "erp", + "description": "ERP integration endpoints" + }, + { + "name": "trigger", + "description": "Endpoints to trigger ERP related actions" + }, + { + "name": "integrations", + "description": "Integration and Use Case management endpoints" + }, + { + "name": "monitoring", + "description": "Monitoring and analytics endpoints" + } + ], + "servers": [ + { + "url": "https://erp-integration-api.sls.epilot.io" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v1/erp/tracking/acknowledgement": { + "post": { + "operationId": "acknowledgeTracking", + "summary": "acknowledgeTracking", + "description": "Acknowledges an ERP tracking record by removing it from the tracking table, requires public authentication", + "tags": [ + "erp" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ack_id" + ], + "properties": { + "ack_id": { + "type": "string", + "description": "Unique identifier of the ERP tracking record to acknowledge" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Acknowledgment successful", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "400": { + "description": "Bad request - missing ack_id" + }, + "401": { + "description": "Unauthorized - invalid or missing token" + }, + "404": { + "description": "Record not found" + }, + "500": { + "description": "Server error processing the request" + } + } + } + }, + "/v1/erp/trigger": { + "post": { + "operationId": "triggerErp", + "summary": "triggerErp", + "description": "Triggers the ERP integration process", + "tags": [ + "erp", + "trigger" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerErpActionRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/TriggerWebhookResponse" + }, + "400": { + "description": "Bad request - invalid or missing parameters" + }, + "401": { + "description": "Unauthorized - invalid or missing token" + }, + "500": { + "description": "Server error processing the request" + } + } + } + }, + "/v1/erp/updates/events": { + "post": { + "deprecated": true, + "operationId": "processErpUpdatesEvents", + "summary": "processErpUpdatesEvents", + "description": "Handles updates from ERP systems and tracks them appropriately", + "tags": [ + "erp" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "app_id", + "component_id", + "meta", + "events" + ], + "properties": { + "app_id": { + "type": "string", + "format": "uuid", + "description": "UUID that identifies the specific integration app instance" + }, + "component_id": { + "type": "string", + "format": "uuid", + "description": "UUID that identifies the specific integration app component instance" + }, + "meta": { + "type": "object", + "description": "Metadata to be passed along with the events", + "additionalProperties": true, + "properties": { + "correlation_id": { + "type": "string", + "description": "ID that identifies the specific request for debugging purposes" + } + } + }, + "events": { + "type": "array", + "description": "List of ERP events to process", + "items": { + "$ref": "#/components/schemas/ErpEvent" + } + } + } + }, + "example": { + "app_id": "123e4567-e89b-12d3-a456-426614174000", + "component_id": "123e4567-e89b-12d3-a456-426614174000", + "meta": { + "correlation_id": "req-789e4567-e89b-12d3-a456-426614174000" + }, + "events": [ + { + "event_type": "CREATE", + "object_type": "business_partner", + "timestamp": "2025-05-01T08:30:00Z", + "format": "json", + "payload": "{\"id\":\"BP10001\",\"name\":\"Acme Corporation\",\"type\":\"organization\",\"tax_id\":\"DE123456789\",\"status\":\"active\"}", + "deduplication_id": "bp-create-20250501-083000-001" + }, + { + "event_type": "UPDATE", + "object_type": "contract_account", + "timestamp": "2025-05-01T08:35:00Z", + "format": "json", + "payload": "{\"id\":\"CA20001\",\"business_partner_id\":\"BP10001\",\"status\":\"active\",\"payment_method\":\"direct_debit\"}", + "deduplication_id": "ca-update-20250501-083500-001" + } + ] + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/ERPUpdatesResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/erp/updates/events": { + "post": { + "deprecated": true, + "operationId": "processErpUpdatesEventsV2", + "summary": "processErpUpdatesEventsV2", + "description": "Handles updates from ERP systems using integration_id directly.\nThis is the v2 version that simplifies the API by accepting integration_id\ninstead of app_id and component_id.\n", + "tags": [ + "erp" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErpUpdatesEventsV2Request" + }, + "example": { + "integration_id": "123e4567-e89b-12d3-a456-426614174000", + "correlation_id": "req-789e4567-e89b-12d3-a456-426614174000", + "events": [ + { + "event_type": "CREATE", + "object_type": "business_partner", + "timestamp": "2025-05-01T08:30:00Z", + "format": "json", + "payload": "{\"id\":\"BP10001\",\"name\":\"Acme Corporation\",\"type\":\"organization\",\"tax_id\":\"DE123456789\",\"status\":\"active\"}", + "deduplication_id": "bp-create-20250501-083000-001" + }, + { + "event_type": "UPDATE", + "object_type": "contract_account", + "timestamp": "2025-05-01T08:35:00Z", + "format": "json", + "payload": "{\"id\":\"CA20001\",\"business_partner_id\":\"BP10001\",\"status\":\"active\",\"payment_method\":\"direct_debit\"}", + "deduplication_id": "ca-update-20250501-083500-001" + } + ] + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/ERPUpdatesResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v3/erp/updates/events": { + "post": { + "operationId": "processErpUpdatesEventsV3", + "summary": "processErpUpdatesEventsV3", + "description": "Handles updates from ERP systems using integration_id directly.\nThis is the v3 version that removes the unused event_type field and renames object_type to event_name\nto align with the integration UI naming.\n", + "tags": [ + "erp" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErpUpdatesEventsV3Request" + }, + "example": { + "integration_id": "123e4567-e89b-12d3-a456-426614174000", + "correlation_id": "req-789e4567-e89b-12d3-a456-426614174000", + "events": [ + { + "event_name": "business_partner", + "timestamp": "2025-05-01T08:30:00Z", + "format": "json", + "payload": "{\"id\":\"BP10001\",\"name\":\"Acme Corporation\",\"type\":\"organization\",\"tax_id\":\"DE123456789\",\"status\":\"active\"}", + "deduplication_id": "bp-create-20250501-083000-001" + }, + { + "event_name": "contract_account", + "timestamp": "2025-05-01T08:35:00Z", + "format": "json", + "payload": "{\"id\":\"CA20001\",\"business_partner_id\":\"BP10001\",\"status\":\"active\",\"payment_method\":\"direct_debit\"}", + "deduplication_id": "ca-update-20250501-083500-001" + } + ] + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/ERPUpdatesResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/erp/updates/mapping_simulation": { + "post": { + "operationId": "simulateMappingV2", + "summary": "simulateMappingV2", + "description": "Test v2.0 mapping configuration by transforming a payload using the provided mapping rules without persisting data.\n\nThis endpoint accepts the same configuration format that is stored in the integration use case resource,\nmaking it easier to test configurations before saving them to a use case.\n\nSee documentation at /docs/MAPPING_V2.md for detailed v2.0 format specification.\n", + "tags": [ + "erp" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSimulationV2Request" + }, + "examples": { + "simple": { + "summary": "Simple Example", + "value": { + "event_configuration": { + "entities": [ + { + "entity_schema": "contact", + "unique_ids": [ + "customer_number" + ], + "fields": [ + { + "attribute": "customer_number", + "field": "customerId" + }, + { + "attribute": "first_name", + "field": "firstName" + }, + { + "attribute": "last_name", + "field": "lastName" + }, + { + "attribute": "email", + "field": "email" + }, + { + "attribute": "source", + "constant": "ERP" + } + ] + } + ] + }, + "format": "json", + "payload": "{\"customerId\":\"12345\",\"firstName\":\"Anna\",\"lastName\":\"Schmidt\",\"email\":\"anna@example.com\"}" + } + }, + "advanced_with_relations": { + "summary": "Advanced with Relations", + "value": { + "event_configuration": { + "entities": [ + { + "entity_schema": "contract", + "unique_ids": [ + "contract_number" + ], + "fields": [ + { + "attribute": "contract_number", + "field": "number" + }, + { + "attribute": "display_name", + "field": "displayName" + }, + { + "attribute": "billing_account", + "relations": { + "operation": "_set", + "items": [ + { + "entity_schema": "billing_account", + "_tags": [ + "PRIMARY" + ], + "unique_ids": [ + { + "attribute": "external_id", + "field": "customerAccountId" + } + ] + } + ] + } + } + ] + }, + { + "entity_schema": "meter", + "unique_ids": [ + "meter_number" + ], + "jsonataExpression": "meters.{\"number\": number, \"type\": meterType}", + "fields": [ + { + "attribute": "meter_number", + "field": "number" + }, + { + "attribute": "meter_type", + "field": "type" + } + ] + } + ] + }, + "format": "json", + "payload": "{\"number\":\"CTR-001\",\"displayName\":\"Premium Contract\",\"customerAccountId\":\"ACC-999\",\"meters\":[{\"number\":\"M-001\",\"meterType\":\"electricity\"},{\"number\":\"M-002\",\"meterType\":\"gas\"}]}" + } + }, + "with_meter_readings": { + "summary": "With Meter Readings", + "value": { + "event_configuration": { + "entities": [ + { + "entity_schema": "contract", + "unique_ids": [ + "contract_number" + ], + "fields": [ + { + "attribute": "contract_number", + "field": "number" + }, + { + "attribute": "display_name", + "field": "name" + } + ] + } + ], + "meter_readings": [ + { + "jsonataExpression": "$.readings", + "meter": { + "unique_ids": [ + { + "attribute": "external_id", + "field": "meter_id" + } + ] + }, + "fields": [ + { + "attribute": "external_id", + "field": "reading_id" + }, + { + "attribute": "timestamp", + "field": "read_at" + }, + { + "attribute": "source", + "constant": "ERP" + }, + { + "attribute": "value", + "field": "value" + } + ] + } + ] + }, + "format": "json", + "payload": "{\"number\":\"CTR-001\",\"name\":\"Main Contract\",\"readings\":[{\"meter_id\":\"M-001\",\"reading_id\":\"R-001\",\"read_at\":\"2025-01-15T10:00:00Z\",\"value\":12345.6}]}" + } + }, + "conditional_fields": { + "summary": "Conditional Field Processing", + "description": "Example showing how to conditionally enable/disable individual field mappings", + "value": { + "event_configuration": { + "entities": [ + { + "entity_schema": "contact", + "unique_ids": [ + "customer_number" + ], + "fields": [ + { + "attribute": "customer_number", + "field": "customerId" + }, + { + "attribute": "email", + "field": "email", + "enabled": "$exists(email) and email != ''" + }, + { + "attribute": "phone", + "field": "phone", + "enabled": "$exists(phone) and phone != ''" + }, + { + "attribute": "vip_status", + "constant": "VIP", + "enabled": "vipFlag = true" + }, + { + "attribute": "billing_account", + "enabled": "$exists(billingAccountId)", + "relations": { + "operation": "_set", + "items": [ + { + "entity_schema": "billing_account", + "unique_ids": [ + { + "attribute": "external_id", + "field": "billingAccountId" + } + ] + } + ] + } + } + ] + } + ] + }, + "format": "json", + "payload": "{\"customerId\":\"12345\",\"email\":\"user@example.com\",\"phone\":\"\",\"vipFlag\":true,\"billingAccountId\":\"ACC-999\"}" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successfully simulated mapping", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSimulationResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "422": { + "description": "Unprocessable entity - mapping configuration or payload validation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBase" + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/erp/updates/mapping_simulation": { + "post": { + "operationId": "simulateMapping", + "summary": "simulateMapping", + "description": "Test mapping configuration by transforming a payload using the provided mapping rules without persisting data.\n\nSupports both v1.0 (object-based) and v2.0 (event-based) mapping formats.\nSee documentation at /docs/MAPPING_V2.md for detailed v2.0 format specification.\n", + "tags": [ + "erp" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSimulationRequest" + }, + "examples": { + "v1_example": { + "summary": "Version 1.0 Example", + "value": { + "mapping_configuration": { + "version": "1.0", + "mapping": { + "objects": { + "business_partner": { + "unique_ids": { + "contact": { + "partner_id": "_id" + } + }, + "fields": [ + { + "entity": "contact", + "attribute": "first_name", + "field": "firstName" + }, + { + "entity": "contact", + "attribute": "last_name", + "field": "lastName" + } + ] + } + } + } + }, + "object_type": "business_partner", + "format": "json", + "payload": "{\"partner_id\":\"BP10001\",\"firstName\":\"John\",\"lastName\":\"Doe\"}" + } + }, + "v2_simple": { + "summary": "Version 2.0 - Simple Example", + "value": { + "mapping_configuration": { + "version": "2.0", + "mapping": { + "events": { + "CustomerChanged": { + "entities": [ + { + "entity_schema": "contact", + "unique_ids": [ + "customer_number" + ], + "fields": [ + { + "attribute": "customer_number", + "field": "customerId" + }, + { + "attribute": "first_name", + "field": "firstName" + }, + { + "attribute": "last_name", + "field": "lastName" + }, + { + "attribute": "email", + "field": "email" + }, + { + "attribute": "source", + "constant": "ERP" + } + ] + } + ] + } + } + } + }, + "object_type": "CustomerChanged", + "format": "json", + "payload": "{\"customerId\":\"12345\",\"firstName\":\"Anna\",\"lastName\":\"Schmidt\",\"email\":\"anna@example.com\"}" + } + }, + "v2_advanced": { + "summary": "Version 2.0 - Advanced with Relations", + "value": { + "mapping_configuration": { + "version": "2.0", + "mapping": { + "events": { + "ContractChanged": { + "entities": [ + { + "entity_schema": "contract", + "unique_ids": [ + "contract_number" + ], + "fields": [ + { + "attribute": "contract_number", + "field": "number" + }, + { + "attribute": "display_name", + "field": "displayName" + }, + { + "attribute": "billing_account", + "relations": { + "operation": "_set", + "items": [ + { + "entity_schema": "billing_account", + "_tags": [ + "PRIMARY" + ], + "unique_ids": [ + { + "attribute": "external_id", + "field": "customerAccountId" + } + ] + } + ] + } + } + ] + }, + { + "entity_schema": "meter", + "unique_ids": [ + "meter_number" + ], + "jsonataExpression": "meters.{\"number\": number, \"type\": meterType}", + "fields": [ + { + "attribute": "meter_number", + "field": "number" + }, + { + "attribute": "meter_type", + "field": "type" + } + ] + } + ] + } + } + } + }, + "object_type": "ContractChanged", + "format": "json", + "payload": "{\"number\":\"CTR-001\",\"displayName\":\"Premium Contract\",\"customerAccountId\":\"ACC-999\",\"meters\":[{\"number\":\"M-001\",\"meterType\":\"electricity\"},{\"number\":\"M-002\",\"meterType\":\"gas\"}]}" + } + }, + "v2_append_operation": { + "summary": "Version 2.0 - Using _append Operation", + "description": "Example showing how to use _append to add relations to existing entities", + "value": { + "mapping_configuration": { + "version": "2.0", + "mapping": { + "events": { + "ContactAdded": { + "entities": [ + { + "entity_schema": "contract", + "unique_ids": [ + "contract_number" + ], + "fields": [ + { + "attribute": "contract_number", + "field": "contractNumber" + }, + { + "attribute": "additional_contacts", + "relations": { + "operation": "_append", + "items": [ + { + "entity_schema": "contact", + "_tags": [ + "ADDITIONAL" + ], + "unique_ids": [ + { + "attribute": "email", + "field": "contactEmail" + } + ] + } + ] + } + } + ] + } + ] + } + } + } + }, + "object_type": "ContactAdded", + "format": "json", + "payload": "{\"contractNumber\":\"CTR-001\",\"contactEmail\":\"new.contact@example.com\"}" + } + }, + "v2_field_enabled": { + "summary": "Version 2.0 - Field-Level Conditional Processing", + "description": "Example showing how to conditionally enable/disable individual field mappings using the enabled property", + "value": { + "mapping_configuration": { + "version": "2.0", + "mapping": { + "events": { + "CustomerChanged": { + "entities": [ + { + "entity_schema": "contact", + "unique_ids": [ + "customer_number" + ], + "fields": [ + { + "attribute": "customer_number", + "field": "customerId" + }, + { + "attribute": "email", + "field": "email", + "enabled": true + }, + { + "attribute": "phone", + "field": "phone", + "enabled": "$exists(phone) and phone != ''" + }, + { + "attribute": "mobile", + "field": "mobile", + "enabled": "$exists(mobile)" + }, + { + "attribute": "vip_status", + "constant": "VIP", + "enabled": "vipFlag = true" + }, + { + "attribute": "internal_notes", + "field": "notes", + "enabled": false + }, + { + "attribute": "billing_account", + "enabled": "$exists(billingAccountId)", + "relations": { + "operation": "_set", + "items": [ + { + "entity_schema": "billing_account", + "unique_ids": [ + { + "attribute": "external_id", + "field": "billingAccountId" + } + ] + } + ] + } + } + ] + } + ] + } + } + } + }, + "object_type": "CustomerChanged", + "format": "json", + "payload": "{\"customerId\":\"12345\",\"email\":\"user@example.com\",\"phone\":\"\",\"mobile\":\"555-1234\",\"vipFlag\":true,\"notes\":\"Internal only\",\"billingAccountId\":\"ACC-999\"}" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successfully simulated mapping", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSimulationResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "422": { + "description": "Unprocessable entity - mapping configuration or payload validation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBase" + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations": { + "get": { + "operationId": "listIntegrations", + "summary": "listIntegrations", + "description": "Retrieve all integrations for the authenticated organization", + "tags": [ + "integrations" + ], + "responses": { + "200": { + "description": "Successfully retrieved integrations", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "integrations" + ], + "properties": { + "integrations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "post": { + "operationId": "createIntegration", + "summary": "createIntegration", + "description": "Create a new integration configuration", + "tags": [ + "integrations" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIntegrationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Integration created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations/{integrationId}": { + "get": { + "operationId": "getIntegration", + "summary": "getIntegration", + "description": "Retrieve a specific integration by its ID", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved integration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "description": "Integration not found" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "put": { + "operationId": "updateIntegration", + "summary": "updateIntegration", + "description": "Update an existing integration configuration", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIntegrationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Integration updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "description": "Integration not found" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deleteIntegration", + "summary": "deleteIntegration", + "description": "Delete an integration and all its use cases", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Integration deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "description": "Integration not found" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations/{integrationId}/events": { + "post": { + "operationId": "queryEvents", + "summary": "queryEvents", + "description": "Query events for a specific integration", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryEventsRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/QueryEventsResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations/{integrationId}/events/replay": { + "post": { + "operationId": "replayEvents", + "summary": "replayEvents", + "description": "Replay one or more events for a specific integration. Events will be re-processed with their original payloads but with a new correlation ID for traceability.", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReplayEventsRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/ReplayEventsResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations/{integrationId}/use-cases": { + "get": { + "operationId": "listUseCases", + "summary": "listUseCases", + "description": "Retrieve all use cases for a specific integration", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved use cases", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "use_cases" + ], + "properties": { + "use_cases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UseCase" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "post": { + "operationId": "createUseCase", + "summary": "createUseCase", + "description": "Create a new use case for an integration", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUseCaseRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Use case created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UseCase" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "description": "Integration not found" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations/{integrationId}/use-cases/{useCaseId}": { + "get": { + "operationId": "getUseCase", + "summary": "getUseCase", + "description": "Retrieve a specific use case by its ID", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "useCaseId", + "in": "path", + "required": true, + "description": "The use case ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved use case", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UseCase" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "description": "Use case not found" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "put": { + "operationId": "updateUseCase", + "summary": "updateUseCase", + "description": "Update an existing use case configuration", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "useCaseId", + "in": "path", + "required": true, + "description": "The use case ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUseCaseRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Use case updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UseCase" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "description": "Use case not found" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deleteUseCase", + "summary": "deleteUseCase", + "description": "Delete a use case from an integration", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "useCaseId", + "in": "path", + "required": true, + "description": "The use case ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Use case deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "description": "Use case not found" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations/{integrationId}/use-cases/{useCaseId}/history": { + "get": { + "operationId": "listUseCaseHistory", + "summary": "listUseCaseHistory", + "description": "Retrieve historical versions of a use case's configuration.\nHistory entries are returned in reverse chronological order (newest first).\nUse the 'cursor' parameter for pagination to fetch additional entries.\n", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "useCaseId", + "in": "path", + "required": true, + "description": "The use case ID", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "description": "Opaque pagination cursor. Pass the 'next_cursor' value from a previous\nresponse to fetch the next page of results.\n", + "schema": { + "type": "string" + }, + "example": "eyJwayI6Ik9SRyMxMjM0NSIsInNrIjoiSU5URUdSQVRJT04jLi4uIn0=" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved use case history", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "history" + ], + "properties": { + "history": { + "type": "array", + "description": "History entries in reverse chronological order (newest first)", + "items": { + "$ref": "#/components/schemas/UseCaseHistoryEntry" + } + }, + "next_cursor": { + "type": "string", + "description": "Opaque cursor for fetching the next page. Absent if no more pages." + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "description": "Use case not found" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/integrations": { + "get": { + "operationId": "listIntegrationsV2", + "summary": "listIntegrationsV2", + "description": "Retrieve all integrations with embedded use cases for the authenticated organization", + "tags": [ + "integrations" + ], + "responses": { + "200": { + "description": "Successfully retrieved integrations with use cases", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "integrations" + ], + "properties": { + "integrations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationWithUseCases" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "post": { + "operationId": "createIntegrationV2", + "summary": "createIntegrationV2", + "description": "Create a new integration with embedded use cases.\n", + "tags": [ + "integrations" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertIntegrationWithUseCasesRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Integration created successfully with use cases", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationWithUseCases" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/integrations/{integrationId}": { + "get": { + "operationId": "getIntegrationV2", + "summary": "getIntegrationV2", + "description": "Retrieve a specific integration with all its embedded use cases", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved integration with use cases", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationWithUseCases" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "description": "Integration not found" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "put": { + "operationId": "updateIntegrationV2", + "summary": "updateIntegrationV2", + "description": "Update an existing integration with embedded use cases.\nThe integration must already exist.\nUse cases are updated declaratively:\n- Use cases in the request with matching IDs are updated\n- Use cases in the request without matching IDs are created\n- Existing use cases not in the request are deleted\n", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID (client-provided)", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertIntegrationWithUseCasesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Integration updated successfully with use cases", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationWithUseCases" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "description": "Integration not found" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deleteIntegrationV2", + "summary": "deleteIntegrationV2", + "description": "Delete an integration and all its use cases", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Integration deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "description": "Integration not found" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations/{integrationId}/app-mapping": { + "put": { + "operationId": "setIntegrationAppMapping", + "summary": "setIntegrationAppMapping", + "description": "Creates or updates a mapping from an app/component to an integration.\nThis allows ERP updates sent via app_id and component_id to be associated\nwith a specific integration configuration.\n", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID to map to", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetIntegrationAppMappingRequest" + } + } + } + }, + "responses": { + "200": { + "description": "App mapping set successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationAppMapping" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "description": "Integration not found" + }, + "409": { + "description": "Mapping already exists (use overwrite=true to replace)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBase" + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deleteIntegrationAppMapping", + "summary": "deleteIntegrationAppMapping", + "description": "Removes a mapping from an app/component to an integration.\n", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID (used for authorization, must match the mapping)", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteIntegrationAppMappingRequest" + } + } + } + }, + "responses": { + "200": { + "description": "App mapping deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "description": "App mapping not found" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations/{integrationId}/monitoring/inbound-events": { + "post": { + "operationId": "queryInboundMonitoringEvents", + "summary": "queryInboundMonitoringEvents", + "description": "Query inbound monitoring events for a specific integration.\nReturns detailed information about inbound sync events from ERP systems,\nincluding success rates, error breakdowns, and processing metrics.\n", + "tags": [ + "monitoring", + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryInboundMonitoringEventsRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/QueryInboundMonitoringEventsResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations/{integrationId}/monitoring/stats": { + "post": { + "operationId": "getMonitoringStats", + "summary": "getMonitoringStats", + "description": "Get aggregated statistics for both inbound and outbound monitoring events for a specific integration.\nReturns summary metrics for inbound (ERP sync) and outbound (webhook delivery) events,\nincluding success/error counts and optional breakdowns.\n", + "tags": [ + "monitoring", + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMonitoringStatsRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/GetMonitoringStatsResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations/{integrationId}/monitoring/timeseries": { + "post": { + "operationId": "getMonitoringTimeSeries", + "summary": "getMonitoringTimeSeries", + "description": "Get time-series aggregated event counts for monitoring charts.\nReturns pre-bucketed counts at configurable intervals for both inbound and outbound events.\nMaximum of 200 buckets per request. Returns 400 if the time range and interval would exceed this limit.\n", + "tags": [ + "monitoring", + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMonitoringTimeSeriesRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/GetMonitoringTimeSeriesResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations/{integrationId}/outbound-status": { + "get": { + "operationId": "getOutboundStatus", + "summary": "getOutboundStatus", + "description": "Get the status of all outbound use cases for a specific integration.\nReturns conflict information when events or webhooks are disabled but the use case is enabled.\n", + "tags": [ + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved outbound status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OutboundStatusResponse" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations/{integrationId}/monitoring/access-logs": { + "post": { + "operationId": "queryAccessLogs", + "summary": "queryAccessLogs", + "description": "Query API access logs for a specific integration's organization.\nReturns access token usage analytics filtered by user_id (access token).\nSupports infinite scroll pagination with cursor-based navigation.\n", + "tags": [ + "monitoring", + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID (used for tenant authorization)", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryAccessLogsRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/QueryAccessLogsResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/integrations/{integrationId}/monitoring/outbound-events": { + "post": { + "operationId": "queryOutboundMonitoringEvents", + "summary": "queryOutboundMonitoringEvents", + "description": "Query outbound monitoring events for a specific integration.\nReturns detailed information about outbound event deliveries,\nfiltered by event_name (event_catalog_event) linked to the integration's outbound use cases.\n", + "tags": [ + "monitoring", + "integrations" + ], + "parameters": [ + { + "name": "integrationId", + "in": "path", + "required": true, + "description": "The integration ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryOutboundMonitoringEventsRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/QueryOutboundMonitoringEventsResponse" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + } + }, + "schemas": { + "ErrorResponseBase": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Computer-readable error code" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "ErpEvent": { + "type": "object", + "required": [ + "event_type", + "object_type", + "timestamp", + "format", + "payload" + ], + "properties": { + "event_type": { + "type": "string", + "enum": [ + "CREATE", + "UPDATE", + "DELETE" + ], + "description": "Type of event (create, update, delete)" + }, + "object_type": { + "type": "string", + "description": "Type of the object being updated (business_partner, contract_account, etc.). Corresponds to \"Event Name\" from the integration UI." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the event occurred" + }, + "format": { + "type": "string", + "enum": [ + "json", + "xml" + ], + "default": "json", + "description": "Format of the payload data" + }, + "payload": { + "oneOf": [ + { + "type": "string", + "minLength": 2, + "description": "The serialized object data payload (JSON, XML, etc.) as a string" + }, + { + "type": "object", + "minProperties": 1, + "description": "Direct JSON object (will be automatically serialized)", + "additionalProperties": true + } + ], + "description": "The object data payload - can be either a serialized string or a direct JSON object" + }, + "deduplication_id": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "minLength": 1, + "maxLength": 255, + "description": "Optional unique identifier for idempotency - prevents duplicate processing of the same event within 24 hours in context of the same integration. Must contain only alphanumeric characters, hyphens, and underscores.\n", + "example": "evt-2025-05-01-12345-create-bp" + } + } + }, + "ErpUpdatesEventsV2Request": { + "type": "object", + "required": [ + "integration_id", + "events" + ], + "properties": { + "integration_id": { + "type": "string", + "format": "uuid", + "description": "UUID that identifies the integration configuration to use" + }, + "correlation_id": { + "type": "string", + "description": "Optional ID that identifies the specific request for debugging purposes" + }, + "events": { + "type": "array", + "description": "List of ERP events to process", + "items": { + "$ref": "#/components/schemas/ErpEvent" + } + } + } + }, + "ErpEventV3": { + "type": "object", + "required": [ + "timestamp", + "format", + "payload" + ], + "anyOf": [ + { + "required": [ + "event_name" + ] + }, + { + "required": [ + "use_case_slug" + ] + } + ], + "properties": { + "event_name": { + "type": "string", + "description": "Event name from integration mapping (e.g., business_partner, contract_account). Required when use_case_slug is not provided.\n" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the event occurred" + }, + "format": { + "type": "string", + "enum": [ + "json", + "xml" + ], + "default": "json", + "description": "Format of the payload data" + }, + "payload": { + "oneOf": [ + { + "type": "string", + "minLength": 2, + "description": "The serialized object data payload (JSON, XML, etc.) as a string" + }, + { + "type": "object", + "minProperties": 1, + "description": "Direct JSON object (will be automatically serialized)", + "additionalProperties": true + } + ], + "description": "The object data payload - can be either a serialized string or a direct JSON object" + }, + "use_case_slug": { + "type": "string", + "pattern": "^[a-z0-9][a-z0-9_-]*$", + "minLength": 1, + "maxLength": 255, + "description": "Recommended. Use case slug for routing this event to the correct use case configuration. If provided, takes precedence over event_name for use case lookup. Preferred over event_name-based routing as slugs are portable across environments.\n" + }, + "deduplication_id": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "minLength": 1, + "maxLength": 255, + "description": "Optional unique identifier for idempotency - prevents duplicate processing of the same event within 24 hours in context of the same integration. Must contain only alphanumeric characters, hyphens, and underscores.\n", + "example": "evt-2025-05-01-12345-bp" + } + } + }, + "ErpUpdatesEventsV3Request": { + "type": "object", + "required": [ + "integration_id", + "events" + ], + "properties": { + "integration_id": { + "type": "string", + "format": "uuid", + "description": "UUID that identifies the integration configuration to use" + }, + "correlation_id": { + "type": "string", + "description": "Optional ID that identifies the specific request for debugging purposes" + }, + "events": { + "type": "array", + "description": "List of ERP events to process", + "items": { + "$ref": "#/components/schemas/ErpEventV3" + } + } + } + }, + "TriggerErpActionRequest": { + "type": "object", + "required": [ + "execution_id", + "org_id", + "webhook_id", + "flow_id", + "created_at", + "action_id", + "flow_action_id", + "flow_name", + "activity_id", + "entity_id" + ], + "properties": { + "execution_id": { + "type": "string", + "description": "Unique identifier of the current automation execution" + }, + "org_id": { + "type": "string", + "description": "Identifier of the organization where the automation is executed" + }, + "webhook_id": { + "type": "string", + "description": "Identifier of the self-service webhook configuration" + }, + "flow_id": { + "type": "string", + "description": "Identifier of the automation flow that triggered the action" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "ISO-8601 timestamp when the webhook event was created" + }, + "action_id": { + "type": "string", + "description": "Identifier of the automation action being executed" + }, + "flow_action_id": { + "type": "string", + "description": "Identifier of the specific automation flow action instance" + }, + "flow_name": { + "type": "string", + "description": "Human readable name of the automation flow" + }, + "activity_id": { + "type": "string", + "description": "Identifier of the entity activity related to this trigger" + }, + "entity_id": { + "type": "string", + "description": "Identifier of the entity referenced by the activity" + } + } + }, + "TriggerWebhookResp": { + "type": "object", + "properties": { + "status_code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "body": { + "type": "object" + }, + "code": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "succeeded", + "failed" + ] + }, + "start_date": { + "type": "string" + }, + "end_date": { + "type": "string" + }, + "event_id": { + "type": "string" + } + } + }, + "IntegrationEditableFields": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Integration name" + }, + "description": { + "type": "string", + "maxLength": 1000, + "description": "Optional description of the integration" + }, + "access_token_ids": { + "type": "array", + "description": "List of access token IDs associated with this integration", + "items": { + "type": "string" + } + }, + "app_ids": { + "type": "array", + "description": "List of app IDs associated with this integration", + "items": { + "type": "string" + } + }, + "environment_config": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentFieldConfig" + }, + "description": "Configuration defining environment variables needed by this integration. Values are stored in the Environments API." + }, + "settings": { + "$ref": "#/components/schemas/IntegrationSettings" + } + } + }, + "Integration": { + "allOf": [ + { + "type": "object", + "required": [ + "id", + "orgId", + "name", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "format": "uuid", + "readOnly": true, + "description": "Unique identifier for the integration" + }, + "orgId": { + "type": "string", + "readOnly": true, + "description": "Organization ID" + }, + "created_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "ISO-8601 timestamp when the integration was created" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "ISO-8601 timestamp when the integration was last updated" + } + } + }, + { + "$ref": "#/components/schemas/IntegrationEditableFields" + } + ] + }, + "CreateIntegrationRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/IntegrationEditableFields" + }, + { + "type": "object", + "required": [ + "name" + ] + } + ] + }, + "UpdateIntegrationRequest": { + "$ref": "#/components/schemas/IntegrationEditableFields" + }, + "EnvironmentFieldConfig": { + "type": "object", + "required": [ + "key", + "label", + "type" + ], + "properties": { + "key": { + "type": "string", + "description": "Environment variable key, used to look up the value in the Environments API.", + "pattern": "^[a-z0-9][a-z0-9_.\\-]{0,127}$" + }, + "label": { + "type": "string", + "description": "Display label for the field in the UI", + "minLength": 1, + "maxLength": 255 + }, + "type": { + "type": "string", + "enum": [ + "String", + "SecretString" + ], + "description": "Whether the value is a plain string or an encrypted secret" + }, + "description": { + "type": "string", + "description": "Help text shown below the field", + "maxLength": 1000 + }, + "required": { + "type": "boolean", + "default": false, + "description": "Whether this field must be filled before the integration can be used" + }, + "order": { + "type": "integer", + "minimum": 0, + "description": "Sort order for display and drag-to-reorder" + } + } + }, + "IntegrationSettings": { + "type": "object", + "description": "Settings for the integration", + "properties": { + "autoRefresh": { + "$ref": "#/components/schemas/AutoRefreshSettings" + } + } + }, + "AutoRefreshSettings": { + "type": "object", + "description": "Auto-refresh settings for keeping integration data fresh", + "properties": { + "enabled": { + "type": "boolean", + "default": false, + "description": "Whether auto-refresh is enabled" + }, + "freshnessThresholdMinutes": { + "type": "integer", + "minimum": 1, + "description": "Maximum age (in minutes) of data before it is considered stale and eligible for refresh" + } + } + }, + "SetIntegrationAppMappingRequest": { + "type": "object", + "required": [ + "app_id", + "component_id" + ], + "properties": { + "app_id": { + "type": "string", + "format": "uuid", + "description": "UUID of the integration app instance" + }, + "component_id": { + "type": "string", + "format": "uuid", + "description": "UUID of the integration app component instance" + }, + "overwrite": { + "type": "boolean", + "default": false, + "description": "If true, overwrites existing mapping. If false and mapping exists, returns 409 Conflict." + } + } + }, + "DeleteIntegrationAppMappingRequest": { + "type": "object", + "required": [ + "app_id", + "component_id" + ], + "properties": { + "app_id": { + "type": "string", + "format": "uuid", + "description": "UUID of the integration app instance" + }, + "component_id": { + "type": "string", + "format": "uuid", + "description": "UUID of the integration app component instance" + } + } + }, + "IntegrationAppMapping": { + "type": "object", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "string", + "format": "uuid", + "description": "The integration ID this app/component is mapped to" + } + } + }, + "IntegrationWithUseCases": { + "allOf": [ + { + "$ref": "#/components/schemas/Integration" + }, + { + "type": "object", + "description": "Integration with embedded use cases for atomic CRUD operations", + "required": [ + "use_cases" + ], + "properties": { + "use_cases": { + "type": "array", + "description": "All use cases belonging to this integration", + "items": { + "$ref": "#/components/schemas/UseCase" + } + } + } + } + ] + }, + "UpsertIntegrationWithUseCasesRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/IntegrationEditableFields" + }, + { + "type": "object", + "description": "Request to create or update an integration with embedded use cases (upsert).\nThis is a declarative operation - the request represents the desired state.\n", + "required": [ + "name" + ], + "properties": { + "use_cases": { + "type": "array", + "description": "Full list of use cases (declarative). This replaces ALL existing use cases.\n- Use cases with an `id` field matching an existing use case will be updated\n- Use cases without an `id` or with a non-matching `id` will be created\n- Existing use cases not in this list will be deleted\n", + "items": { + "$ref": "#/components/schemas/EmbeddedUseCaseRequest" + } + } + } + } + ] + }, + "InboundIntegrationEventConfiguration": { + "type": "object", + "description": "Configuration for inbound use cases (ERP to epilot)", + "properties": { + "entities": { + "type": "array", + "description": "Array of entity configurations for this event", + "items": { + "$ref": "#/components/schemas/IntegrationEntity" + } + }, + "meter_readings": { + "type": "array", + "description": "Array of meter reading configurations for this event", + "items": { + "$ref": "#/components/schemas/IntegrationMeterReading" + } + } + } + }, + "OutboundIntegrationEventConfiguration": { + "type": "object", + "required": [ + "event_catalog_event", + "mappings" + ], + "description": "Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings.", + "properties": { + "event_catalog_event": { + "type": "string", + "description": "The Event Catalog event name that triggers this outbound flow", + "example": "contract.created" + }, + "mappings": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/OutboundMapping" + }, + "description": "List of mappings that transform and deliver the event" + } + } + }, + "IntegrationEntity": { + "type": "object", + "required": [ + "entity_schema", + "unique_ids", + "fields" + ], + "properties": { + "entity_schema": { + "type": "string", + "description": "Target entity schema (e.g., 'contact', 'contract')" + }, + "unique_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of attribute names that uniquely identify this entity.\nThe _type hint for repeatable fields (e.g., email, phone) should be specified\non the corresponding field definition in the fields array.\n" + }, + "jsonataExpression": { + "type": "string", + "description": "Optional JSONata expression to pre-process the event data before field mapping" + }, + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "description": "Controls whether this entity mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean." + }, + "mode": { + "type": "string", + "enum": [ + "upsert", + "delete", + "purge", + "upsert-prune-scope-purge", + "upsert-prune-scope-delete" + ], + "default": "upsert", + "description": "Operation mode for entity mapping:\n- 'upsert': Create or update the entity (default)\n- 'delete': Soft delete the entity (marks as deleted)\n- 'purge': Hard delete the entity (permanent removal)\n- 'upsert-prune-scope-purge': Upsert entities from array, then purge entities in scope that weren't upserted\n- 'upsert-prune-scope-delete': Upsert entities from array, then soft delete entities in scope that weren't upserted\n" + }, + "scope": { + "$ref": "#/components/schemas/PruneScopeConfig" + }, + "fields": { + "type": "array", + "description": "Field mapping definitions", + "items": { + "$ref": "#/components/schemas/IntegrationEntityField" + } + } + } + }, + "IntegrationMeterReading": { + "type": "object", + "required": [ + "meter", + "fields" + ], + "properties": { + "jsonataExpression": { + "type": "string", + "description": "Optional JSONata expression to extract meter reading items from the event data.\nIf not provided, the entire payload is used as the reading data.\nUseful when you need to extract an array of readings from a nested structure (e.g., \"$.readings\").\n" + }, + "reading_matching": { + "type": "string", + "enum": [ + "external_id", + "strict-date" + ], + "default": "external_id", + "description": "Strategy for matching incoming readings against existing readings.\n- 'external_id': Match readings by external_id attribute (default behavior)\n- 'strict-date': Match by meter_id + counter_id + direction + date (German timezone).\n Useful when readings originate from ECP and are echoed back by the ERP with truncated timestamps.\n" + }, + "mode": { + "type": "string", + "enum": [ + "upsert", + "delete", + "upsert-prune-scope" + ], + "default": "upsert", + "description": "Operation mode for meter reading mapping:\n- 'upsert': Create or update meter readings (default)\n- 'delete': Delete the meter reading\n- 'upsert-prune-scope': Upsert readings from array, then delete all other readings for the same meter+counter that weren't upserted\n" + }, + "scope": { + "$ref": "#/components/schemas/MeterReadingPruneScopeConfig" + }, + "meter": { + "$ref": "#/components/schemas/MeterUniqueIdsConfig" + }, + "meter_counter": { + "$ref": "#/components/schemas/MeterUniqueIdsConfig" + }, + "fields": { + "type": "array", + "description": "Field mapping definitions for meter reading attributes", + "items": { + "$ref": "#/components/schemas/IntegrationEntityField" + } + } + } + }, + "PruneScopeConfig": { + "type": "object", + "description": "Scope configuration for upsert-prune-scope modes.\nDefines how to find entities that should be pruned if not in the upsert payload.\nThe scope is resolved against the original event payload (not individual array items).\n", + "required": [ + "scope_mode" + ], + "properties": { + "scope_mode": { + "type": "string", + "enum": [ + "relations", + "query" + ], + "description": "Scope mode for finding entities to prune:\n- 'relations': Find scope by looking at all entities related to a specific entity (both direct and reverse relations)\n- 'query': Find scope entities directly via query parameters\n" + }, + "schema": { + "type": "string", + "description": "For 'relations' mode: The schema of the entity to find (e.g., 'billing_account').\nNot used for 'query' mode.\n" + }, + "unique_ids": { + "type": "array", + "description": "For 'relations' mode: How to identify the scope entity from the payload.\nNot used for 'query' mode.\n", + "items": { + "$ref": "#/components/schemas/RelationUniqueIdField" + } + }, + "query": { + "type": "array", + "description": "For 'query' mode: Direct query parameters to find scope entities.\nNot used for 'relations' or 'reverse-relations' modes.\n", + "items": { + "$ref": "#/components/schemas/RelationUniqueIdField" + } + } + } + }, + "MeterReadingPruneScopeConfig": { + "type": "object", + "description": "Scope configuration for meter reading upsert-prune-scope mode.\nThe scope is all readings for the same meter + counter.\n", + "properties": { + "source": { + "type": "string", + "description": "Optional source filter. When set, only readings with this source\nare eligible for pruning (e.g., 'ERP' to only prune ERP-synced readings).\n" + } + } + }, + "MeterUniqueIdsConfig": { + "type": "object", + "required": [ + "unique_ids" + ], + "properties": { + "unique_ids": { + "type": "array", + "minItems": 1, + "description": "Array of unique identifier field mappings", + "items": { + "$ref": "#/components/schemas/RelationUniqueIdField" + } + } + } + }, + "IntegrationEntityField": { + "type": "object", + "required": [ + "attribute" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Target attribute name" + }, + "field": { + "type": "string", + "description": "Source field name or JSONPath expression (if starts with $)" + }, + "jsonataExpression": { + "type": "string", + "description": "JSONata expression for transformation" + }, + "constant": { + "description": "Constant value to assign (any type)" + }, + "_type": { + "$ref": "#/components/schemas/RepeatableFieldType" + }, + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "description": "Controls whether this field mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean. Defaults to true if omitted." + }, + "relations": { + "$ref": "#/components/schemas/RelationConfig" + }, + "relation_refs": { + "$ref": "#/components/schemas/RelationRefsConfig" + }, + "file_proxy_url": { + "$ref": "#/components/schemas/FileProxyUrlConfig" + } + } + }, + "FileProxyUrlParam": { + "description": "Parameter for file proxy URL. Exactly one of field, constant, or jsonataExpression must be set.", + "oneOf": [ + { + "type": "object", + "required": [ + "field" + ], + "properties": { + "field": { + "type": "string", + "description": "Source field name or JSONPath expression (if starts with $)" + } + } + }, + { + "type": "object", + "required": [ + "constant" + ], + "properties": { + "constant": { + "description": "Constant value (any type, stringified for URL)" + } + } + }, + { + "type": "object", + "required": [ + "jsonataExpression" + ], + "properties": { + "jsonataExpression": { + "type": "string", + "description": "JSONata expression for transformation" + } + } + } + ] + }, + "FileProxyUrlParams": { + "type": "object", + "description": "Custom query parameters. Keys become URL param names, values resolved from payload.", + "additionalProperties": { + "$ref": "#/components/schemas/FileProxyUrlParam" + } + }, + "FileProxyUrlConfig": { + "description": "Auto-constructs a file proxy download URL. orgId and integrationId are injected from context. Exactly one of use_case_id or use_case_slug must be provided. Using use_case_slug is recommended as it is portable across environments.\n", + "oneOf": [ + { + "type": "object", + "required": [ + "use_case_slug" + ], + "properties": { + "use_case_slug": { + "type": "string", + "pattern": "^[a-z0-9][a-z0-9_-]*$", + "description": "Recommended. Slug of the file_proxy use case. Maps to useCaseSlug query parameter. Portable across environments.\n" + }, + "params": { + "$ref": "#/components/schemas/FileProxyUrlParams" + } + } + }, + { + "type": "object", + "required": [ + "use_case_id" + ], + "properties": { + "use_case_id": { + "type": "string", + "description": "Legacy. UUID of the file_proxy use case. Maps to useCaseId query parameter. Prefer use_case_slug for portable configuration.\n" + }, + "params": { + "$ref": "#/components/schemas/FileProxyUrlParams" + } + } + } + ] + }, + "EmbeddedUseCaseRequest": { + "oneOf": [ + { + "$ref": "#/components/schemas/EmbeddedInboundUseCaseRequest" + }, + { + "$ref": "#/components/schemas/EmbeddedOutboundUseCaseRequest" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "inbound": "#/components/schemas/EmbeddedInboundUseCaseRequest", + "outbound": "#/components/schemas/EmbeddedOutboundUseCaseRequest" + } + } + }, + "EmbeddedUseCaseRequestBase": { + "type": "object", + "required": [ + "name", + "type", + "enabled" + ], + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Optional use case ID for update matching.\n- If provided and matches an existing use case, that use case is updated\n- If provided but no match, a new use case with this ID is created\n- If omitted, a new use case with auto-generated ID is created\n" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Use case name" + }, + "slug": { + "type": "string", + "pattern": "^[a-z0-9][a-z0-9_-]*$", + "minLength": 1, + "maxLength": 255, + "description": "URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Must be unique per integration. Immutable after creation.\n" + }, + "enabled": { + "type": "boolean", + "description": "Whether the use case is enabled" + }, + "change_description": { + "type": "string", + "maxLength": 2000, + "description": "Optional description of this change (like a commit message)" + } + } + }, + "EmbeddedInboundUseCaseRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/EmbeddedUseCaseRequestBase" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "inbound" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/InboundIntegrationEventConfiguration" + } + } + } + ] + }, + "EmbeddedOutboundUseCaseRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/EmbeddedUseCaseRequestBase" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "outbound" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/OutboundIntegrationEventConfiguration" + } + } + } + ] + }, + "UseCaseBase": { + "type": "object", + "required": [ + "id", + "integrationId", + "name", + "type", + "enabled", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the use case" + }, + "integrationId": { + "type": "string", + "format": "uuid", + "description": "Parent integration ID" + }, + "name": { + "type": "string", + "description": "Use case name" + }, + "slug": { + "type": "string", + "pattern": "^[a-z0-9][a-z0-9_-]*$", + "minLength": 1, + "maxLength": 255, + "description": "URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only.\n" + }, + "type": { + "type": "string", + "enum": [ + "inbound", + "outbound", + "file_proxy" + ], + "description": "Use case type" + }, + "enabled": { + "type": "boolean" + }, + "change_description": { + "type": "string", + "maxLength": 2000, + "description": "Description of the last change made to this use case" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "ISO-8601 timestamp when the use case was created" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "ISO-8601 timestamp when the use case was last updated" + } + } + }, + "InboundUseCase": { + "allOf": [ + { + "$ref": "#/components/schemas/UseCaseBase" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "inbound" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/InboundIntegrationEventConfiguration" + } + } + } + ] + }, + "OutboundUseCase": { + "allOf": [ + { + "$ref": "#/components/schemas/UseCaseBase" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "outbound" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/OutboundIntegrationEventConfiguration" + } + } + } + ] + }, + "FileProxyUseCase": { + "allOf": [ + { + "$ref": "#/components/schemas/UseCaseBase" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_proxy" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/FileProxyUseCaseConfiguration" + } + } + } + ] + }, + "UseCase": { + "oneOf": [ + { + "$ref": "#/components/schemas/InboundUseCase" + }, + { + "$ref": "#/components/schemas/OutboundUseCase" + }, + { + "$ref": "#/components/schemas/FileProxyUseCase" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "inbound": "#/components/schemas/InboundUseCase", + "outbound": "#/components/schemas/OutboundUseCase", + "file_proxy": "#/components/schemas/FileProxyUseCase" + } + } + }, + "CreateUseCaseRequest": { + "oneOf": [ + { + "$ref": "#/components/schemas/CreateInboundUseCaseRequest" + }, + { + "$ref": "#/components/schemas/CreateOutboundUseCaseRequest" + }, + { + "$ref": "#/components/schemas/CreateFileProxyUseCaseRequest" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "inbound": "#/components/schemas/CreateInboundUseCaseRequest", + "outbound": "#/components/schemas/CreateOutboundUseCaseRequest", + "file_proxy": "#/components/schemas/CreateFileProxyUseCaseRequest" + } + } + }, + "CreateUseCaseRequestBase": { + "type": "object", + "required": [ + "name", + "type", + "enabled" + ], + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Use case name" + }, + "slug": { + "type": "string", + "pattern": "^[a-z0-9][a-z0-9_-]*$", + "minLength": 1, + "maxLength": 255, + "description": "URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Must be unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only.\n" + }, + "enabled": { + "type": "boolean", + "description": "Whether the use case is enabled" + } + } + }, + "CreateInboundUseCaseRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/CreateUseCaseRequestBase" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "inbound" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/InboundIntegrationEventConfiguration" + } + } + } + ] + }, + "CreateOutboundUseCaseRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/CreateUseCaseRequestBase" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "outbound" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/OutboundIntegrationEventConfiguration" + } + } + } + ] + }, + "CreateFileProxyUseCaseRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/CreateUseCaseRequestBase" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_proxy" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/FileProxyUseCaseConfiguration" + } + } + } + ] + }, + "UpdateUseCaseRequest": { + "oneOf": [ + { + "$ref": "#/components/schemas/UpdateInboundUseCaseRequest" + }, + { + "$ref": "#/components/schemas/UpdateOutboundUseCaseRequest" + }, + { + "$ref": "#/components/schemas/UpdateFileProxyUseCaseRequest" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "inbound": "#/components/schemas/UpdateInboundUseCaseRequest", + "outbound": "#/components/schemas/UpdateOutboundUseCaseRequest", + "file_proxy": "#/components/schemas/UpdateFileProxyUseCaseRequest" + } + } + }, + "UpdateUseCaseRequestBase": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Use case name" + }, + "slug": { + "type": "string", + "pattern": "^[a-z0-9][a-z0-9_-]*$", + "minLength": 1, + "maxLength": 255, + "description": "URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Can only be set once on use cases that don't have a slug yet. Immutable after being set.\n" + }, + "enabled": { + "type": "boolean", + "description": "Whether the use case is enabled" + }, + "change_description": { + "type": "string", + "maxLength": 2000, + "description": "Optional description of this change (like a commit message)" + } + } + }, + "UpdateInboundUseCaseRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateUseCaseRequestBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "inbound" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/InboundIntegrationEventConfiguration" + } + } + } + ] + }, + "UpdateOutboundUseCaseRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateUseCaseRequestBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "outbound" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/OutboundIntegrationEventConfiguration" + } + } + } + ] + }, + "UpdateFileProxyUseCaseRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateUseCaseRequestBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "file_proxy" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/FileProxyUseCaseConfiguration" + } + } + } + ] + }, + "UseCaseHistoryEntry": { + "oneOf": [ + { + "$ref": "#/components/schemas/InboundUseCaseHistoryEntry" + }, + { + "$ref": "#/components/schemas/OutboundUseCaseHistoryEntry" + }, + { + "$ref": "#/components/schemas/FileProxyUseCaseHistoryEntry" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "inbound": "#/components/schemas/InboundUseCaseHistoryEntry", + "outbound": "#/components/schemas/OutboundUseCaseHistoryEntry", + "file_proxy": "#/components/schemas/FileProxyUseCaseHistoryEntry" + } + } + }, + "UseCaseHistoryEntryBase": { + "type": "object", + "required": [ + "id", + "useCaseId", + "integrationId", + "name", + "type", + "enabled", + "created_at", + "updated_at", + "history_created_at" + ], + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for this history entry" + }, + "useCaseId": { + "type": "string", + "format": "uuid", + "description": "Reference to the parent use case" + }, + "integrationId": { + "type": "string", + "format": "uuid", + "description": "Parent integration ID" + }, + "name": { + "type": "string", + "description": "Use case name at this point in history" + }, + "slug": { + "type": "string", + "description": "Use case slug at this point in history" + }, + "enabled": { + "type": "boolean", + "description": "Whether the use case was enabled at this point in history" + }, + "change_description": { + "type": "string", + "description": "Description of the change that was made at this point in history" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "ISO-8601 timestamp when the use case was originally created" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "ISO-8601 timestamp of this historical snapshot (before the update)" + }, + "history_created_at": { + "type": "string", + "format": "date-time", + "description": "ISO-8601 timestamp when this history entry was created" + } + } + }, + "InboundUseCaseHistoryEntry": { + "allOf": [ + { + "$ref": "#/components/schemas/UseCaseHistoryEntryBase" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "inbound" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/InboundIntegrationEventConfiguration" + } + } + } + ] + }, + "OutboundUseCaseHistoryEntry": { + "allOf": [ + { + "$ref": "#/components/schemas/UseCaseHistoryEntryBase" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "outbound" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/OutboundIntegrationEventConfiguration" + } + } + } + ] + }, + "FileProxyUseCaseHistoryEntry": { + "allOf": [ + { + "$ref": "#/components/schemas/UseCaseHistoryEntryBase" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_proxy" + ], + "description": "Use case type" + }, + "configuration": { + "$ref": "#/components/schemas/FileProxyUseCaseConfiguration" + } + } + } + ] + }, + "FileProxyUseCaseConfiguration": { + "type": "object", + "required": [ + "steps", + "response" + ], + "description": "Configuration for file_proxy use cases. Defines how to authenticate and fetch files from external document systems.\n\nThe file proxy download URL always requires `orgId`, `integrationId`, and either `useCaseSlug` (recommended) or `useCaseId` (legacy UUID) as query parameters.\nThe `orgId` is included in the signed URL to establish organization context without requiring authentication.\nAdditional use-case-specific parameters are declared in the `params` array.\n", + "properties": { + "requires_vpc": { + "type": "boolean", + "readOnly": true, + "description": "Whether requests require VPC routing for IP allowlisting. Read-only after creation — can only be modified directly in DynamoDB.", + "default": false + }, + "auth": { + "$ref": "#/components/schemas/FileProxyAuth" + }, + "params": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileProxyParam" + }, + "description": "Additional use-case-specific parameters expected in the download URL query string (beyond the required orgId, integrationId, and useCaseSlug or useCaseId)" + }, + "steps": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/FileProxyStep" + }, + "description": "Ordered list of HTTP steps to execute to retrieve the file" + }, + "response": { + "$ref": "#/components/schemas/FileProxyResponseConfig" + } + } + }, + "FileProxyAuth": { + "type": "object", + "required": [ + "type", + "token_url", + "client_id", + "client_secret" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2_client_credentials", + "oauth2_password" + ], + "description": "Authentication type" + }, + "token_url": { + "type": "string", + "description": "Handlebars template for the OAuth2 token endpoint URL" + }, + "client_id": { + "type": "string", + "description": "Handlebars template for the OAuth2 client ID" + }, + "client_secret": { + "type": "string", + "description": "Handlebars template for the OAuth2 client secret" + }, + "scope": { + "type": "string", + "description": "Optional OAuth2 scope" + }, + "audience": { + "type": "string", + "description": "Handlebars template for the OAuth2 audience parameter" + }, + "resource": { + "type": "string", + "description": "Handlebars template for the OAuth2 resource parameter" + }, + "username": { + "type": "string", + "description": "Handlebars template for the OAuth2 resource owner username. Required when type is oauth2_password." + }, + "password": { + "type": "string", + "description": "Handlebars template for the OAuth2 resource owner password. Required when type is oauth2_password." + }, + "body_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional key-value pairs to include in the token request body. Values support Handlebars templates." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional headers to include in the token request. Values support Handlebars templates." + }, + "query_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional query parameters to append to the token URL. Values support Handlebars templates." + } + } + }, + "FileProxyParam": { + "type": "object", + "required": [ + "name", + "required" + ], + "properties": { + "name": { + "type": "string", + "description": "Parameter name as it appears in the query string" + }, + "required": { + "type": "boolean", + "description": "Whether this parameter is required" + }, + "description": { + "type": "string", + "description": "Human-readable description of the parameter" + } + } + }, + "FileProxyStep": { + "type": "object", + "required": [ + "url", + "method", + "response_type" + ], + "properties": { + "url": { + "type": "string", + "description": "Handlebars template for the request URL" + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST" + ], + "description": "HTTP method" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Handlebars templates for request headers" + }, + "body": { + "type": "string", + "description": "Handlebars template for the request body (POST only)" + }, + "response_type": { + "type": "string", + "enum": [ + "json", + "binary" + ], + "description": "Expected response type" + } + } + }, + "FileProxyResponseConfig": { + "type": "object", + "required": [ + "body", + "encoding" + ], + "properties": { + "body": { + "type": "string", + "description": "JSONata expression to extract file content from step results" + }, + "encoding": { + "type": "string", + "enum": [ + "base64", + "binary" + ], + "description": "Encoding of the extracted body" + }, + "filename": { + "type": "string", + "description": "JSONata expression to extract the filename" + }, + "content_type": { + "type": "string", + "description": "JSONata expression to extract the content type" + } + } + }, + "MappingSimulationRequest": { + "type": "object", + "required": [ + "mapping_configuration", + "object_type", + "format", + "payload" + ], + "properties": { + "mapping_configuration": { + "oneOf": [ + { + "$ref": "#/components/schemas/IntegrationConfigurationV1" + }, + { + "$ref": "#/components/schemas/IntegrationConfigurationV2" + } + ] + }, + "object_type": { + "type": "string", + "description": "Type of the object/event being mapped.\nFor v1.0: must match a key in mapping_configuration.mapping.objects\nFor v2.0: must match a key in mapping_configuration.mapping.events\n" + }, + "format": { + "type": "string", + "enum": [ + "json", + "xml" + ], + "default": "json", + "description": "Format of the payload data" + }, + "payload": { + "oneOf": [ + { + "type": "string", + "description": "The serialized object data payload (JSON, XML, etc.) as a string" + }, + { + "type": "object", + "description": "Direct JSON object (will be automatically serialized)", + "additionalProperties": true + } + ], + "description": "The object data payload - can be either a serialized string or a direct JSON object" + } + } + }, + "MappingSimulationV2Request": { + "type": "object", + "description": "Request for v2 mapping simulation. Uses the same configuration format stored in integration use case resources,\nmaking it easier to test configurations before saving them.\n", + "required": [ + "event_configuration", + "format", + "payload" + ], + "properties": { + "event_configuration": { + "$ref": "#/components/schemas/InboundIntegrationEventConfiguration" + }, + "format": { + "type": "string", + "enum": [ + "json", + "xml" + ], + "default": "json", + "description": "Format of the payload data" + }, + "payload": { + "oneOf": [ + { + "type": "string", + "description": "The serialized event data payload (JSON, XML, etc.) as a string" + }, + { + "type": "object", + "description": "Direct JSON object (will be automatically serialized)", + "additionalProperties": true + } + ], + "description": "The event data payload - can be either a serialized string or a direct JSON object" + } + } + }, + "MappingSimulationResponse": { + "type": "object", + "required": [ + "entity_updates" + ], + "properties": { + "entity_updates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityUpdate" + } + }, + "meter_readings_updates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MeterReadingUpdate" + } + }, + "warnings": { + "type": "array", + "description": "Validation warnings about the configuration (e.g., unique_ids referencing non-indexed fields)", + "items": { + "$ref": "#/components/schemas/MappingSimulationWarning" + } + } + } + }, + "MappingSimulationWarning": { + "type": "object", + "required": [ + "entity_schema", + "field", + "message" + ], + "properties": { + "entity_schema": { + "type": "string", + "description": "The entity schema slug where the issue was found" + }, + "field": { + "type": "string", + "description": "The field name that caused the warning" + }, + "message": { + "type": "string", + "description": "Description of the validation issue" + } + } + }, + "EntityUpdate": { + "type": "object", + "required": [ + "entity_slug", + "unique_identifiers", + "attributes" + ], + "properties": { + "entity_slug": { + "type": "string", + "description": "The entity type slug" + }, + "unique_identifiers": { + "type": "object", + "description": "Unique identifier mappings for this entity", + "additionalProperties": true + }, + "attributes": { + "type": "object", + "description": "Mapped attribute values", + "additionalProperties": true + } + } + }, + "MeterReadingUpdate": { + "type": "object", + "required": [ + "meter", + "attributes" + ], + "properties": { + "meter": { + "type": "object", + "required": [ + "$entity_unique_ids" + ], + "properties": { + "$entity_unique_ids": { + "type": "object", + "additionalProperties": true, + "description": "Unique identifiers for the meter" + } + } + }, + "meter_counter": { + "type": "object", + "properties": { + "$entity_unique_ids": { + "type": "object", + "additionalProperties": true, + "description": "Unique identifiers for the meter counter" + } + } + }, + "attributes": { + "type": "object", + "additionalProperties": true, + "description": "Meter reading attributes. Required: external_id, timestamp, source, value. `source` must be one of: ECP, ERP, 360, journey-submission. `reason` (optional) must be one of: regular, irregular, last, first, meter_change, contract_change, meter_adjustment (or empty/null)." + } + } + }, + "IntegrationConfigurationV1": { + "type": "object", + "required": [ + "mapping" + ], + "properties": { + "version": { + "type": "string", + "enum": [ + "1.0" + ], + "default": "1.0", + "description": "Mapping specification version" + }, + "mapping": { + "type": "object", + "required": [ + "objects" + ], + "properties": { + "objects": { + "type": "object", + "description": "[v1.0] Object type mappings", + "additionalProperties": { + "$ref": "#/components/schemas/IntegrationObjectV1" + } + } + } + } + } + }, + "IntegrationObjectV1": { + "type": "object", + "required": [ + "unique_ids", + "fields" + ], + "properties": { + "unique_ids": { + "type": "object", + "description": "Mapping of entity types to their unique identifier field mappings", + "additionalProperties": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string", + "description": "List of local keys (must be present under the mapping \"fields\"!)" + } + }, + { + "type": "object", + "description": "Map of remote keys to local entity keys", + "additionalProperties": { + "type": "string" + } + } + ] + } + }, + "fields": { + "type": "array", + "description": "Field mapping definitions", + "items": { + "$ref": "#/components/schemas/IntegrationFieldV1" + } + } + } + }, + "IntegrationFieldV1": { + "type": "object", + "required": [ + "entity", + "attribute" + ], + "properties": { + "entity": { + "type": "string", + "description": "Target entity slug" + }, + "attribute": { + "type": "string", + "description": "Target attribute name" + }, + "field": { + "type": "string", + "description": "Source field name (mutually exclusive with jsonataExpression)" + }, + "jsonataExpression": { + "type": "string", + "description": "JSONata expression for transformation (mutually exclusive with field)" + } + } + }, + "IntegrationConfigurationV2": { + "type": "object", + "required": [ + "version", + "mapping" + ], + "properties": { + "version": { + "type": "string", + "enum": [ + "2.0" + ], + "description": "Mapping specification version" + }, + "mapping": { + "type": "object", + "required": [ + "events" + ], + "properties": { + "events": { + "type": "object", + "description": "[v2.0] Event type mappings", + "additionalProperties": { + "$ref": "#/components/schemas/InboundIntegrationEventConfiguration" + } + } + } + } + } + }, + "OutboundMapping": { + "type": "object", + "required": [ + "id", + "name", + "jsonata_expression", + "enabled", + "delivery" + ], + "description": "A mapping that transforms an event and delivers it to a webhook", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for this mapping" + }, + "name": { + "type": "string", + "description": "Human-readable name for this mapping", + "example": "ERP Contract Sync" + }, + "jsonata_expression": { + "type": "string", + "description": "JSONata expression to transform the event payload", + "example": "{ \"id\": entity._id, \"customer\": entity.customer_name }" + }, + "enabled": { + "type": "boolean", + "description": "Whether this mapping is active", + "default": true + }, + "delivery": { + "$ref": "#/components/schemas/DeliveryConfig" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the mapping was created" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the mapping was last updated" + } + } + }, + "DeliveryConfig": { + "type": "object", + "required": [ + "type", + "webhook_id" + ], + "description": "Configuration for how the transformed event should be delivered", + "properties": { + "type": { + "type": "string", + "enum": [ + "webhook" + ], + "description": "Delivery mechanism type (currently only webhook is supported)" + }, + "webhook_id": { + "type": "string", + "description": "Reference to the webhook configuration in svc-webhooks" + }, + "webhook_name": { + "type": "string", + "description": "Cached webhook name for display purposes" + }, + "webhook_url": { + "type": "string", + "description": "Cached webhook URL for display purposes" + } + } + }, + "OutboundStatusResponse": { + "type": "object", + "required": [ + "useCases" + ], + "properties": { + "useCases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OutboundUseCaseStatus" + } + } + } + }, + "OutboundUseCaseStatus": { + "type": "object", + "required": [ + "useCaseId", + "name", + "useCaseEnabled", + "status" + ], + "properties": { + "useCaseId": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the use case" + }, + "name": { + "type": "string", + "description": "Human-readable name of the use case" + }, + "useCaseEnabled": { + "type": "boolean", + "description": "Whether the use case is enabled" + }, + "eventCatalogEvent": { + "type": "string", + "description": "The Event Catalog event name that triggers this outbound flow", + "example": "contract.created" + }, + "eventEnabled": { + "type": "boolean", + "nullable": true, + "description": "Whether the event is enabled in Event Catalog. Null if the API is unreachable." + }, + "webhooks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookStatus" + } + }, + "status": { + "type": "string", + "enum": [ + "ok", + "conflict", + "disabled" + ], + "description": "Overall status of the use case:\n- 'ok': Use case is enabled and all dependencies are properly configured\n- 'conflict': Use case has configuration issues (disabled events/webhooks while enabled)\n- 'disabled': Use case is disabled\n" + }, + "conflicts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OutboundConflict" + }, + "description": "List of detected conflicts, if any" + } + } + }, + "WebhookStatus": { + "type": "object", + "required": [ + "webhookId" + ], + "properties": { + "webhookId": { + "type": "string", + "description": "Unique identifier for the webhook" + }, + "webhookName": { + "type": "string", + "description": "Human-readable name of the webhook" + }, + "enabled": { + "type": "boolean", + "nullable": true, + "description": "Whether the webhook is enabled. Null if the API is unreachable." + } + } + }, + "OutboundConflict": { + "type": "object", + "required": [ + "type", + "message" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "event_disabled", + "all_webhooks_disabled", + "event_enabled_while_disabled", + "webhook_enabled_while_disabled" + ], + "description": "Type of conflict:\n- 'event_disabled': Event catalog event is disabled while use case is enabled\n- 'all_webhooks_disabled': All webhooks are disabled while use case is enabled\n- 'event_enabled_while_disabled': Event is enabled while use case is disabled\n- 'webhook_enabled_while_disabled': A webhook is enabled while use case is disabled\n" + }, + "webhookId": { + "type": "string", + "description": "Webhook ID (only present for webhook_enabled_while_disabled conflicts)" + }, + "message": { + "type": "string", + "description": "Human-readable description of the conflict" + } + } + }, + "RelationConfig": { + "type": "object", + "required": [ + "operation" + ], + "properties": { + "operation": { + "type": "string", + "enum": [ + "_set", + "_append", + "_append_all" + ], + "description": "Relation operation:\n- '_set': Replace all existing relations with the specified items\n- '_append': Add new unique items to existing relations (deduplicates by entity_id)\n- '_append_all': Add all items to existing relations (no deduplication, allows duplicates)\n" + }, + "items": { + "type": "array", + "description": "Array of relation item configurations", + "items": { + "$ref": "#/components/schemas/RelationItemConfig" + } + }, + "jsonataExpression": { + "type": "string", + "description": "JSONata expression that returns relation items array (alternative to 'items')" + } + } + }, + "RelationItemConfig": { + "type": "object", + "required": [ + "entity_schema", + "unique_ids" + ], + "properties": { + "entity_schema": { + "type": "string", + "description": "Related entity schema" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional tags for this relation" + }, + "unique_ids": { + "type": "array", + "description": "Unique identifier mappings for the related entity", + "items": { + "$ref": "#/components/schemas/RelationUniqueIdField" + } + } + } + }, + "RelationUniqueIdField": { + "type": "object", + "required": [ + "attribute" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Target attribute name in the related entity" + }, + "_type": { + "$ref": "#/components/schemas/RepeatableFieldType" + }, + "field": { + "type": "string", + "description": "Source field name from the event data" + }, + "jsonataExpression": { + "type": "string", + "description": "JSONata expression to compute the value" + }, + "constant": { + "description": "Constant value (any type)" + } + } + }, + "RelationRefsConfig": { + "type": "object", + "description": "Configuration for relation references ($relation_ref).\nRelation references link to a specific item within a repeatable attribute on a related entity.\nCommon use case: referencing a specific address within a contact's address list.\n", + "required": [ + "operation" + ], + "properties": { + "operation": { + "type": "string", + "enum": [ + "_set", + "_append", + "_append_all" + ], + "description": "Relation reference operation:\n- '_set': Replace all existing relation_refs with the specified items\n- '_append': Add new unique items to existing relation_refs (deduplicates by entity_id + _id)\n- '_append_all': Add all items to existing relation_refs (no deduplication, allows duplicates)\n" + }, + "items": { + "type": "array", + "description": "Array of relation reference item configurations", + "items": { + "$ref": "#/components/schemas/RelationRefItemConfig" + } + }, + "jsonataExpression": { + "type": "string", + "description": "JSONata expression that returns relation_ref items array (alternative to 'items')" + } + } + }, + "RelationRefItemConfig": { + "type": "object", + "description": "Configuration for a single relation reference item", + "required": [ + "entity_schema", + "unique_ids", + "path", + "value" + ], + "properties": { + "entity_schema": { + "type": "string", + "description": "Schema of the related entity (e.g., \"contact\")" + }, + "unique_ids": { + "type": "array", + "description": "Unique identifier mappings for the related entity", + "items": { + "$ref": "#/components/schemas/RelationUniqueIdField" + } + }, + "path": { + "type": "string", + "description": "Attribute path on the related entity (e.g., \"address\")" + }, + "value": { + "$ref": "#/components/schemas/RelationRefValueConfig" + } + } + }, + "RelationRefValueConfig": { + "type": "object", + "description": "Configuration for the value to set on the related entity's attribute", + "required": [ + "attribute" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Target attribute name on the related entity" + }, + "operation": { + "type": "string", + "enum": [ + "_set", + "_append", + "_append_all" + ], + "description": "Operation for the attribute value:\n- '_set': Replace the attribute value\n- '_append': Add new unique items (deduplicates)\n- '_append_all': Add all items (no deduplication)\n" + }, + "field": { + "type": "string", + "description": "Source field name from the event data" + }, + "jsonataExpression": { + "type": "string", + "description": "JSONata expression to compute the value" + }, + "constant": { + "description": "Constant value (any type)" + } + } + }, + "RepeatableFieldType": { + "type": "string", + "enum": [ + "email", + "phone" + ], + "description": "Type hint for repeatable fields that require special search handling.\nThese fields are stored as arrays of objects (e.g., email: [{ email: \"value\" }]).\n" + }, + "ReplayEventsRequest": { + "type": "object", + "required": [ + "event_ids" + ], + "properties": { + "event_ids": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "maxItems": 100, + "description": "List of event IDs to replay. Maximum 100 events per request." + } + } + }, + "QueryEventsRequest": { + "type": "object", + "properties": { + "event_id": { + "type": "string", + "description": "Filter by event ID" + }, + "event_type": { + "type": "string", + "enum": [ + "CREATE", + "UPDATE", + "DELETE" + ], + "description": "Filter by event type" + }, + "correlation_id": { + "type": "string", + "description": "Filter by correlation ID" + }, + "object_type": { + "type": "string", + "description": "Filter by object type" + }, + "event_name": { + "type": "string", + "description": "Filter by event name (alias for object_type)" + }, + "limit": { + "type": "integer", + "description": "Maximum number of results to return", + "example": 25, + "default": 25, + "minimum": 1, + "maximum": 25 + }, + "cursor": { + "type": "object", + "description": "Cursor for pagination. Use the next_cursor from the previous response to get the next page.", + "properties": { + "event_time": { + "type": "string", + "format": "date-time", + "description": "Timestamp from the last event in the previous page", + "example": "2025-10-31T12:34:56Z" + }, + "event_id": { + "type": "string", + "description": "Event ID from the last event in the previous page", + "example": "evt_1234567890abcdef" + } + } + } + } + }, + "QueryInboundMonitoringEventsRequest": { + "type": "object", + "properties": { + "use_case_id": { + "type": "string", + "format": "uuid", + "description": "Filter by use case ID" + }, + "event_type": { + "type": "string", + "enum": [ + "CREATE", + "UPDATE", + "DELETE", + "TRIGGER" + ], + "description": "Filter by event type" + }, + "sync_type": { + "type": "string", + "enum": [ + "entity", + "meter_reading", + "webhook", + "api_deprecation" + ], + "description": "Filter by sync type" + }, + "status": { + "type": "string", + "enum": [ + "success", + "error", + "skipped", + "warning" + ], + "description": "Filter by processing status" + }, + "error_category": { + "type": "string", + "enum": [ + "validation", + "configuration", + "downstream_api", + "timeout", + "system" + ], + "description": "Filter by error category (only applicable when status=error)" + }, + "correlation_id": { + "type": "string", + "description": "Filter by correlation ID" + }, + "object_type": { + "type": "string", + "description": "Filter by object type (e.g., 'contract', 'meter')" + }, + "event_name": { + "type": "string", + "description": "Filter by event name (alias for object_type)" + }, + "event_id": { + "type": "string", + "description": "Filter by event ID to find a specific event" + }, + "from_date": { + "type": "string", + "format": "date-time", + "description": "Filter events from this date (inclusive)", + "example": "2025-01-01T00:00:00Z" + }, + "to_date": { + "type": "string", + "format": "date-time", + "description": "Filter events until this date (inclusive)", + "example": "2025-01-31T23:59:59Z" + }, + "limit": { + "type": "integer", + "description": "Maximum number of results to return", + "example": 50, + "default": 50, + "minimum": 1, + "maximum": 100 + }, + "cursor": { + "type": "object", + "description": "Cursor for pagination", + "properties": { + "completed_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp from the last event in the previous page" + }, + "event_id": { + "type": "string", + "description": "Event ID from the last event in the previous page" + } + } + } + } + }, + "QueryAccessLogsRequest": { + "type": "object", + "properties": { + "token_id": { + "type": "string", + "description": "Filter by a specific access token ID (e.g., 'api_5ZugdRXasLfWBypHi93Fk').\nMust be one of the access_token_ids linked to the integration.\nIf omitted, returns logs for all access tokens linked to the integration.\n", + "example": "api_5ZugdRXasLfWBypHi93Fk" + }, + "service": { + "type": "string", + "description": "Filter by service name (e.g., 'entity', 'metering', 'submission-api')", + "example": "entity" + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ], + "description": "Filter by HTTP method" + }, + "path": { + "type": "string", + "description": "Filter by request path (partial match)", + "example": "/v1/entity" + }, + "status": { + "type": "integer", + "description": "Filter by HTTP status code", + "example": 200 + }, + "from_date": { + "type": "string", + "format": "date-time", + "description": "Filter logs from this date (inclusive)", + "example": "2025-01-01T00:00:00Z" + }, + "to_date": { + "type": "string", + "format": "date-time", + "description": "Filter logs until this date (inclusive)", + "example": "2025-01-31T23:59:59Z" + }, + "limit": { + "type": "integer", + "description": "Maximum number of results to return", + "example": 50, + "default": 50, + "minimum": 1, + "maximum": 100 + }, + "cursor": { + "type": "object", + "description": "Cursor for pagination (infinite scroll)", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp from the last log entry in the previous page" + }, + "request_id": { + "type": "string", + "description": "Request ID from the last log entry in the previous page" + } + } + } + } + }, + "AccessLogEntry": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "When the request was made" + }, + "environment": { + "type": "string", + "description": "Environment (e.g., 'dev', 'prod')" + }, + "service": { + "type": "string", + "description": "Service name (e.g., 'entity', 'metering')" + }, + "request_id": { + "type": "string", + "description": "Unique request identifier" + }, + "method": { + "type": "string", + "description": "HTTP method" + }, + "path": { + "type": "string", + "description": "Request path" + }, + "status": { + "type": "integer", + "description": "HTTP status code" + }, + "response_latency_ms": { + "type": "integer", + "description": "Response latency in milliseconds" + }, + "response_length": { + "type": "integer", + "description": "Response body length in bytes" + }, + "token_id": { + "type": "string", + "description": "Access token identifier" + }, + "org_id": { + "type": "string", + "description": "Organization ID" + }, + "origin": { + "type": "string", + "description": "Request origin header" + }, + "source_ip": { + "type": "string", + "description": "Client IP address" + } + } + }, + "GetMonitoringStatsRequest": { + "type": "object", + "properties": { + "from_date": { + "type": "string", + "format": "date-time", + "description": "Start date for statistics period (inclusive)", + "example": "2025-01-01T00:00:00Z" + }, + "to_date": { + "type": "string", + "format": "date-time", + "description": "End date for statistics period (inclusive)", + "example": "2025-01-31T23:59:59Z" + }, + "inbound_group_by": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "use_case_id", + "sync_type", + "status", + "error_category", + "object_type", + "event_name", + "date" + ] + }, + "description": "Fields to group inbound statistics by", + "example": [ + "use_case_id", + "status" + ] + }, + "outbound_group_by": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "event_name", + "status", + "webhook_config_id", + "date" + ] + }, + "description": "Fields to group outbound statistics by", + "example": [ + "event_name", + "status" + ] + } + } + }, + "GetMonitoringTimeSeriesRequest": { + "type": "object", + "required": [ + "from_date", + "interval" + ], + "properties": { + "from_date": { + "type": "string", + "format": "date-time", + "description": "Start date for the time series (inclusive)", + "example": "2025-01-01T00:00:00Z" + }, + "to_date": { + "type": "string", + "format": "date-time", + "description": "End date for the time series (inclusive). Defaults to current time if not specified.", + "example": "2025-01-31T23:59:59Z" + }, + "interval": { + "type": "string", + "enum": [ + "5m", + "10m", + "30m", + "1h", + "3h", + "1d" + ], + "description": "The time bucket interval for aggregation", + "example": "1h" + }, + "direction": { + "type": "string", + "enum": [ + "inbound", + "outbound", + "both" + ], + "default": "both", + "description": "Filter by event direction. Defaults to both.", + "example": "both" + } + } + }, + "TimeSeriesBucket": { + "type": "object", + "required": [ + "timestamp" + ], + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "The start timestamp of the bucket" + }, + "inbound": { + "type": "object", + "nullable": true, + "description": "Inbound event counts for this bucket. Null when direction is outbound.", + "properties": { + "success_count": { + "type": "integer" + }, + "error_count": { + "type": "integer" + }, + "warning_count": { + "type": "integer" + }, + "skipped_count": { + "type": "integer" + }, + "total_count": { + "type": "integer" + } + } + }, + "outbound": { + "type": "object", + "nullable": true, + "description": "Outbound event counts for this bucket. Null when direction is inbound.", + "properties": { + "success_count": { + "type": "integer" + }, + "error_count": { + "type": "integer" + }, + "pending_count": { + "type": "integer" + }, + "total_count": { + "type": "integer" + } + } + } + } + }, + "QueryOutboundMonitoringEventsRequest": { + "type": "object", + "properties": { + "event_name": { + "type": "string", + "description": "Filter by event name (event_catalog_event). If not specified, returns events for all linked event names in the integration's outbound use cases.", + "example": "automation_flow_target" + }, + "status": { + "type": "string", + "enum": [ + "succeeded", + "failed", + "pending" + ], + "description": "Filter by delivery status" + }, + "webhook_config_id": { + "type": "string", + "description": "Filter by webhook configuration ID" + }, + "from_date": { + "type": "string", + "format": "date-time", + "description": "Filter events from this date (inclusive)", + "example": "2025-01-01T00:00:00Z" + }, + "to_date": { + "type": "string", + "format": "date-time", + "description": "Filter events until this date (inclusive)", + "example": "2025-01-31T23:59:59Z" + }, + "limit": { + "type": "integer", + "description": "Maximum number of results to return", + "example": 50, + "default": 50, + "minimum": 1, + "maximum": 100 + }, + "cursor": { + "type": "object", + "description": "Cursor for pagination", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp from the last event in the previous page" + }, + "event_id": { + "type": "string", + "description": "Event ID from the last event in the previous page" + } + } + } + } + }, + "OutboundMonitoringEvent": { + "type": "object", + "required": [ + "org_id", + "event_id", + "event_name", + "status", + "created_at" + ], + "properties": { + "org_id": { + "type": "string", + "description": "Organization ID" + }, + "event_id": { + "type": "string", + "description": "Unique event identifier" + }, + "event_name": { + "type": "string", + "description": "Event name (event_catalog_event)" + }, + "status": { + "type": "string", + "enum": [ + "succeeded", + "failed", + "pending" + ], + "description": "Delivery status" + }, + "url": { + "type": "string", + "description": "Target URL" + }, + "http_method": { + "type": "string", + "description": "HTTP method used (e.g., POST)" + }, + "http_response": { + "type": "object", + "description": "HTTP response details (status_code, message, headers)", + "additionalProperties": true + }, + "webhook_config_id": { + "type": "string", + "description": "Webhook configuration ID" + }, + "metadata": { + "type": "object", + "description": "Additional metadata (webhook_id, organization details, correlation_id, etc.)", + "additionalProperties": true + }, + "execution_context": { + "type": "object", + "description": "Execution context (execution_arn, state_machine_arn, etc.)", + "additionalProperties": true + }, + "payload": { + "type": "object", + "description": "Payload that was sent", + "additionalProperties": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "When the event was created" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "When the event was last updated" + } + } + }, + "MonitoringStats": { + "type": "object", + "required": [ + "inbound", + "outbound" + ], + "properties": { + "inbound": { + "type": "object", + "description": "Statistics for inbound (ERP sync) events", + "required": [ + "total_events", + "success_count", + "error_count", + "skipped_count" + ], + "properties": { + "total_events": { + "type": "integer", + "description": "Total number of inbound events in the period" + }, + "total_correlations": { + "type": "integer", + "description": "Total number of unique correlation IDs" + }, + "success_count": { + "type": "integer", + "description": "Number of successful events" + }, + "error_count": { + "type": "integer", + "description": "Number of failed events" + }, + "skipped_count": { + "type": "integer", + "description": "Number of skipped events" + }, + "warning_count": { + "type": "integer", + "description": "Number of warning events" + }, + "success_rate": { + "type": "number", + "format": "float", + "description": "Success rate as percentage (0-100)" + }, + "last_error_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of the most recent error" + }, + "breakdown": { + "type": "array", + "description": "Statistics breakdown by requested inbound_group_by fields", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "outbound": { + "type": "object", + "description": "Statistics for outbound (webhook delivery) events", + "required": [ + "total_events", + "success_count", + "error_count" + ], + "properties": { + "total_events": { + "type": "integer", + "description": "Total number of outbound events in the period" + }, + "success_count": { + "type": "integer", + "description": "Number of successful deliveries" + }, + "error_count": { + "type": "integer", + "description": "Number of failed deliveries" + }, + "pending_count": { + "type": "integer", + "description": "Number of pending deliveries" + }, + "success_rate": { + "type": "number", + "format": "float", + "description": "Success rate as percentage (0-100)" + }, + "last_error_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of the most recent error" + }, + "breakdown": { + "type": "array", + "description": "Statistics breakdown by requested outbound_group_by fields", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + }, + "InboundMonitoringEvent": { + "type": "object", + "required": [ + "org_id", + "event_id", + "object_type", + "sync_type", + "status", + "received_at", + "completed_at" + ], + "properties": { + "org_id": { + "type": "string", + "description": "Organization ID" + }, + "event_id": { + "type": "string", + "description": "Unique event identifier" + }, + "correlation_id": { + "type": "string", + "nullable": true, + "description": "Correlation ID for tracing related events" + }, + "integration_id": { + "type": "string", + "nullable": true, + "description": "Integration ID" + }, + "use_case_id": { + "type": "string", + "nullable": true, + "description": "Use case ID" + }, + "event_type": { + "type": "string", + "enum": [ + "CREATE", + "UPDATE", + "DELETE", + "TRIGGER" + ], + "description": "Type of event (optional for V3 events)" + }, + "object_type": { + "type": "string", + "description": "Type of object being synced (e.g., 'contract', 'meter')" + }, + "sync_type": { + "type": "string", + "enum": [ + "entity", + "meter_reading", + "webhook", + "api_deprecation" + ], + "description": "Type of sync operation" + }, + "status": { + "type": "string", + "enum": [ + "success", + "error", + "skipped", + "warning" + ], + "description": "Processing status" + }, + "error_code": { + "type": "string", + "nullable": true, + "description": "Error code (when status=error)" + }, + "error_message": { + "type": "string", + "nullable": true, + "description": "Error message (when status=error)" + }, + "error_category": { + "type": "string", + "nullable": true, + "enum": [ + "validation", + "configuration", + "downstream_api", + "timeout", + "system" + ], + "description": "Error category (when status=error)" + }, + "processing_duration_ms": { + "type": "integer", + "nullable": true, + "description": "Processing duration in milliseconds" + }, + "received_at": { + "type": "string", + "format": "date-time", + "description": "When the event was received" + }, + "completed_at": { + "type": "string", + "format": "date-time", + "description": "When processing completed" + } + } + } + }, + "responses": { + "BadRequest": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBase" + } + } + } + }, + "NotFound": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBase" + } + } + } + }, + "Unauthorized": { + "description": "Unauthorized request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBase" + } + } + } + }, + "InternalServerError": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBase" + } + } + } + }, + "QueryInboundMonitoringEventsResponse": { + "description": "Inbound monitoring events queried successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InboundMonitoringEvent" + }, + "description": "List of inbound monitoring events" + }, + "next_cursor": { + "type": "object", + "nullable": true, + "description": "Cursor to fetch the next page. Null if no more results.", + "properties": { + "completed_at": { + "type": "string", + "format": "date-time" + }, + "event_id": { + "type": "string" + } + } + }, + "has_more": { + "type": "boolean", + "description": "Indicates if more results are available" + } + } + } + } + } + }, + "GetMonitoringStatsResponse": { + "description": "Monitoring statistics retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MonitoringStats" + } + } + } + }, + "GetMonitoringTimeSeriesResponse": { + "description": "Time-series aggregated event counts retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "interval", + "from_date", + "to_date", + "buckets" + ], + "properties": { + "interval": { + "type": "string", + "enum": [ + "5m", + "10m", + "30m", + "1h", + "3h", + "1d" + ], + "description": "The time bucket interval used for aggregation" + }, + "from_date": { + "type": "string", + "format": "date-time", + "description": "Start date of the time series" + }, + "to_date": { + "type": "string", + "format": "date-time", + "description": "End date of the time series" + }, + "buckets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeSeriesBucket" + }, + "description": "List of time-series buckets with event counts" + } + } + } + } + } + }, + "QueryAccessLogsResponse": { + "description": "Access logs queried successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AccessLogEntry" + }, + "description": "List of access log entries" + }, + "next_cursor": { + "type": "object", + "nullable": true, + "description": "Cursor to fetch the next page. Null if no more results.", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "request_id": { + "type": "string" + } + } + }, + "has_more": { + "type": "boolean", + "description": "Indicates if more results are available" + } + } + } + } + } + }, + "QueryOutboundMonitoringEventsResponse": { + "description": "Outbound monitoring events queried successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OutboundMonitoringEvent" + }, + "description": "List of outbound monitoring events" + }, + "next_cursor": { + "type": "object", + "nullable": true, + "description": "Cursor to fetch the next page. Null if no more results.", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + }, + "event_id": { + "type": "string" + } + } + }, + "has_more": { + "type": "boolean", + "description": "Indicates if more results are available" + } + } + } + } + } + }, + "ReplayEventsResponse": { + "description": "Events replay initiated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "replayed", + "results" + ], + "properties": { + "event_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of event IDs for which replay was requested" + } + } + } + } + } + }, + "ERPUpdatesResponse": { + "description": "Some events failed to process", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "required": [ + "event_id", + "status" + ], + "properties": { + "event_id": { + "type": "string", + "description": "ID of the processed event" + }, + "status": { + "type": "string", + "enum": [ + "success", + "error", + "skipped", + "ignored" + ], + "description": "Processing status for the event (skipped indicates duplicate deduplication_id, ignored indicates unconfigured event)" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "TriggerWebhookResponse": { + "description": "Result of triggering an ERP synchronization event", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerWebhookResp" + } + } + } + }, + "QueryEventsResponse": { + "description": "Events queried successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErpEvent" + }, + "description": "List of erp events" + }, + "next_cursor": { + "type": "object", + "nullable": true, + "description": "Cursor to fetch the next page. Null if no more results.", + "properties": { + "event_time": { + "type": "string", + "format": "date-time", + "example": "2025-10-31T12:34:56Z" + }, + "event_id": { + "type": "string", + "example": "evt_1234567890abcdef" + } + } + }, + "has_more": { + "type": "boolean", + "description": "Indicates if more results are available", + "example": true + } + } + } + } + } + } + } + } +} diff --git a/packages/cli/definitions/event-catalog.json b/packages/cli/definitions/event-catalog.json new file mode 100644 index 00000000..2752452c --- /dev/null +++ b/packages/cli/definitions/event-catalog.json @@ -0,0 +1,1051 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Event Catalog API", + "description": "Manages the catalog of business events available in epilot", + "version": "0.1.0" + }, + "tags": [ + { + "name": "Event Catalog", + "description": "API for managing business event catalog" + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "paths": { + "/v1/events": { + "get": { + "operationId": "listEvents", + "summary": "listEvents", + "description": "Retrieve list of available business events", + "tags": [ + "Event Catalog" + ], + "responses": { + "200": { + "description": "A JSON array of event objects", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventConfig" + } + } + } + } + } + } + } + } + } + }, + "/v1/events/{event_name}": { + "get": { + "operationId": "getEvent", + "summary": "getEvent", + "description": "Retrieve the configuration of a specific business event", + "tags": [ + "Event Catalog" + ], + "parameters": [ + { + "name": "event_name", + "in": "path", + "required": true, + "description": "Unique human readable name of the event", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Event configuration object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventConfig" + } + } + } + } + } + }, + "patch": { + "operationId": "patchEvent", + "summary": "patchEvent", + "description": "Update the configuration of a specific business event for the organization", + "tags": [ + "Event Catalog" + ], + "parameters": [ + { + "name": "event_name", + "in": "path", + "required": true, + "description": "Unique human readable name of the event", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEventPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Updated event configuration object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventConfig" + } + } + } + }, + "404": { + "description": "Event not found" + } + } + } + }, + "/v1/events/{event_name}/json_schema": { + "get": { + "operationId": "getEventJSONSchema", + "summary": "getEventJSONSchema", + "description": "Retrieve the JSON Schema of a specific business event", + "tags": [ + "Event Catalog" + ], + "parameters": [ + { + "name": "event_name", + "in": "path", + "required": true, + "description": "Unique human readable name of the event", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Event JSON Schema object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventJsonSchema" + } + } + } + } + } + } + }, + "/v1/events/{event_name}/example": { + "get": { + "operationId": "getEventExample", + "summary": "getEventExample", + "description": "Generate a sample event payload based on the event's JSON Schema", + "tags": [ + "Event Catalog" + ], + "parameters": [ + { + "name": "event_name", + "in": "path", + "required": true, + "description": "Unique human readable name of the event", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Sample event payload object", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A sample event payload generated from the JSON Schema" + } + } + } + } + } + } + }, + "/v1/events/{event_name}:history": { + "post": { + "operationId": "searchEventHistory", + "summary": "searchEventHistory", + "description": "Paginated history of events", + "tags": [ + "Event Catalog" + ], + "parameters": [ + { + "name": "event_name", + "in": "path", + "required": true, + "description": "Unique human readable name of the event", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchOptions" + } + } + } + }, + "responses": { + "200": { + "description": "List of events in the event history", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Event" + } + }, + "next_cursor": { + "type": "object", + "description": "Cursor for pagination. Use this to get the next page of results.", + "nullable": true, + "properties": { + "event_time": { + "type": "string", + "description": "Timestamp from the last event in the current page", + "example": "2025-10-31T12:34:56Z" + }, + "event_id": { + "type": "string", + "description": "Event ID from the last event in the current page", + "example": "evt_1234567890abcdef" + } + } + } + } + } + } + } + } + } + } + }, + "/v1/events/{event_name}:trigger": { + "post": { + "operationId": "triggerEvent", + "summary": "triggerEvent", + "description": "Explicitly trigger an event by providing input field values and an optional entity seed\nfor graph hydration. The event must be enabled for the organization.\n\n- For events with an entity_graph, a seed (entity_id + node_id) is required\n- For events without an entity_graph, only fields are needed\n- Entity operation context fields (operation, trigger_entity, activity_id, activity_type)\n are not included when triggering via API\n", + "tags": [ + "Event Catalog" + ], + "parameters": [ + { + "name": "event_name", + "in": "path", + "required": true, + "description": "Unique human readable name of the event", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerEventPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Event triggered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerEventResponse" + } + } + } + }, + "400": { + "description": "Invalid input (validation error, missing seed, or missing required fields)" + }, + "403": { + "description": "Event is disabled for this organization" + }, + "404": { + "description": "Event not found" + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotOrg": { + "description": "Overrides the target organization to allow shared tenantaccess", + "name": "x-epilot-org-id", + "in": "header", + "type": "apiKey" + } + }, + "schemas": { + "EventConfigBase": { + "type": "object", + "description": "Base properties shared between EventConfig and UpdateEventPayload", + "properties": { + "event_name": { + "type": "string", + "description": "Unique human readable name of the event", + "example": "AddMeterReading" + }, + "event_title": { + "type": "string", + "description": "Human-friendly title for the event", + "example": "Add Meter Reading" + }, + "event_description": { + "type": "string", + "description": "Description of when the event is triggered", + "example": "Triggered when a new meter reading is added" + }, + "event_version": { + "type": "string", + "description": "Event version (semver)", + "example": "1.0.0" + }, + "event_status": { + "type": "string", + "description": "Status of the event", + "enum": [ + "active", + "deprecated", + "draft", + "disabled" + ], + "example": "active" + }, + "event_tags": { + "type": "array", + "description": "Tags associated with the event for categorization and filtering\n\nThe \"builtin\" tag indicates events that are built into the epilot system.\n", + "items": { + "type": "string" + }, + "example": [ + "builtin", + "metering", + "erp" + ] + }, + "schema_fields": { + "type": "object", + "description": "Fields that define the event schema", + "additionalProperties": { + "$ref": "#/components/schemas/SchemaField" + } + }, + "entity_graph": { + "allOf": [ + { + "$ref": "#/components/schemas/GraphDefinition" + }, + { + "description": "Optional entity graph definition for resolving related entities" + } + ] + }, + "entity_operation": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityOperationTrigger" + }, + { + "description": "Optional configuration for triggering this event based on entity operations" + } + ] + }, + "enabled": { + "type": "boolean", + "description": "Whether this event is enabled for the organization.\nWhen disabled, the event will not be triggered by any means\n(automatic, API, or automation).\nDefaults to true if not specified.\n", + "default": true, + "example": true + }, + "auto_trigger": { + "type": "boolean", + "description": "Whether the event should be triggered automatically by built-in logic\n(e.g., portal submissions, entity mutations, EventBridge rules).\nWhen false, the event can still be triggered manually via API or automations.\nOnly meaningful for builtin events that have automatic trigger sources.\nDefaults to true if not specified.\n", + "default": true, + "example": true + }, + "automation_trigger": { + "type": "boolean", + "description": "Whether this event can be explicitly triggered by automations.\nWhen true, the event will appear in the automation builder as a\n\"Trigger Event\" action option.\nDefaults to false if not specified.\n", + "default": false, + "example": true + } + } + }, + "EventConfig": { + "description": "Event configuration with required fields", + "allOf": [ + { + "$ref": "#/components/schemas/EventConfigBase" + }, + { + "type": "object", + "required": [ + "event_name", + "event_version", + "schema_fields" + ] + } + ] + }, + "UpdateEventPayload": { + "description": "Payload for updating an event configuration.\nAccepts the same fields as EventConfig (all optional for PATCH).\nCurrently only `enabled` and `auto_trigger` fields are processed, other fields are ignored.\n", + "allOf": [ + { + "$ref": "#/components/schemas/EventConfigBase" + }, + { + "type": "object" + } + ] + }, + "PrimitiveField": { + "type": "object", + "description": "A primitive JSON Schema field definition", + "properties": { + "json_schema": { + "type": "object", + "description": "JSON Schema definition of the field", + "example": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when reading was taken" + } + }, + "required": { + "type": "boolean", + "description": "Whether this field is required in the event payload" + }, + "graph_source": { + "type": "string", + "description": "Optional JSONata expression to extract the field value from the hydrated entity graph.\n\nThe expression has access to all hydrated graph nodes by their node ID.\nIf not specified, the field value must be provided as input when triggering the event.\n\nExamples:\n - \"ticket.meter_reading_value\" (simple path)\n - \"contact.email[0].email\" (nested/array access)\n - \"ticket.reading_timestamp ?? $now()\" (with fallback)\n - \"$number(meter_counter.reading_value)\" (type coercion)\n", + "example": "ticket.meter_reading_value" + } + }, + "required": [ + "json_schema" + ] + }, + "ContextEntity": { + "type": "object", + "properties": { + "entity_schema": { + "type": "string", + "example": "meter", + "description": "Schema slug of the context entity" + }, + "required": { + "type": "boolean", + "description": "Whether this field is required in the event payload" + } + }, + "required": [ + "entity_schema" + ] + }, + "SchemaField": { + "oneOf": [ + { + "$ref": "#/components/schemas/PrimitiveField" + }, + { + "$ref": "#/components/schemas/ContextEntity" + } + ] + }, + "CommonEventMetadata": { + "type": "object", + "description": "Common metadata fields present in all event payloads", + "example": { + "_org_id": { + "type": "string", + "description": "epilot tenant/organization ID" + }, + "_event_time": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when event occurred" + }, + "_event_id": { + "type": "string", + "description": "Unique event identifier (ULID)" + }, + "_event_name": { + "type": "string", + "description": "Event name from catalog" + }, + "_event_version": { + "type": "string", + "description": "Schema version number" + }, + "_event_source": { + "type": "string", + "description": "Source that triggered the event" + }, + "_ack_id": { + "type": "string", + "description": "Unique acknowledgment tracking ID for the event" + } + }, + "required": [ + "_org_id", + "_event_time", + "_event_id", + "_event_name", + "_event_version", + "_event_source" + ] + }, + "EventJsonSchema": { + "type": "object", + "description": "JSON Schema declaring the event payload structure", + "example": { + "type": "object", + "properties": { + "_org_id": { + "type": "string", + "description": "epilot tenant/organization ID" + }, + "_event_time": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when event occurred" + }, + "_event_id": { + "type": "string", + "description": "Unique event identifier (ULID)" + }, + "_event_name": { + "type": "string", + "description": "Event name from catalog" + }, + "_event_version": { + "type": "string", + "description": "Event version (semver)" + }, + "_event_source": { + "type": "string", + "description": "Source that triggered the event" + }, + "reading_value": { + "type": "number", + "description": "The meter reading value" + }, + "reading_date": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when reading was taken" + }, + "read_by": { + "type": "string", + "description": "Name or identifier of who submitted the reading" + }, + "reason": { + "type": "string", + "enum": [ + "regular", + "move-in", + "move-out", + "supplier-change", + "correction", + "final" + ], + "description": "Reason for the meter reading" + }, + "direction": { + "type": "string", + "enum": [ + "feed-in", + "feed-out" + ], + "description": "Direction of energy flow" + }, + "source": { + "type": "string", + "enum": [ + "portal", + "360", + "api", + "automation" + ], + "description": "Source system where reading was submitted" + }, + "meter_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the meter" + }, + "counter_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the meter counter" + }, + "meter_number": { + "type": "string", + "description": "Human-readable meter number" + }, + "obis_number": { + "type": "string", + "description": "OBIS code of the counter" + }, + "unit": { + "type": "string", + "description": "Unit of measurement (e.g., kWh, m3)" + }, + "customer_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the customer" + }, + "contract_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the contract" + }, + "user_id": { + "type": "string", + "description": "ID of the user who submitted the reading" + }, + "user_email": { + "type": "string", + "format": "email", + "description": "Email of the user who submitted the reading" + } + }, + "required": [ + "_org_id", + "_event_time", + "_event_id", + "_event_name", + "_event_version", + "_event_source", + "reading_value", + "reading_date", + "read_by", + "reason", + "direction", + "source", + "meter_id", + "counter_id", + "meter_number", + "obis_number", + "unit", + "customer_id", + "contract_id" + ] + } + }, + "Event": { + "type": "object", + "description": "An event instance in the event history", + "properties": { + "_org_id": { + "type": "string", + "description": "epilot tenant/organization ID" + }, + "_event_time": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when event occurred" + }, + "_event_id": { + "type": "string", + "description": "Unique event identifier (ULID)" + }, + "_event_name": { + "type": "string", + "description": "Event name from catalog" + }, + "_event_version": { + "type": "string", + "description": "Event version (semver)", + "example": "1.0.0" + }, + "_event_source": { + "type": "string", + "description": "Source that triggered the event" + }, + "_trigger_source_type": { + "type": "string", + "description": "The type of system that triggered the event.\nCommon values: api, automation, operation, portal_user\n", + "example": "api" + }, + "_trigger_source": { + "type": "string", + "description": "Identifier of the specific trigger source.\n- For api: User ID or API key identifier\n- For automation: Automation execution ID\n- For operation: Activity ID from the entity operation\n- For portal_user: Portal user email\n" + }, + "_ack_id": { + "type": "string", + "description": "Unique acknowledgment tracking ID for the event.\nUsed to track event delivery and processing status.\n" + } + }, + "required": [ + "_org_id", + "_event_time", + "_event_id", + "_event_name", + "_event_version", + "_event_source" + ], + "additionalProperties": true, + "example": { + "_org_id": "org_123456", + "_event_time": "2024-01-01T12:00:00Z", + "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F", + "_event_name": "MeterReading", + "_event_version": "1.0.0", + "_event_source": "api", + "_trigger_source_type": "api", + "_trigger_source": "user_123456", + "reading_value": 123.45, + "reading_date": "2024-01-01T11:59:00Z", + "read_by": "John Doe", + "reason": "regular", + "direction": "feed-out", + "source": "portal", + "meter_id": "550e8400-e29b-41d4-a716-446655440000", + "counter_id": "660e8400-e29b-41d4-a716-446655440000", + "meter_number": "MT123456789", + "obis_number": "1-0:1.8.0", + "unit": "kWh", + "customer_id": "770e8400-e29b-41d4-a716-446655440000", + "contract_id": "880e8400-e29b-41d4-a716-446655440000" + } + }, + "GraphDefinition": { + "type": "object", + "description": "Entity graph definition for resolving related entities", + "properties": { + "nodes": { + "type": "array", + "description": "List of node definitions in the graph", + "items": { + "$ref": "#/components/schemas/GraphNode" + } + }, + "edges": { + "type": "array", + "description": "List of edge definitions connecting nodes", + "items": { + "$ref": "#/components/schemas/GraphEdge" + } + } + }, + "required": [ + "nodes", + "edges" + ] + }, + "GraphNode": { + "type": "object", + "description": "A node in the entity graph", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this node in the graph definition", + "example": "contact" + }, + "schema": { + "type": "string", + "description": "Entity schema slug for this node", + "example": "contact" + }, + "cardinality": { + "type": "string", + "enum": [ + "one", + "many" + ], + "description": "Cardinality for this node when hydrated:\n- \"one\": Node can only contain one entity, returns single Entity object\n- \"many\": Node can contain multiple entities, returns array of Entity objects\nIf not specified, defaults to \"many\" (returns array)\n", + "example": "one" + }, + "fields": { + "allOf": [ + { + "$ref": "#/components/schemas/FieldsParam" + }, + { + "description": "Optional array of field names to include in the hydrated entity response for this node.\nWhen specified, only the requested fields plus required internal fields (_id, _schema, _org) will be returned.\nOnly applies when hydrate=true.\n" + } + ] + } + }, + "required": [ + "id", + "schema" + ] + }, + "GraphEdge": { + "type": "object", + "description": "An edge connecting two nodes in the graph", + "properties": { + "from": { + "type": "string", + "description": "Source node ID", + "example": "contact" + }, + "to": { + "type": "string", + "description": "Target node ID", + "example": "billing_account" + } + }, + "required": [ + "from", + "to" + ] + }, + "EntityOperationTrigger": { + "type": "object", + "description": "Configuration for triggering an event based on entity operations.\n\nWhen an entity operation matches the configured criteria, the event will be triggered.\n- On createEntity: the attribute must be present in the entity payload\n- On updateEntity: the attribute must be in diff.added, diff.updated, or diff.deleted\n- On deleteEntity: the event triggers when the entity is deleted (attributes not checked)\n", + "properties": { + "operation": { + "type": "array", + "description": "List of entity operations that can trigger this event", + "items": { + "type": "string", + "enum": [ + "createEntity", + "updateEntity", + "deleteEntity" + ] + }, + "example": [ + "createEntity", + "updateEntity" + ] + }, + "schema": { + "type": "array", + "description": "List of entity schema slugs that can trigger this event", + "items": { + "type": "string" + }, + "example": [ + "contact", + "contract", + "order" + ] + }, + "attribute": { + "type": "array", + "description": "Optional list of entity attributes to track for changes.\nIf specified, the event only triggers when these attributes are affected.\n- On createEntity: attribute must be defined in the entity payload\n- On updateEntity: attribute must be in diff.added, diff.updated, or diff.deleted\nIf not specified, all changes to matching entities will trigger the event.\n", + "items": { + "type": "string" + }, + "example": [ + "email", + "phone", + "status" + ] + }, + "purpose": { + "type": "array", + "description": "Optional list of purpose names to filter by.\nThe entity must have at least one matching purpose in its _purpose array.\nPurpose names are matched against the taxonomy classification names (e.g., \"Kündigung\", \"Umzug/Auszug\").\nIf not specified, the event triggers regardless of entity purpose.\n", + "items": { + "type": "string" + }, + "example": [ + "Kündigung", + "Umzug/Auszug" + ] + } + }, + "required": [ + "operation", + "schema" + ] + }, + "SearchOptions": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "description": "Maximum number of results to return", + "default": 10, + "minimum": 1, + "maximum": 25 + }, + "cursor": { + "type": "object", + "description": "Cursor for pagination. Use the next_cursor from the previous response to get the next page.", + "properties": { + "event_time": { + "type": "string", + "description": "Timestamp from the last event in the previous page", + "example": "2025-10-31 12:34:56" + }, + "event_id": { + "type": "string", + "description": "Event ID from the last event in the previous page", + "example": "evt_1234567890abcdef" + } + } + }, + "timestamp": { + "type": "object", + "description": "Filter events by timestamp range", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "Start timestamp in ISO 8601 format", + "example": "2025-10-01T00:00:00Z" + }, + "to": { + "type": "string", + "format": "date-time", + "description": "End timestamp in ISO 8601 format", + "example": "2025-10-31T23:59:59Z" + } + } + }, + "event_id": { + "type": "string", + "description": "Filter by specific event ID", + "example": "evt_1234567890abcdef" + } + } + }, + "FieldsParam": { + "type": "array", + "description": "List of entity fields to include or exclude in the response\n\nUse ! to exclude fields, e.g. `!_id` to exclude the `_id` field.\n\nGlobbing and globstart (**) is supported for nested fields.\n", + "items": { + "type": "string" + }, + "example": [ + "_id", + "_title", + "first_name", + "account", + "!account.*._files", + "**._product" + ] + }, + "TriggerEventPayload": { + "type": "object", + "description": "Payload for explicitly triggering an event via API", + "properties": { + "seed": { + "type": "object", + "description": "Entity seed for graph hydration. Required for events that have an entity_graph defined.\nSpecifies which entity to start graph traversal from.\n", + "properties": { + "entity_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID to seed the graph hydration" + }, + "node_id": { + "type": "string", + "description": "Node ID from the event's entity_graph definition that matches\nthe seed entity. Must be a valid node in the event's graph.\n" + } + }, + "required": [ + "entity_id", + "node_id" + ] + }, + "fields": { + "type": "object", + "description": "Input field values for the event. Keys must match the event's\nschema_fields definitions. Values are validated against each\nfield's JSON Schema.\n", + "additionalProperties": true + }, + "skip_hydration": { + "type": "array", + "description": "Optional list of node IDs to skip during entity graph hydration.\nThese nodes will be null/undefined in the event payload.\n", + "items": { + "type": "string" + } + }, + "_trigger_source_type": { + "type": "string", + "description": "The type of system that triggered the event.\nExamples: api, automation, operation, portal_user\nDefaults to \"api\" if not specified.\n" + }, + "_trigger_source": { + "type": "string", + "description": "Identifier of the specific trigger source.\nExamples: user ID, automation execution ID, activity ID, portal user email\nDefaults to the calling user ID if not specified.\n" + } + } + }, + "TriggerEventResponse": { + "type": "object", + "description": "Response from triggering an event", + "properties": { + "success": { + "type": "boolean", + "description": "Whether the event was triggered successfully" + }, + "event_id": { + "type": "string", + "description": "The unique event ID (ULID) assigned to this event" + }, + "event_bridge_event_id": { + "type": "string", + "description": "EventBridge event ID from publishing" + } + }, + "required": [ + "success", + "event_id" + ] + } + } + }, + "servers": [ + { + "url": "https://event-catalog.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/file.json b/packages/cli/definitions/file.json new file mode 100644 index 00000000..1d7461ae --- /dev/null +++ b/packages/cli/definitions/file.json @@ -0,0 +1,2842 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "File API", + "version": "1.10.0", + "description": "The File API enables you to upload, store, manage, and share files within the epilot platform.\n\n## Key Features\n- **Upload files** to temporary storage and save them permanently as File entities\n- **Generate previews** (thumbnails) for images and documents\n- **Create public links** to share private files externally\n- **Organize files** into collections for better management\n- **Version control** with automatic file versioning on updates\n\n## File Upload Workflow\n1. Call `uploadFileV2` to get a pre-signed S3 URL\n2. Upload your file directly to S3 using the pre-signed URL (PUT request)\n3. Call `saveFileV2` with the S3 reference to create a permanent File entity\n\n## Changelog\nView API Changelog\n" + }, + "tags": [ + { + "name": "File", + "description": "Core file operations for uploading, saving, retrieving, and deleting files.\n\nFiles are stored as epilot entities with the `file` schema and support:\n- Multiple versions (each save creates a new version)\n- Custom metadata and tags\n- Relations to other entities (contacts, orders, etc.)\n- Access control (private or public-read)\n" + }, + { + "name": "Preview", + "description": "Generate thumbnail previews for files. Supports images, PDFs, and common document formats.\n\nPreview images are generated on-demand and cached for performance.\nYou can specify custom dimensions using the `w` (width) and `h` (height) parameters.\n" + }, + { + "name": "Public Links", + "description": "Create shareable public links for private files.\n\nPublic links allow external users to access files without authentication.\nLinks are permanent until revoked and include the filename for user-friendly URLs.\n" + }, + { + "name": "Session", + "description": "Browser session management for cookie-based authentication.\n\nUse `getSession` to convert a Bearer token into a session cookie. This enables:\n- Direct use of preview URLs in `` tags\n- File downloads without manual token handling\n\n**Typical flow:**\n1. Authenticate and obtain a Bearer token\n2. Call `GET /v1/files/session` with the Bearer token\n3. Subsequent requests use the session cookie automatically\n" + }, + { + "name": "Deprecated", + "description": "Legacy API endpoints scheduled for removal.\n\n**Important:** These endpoints will be removed on **2025-06-30**.\nPlease migrate to the v2 equivalents before this date.\n\n| Deprecated Endpoint | Replacement |\n|---------------------|-------------|\n| `POST /v1/files/upload` | `POST /v2/files/upload` |\n| `POST /v1/files` | `POST /v2/files` |\n" + }, + { + "name": "file_schema", + "x-displayName": "File", + "description": "\n" + }, + { + "name": "File Collections", + "description": "Organize files into collections (folders) for better management.\n\nCollections can be:\n- **User-scoped**: Personal collections visible only to the creating user\n- **Global**: Shared collections available to all users for a schema\n\nCollections support hierarchical organization with parent-child relationships.\n" + } + ], + "x-tagGroups": [ + { + "name": "APIs", + "tags": [ + "File", + "Preview", + "Public Links", + "Session", + "File Collections", + "Deprecated" + ] + }, + { + "name": "Schemas", + "tags": [ + "file_schema" + ] + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "CookieAuth": [] + } + ], + "paths": { + "/v2/files/upload": { + "post": { + "operationId": "uploadFileV2", + "summary": "uploadFileV2", + "description": "Create pre-signed S3 URL to upload a file to keep temporarily (one week).\n\nUse the saveFileV2 operation to store file file permanently.\n", + "tags": [ + "File" + ], + "parameters": [ + { + "name": "file_entity_id", + "in": "query", + "description": "Use this parameter when uploading a file directly to an existing file entity.\n\nNote: still requires calling saveFileV2 to save the file permanently.\n", + "schema": { + "$ref": "#/components/schemas/FileEntityId" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UploadFilePayload" + }, + "examples": { + "Upload an image file": { + "description": "Upload an image file", + "value": { + "filename": "image.png", + "mime_type": "image/png" + } + }, + "Upload a document": { + "description": "Upload an image file", + "value": { + "filename": "document.pdf", + "mime_type": "application/pdf" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Pre-signed URL for POST / PUT upload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileUpload" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequestError" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/files": { + "post": { + "operationId": "saveFileV2", + "summary": "saveFileV2", + "description": "Saves a permanent file entity. Updates an existing file entity when `_id` is passed.\n\nSaves metadata to file entity and stores a version when `s3ref` or `source_url` is passed.\n", + "tags": [ + "File" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + }, + { + "$ref": "#/components/parameters/FillActivityQueryParam" + }, + { + "$ref": "#/components/parameters/StrictQueryParam" + }, + { + "$ref": "#/components/parameters/AsyncOperationQueryParam" + }, + { + "$ref": "#/components/parameters/DeleteTempFileQueryParam" + }, + { + "$ref": "#/components/parameters/VersionOnlyQueryParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/SaveFilePayloadV2" + }, + { + "type": "array", + "description": "Batch version mode: array of s3ref payloads to add multiple versions to a single file entity.\nAll payloads must target the same file entity (_id or file_entity_id).\nRequires version_only=true query parameter.\nS3 operations run in parallel, with a single entity update at the end.\n", + "items": { + "$ref": "#/components/schemas/BatchSaveFileVersionPayload" + }, + "minItems": 1, + "maxItems": 20 + } + ] + }, + "examples": { + "New file from s3ref": { + "description": "Standard epilot file entity with S3 Ref", + "value": { + "type": "document", + "filename": "document.pdf", + "_tags": [ + "string" + ], + "access_control": "private", + "s3ref": { + "bucket": "epilot-prod-user-content", + "key": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + } + } + }, + "Update existing file with relations": { + "description": "Update existing file entity with _id", + "value": { + "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8", + "filename": "document.pdf", + "access_control": "private", + "custom_download_url": "https://some-api-url.com/download?file_id=123", + "shared_with_end_customer": true, + "relations": [ + { + "entity_id": "77a1e0cc-7b92-4d41-8cce-eefd317ec004", + "_schema": "contact" + } + ] + } + }, + "New file from source_url": { + "description": "New epilot file entity from a source_url", + "value": { + "type": "document", + "filename": "document.pdf", + "_tags": [ + "string" + ], + "access_control": "private", + "source_url": "https://docs.epilot.io/document.pdf" + } + }, + "File with custom download URL (external)": { + "description": "Custom file entity with custom download url", + "value": { + "type": "document", + "filename": "document.pdf", + "_tags": [ + "string" + ], + "access_control": "private", + "custom_download_url": "https://some-api-url.com/download?file_id=123", + "shared_with_end_customer": true + } + }, + "Batch save multiple versions": { + "description": "Save multiple file versions in a single request (parallel S3 processing)", + "value": [ + { + "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8", + "filename": "photo1.jpg", + "access_control": "private", + "s3ref": { + "bucket": "epilot-prod-user-content", + "key": "123/temp/abc/photo1.jpg" + } + }, + { + "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8", + "filename": "photo2.jpg", + "access_control": "private", + "s3ref": { + "bucket": "epilot-prod-user-content", + "key": "123/temp/def/photo2.jpg" + } + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "Created or updated File Entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileEntity" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequestError" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/files/upload": { + "post": { + "operationId": "uploadFile", + "summary": "uploadFile", + "deprecated": true, + "description": "**DEPRECATED** - Will be removed on **2025-06-30**. Use `POST /v2/files/upload` instead.\n\n## Migration Guide\nReplace calls to this endpoint with `uploadFileV2`:\n\n| v1 Parameter | v2 Parameter | Notes |\n|--------------|--------------|-------|\n| `file_entity_id` | `file_entity_id` | No change |\n\nThe v2 response includes the same fields with improved structure.\n\n---\n\nCreate pre-signed S3 URL to upload a file to keep temporarily (one week).\n\nUse the saveFile operation to store file file permanently.\n", + "tags": [ + "Deprecated" + ], + "parameters": [ + { + "name": "file_entity_id", + "in": "query", + "description": "file entity id", + "schema": { + "$ref": "#/components/schemas/FileEntityId" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UploadFilePayload" + }, + "examples": { + "Upload a document": { + "value": { + "filename": "document.pdf", + "mime_type": "application/pdf" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Pre-signed URL for POST / PUT upload", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "s3ref": { + "allOf": [ + { + "$ref": "#/components/schemas/S3Ref" + }, + { + "example": { + "bucket": "epilot-prod-user-content", + "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + } + } + ] + }, + "upload_url": { + "type": "string", + "format": "url", + "example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123" + }, + "public_url": { + "description": "Returned only if file is permanent i.e. file_entity_id is passed", + "type": "string", + "format": "url", + "example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequestError" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/files": { + "post": { + "operationId": "saveFile", + "summary": "saveFile", + "deprecated": true, + "description": "**DEPRECATED** - Will be removed on **2025-06-30**. Use `POST /v2/files` instead.\n\n## Migration Guide\nReplace calls to this endpoint with `saveFileV2`:\n\n| v1 Feature | v2 Feature | Notes |\n|------------|------------|-------|\n| `activity_id` param | `activity_id` param | No change |\n| `async` param | `async` param | No change |\n| - | `fill_activity` param | New in v2 |\n| - | `strict` param | New in v2 |\n| - | `delete_temp_file` param | New in v2, defaults to true |\n\nThe v2 endpoint supports additional parameters for better control over file saving behavior.\n\n---\n\nCreate / Update a permanent File entity.\n\nMakes file object permanent and saves metadata to file entity.\n", + "tags": [ + "Deprecated" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + }, + { + "$ref": "#/components/parameters/AsyncOperationQueryParam" + }, + { + "$ref": "#/components/parameters/VersionOnlyQueryParam" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveFilePayload" + }, + "examples": { + "Save file with S3 reference": { + "value": { + "filename": "document.pdf", + "type": "document", + "access_control": "private", + "s3ref": { + "bucket": "epilot-prod-user-content", + "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + } + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created File Entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileEntity" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequestError" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/files/{id}": { + "get": { + "operationId": "getFile", + "summary": "getFile", + "description": "Get a file entity by id", + "tags": [ + "File" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileEntityId" + } + }, + { + "name": "source_url", + "in": "query", + "schema": { + "type": "boolean", + "default": false, + "description": "Generate a source_url for the file entity, if it doesn't have one" + } + }, + { + "$ref": "#/components/parameters/StrictQueryParam" + }, + { + "$ref": "#/components/parameters/AsyncOperationQueryParam" + } + ], + "responses": { + "200": { + "description": "File Entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileEntity" + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deleteFile", + "summary": "deleteFile", + "description": "Delete a file entity by id", + "tags": [ + "File" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileEntityId" + } + }, + { + "name": "purge", + "in": "query", + "schema": { + "type": "boolean", + "default": false, + "description": "Provide `true` to permanently delete the file from storage, otherwise it will be soft-deleted" + } + }, + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + }, + { + "$ref": "#/components/parameters/StrictQueryParam" + } + ], + "responses": { + "200": { + "description": "The deleted file", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileEntity" + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/files/{id}/download": { + "get": { + "operationId": "downloadFile", + "summary": "downloadFile", + "description": "Generate a pre-signed download URL for a file.\n\nThe returned URL is valid for a limited time (typically 15 minutes) and can be used to download the file directly.\n", + "tags": [ + "File" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The UUID of the file entity", + "schema": { + "$ref": "#/components/schemas/FileEntityId" + } + }, + { + "name": "version", + "in": "query", + "description": "Index of the file version to download (0 = latest)", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "attachment", + "in": "query", + "description": "Controls the Content-Disposition header. Set to `true` to trigger browser download dialog, `false` to display inline.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Pre-signed download URL", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "download_url": { + "type": "string", + "format": "uri", + "description": "Pre-signed S3 URL valid for downloading the file", + "example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123" + } + } + }, + "example": { + "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&..." + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/files:downloadS3": { + "post": { + "operationId": "downloadS3File", + "summary": "downloadS3File", + "description": "Generate a pre-signed download URL for a file using its S3 reference.\n\nUse this endpoint when you have the S3 bucket and key but not the file entity ID.\n", + "tags": [ + "File" + ], + "parameters": [ + { + "name": "s3_key", + "in": "query", + "required": true, + "description": "The S3 object key", + "schema": { + "type": "string" + }, + "example": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + }, + { + "name": "s3_bucket", + "in": "query", + "required": true, + "description": "The S3 bucket name", + "schema": { + "type": "string" + }, + "example": "epilot-prod-user-content" + }, + { + "name": "attachment", + "in": "query", + "description": "Controls the Content-Disposition header. Set to `true` to trigger browser download dialog, `false` to display inline.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Pre-signed download URL", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "download_url": { + "type": "string", + "format": "uri", + "description": "Pre-signed S3 URL valid for downloading the file", + "example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequestError" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/files:downloadFiles": { + "post": { + "operationId": "downloadFiles", + "summary": "downloadFiles", + "description": "Bulk generate pre-signed download URLs for multiple files in a single request.\n\nThis is more efficient than calling `downloadFile` multiple times when you need to download several files.\n", + "tags": [ + "File" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DownloadFilesPayload" + }, + "examples": { + "Download multiple files": { + "value": [ + { + "id": "ef7d985c-2385-44f4-9c71-ae06a52264f8", + "version": 0 + }, + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "version": 0 + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "Generated download URLs for each requested file", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "download_url": { + "type": "string", + "format": "uri", + "description": "Pre-signed S3 URL for downloading the file", + "example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123" + }, + "file_entity_id": { + "type": "string", + "format": "uuid", + "description": "The file entity ID (matches the requested ID)" + } + } + } + }, + "example": [ + { + "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/document.pdf?X-Amz-...", + "file_entity_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8" + }, + { + "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/image.png?X-Amz-...", + "file_entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + } + ] + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequestError" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/files/{id}/preview": { + "get": { + "operationId": "previewFile", + "summary": "previewFile", + "description": "Generate a thumbnail preview for a file entity.\n\nSupported file types include images (PNG, JPEG, GIF, WebP), PDFs, and common document formats.\nThe preview is returned as an image (PNG or JPEG).\n\n**Tip:** Use with CookieAuth to embed previews directly in `` tags.\n", + "tags": [ + "Preview" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The UUID of the file entity", + "schema": { + "$ref": "#/components/schemas/FileEntityId" + } + }, + { + "name": "version", + "in": "query", + "description": "Index of the file version to preview (0 = latest)", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "w", + "in": "query", + "description": "Desired width in pixels (maintains aspect ratio if only width is specified)", + "schema": { + "type": "integer" + }, + "example": 200 + }, + { + "name": "h", + "in": "query", + "description": "Desired height in pixels (maintains aspect ratio if only height is specified)", + "schema": { + "type": "integer" + }, + "example": 200 + } + ], + "responses": { + "200": { + "description": "Generated thumbnail image", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/jpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/files:previewS3": { + "post": { + "operationId": "previewS3File", + "summary": "previewS3File", + "description": "Generate a thumbnail preview from an S3 reference.\n\nUse this endpoint when you have the S3 bucket and key but not the file entity ID.\n", + "tags": [ + "Preview" + ], + "parameters": [ + { + "name": "w", + "in": "query", + "description": "Desired width in pixels", + "schema": { + "type": "integer" + }, + "example": 200 + }, + { + "name": "h", + "in": "query", + "description": "Desired height in pixels", + "schema": { + "type": "integer" + }, + "example": 200 + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/S3Ref" + }, + "examples": { + "Preview from S3": { + "value": { + "bucket": "epilot-prod-user-content", + "key": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/image.png" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Generated thumbnail image", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/jpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequestError" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "get": { + "operationId": "previewS3FileGet", + "summary": "previewS3FileGet", + "description": "Get a thumbnail preview from an S3 reference using query parameters.\n\nThis GET variant is useful for embedding previews directly in `` tags.\n", + "tags": [ + "Preview" + ], + "parameters": [ + { + "name": "key", + "in": "query", + "description": "The S3 object key", + "required": true, + "schema": { + "type": "string" + }, + "example": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/image.png" + }, + { + "name": "bucket", + "in": "query", + "description": "The S3 bucket name", + "required": true, + "schema": { + "type": "string" + }, + "example": "epilot-prod-user-content" + }, + { + "name": "w", + "in": "query", + "description": "Desired width in pixels", + "schema": { + "type": "integer" + }, + "example": 200 + }, + { + "name": "h", + "in": "query", + "description": "Desired height in pixels", + "schema": { + "type": "integer" + }, + "example": 200 + } + ], + "responses": { + "200": { + "description": "Generated thumbnail image", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/jpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequestError" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/files/public/{id}/preview": { + "get": { + "operationId": "previewPublicFile", + "summary": "previewPublicFile", + "description": "Generate a thumbnail preview for a public file entity.\n\n**No authentication required.** This endpoint only works for files with `access_control: public-read`.\n", + "security": [], + "tags": [ + "Preview" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The UUID of the public file entity", + "schema": { + "$ref": "#/components/schemas/FileEntityId" + } + }, + { + "name": "version", + "in": "query", + "description": "Index of the file version to preview (0 = latest)", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "w", + "in": "query", + "description": "Desired width in pixels", + "schema": { + "type": "integer" + }, + "example": 200 + }, + { + "name": "h", + "in": "query", + "description": "Desired height in pixels", + "schema": { + "type": "integer" + }, + "example": 200 + }, + { + "name": "org_id", + "in": "query", + "description": "Organization ID that owns the file", + "schema": { + "type": "string" + }, + "example": "123" + } + ], + "responses": { + "200": { + "description": "Generated thumbnail image for a public file", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/jpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "403": { + "description": "File is not public", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorObject" + }, + "example": { + "status": 403, + "error": "File is not publicly accessible" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/files/session": { + "get": { + "operationId": "getSession", + "summary": "getSession", + "description": "Start a browser session by converting a Bearer token into a server-side cookie.\n\n**Use case:** After calling this endpoint, you can use preview URLs directly in `` tags\nwithout needing to set the Authorization header manually.\n\n**Example flow:**\n1. Call this endpoint with your Bearer token: `GET /v1/files/session` with `Authorization: Bearer `\n2. The server sets an HTTP-only cookie named `token`\n3. Use preview URLs directly: ``\n", + "tags": [ + "Session" + ], + "responses": { + "200": { + "description": "Session started successfully. A session cookie has been set.", + "headers": { + "Set-Cookie": { + "description": "HTTP-only session cookie containing the authentication token", + "schema": { + "type": "string", + "example": "token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...; HttpOnly; Secure; Path=/" + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "operationId": "deleteSession", + "summary": "deleteSession", + "description": "End a browser session by deleting the token cookie.\n\nCall this endpoint to log out and clear the session cookie.\n", + "tags": [ + "Session" + ], + "responses": { + "200": { + "description": "Session deleted successfully. The session cookie has been cleared." + } + } + } + }, + "/v1/files/{id}/public/links": { + "post": { + "operationId": "generatePublicLink", + "summary": "generatePublicLink", + "description": "Generate a public link to share a private file externally.\n\nThe generated link:\n- Is permanent until explicitly revoked\n- Includes the filename for user-friendly URLs\n- Does not require authentication to access\n- Redirects to a signed download URL when accessed\n\n**Use case:** Share invoices, contracts, or documents with external parties who don't have epilot accounts.\n", + "tags": [ + "Public Links" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The UUID of the file entity to share", + "schema": { + "$ref": "#/components/schemas/FileEntityId" + } + } + ], + "responses": { + "201": { + "description": "Public link generated successfully", + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "The public URL that can be shared externally" + }, + "example": "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c/invoice-2023-12.pdf" + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "403": { + "$ref": "#/components/responses/ForbiddenError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "get": { + "operationId": "listPublicLinksForFile", + "summary": "listPublicLinksForFile", + "description": "**Not yet implemented.**\n\nThis endpoint will fetch all public links previously generated for a file.\n", + "x-not-implemented": true, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The UUID of the file entity", + "schema": { + "type": "string" + }, + "example": "13d22918-36bd-4227-9ad4-2cb978788c8d" + } + ], + "tags": [ + "Public Links" + ], + "responses": { + "200": { + "description": "Public links retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicLink" + } + } + } + }, + "example": { + "results": [ + { + "id": "3ef5c6d9-818d-45e6-8efb-b1de59079a1c", + "link": "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c/invoice.pdf", + "last_accessed_at": "2024-01-15T10:30:00Z" + } + ] + } + } + } + }, + "501": { + "description": "Not implemented", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorObject" + }, + "example": { + "status": 501, + "error": "Not Implemented" + } + } + } + } + } + } + }, + "/v1/files/public/links/{id}/{filename}": { + "get": { + "operationId": "accessPublicLink", + "summary": "accessPublicLink", + "security": [], + "tags": [ + "Public Links" + ], + "description": "Access a file via its public link.\n\n**No authentication required.** This endpoint redirects to a signed S3 URL for downloading the file.\n\nThe filename in the URL is for user-friendliness and SEO; the actual file is identified by the link ID.\n", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The UUID of the public link (not the file entity ID)", + "schema": { + "type": "string" + }, + "example": "13d22918-36bd-4227-9ad4-2cb978788c8d" + }, + { + "name": "filename", + "in": "path", + "required": true, + "description": "The filename (for user-friendly URLs)", + "schema": { + "type": "string" + }, + "example": "invoice-2023-12.pdf" + }, + { + "name": "hash", + "in": "query", + "required": false, + "description": "Optional cache-busting hash to force re-download", + "schema": { + "type": "string" + }, + "example": "abc123" + } + ], + "responses": { + "302": { + "description": "Redirect to a signed S3 URL for downloading the file", + "headers": { + "Location": { + "description": "The signed S3 URL to download the file", + "schema": { + "type": "string", + "format": "uri" + }, + "example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/document.pdf?X-Amz-..." + } + } + }, + "404": { + "description": "Public link not found or has been revoked", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorObject" + }, + "example": { + "status": 404, + "error": "Public link not found" + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/files/public/links/{id}": { + "delete": { + "operationId": "revokePublicLink", + "summary": "revokePublicLink", + "description": "**Not yet implemented.**\n\nThis endpoint will revoke a public link, making the file inaccessible via that link.\n", + "x-not-implemented": true, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The UUID of the public link to revoke", + "schema": { + "type": "string" + }, + "example": "13d22918-36bd-4227-9ad4-2cb978788c8d" + } + ], + "tags": [ + "Public Links" + ], + "responses": { + "204": { + "description": "Public link revoked successfully" + }, + "501": { + "description": "Not implemented", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorObject" + }, + "example": { + "status": 501, + "error": "Not Implemented" + } + } + } + } + } + } + }, + "/v1/files/download:verify": { + "post": { + "operationId": "verifyCustomDownloadUrl", + "summary": "verifyCustomDownloadUrl", + "description": "Verify that a custom download URL is valid and has not expired.\n\nUse this endpoint to validate custom download URLs before redirecting users.\nCustom download URLs include a signature and expiration time for security.\n", + "tags": [ + "File" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VerifyCustomDownloadUrlPayload" + }, + "examples": { + "Verify URL": { + "value": { + "custom_download_url": "https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Verification result", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "valid": { + "type": "boolean", + "description": "Whether the URL is valid and not expired" + } + } + }, + "examples": { + "Valid URL": { + "value": { + "valid": true + } + }, + "Invalid URL": { + "value": { + "valid": false + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequestError" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/files/public/upload": { + "post": { + "operationId": "uploadFilePublic", + "summary": "uploadFilePublic", + "security": [], + "description": "Create a pre-signed S3 URL for uploading a file without authentication.\n\n**No authentication required.** This endpoint is intended for public-facing forms and journeys\nwhere end-users need to upload files without logging in.\n\nThe uploaded file is stored temporarily (one week). Use `saveFileV2` with proper authentication\nto store the file permanently.\n\n**Security note:** Files uploaded via this endpoint are temporary and require authenticated\naccess to be saved permanently.\n", + "tags": [ + "File" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UploadFilePayload" + }, + "examples": { + "Upload an image": { + "description": "Upload an image file", + "value": { + "filename": "image.png", + "mime_type": "image/png" + } + }, + "Upload a document": { + "description": "Upload a PDF document", + "value": { + "filename": "document.pdf", + "mime_type": "application/pdf" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Pre-signed URL for uploading the file", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "s3ref": { + "allOf": [ + { + "$ref": "#/components/schemas/S3Ref" + }, + { + "description": "S3 reference to use when saving the file permanently" + }, + { + "example": { + "bucket": "epilot-prod-user-content", + "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + } + } + ] + }, + "upload_url": { + "type": "string", + "format": "url", + "description": "Pre-signed URL for uploading the file via PUT request", + "example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123" + }, + "error": { + "type": "string", + "description": "Error message if the upload preparation failed", + "example": "File entity not found" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequestError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/{slug}/collections": { + "get": { + "operationId": "getUserSchemaFileCollections", + "summary": "getUserSchemaFileCollections", + "description": "Get all file collections for the current user within a specific schema.\n\nCollections help organize files into logical groups (e.g., \"Contracts\", \"Invoices\").\nUser collections are private to the creating user.\n", + "tags": [ + "File Collections" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "required": true, + "description": "The entity schema slug (e.g., order, opportunity, contact)", + "schema": { + "type": "string" + }, + "example": "opportunity" + } + ], + "responses": { + "200": { + "description": "List of collections for the user and schema", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileCollectionItem" + } + }, + "example": [ + { + "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents", + "name": "Documents", + "id": "ef7d985c-2385-44f4-9c71-ae06a52264f8", + "parents": [], + "starred": false, + "order": 0, + "created_at": "2024-01-01T12:00:00Z", + "updated_at": "2024-01-02T12:00:00Z" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "post": { + "operationId": "createUserSchemaFileCollection", + "summary": "createUserSchemaFileCollection", + "description": "Create a new file collection for the current user within a specific schema.\n\nThe collection will be private to the creating user and associated with the specified schema.\n", + "tags": [ + "File Collections" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "required": true, + "description": "The entity schema slug (e.g., order, opportunity, contact)", + "schema": { + "type": "string" + }, + "example": "opportunity" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileCollectionCreateRequest" + }, + "examples": { + "Create collection": { + "value": { + "name": "Contracts", + "starred": false + } + }, + "Create nested collection": { + "value": { + "name": "2024 Contracts", + "parents": [ + "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:contracts" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "description": "File collection created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileCollectionItem" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequestError" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/{slug}/collections/{collectionSlug}": { + "put": { + "operationId": "updateUserSchemaFileCollection", + "summary": "updateUserSchemaFileCollection", + "description": "Update an existing file collection.\n\nYou can update the name, parent relationships, starred status, and enabled locations/purposes.\n", + "tags": [ + "File Collections" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "required": true, + "description": "The entity schema slug (e.g., order, opportunity)", + "schema": { + "type": "string" + }, + "example": "opportunity" + }, + { + "name": "collectionSlug", + "in": "path", + "required": true, + "description": "The collection slug identifier", + "schema": { + "type": "string" + }, + "example": "documents" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileCollectionAttributes" + }, + "examples": { + "Rename collection": { + "value": { + "name": "Important Documents" + } + }, + "Star collection": { + "value": { + "starred": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "File collection updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileCollectionItem" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequestError" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deleteUserSchemaFileCollection", + "summary": "deleteUserSchemaFileCollection", + "description": "Delete a file collection.\n\n**Note:** Deleting a collection does not delete the files within it.\nFiles will remain but will no longer be associated with this collection.\n", + "tags": [ + "File Collections" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "required": true, + "description": "The entity schema slug (e.g., order, opportunity)", + "schema": { + "type": "string" + }, + "example": "opportunity" + }, + { + "name": "collectionSlug", + "in": "path", + "required": true, + "description": "The collection slug identifier", + "schema": { + "type": "string" + }, + "example": "documents" + } + ], + "responses": { + "200": { + "description": "File collection deleted successfully" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/entity/{id}/collections/{collectionSlug}/files": { + "get": { + "operationId": "getFilesInCollection", + "summary": "getFilesInCollection", + "description": "Get all files within a specific collection for an entity.\n\nThe schema is automatically derived from the entity. This endpoint requires\nview permission on the parent entity to access its files.\n", + "tags": [ + "File Collections" + ], + "parameters": [ + { + "$ref": "#/components/parameters/EntityIdPathParam" + }, + { + "name": "collectionSlug", + "in": "path", + "required": true, + "description": "The collection slug identifier", + "schema": { + "type": "string" + }, + "example": "documents" + } + ], + "responses": { + "200": { + "description": "List of files in the collection", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileEntity" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "403": { + "description": "Insufficient permissions to view the entity's files", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorObject" + }, + "example": { + "status": 403, + "error": "User must have permission to view this entity to access its files" + } + } + } + }, + "404": { + "description": "Entity or collection not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorObject" + }, + "example": { + "status": 404, + "error": "Entity not found" + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/collections/{schemaSlug}": { + "get": { + "operationId": "getGlobalFileCollections", + "summary": "getGlobalFileCollections", + "description": "Get all global file collections for a specific schema.\n\nGlobal collections are shared across all users in the organization for the specified schema.\nUnlike user collections, these are visible to everyone with access to entities of that schema.\n", + "tags": [ + "File Collections" + ], + "parameters": [ + { + "name": "schemaSlug", + "in": "path", + "required": true, + "description": "The entity schema slug (e.g., order, opportunity, contact)", + "schema": { + "type": "string" + }, + "example": "order" + } + ], + "responses": { + "200": { + "description": "List of global collections for the schema", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileCollectionItem" + } + }, + "example": [ + { + "slug": "_system_files_collection_schema_order:templates", + "name": "Templates", + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "parents": [], + "starred": false, + "order": 0, + "created_at": "2024-01-01T12:00:00Z", + "updated_at": "2024-01-01T12:00:00Z" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", + "description": "Bearer token authentication using epilot OAuth2 JWT tokens.\n\n**When to use:** Server-to-server integrations, API clients, and programmatic access.\n\n**How to obtain a token:**\n1. Use the epilot Auth API to authenticate\n2. Include the token in the `Authorization` header: `Authorization: Bearer `\n\n**Example:**\n```\nAuthorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\n```\n\n**Token contents:** The JWT contains user identity, organization ID, and permissions.\n" + }, + "CookieAuth": { + "type": "apiKey", + "in": "cookie", + "name": "token", + "description": "Cookie-based session authentication for browser applications.\n\n**When to use:** Browser-based applications that need to:\n- Embed file previews directly in `` tags\n- Download files without JavaScript token handling\n- Access files from HTML elements that cannot set custom headers\n\n**How to establish a session:**\n1. Obtain a Bearer token via EpilotAuth\n2. Call `GET /v1/files/session` with the Bearer token\n3. The server sets an HTTP-only cookie named `token`\n4. Subsequent requests automatically include the cookie\n\n**Security note:** The cookie is HTTP-only and secure, protecting against XSS attacks.\n" + } + }, + "schemas": { + "EntityId": { + "type": "string", + "example": "ef7d985c-2385-44f4-9c71-ae06a52264f8" + }, + "EntitySlug": { + "description": "URL-friendly identifier for the entity schema", + "type": "string", + "example": "contact" + }, + "ActivityId": { + "type": "string", + "format": "ulid", + "description": "See https://github.com/ulid/spec", + "example": "01F130Q52Q6MWSNS8N2AVXV4JN" + }, + "FileEntityId": { + "oneOf": [ + { + "type": "string", + "maxLength": 0, + "description": "Empty string (used when file ID not yet assigned)" + }, + { + "type": "string", + "format": "uuid", + "description": "Valid UUID v4" + } + ], + "example": "ef7d985c-2385-44f4-9c71-ae06a52264f8" + }, + "FileAttributes": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "tag1", + "tag2" + ] + }, + "_purpose": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "8d396871-95a0-4c9d-bb4d-9eda9c35776c", + "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8" + ] + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the entity", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "filename": { + "type": "string", + "example": "document.pdf" + }, + "type": { + "$ref": "#/components/schemas/FileType" + }, + "mime_type": { + "type": "string", + "description": "MIME type of the file", + "example": "application/pdf" + }, + "size_bytes": { + "type": "integer", + "minimum": 0, + "description": "File size in bytes", + "example": 1234, + "readOnly": true + }, + "readable_size": { + "type": "string", + "example": "1.2 MB", + "description": "Human readable file size", + "readOnly": true + }, + "access_control": { + "type": "string", + "default": "private", + "enum": [ + "private", + "public-read" + ] + }, + "public_url": { + "description": "Direct URL for file (public only if file access control is public-read)", + "type": "string", + "format": "url", + "example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf", + "readOnly": true + }, + "custom_download_url": { + "$ref": "#/components/schemas/CustomDownloadUrl" + } + } + }, + "FileType": { + "type": "string", + "enum": [ + "document", + "document_template", + "text", + "image", + "video", + "audio", + "spreadsheet", + "presentation", + "font", + "archive", + "application", + "unknown" + ] + }, + "CustomDownloadUrl": { + "description": "Custom external download url used for the file", + "type": "string", + "format": "uri", + "example": "https://some-api-url.com/download?file_id=123" + }, + "FileEntity": { + "allOf": [ + { + "type": "object", + "properties": { + "_title": { + "type": "string", + "example": "document.pdf" + }, + "_schema": { + "type": "string", + "enum": [ + "file" + ], + "readOnly": true + }, + "_org": { + "type": "string", + "example": "123", + "readOnly": true + }, + "_id": { + "$ref": "#/components/schemas/FileEntityId" + } + } + }, + { + "$ref": "#/components/schemas/FileAttributes" + }, + { + "type": "object", + "properties": { + "source_url": { + "type": "string", + "description": "Source URL for the file. Included if the entity was created from source_url, or when ?source_url=true", + "example": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf" + }, + "s3ref": { + "allOf": [ + { + "$ref": "#/components/schemas/S3Ref" + }, + { + "readOnly": true + } + ] + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileItem" + }, + "readOnly": true + }, + "_updated_at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "_created_at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "_acl": { + "$ref": "#/components/schemas/BaseEntityAcl" + }, + "_owners": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/BaseEntityOwner" + } + }, + "__additional": { + "type": "object", + "description": "Additional fields that are not part of the schema", + "additionalProperties": true, + "nullable": true + } + }, + "required": [ + "_title", + "_schema", + "_org", + "_id", + "filename", + "type", + "access_control", + "versions" + ] + } + ] + }, + "CommonSaveFilePayload": { + "type": "object", + "properties": { + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/FileEntityId" + }, + { + "description": "if passed, adds a new version to existing file entity" + } + ] + }, + "file_entity_id": { + "type": "string", + "description": "Deprecated, use _id instead", + "deprecated": true + }, + "relations": { + "type": "array", + "description": "List of entities to relate the file to", + "items": { + "$ref": "#/components/schemas/FileRelationItem" + } + } + }, + "additionalProperties": true + }, + "SaveS3FilePayload": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonSaveFilePayload" + }, + { + "$ref": "#/components/schemas/FileAttributes" + }, + { + "type": "object", + "properties": { + "s3ref": { + "$ref": "#/components/schemas/S3Ref" + } + } + } + ] + }, + "SaveFileFromSourceURLPayload": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonSaveFilePayload" + }, + { + "$ref": "#/components/schemas/FileAttributes" + }, + { + "type": "object", + "properties": { + "source_url": { + "$ref": "#/components/schemas/CustomDownloadUrl" + } + } + } + ] + }, + "SaveCustomFilePayload": { + "allOf": [ + { + "$ref": "#/components/schemas/CommonSaveFilePayload" + }, + { + "$ref": "#/components/schemas/FileAttributes" + }, + { + "type": "object", + "properties": { + "custom_download_url": { + "$ref": "#/components/schemas/CustomDownloadUrl" + } + } + } + ] + }, + "SaveFilePayload": { + "anyOf": [ + { + "$ref": "#/components/schemas/SaveS3FilePayload" + }, + { + "$ref": "#/components/schemas/SaveFileFromSourceURLPayload" + }, + { + "$ref": "#/components/schemas/SaveCustomFilePayload" + } + ] + }, + "SaveFilePayloadV2": { + "anyOf": [ + { + "$ref": "#/components/schemas/SaveS3FilePayload" + }, + { + "$ref": "#/components/schemas/SaveFileFromSourceURLPayload" + }, + { + "$ref": "#/components/schemas/SaveCustomFilePayload" + } + ] + }, + "BatchSaveFileVersionPayload": { + "type": "object", + "description": "Payload for batch version save. Only s3ref payloads are supported.", + "properties": { + "_id": { + "allOf": [ + { + "$ref": "#/components/schemas/FileEntityId" + }, + { + "description": "Target file entity to add version to" + } + ] + }, + "file_entity_id": { + "type": "string", + "description": "Deprecated, use _id instead", + "deprecated": true + }, + "filename": { + "type": "string", + "example": "document.pdf" + }, + "mime_type": { + "type": "string", + "example": "application/pdf" + }, + "access_control": { + "type": "string", + "default": "private", + "enum": [ + "private", + "public-read" + ] + }, + "s3ref": { + "$ref": "#/components/schemas/S3Ref" + } + }, + "required": [ + "s3ref" + ], + "additionalProperties": false + }, + "UploadFilePayload": { + "type": "object", + "properties": { + "filename": { + "type": "string", + "example": "document.pdf" + }, + "mime_type": { + "description": "MIME type of file", + "type": "string", + "example": "application/pdf", + "default": "application/octet-stream" + }, + "index_tag": { + "type": "string", + "example": "2f6a377c8e78", + "maxLength": 64, + "description": "Used to index the file at the storage layer, which helps when browsing for this file" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "example": { + "color": "blue" + }, + "description": "Allows passing in custom metadata for the file, expects key-value pairs of string type" + } + }, + "required": [ + "filename" + ] + }, + "FileUpload": { + "type": "object", + "properties": { + "s3ref": { + "allOf": [ + { + "$ref": "#/components/schemas/S3Ref" + }, + { + "example": { + "bucket": "epilot-prod-user-content", + "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + } + } + ] + }, + "upload_url": { + "type": "string", + "format": "url", + "example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123" + }, + "public_url": { + "description": "Returned only if file is permanent i.e. file_entity_id is passed", + "type": "string", + "format": "url", + "example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + } + } + }, + "DownloadFilesPayload": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/FileEntityId" + }, + "version": { + "type": "integer", + "description": "File version", + "example": 0 + } + }, + "required": [ + "id" + ] + } + }, + "VerifyCustomDownloadUrlPayload": { + "type": "object", + "properties": { + "custom_download_url": { + "description": "Custom external download url with signature and expiration time", + "type": "string", + "example": "https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg" + } + }, + "required": [ + "custom_download_url" + ] + }, + "S3Reference": { + "type": "object", + "properties": { + "bucket": { + "type": "string", + "example": "epilot-prod-user-content" + }, + "key": { + "type": "string", + "example": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + } + }, + "required": [ + "bucket", + "key" + ] + }, + "S3Ref": { + "$ref": "#/components/schemas/S3Reference" + }, + "FileItem": { + "type": "object", + "properties": { + "s3ref": { + "$ref": "#/components/schemas/S3Ref" + }, + "filename": { + "type": "string", + "example": "document.pdf" + }, + "size_bytes": { + "type": "integer", + "example": 1234 + }, + "readable_size": { + "type": "string", + "example": "1.2 MB" + }, + "mime_type": { + "type": "string", + "example": "image/jpeg" + } + } + }, + "FileRelationItem": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "_schema": { + "$ref": "#/components/schemas/EntitySlug" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "entity_id" + ] + }, + "PublicLink": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the public link", + "example": "3ef5c6d9-818d-45e6-8efb-b1de59079a1c" + }, + "link": { + "type": "string", + "description": "Public link of the file", + "example": "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c" + }, + "last_accessed_at": { + "type": "string", + "description": "The most recent timestamp when the file was accessed" + } + } + }, + "BaseEntityOwner": { + "description": "The user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n", + "type": "object", + "properties": { + "org_id": { + "type": "string", + "example": "123" + }, + "user_id": { + "type": "string", + "example": "123" + } + }, + "required": [ + "org_id" + ] + }, + "BaseEntityAcl": { + "type": "object", + "description": "Access control list (ACL) for an entity. Defines sharing access to external orgs or users.", + "properties": { + "view": { + "type": "array", + "items": { + "type": "string", + "example": "org:456" + } + }, + "edit": { + "type": "array", + "items": { + "type": "string", + "example": "org:456" + } + }, + "delete": { + "type": "array", + "items": { + "type": "string", + "example": "org:456" + } + } + } + }, + "ErrorObject": { + "description": "A generic error returned by the API", + "type": "object", + "properties": { + "status": { + "type": "integer", + "description": "The HTTP status code of the error", + "example": 400 + }, + "error": { + "type": "string", + "description": "The error message", + "example": "Bad Request" + } + } + }, + "FileCollectionId": { + "description": "Generated uuid for a file collection", + "type": "string", + "format": "uuid" + }, + "FileCollectionItem": { + "description": "A file collection with identifiers and timestamps", + "type": "object", + "properties": { + "slug": { + "type": "string", + "description": "Full slug for the collection. Format depends on collection type:\n- User collection: `_system_files_collection_{entity_uuid}_{user_id}:{collection_name}`\n Example: `_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents`\n- Global collection: `_system_files_collection_schema_{schema_slug}:{collection_name}`\n Example: `_system_files_collection_schema_opportunity:templates`\n", + "example": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents" + }, + "name": { + "type": "string", + "description": "Display name of the collection", + "example": "Documents" + }, + "id": { + "$ref": "#/components/schemas/FileCollectionId" + }, + "parents": { + "type": "array", + "description": "Array of parent collection slugs, empty array if top-level collection. Format depends on collection type:\n- User collection: `_system_files_collection_{entity_uuid}_{user_id}`\n Example: `[\"_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234\"]`\n- Global collection: `_system_files_collection_schema_{schema_slug}`\n Example: `[\"_system_files_collection_schema_opportunity\"]`\n", + "items": { + "type": "string" + }, + "example": [ + "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234" + ] + }, + "starred": { + "type": "boolean", + "description": "Whether the collection is starred / favorited", + "example": false + }, + "order": { + "type": "number", + "description": "Display order for the collection", + "example": 0 + }, + "enabled_locations": { + "description": "List of location slugs where the collection is enabled. If empty, enabled for all.", + "type": "array", + "items": { + "type": "string" + } + }, + "enabled_purposes": { + "description": "List of purpose slugs where the collection is enabled. If empty, enabled for all.", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "9eefcb98-93cf-4c5b-a040-f1d26d57c177", + "5c544c09-a691-43ed-a7fa-0a8b44b5b161" + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the collection was created", + "example": "2024-01-01T12:00:00Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the collection was last updated", + "example": "2024-01-02T12:00:00Z" + } + }, + "required": [ + "name" + ] + }, + "FileCollectionAttributes": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the collection" + }, + "parents": { + "type": "array", + "description": "Array of parent collection slugs, empty array if top-level collection", + "items": { + "type": "string" + } + }, + "starred": { + "type": "boolean", + "description": "Whether the collection is starred / favorited", + "default": false + }, + "enabled_locations": { + "description": "List of location slugs where the collection is enabled. If empty, enabled for all.", + "type": "array", + "items": { + "type": "string" + } + }, + "enabled_purposes": { + "description": "List of purpose IDs where the collection is enabled. If empty, enabled for all.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "FileCollectionCreateRequest": { + "description": "Request body for creating a file collection", + "allOf": [ + { + "$ref": "#/components/schemas/FileCollectionAttributes" + }, + { + "type": "object", + "required": [ + "name" + ] + } + ] + } + }, + "parameters": { + "EntityIdPathParam": { + "name": "id", + "description": "Entity id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + }, + "StrictQueryParam": { + "name": "strict", + "in": "query", + "required": false, + "description": "When passed true, the response will contain only fields that match the schema, with non-matching fields included in `__additional`", + "schema": { + "type": "boolean", + "default": false + } + }, + "ActivityIdQueryParam": { + "name": "activity_id", + "description": "Activity to include in event feed", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ActivityId" + } + }, + "FillActivityQueryParam": { + "name": "fill_activity", + "description": "Update the diff and entity for the custom activity included in the query.\nPending state on activity is automatically ended when activity is filled.\n", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + "AsyncOperationQueryParam": { + "name": "async", + "description": "Don't wait for updated entity to become available in Search API. Useful for large migrations", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + "DeleteTempFileQueryParam": { + "name": "delete_temp_file", + "description": "Delete the temp file from S3 after copying it permanently", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + "VersionOnlyQueryParam": { + "name": "version_only", + "in": "query", + "description": "When true, only adds a new file version and updates the entity's\ns3ref to point to the new version, without overwriting the entity's\nexisting top-level metadata. The entity's filename, type, and other\nfields are preserved as-is. The new version entry in the versions\narray will contain the file-level metadata (filename, mime_type, etc).\nOnly applies when updating an existing entity (_id or file_entity_id is set).\n", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + }, + "responses": { + "BadRequestError": { + "description": "Invalid request parameters or payload", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorObject" + }, + { + "example": { + "status": 400, + "error": "Bad Request: filename is required" + } + } + ] + } + } + } + }, + "UnauthorizedError": { + "description": "Authentication required or invalid credentials", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorObject" + }, + { + "example": { + "status": 401, + "error": "Unauthorized: Invalid or expired token" + } + } + ] + } + } + } + }, + "ForbiddenError": { + "description": "Insufficient permissions to access the resource", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorObject" + }, + { + "example": { + "status": 403, + "error": "Forbidden: You do not have permission to access this file" + } + } + ] + } + } + } + }, + "NotFoundError": { + "description": "The requested resource was not found", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorObject" + }, + { + "example": { + "status": 404, + "error": "Not Found: File entity not found" + } + } + ] + } + } + } + }, + "InternalServerError": { + "description": "An unexpected error occurred on the server", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorObject" + }, + { + "example": { + "status": 500, + "error": "Internal Server Error" + } + } + ] + } + } + } + } + } + }, + "servers": [ + { + "url": "https://file.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/iban.json b/packages/cli/definitions/iban.json new file mode 100644 index 00000000..076a3cd5 --- /dev/null +++ b/packages/cli/definitions/iban.json @@ -0,0 +1,132 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Iban API", + "version": "1.0.0", + "description": "API Backend for epilot Iban feature.", + "contact": { + "name": "Support", + "email": "info@epilot.cloud", + "url": "https://help.epilot.cloud" + } + }, + "servers": [ + { + "url": "https://iban-api.sls.epilot.io" + } + ], + "tags": [ + { + "name": "Ibans", + "description": "Operations related to ibans" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v1/public/iban:validate": { + "post": { + "operationId": "validateIban", + "summary": "validateIban", + "description": "Validate an Iban", + "security": [ + {}, + { + "EpilotPublicAuth": [] + } + ], + "tags": [ + "Ibans" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "iban": { + "type": "string", + "description": "IBAN to be validated" + } + }, + "required": [ + "iban" + ] + }, + "example": { + "iban": "DE89370400440532013000" + } + } + } + }, + "responses": { + "201": { + "description": "Created" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "example": { + "status": "Bad Request", + "error": "Invalid request body" + } + } + } + }, + "500": { + "description": "Internal Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "example": { + "status": "Internal Error", + "error": "Internal Server Error" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotPublicAuth": { + "type": "http", + "scheme": "bearer", + "description": "Epilot Public Access Bearer Token", + "bearerFormat": "JWT" + } + }, + "schemas": { + "Error": { + "description": "Error", + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "error": { + "type": "string" + } + } + } + } + } +} diff --git a/packages/cli/definitions/journey.json b/packages/cli/definitions/journey.json new file mode 100644 index 00000000..04cb7e37 --- /dev/null +++ b/packages/cli/definitions/journey.json @@ -0,0 +1,2341 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Journey API", + "description": "API to configure journeys", + "version": "1.1.0" + }, + "security": [ + { + "EpilotAuth": [] + } + ], + "tags": [ + { + "name": "Journeys", + "description": "Journey operations" + }, + { + "name": "Journeys V2", + "description": "Journey V2 operations" + }, + { + "name": "journey_schema", + "x-displayName": "Journey", + "description": "\n" + } + ], + "x-tagGroups": [ + { + "name": "APIs", + "tags": [ + "Journeys", + "Journeys V2" + ] + }, + { + "name": "Schemas", + "tags": [ + "journey_schema" + ] + } + ], + "paths": { + "/v1/journey/organization/{id}": { + "get": { + "operationId": "getJourneysByOrgId", + "summary": "getJourneysByOrgId", + "description": "Get all journeys by organization id", + "tags": [ + "Journeys" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "123" + } + }, + { + "name": "hydrate", + "in": "query", + "description": "Hydrate", + "required": false, + "schema": { + "type": "string", + "example": "true" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetJourneysResponse" + } + } + } + } + } + } + }, + "/v1/journey/configuration/{id}": { + "get": { + "operationId": "getJourney", + "summary": "getJourney", + "description": "Get journey by id. Private journeys requires valid private token to be passed", + "security": [ + {}, + { + "EpilotAuth": [] + } + ], + "tags": [ + "Journeys" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Journey ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "509cdffe-424f-457a-95c2-9708c304ce77" + } + }, + { + "name": "source", + "in": "query", + "description": "What source ID. Journey or Entity ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "orgId", + "in": "query", + "description": "Organization ID", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Journey" + } + } + } + } + } + }, + "delete": { + "operationId": "removeJourney", + "summary": "removeJourney", + "description": "Remove journey by id", + "tags": [ + "Journeys" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Journey ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "509cdffe-424f-457a-95c2-9708c304ce77" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": {} + }, + "404": { + "description": "Journey not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "journey not found" + } + } + } + } + } + } + } + } + }, + "/v1/journey/products/{id}": { + "get": { + "operationId": "getJourneyProducts", + "summary": "getJourneyProducts", + "description": "Get products available in the journey by id. requires public journey token to be passed.", + "security": [ + { + "EpilotAuth": [] + } + ], + "tags": [ + "Journeys" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Journey ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "509cdffe-424f-457a-95c2-9708c304ce77" + } + }, + { + "name": "source", + "in": "query", + "description": "What source ID. Journey or Entity ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "postal_code", + "in": "query", + "description": "Zip Code for availibility", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "city", + "in": "query", + "description": "city for availibility", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "street", + "in": "query", + "description": "street name for availibility", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "street_number", + "in": "query", + "description": "street number for availibility", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JourneyProductsResponse" + } + } + } + } + } + } + }, + "/v1/journey/configuration": { + "post": { + "operationId": "createJourney", + "summary": "createJourney", + "description": "Create a Journey", + "tags": [ + "Journeys" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JourneyCreationRequest" + } + } + }, + "description": "Payload" + }, + "parameters": [ + { + "name": "skipAutomation", + "in": "query", + "description": "skip creating an Automation (it takes Yn format \"true, yes, 1, y\")", + "required": false, + "schema": { + "type": "string", + "format": "Yn", + "example": true + } + } + ], + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Journey" + } + } + } + } + } + }, + "put": { + "operationId": "updateJourney", + "summary": "updateJourney", + "description": "Update a Journey", + "tags": [ + "Journeys" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JourneyCreationRequest" + } + } + }, + "description": "Payload" + }, + "parameters": [], + "responses": { + "204": { + "description": "Success", + "headers": { + "X-Resource-Revisions": { + "schema": { + "type": "integer", + "minimum": 0 + }, + "description": "Last revisions number of the updated resource" + } + } + }, + "409": { + "description": "The Journey has been modified since your last read, please refresh it and try again" + } + } + }, + "patch": { + "operationId": "patchUpdateJourney", + "summary": "patchUpdateJourney", + "description": "Update a Journey (partially / patch). Support for nested properties updates (e.g. \"property[0].name\").", + "tags": [ + "Journeys" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchUpdateJourneyRequest" + }, + "example": { + "journeyId": "509cdffe-424f-457a-95c2-9708c304ce77", + "name": "New Journey Name", + "steps[0].uischema.elements[0].products": [ + "123456", + "654321" + ] + } + } + }, + "description": "Payload" + }, + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JourneyResponse" + } + } + } + }, + "404": { + "description": "Journey or associated entity not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "journey not found" + } + } + } + } + } + } + } + } + }, + "/v1/journey/configuration/search": { + "post": { + "operationId": "searchJourneys", + "summary": "searchJourneys", + "description": "Search Journeys", + "tags": [ + "Journeys" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchJourneysQueryRequest" + } + } + }, + "description": "Payload" + }, + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchJourneysResponse" + } + } + } + } + } + } + }, + "/v1/journey/document:generate": { + "post": { + "operationId": "generateDocument", + "summary": "generateDocument", + "description": "Builds document generated from a template with journey values.\"\n\nSupported input document types:\n- .docx\n\nSupported output document types:\n- .pdf\n- .docx but limited to only text based variables\n\nUses [Document API](https://gitlab.com/e-pilot/product/file-management/document-api) to generate the document.\nUses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.\n", + "security": [ + {}, + { + "EpilotAuth": [] + } + ], + "tags": [ + "Journeys" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateDocumentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Generated document output", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateDocumentResponse" + } + } + } + } + } + } + }, + "/v2/journey/configuration": { + "post": { + "operationId": "createJourneyV2", + "summary": "createJourneyV2", + "description": "Create a Journey", + "tags": [ + "Journeys V2" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JourneyCreationRequestV2" + } + } + }, + "description": "Payload" + }, + "parameters": [ + { + "name": "skipAutomation", + "in": "query", + "description": "skip creating an Automation (it takes Yn format \"true, yes, 1, y\")", + "required": false, + "schema": { + "type": "string", + "format": "Yn", + "example": true + } + } + ], + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JourneyCreationRequestV2" + } + } + } + } + } + }, + "put": { + "operationId": "updateJourneyV2", + "summary": "updateJourneyV2", + "description": "Update a Journey", + "tags": [ + "Journeys V2" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JourneyCreationRequestV2" + } + } + }, + "description": "Payload" + }, + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JourneyCreationRequestV2" + } + } + } + }, + "404": { + "description": "Journey or associated entity not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "journey not found" + } + } + } + } + } + } + } + }, + "patch": { + "operationId": "patchUpdateJourneyV2", + "summary": "patchUpdateJourneyV2", + "description": "Update a Journey (partially / patch). Support for nested properties updates (e.g. \"property[0].name\").", + "tags": [ + "Journeys V2" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchUpdateJourneyRequest" + }, + "example": { + "journeyId": "509cdffe-424f-457a-95c2-9708c304ce77", + "name": "New Journey Name", + "steps[0].uischema.elements[0].products": [ + "123456", + "654321" + ] + } + } + }, + "description": "Payload" + }, + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JourneyCreationRequestV2" + } + } + } + }, + "404": { + "description": "Journey or associated entity not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "journey not found" + } + } + } + } + } + } + } + } + }, + "/v2/journey/configuration/{id}": { + "get": { + "operationId": "getJourneyV2", + "summary": "getJourneyV2", + "description": "Get journey by id", + "security": [], + "tags": [ + "Journeys V2" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Journey ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "509cdffe-424f-457a-95c2-9708c304ce77" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JourneyCreationRequestV2" + } + } + } + } + } + }, + "delete": { + "operationId": "removeJourneyV2", + "summary": "removeJourneyV2", + "description": "Remove journey by id", + "tags": [ + "Journeys V2" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Journey ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "509cdffe-424f-457a-95c2-9708c304ce77" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": {} + } + } + } + }, + "/v1/journey/{id}/settings": { + "get": { + "operationId": "getSettingsForJourney", + "summary": "getSettingsForJourney", + "description": "Get settings related to the journey using journey ID.", + "tags": [ + "Journeys" + ], + "security": [ + {} + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Journey ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "509cdffe-424f-457a-95c2-9708c304ce77" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSettingsForJourney" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "journey not found" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Unknown API Error" + } + } + } + } + } + } + } + } + }, + "/v1/journey/button-options": { + "get": { + "operationId": "getButtonOptions", + "summary": "getButtonOptions", + "description": "Get button options from a csv file.", + "security": [ + { + "EpilotAuth": [] + } + ], + "tags": [ + "Journeys" + ], + "parameters": [ + { + "in": "query", + "name": "fileId", + "required": true, + "description": "file id to get button options from", + "schema": { + "type": "string", + "example": "535ef74a-dd66-4d01-94a9-725016e70d1c" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ButtonOption" + } + } + } + } + }, + "400": { + "description": "Bad Request - Invalid file or content", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "UTF-8 encoding error while processing CSV content" + }, + "details": { + "type": "string", + "example": "Please ensure your CSV file is properly encoded in UTF-8 format" + } + } + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "File with ID 535ef74a-dd66-4d01-94a9-725016e70d1c not found." + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Unknown API Error" + } + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "GetJourneysResponse": { + "type": "object" + }, + "JourneyResponse": { + "type": "object", + "properties": { + "createdJourney": { + "$ref": "#/components/schemas/Journey" + } + } + }, + "JourneyProductsResponse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "_schema": { + "type": "string" + }, + "_title": { + "type": "string" + }, + "name": { + "type": "string" + }, + "_id": { + "type": "string" + }, + "_org": { + "type": "string" + }, + "code": { + "type": "string" + }, + "description": { + "type": "string" + }, + "feature": { + "type": "array" + }, + "product_images": { + "type": "array" + }, + "legal_footnote": { + "type": "string" + }, + "product_downloads": { + "type": "array" + }, + "price": { + "type": "object" + } + } + } + }, + "PatchUpdateJourneyRequest": { + "type": "object", + "properties": { + "journeyId": { + "type": "string", + "format": "uuid", + "example": "509cdffe-424f-457a-95c2-9708c304ce77" + }, + "__lastModifiedAt": { + "type": "string", + "description": "If passed with value of null, the API won't modify the lastModifiedAt field on updating the journey", + "nullable": true + } + }, + "additionalProperties": true, + "description": "Patch request to update a journey (journey id is required) Support for nested properties (e.g. steps[0].uischema.elements[0].products) is supported.\n", + "required": [ + "journeyId" + ] + }, + "JourneyCreationRequest": { + "type": "object", + "properties": { + "journeyId": { + "type": "string" + }, + "organizationId": { + "type": "string" + }, + "brandId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "steps": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "showStepName": { + "type": "boolean", + "nullable": true + }, + "title": { + "type": "string", + "nullable": true + }, + "subTitle": { + "type": "string", + "nullable": true + }, + "showStepSubtitle": { + "type": "boolean", + "nullable": true + }, + "showStepper": { + "type": "boolean", + "nullable": true + }, + "showStepperLabels": { + "type": "boolean", + "nullable": true + }, + "hideNextButton": { + "type": "boolean", + "nullable": true + }, + "name": { + "type": "string" + }, + "stepId": { + "type": "string" + }, + "schema": {}, + "uischema": {}, + "maxWidth": { + "type": "string", + "enum": [ + "small", + "medium", + "large", + "extra large" + ] + } + }, + "required": [ + "name", + "schema", + "uischema" + ] + } + }, + "design": { + "type": "object", + "properties": { + "logoUrl": { + "type": "string", + "nullable": true + }, + "theme": { + "type": "object", + "additionalProperties": {} + }, + "designTokens": { + "type": "object" + } + }, + "additionalProperties": false + }, + "rules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "inject", + "injectWithKey" + ] + }, + "sourceType": { + "type": "string", + "enum": [ + "journey", + "step", + "block" + ] + }, + "source": { + "type": "string" + }, + "target": { + "type": "string" + } + }, + "required": [ + "type", + "sourceType", + "source", + "target" + ], + "additionalProperties": false + } + }, + "logics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "autoGeneratedId": { + "type": "string" + }, + "conditions": { + "type": "array", + "items": { + "type": "string" + } + }, + "actions": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "conditions", + "actions" + ], + "additionalProperties": false + } + }, + "logicsV4": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for logic. Use uuidv7" + }, + "protected": { + "type": "boolean", + "description": "If true, logic can't be manipulated by the configuring user" + }, + "action": { + "type": "string", + "description": "Indicates which action to take in case logic evaluates to true" + }, + "triggeredOn": { + "type": "string", + "description": "Indicates when the logic should be evaluated" + }, + "conditions": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "operator": { + "type": "string", + "description": "Operator to be applied between the fact value and the value" + }, + "functionName": { + "type": "string", + "description": "If operator is a custom function, this needs to be provided" + }, + "fact": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for a fact" + }, + "referenceType": { + "type": "string", + "description": "Indicates reference type (block or context parameter)" + }, + "referenceId": { + "type": "string", + "description": "Id of the reference" + }, + "path": { + "type": "string", + "description": "Path to a property. Used if only part of the value is needed" + }, + "meaning": { + "type": "string", + "description": "If path is a reference, indicates the intention of it" + } + } + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object" + }, + { + "type": "array" + } + ] + }, + "args": { + "type": "object" + } + } + } + } + }, + "settings": { + "type": "object", + "description": "Logic specific settings. Will vary by type of logic" + } + } + } + }, + "contextSchema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the context schema item" + }, + "type": { + "type": "string", + "description": "Type of the parameter. It could be either an entity slug, or a text" + }, + "paramKey": { + "type": "string", + "description": "Expected key to be received in the context" + }, + "isRequired": { + "type": "boolean", + "description": "Indicates if a value is expected to be provided" + }, + "shouldLoadEntity": { + "type": "boolean", + "description": "If type is not text, we can instruct the journey to fetch the entity id we receive as value" + } + }, + "required": [ + "paramKey", + "type" + ], + "additionalProperties": false + } + }, + "journey_type": { + "type": "string", + "description": "Journey Template", + "example": "Sales template (Premium)" + }, + "settings": { + "type": "object", + "properties": { + "embedOptions": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "full-screen", + "inline" + ] + }, + "lang": { + "type": "string", + "enum": [ + "de", + "en", + "fr" + ] + }, + "width": { + "type": "string" + }, + "topBar": { + "type": "boolean" + }, + "scrollToTop": { + "type": "boolean" + }, + "button": { + "type": "object", + "properties": { + "text": { + "type": "string", + "nullable": true + }, + "align": { + "type": "string", + "enum": [ + "left", + "center", + "right" + ] + } + } + } + } + }, + "safeModeAutomation": { + "type": "boolean" + }, + "canary": { + "deprecated": true, + "description": "DEPRECATED - This API will return hardcoded value of false. Please note that this field is internal to epilot and should not be used by external clients. If you wish to get the canary flag, please use the /v1/journey/{id}/settings API.", + "type": "boolean" + }, + "designId": { + "type": "string" + }, + "templateId": { + "type": "string" + }, + "entityId": { + "type": "string", + "nullable": true + }, + "mappingsAutomationId": { + "type": "string" + }, + "targetedCustomer": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "organizationSettings": { + "type": "object", + "additionalProperties": { + "type": "boolean" + }, + "nullable": true + }, + "publicToken": { + "type": "string", + "nullable": true + }, + "runtimeEntities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ORDER", + "OPPORTUNITY" + ] + } + }, + "filePurposes": { + "type": "array", + "items": { + "type": "string" + } + }, + "entityTags": { + "type": "array", + "items": { + "type": "string" + } + }, + "addressSuggestionsFileUrl": { + "type": "string", + "nullable": true, + "deprecated": true, + "description": "@deprecated Use addressSuggestionsFileId instead" + }, + "addressSuggestionsFileId": { + "type": "string", + "nullable": true + }, + "useNewDesign": { + "type": "boolean", + "deprecated": true, + "description": "This property is deprecated and will be removed in a future version" + }, + "useAustrianLabels": { + "type": "boolean", + "description": "If true, some journey input labels are in Austrian format" + }, + "enableDarkMode": { + "type": "boolean", + "description": "If true, the journey shows an icon to toggle dark mode" + }, + "accessMode": { + "type": "string", + "enum": [ + "PUBLIC", + "PRIVATE" + ] + }, + "isPublished": { + "type": "boolean" + }, + "status": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "savingProgress": { + "type": "object", + "properties": { + "savingMode": { + "type": "string", + "enum": [ + "auto", + "local", + "remote", + "none" + ] + }, + "supportedVersion": { + "type": "number" + } + } + }, + "thirdPartyCookies": { + "type": "boolean", + "description": "If false, third-party cookies are disabled to comply with GDPR regulations without asking for consent." + } + }, + "required": [ + "designId" + ], + "additionalProperties": false + }, + "validationRules": { + "$ref": "#/components/schemas/ValidationRuleRef" + }, + "createdBy": { + "type": "string" + }, + "updatedBy": { + "type": "string", + "nullable": true + }, + "__lastModifiedAt": { + "type": "string", + "description": "If passed with value of null, the API won't modify the lastModifiedAt field on updating the journey", + "nullable": true + } + }, + "required": [ + "organizationId", + "name", + "steps" + ], + "additionalProperties": true + }, + "JourneyCreationRequestV2": { + "type": "object", + "properties": { + "journeyId": { + "type": "string" + }, + "brandId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "steps": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "showStepName": { + "type": "boolean", + "nullable": true + }, + "title": { + "type": "string", + "nullable": true + }, + "subTitle": { + "type": "string", + "nullable": true + }, + "showStepSubtitle": { + "type": "boolean", + "nullable": true + }, + "showStepper": { + "type": "boolean", + "nullable": true + }, + "showStepperLabels": { + "type": "boolean", + "nullable": true + }, + "hideNextButton": { + "type": "boolean", + "nullable": true + }, + "name": { + "type": "string" + }, + "stepId": { + "type": "string" + }, + "schema": {}, + "uischema": {}, + "maxWidth": { + "type": "string", + "enum": [ + "small", + "medium", + "large", + "extra large" + ] + } + }, + "required": [ + "name", + "schema", + "uischema" + ] + } + }, + "design": { + "type": "object", + "properties": { + "logoUrl": { + "type": "string", + "nullable": true + }, + "theme": { + "type": "object", + "additionalProperties": {} + }, + "designTokens": { + "type": "object" + } + }, + "additionalProperties": false + }, + "rules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "inject", + "injectWithKey" + ] + }, + "sourceType": { + "type": "string", + "enum": [ + "journey", + "step", + "block" + ] + }, + "source": { + "type": "string" + }, + "target": { + "type": "string" + } + }, + "required": [ + "type", + "sourceType", + "source", + "target" + ], + "additionalProperties": false + } + }, + "logics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "autoGeneratedId": { + "type": "string" + }, + "conditions": { + "type": "array", + "items": { + "type": "string" + } + }, + "actions": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "conditions", + "actions" + ], + "additionalProperties": false + } + }, + "logicsV4": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for logic. Use uuidv7" + }, + "protected": { + "type": "boolean", + "description": "If true, logic can't be manipulated by the configuring user" + }, + "action": { + "type": "string", + "description": "Indicates which action to take in case logic evaluates to true" + }, + "triggeredOn": { + "type": "string", + "description": "Indicates when the logic should be evaluated" + }, + "conditions": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "operator": { + "type": "string", + "description": "Operator to be applied between the fact value and the value" + }, + "functionName": { + "type": "string", + "description": "If operator is a custom function, this needs to be provided" + }, + "fact": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for a fact" + }, + "referenceType": { + "type": "string", + "description": "Indicates reference type (block or context parameter)" + }, + "referenceId": { + "type": "string", + "description": "Id of the reference" + }, + "path": { + "type": "string", + "description": "Path to a property. Used if only part of the value is needed" + }, + "meaning": { + "type": "string", + "description": "If path is a reference, indicates the intention of it" + } + } + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object" + }, + { + "type": "array" + } + ] + }, + "args": { + "type": "object" + } + } + } + } + }, + "settings": { + "type": "object", + "description": "Logic specific settings. Will vary by type of logic" + } + } + } + }, + "contextSchema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the context schema item" + }, + "type": { + "type": "string", + "description": "Type of the parameter. It could be either an entity slug, or a text" + }, + "paramKey": { + "type": "string", + "description": "Expected key to be received in the context" + }, + "isRequired": { + "type": "boolean", + "description": "Indicates if a value is expected to be provided" + }, + "shouldLoadEntity": { + "type": "boolean", + "description": "If type is not text, we can instruct the journey to fetch the entity id we receive as value" + } + }, + "required": [ + "paramKey", + "type" + ], + "additionalProperties": false + } + }, + "journey_type": { + "type": "string", + "description": "Journey Template", + "example": "Sales template (Premium)" + }, + "settings": { + "type": "object", + "properties": { + "embedOptions": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "full-screen", + "inline" + ] + }, + "lang": { + "type": "string", + "enum": [ + "de", + "en", + "fr" + ] + }, + "width": { + "type": "string" + }, + "topBar": { + "type": "boolean" + }, + "scrollToTop": { + "type": "boolean" + }, + "button": { + "type": "object", + "properties": { + "text": { + "type": "string", + "nullable": true + }, + "align": { + "type": "string", + "enum": [ + "left", + "center", + "right" + ] + } + } + } + } + }, + "safeModeAutomation": { + "type": "boolean" + }, + "designId": { + "type": "string" + }, + "entityId": { + "type": "string", + "nullable": true + }, + "mappingsAutomationId": { + "type": "string" + }, + "templateId": { + "type": "string" + }, + "targetedCustomer": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "publicToken": { + "type": "string", + "nullable": true + }, + "runtimeEntities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ORDER", + "OPPORTUNITY" + ] + } + }, + "filePurposes": { + "type": "array", + "items": { + "type": "string" + } + }, + "entityTags": { + "type": "array", + "items": { + "type": "string" + } + }, + "addressSuggestionsFileUrl": { + "type": "string", + "nullable": true, + "deprecated": true, + "description": "@deprecated Use addressSuggestionsFileId instead" + }, + "addressSuggestionsFileId": { + "type": "string", + "nullable": true + }, + "useNewDesign": { + "type": "boolean", + "deprecated": true, + "description": "This property is deprecated and will be removed in a future version" + }, + "thirdPartyCookies": { + "type": "boolean", + "description": "If false, third-party cookies are disabled to comply with GDPR regulations without asking for consent." + }, + "accessMode": { + "type": "string", + "enum": [ + "PUBLIC", + "PRIVATE" + ] + }, + "enableDarkMode": { + "type": "boolean", + "description": "If true, the journey shows an icon to toggle dark mode" + } + }, + "additionalProperties": false + }, + "validationRules": { + "$ref": "#/components/schemas/ValidationRuleRef" + }, + "_manifest": { + "type": "array", + "description": "Manifest/Blueprint ID used to create/update the entity", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } + }, + "required": [ + "name", + "steps" + ] + }, + "SearchJourneysQueryRequest": { + "type": "object", + "properties": { + "q": { + "type": "string", + "description": "Lucene query syntax\nSee https://lucene.apache.org/core/2_9_4/queryparsersyntax.html ; https://www.elastic.co/guide/en/kibana/current/lucene-query.html\n", + "example": "_tags:*Flex*", + "default": "*" + }, + "from": { + "type": "integer", + "description": "The offset of the first result to return.\nSee https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html\n", + "example": 0, + "default": 0 + }, + "size": { + "type": "integer", + "description": "The maximum number of results to return.\nSee https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html\n", + "example": 25, + "default": 25 + }, + "sort": { + "type": "string", + "description": "The sort order. Follows Lucene syntax.\n", + "example": "_created_at:desc", + "default": "_created_at:desc" + } + } + }, + "SearchJourneysResponse": { + "type": "object", + "properties": { + "hits": { + "type": "number", + "description": "The total number of hits.\n", + "example": 1 + }, + "results": { + "type": "array", + "description": "The results.\n", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "Journey Entity ID", + "format": "uuid", + "example": "e0f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8" + }, + "_schema": { + "type": "string", + "description": "Entity Schema (journey always in this case)", + "example": "journey" + }, + "_title": { + "type": "string", + "description": "Journey Entity Title", + "example": "Journey Entity Title" + }, + "_org": { + "type": "string", + "description": "Organization ID", + "example": "739224" + }, + "_created_at": { + "type": "string", + "format": "date-time", + "example": "2020-01-01T00:00:00.000Z" + }, + "_updated_at": { + "type": "string", + "format": "date-time", + "example": "2020-01-01T00:00:00.000Z" + }, + "_tags": { + "type": "array", + "items": { + "type": "string", + "example": "Flex" + } + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the entity", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "journey_name": { + "type": "string", + "description": "Journey Name", + "example": "Journey Name" + }, + "journey_id": { + "type": "string", + "format": "uuid", + "description": "Journey config ID", + "example": "de7df470-253e-11ed-9174-116b8a718c0a" + }, + "journey_type": { + "type": "string", + "description": "Journey Template", + "example": "Sales template" + }, + "design": { + "type": "string", + "description": "Journey Design Name", + "example": "Design EPILOT" + }, + "created_by": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "User ID", + "example": "12345" + } + } + } + }, + "journey_version": { + "type": "string", + "description": "Journey Version", + "enum": [ + "Flex" + ] + } + } + } + } + } + }, + "Journey": { + "allOf": [ + { + "$ref": "#/components/schemas/JourneyCreationRequest" + }, + { + "$ref": "#/components/schemas/JourneyAuditInfo" + }, + { + "$ref": "#/components/schemas/JourneyFeatureFlags" + } + ] + }, + "JourneyFeatureFlags": { + "type": "object", + "properties": { + "featureFlags": { + "type": "object", + "additionalProperties": true + } + } + }, + "JourneyAuditInfo": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "lastModifiedAt": { + "type": "string" + }, + "deletedAt": { + "type": "string" + }, + "version": { + "type": "number" + }, + "revisions": { + "type": "number" + } + }, + "required": [ + "createdAt", + "lastModifiedAt", + "version", + "revisions" + ] + }, + "S3Reference": { + "type": "object", + "properties": { + "bucket": { + "type": "string", + "example": "document-api-prod" + }, + "key": { + "type": "string", + "example": "uploads/my-template.pdf" + } + }, + "required": [ + "bucket", + "key" + ] + }, + "TemplateSettings": { + "type": "object", + "description": "Template Settings for document generation", + "properties": { + "custom_margins": { + "description": "Custom margins for the document", + "type": "object", + "properties": { + "top": { + "description": "Top margin in cm", + "type": "number", + "example": 2.54 + }, + "bottom": { + "description": "Bottom margin in cm", + "type": "number", + "example": 2.54 + } + } + }, + "suggested_margins": { + "description": "Suggested margins for the document", + "type": "object", + "properties": { + "top": { + "description": "Top margin in cm", + "type": "number", + "example": 2.54 + }, + "bottom": { + "description": "Bottom margin in cm", + "type": "number", + "example": 2.54 + } + } + }, + "display_margin_guidelines": { + "description": "Display margin guidelines (applicable to partial generation only)", + "type": "boolean", + "example": true + }, + "enable_data_table_margin_autofix": { + "description": "Enable data table margin autofix", + "type": "boolean", + "example": false + }, + "template_with_datatable": { + "description": "A flag that indicates whether the template has 1 or more data tables in it", + "type": "boolean", + "example": false + }, + "enabled_template_settings_persistence": { + "description": "Enables the persistance of template settings", + "type": "boolean", + "example": false + }, + "misconfigured_margins": { + "description": "An indication that the page margins are misconfigured", + "type": "boolean", + "example": false + }, + "file_entity_id": { + "description": "The file entity id, used when persisting a new template version with updated settings", + "type": "string", + "format": "uuid", + "example": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p" + } + } + }, + "GenerateDocumentResponse": { + "type": "object", + "properties": { + "job_id": { + "type": "string", + "format": "uuid" + }, + "job_status": { + "description": "Status of the job", + "type": "string", + "enum": [ + "STARTED", + "PROCESSING", + "SUCCESS", + "FAILED" + ] + }, + "message": { + "description": "A message explaining the progress", + "type": "string" + }, + "pdf_output": { + "type": "object", + "properties": { + "preview_url": { + "description": "Pre-signed S3 GET URL for PDF preview", + "type": "string", + "example": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf" + }, + "output_document": { + "type": "object", + "properties": { + "filename": { + "description": "Generated document filename for PDF", + "type": "string", + "example": "my-template-OR-001.pdf" + }, + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + } + }, + "example": { + "s3ref": { + "bucket": "document-api-preview-prod", + "key": "preview/my-template.pdf" + } + } + } + } + }, + "docx_output": { + "type": "object", + "properties": { + "preview_url": { + "description": "Pre-signed S3 GET URL for DOCX preview", + "type": "string", + "example": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx" + }, + "output_document": { + "type": "object", + "properties": { + "filename": { + "description": "Generated document filename for DOCX", + "type": "string", + "example": "my-template-OR-001.docx" + }, + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + } + }, + "example": { + "s3ref": { + "bucket": "document-api-preview-prod", + "key": "preview/my-template.docx" + } + } + } + } + }, + "variable_payload": { + "description": "List of variables and its corresponding replaced values from the document template", + "type": "object", + "properties": { + "additionalProperties": { + "type": "string" + } + } + }, + "template_settings": { + "$ref": "#/components/schemas/TemplateSettings" + } + } + }, + "GenerateDocumentRequest": { + "type": "object", + "properties": { + "file_id": { + "description": "Entity id for the template being used", + "type": "string", + "example": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p" + }, + "context_data": { + "description": "Custom values for variables in the template. Takes the higher precedence than others.", + "type": "object", + "properties": { + "additionalProperties": { + "type": "string" + } + } + }, + "language": { + "description": "Language code for the document", + "type": "string", + "example": "de" + } + }, + "required": [ + "file_id", + "context_data" + ] + }, + "GetSettingsForJourney": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "ID of an organization in epilot platform", + "example": "739224" + }, + "canary": { + "type": "boolean", + "description": "The canary flag controls update frequency of epilot application: when true, customers receive continuous updates; when false, they only get updates with new version releases.", + "example": true + }, + "thirdPartyCookies": { + "type": "boolean", + "description": "When set to false, third-party cookies and resources should be completely disabled to comply with GDPR regulations.", + "example": true + } + } + }, + "ButtonOption": { + "type": "object", + "description": "A single button option data", + "properties": { + "value": { + "type": "string", + "example": "Button Hidden Value", + "description": "The value of the button" + }, + "label": { + "type": "string", + "example": "Button Label", + "description": "The label of the button" + } + } + }, + "ValidationRuleRef": { + "type": "object", + "description": "References to validation rules organized by blocks and fields.\nMaps block IDs to either rule IDs (for block-level rules) or rule references (for field-level rules).\n", + "additionalProperties": { + "oneOf": [ + { + "type": "string", + "description": "Rule ID for block-level validation" + }, + { + "$ref": "#/components/schemas/RuleRef" + } + ] + }, + "example": { + "block1": "rule123", + "block2": { + "field1": "rule456", + "field2": "rule789" + } + } + }, + "RuleRef": { + "type": "object", + "description": "Field-level rule references within a block.\nMaps field names to rule IDs.\n", + "additionalProperties": { + "type": "string", + "description": "Rule ID for field-level validation" + }, + "example": { + "firstName": "rule123", + "lastName": "rule456", + "email": "rule789" + } + } + }, + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Epilot Authorization Bearer Token - public access token / user token", + "bearerFormat": "JWT" + } + } + }, + "servers": [ + { + "url": "https://journey-config.sls.epilot.io" + }, + { + "url": "https://journey-config.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/kanban.json b/packages/cli/definitions/kanban.json new file mode 100644 index 00000000..0fbe3b87 --- /dev/null +++ b/packages/cli/definitions/kanban.json @@ -0,0 +1,929 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Kanban API", + "version": "1.2.3" + }, + "tags": [ + { + "name": "Kanban", + "description": "Kanban endpoints" + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "paths": { + "/v1/kanban/board": { + "post": { + "operationId": "createKanbanBoard", + "summary": "Create a Kanban board", + "description": "Create a Kanban board", + "tags": [ + "Kanban" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Board" + } + } + } + }, + "responses": { + "200": { + "description": "Successfully created board", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Board" + } + } + } + }, + "400": { + "description": "Bad request - Invalid input data" + }, + "401": { + "description": "Unauthorized - Authentication required" + }, + "403": { + "description": "Forbidden - Insufficient permissions" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v1/kanban/boards": { + "get": { + "operationId": "getKanbanBoards", + "summary": "Get all Kanban boards", + "description": "Get all Kanban boards", + "tags": [ + "Kanban" + ], + "parameters": [ + { + "name": "filter", + "in": "query", + "description": "Filter boards by ownership type. If not provided, returns all accessible boards.", + "schema": { + "type": "string", + "enum": [ + "owned", + "shared" + ] + }, + "required": false + } + ], + "responses": { + "200": { + "description": "Successfully retrieved boards", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BoardSummary" + } + } + } + } + }, + "401": { + "description": "Unauthorized - Authentication required" + }, + "403": { + "description": "Forbidden - Insufficient permissions" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v1/kanban/board/{boardId}": { + "get": { + "operationId": "getKanbanBoard", + "summary": "Get a Kanban board", + "description": "Get a Kanban board by ID. Use \"default\" as the boardId to get the organization's default board.\n", + "tags": [ + "Kanban" + ], + "parameters": [ + { + "name": "boardId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The board ID, or \"default\" to get the organization's default board.\n", + "example": "board-123" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved board", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Board" + } + } + } + }, + "401": { + "description": "Unauthorized - Authentication required" + }, + "403": { + "description": "Forbidden - Insufficient permissions" + }, + "404": { + "description": "Board not found" + }, + "500": { + "description": "Internal server error" + } + } + }, + "put": { + "operationId": "updateKanbanBoard", + "summary": "Update a Kanban board", + "description": "Update a Kanban board", + "tags": [ + "Kanban" + ], + "parameters": [ + { + "name": "boardId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Board" + } + } + } + }, + "responses": { + "200": { + "description": "Successfully updated board", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Board" + } + } + } + }, + "400": { + "description": "Bad request - Invalid input data" + }, + "401": { + "description": "Unauthorized - Authentication required" + }, + "403": { + "description": "Forbidden - Insufficient permissions" + }, + "404": { + "description": "Board not found" + }, + "500": { + "description": "Internal server error" + } + } + }, + "patch": { + "operationId": "patchKanbanBoard", + "summary": "Patch a Kanban board", + "description": "Patch a Kanban board", + "tags": [ + "Kanban" + ], + "parameters": [ + { + "name": "boardId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "example": "Board 1" + }, + "description": { + "type": "string", + "example": "Board description" + }, + "shared_with": { + "type": "array", + "items": { + "type": "string" + } + }, + "shared_with_org": { + "type": "boolean" + }, + "owners": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of user IDs who have full ownership rights for this board (view, edit, delete)" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successfully patched board", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Board" + } + } + } + }, + "400": { + "description": "Bad request - Invalid input data" + }, + "401": { + "description": "Unauthorized - Authentication required" + }, + "403": { + "description": "Forbidden - Insufficient permissions" + }, + "404": { + "description": "Board not found" + }, + "500": { + "description": "Internal server error" + } + } + }, + "delete": { + "operationId": "deleteKanbanBoard", + "summary": "Delete a Kanban board", + "description": "Delete a Kanban board", + "tags": [ + "Kanban" + ], + "parameters": [ + { + "name": "boardId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successfully deleted board" + }, + "401": { + "description": "Unauthorized - Authentication required" + }, + "403": { + "description": "Forbidden - Insufficient permissions" + }, + "404": { + "description": "Board not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v1/kanban/org/default-board": { + "put": { + "operationId": "setDefaultKanbanBoard", + "summary": "Set default board for organization", + "description": "Set a board as the default board for the organization", + "tags": [ + "Kanban" + ], + "parameters": [ + { + "name": "boardId", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the board to set as default" + } + ], + "responses": { + "200": { + "description": "Successfully set default board", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "default_board_id": { + "type": "string" + } + } + } + } + } + }, + "400": { + "description": "Bad request - Invalid input data or boardId missing" + }, + "401": { + "description": "Unauthorized - Authentication required" + }, + "403": { + "description": "Forbidden - Insufficient permissions" + }, + "404": { + "description": "Board not found" + }, + "500": { + "description": "Internal server error" + } + } + }, + "delete": { + "operationId": "clearDefaultKanbanBoard", + "summary": "Clear default board for organization", + "description": "Remove the default board setting for the organization", + "tags": [ + "Kanban" + ], + "responses": { + "200": { + "description": "Successfully cleared default board", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "default_board_id": { + "type": "string", + "nullable": true + } + } + } + } + } + }, + "401": { + "description": "Unauthorized - Authentication required" + }, + "403": { + "description": "Forbidden - Insufficient permissions" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v1/kanban/query/flows:autocomplete": { + "get": { + "operationId": "flowsAutocomplete", + "summary": "flowsAutocomplete", + "description": "Autocomplete flows data\n", + "tags": [ + "Query" + ], + "parameters": [ + { + "name": "input", + "in": "query", + "description": "Input to autocomplete", + "schema": { + "type": "string" + } + }, + { + "name": "attribute", + "in": "query", + "description": "Autocomplete attribute", + "schema": { + "type": "string", + "example": "name" + }, + "required": true + }, + { + "name": "size", + "in": "query", + "description": "Maximum number of results to return", + "schema": { + "type": "integer", + "default": 25, + "minimum": 1, + "maximum": 250 + } + }, + { + "name": "from", + "in": "query", + "description": "Starting offset for pagination", + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": true + } + ] + }, + "example": [ + "value" + ] + }, + "hits": { + "type": "number", + "description": "Total number of matching items available", + "example": 42 + } + }, + "required": [ + "results", + "hits" + ] + } + } + } + } + } + } + }, + "/v1/kanban/query/flows:execute": { + "post": { + "operationId": "executeFlowsQuery", + "summary": "executeFlowsQuery", + "description": "Query Flows Data for Kanban View.", + "tags": [ + "Query" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowsQueryRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Query results", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowsQueryResult" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotOrg": { + "description": "Overrides the target organization to allow shared tenantaccess", + "name": "x-epilot-org-id", + "in": "header", + "type": "apiKey" + } + }, + "schemas": { + "BoardSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string", + "example": "Board 1" + }, + "description": { + "type": "string", + "example": "Board description" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_by": { + "type": "string" + }, + "org_id": { + "type": "string" + }, + "updated_by": { + "type": "string" + }, + "shared_with": { + "type": "array", + "items": { + "type": "string" + } + }, + "shared_with_org": { + "type": "boolean" + }, + "owners": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of user IDs who have full ownership rights for this board (view, edit, delete)" + } + } + }, + "Board": { + "allOf": [ + { + "$ref": "#/components/schemas/BoardSummary" + }, + { + "type": "object", + "properties": { + "config": { + "type": "object", + "properties": { + "dataset": { + "type": "string", + "example": "workflow_tasks_overview" + }, + "swimlanes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Swimlane" + } + }, + "card_config": { + "type": "object", + "properties": { + "fields": { + "type": "array", + "items": { + "type": "string", + "example": "assignee" + } + } + } + }, + "board_filter": { + "$ref": "#/components/schemas/BoardFilter" + }, + "sorting": { + "$ref": "#/components/schemas/Sorting" + }, + "search_query": { + "type": "string", + "example": "task 1" + } + } + } + }, + "required": [ + "title", + "config" + ] + } + ] + }, + "Swimlane": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string", + "example": "Swimlane 1" + }, + "position": { + "type": "number", + "example": 1 + }, + "filter": { + "$ref": "#/components/schemas/BoardFilter" + }, + "title_chip_variant": { + "type": "string", + "example": "success" + } + } + }, + "Sorting": { + "type": "object", + "properties": { + "field": { + "type": "string", + "example": "created_at" + }, + "direction": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + } + }, + "required": [ + "field" + ] + }, + "BoardFilter": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/FilterItem" + }, + { + "$ref": "#/components/schemas/FilterGroup" + } + ] + } + }, + "combination": { + "type": "string", + "enum": [ + "AND", + "OR" + ], + "example": "OR" + } + }, + "required": [ + "items", + "combination" + ] + }, + "FilterGroup": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterItem" + } + }, + "combination": { + "type": "string", + "enum": [ + "AND", + "OR" + ], + "example": "AND" + } + }, + "required": [ + "items", + "combination" + ] + }, + "FilterOperator": { + "type": "string", + "enum": [ + "EQUALS", + "NOT_EQUALS", + "EMPTY", + "NOT_EMPTY", + "CONTAINS", + "NOT_CONTAINS", + "IS_ONE_OF", + "IS_NONE_OF", + "GREATER_THAN", + "LESS_THAN", + "GREATER_THAN_OR_EQUAL", + "LESS_THAN_OR_EQUAL" + ], + "example": "EQUALS", + "description": "The comparison operator for filtering" + }, + "DynamicDateValue": { + "type": "string", + "enum": [ + "TODAY", + "TOMORROW", + "YESTERDAY", + "IN_THE_FUTURE", + "IN_THE_PAST", + "THIS_WEEK", + "NEXT_WEEK", + "LAST_WEEK", + "THIS_MONTH", + "NEXT_MONTH", + "LAST_MONTH" + ], + "description": "Dynamic date keywords that resolve to actual dates at runtime" + }, + "ValueType": { + "anyOf": [ + { + "type": "string", + "example": "100020" + }, + { + "$ref": "#/components/schemas/DynamicDateValue" + }, + { + "type": "number", + "example": 42 + }, + { + "type": "boolean", + "example": true + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/DynamicDateValue" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "example": [ + "value1", + "value2", + 123, + true + ] + } + ], + "description": "The value to compare against - can be a single value (string, number, boolean, or dynamic date) or an array of values" + }, + "FlowsQueryRequest": { + "type": "object", + "properties": { + "filters": { + "$ref": "#/components/schemas/BoardFilter" + }, + "sorting": { + "$ref": "#/components/schemas/Sorting" + }, + "from": { + "type": "number", + "default": 0 + }, + "size": { + "type": "number", + "default": 10 + } + } + }, + "FlowsQueryResult": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "hits": { + "type": "number" + }, + "page_number": { + "type": "number" + }, + "page_size": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "additionalProperties": true + }, + "FilterItem": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "assignee", + "description": "The field key to filter on" + }, + "operator": { + "$ref": "#/components/schemas/FilterOperator" + }, + "value": { + "$ref": "#/components/schemas/ValueType" + }, + "data_type": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "date" + ], + "example": "string", + "description": "The data type of the field" + } + }, + "required": [ + "key", + "operator" + ] + } + } + }, + "servers": [ + { + "url": "https://kanban.sls.epilot.io" + }, + { + "url": "https://kanban.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/message.json b/packages/cli/definitions/message.json new file mode 100644 index 00000000..8c91c845 --- /dev/null +++ b/packages/cli/definitions/message.json @@ -0,0 +1,2660 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Message API", + "version": "1.4.0", + "description": "Send and receive email messages via your epilot organization\n" + }, + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "tags": [ + { + "name": "Messages" + }, + { + "name": "Threads" + }, + { + "name": "Drafts" + }, + { + "name": "message_schema", + "x-displayName": "Message", + "description": "\n" + }, + { + "name": "thread_schema", + "x-displayName": "Thread", + "description": "\n" + } + ], + "x-tagGroups": [ + { + "name": "APIs", + "tags": [ + "Messages", + "Threads", + "Drafts" + ] + }, + { + "name": "Schemas", + "tags": [ + "message_schema", + "thread_schema" + ] + } + ], + "paths": { + "/v1/message/messages": { + "post": { + "operationId": "sendMessage", + "summary": "sendMessage", + "description": "Send an email message", + "tags": [ + "Messages" + ], + "parameters": [ + { + "in": "query", + "name": "do_not_create_entities", + "description": "When true, this flag lets the caller to send only the message and by-pass creating the thread & message entities.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageRequestParams" + } + } + } + }, + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageRequestParams" + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + }, + "put": { + "operationId": "updateMessage", + "summary": "updateMessage", + "description": "Update message metadata", + "tags": [ + "Messages" + ], + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Message" + } + ] + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/messages/{id}": { + "get": { + "operationId": "getMessage", + "summary": "getMessage", + "description": "Get an email message by id", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "id", + "description": "Message ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "4d74976d-fb64-47fd-85e2-65eea140f5eb" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Message" + } + ] + } + } + } + }, + "302": { + "description": "Redirect to V2 API to fetch the download URL", + "headers": { + "Location": { + "description": "V2 API", + "schema": { + "type": "string", + "example": "https://message.sls.epilot.io/v2/messages/4d74976d-fb64-47fd-85e2-65eea140f5eb" + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + }, + "delete": { + "operationId": "deleteMessage", + "summary": "deleteMessage", + "description": "Immediately and permanently delete a message. This operation cannot be undone.", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "id", + "description": "Message ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/messages/{id}/eml": { + "get": { + "operationId": "getMessageEml", + "summary": "getMessageEml", + "description": "Download a message as an EML file.\nReturns a 302 redirect to a pre-signed S3 URL where the EML file can be downloaded.\n", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "id", + "description": "Message entity ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "4d74976d-fb64-47fd-85e2-65eea140f5eb" + } + } + ], + "responses": { + "302": { + "description": "Redirect to EML file download URL", + "headers": { + "Location": { + "description": "Pre-signed S3 URL to download the EML file (expires in 15 minutes)", + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Message not found" + } + } + } + }, + "/v1/message/messages:search": { + "post": { + "operationId": "searchMessages", + "summary": "searchMessages", + "description": "Search Messages", + "tags": [ + "Messages" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchParamsV2" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "hits", + "results" + ], + "properties": { + "hits": { + "type": "number", + "description": "Total of matched messages", + "example": 14 + }, + "results": { + "type": "array", + "description": "Matched messages", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Message" + } + ] + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/messages/{id}/trash": { + "post": { + "operationId": "trashMessage", + "summary": "trashMessage", + "description": "Move a message to the trash", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "id", + "description": "Message ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/messages/{id}/untrash": { + "post": { + "operationId": "untrashMessage", + "summary": "untrashMessage", + "description": "Restore a trashed message", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "id", + "description": "Message ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/messages/{id}/read": { + "post": { + "operationId": "markReadMessage", + "summary": "markReadMessage", + "description": "Mark message as read", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "id", + "description": "Message ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v2/message/messages/{id}/read": { + "post": { + "operationId": "markReadMessageV2", + "summary": "markReadMessageV2", + "description": "Mark message as read within a scope", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "id", + "description": "Message ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReadMessagePayload" + } + } + } + }, + "responses": { + "204": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/messages/{id}/unread": { + "post": { + "operationId": "markUnreadMessage", + "summary": "markUnreadMessage", + "description": "Mark message as unread", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "id", + "description": "Message ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/messages/unread/{actor}": { + "get": { + "operationId": "getUnread", + "summary": "getUnread", + "description": "Get all unread messages by actor", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "actor", + "description": "Actor performing call, can be user or organization", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "organization", + "user" + ] + } + }, + { + "in": "query", + "name": "email_filter", + "description": "emails to filter by", + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "number", + "description": "Total of unread messages", + "example": 14 + }, + "unread": { + "type": "number", + "description": "Total of unread messages", + "example": 0 + }, + "drafts": { + "type": "number", + "description": "Total of drafts messages", + "example": 12 + }, + "unassigned": { + "type": "number", + "description": "Total of unassigned messages", + "example": 1 + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v2/message/messages/{id}/unread": { + "post": { + "operationId": "markUnreadMessageV2", + "summary": "markUnreadMessageV2", + "description": "Mark message as unread within a scope", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "id", + "description": "Message ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReadMessagePayload" + } + } + } + }, + "responses": { + "204": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads:search": { + "post": { + "operationId": "searchThreads", + "summary": "searchThreads", + "description": "Search for threads of email messages.\n\nMessages with no replies yet are treated as threads with single message.\n\nLucene syntax supported.\n", + "tags": [ + "Threads" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchParams" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "hits", + "results" + ], + "properties": { + "hits": { + "type": "number", + "description": "Total of matched threads", + "example": 14 + }, + "results": { + "type": "array", + "description": "Matched threads", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Thread" + } + ] + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v2/message/threads:search": { + "post": { + "operationId": "searchThreadsV2", + "summary": "searchThreadsV2", + "description": "Search for threads of email messages.\n\nMessages with no replies yet are treated as threads with single message.\n\nLucene syntax supported.\n", + "tags": [ + "Threads" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchParamsV2" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "hits", + "results" + ], + "properties": { + "hits": { + "type": "number", + "description": "Total of matched threads", + "example": 14 + }, + "results": { + "type": "array", + "description": "Matched threads", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Thread" + } + ] + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads:searchIds": { + "post": { + "operationId": "searchIds", + "summary": "Search threads and return all id's", + "description": "Return all thread id's that match a criteria\n\nLucene syntax supported.\n", + "tags": [ + "Threads" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchIDParams" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "hits", + "results" + ], + "properties": { + "hits": { + "type": "number", + "description": "Total of matched threads", + "example": 14 + }, + "results": { + "type": "array", + "description": "Matched threads ids", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads": { + "put": { + "operationId": "updateThread", + "summary": "updateThread", + "description": "Modify thread metadata", + "tags": [ + "Threads" + ], + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Thread" + } + ] + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/{id}": { + "delete": { + "operationId": "deleteThread", + "summary": "deleteThread", + "description": "Immediately and permanently delete a thread. This operation cannot be undone.", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/{id}:move": { + "post": { + "operationId": "moveThread", + "summary": "moveThread", + "description": "Move thread to a different Inbox", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MoveThreadPayload" + } + } + } + }, + "responses": { + "204": { + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/message/threads/{id}:markAsDone": { + "post": { + "operationId": "markThreadAsDone", + "summary": "markThreadAsDone", + "description": "Mark thread as done", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Bad Request" + } + } + } + }, + "/v1/message/threads/{id}:markAsOpen": { + "post": { + "operationId": "markThreadAsOpen", + "summary": "markThreadAsOpen", + "description": "Mark thread as open", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Bad Request" + } + } + } + }, + "/v1/message/threads/{id}/timeline": { + "get": { + "operationId": "getThreadTimeline", + "summary": "getThreadTimeline", + "description": "Get thread timeline", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThreadTimeline" + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/{id}/trash": { + "post": { + "operationId": "trashThread", + "summary": "trashThread", + "description": "Move a thread to trash", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/{id}/untrash": { + "post": { + "operationId": "untrashThread", + "summary": "untrashThread", + "description": "Restore a trashed thread", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/bulk:read": { + "post": { + "operationId": "threadBulkActionsRead", + "summary": "threadBulkActionsRead", + "description": "Perform a bulk action of marking an array of thread ids as read", + "tags": [ + "Threads" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionsPayloadWithScopes" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/bulk:unread": { + "post": { + "operationId": "threadBulkActionsUnread", + "summary": "threadBulkActionsUnread", + "description": "Perform a bulk action of marking an array of thread ids as unread", + "tags": [ + "Threads" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionsPayloadWithScopes" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/bulk:favorite": { + "post": { + "operationId": "threadBulkActionsFavorite", + "summary": "threadBulkActionsFavorite", + "description": "Perform a bulk action of marking an array of thread ids favorite", + "tags": [ + "Threads" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionsPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/bulk:unfavorite": { + "post": { + "operationId": "threadBulkActionsUnfavorite", + "summary": "threadBulkActionsUnfavorite", + "description": "Perform a bulk action of marking an array of thread ids unfavorited", + "tags": [ + "Threads" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionsPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/bulk:trash": { + "post": { + "operationId": "threadBulkActionsTrash", + "summary": "threadBulkActionsTrash", + "description": "Perform a bulk action of trashing an array of threads", + "tags": [ + "Threads" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionsPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/bulk:untrash": { + "post": { + "operationId": "threadBulkActionsUntrash", + "summary": "threadBulkActionsUntrash", + "description": "Perform a bulk action of untrashing an array of threads", + "tags": [ + "Threads" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionsPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/bulk:delete": { + "post": { + "operationId": "threadBulkActionsDelete", + "summary": "threadBulkActionsDelete", + "description": "Performs a bulk permanent delete for all threads", + "tags": [ + "Threads" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionsPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/bulk:done": { + "post": { + "operationId": "threadBulkActionsDone", + "summary": "threadBulkActionsDone", + "description": "Perform a bulk action of marking an array of threads as done", + "tags": [ + "Threads" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionsPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/bulk:open": { + "post": { + "operationId": "threadBulkActionsOpen", + "summary": "threadBulkActionsOpen", + "description": "Perform a bulk action of marking an array of threads as open", + "tags": [ + "Threads" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionsPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/{id}/read": { + "post": { + "operationId": "markReadThread", + "summary": "markReadThread", + "description": "Mark thread as read", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v2/message/threads/{id}/read": { + "post": { + "operationId": "markReadThreadV2", + "summary": "markReadThreadV2", + "description": "Mark thread as read within a scope", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReadMessagePayload" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/{id}/unread": { + "post": { + "operationId": "markUnreadThread", + "summary": "markUnreadThread", + "description": "Mark thread as unread", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v2/message/threads/{id}/unread": { + "post": { + "operationId": "markUnreadThreadV2", + "summary": "markUnreadThreadV2", + "description": "Mark thread as unread within a scope", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReadMessagePayload" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/{id}/assign": { + "post": { + "operationId": "assignThread", + "summary": "assignThread", + "description": "Assign thread to entities", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Entities which thread is assigned to", + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "description": "Entity slug", + "type": "string", + "example": "contact" + }, + "entity_id": { + "description": "Entity ID", + "type": "string", + "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3" + }, + "org_id": { + "description": "Organization ID", + "type": "string", + "example": "206801" + }, + "is_main_entity": { + "description": "To indicate this is main entity", + "type": "boolean", + "example": true + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/{id}/unassign": { + "post": { + "operationId": "unassignThread", + "summary": "unassignThread", + "description": "Unassign thread from entities", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Entities which thread is unassigned from", + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "description": "Entity slug", + "type": "string", + "example": "contact" + }, + "entity_id": { + "description": "Entity ID", + "type": "string", + "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3" + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/{id}/assign:users": { + "post": { + "operationId": "assignUsers", + "summary": "assignUsers", + "description": "Assign users to thread for receiving notifications.\nThe operation replaces all existing assigned users in thread.\n", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "description": "User IDs of users assigned to thread", + "type": "object", + "properties": { + "assigned_to": { + "type": "array", + "description": "IDs of users assigned to thread", + "items": { + "type": "string", + "example": "206801" + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v2/message/threads/{id}/assign:users": { + "post": { + "operationId": "assignUsersV2", + "summary": "assignUsersV2", + "description": "Assign users to thread.\n", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "add", + "remove" + ], + "properties": { + "add": { + "type": "array", + "description": "User IDs of users to add to thread", + "items": { + "type": "string", + "example": "206801" + } + }, + "remove": { + "type": "array", + "description": "User IDs of users to remove from thread", + "items": { + "type": "string", + "example": "206801" + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/threads/{id}:pin": { + "post": { + "operationId": "pinThread", + "summary": "Pin a single thread", + "description": "Pin a single thread", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Bad request" + }, + "404": { + "description": "Thread not found" + }, + "409": { + "description": "Concurrent update error" + }, + "500": { + "description": "Internal server error" + } + } + }, + "delete": { + "operationId": "unpinThread", + "summary": "Unpin a single thread", + "description": "Unpin a single thread", + "tags": [ + "Threads" + ], + "parameters": [ + { + "name": "id", + "description": "Thread ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Bad request" + }, + "404": { + "description": "Thread not found" + }, + "409": { + "description": "Concurrent update error" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v1/message/drafts": { + "post": { + "operationId": "createDraft", + "summary": "createDraft", + "description": "Create a new draft", + "tags": [ + "Drafts" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageRequestParams" + } + } + } + }, + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Message" + } + ] + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/message/drafts:send": { + "post": { + "operationId": "sendDraft", + "summary": "sendDraft", + "description": "Send the existing draft to the recipients", + "tags": [ + "Drafts" + ], + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Message" + } + ] + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v2/message/messages/{id}": { + "get": { + "operationId": "getMessageV2", + "summary": "getMessageV2", + "description": "- Fetches message by ID\n- If the message html is omitted on the entity, then it keeps the content on the message as a signed url\n {\n ...\n _id: \"4d74976d-fb64-47fd-85e2-65eea140f5eb\",\n _schema: \"message\",\n _org: \"org-123\",\n html_omitted: true,\n html_download_url: \"https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html\"\n }\n", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "id", + "description": "Message ID", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "4d74976d-fb64-47fd-85e2-65eea140f5eb" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageV2" + } + ] + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + } + }, + "components": { + "responses": { + "NotFound": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "Conflict": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "InternalServerError": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "BadRequest": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "Forbidden": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotOrg": { + "description": "Overrides the target organization to allow shared tenant access", + "name": "x-epilot-org-id", + "in": "header", + "type": "apiKey" + } + }, + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Error message", + "example": "Thread not found" + } + } + }, + "MoveThreadPayload": { + "type": "object", + "required": [ + "inbox_id" + ], + "properties": { + "inbox_id": { + "type": "string", + "description": "Inbox ID", + "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3" + } + } + }, + "BaseEntity": { + "type": "object", + "required": [ + "_id", + "_title", + "_org", + "_schema", + "_created_at", + "_updated_at" + ], + "properties": { + "_id": { + "type": "string", + "description": "Entity ID", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "_title": { + "type": "string", + "description": "Entity title" + }, + "_org": { + "type": "string", + "description": "Organization ID the entity belongs to", + "example": "206801" + }, + "_schema": { + "type": "string", + "description": "URL-friendly identifier for the entity schema", + "example": "message" + }, + "_tags": { + "type": "array", + "description": "Entity tags", + "items": { + "type": "string" + }, + "example": [ + "pricing", + "INBOX" + ] + }, + "_created_at": { + "type": "string", + "description": "Created date", + "format": "date-time", + "example": "2021-02-09T12:41:43.662Z" + }, + "_updated_at": { + "type": "string", + "description": "Updated date", + "format": "date-time", + "example": "2021-02-10T09:14:31.990Z" + } + } + }, + "Thread": { + "description": "Thread properties depend on API caller as it's not pre-defined. We do recommend having at least `topic` property for categorizing.", + "required": [ + "topic" + ], + "properties": { + "topic": { + "type": "string", + "description": "Message topic (e.g. which service sends the message or message category)", + "example": "CUSTOMER_MESSAGE" + }, + "assigned_to": { + "type": "array", + "description": "User ID of who the message is assigned to. Default is the user who sends message.", + "items": { + "type": "string" + }, + "example": [ + "206801", + "200109" + ] + }, + "org_read_message": { + "type": "array", + "description": "Organization ID of organization read the message.", + "items": { + "type": "string" + }, + "example": [ + "789372", + "210291" + ] + }, + "done": { + "type": "boolean", + "description": "Whether the thread is marked as Done", + "example": false + }, + "latest_message": { + "$ref": "#/components/schemas/Message" + }, + "latest_trash_message": { + "$ref": "#/components/schemas/Message" + }, + "latest_message_at": { + "type": "string", + "description": "The date of the latest message time in the thread", + "example": "2024-02-10T09:14:31.990Z" + } + } + }, + "Message": { + "type": "object", + "required": [ + "subject", + "from" + ], + "properties": { + "message_id": { + "type": "string", + "description": "Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.", + "example": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>" + }, + "sender": { + "type": "string", + "description": "User ID of user sends the message.", + "example": "206801" + }, + "subject": { + "type": "string", + "description": "Subject", + "example": "Request for solar panel price" + }, + "html": { + "type": "string", + "description": "HTML body", + "example": "
We at ABC GmbH would like to request a price quote for the solar panel.
" + }, + "text": { + "type": "string", + "description": "Text body", + "example": "We at ABC GmbH would like to request a price quote for the solar panel." + }, + "from": { + "$ref": "#/components/schemas/Address" + }, + "reply_to": { + "$ref": "#/components/schemas/Address" + }, + "to": { + "type": "array", + "description": "To email addresses", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "cc": { + "type": "array", + "description": "Cc email addresses", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "bcc": { + "type": "array", + "description": "Bcc email addresses", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "file": { + "$ref": "#/components/schemas/AttachmentsRelation" + }, + "references": { + "type": "string", + "description": "References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent. The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread. The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.\n", + "example": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> " + }, + "in_reply_to": { + "type": "string", + "description": "In-Reply-To header. Value is the `message_id` of parent message.\n", + "example": "" + }, + "user_read_message": { + "type": "array", + "description": "User ID of user read the message.", + "items": { + "type": "string" + }, + "example": [ + "206801", + "200109" + ] + }, + "org_read_message": { + "type": "array", + "description": "Organization ID of organization read the message.", + "items": { + "type": "string" + }, + "example": [ + "789372", + "210291" + ] + }, + "send_status": { + "type": "array", + "description": "Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc` Reference at \n", + "items": { + "type": "string", + "enum": [ + "SEND", + "DELIVERY", + "REJECT", + "COMPLAINT", + "BOUNCE", + "ERROR" + ] + } + }, + "type": { + "type": "string", + "description": "Message type", + "enum": [ + "SENT", + "RECEIVED" + ] + }, + "template_id": { + "type": "string", + "description": "Template ID used for sending message.", + "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3" + } + } + }, + "MessageV2": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Message" + } + ], + "properties": { + "html_omitted": { + "type": "boolean", + "description": "If true then html is not provided and must be downloaded using the html_download_url", + "default": false + }, + "html_download_url": { + "type": "string", + "description": "HTML body download URL", + "example": "https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html" + } + } + }, + "Address": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "name": { + "type": "string", + "description": "Email address alias", + "example": "epilot" + }, + "address": { + "type": "string", + "description": "Email address", + "example": "messaging@epilot.cloud" + }, + "email_type": { + "type": "string", + "description": "Type of the email, Internal (360 Agents), Partners, External users(Customers)\n", + "nullable": true, + "enum": [ + "INTERNAL", + "EXTERNAL", + "PARTNER" + ] + }, + "send_status": { + "type": "string", + "description": "Sent message status regarding to this recipient. Reference at \n", + "enum": [ + "SEND", + "DELIVERY", + "REJECT", + "COMPLAINT", + "BOUNCE", + "ERROR" + ] + }, + "send_error": { + "type": "object", + "description": "Information about reject, complaint or bounce event. Only available if `send_status` is REJECT, COMPLAINT, BOUNCE or ERROR. JSON object is defined by AWS SES. Reference at \n" + } + } + }, + "AttachmentsRelation": { + "type": "object", + "description": "Message attachments", + "properties": { + "$relation": { + "type": "array", + "description": "It's normal entity relation with some additional properties for sending message attachment.", + "items": { + "$ref": "#/components/schemas/File" + } + } + } + }, + "File": { + "type": "object", + "required": [ + "entity_id" + ], + "properties": { + "entity_id": { + "type": "string", + "description": "File entity ID", + "example": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f" + }, + "filename": { + "type": "string", + "description": "File name", + "example": "Produktinformationen_epilot360_Double_Opt_in.pdf" + }, + "is_message_attachment": { + "type": "boolean", + "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation." + }, + "may_be_signature_attachment": { + "type": "boolean", + "description": "To indicate this file relation may be signature attachment. If true then this file will be sent as signature attachment and not related to any entity." + }, + "cid": { + "type": "string", + "description": "Content ID (for inline)", + "example": "fb222496-a1a5-4639-94f2-07b5e35e4068" + }, + "inline": { + "type": "boolean", + "description": "If true then this attachment should not be offered for download (at least not in the main attachments list). The usecase is CID embedded image (aka inline image).\n", + "default": false + }, + "send_as_link": { + "type": "boolean", + "description": "If true then this attachment is sent via link. The link have to be inserted to email body by API caller. In this case, service doesn't process this attachment.\n", + "default": false + } + } + }, + "MessageRequestParams": { + "required": [ + "subject", + "from" + ], + "additionalProperties": true, + "properties": { + "complete_thread": { + "type": "boolean", + "description": "Whether the thread is marked as Done immediately after sending the message", + "default": false + }, + "thread": { + "type": "object", + "required": [ + "topic" + ], + "description": "Open new thread when sending the very first message in conversation. Thread should contains context related to all messages in it (eg. topic, brand_id, opportunity_id, assigned_to,...). Thread properties depend on API caller as it's not pre-defined. We do recommend having at least `topic` property for categorizing. `thread` or `parent_id` must be provided either.\n", + "properties": { + "topic": { + "type": "string", + "description": "Message topic (e.g. which service sends the message or message category)" + }, + "assigned_to": { + "type": "array", + "description": "User ID of who the message is assigned to. Default is the user who sends message.", + "items": { + "type": "string" + } + } + }, + "example": { + "topic": "CUSTOMER_MESSAGE", + "assigned_to": [ + "206801", + "200109" + ], + "opportunity_id": 829072 + } + }, + "parent_id": { + "type": "string", + "description": "Entity ID of parent message which this message replies to or forwards from. If both `parent_id` and `thread` are provided, `thread` is discarded.\n", + "example": "44d7a3eb-0cce-4bd3-a7cd-0b3e652de0c2" + }, + "subject": { + "type": "string", + "description": "Subject", + "example": "Request for solar panel price" + }, + "html": { + "type": "string", + "description": "HTML body", + "example": "
We at ABC GmbH would like to request a price quote for the solar panel.
" + }, + "text": { + "type": "string", + "description": "Text body. If not provided, text body is converted from HTML body using [html-to-text](https://www.npmjs.com/package/html-to-text)", + "example": "We at ABC GmbH would like to request a price quote for the solar panel." + }, + "from": { + "$ref": "#/components/schemas/Address" + }, + "reply_to": { + "$ref": "#/components/schemas/Address" + }, + "to": { + "type": "array", + "description": "To email addresses", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "cc": { + "type": "array", + "description": "Cc email addresses", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "bcc": { + "type": "array", + "description": "Bcc email addresses", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "file": { + "$ref": "#/components/schemas/AttachmentsRelation" + }, + "template_id": { + "type": "string", + "description": "Template ID used for sending message.", + "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3" + } + } + }, + "SearchParamsV2": { + "type": "object", + "required": [ + "q" + ], + "properties": { + "inbox_id": { + "oneOf": [ + { + "type": "string", + "description": "Inbox ID", + "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Inbox IDs", + "example": [ + "3f34ce73-089c-4d45-a5ee-c161234e41c3", + "3f34ce73-089c-4d45-a5ee-c161234e41c4" + ] + } + ] + }, + "q": { + "description": "Lucene query syntax supported with ElasticSearch", + "type": "string", + "example": "subject:\"Request for solar panel price\" AND _tags:INBOX" + }, + "fields": { + "$ref": "#/components/schemas/FieldsParam" + }, + "from": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "size": { + "type": "integer", + "minimum": 1, + "default": 10 + }, + "hydrate": { + "type": "boolean", + "default": false + }, + "include_scores": { + "type": "boolean", + "default": false + }, + "sort": { + "type": "string" + }, + "highlight": {} + } + }, + "SearchParams": { + "type": "object", + "required": [ + "q" + ], + "properties": { + "q": { + "description": "Lucene query syntax supported with ElasticSearch", + "type": "string", + "example": "subject:\"Request for solar panel price\" AND _tags:INBOX" + }, + "from": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "size": { + "type": "integer", + "minimum": 1, + "default": 10 + }, + "hydrate": { + "type": "boolean", + "default": false + } + } + }, + "SearchIDParams": { + "type": "object", + "properties": { + "q": { + "description": "Lucene query syntax supported with ElasticSearch", + "type": "string", + "example": "subject:\"Request for solar panel price\" AND _tags:INBOX" + } + } + }, + "ReadMessagePayload": { + "type": "object", + "required": [ + "scopes" + ], + "properties": { + "scopes": { + "description": "The scopes to be used when marking an item as read or unread. The read status will be synced for all provided scopes.", + "example": [ + "organization", + "user" + ], + "type": "array", + "default": [ + "organization", + "user" + ], + "items": { + "$ref": "#/components/schemas/ReadingScope" + } + } + } + }, + "ReadingScope": { + "description": "Who is marking an item as read or unread.", + "type": "string", + "enum": [ + "organization", + "user" + ] + }, + "ThreadTimeline": { + "type": "object", + "required": [ + "events" + ], + "properties": { + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimelineEvent" + } + } + } + }, + "ThreadDoneEvent": { + "type": "object", + "required": [ + "type", + "user_id", + "organization_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "THREAD_DONE" + ] + }, + "user_id": { + "type": "string", + "description": "User ID of the user who marked the thread as done", + "example": "123" + }, + "organization_id": { + "type": "string", + "description": "Organization ID of the organization who marked the thread as done", + "example": "456" + } + } + }, + "ThreadOpenEvent": { + "type": "object", + "required": [ + "type", + "user_id", + "organization_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "THREAD_OPEN" + ] + }, + "user_id": { + "type": "string", + "description": "User ID of the user who marked the thread as open", + "example": "123" + }, + "organization_id": { + "type": "string", + "description": "Organization ID of the organization who marked the thread as open", + "example": "456" + } + } + }, + "TimelineEventData": { + "type": "object", + "discriminator": { + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/ThreadDoneEvent" + }, + { + "$ref": "#/components/schemas/ThreadOpenEvent" + } + ] + }, + "TimelineEvent": { + "type": "object", + "required": [ + "timestamp", + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/TimelineEventData" + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the event", + "example": "2024-01-01T00:00:00.000Z" + } + } + }, + "BulkActionsPayloadWithScopes": { + "allOf": [ + { + "$ref": "#/components/schemas/BulkActionsPayload" + }, + { + "type": "object", + "properties": { + "scopes": { + "description": "The scopes to be used when marking an item as read or unread. The read status will be synced for all provided scopes.", + "example": [ + "organization", + "user" + ], + "type": "array", + "default": [ + "organization", + "user" + ], + "items": { + "$ref": "#/components/schemas/ReadingScope" + } + } + } + } + ] + }, + "BulkActionsPayload": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Array of threads you wish to perform bulk actions on", + "example": [ + "6b299eda-4018-4554-8965-c4b5598e6531" + ], + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "FieldsParam": { + "type": "array", + "description": "List of entity fields to include or exclude in the response\n\nUse ! to exclude fields, e.g. `!_id` to exclude the `_id` field.\n\nGlobbing and globstart (**) is supported for nested fields.\n", + "items": { + "type": "string" + }, + "example": [ + "_id", + "_title", + "first_name", + "account", + "!account.*._files", + "**._product" + ] + } + } + }, + "servers": [ + { + "url": "https://message.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/metering.json b/packages/cli/definitions/metering.json new file mode 100644 index 00000000..621fd3d4 --- /dev/null +++ b/packages/cli/definitions/metering.json @@ -0,0 +1,2321 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Metering API", + "version": "1.0.0" + }, + "tags": [ + { + "name": "ECP", + "description": "APIs defined for a portal user" + }, + { + "name": "ECP Admin", + "description": "APIs defined for a ECP Admin" + }, + { + "name": "meter_schema", + "x-displayName": "Meter", + "description": "\n" + }, + { + "name": "meter_counter_schema", + "x-displayName": "Meter Counter", + "description": "\n" + } + ], + "x-tagGroups": [ + { + "name": "APIs", + "tags": [ + "ECP", + "ECP Admin" + ] + }, + { + "name": "Schemas", + "tags": [ + "meter_schema", + "meter_counter_schema" + ] + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "PortalAuth": [] + }, + { + "EitherAuth": [] + } + ], + "paths": { + "/v1/metering/meter": { + "get": { + "operationId": "getCustomerMeters", + "summary": "Get Customer Meters", + "description": "Retrieves all meters related to a customer.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "responses": { + "200": { + "description": "Customer meters retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/Meter" + }, + { + "type": "object", + "properties": { + "journey_actions": { + "$ref": "#/components/schemas/JourneyActions" + } + } + }, + { + "type": "object", + "properties": { + "last_reading": { + "type": "string", + "example": "2022-10-10T00:00:00.000Z", + "description": "The timestamp of the last reading" + }, + "current_consumption": { + "type": "number", + "example": 100.5, + "description": "The current consumption of the meter" + } + } + } + ] + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/metering/contract/meters/{contract_id}": { + "get": { + "operationId": "getMetersByContractId", + "summary": "getMetersByContractId", + "description": "Retrieves all meters related to a contract.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "contract_id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The ID of the Contract." + } + ], + "responses": { + "200": { + "description": "Meters related to the contract retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Meter" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/metering/meter/{id}": { + "patch": { + "operationId": "updateMeter", + "summary": "Update Meter", + "description": "Updates the details of a meter.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The ID of the meter." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Entity" + } + } + } + }, + "responses": { + "200": { + "description": "Meter updated successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Meter" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequestUpdateMeter" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "get": { + "operationId": "getMeter", + "summary": "Get Meter", + "description": "Retrieves the details of a meter.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/EntityId" + }, + "required": true, + "description": "The ID of the meter." + } + ], + "responses": { + "200": { + "description": "Meter retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/Meter" + }, + "journey_actions": { + "$ref": "#/components/schemas/JourneyActions" + }, + "relations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityItem" + } + } + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/metering/counter": { + "get": { + "operationId": "getMeterCounters", + "summary": "Get Meter Counters", + "description": "Retrieves all counters for a given meter.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "meter_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + } + ], + "responses": { + "200": { + "description": "Counters retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MeterCounter" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/metering/counter/{counter_id}": { + "get": { + "operationId": "getCounterDetails", + "summary": "Get Counter Details", + "description": "Retrieves the details of a meter counter.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "counter_id", + "schema": { + "$ref": "#/components/schemas/Id" + }, + "required": true, + "description": "The ID of the counter." + } + ], + "responses": { + "200": { + "description": "Counter details retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MeterCounter" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/metering/reading": { + "post": { + "operationId": "createMeterReading", + "summary": "Create Meter Reading", + "description": "Inserts a new meter reading.", + "tags": [ + "ECP Admin", + "ECP" + ], + "security": [ + { + "EitherAuth": [] + } + ], + "requestBody": { + "description": "Meter reading payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MeterReading" + } + } + } + }, + "responses": { + "200": { + "description": "Meter reading created successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MeterReading" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequestCreateMeterReading" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/metering/readings": { + "post": { + "operationId": "createMeterReadings", + "summary": "Create Meter Readings", + "description": "Inserts multiple meter readings at once. Limited to 100 readings per request.", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "async", + "description": "Don't wait for the reading to become available in GetReadings API. Useful for large migrations", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + }, + { + "$ref": "#/components/parameters/SkipValidationQueryParam" + } + ], + "requestBody": { + "description": "Meter readings payload. Limited to 100 readings per request.", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "readings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MeterReading" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Meter readings created successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MeterReading" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequestCreateMeterReadings" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/metering/readings/{meter_id}": { + "post": { + "operationId": "createPortalMeterReadings", + "summary": "createPortalMeterReadings", + "description": "Inserts multiple meter readings at once for a given meter. Limited to 2 readings per request.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "meter_id", + "schema": { + "$ref": "#/components/schemas/Id" + }, + "required": true, + "description": "The ID of the meter." + } + ], + "requestBody": { + "description": "Meter readings payload. Limited to 2 readings per request.", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "readings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PortalMeterReading" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Meter readings created successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MeterReading" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequestCreateMeterReadings" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/metering/readings": { + "post": { + "operationId": "batchWriteMeterReadings", + "summary": "Batch Write Readings", + "description": "Upserts/Deletes multiple meter readings at once. Limited to 100 readings per request.", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "async", + "description": "Don't wait for the reading to become available in GetReadings API. Useful for large migrations", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "$ref": "#/components/parameters/SkipValidationQueryParam" + }, + { + "$ref": "#/components/parameters/ActivityIdQueryParam" + } + ], + "requestBody": { + "description": "Meter readings payload. Limited to 100 readings per request.", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "identifiers": { + "type": "array", + "items": { + "type": "string", + "description": "The identifier of the meter reading." + }, + "description": "- By default, the system will use combination of counter_id, meter_id, direction, and timestamp to identify a meter reading.\n- Additional identifiers can be provided to identify a meter reading uniquely.\n- Example:\n - [\"metadata.registration_id\", \"metadata.business_unit\"]\n - [\"metadata.registration_id\", \"metadata.business_unit\", \"external_id\"]\n" + }, + "readings": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/MeterReading" + }, + { + "properties": { + "operation": { + "type": "string", + "enum": [ + "create", + "update", + "delete" + ], + "default": "create" + } + } + } + ] + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Meter readings created successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MeterReading" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequestCreateMeterReadings" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/metering/reading/submission": { + "post": { + "operationId": "createMeterReadingFromSubmission", + "summary": "Create Meter Reading from Submission", + "description": "Creates a reading from a journey submission.", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "description": "Meter reading payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "properties": { + "org_id": { + "type": "string", + "example": "123", + "description": "ID of the organization" + }, + "entity": { + "type": "object", + "additionalProperties": true, + "properties": { + "_org": { + "type": "string", + "example": "123", + "description": "ID of the organization" + }, + "meterReadings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubmissionMeterReading" + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Meter reading created successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "enum": [ + "Successfully Processed" + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequestCreateMeterReadingFromSubmission" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/metering/allowed/reading/{meter_id}": { + "get": { + "operationId": "getAllowedReadingForMeter", + "summary": "getAllowedReadingForMeter", + "description": "Get allowed reading for the given meter", + "tags": [ + "ECP Admin", + "ECP" + ], + "security": [ + { + "EitherAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "meter_id", + "schema": { + "$ref": "#/components/schemas/Id" + }, + "required": true, + "description": "The ID of the meter." + }, + { + "in": "query", + "name": "timestamp", + "required": false, + "description": "If not provided, the system will default to now.", + "schema": { + "type": "string", + "example": "2022-10-01T10:10:00.000Z" + } + } + ], + "responses": { + "200": { + "description": "Recent reading for the meter fetched successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "counter_id": { + "$ref": "#/components/schemas/Id" + }, + "min_value": { + "type": "number", + "description": "Minimum allowed reading value for the meter" + }, + "max_value": { + "type": "number", + "description": "Maximum allowed reading value for the meter" + } + } + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/metering/reading/with-meter": { + "post": { + "operationId": "createReadingWithMeter", + "summary": "Create Reading with Meter", + "description": "Creates a reading along with a meter.", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "description": "Meter reading payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReadingWithMeter" + } + } + } + }, + "responses": { + "200": { + "description": "Reading with meter created successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MeterReading" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequestCreateReadingWithMeter" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/metering/reading/{meter_id}/{counter_id}": { + "get": { + "operationId": "getReadingsByInterval", + "summary": "Get Readings by Interval", + "description": "Retrieves all readings specified in an interval.\nIf the start_date and end_date are equal, then it returns the readings of the specified date.\nThe start_date should be less than or equal to the end_date.\n", + "tags": [ + "ECP Admin", + "ECP" + ], + "security": [ + { + "EitherAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "meter_id", + "schema": { + "$ref": "#/components/schemas/Id" + }, + "required": true, + "description": "The ID of the meter." + }, + { + "in": "path", + "name": "counter_id", + "schema": { + "$ref": "#/components/schemas/Id" + }, + "required": true, + "description": "The ID of the counter." + }, + { + "in": "query", + "name": "start_date", + "required": false, + "description": "If not provided, the system will default to 2000-01-01.", + "schema": { + "type": "string", + "example": "2022-10-01" + } + }, + { + "in": "query", + "name": "end_date", + "required": false, + "description": "If not provided, the system will default to today's date.", + "schema": { + "type": "string", + "example": "2022-10-10" + } + }, + { + "in": "query", + "name": "direction", + "required": false, + "schema": { + "$ref": "#/components/schemas/Direction" + } + }, + { + "in": "query", + "name": "size", + "description": "Returns the first n results after the specified offset (from).\nIf this value is provided as -1, then it returns all results at once.\n", + "required": false, + "schema": { + "type": "number", + "example": 20, + "default": 20 + } + }, + { + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "number", + "example": 0, + "default": 0 + } + }, + { + "in": "query", + "name": "type", + "required": true, + "description": "Since meter readings are cumulative, users may need to request actual consumptions, which are the difference between consecutive measurements.\nIf this value is provided as \"cumulative\", then actual readings will be returned.\nIf this value is provided as \"relative\", then actual consumption will be returned.\n", + "schema": { + "type": "string", + "default": "cumulative", + "enum": [ + "cumulative", + "relative" + ] + } + }, + { + "in": "query", + "name": "sort", + "required": false, + "schema": { + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ] + }, + "description": "If this value is provided as \"asc\", then the results will be sorted by the timestamp field in ascending order.\nIf this value is provided as \"desc\", then the results will be sorted by the timestamp field in descending order.\n" + } + ], + "responses": { + "200": { + "description": "Readings retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MeterReading" + } + }, + "hits": { + "type": "number", + "example": 120 + }, + "firstRecordCreatedAt": { + "type": "string", + "example": "2022-10-01T20:00:00.000Z" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "put": { + "operationId": "updateMeterReading", + "summary": "Update Meter Reading", + "description": "Updates a meter reading.", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "meter_id", + "schema": { + "$ref": "#/components/schemas/Id" + }, + "required": true, + "description": "The ID of the meter entity." + }, + { + "in": "path", + "name": "counter_id", + "schema": { + "$ref": "#/components/schemas/Id" + }, + "required": true, + "description": "The ID of the counter entity." + }, + { + "in": "query", + "name": "timestamp", + "required": true, + "description": "The timestamp when the reading was created.", + "schema": { + "type": "string", + "example": "2022-10-01T20:00:00.000Z" + } + } + ], + "requestBody": { + "description": "Update meter reading payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMeterReading" + } + } + } + }, + "responses": { + "200": { + "description": "Meter reading updated successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MeterReading" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequestUpdateMeterReading" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "operationId": "deleteMeterReading", + "summary": "Delete Meter Reading", + "description": "Deletes a meter reading.", + "tags": [ + "ECP Admin" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "meter_id", + "schema": { + "$ref": "#/components/schemas/Id" + }, + "required": true, + "description": "The ID of the meter entity." + }, + { + "in": "path", + "name": "counter_id", + "schema": { + "$ref": "#/components/schemas/Id" + }, + "required": true, + "description": "The ID of the counter entity." + }, + { + "in": "query", + "name": "timestamp", + "required": true, + "description": "The timestamp when the reading was created.", + "schema": { + "type": "string", + "example": "2022-10-01T20:00:00.000Z" + } + } + ], + "responses": { + "200": { + "description": "Meter reading deleted successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "meterId": { + "$ref": "#/components/schemas/Id" + }, + "counterId": { + "$ref": "#/components/schemas/Id" + }, + "timestamp": { + "type": "string", + "example": "2022-10-01T20:00:00.000Z" + } + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + } + }, + "components": { + "responses": { + "InvalidRequest": { + "description": "The request could not be validated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "Unauthorized": { + "description": "Could not authenticate the user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "Forbidden": { + "description": "The user is not allowed to access this resource", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "NotFound": { + "description": "The specified resource was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "InternalServerError": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "InvalidRequestUpdateMeter": { + "description": "The request could not be validated", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResp" + }, + { + "properties": { + "reason": { + "type": "string", + "enum": [ + "missing_params" + ] + } + } + } + ] + } + } + } + }, + "InvalidRequestCreateMeterReading": { + "description": "The request could not be validated", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResp" + }, + { + "properties": { + "reason": { + "type": "string", + "enum": [ + "contract_period", + "no_counter", + "no_direction", + "timestamp_future", + "less_than_previous", + "greater_than_subsequent", + "meter_decommissioned" + ] + } + } + } + ] + } + } + } + }, + "InvalidRequestCreateMeterReadings": { + "description": "The request could not be validated", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResp" + }, + { + "properties": { + "reason": { + "type": "string", + "enum": [ + "too_many_records", + "timestamp_future", + "duplicate_reading", + "less_than_previous", + "invalid_identifiers", + "multiple_readings_found" + ] + } + } + } + ] + } + } + } + }, + "InvalidRequestCreateMeterReadingFromSubmission": { + "description": "The request could not be validated", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResp" + }, + { + "properties": { + "reason": { + "type": "string", + "enum": [ + "timestamp_future", + "less_than_previous", + "greater_than_subsequent" + ] + } + } + } + ] + } + } + } + }, + "InvalidRequestCreateReadingWithMeter": { + "description": "The request could not be validated", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResp" + }, + { + "properties": { + "reason": { + "type": "string", + "enum": [ + "missing_params", + "timestamp_future", + "less_than_previous", + "contract_period", + "greater_than_subsequent" + ] + } + } + } + ] + } + } + } + }, + "InvalidRequestUpdateMeterReading": { + "description": "The request could not be validated", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResp" + }, + { + "properties": { + "reason": { + "type": "string", + "enum": [ + "missing_params", + "timestamp_future", + "less_than_previous", + "greater_than_subsequent" + ] + } + } + } + ] + } + } + } + } + }, + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with ePilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "PortalAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with customer portal OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EitherAuth": { + "type": "http", + "scheme": "bearer", + "description": "Portal or Epilot Bearer Token" + }, + "AsOrganization": { + "type": "apiKey", + "in": "header", + "name": "x-ivy-org-id", + "description": "Set organization id as internal user" + } + }, + "schemas": { + "ErrorResp": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "EntityId": { + "type": "string", + "format": "uuid" + }, + "EntitySlug": { + "description": "URL-friendly identifier for the entity schema", + "type": "string", + "example": "contact" + }, + "BaseEntity": { + "type": "object", + "properties": { + "_id": { + "$ref": "#/components/schemas/EntityId", + "description": "Entity ID", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "_title": { + "type": "string", + "description": "Title of the entity", + "example": "Example Entity" + }, + "_org": { + "type": "string", + "description": "Organization ID the entity belongs to", + "example": "123" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of entity tags", + "example": [ + "example", + "mock" + ] + }, + "_created_at": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp of the entity", + "example": "2021-02-09T12:41:43.662Z" + }, + "_updated_at": { + "type": "string", + "format": "date-time", + "description": "Last update timestamp of the entity", + "example": "2021-02-09T12:41:43.662Z" + } + }, + "required": [ + "_id", + "_title", + "_org", + "_created_at", + "_updated_at" + ] + }, + "Entity": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "EntityItem": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "$ref": "#/components/schemas/Entity" + } + ] + }, + "Id": { + "type": "string" + }, + "EntityRelation": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/components/schemas/EntityId" + }, + "_slug": { + "type": "string", + "enum": [ + "contact", + "contract" + ] + } + } + }, + "Meter": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "type": "string", + "enum": [ + "meter" + ], + "description": "The schema type of the meter" + }, + "ma_lo_id": { + "type": "string", + "example": "A09-123", + "description": "The MA-LO ID of the meter" + }, + "status": { + "type": "string", + "enum": [ + "active", + "decommissioned" + ], + "description": "The status of the meter" + }, + "meter_type": { + "type": "string", + "enum": [ + "three-phase-meter", + "bellow-gas-meter", + "rotary-piston-meter", + "smart-meter", + "performance-meter", + "maximum-meter", + "turbine-gas-meter", + "ultrasonic-gas-meter", + "alternating-current-meter", + "modern-metering-system", + "intelligent-measuring-system", + "electronic-meter" + ], + "description": "The type of the meter" + }, + "tariff_type": { + "type": "string", + "example": "Peak load tariff", + "description": "The tariff type of the meter" + }, + "meter_number": { + "type": "string", + "example": "J-1093-1AK", + "description": "The number of the meter" + }, + "sector": { + "type": "string", + "enum": [ + "power", + "water", + "gas", + "district_heating", + "waste_water" + ], + "description": "The sector to which the meter belongs" + }, + "location": { + "type": "object", + "example": [ + { + "country": "Germany", + "city": "Koln", + "postal_code": 81475, + "street": "Melatengürtel", + "street_number": 71, + "additional_info": "5. Etage", + "_tags": [ + "billing", + "delivery" + ] + } + ], + "description": "The location information of the meter" + }, + "used_for": { + "type": "string", + "example": "Domestic Usage", + "description": "The usage purpose of the meter" + }, + "manufacturer": { + "type": "string", + "example": "Energy One", + "description": "The manufacturer of the meter" + }, + "calibration_date": { + "type": "string", + "example": "2022-10-10T00:00:00.000Z", + "description": "The calibration date of the meter" + }, + "contract": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + }, + "description": "The contract associated with the meter" + }, + "customer": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + }, + "description": "The customer associated with the meter" + } + } + } + ] + }, + "Direction": { + "type": "string", + "enum": [ + "feed-in", + "feed-out" + ] + }, + "TariffType": { + "type": "string", + "enum": [ + "ht", + "nt" + ] + }, + "Reason": { + "type": "string", + "nullable": true, + "description": "The reason for recording the reading\nIf no reason is specified or left empty, the Epilot UI will show 'Regular' as the default display text\n", + "enum": [ + "", + "regular", + "irregular", + "last", + "first", + "meter_change", + "contract_change", + "meter_adjustment" + ] + }, + "ReasonString": { + "type": "string", + "nullable": true, + "deprecated": true, + "description": "This field is deprecated. Please use the Reason enum instead.\n" + }, + "ReadBy": { + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "The person who recorded the reading" + }, + "ReadingStatus": { + "type": "string", + "nullable": true, + "enum": [ + "valid", + "in-validation", + "implausible", + null, + "" + ] + }, + "Reading": { + "type": "object", + "required": [ + "value", + "source" + ], + "properties": { + "value": { + "type": "number", + "example": 240, + "description": "The reading value of the meter" + }, + "read_by": { + "$ref": "#/components/schemas/ReadBy" + }, + "reason": { + "$ref": "#/components/schemas/Reason" + }, + "meter_id": { + "$ref": "#/components/schemas/EntityId", + "description": "The ID of the associated meter" + }, + "counter_id": { + "$ref": "#/components/schemas/EntityId", + "description": "The ID of the associated meter counter" + }, + "direction": { + "$ref": "#/components/schemas/Direction", + "description": "The direction of the reading (feed-in or feed-out)" + }, + "timestamp": { + "type": "string", + "description": "If the value is not provided, the system will be set with the time the request is processed.", + "example": "2022-10-10T00:00:00.000Z", + "format": "date-time" + }, + "source": { + "$ref": "#/components/schemas/Source", + "description": "The source of the reading" + }, + "status": { + "$ref": "#/components/schemas/ReadingStatus", + "description": "The status of the reading" + }, + "external_id": { + "type": "string", + "description": "The external ID of the reading" + }, + "remark": { + "type": "string", + "nullable": true, + "description": "A remark or comment for the reading", + "example": "Customer reported unusual consumption" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional metadata for the reading", + "example": { + "registration_id": "1234567890", + "business_unit": "ABC" + } + }, + "note": { + "type": "string", + "description": "Notes to record a meter reading" + }, + "unit": { + "$ref": "#/components/schemas/Unit", + "description": "The unit of measurement for the reading" + } + } + }, + "MeterReading": { + "allOf": [ + { + "$ref": "#/components/schemas/Reading" + }, + { + "required": [ + "meter_id" + ] + } + ] + }, + "PortalMeterReading": { + "allOf": [ + { + "$ref": "#/components/schemas/Reading" + }, + { + "required": [ + "counter_id" + ] + } + ] + }, + "UpdateMeterReading": { + "type": "object", + "required": [ + "value", + "meter_id", + "source" + ], + "properties": { + "value": { + "type": "number", + "example": 240, + "description": "The reading value of the meter" + }, + "read_by": { + "$ref": "#/components/schemas/ReadBy" + }, + "reason": { + "$ref": "#/components/schemas/ReasonString" + }, + "meter_id": { + "$ref": "#/components/schemas/EntityId", + "description": "The ID of the associated meter" + }, + "counter_id": { + "$ref": "#/components/schemas/EntityId", + "description": "The ID of the associated meter counter" + }, + "direction": { + "$ref": "#/components/schemas/Direction", + "description": "The direction of the reading (feed-in or feed-out)" + }, + "timestamp": { + "type": "string", + "description": "If the value is not provided, the system will be set with the time the request is processed.", + "example": "2022-10-10T00:00:00.000Z", + "format": "date-time" + }, + "source": { + "$ref": "#/components/schemas/Source", + "description": "The source of the reading" + }, + "status": { + "$ref": "#/components/schemas/ReadingStatus", + "description": "The status of the reading" + }, + "external_id": { + "type": "string", + "description": "The external ID of the reading" + }, + "remark": { + "type": "string", + "nullable": true, + "description": "A remark or comment for the reading", + "example": "Customer reported unusual consumption" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional metadata for the reading", + "example": { + "registration_id": "1234567890", + "business_unit": "ABC" + } + } + } + }, + "MeterCounter": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_id": { + "$ref": "#/components/schemas/EntityId" + }, + "_schema": { + "type": "string", + "enum": [ + "meter_counter" + ] + }, + "obis_number": { + "type": "string", + "example": "A-34", + "description": "The OBIS number of the meter counter" + }, + "direction": { + "$ref": "#/components/schemas/Direction", + "description": "The direction of the meter counter" + }, + "transformer_ratio": { + "type": "number", + "example": 70, + "description": "The transformer ratio of the meter counter" + }, + "unit": { + "$ref": "#/components/schemas/Unit", + "description": "The unit of measurement for the meter counter" + }, + "forecast_reading_value": { + "type": "string", + "example": 270, + "description": "The forecast reading value of the meter counter" + }, + "forecast_as_of": { + "type": "string", + "example": "2022-12-10T00:00:00.000Z", + "description": "The date as of which the forecast reading value is applicable" + }, + "current_consumption": { + "type": "number", + "example": 240, + "description": "The current consumption value of the meter counter" + }, + "last_reading": { + "type": "string", + "example": "2022-10-10T00:00:00.000Z", + "description": "The timestamp of the last reading" + }, + "conversion_factor": { + "type": "number", + "example": 3, + "description": "The conversion factor for the meter counter" + }, + "tariff_type": { + "$ref": "#/components/schemas/TariffType", + "description": "The tariff type of the meter counter" + } + } + } + ] + }, + "CounterReadingOnSubmission": { + "type": "object", + "required": [ + "counterId", + "direction", + "value" + ], + "properties": { + "counterId": { + "$ref": "#/components/schemas/Id", + "description": "The ID of the associated meter counter" + }, + "direction": { + "$ref": "#/components/schemas/Direction", + "description": "The direction of the reading (feed-in or feed-out)" + }, + "unit": { + "$ref": "#/components/schemas/Unit" + }, + "value": { + "type": "number", + "example": 240, + "description": "The reading value of the meter counter" + } + } + }, + "SubmissionMeterReading": { + "type": "object", + "required": [ + "meterId" + ], + "nullable": true, + "properties": { + "meterId": { + "$ref": "#/components/schemas/Id", + "description": "The ID of the associated meter" + }, + "readings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CounterReadingOnSubmission" + }, + "description": "- The counter readings of a meter\n- This is only sent when the user is authenticated while submitting a journey\n" + }, + "readingValue": { + "type": "number", + "example": 240, + "description": "The reading value of the meter when the counterId is passed or when the meterType is one-tariff" + }, + "readingDate": { + "type": "string", + "description": "If the value is not provided, the system will be set with the time the request is processed.", + "example": "2022-10-10T10:10:00.000Z" + }, + "readBy": { + "type": "string", + "example": "John Doe", + "description": "The person who recorded the reading" + }, + "reason": { + "$ref": "#/components/schemas/Reason" + }, + "maloId": { + "type": "string", + "example": "A09-123", + "description": "The MA-LO ID of the meter" + }, + "obisNumber": { + "type": "string", + "example": "A-34", + "description": "The OBIS number of the meter counter" + }, + "readingUnit": { + "$ref": "#/components/schemas/Unit", + "description": "The unit of measurement for the reading" + }, + "meterType": { + "type": "string", + "enum": [ + "one_tariff", + "two_tariff", + "bi_directional" + ], + "description": "The type of the meter" + }, + "feedInValue": { + "type": "number", + "example": 240, + "description": "The feed-in value of the meter when meterType is one-tariff or bi-directional" + }, + "feedOutValue": { + "type": "number", + "example": 240, + "description": "The feed-out value of the meter when meterType is bi-directional" + }, + "htValue": { + "type": "number", + "example": 240, + "description": "The high-peak tariff value of the meter when meterType is two-tariff" + }, + "ntValue": { + "type": "number", + "example": 240, + "description": "The off-peak tariff value of the meter when meterType is two-tariff" + } + } + }, + "Unit": { + "type": "string" + }, + "Source": { + "type": "string", + "enum": [ + "ECP", + "ERP", + "360", + "journey-submission" + ] + }, + "ActionLabel": { + "type": "object", + "properties": { + "en": { + "type": "string", + "nullable": true + }, + "de": { + "type": "string", + "nullable": true + } + } + }, + "Rule": { + "type": "object", + "properties": { + "entity": { + "type": "string", + "nullable": true + }, + "attribute": { + "type": "string", + "nullable": true + }, + "attribute_value": { + "type": "string", + "nullable": true + } + } + }, + "JourneyActions": { + "type": "object", + "properties": { + "journey_id": { + "type": "string", + "nullable": true + }, + "action_label": { + "type": "object", + "$ref": "#/components/schemas/ActionLabel", + "nullable": true + }, + "slug": { + "type": "string", + "nullable": true + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Rule" + }, + "nullable": true + } + } + }, + "ReadingWithMeter": { + "type": "object", + "properties": { + "ma_lo_id": { + "type": "string", + "example": "A09-123", + "description": "The MA-LO ID of the meter" + }, + "meter_id": { + "$ref": "#/components/schemas/Id", + "description": "The ID of the associated meter" + }, + "obis_number": { + "type": "string", + "example": "A-34", + "description": "The OBIS number of the meter counter" + }, + "unit": { + "$ref": "#/components/schemas/Unit", + "description": "The unit of measurement for the reading" + }, + "direction": { + "$ref": "#/components/schemas/Direction", + "description": "The direction of the reading" + }, + "tariff_type": { + "$ref": "#/components/schemas/TariffType", + "description": "The tariff type of the reading" + }, + "value": { + "type": "number", + "example": 240, + "description": "The reading value" + }, + "read_by": { + "$ref": "#/components/schemas/ReadBy" + }, + "reason": { + "$ref": "#/components/schemas/Reason" + }, + "timestamp": { + "type": "string", + "description": "If the value is not provided, the system will be set with the time the request is processed.", + "example": "2022-10-10T10:10:00.000Z" + }, + "source": { + "$ref": "#/components/schemas/Source", + "description": "The source of the reading" + } + } + }, + "ActivityId": { + "type": "string", + "format": "ulid", + "description": "See https://github.com/ulid/spec", + "example": "01F130Q52Q6MWSNS8N2AVXV4JN" + } + }, + "parameters": { + "ActivityIdQueryParam": { + "name": "activity_id", + "description": "Activity to include in event feed", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ActivityId" + } + }, + "SkipValidationQueryParam": { + "name": "skip_validation", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + }, + "description": "When set to true, all validations will be skipped and the system will allow the reading to be created.\nIf set to false or not provided, the system performs the following validations:\n Validation Rules (when not skipped)\n - Previous Reading Check:\n The new reading must be greater than the previous reading.\n Example: If the previous reading is 100 and the new reading is 50, the system will reject it.\n - Subsequent Reading Check\n The new reading must be less than the next (subsequent) reading, if one exists.\n Example: If a future reading for 2022-10-10 is 200, and you try to enter 250 for 2022-10-09, it will be rejected.\n - Future Timestamp Check\n The reading timestamp must be less than or equal to the current time.\n Example: If the current time is 2022-10-10T20:00:00Z, a reading with timestamp 2022-10-11T20:00:00Z will not be accepted.\n - Duplicate Check\n A reading is not allowed if there's already a record with the same meter_id, counter_id, and timestamp`.\n - Update Check\n When updating a reading, the system will look for an existing record with the same meter_id, counter_id, and timestamp.\n If no such record exists, it won't throw an error — the update simply won't take effect.\n" + } + } + }, + "servers": [ + { + "url": "https://metering.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/notes.json b/packages/cli/definitions/notes.json new file mode 100644 index 00000000..0adc1d49 --- /dev/null +++ b/packages/cli/definitions/notes.json @@ -0,0 +1,1531 @@ +{ + "openapi": "3.0.2", + "info": { + "version": "2.3.0", + "title": "Notes API", + "description": "Facade API Backend for Epilot Notes feature" + }, + "servers": [ + { + "url": "https://notes.sls.epilot.io" + } + ], + "tags": [ + { + "name": "Notes" + }, + { + "name": "Pinning" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v1/note": { + "post": { + "operationId": "createNote", + "summary": "createNote", + "description": "Creates a new Note entry", + "tags": [ + "Notes" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotePostRequestBody" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response with Note content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NoteEntity" + } + } + } + } + } + } + }, + "/v1/note/{id}": { + "get": { + "operationId": "getNote", + "summary": "getNote", + "description": "Retrieves a single Note entry based on it's Entity ID", + "tags": [ + "Notes" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The Entity ID of the Note entry to retrieve", + "schema": { + "type": "string", + "description": "The Entity ID of the Note entry to retrieve" + }, + "required": true + }, + { + "in": "query", + "name": "hydrate", + "description": "Whether to hydrate the Note's relation attributes", + "schema": { + "type": "boolean", + "description": "Whether to hydrate the Note's relation attributes" + } + } + ], + "responses": { + "200": { + "description": "Successful response with Note content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NoteGetRequestResponse" + } + } + } + } + } + }, + "patch": { + "operationId": "patchNote", + "summary": "patchNote", + "description": "Updates an existing Note entry", + "tags": [ + "Notes" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The Entity ID of the Note entry to update", + "schema": { + "type": "string", + "description": "The Entity ID of the Note entry to update" + }, + "required": true + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotePatchRequestBody" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response with Note content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NoteEntity" + } + } + } + } + } + }, + "put": { + "operationId": "updateNote", + "summary": "updateNote", + "description": "Updates an existing Note entry", + "tags": [ + "Notes" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The Entity ID of the Note entry to update", + "schema": { + "type": "string", + "description": "The Entity ID of the Note entry to update" + }, + "required": true + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotePutRequestBody" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response with Note content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NoteEntity" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteNote", + "summary": "deleteNote", + "description": "Deletes a single Note entry based on it's Entity ID", + "tags": [ + "Notes" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The Entity ID of the Note entry to delete", + "schema": { + "type": "string", + "description": "The Entity ID of the Note entry to delete" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response with the deleted Note entity" + } + } + } + }, + "/v1/notes:search": { + "post": { + "operationId": "searchNotesByContext", + "summary": "searchNotesByContext", + "description": "Search for a paginated list of Notes based on one or more contexts", + "tags": [ + "Notes" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NoteSearchByContextRequestBody" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response with Note content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotesSearchRequestResponse" + } + } + } + } + } + } + }, + "/v1/notes/{entity_id}": { + "get": { + "operationId": "getNotesByContext", + "summary": "getNotesByContext", + "deprecated": true, + "description": "Given a `context_type`, returns a list of Notes that belong to that context within the specified `id`. \nThis endpoint is deprecated but will be kept for backwards compatibility. Please use the `searchNotesByContext` endpoint instead.", + "tags": [ + "Notes" + ], + "parameters": [ + { + "in": "path", + "name": "entity_id", + "description": "The ID of the Contextual Entity from where to retrieve Notes", + "schema": { + "type": "string", + "description": "The ID of the Contextual Entity from where to retrieve Notes" + }, + "required": true + }, + { + "in": "query", + "name": "contexts", + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ContextType" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + } + } + }, + { + "in": "query", + "name": "from", + "description": "The index of the first Note to return in this query", + "schema": { + "type": "number", + "default": 0, + "description": "The index of the first Note to return in this query" + } + }, + { + "in": "query", + "name": "size", + "description": "The number of Note entries to return in this query", + "schema": { + "type": "number", + "default": 10, + "description": "The number of Note entries to return in this query" + } + } + ], + "responses": { + "200": { + "description": "Successful response with Note content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotesSearchRequestResponse" + } + } + } + } + } + } + }, + "/v1/note/{id}/pin": { + "post": { + "operationId": "pinNote", + "summary": "pinNote", + "description": "Pins a single Note entry based on it's Entity ID", + "tags": [ + "Pinning" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The Entity ID of the Note entry to pin", + "schema": { + "type": "string", + "description": "The Entity ID of the Note entry to pin" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response with the pinned Note entity" + } + } + } + }, + "/v1/note/{id}/context": { + "get": { + "operationId": "getNoteContexts", + "summary": "getNoteContexts", + "description": "Gets all the Entity and non-Entity records the Note is contextually attached to", + "tags": [ + "Notes" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The Entity ID of the Note entry to get contexts for", + "schema": { + "type": "string", + "description": "The Entity ID of the Note entry to get contexts for" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response with the contexts for the Note Entity", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NoteContexts" + } + } + } + } + } + } + } + }, + "/v1/note/{id}/reaction": { + "post": { + "operationId": "addNoteReaction", + "summary": "addNoteReaction", + "description": "Adds an emoji reaction to a note", + "tags": [ + "Reactions" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The Entity ID of the Note entry to add reaction to", + "schema": { + "type": "string", + "description": "The Entity ID of the Note entry to add reaction to" + }, + "required": true + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReactionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response with the updated note reactions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NoteEntity" + } + } + } + } + } + } + }, + "/v1/note/{id}/reaction/{emoji_shortcode}": { + "delete": { + "operationId": "removeNoteReaction", + "summary": "removeNoteReaction", + "description": "Removes an emoji reaction from a note", + "tags": [ + "Reactions" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The Entity ID of the Note entry to remove reaction from", + "schema": { + "type": "string", + "description": "The Entity ID of the Note entry to remove reaction from" + }, + "required": true + }, + { + "in": "path", + "name": "emoji_shortcode", + "description": "The emoji to remove from the note", + "schema": { + "type": "string", + "description": "The emoji to remove from the note" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response with the updated note reactions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NoteEntity" + } + } + } + } + } + } + }, + "/v1/note/{id}/reactions/toggle": { + "post": { + "operationId": "toggleNoteReactions", + "summary": "toggleNoteReactions", + "description": "Toggles multiple emoji reactions on a note. If a user has already reacted with an emoji, it removes the reaction. If a user hasn't reacted with an emoji, it adds the reaction.", + "tags": [ + "Reactions" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The Entity ID of the Note entry to toggle reactions on", + "schema": { + "type": "string", + "description": "The Entity ID of the Note entry to toggle reactions on" + }, + "required": true + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToggleReactionsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response with the updated note reactions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NoteEntity" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + } + }, + "schemas": { + "NotePostRequestBody": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags associated with this Note" + }, + "type": { + "type": "string", + "description": "Entity ID of the Note entry" + }, + "entity_id": { + "type": "string", + "description": "The Entity ID of the Entity this Note will be related to. This option has been deprecated since 2.1.0. Please use `contexts` instead.", + "deprecated": true + }, + "parent_id": { + "type": "string", + "description": "The Entity ID of the Note's parent Note. If supplied, the Note will be a comment to the parent Note. Be aware that Notes can only have comments one level deep" + }, + "contexts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ContextType" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + }, + "description": "The contexts to which this Note will be related to" + }, + "additional_contexts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ContextType" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + }, + "description": "Any additional non-entity contexts to which this Note will be related to. This option has been deprecated since 2.1.0. Please use `contexts` instead.", + "deprecated": true + }, + "content": { + "type": "string", + "description": "The content of the Note" + }, + "attachments": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of File Entity IDs attached to the Note" + }, + "read_by": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of user IDs who have read this note" + } + } + }, + "ContextType": { + "type": "string", + "enum": [ + "workflow_execution", + "workflow_task", + "workflow_configuration", + "journey_configuration", + "entity" + ] + }, + "NoteEntity": { + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + } + ], + "type": "object", + "properties": { + "context_entities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Entity" + } + }, + "parent": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NoteEntity" + } + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Entity" + } + }, + "comments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NoteEntity" + } + }, + "content": { + "type": "string", + "description": "The content of the Note" + }, + "contexts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ContextType" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + } + }, + "pinned_at": { + "type": "string", + "description": "The timestamp of when this Note was pinned", + "format": "date-time" + }, + "edited_at": { + "type": "string", + "description": "The timestamp of when this Note was last updated", + "format": "date-time" + }, + "created_by": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/CreatedByType" + }, + "user_id": { + "type": "string" + }, + "display_name": { + "type": "string" + }, + "org_id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "read_by": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of user IDs who have read this note" + }, + "reactions": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Reactions to the note, keyed by reaction type, with an array of user IDs for each type" + } + }, + "description": "A note Entity object cotaining Entity metadata and content. Relational attributes are hydrated in place." + }, + "Entity": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "Entity ID of the Note entry" + }, + "_org": { + "type": "string", + "description": "ID of the Organization that owns this Note" + }, + "_schema": { + "type": "string", + "description": "The Entity schema of this Note" + }, + "_created_at": { + "type": "string", + "description": "The timestamp of when this Note was created", + "format": "date-time" + }, + "_updated_at": { + "type": "string", + "description": "The timestamp of when this Note was last updated", + "format": "date-time" + }, + "_created_by": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ], + "description": "The Entity ID of the User that created this Note" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags associated with this Note" + }, + "_acl": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Access Control List for this Note entry" + }, + "_owners": { + "type": "array", + "items": { + "type": "object", + "properties": { + "org_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "required": [ + "org_id", + "user_id" + ] + } + }, + "type": { + "type": "string", + "description": "Entity ID of the Note entry" + } + }, + "required": [ + "_id" + ], + "description": "Base Entity schema" + }, + "CreatedByType": { + "type": "string", + "enum": [ + "user", + "group" + ] + }, + "NoteGetRequestResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + } + ], + "type": "object", + "properties": { + "context_entities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Entity" + } + }, + "parent": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NoteEntity" + } + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Entity" + } + }, + "comments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NoteEntity" + } + }, + "content": { + "type": "string", + "description": "The content of the Note" + }, + "contexts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ContextType" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + } + }, + "pinned_at": { + "type": "string", + "description": "The timestamp of when this Note was pinned", + "format": "date-time" + }, + "edited_at": { + "type": "string", + "description": "The timestamp of when this Note was last updated", + "format": "date-time" + }, + "created_by": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/CreatedByType" + }, + "user_id": { + "type": "string" + }, + "display_name": { + "type": "string" + }, + "org_id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "read_by": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of user IDs who have read this note" + }, + "reactions": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Reactions to the note, keyed by reaction type, with an array of user IDs for each type" + } + } + }, + "NotePatchRequestBody": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags associated with this Note" + }, + "type": { + "type": "string", + "description": "Entity ID of the Note entry" + }, + "attachments": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string" + } + }, + "required": [ + "entity_id" + ] + } + } + }, + "description": "The Note's parent Note" + }, + "comments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NonHydratedNoteEntity" + } + }, + "content": { + "type": "string", + "description": "The content of the Note" + }, + "contexts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ContextType" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + } + }, + "pinned_at": { + "type": "string", + "description": "The timestamp of when this Note was pinned", + "format": "date-time" + }, + "created_by": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "user", + "group" + ] + }, + "user_id": { + "type": "string" + }, + "display_name": { + "type": "string" + }, + "org_id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "read_by": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of user IDs who have read this note" + }, + "reactions": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Reactions to the note, keyed by reaction type, with an array of user IDs for each type" + } + } + }, + "NonHydratedNoteEntity": { + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + } + ], + "type": "object", + "properties": { + "context_entities": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string" + } + }, + "required": [ + "entity_id" + ] + } + } + }, + "required": [ + "$relation" + ] + }, + "parent": { + "$ref": "#/components/schemas/NoteEntityParent" + }, + "attachments": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string" + } + }, + "required": [ + "entity_id" + ] + } + } + }, + "description": "The Note's parent Note" + }, + "comments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NonHydratedNoteEntity" + } + }, + "content": { + "type": "string", + "description": "The content of the Note" + }, + "contexts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ContextType" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + } + }, + "pinned_at": { + "type": "string", + "description": "The timestamp of when this Note was pinned", + "format": "date-time" + }, + "created_by": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "user", + "group" + ] + }, + "user_id": { + "type": "string" + }, + "display_name": { + "type": "string" + }, + "org_id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "read_by": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of user IDs who have read this note" + }, + "reactions": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Reactions to the note, keyed by reaction type, with an array of user IDs for each type" + } + }, + "required": [ + "context_entities" + ], + "description": "A note Entity object cotaining Entity metadata and content. Relational attributes are not hydrated in place." + }, + "NoteEntityParent": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string" + } + }, + "required": [ + "entity_id" + ] + } + } + }, + "description": "The Note's parent Note" + }, + "NotePutRequestBody": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "Entity ID of the Note entry" + }, + "_org": { + "type": "string", + "description": "ID of the Organization that owns this Note" + }, + "_schema": { + "type": "string", + "description": "The Entity schema of this Note" + }, + "_created_at": { + "type": "string", + "description": "The timestamp of when this Note was created", + "format": "date-time" + }, + "_updated_at": { + "type": "string", + "description": "The timestamp of when this Note was last updated", + "format": "date-time" + }, + "_created_by": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ], + "description": "The Entity ID of the User that created this Note" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags associated with this Note" + }, + "_acl": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Access Control List for this Note entry" + }, + "_owners": { + "type": "array", + "items": { + "type": "object", + "properties": { + "org_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "required": [ + "org_id", + "user_id" + ] + } + }, + "type": { + "type": "string", + "description": "Entity ID of the Note entry" + }, + "context_entities": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string" + } + }, + "required": [ + "entity_id" + ] + } + } + }, + "required": [ + "$relation" + ] + }, + "parent": { + "$ref": "#/components/schemas/NoteEntityParent" + }, + "attachments": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string" + } + }, + "required": [ + "entity_id" + ] + } + } + }, + "description": "The Note's parent Note" + }, + "content": { + "type": "string", + "description": "The content of the Note" + }, + "contexts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ContextType" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + } + }, + "pinned_at": { + "type": "string", + "description": "The timestamp of when this Note was pinned", + "format": "date-time" + }, + "created_by": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "user", + "group" + ] + }, + "user_id": { + "type": "string" + }, + "display_name": { + "type": "string" + }, + "org_id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "read_by": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of user IDs who have read this note" + }, + "reactions": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Reactions to the note, keyed by reaction type, with an array of user IDs for each type" + } + } + }, + "NoteSearchByContextRequestBody": { + "type": "object", + "properties": { + "contexts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ContextType" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + } + }, + "from": { + "type": "number", + "default": 0, + "description": "The index of the first Note to return in this query" + }, + "size": { + "type": "number", + "default": 10, + "description": "The number of Note entries to return in this query" + } + }, + "required": [ + "contexts" + ] + }, + "NotesSearchRequestResponse": { + "type": "object", + "properties": { + "hits": { + "type": "number", + "description": "The number of Note entries returned in this query" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NoteEntity" + }, + "description": "The Note entries returned in this query" + } + }, + "required": [ + "results" + ] + }, + "NoteContexts": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ContextType" + }, + "context": { + "anyOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "$ref": "#/components/schemas/WorkflowExecution" + } + ] + } + }, + "required": [ + "type", + "context" + ], + "description": "List of resolved Entity and non-Entity contexts attached to a given Note." + }, + "WorkflowExecution": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "definitionId": { + "type": "string" + }, + "orgId": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "definitionId", + "orgId", + "name" + ], + "description": "Base metadata for a Workflow Execution. This is a lightweight representation of a Workflow Execution, and does not contain all it's data" + }, + "ReactionRequest": { + "type": "object", + "properties": { + "emoji": { + "type": "string", + "minLength": 1, + "maxLength": 50, + "description": "The emoji identifier (e.g., 'thumbs-up', 'heart', 'thinking-face')", + "example": "thumbs-up" + } + }, + "required": [ + "emoji" + ] + }, + "ToggleReactionsRequest": { + "type": "object", + "properties": { + "emojis": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "description": "Array of emoji identifiers to toggle (e.g., ['thumbs-up', 'heart', 'thinking-face'])", + "example": [ + "thumbs-up", + "heart" + ] + } + }, + "required": [ + "emojis" + ] + } + } + } +} diff --git a/packages/cli/definitions/notification.json b/packages/cli/definitions/notification.json new file mode 100644 index 00000000..7180fd92 --- /dev/null +++ b/packages/cli/definitions/notification.json @@ -0,0 +1,1425 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Notification API", + "version": "1.7.0", + "description": "Notification API for epilot 360" + }, + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "tags": [ + { + "name": "Notification", + "description": "Notification" + }, + { + "name": "Template", + "description": "Notification Template" + } + ], + "paths": { + "/v2/notification/notifications": { + "get": { + "operationId": "getNotificationsV2", + "summary": "getNotificationsV2", + "description": "Get notifications items. These items may eventually contain entities within their payload, which can be hydrated by the client if desired by calling the Entity API directly.", + "tags": [ + "Notification" + ], + "parameters": [ + { + "in": "query", + "name": "cursor", + "schema": { + "type": "string" + }, + "required": false, + "description": "Base64 encoded cursor to be used for pagination" + }, + { + "in": "query", + "name": "after_id", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + }, + "description": "The numbers of items to return" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cursor": { + "type": "string", + "example": "eyJjcmVhd", + "description": "Base64 encoded cursor to be used for pagination" + }, + "total": { + "type": "integer", + "example": 1 + }, + "total_unread": { + "type": "integer", + "example": 1 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationItem" + } + } + } + } + } + } + } + } + } + }, + "/v1/notification/notifications": { + "post": { + "operationId": "createNotification", + "summary": "createNotification", + "description": "Create a message that can be displayed in the notification panel.", + "tags": [ + "Notification" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Notification" + } + } + } + }, + "responses": { + "202": { + "description": "Success" + } + } + }, + "get": { + "operationId": "getNotifications", + "summary": "getNotifications", + "description": "Get notifications", + "tags": [ + "Notification" + ], + "parameters": [ + { + "in": "query", + "name": "after_id", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + }, + "description": "The numbers of items to return" + }, + { + "in": "query", + "name": "no_hydrate", + "schema": { + "type": "boolean" + }, + "description": "When true, the payload will not be hydrated with the entity data. This is useful when the client does not need the entity data and wants to save on API calls (performance gain). When false, the payload will be hydrated with the entity data. This is useful when the client needs the entity data to display the notification (e.g. to show the name of the contact in the notification message), but can have a significative performance impact.\n\nThis endpoint will eventually be deprecated in favor of GET /v2/notification/notifications which no longer hydrates the payload by default.\n" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "example": 1 + }, + "total_unread": { + "type": "integer", + "example": 1 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationItem" + } + } + } + } + } + } + } + } + } + }, + "/v1/notification/notifications/{id}": { + "get": { + "operationId": "getNotification", + "summary": "getNotification", + "description": "Get the details of a single notification.", + "tags": [ + "Notification" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Notification Id", + "required": true, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationItem" + } + } + } + } + } + } + }, + "/v1/notification/notifications/mark": { + "put": { + "operationId": "markAllAsRead", + "summary": "markAllAsRead", + "description": "Mark all as read", + "tags": [ + "Notification" + ], + "responses": { + "204": { + "description": "ok" + } + } + } + }, + "/v1/notification/notifications/{id}/mark": { + "put": { + "operationId": "markAsRead", + "summary": "markAsRead", + "description": "Mark as read", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "integer" + }, + "required": true, + "description": "Numeric ID of the notification to mark as read" + } + ], + "tags": [ + "Notification" + ], + "responses": { + "204": { + "description": "Success" + } + } + } + }, + "/v1/notification/unreads": { + "get": { + "operationId": "getTotalUnread", + "summary": "getTotalUnread", + "description": "Get total unread", + "tags": [ + "Notification" + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "type": "number", + "example": 999 + } + } + } + } + } + } + }, + "/v1/notification/templates": { + "get": { + "operationId": "listNotificationTemplates", + "summary": "listNotificationTemplates", + "description": "List notification templates with optional filtering and pagination", + "tags": [ + "Template" + ], + "parameters": [ + { + "name": "q", + "in": "query", + "required": false, + "description": "Lucene query string for filtering", + "schema": { + "type": "string" + } + }, + { + "name": "from", + "in": "query", + "required": false, + "description": "Pagination offset (0-based)", + "schema": { + "type": "integer", + "minimum": 0, + "default": 0 + } + }, + { + "name": "size", + "in": "query", + "required": false, + "description": "Results per page", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 25 + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "description": "Sort fields (prefix with - for descending)", + "schema": { + "type": "string" + } + }, + { + "name": "fields", + "in": "query", + "required": false, + "description": "Comma-separated fields to include", + "schema": { + "type": "string" + } + }, + { + "name": "hydrate", + "in": "query", + "required": false, + "description": "Resolve nested relations", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplateListResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "post": { + "operationId": "createNotificationTemplate", + "summary": "createNotificationTemplate", + "description": "Create a new notification template", + "tags": [ + "Template" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNotificationTemplateInput" + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/notification/templates/{id}": { + "get": { + "operationId": "getNotificationTemplate", + "summary": "getNotificationTemplate", + "description": "Get a single notification template by ID", + "tags": [ + "Template" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TemplateIdPathParam" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "put": { + "operationId": "updateNotificationTemplate", + "summary": "updateNotificationTemplate", + "description": "Update a notification template (full replacement)", + "tags": [ + "Template" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TemplateIdPathParam" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateNotificationTemplateInput" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "patch": { + "operationId": "patchNotificationTemplate", + "summary": "patchNotificationTemplate", + "description": "Partially update a notification template", + "tags": [ + "Template" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TemplateIdPathParam" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateNotificationTemplateInput" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteNotificationTemplate", + "summary": "deleteNotificationTemplate", + "description": "Delete a notification template permanently", + "tags": [ + "Template" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TemplateIdPathParam" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/notification/templates/send-preview": { + "post": { + "operationId": "sendPreview", + "summary": "sendPreview", + "description": "Send a preview notification (both email and in-app) to the requesting user.\nUsed to test notification templates before saving.\n", + "tags": [ + "Template" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendPreviewInput" + } + } + } + }, + "responses": { + "200": { + "description": "Preview notification sent successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendPreviewResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotOrg": { + "description": "Overrides the target organization to allow shared tenant access", + "name": "x-epilot-org-id", + "in": "header", + "type": "apiKey" + } + }, + "parameters": { + "TemplateIdPathParam": { + "name": "id", + "in": "path", + "required": true, + "description": "Template ID (UUID)", + "schema": { + "type": "string", + "format": "uuid" + } + } + }, + "schemas": { + "Error": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Error message" + }, + "code": { + "type": "string", + "description": "Error code" + } + }, + "required": [ + "message" + ] + }, + "EntityOperation": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/EntityId" + }, + "operation": { + "type": "string", + "example": "updateEntity" + }, + "params": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/EntityId" + }, + "slug": { + "$ref": "#/components/schemas/EntitySlug" + } + }, + "example": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "slug": "contact" + } + }, + "payload": { + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "example": { + "_schema": "contact", + "_org": "123", + "status": "Inactive" + } + } + ] + } + }, + "required": [ + "entity", + "name" + ] + }, + "NotificationItem": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "notification_id": { + "$ref": "#/components/schemas/NotificationId" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "read_state": { + "type": "boolean", + "example": false + } + } + }, + { + "$ref": "#/components/schemas/NotificationBase" + }, + { + "type": "object", + "properties": { + "caller": { + "$ref": "#/components/schemas/NotificationCallerContext" + } + } + }, + { + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityOperation" + } + } + } + } + ] + }, + "Notification": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationBase" + }, + { + "type": "object", + "properties": { + "read_state": { + "type": "boolean", + "example": false + }, + "visibility_user_ids": { + "description": "The person who is the corresponding event recipient.", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "1", + "2", + "3", + "4", + "5" + ] + } + } + } + ] + }, + "NotificationBase": { + "type": "object", + "properties": { + "notification_id": { + "type": "number" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { + "description": "Type of notification", + "type": "string", + "example": "workflow" + }, + "redirect_url": { + "description": "Redirect url", + "type": "string", + "example": "https://epilot.cloud" + }, + "organization_id": { + "description": "Organization Id", + "type": "string", + "example": "206801" + }, + "title": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "Title for notification. Supports handlebars syntax.", + "example": "My custom notification" + }, + "de": { + "type": "string", + "description": "Title for notification. Supports handlebars syntax.", + "example": "Meine benutzerdefinierte Aktivität" + } + } + }, + "message": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "Message for notification. Supports handlebars syntax.", + "example": "{{caller}} did something with {{contact.entity.id}} {{branch.name}}." + }, + "de": { + "type": "string", + "description": "Message for notification. Supports handlebars syntax.", + "example": "{{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}." + } + } + }, + "payload": { + "type": "object", + "properties": {}, + "additionalProperties": true, + "example": { + "entity": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "schema": "contact" + } + } + }, + "caller": { + "$ref": "#/components/schemas/NotificationCallerContext" + }, + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityOperation" + } + }, + "force_notify_users": { + "type": "object", + "properties": {}, + "additionalProperties": true, + "example": { + "12345": { + "email": false, + "in_app": false + } + } + } + }, + "required": [ + "type", + "title", + "message" + ] + }, + "EntityId": { + "type": "string", + "format": "uuid" + }, + "Entity": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "Id": { + "type": "number", + "example": 123456789 + }, + "NotificationId": { + "type": "number", + "example": 123456789 + }, + "NotificationCallerContext": { + "type": "object", + "additionalProperties": true, + "properties": { + "EpilotAuth": { + "type": "object", + "properties": { + "token": { + "type": "object", + "properties": { + "sub": { + "type": "string", + "example": "476e9b48-42f4-4234-a2b0-4668b34626ce" + }, + "email": { + "type": "string", + "example": "example@epilot.cloud" + }, + "cognito:username": { + "type": "string", + "example": "example@epilot.cloud" + }, + "custom:ivy_user_id": { + "type": "string", + "example": "10006129" + } + }, + "example": { + "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce", + "cognito:groups": [ + "Administrator" + ], + "cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role", + "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D", + "custom:ivy_org_id": "739224", + "cognito:username": "n.ahmad@epilot.cloud", + "custom:ivy_user_id": "10006129", + "cognito:roles": [ + "arn:aws:iam::912468240823:role/base-administrator-role" + ], + "aud": "6e0jbdnger7nmoktaaflarue1l", + "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75", + "token_use": "id", + "auth_time": 1614333023, + "exp": 1614336623, + "iat": 1614333023, + "email": "n.ahmad@epilot.cloud" + } + } + } + } + } + }, + "EntitySlug": { + "description": "URL-friendly identifier for the entity schema", + "type": "string", + "example": "contact" + }, + "EntityOwner": { + "type": "object", + "required": [ + "org_id", + "user_id" + ], + "properties": { + "org_id": { + "type": "string", + "description": "Organization ID" + }, + "user_id": { + "type": "string", + "description": "User ID" + } + } + }, + "EntityAcl": { + "type": "object", + "description": "Access control list", + "properties": { + "view": { + "type": "array", + "items": { + "type": "string" + } + }, + "edit": { + "type": "array", + "items": { + "type": "string" + } + }, + "delete": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "NotificationTemplate": { + "type": "object", + "required": [ + "_id", + "_org", + "_schema", + "_title", + "_created_at", + "_updated_at" + ], + "properties": { + "_id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier" + }, + "_schema": { + "type": "string", + "description": "Entity schema type" + }, + "_title": { + "type": "string", + "nullable": true, + "description": "Display title" + }, + "_org": { + "type": "string", + "description": "Organization ID" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "description": "Tags for categorization" + }, + "_created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "ISO timestamp of creation" + }, + "_updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "ISO timestamp of last update" + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the entity", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "_owners": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityOwner" + }, + "description": "Entity owners", + "readOnly": true + }, + "_acl": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAcl" + } + ], + "description": "Access control list", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Internal template name" + }, + "type": { + "type": "string", + "description": "Notification type key" + }, + "notification_title": { + "type": "string", + "description": "Notification title (Lexical editor JSON, supports variables)" + }, + "message": { + "type": "string", + "description": "Notification body (Lexical editor JSON, supports variables)" + }, + "action_label": { + "type": "string", + "description": "CTA button text (supports variables)" + }, + "action_url": { + "type": "string", + "description": "CTA button URL (supports variables)" + }, + "style": { + "type": "string", + "description": "JSON string with style config" + }, + "system_template": { + "type": "boolean", + "description": "Whether this is a system template", + "readOnly": true + }, + "created_by": { + "type": "string", + "description": "User ID who created the template", + "readOnly": true + }, + "updated_by": { + "type": "string", + "description": "User ID who last updated the template", + "readOnly": true + } + } + }, + "CreateNotificationTemplateInput": { + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "type": "string", + "description": "Internal template name (required)" + }, + "type": { + "type": "string", + "description": "Notification type key (required)" + }, + "notification_title": { + "type": "string", + "description": "Notification title (Lexical editor JSON, supports variables)" + }, + "message": { + "type": "string", + "description": "Notification body (Lexical editor JSON, supports variables)" + }, + "action_label": { + "type": "string", + "description": "CTA button text (supports variables)" + }, + "action_url": { + "type": "string", + "description": "CTA button URL (supports variables)" + }, + "style": { + "type": "string", + "description": "JSON string with style config" + }, + "_title": { + "type": "string", + "description": "Display title" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags for categorization" + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the entity", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } + } + }, + "UpdateNotificationTemplateInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Internal template name" + }, + "notification_title": { + "type": "string", + "description": "Notification title (Lexical editor JSON, supports variables)" + }, + "message": { + "type": "string", + "description": "Notification body (Lexical editor JSON, supports variables)" + }, + "action_label": { + "type": "string", + "description": "CTA button text (supports variables)" + }, + "action_url": { + "type": "string", + "description": "CTA button URL (supports variables)" + }, + "style": { + "type": "string", + "description": "JSON string with style config" + }, + "_title": { + "type": "string", + "description": "Display title" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags for categorization" + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the entity", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } + } + }, + "NotificationTemplateListResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTemplate" + } + }, + "hits": { + "type": "integer", + "description": "Total number of matching results" + } + } + }, + "SendPreviewInput": { + "type": "object", + "required": [ + "template" + ], + "properties": { + "template": { + "$ref": "#/components/schemas/UpdateNotificationTemplateInput" + }, + "context_ids": { + "type": "object", + "description": "Optional context IDs for variable replacement", + "additionalProperties": { + "type": "string" + } + } + } + }, + "SendPreviewResponse": { + "type": "array", + "description": "Array of results for each notification channel (email, in-app)", + "items": { + "type": "object", + "required": [ + "success" + ], + "properties": { + "success": { + "type": "boolean", + "description": "Whether this notification was sent successfully" + }, + "data": { + "description": "Result data" + } + } + } + } + } + }, + "servers": [ + { + "url": "https://notification.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/organization.json b/packages/cli/definitions/organization.json new file mode 100644 index 00000000..01b8e3ac --- /dev/null +++ b/packages/cli/definitions/organization.json @@ -0,0 +1,629 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Organization API", + "description": "Manage epilot tenant organizations", + "version": "1.0.0" + }, + "tags": [ + { + "name": "Organization", + "description": "Organization info" + }, + { + "name": "Organization Settings", + "description": "Organization Settings" + }, + { + "name": "Cleanup", + "description": "Internal Cleanup endpoints" + }, + { + "name": "Internal", + "description": "Internal endpoints" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v2/organization/current": { + "get": { + "operationId": "getCurrentOrganization", + "summary": "getCurrentOrganization", + "description": "Get caller's current organization", + "tags": [ + "Organization" + ], + "responses": { + "200": { + "description": "Current organization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + } + } + } + }, + "/v2/organization/{org_id}": { + "get": { + "operationId": "getOrganization", + "summary": "getOrganization", + "description": "Get an organization", + "tags": [ + "Organization" + ], + "parameters": [ + { + "in": "path", + "name": "org_id", + "schema": { + "$ref": "#/components/schemas/OrganizationId" + }, + "required": true, + "description": "The Id of the organization." + } + ], + "responses": { + "200": { + "description": "The returned organization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + } + } + }, + "patch": { + "operationId": "updateOrganization", + "summary": "updateOrganization", + "description": "Updates an organization", + "tags": [ + "Organization" + ], + "parameters": [ + { + "in": "path", + "name": "org_id", + "schema": { + "$ref": "#/components/schemas/OrganizationId" + }, + "required": true, + "description": "The Id of the organization." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "responses": { + "200": { + "description": "The updated organization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + } + } + } + }, + "/v2/organization/{org_id}/settings": { + "get": { + "description": "Get full organization settings object", + "operationId": "getSettings", + "summary": "getSettings", + "tags": [ + "Organization Settings" + ], + "parameters": [ + { + "in": "path", + "name": "org_id", + "schema": { + "$ref": "#/components/schemas/OrganizationId" + }, + "required": true, + "description": "The Id of the organization." + } + ], + "responses": { + "200": { + "description": "Returns the organization settings", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Settings" + } + } + } + } + } + } + }, + "/v2/organization/{org_id}/settings/{key}": { + "put": { + "description": "Updates an organization setting", + "operationId": "putSettingsValue", + "summary": "putSettingsValue", + "tags": [ + "Organization Settings" + ], + "parameters": [ + { + "in": "path", + "name": "org_id", + "schema": { + "$ref": "#/components/schemas/OrganizationId" + }, + "required": true, + "description": "The Id of the organization." + }, + { + "in": "path", + "name": "key", + "schema": { + "type": "string" + }, + "required": true, + "description": "Organization setting key" + } + ], + "requestBody": { + "description": "Value to set", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SettingsValue" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the value of the setting", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SettingsValue" + } + } + } + } + } + }, + "delete": { + "description": "Updates an organization nsetting", + "operationId": "deleteSettingsValue", + "summary": "deleteSettingsValue", + "tags": [ + "Organization Settings" + ], + "parameters": [ + { + "in": "path", + "name": "org_id", + "schema": { + "$ref": "#/components/schemas/OrganizationId" + }, + "required": true, + "description": "The Id of the organization." + }, + { + "in": "path", + "name": "key", + "schema": { + "type": "string" + }, + "required": true, + "description": "Organization setting key" + } + ], + "responses": { + "200": { + "description": "Delete successful" + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + } + }, + "schemas": { + "OrganizationId": { + "type": "string", + "example": "739224" + }, + "Organization": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "name": { + "type": "string", + "description": "Organization name", + "example": "Epilot", + "nullable": true + }, + "email": { + "type": "string", + "description": "Organization contact email", + "example": "someone@epilot.cloud", + "nullable": true + }, + "phone": { + "description": "Organization contact phone", + "type": "string", + "example": "+49123123123", + "nullable": true + }, + "website": { + "description": "Organization website", + "type": "string", + "example": "https://epilot.cloud", + "nullable": true + }, + "address": { + "description": "Organization postal address", + "type": "object", + "additionalProperties": true, + "properties": { + "country": { + "type": "string", + "nullable": true + }, + "city": { + "type": "string", + "nullable": true + }, + "postal_code": { + "type": "string", + "nullable": true + }, + "street": { + "type": "string", + "nullable": true + }, + "street_number": { + "type": "string", + "nullable": true + } + } + }, + "organization_use": { + "type": "string", + "enum": [ + "Production", + "Sandbox" + ], + "nullable": true + }, + "parent_production_org_id": { + "type": "string", + "nullable": true + }, + "created_date": { + "type": "string", + "format": "date-time", + "description": "Organization created date" + }, + "logo_url": { + "description": "Organization logo URL", + "type": "string", + "example": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "nullable": true + }, + "logo_thumbnail_url": { + "description": "Organization logo thumbnail URL", + "type": "string", + "example": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "nullable": true + }, + "signature": { + "type": "string", + "description": "Default email signature of organization", + "example": "

Thanks

", + "nullable": true + }, + "is_unlicensed_org": { + "type": "boolean", + "example": false, + "nullable": true, + "deprecated": true + }, + "style": { + "type": "object", + "description": "Organization style setting (e.g. font setting)", + "additionalProperties": true, + "nullable": true, + "deprecated": true + }, + "type": { + "type": "string", + "deprecated": true, + "enum": [ + "Vendor", + "Partner" + ], + "nullable": true + }, + "symbol": { + "deprecated": true, + "type": "string", + "example": "EPI", + "nullable": true + }, + "pricing_tier": { + "deprecated": true, + "description": "Deprecated - Please use pricing tier api", + "type": "string", + "example": "professional", + "nullable": true + }, + "free_user_limit": { + "deprecated": true, + "type": "number", + "example": 50, + "nullable": true + } + } + }, + "InternalOrganization": { + "allOf": [ + { + "$ref": "#/components/schemas/Organization" + } + ] + }, + "SettingKey": { + "type": "string", + "example": "double_opt_in" + }, + "Settings": { + "type": "object", + "additionalProperties": true, + "example": { + "double_opt_in": { + "enabled": true + } + } + }, + "SettingsValue": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + { + "type": "object", + "additionalProperties": true + } + ], + "example": { + "enabled": true + } + }, + "CreateOrganizationRequest": { + "type": "object", + "properties": { + "organization_detail": { + "description": "Organization detail", + "type": "object", + "required": [ + "name", + "type", + "pricing_tier_id" + ], + "properties": { + "name": { + "description": "Organization name", + "type": "string", + "example": "epilot" + }, + "email_address": { + "description": "Organization email address", + "type": "string", + "example": "epilot@epilot.cloud" + }, + "type": { + "description": "type", + "type": "string", + "example": "Vendor" + }, + "organization_use": { + "type": "string", + "enum": [ + "Production", + "Sandbox" + ] + }, + "pricing_tier_id": { + "description": "Pricing tier ID", + "type": "string", + "example": "01GEKHZHSN19KK10ZS92Y3WY9B" + } + } + }, + "owner_user": { + "description": "Owner user will receive invitation", + "type": "object", + "required": [ + "email_address" + ], + "properties": { + "full_name": { + "type": "string", + "example": "Ny Huynh" + }, + "email_address": { + "type": "string", + "example": "ny.huynhthi@axonactive.com" + } + } + } + } + }, + "DataPointsResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataPoint" + } + }, + "DataPoint": { + "type": "object", + "properties": { + "id": { + "description": "Organization id", + "type": "number", + "example": 206801 + }, + "max_customer": { + "description": "Max customer data points last month", + "type": "number", + "example": 10 + }, + "actual_customer": { + "description": "Actual customer data points", + "type": "number", + "example": 10 + } + } + }, + "OrganizationToCleanup": { + "type": "object", + "required": [ + "org_id", + "deleted_at", + "deleted_by" + ], + "properties": { + "org_id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "example": "2021-06-01T00:00:00Z" + }, + "deleted_by": { + "type": "string", + "example": "123456" + } + } + }, + "OrganizationCleanupStatus": { + "type": "object", + "required": [ + "org_id", + "service_name" + ], + "properties": { + "org_id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "service_name": { + "type": "string", + "example": "organization-api" + }, + "operations": { + "example": [ + { + "action": "Delete", + "resource": "OrgTable", + "extra_info": "pk: ORG#739224" + }, + { + "action": "Archive", + "resource": "s3://my-bucket", + "extra_info": "my-bucket/my-key.txt" + } + ], + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "action": { + "type": "string", + "example": "Delete" + }, + "resource": { + "type": "string", + "example": "OrgTable" + }, + "extra_info": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + { + "type": "object", + "additionalProperties": true + } + ] + } + } + } + } + } + } + } + }, + "servers": [ + { + "url": "https://organization-v2.sls.epilot.io" + }, + { + "url": "https://organization-v2.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/partner-directory.json b/packages/cli/definitions/partner-directory.json new file mode 100644 index 00000000..4442b90d --- /dev/null +++ b/packages/cli/definitions/partner-directory.json @@ -0,0 +1,1718 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Partner API", + "description": "Management of Partners in epilot", + "version": "1.5.0" + }, + "tags": [ + { + "name": "partners", + "x-displayName": "Partners", + "description": "Partner operations" + }, + { + "name": "partner_users", + "x-displayName": "Partner Users", + "description": "Partner user management operations" + }, + { + "name": "partner_schema", + "x-displayName": "Partner", + "description": "\n" + } + ], + "x-tagGroups": [ + { + "name": "APIs", + "tags": [ + "partners", + "partner_users" + ] + }, + { + "name": "Schemas", + "tags": [ + "partner_schema" + ] + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "AsOrganization": [] + } + ], + "paths": { + "/v1/partners/{id}/approve": { + "post": { + "operationId": "approvePartner", + "summary": "approvePartner", + "tags": [ + "partners" + ], + "description": "Approve partner request", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/PartnerId" + }, + "required": true, + "description": "The Id of partner" + } + ], + "responses": { + "201": { + "description": "Approve successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Partner" + } + } + } + }, + "400": { + "description": "Unable to approve" + } + } + } + }, + "/v1/partners/{id}/reject": { + "post": { + "operationId": "rejectPartner", + "summary": "rejectPartner", + "tags": [ + "partners" + ], + "description": "Reject partner request", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/PartnerId" + }, + "required": true, + "description": "The Id of partner" + } + ], + "responses": { + "200": { + "description": "Invited successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Partner" + } + } + } + }, + "400": { + "description": "Unable to reject" + } + } + } + }, + "/v1/partners/assignables:search": { + "post": { + "operationId": "searchAssignable", + "summary": "searchAssignables", + "description": "Search for assignable users/organizations from this organization and Partners\n\nResults can include:\n - Users in your organization\n - Users in partner organizations\n - Partner organizations\n", + "tags": [ + "partners" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "q": { + "description": "search query to filter results", + "type": "string", + "default": "" + }, + "from": { + "description": "start results from an offset for pagination", + "type": "integer", + "minimum": 0, + "default": 0 + }, + "size": { + "description": "limit number of results to return", + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 25 + }, + "org_ids": { + "description": "filter results to specific organizations. defaults to all orgs", + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationId" + } + }, + "portalUsersEntityIdScope": { + "description": "Optional parameter if 'types' contains 'ecp' type user. Portal Users will only be fetched in the context of an entity, fetching the related ones through relations and not returning placeholders anymore.", + "type": "string", + "default": "" + }, + "types": { + "description": "filter results to specific types of assignables. defaults to all types", + "type": "array", + "default": [ + "user", + "partner_user", + "partner_organization", + "ecp", + "group" + ], + "items": { + "type": "string", + "enum": [ + "user", + "partner_user", + "partner_organization", + "ecp", + "group", + "parent_organization_user" + ] + } + } + }, + "required": [ + "q" + ] + } + } + } + }, + "responses": { + "200": { + "description": "List of assignable results", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hits": { + "description": "total number of search results", + "type": "integer", + "example": 25 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Assignable" + } + } + } + } + } + } + } + } + } + }, + "/v1/partners/assignables:batchGet": { + "post": { + "operationId": "batchGetAssignable", + "summary": "batchGet", + "description": "Search for assignable users from this organization by its ids\n", + "tags": [ + "partners" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "minItems": 1, + "type": "object", + "properties": { + "user_id": { + "description": "user id of assignable", + "type": "string" + }, + "org_id": { + "description": "organization id of assignable (optional, defaults to caller org)", + "type": "string" + }, + "group_id": { + "description": "group id of assignable (optional)", + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "List of assignable results", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hits": { + "description": "total number of search results", + "type": "integer", + "example": 25 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Assignable" + } + } + } + } + } + } + } + } + } + }, + "/v1/partner-directory/public/getPartnerByToken": { + "get": { + "operationId": "getPartnerByToken", + "summary": "getPartnerByToken", + "description": "Get partner by token", + "security": [], + "tags": [ + "partners" + ], + "parameters": [ + { + "in": "query", + "name": "token", + "schema": { + "$ref": "#/components/schemas/InviteToken" + }, + "required": true, + "description": "Invite Token" + } + ], + "responses": { + "200": { + "description": "Partner", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Partner" + } + } + } + }, + "404": { + "description": "Token not found for the partner" + } + } + } + }, + "/v1/partner-directory/public/activate": { + "post": { + "operationId": "activatePartner", + "summary": "activatePartner", + "description": "Activate partner using an invite token", + "security": [], + "tags": [ + "partners" + ], + "parameters": [ + { + "name": "token", + "description": "Invite Token", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/InviteToken" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivatePartnerPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Activated successfully" + }, + "404": { + "description": "Token not found for the partner" + } + } + } + }, + "/v1/geolocation/text:search": { + "post": { + "operationId": "searchGeolocationForText", + "summary": "searchGeolocationForText", + "tags": [ + "partners" + ], + "description": "Converts a given string, in the format of an address, to geo-location latitude and longitude", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchGeolocation" + } + } + } + }, + "responses": { + "200": { + "description": "Geo-location converted from text", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Geolocation" + } + } + } + }, + "400": { + "description": "No text provided" + }, + "404": { + "description": "No geo-location found for text" + } + } + } + }, + "/v2/partners/{id}/invite": { + "post": { + "operationId": "invitePartnerV2", + "summary": "invitePartnerV2", + "tags": [ + "partners" + ], + "description": "Invite a partner into collaboration. It will send an email to partner and ask to join into collaboration", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/PartnerId" + }, + "required": true, + "description": "The Id of partner" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PartnerInvitationPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Invited successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Partner" + } + } + } + }, + "400": { + "description": "Unable to invite" + } + } + } + }, + "/v2/partners/{orgId}/users": { + "get": { + "operationId": "getPartnerUsers", + "summary": "getPartnerUsers", + "tags": [ + "partner_users" + ], + "description": "Get all users for a partner organization with their roles", + "parameters": [ + { + "in": "path", + "name": "orgId", + "schema": { + "$ref": "#/components/schemas/OrganizationId" + }, + "required": true, + "description": "The organization ID of the partner" + } + ], + "responses": { + "200": { + "description": "List of partner users with roles", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PartnerUser" + } + } + } + } + } + } + }, + "400": { + "description": "Unable to fetch partner users" + }, + "500": { + "description": "Internal server error" + } + } + }, + "post": { + "operationId": "createPartnerUser", + "summary": "createPartnerUser", + "tags": [ + "partner_users" + ], + "description": "Create a new user in a partner organization", + "parameters": [ + { + "in": "path", + "name": "orgId", + "schema": { + "$ref": "#/components/schemas/OrganizationId" + }, + "required": true, + "description": "The Partner organization ID where the user should be created" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePartnerUserPayload" + } + } + } + }, + "responses": { + "201": { + "description": "User created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "400": { + "description": "Unable to create partner user" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v2/partners/{orgId}/users/{userId}": { + "delete": { + "operationId": "deletePartnerUser", + "summary": "deletePartnerUser", + "tags": [ + "partner_users" + ], + "description": "Delete a user from a partner organization", + "parameters": [ + { + "in": "path", + "name": "orgId", + "schema": { + "$ref": "#/components/schemas/OrganizationId" + }, + "required": true, + "description": "The organization ID of the partner" + }, + { + "in": "path", + "name": "userId", + "schema": { + "type": "string" + }, + "required": true, + "description": "The user ID to delete" + } + ], + "responses": { + "200": { + "description": "User deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "Unable to delete partner user" + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v2/partners/{orgId}/roles": { + "get": { + "operationId": "getPartnerRoles", + "summary": "getPartnerRoles", + "tags": [ + "partner_users" + ], + "description": "Get all roles for a partner organization", + "parameters": [ + { + "in": "path", + "name": "orgId", + "schema": { + "$ref": "#/components/schemas/OrganizationId" + }, + "required": true, + "description": "The organization ID of the partner" + } + ], + "responses": { + "200": { + "description": "List of partner roles", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PartnerRole" + } + } + } + } + } + } + }, + "400": { + "description": "Unable to fetch partner roles" + }, + "500": { + "description": "Internal server error" + } + } + }, + "post": { + "operationId": "createPartnerRole", + "summary": "createPartnerRole", + "tags": [ + "partner_users" + ], + "description": "Create a role for a partner organization", + "parameters": [ + { + "in": "path", + "name": "orgId", + "schema": { + "$ref": "#/components/schemas/OrganizationId" + }, + "required": true, + "description": "The organization ID of the partner" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePartnerRolePayload" + } + } + } + }, + "responses": { + "201": { + "description": "Role created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PartnerRole" + } + } + } + }, + "400": { + "description": "Unable to create partner role" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v2/partners/{orgId}/roles/{roleId}": { + "put": { + "operationId": "updatePartnerRole", + "summary": "updatePartnerRole", + "tags": [ + "partner_users" + ], + "description": "Update a role for a partner organization", + "parameters": [ + { + "in": "path", + "name": "orgId", + "schema": { + "$ref": "#/components/schemas/OrganizationId" + }, + "required": true, + "description": "The organization ID of the partner" + }, + { + "in": "path", + "name": "roleId", + "schema": { + "type": "string" + }, + "required": true, + "description": "The role ID to update" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePartnerRolePayload" + } + } + } + }, + "responses": { + "200": { + "description": "Role updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PartnerRole" + } + } + } + }, + "400": { + "description": "Unable to update partner role" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/v2/partners/{orgId}/users/{userId}/roles": { + "post": { + "operationId": "assignPartnerUserRoles", + "summary": "assignPartnerUserRoles", + "tags": [ + "partner_users" + ], + "description": "Assign roles to a user in a partner organization", + "parameters": [ + { + "in": "path", + "name": "orgId", + "schema": { + "$ref": "#/components/schemas/OrganizationId" + }, + "required": true, + "description": "The organization ID of the partner" + }, + { + "in": "path", + "name": "userId", + "schema": { + "type": "string" + }, + "required": true, + "description": "The user ID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignRolesPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Roles assigned successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "roleId": { + "type": "string" + }, + "success": { + "type": "boolean" + }, + "data": { + "type": "object" + }, + "error": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Unable to assign roles" + }, + "500": { + "description": "Internal server error" + } + } + }, + "delete": { + "operationId": "unassignPartnerUserRoles", + "summary": "unassignPartnerUserRoles", + "tags": [ + "partner_users" + ], + "description": "Unassign roles from a user in a partner organization", + "parameters": [ + { + "in": "path", + "name": "orgId", + "schema": { + "$ref": "#/components/schemas/OrganizationId" + }, + "required": true, + "description": "The organization ID of the partner" + }, + { + "in": "path", + "name": "userId", + "schema": { + "type": "string" + }, + "required": true, + "description": "The user ID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignRolesPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Roles unassigned successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "roleId": { + "type": "string" + }, + "success": { + "type": "boolean" + }, + "data": { + "type": "object" + }, + "error": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Unable to unassign roles" + }, + "500": { + "description": "Internal server error" + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "AsOrganization": { + "type": "apiKey", + "in": "header", + "name": "x-ivy-org-id", + "description": "Set organization id when using internal auth" + } + }, + "schemas": { + "InviteToken": { + "type": "string" + }, + "Partner": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/PartnerId" + }, + "organization_id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "created_at": { + "type": "string", + "example": "2022-02-08T04:44:32.246Z" + }, + "description": { + "type": "string", + "description": "Description", + "example": "Description" + }, + "company_name": { + "type": "string", + "description": "Company name", + "example": "Company name" + }, + "invitation_token": { + "description": "Invitation token", + "type": "string" + }, + "invitation_email": { + "deprecated": true, + "description": "Email using to receive invitation", + "type": "string", + "format": "email" + }, + "email": { + "description": "Email using to receive invitation", + "type": "string", + "format": "email" + }, + "owner_email": { + "description": "A separate email where the invitation should be sent", + "type": "string", + "format": "email" + }, + "signed_up_email": { + "description": "Email using to sign up", + "type": "string", + "format": "email" + }, + "partner_org_id": { + "description": "Target Organization", + "type": "string", + "example": 123456 + }, + "status": { + "type": "string", + "enum": [ + "Pending", + "Request", + "Deleted", + "Invited", + "Rejected" + ] + } + } + }, + "PartnerId": { + "type": "string", + "example": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc" + }, + "OrganizationId": { + "type": "string", + "example": "123" + }, + "ActivatePartnerPayload": { + "type": "object", + "properties": { + "company_name": { + "type": "string", + "description": "Company name", + "example": "Company name" + }, + "signed_up_email": { + "description": "Email using to sign up", + "type": "string", + "format": "email" + }, + "organization_id": { + "description": "organization id", + "type": "string" + } + }, + "required": [ + "signed_up_email", + "organization_id" + ] + }, + "PartnerInvitationPayload": { + "type": "object", + "properties": { + "language": { + "type": "string", + "description": "Language for partner invitation email", + "enum": [ + "en", + "de" + ], + "default": "en" + } + } + }, + "Assignable": { + "oneOf": [ + { + "$ref": "#/components/schemas/AssignableUser" + }, + { + "$ref": "#/components/schemas/AssignablePartnerUser" + }, + { + "$ref": "#/components/schemas/AssignableOrganization" + }, + { + "$ref": "#/components/schemas/AssignableEcpPlaceholder" + }, + { + "$ref": "#/components/schemas/AssignableGroup" + } + ] + }, + "BaseAssignable": { + "type": "object", + "properties": { + "type": { + "type": "string", + "example": "user" + }, + "display_name": { + "type": "string", + "example": "Example User" + }, + "image_uri": { + "type": "object", + "properties": { + "original": { + "type": "string", + "format": "uri", + "example": "https://epilot-staging-user-content.s3.eu-central-1.amazonaws.com/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png" + }, + "thumbnail_32": { + "type": "string", + "format": "uri", + "example": "https://file.sls.epilot.io/v1/files/public/preview?w=32&h=32&key=/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png" + } + }, + "required": [ + "original" + ] + }, + "org_id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "created_at": { + "type": "string", + "example": "2022-02-08T04:44:32.246Z" + }, + "activated_at": { + "type": "string", + "example": "2022-02-08T04:44:32.246Z" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Pending", + "Deactivated", + "Deleted" + ] + } + }, + "required": [ + "type", + "display_name", + "org_id" + ] + }, + "AssignableUser": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAssignable" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "user" + ], + "example": "user" + }, + "display_name": { + "type": "string", + "example": "Example User" + }, + "user_id": { + "type": "string", + "example": "456" + }, + "email": { + "type": "string", + "example": "example@example.com" + } + } + } + ] + }, + "AssignablePartnerUser": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAssignable" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "partner_user" + ], + "example": "partner_user" + }, + "display_name": { + "type": "string", + "example": "Example Partner User" + }, + "partner_id": { + "$ref": "#/components/schemas/PartnerId" + }, + "user_id": { + "type": "string", + "example": "456" + }, + "email": { + "type": "string", + "example": "example@example.com" + } + } + } + ] + }, + "AssignableGroup": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAssignable" + }, + { + "type": "object", + "properties": { + "group_id": { + "type": "string", + "example": "456" + } + } + } + ] + }, + "AssignableOrganization": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAssignable" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "partner_organization" + ], + "example": "partner_organization" + }, + "display_name": { + "type": "string", + "example": "Example Partner Organization" + }, + "partner_id": { + "$ref": "#/components/schemas/PartnerId" + }, + "email": { + "type": "string", + "example": "Email of Partner Organization" + }, + "geolocations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressGeolocation" + } + }, + "phone": { + "type": "string", + "example": "Phone number of Partner" + }, + "activity_radius": { + "type": "number", + "description": "Activity radius, in km, the partner is operating in", + "example": 50 + } + }, + "required": [ + "type", + "display_name", + "partner_id" + ] + } + ] + }, + "AssignableEcpPlaceholder": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAssignable" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ecp" + ], + "example": "ecp" + }, + "display_name": { + "type": "string", + "example": "Example Ecp Placeholder" + }, + "user_id": { + "type": "string", + "example": "456" + }, + "email": { + "type": "string", + "example": "Email of ECP Placeholder" + } + }, + "required": [ + "type", + "display_name", + "user_id" + ] + } + ] + }, + "SearchGeolocation": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "Address text to convert into geolocation coordinates", + "example": "Auweg 1, 93055 Regensburg, DE" + } + }, + "required": [ + "address" + ] + }, + "Geolocation": { + "type": "object", + "properties": { + "lat": { + "type": "number", + "description": "Latitude", + "example": 49.013 + }, + "lng": { + "type": "number", + "description": "Longitude", + "example": 12.101 + }, + "addressLabel": { + "type": "string", + "description": "Full address label as returned by the location service" + }, + "relevance": { + "type": "number", + "description": "Relevance of the result. A number between 0 and 1. Closer to 1 means more relevant" + } + }, + "required": [ + "lat", + "lng" + ] + }, + "Address": { + "type": "object", + "properties": { + "street": { + "type": "string", + "description": "Street", + "example": "Auweg" + }, + "street_number": { + "type": "string", + "description": "Street", + "example": "10" + }, + "city": { + "type": "string", + "description": "City", + "example": "Regensburg" + }, + "postal_code": { + "type": "string", + "description": "Postal code", + "example": "93055" + }, + "country": { + "type": "string", + "description": "Country", + "example": "DE" + } + } + }, + "AddressGeolocation": { + "type": "object", + "allOf": [ + { + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/Address" + } + } + }, + { + "$ref": "#/components/schemas/Geolocation" + } + ], + "required": [ + "address" + ] + }, + "PartnerUser": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "User ID", + "example": "456" + }, + "name": { + "type": "string", + "description": "User name", + "example": "John Doe" + }, + "email": { + "type": "string", + "format": "email", + "description": "User email", + "example": "user@example.com" + }, + "status": { + "type": "string", + "description": "User status", + "example": "Active" + }, + "image": { + "type": "object", + "properties": { + "original": { + "type": "string", + "format": "uri", + "description": "Original image URI" + }, + "thumbnail_32": { + "type": "string", + "format": "uri", + "description": "Thumbnail image URI (32x32)" + } + } + }, + "roles": { + "type": "array", + "description": "List of roles assigned to the user", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Role ID", + "example": "role-123" + }, + "slug": { + "type": "string", + "description": "Role slug", + "example": "admin" + }, + "name": { + "type": "string", + "description": "Role name", + "example": "Administrator" + } + }, + "required": [ + "id", + "slug", + "name" + ] + } + } + }, + "required": [ + "id", + "email", + "status", + "roles" + ] + }, + "CreatePartnerUserPayload": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "description": "User email address", + "example": "user@example.com" + }, + "language": { + "type": "string", + "enum": [ + "en", + "de" + ], + "description": "User language", + "example": "en" + }, + "roles": { + "type": "array", + "description": "Role IDs that should be automatically assigned to this user upon creation", + "items": { + "type": "string" + }, + "example": [ + "role-123", + "role-456" + ] + } + }, + "required": [ + "email" + ] + }, + "CreatePartnerRolePayload": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Role name", + "example": "Partner Admin" + }, + "slug": { + "type": "string", + "description": "Role slug", + "example": "partner_admin" + }, + "grants": { + "type": "array", + "description": "Permission grants for the role", + "items": { + "$ref": "#/components/schemas/GrantWithDependencies" + } + } + }, + "required": [ + "name", + "slug", + "grants" + ] + }, + "UpdatePartnerRolePayload": { + "allOf": [ + { + "properties": { + "grants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantWithDependencies" + } + } + } + }, + { + "$ref": "#/components/schemas/BaseRoleForCreate" + } + ] + }, + "Grant": { + "type": "object", + "properties": { + "action": { + "type": "string", + "example": "entity-read" + }, + "resource": { + "type": "string", + "example": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947" + }, + "effect": { + "type": "string", + "default": "allow", + "enum": [ + "allow", + "deny" + ] + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantCondition" + } + } + }, + "required": [ + "action" + ] + }, + "GrantWithDependencies": { + "allOf": [ + { + "$ref": "#/components/schemas/Grant" + }, + { + "type": "object", + "properties": { + "dependencies": { + "description": "Provided additional dependencies, exploded when storing the role", + "type": "array", + "items": { + "$ref": "#/components/schemas/Grant" + } + } + } + } + ] + }, + "GrantCondition": { + "allOf": [ + { + "description": "An additional condition that must be met for the grant", + "type": "object", + "required": [ + "operation" + ] + }, + { + "anyOf": [ + { + "$ref": "#/components/schemas/EqualsCondition" + } + ] + } + ] + }, + "EqualsCondition": { + "description": "Check if attribute equals to any of the values", + "type": "object", + "properties": { + "attribute": { + "type": "string", + "example": "workflows.primary.task_name" + }, + "operation": { + "type": "string", + "enum": [ + "equals" + ] + }, + "values": { + "type": "array", + "items": { + "example": "Qualification" + } + } + }, + "required": [ + "attribute", + "operation", + "values" + ] + }, + "RoleId": { + "type": "string", + "example": "123:owner", + "description": "Format: :" + }, + "BaseRoleForCreate": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/RoleId" + }, + "name": { + "type": "string", + "example": "Owner", + "description": "Human-friendly name for the role" + }, + "slug": { + "type": "string", + "example": "owner", + "description": "URL-friendly name for the role" + }, + "grants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Grant" + }, + "description": "List of grants (permissions) applied to the role" + } + }, + "required": [ + "name", + "slug", + "grants" + ] + }, + "PartnerRole": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Role ID", + "example": "role-123" + }, + "slug": { + "type": "string", + "description": "Role slug", + "example": "admin" + }, + "name": { + "type": "string", + "description": "Role name", + "example": "Administrator" + }, + "type": { + "type": "string", + "description": "Role type", + "example": "share_role" + } + }, + "required": [ + "id", + "slug", + "name" + ] + }, + "AssignRolesPayload": { + "type": "object", + "properties": { + "roleIds": { + "type": "array", + "description": "Array of role IDs to assign/unassign", + "items": { + "type": "string" + }, + "example": [ + "role-123", + "role-456" + ] + } + }, + "required": [ + "roleIds" + ] + }, + "User": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "User ID", + "example": "456" + }, + "email": { + "type": "string", + "format": "email", + "description": "User email", + "example": "user@example.com" + }, + "display_name": { + "type": "string", + "description": "User display name", + "example": "John Doe" + }, + "status": { + "type": "string", + "description": "User status", + "example": "Active" + } + } + } + } + }, + "servers": [ + { + "url": "https://partner-directory-api.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/permissions.json b/packages/cli/definitions/permissions.json new file mode 100644 index 00000000..0a40dab7 --- /dev/null +++ b/packages/cli/definitions/permissions.json @@ -0,0 +1,1480 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Permissions API", + "version": "1.2.0", + "description": "Flexible Role-based Access Control for epilot" + }, + "tags": [ + { + "name": "Roles", + "description": "Manage roles and grants" + }, + { + "name": "Assignments", + "description": "Assign roles to users" + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "paths": { + "/v1/permissions/me": { + "get": { + "operationId": "listCurrentRoles", + "summary": "listCurrentRoles", + "description": "Returns roles and grants assigned to current user", + "tags": [ + "Roles" + ], + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + } + } + } + } + } + } + }, + "/v1/permissions/roles": { + "get": { + "operationId": "listAllRoles", + "summary": "listAllRoles", + "description": "Returns list of all roles in organization", + "tags": [ + "Roles" + ], + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createRole", + "summary": "createRole", + "description": "Create role", + "tags": [ + "Roles" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateRolePayload" + } + } + } + }, + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + }, + "400": { + "description": "Invalid role configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "examples": { + "parent_role_invalid_type": { + "summary": "Parent role must be org_role or share_role", + "value": { + "message": "Parent role must be org_role or share_role, got user_role" + } + }, + "parent_role_different_org": { + "summary": "Parent org_role must be in the same organization", + "value": { + "message": "Parent org_role must be in the same organization" + } + }, + "parent_role_max_hierarchy": { + "summary": "Parent role cannot itself have a parent", + "value": { + "message": "Parent role cannot itself have a parent (max 2 levels of hierarchy)" + } + }, + "circular_dependency_self": { + "summary": "Role cannot be its own parent", + "value": { + "message": "Role cannot be its own parent" + } + }, + "circular_dependency_detected": { + "summary": "Circular dependency detected", + "value": { + "message": "Circular dependency detected: role 123:child would create a cycle" + } + } + } + } + } + }, + "404": { + "description": "Parent role does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "examples": { + "parent_role_not_found": { + "summary": "Parent role does not exist", + "value": { + "message": "Parent role 123:nonexistent does not exist" + } + } + } + } + } + } + } + } + }, + "/v1/permissions/roles:search": { + "post": { + "operationId": "searchRoles", + "summary": "searchRoles", + "description": "Search Roles", + "tags": [ + "Roles" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleSearchInput" + } + } + } + }, + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hits": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + } + } + } + } + } + } + }, + "/v1/permissions/roles/{roleId}": { + "get": { + "operationId": "getRole", + "summary": "getRole", + "description": "Get role by id", + "tags": [ + "Roles" + ], + "parameters": [ + { + "name": "roleId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/RoleId" + } + } + ], + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + } + } + }, + "put": { + "operationId": "putRole", + "summary": "putRole", + "description": "Create or update role", + "tags": [ + "Roles" + ], + "parameters": [ + { + "name": "roleId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/RoleId" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RolePayload" + }, + "x-examples": { + "User role: manager": { + "description": "Example manager role", + "value": { + "id": "123:manager", + "name": "Manager", + "slug": "manager", + "type": "user_role", + "organization_id": "123", + "grants": [ + { + "action": "entity:view", + "resource": "*" + }, + { + "action": "entity:update", + "resource": "*" + }, + { + "action": "user:view" + }, + { + "action": "user:invite" + }, + { + "action": "role:view" + }, + { + "action": "role:create" + }, + { + "action": "role:assign" + }, + { + "action": "entity:view", + "resource": "file:*", + "conditions": [ + { + "attribute": "_tags", + "operation": "equals", + "values": [ + "offer", + "contract" + ] + } + ] + }, + { + "action": "message:view", + "dependencies": [ + { + "action": "entity:view", + "resource": "message*" + }, + { + "action": "entity:view", + "resource": "thread*" + } + ] + }, + { + "action": "message:send", + "dependencies": [ + { + "action": "entity:*", + "resource": "message*" + }, + { + "action": "entity:*", + "resource": "thread*" + } + ] + }, + { + "action": "workflow:*" + } + ] + } + }, + "User role: employee": { + "description": "Example employee role", + "value": { + "id": "123:employee", + "name": "Employee", + "slug": "employee", + "type": "user_role", + "organization_id": "123", + "grants": [ + { + "action": "entity:view", + "resource": "*" + }, + { + "action": "entity:update", + "resource": "*" + }, + { + "action": "user:view" + }, + { + "action": "message:view", + "dependencies": [ + { + "action": "entity:view", + "resource": "message*" + }, + { + "action": "entity:view", + "resource": "thread*" + } + ] + }, + { + "action": "message:send", + "dependencies": [ + { + "action": "entity:*", + "resource": "message*" + }, + { + "action": "entity:*", + "resource": "thread*" + } + ] + }, + { + "action": "workflow:execution:*" + } + ] + } + }, + "User role: administrator": { + "description": "Example administrator role", + "value": { + "id": "123:administrator", + "name": "Administrator", + "slug": "administrator", + "type": "user_role", + "organization_id": "123", + "grants": [ + { + "action": "*", + "resource": "*" + } + ] + } + }, + "Organization root role": { + "description": "Example organization root role. Must be satisifed for all org queries.", + "value": { + "id": "123:root", + "name": "Organization root role", + "slug": "root", + "type": "org_role", + "organization_id": "123", + "grants": [ + { + "action": "*", + "resource": "*" + }, + { + "action": "webhook:*", + "effect": "deny" + } + ] + } + }, + "Share role": { + "description": "Example share role. This can be assigned to users in other organizations", + "value": { + "id": "123:example_share_role", + "name": "Example opportunity share role", + "slug": "example_share_role", + "type": "share_role", + "organization_id": "123", + "grants": [ + { + "action": "entity:view", + "resource": "opportunity:123456" + }, + { + "action": "entity:edit", + "resource": "opportunity:123456" + }, + { + "action": "workflow:execution:*" + }, + { + "action": "message:*" + }, + { + "action": "entity:*", + "resource": "message*" + }, + { + "action": "entity:*", + "resource": "thread*" + } + ] + } + }, + "Partner role": { + "description": "Example partner role. This can be given to a partner organization, who can then assign it to their users", + "value": { + "id": "123:example_partner_role", + "name": "Example opportunity share role", + "slug": "example_partner_role", + "type": "partner_role", + "organization_id": "123", + "partner_org_id": "456", + "grants": [ + { + "action": "entity:view", + "resource": "opportunity*" + }, + { + "action": "entity:edit", + "resource": "opportunity*" + }, + { + "action": "workflow:execution:*" + }, + { + "action": "message:*" + }, + { + "action": "entity:*", + "resource": "message*" + }, + { + "action": "entity:*", + "resource": "thread*" + } + ] + } + }, + "Portal role": { + "description": "Example portal role. Implicitly used by end users of portals", + "value": { + "id": "123:default_end_customer_portal_role", + "name": "Default End Customer Portal Role", + "slug": "default_end_customer_portal_role", + "type": "portal_role", + "organization_id": "123", + "grants": [ + { + "action": "entity:attribute:view", + "resource": "contact:*/*" + }, + { + "action": "entity:edit", + "resource": "opportunity*" + } + ] + } + }, + "User role with parent": { + "description": "Example user role that inherits from a parent role", + "value": { + "id": "123:limited_manager", + "name": "Limited Manager", + "slug": "limited_manager", + "type": "user_role", + "organization_id": "123", + "parent_role": "123:manager", + "grants": [ + { + "action": "entity:view", + "resource": "contact:*" + }, + { + "action": "entity:edit", + "resource": "contact:*" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + }, + "400": { + "description": "Bad Request - Invalid role configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "examples": { + "parent_role_invalid_type": { + "summary": "Parent role must be org_role or share_role", + "value": { + "message": "Parent role must be org_role or share_role, got user_role" + } + }, + "parent_role_different_org": { + "summary": "Parent org_role must be in the same organization", + "value": { + "message": "Parent org_role must be in the same organization" + } + }, + "parent_role_max_hierarchy": { + "summary": "Parent role cannot itself have a parent", + "value": { + "message": "Parent role cannot itself have a parent (max 2 levels of hierarchy)" + } + }, + "circular_dependency_self": { + "summary": "Role cannot be its own parent", + "value": { + "message": "Role cannot be its own parent" + } + }, + "circular_dependency_detected": { + "summary": "Circular dependency detected", + "value": { + "message": "Circular dependency detected: role 123:child would create a cycle" + } + } + } + } + } + }, + "404": { + "description": "Not Found - Parent role does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "examples": { + "parent_role_not_found": { + "summary": "Parent role does not exist", + "value": { + "message": "Parent role 123:nonexistent does not exist" + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "deleteRole", + "summary": "deleteRole", + "description": "Delete role by id", + "tags": [ + "Roles" + ], + "parameters": [ + { + "name": "roleId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/RoleId" + } + } + ], + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + } + } + } + }, + "/v1/permissions/refresh": { + "get": { + "operationId": "refreshPermissions", + "summary": "refreshPermissions", + "description": "Makes sure the user has a role in the organization", + "tags": [ + "Roles" + ], + "responses": { + "200": { + "description": "Refreshed succesfully" + } + } + } + }, + "/v1/permissions/assignments/{userId}": { + "get": { + "operationId": "getAssignedRolesForUser", + "summary": "getAssignedRolesForUser", + "description": "Get list of assigned roles by user id", + "tags": [ + "Assignments" + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/UserId" + } + } + ], + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Assignments" + } + } + } + } + } + }, + "put": { + "operationId": "assignRoles", + "summary": "assignRoles", + "description": "Assign / unassign roles to users.", + "tags": [ + "Assignments" + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/UserId" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Assignments" + } + } + } + }, + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Assignments" + } + } + } + } + } + } + }, + "/v1/permissions/assignments/{userId}/{roleId}": { + "post": { + "operationId": "addAssignment", + "summary": "addAssignment", + "description": "Assign a user to a role.\n\nUse the `x-epilot-org-id` header to assign share roles to users in other orgs\n", + "tags": [ + "Assignments" + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/UserId" + } + }, + { + "name": "roleId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/RoleId" + } + } + ], + "responses": { + "201": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Assignment" + } + } + } + } + } + }, + "delete": { + "operationId": "removeAssignment", + "summary": "removeAssignment", + "description": "Remove role assignment from user", + "tags": [ + "Assignments" + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/UserId" + } + }, + { + "name": "roleId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/RoleId" + } + } + ], + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Assignment" + } + } + } + } + } + } + }, + "/v1/permissions/assignments": { + "get": { + "operationId": "listAllAssignments", + "summary": "listAllAssignments", + "description": "Returns list of all assignments in organization", + "tags": [ + "Assignments" + ], + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Assignment" + } + } + } + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotOrg": { + "description": "Overrides the target organization to allow shared tenantaccess", + "name": "x-epilot-org-id", + "in": "header", + "type": "apiKey" + } + }, + "schemas": { + "Grant": { + "type": "object", + "properties": { + "action": { + "type": "string", + "example": "entity-read" + }, + "resource": { + "type": "string", + "example": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947" + }, + "effect": { + "type": "string", + "default": "allow", + "enum": [ + "allow", + "deny" + ] + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantCondition" + } + } + }, + "required": [ + "action" + ] + }, + "GrantWithDependencies": { + "allOf": [ + { + "$ref": "#/components/schemas/Grant" + }, + { + "type": "object", + "properties": { + "dependencies": { + "description": "Provided additional dependencies, exploded when storing the role", + "type": "array", + "items": { + "$ref": "#/components/schemas/Grant" + } + } + } + } + ] + }, + "GrantCondition": { + "allOf": [ + { + "description": "An additional condition that must be met for the grant", + "type": "object", + "required": [ + "operation" + ] + }, + { + "anyOf": [ + { + "$ref": "#/components/schemas/EqualsCondition" + } + ] + } + ] + }, + "EqualsCondition": { + "description": "Check if attribute equals to any of the values", + "type": "object", + "properties": { + "attribute": { + "type": "string", + "example": "workflows.primary.task_name" + }, + "operation": { + "type": "string", + "enum": [ + "equals" + ] + }, + "values": { + "type": "array", + "items": { + "example": "Qualification" + } + } + }, + "required": [ + "attribute", + "operation", + "values" + ] + }, + "RoleId": { + "type": "string", + "example": "123:owner", + "description": "Format: :" + }, + "BaseRole": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/RoleId" + }, + "name": { + "type": "string", + "example": "Owner", + "description": "Human-friendly name for the role" + }, + "slug": { + "type": "string", + "example": "owner", + "description": "URL-friendly name for the role" + }, + "type": { + "type": "string", + "description": "Type of the role" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "example": "2028-07-21T17:32:28Z", + "description": "date and time then the role will expire" + }, + "organization_id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "grants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Grant" + }, + "description": "List of grants (permissions) applied to the role" + } + }, + "required": [ + "id", + "name", + "slug", + "type", + "organization_id", + "grants" + ] + }, + "BaseRoleForCreate": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/RoleId" + }, + "name": { + "type": "string", + "example": "Owner", + "description": "Human-friendly name for the role" + }, + "slug": { + "type": "string", + "example": "owner", + "description": "URL-friendly name for the role" + }, + "type": { + "type": "string", + "description": "Type of the role" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "example": "2028-07-21T17:32:28Z", + "description": "date and time then the role will expire" + }, + "organization_id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "grants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Grant" + }, + "description": "List of grants (permissions) applied to the role" + } + }, + "required": [ + "name", + "slug", + "type", + "grants" + ] + }, + "UserRole": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseRole" + }, + { + "description": "A standard user role. Must be explicitly assigned to users.", + "properties": { + "type": { + "enum": [ + "user_role" + ] + }, + "parent_role": { + "allOf": [ + { + "$ref": "#/components/schemas/RoleId" + }, + { + "description": "Optional parent role that this role inherits from. Must be an `org_role` or `share_role`." + } + ] + } + } + } + ] + }, + "OrgRole": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseRole" + }, + { + "description": "A role automatically applied to all users in an organization.", + "properties": { + "type": { + "enum": [ + "org_role" + ] + }, + "pricing_tier": { + "type": "string", + "description": "The pricing tier of the organization this root role is based on", + "example": "Professional" + } + } + } + ] + }, + "ShareRole": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseRole" + }, + { + "description": "A role that can be assigned to users in other organizations for sharing purposes.", + "properties": { + "type": { + "enum": [ + "share_role" + ] + } + } + } + ] + }, + "PartnerRole": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseRole" + }, + { + "description": "A role that appears in another organization's role list that can be assigned but not modified by the partner organization.", + "properties": { + "type": { + "enum": [ + "partner_role" + ] + }, + "partner_org_id": { + "allOf": [ + { + "description": "Partner organization who can assign this role to their users." + }, + { + "$ref": "#/components/schemas/OrganizationId" + } + ] + }, + "vendor_enforced_user_limit": { + "type": "integer", + "readOnly": true, + "description": "Maximum number of users that can be assigned this role (vendor-enforced limit, can only be set via internal auth)" + } + } + } + ] + }, + "PortalRole": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseRole" + }, + { + "description": "A role that is applied to end customers and installers using the Portals", + "properties": { + "type": { + "enum": [ + "portal_role" + ] + } + } + } + ] + }, + "Role": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserRole" + }, + { + "$ref": "#/components/schemas/OrgRole" + }, + { + "$ref": "#/components/schemas/ShareRole" + }, + { + "$ref": "#/components/schemas/PartnerRole" + }, + { + "$ref": "#/components/schemas/PortalRole" + } + ] + }, + "RolePayload": { + "allOf": [ + { + "properties": { + "grants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantWithDependencies" + } + } + } + }, + { + "oneOf": [ + { + "$ref": "#/components/schemas/UserRole" + }, + { + "$ref": "#/components/schemas/OrgRole" + }, + { + "$ref": "#/components/schemas/ShareRole" + }, + { + "$ref": "#/components/schemas/PartnerRole" + }, + { + "$ref": "#/components/schemas/PortalRole" + } + ] + } + ] + }, + "Assignment": { + "type": "object", + "description": "A role attached to an user", + "properties": { + "user_id": { + "$ref": "#/components/schemas/UserId" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleId" + } + } + } + }, + "InternalAssignment": { + "type": "object", + "description": "A role attached to an user", + "properties": { + "userId": { + "$ref": "#/components/schemas/UserId" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleId" + } + } + } + }, + "OrgAssignments": { + "type": "object", + "description": "All roles attached to an users of an organization", + "properties": { + "organizationId": { + "$ref": "#/components/schemas/OrganizationId" + }, + "assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InternalAssignment" + } + } + } + }, + "OrgRoles": { + "type": "object", + "description": "All roles attached to an users of an organization", + "properties": { + "organizationId": { + "$ref": "#/components/schemas/OrganizationId" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + }, + "Assignments": { + "type": "array", + "description": "List of role ids attached to an user", + "items": { + "$ref": "#/components/schemas/RoleId" + } + }, + "UserId": { + "type": "string", + "example": "1", + "description": "Id of a user" + }, + "OrganizationId": { + "type": "string", + "example": "123", + "description": "Id of an organization" + }, + "Slug": { + "type": "string", + "example": "owner", + "description": "Slug of a role; for a role with id = 123:manager -> 123 is org_id & manager is slug" + }, + "RoleSearchInput": { + "type": "object", + "properties": { + "role_ids": { + "type": "array", + "description": "List of role ids to filter by", + "example": [ + "123:manager", + "456:owner" + ], + "items": { + "$ref": "#/components/schemas/RoleId" + } + }, + "org_ids": { + "type": "array", + "description": "List of organization ids to filter by", + "example": [ + "123", + "456" + ], + "items": { + "$ref": "#/components/schemas/OrganizationId" + } + }, + "slugs": { + "type": "array", + "description": "List of role slugs to filter by", + "example": [ + "manager", + "owner" + ], + "items": { + "$ref": "#/components/schemas/Slug" + } + }, + "query": { + "type": "string", + "description": "Input to search across fields", + "example": "Administrator" + }, + "limit": { + "type": "number", + "description": "The Number of roles to return", + "example": 1, + "minimum": 1, + "default": 50 + }, + "offset": { + "type": "number", + "description": "The number of roles to skip before starting to collect the result set", + "example": 1, + "minimum": 1, + "default": 0 + } + } + }, + "CreateRolePayload": { + "allOf": [ + { + "properties": { + "grants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantWithDependencies" + } + } + } + }, + { + "$ref": "#/components/schemas/BaseRoleForCreate" + }, + { + "oneOf": [ + { + "description": "A standard user role. Must be explicitly assigned to users.", + "properties": { + "type": { + "enum": [ + "user_role" + ] + }, + "parent_role": { + "allOf": [ + { + "$ref": "#/components/schemas/RoleId" + }, + { + "description": "Optional parent role that this role inherits from. Must be an `org_role` or a sharing role of type `share_role` or `partner_role`." + } + ] + } + } + }, + { + "description": "A role automatically applied to all users in an organization.", + "properties": { + "type": { + "enum": [ + "org_role" + ] + }, + "pricing_tier": { + "type": "string", + "description": "The pricing tier of the organization this root role is based on", + "example": "Professional" + } + } + }, + { + "description": "A role that can be assigned to users in other organizations for sharing purposes.", + "properties": { + "type": { + "enum": [ + "share_role" + ] + } + } + }, + { + "description": "A role that appears in another organization's role list that can be assigned but not modified by the partner organization.", + "properties": { + "type": { + "enum": [ + "partner_role" + ] + }, + "partner_org_id": { + "allOf": [ + { + "description": "Partner organization who can assign this role to their users." + }, + { + "$ref": "#/components/schemas/OrganizationId" + } + ] + } + } + }, + { + "description": "A role that is applied to end customers and installers using the Portals", + "properties": { + "type": { + "enum": [ + "portal_role" + ] + } + } + } + ] + } + ] + }, + "Error": { + "type": "object", + "description": "Error response", + "properties": { + "message": { + "type": "string", + "description": "Error message", + "example": "Parent role 123:nonexistent does not exist" + } + }, + "required": [ + "message" + ] + } + } + }, + "servers": [ + { + "url": "https://permissions.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/pricing-tier.json b/packages/cli/definitions/pricing-tier.json new file mode 100644 index 00000000..2e81da38 --- /dev/null +++ b/packages/cli/definitions/pricing-tier.json @@ -0,0 +1,105 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Pricing Tier API", + "version": "1.0.0", + "description": "Pricing Tier API" + }, + "tags": [ + { + "name": "Pricing Tier", + "description": "Pricing Tier" + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "paths": { + "/v2/pricing-tiers/me": { + "get": { + "operationId": "getCurrentPricingTier", + "summary": "getCurrentPricingTier", + "description": "Get current pricing tier of logged in user", + "tags": [ + "Pricing Tier" + ], + "responses": { + "200": { + "description": "Current pricing tier of logged in user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PricingTier" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotOrg": { + "description": "Overrides the target organization to allow shared tenantaccess", + "name": "x-epilot-org-id", + "in": "header", + "type": "apiKey" + } + }, + "schemas": { + "PricingTier": { + "additionalProperties": true, + "type": "object", + "properties": { + "id": { + "type": "string", + "example": 22 + }, + "created_date": { + "type": "string" + }, + "updated_date": { + "type": "string" + }, + "organization_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "settings": { + "type": "object", + "description": "Settings", + "additionalProperties": true + }, + "override_settings": { + "type": "object", + "description": "Settings", + "additionalProperties": true + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + }, + "is_pure_360": { + "type": "boolean" + } + } + } + } + } +} diff --git a/packages/cli/definitions/pricing.json b/packages/cli/definitions/pricing.json new file mode 100644 index 00000000..39a1216d --- /dev/null +++ b/packages/cli/definitions/pricing.json @@ -0,0 +1,9884 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Pricing API", + "description": "The `pricing-api` hub sets the foundations for the following Pricing APIs:\n\n### Order API\nThis api enables the management of orders in epilot 360, providing features such as:\n - Automatic calculation of totals and price breakdowns for taxes on the Order entity\n - Product and pricing data validation\n\n### Shopping Cart API\nUsed to interact with a cart during a customer's checkout session, providing:\n - An unified data model to model a Shopping Cart\n - Product and pricing data validation\n - Checkout a cart into an order or quote\n\n### Catalog API\nProvides a way to query the entire catalog of products and prices.\n\n### Availability API\nProvides endpoints for querying products availability by a set of predefined dimensions.\n\n### Spot Market API\nProvides endpoints to fetch (historic) spot market price data.\n\n### External Integrations API\nProvides endpoints for external integrations. E.g. GetAG.\n\n### External Catalog API\nProvides endpoints for external catalog.\n\n### Product Recommendations API\nProvides endpoints for product recommendations.\n", + "version": "1.1.0", + "termsOfService": "https://epilot.cloud/agb", + "contact": { + "name": "Support", + "email": "info@epilot.cloud", + "url": "https://help.epilot.cloud" + } + }, + "tags": [ + { + "name": "Order API", + "description": "This api enables the management of orders in epilot 360, providing features such as:\n - Automatic calculation of totals and price breakdowns for taxes on the Order entity\n - Product and pricing data validation\n" + }, + { + "name": "Cart API", + "description": "Used to interact with a cart during a customer's checkout session, providing:\n - An unified data model to model a Shopping Cart\n - Product and pricing data validation\n - Checkout a cart into an order or quote\n" + }, + { + "name": "Catalog API", + "description": "Provides a way to query the entire catalog of products and prices.\n" + }, + { + "name": "Promo Codes API", + "description": "This API enables the validation of promo codes within journeys, their uniqueness and availability\n" + }, + { + "name": "Availability API", + "description": "Provides endpoints for querying products availability by a set of predefined dimensions.\n" + }, + { + "name": "Spot Market API", + "description": "Provides endpoints to fetch (historic) spot market data.\n" + }, + { + "name": "External Integrations API", + "description": "Provides endpoints for external integrations. E.g. GetAG.\n" + }, + { + "name": "External Catalog API", + "description": "Provides endpoints for external catalog.\n" + }, + { + "name": "Product Recommendations API", + "description": "Provides endpoints for product recommendations.\n" + }, + { + "name": "order_schema", + "x-displayName": "Order", + "description": "\n" + }, + { + "name": "order_composite_prices", + "x-displayName": "Order (with Composite Prices)", + "description": "\n" + }, + { + "name": "opportunity_schema", + "x-displayName": "Opportunity", + "description": "\n" + }, + { + "name": "product_schema", + "x-displayName": "Product", + "description": "\n" + }, + { + "name": "simple_price_schema", + "x-displayName": "Price", + "description": "\n" + }, + { + "name": "dynamic_price_schema", + "x-displayName": "Composite Price", + "description": "\n" + }, + { + "name": "coupon_schema", + "x-displayName": "Coupon", + "description": "\n" + } + ], + "x-tagGroups": [ + { + "name": "APIs", + "tags": [ + "Order API", + "Cart API", + "Catalog API", + "Spot Market API", + "Availability API", + "External Integrations API", + "External Catalog API", + "Product Recommendations API", + "Promo Codes API" + ] + }, + { + "name": "Commerce Schemas", + "tags": [ + "order_schema", + "opportunity_schema" + ] + }, + { + "name": "Pricing Schemas", + "tags": [ + "product_schema", + "simple_price_schema", + "dynamic_price_schema", + "coupon_schema" + ] + }, + { + "name": "Examples", + "tags": [ + "order_composite_prices" + ] + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "servers": [ + { + "url": "https://pricing-api.sls.epilot.io" + } + ], + "paths": { + "/v1/pricing:compute": { + "post": { + "description": "Computes a set of pricing details that can be persisted on an entity with the pricing capability enabled, e.g: Orders or Contracts.", + "summary": "calculatePricingDetails", + "operationId": "$calculatePricingDetails", + "tags": [ + "Order API" + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "properties": { + "line_items": { + "$ref": "#/components/schemas/PriceItemsDto" + }, + "redeemed_promos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RedeemedPromo" + } + } + } + }, + "examples": { + "Compute price": { + "value": { + "line_items": [ + { + "product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f", + "price_id": "396cb5f3-ea0b-4629-99ca-303661de5a9b", + "quantity": 2, + "is_composite_price": false + }, + { + "product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f", + "price_id": "396cb5f3-ea0b-4629-99ca-303661de5a9b", + "quantity": 2, + "coupon_ids": [ + "0f8c4852-23fa-4a64-a2f3-88702335f094" + ], + "is_composite_price": false + }, + { + "product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f", + "price_id": "2abe0c6f-63ef-417b-8c85-5546359382d9", + "quantity": 1, + "is_composite_price": false, + "price_mappings": [ + { + "price_id": "2abe0c6f-63ef-417b-8c85-5546359382d9", + "frequency_unit": "one_time", + "value": 2, + "name": "Estimated consumption", + "metadata": { + "journey_title": "P&G", + "step_name": "Number Inputs" + } + } + ] + }, + { + "product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f", + "price_id": "b59acf37-3cc0-456c-a712-1db0fc478d2d", + "quantity": 1, + "is_composite_price": true, + "price_component_coupon_ids": { + "583fb57a-7549-4624-82d6-342d5e6542f7": [ + "0f8c4852-23fa-4a64-a2f3-88702335f094" + ] + }, + "price_mappings": [ + { + "price_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534", + "frequency_unit": "yearly", + "value": 10000, + "name": "Estimated consumption", + "metadata": { + "journey_title": "P&G", + "step_name": "Number Inputs" + } + } + ], + "item_components": [ + { + "pricing_model": "per_unit", + "quantity": 1, + "type": "recurring", + "billing_period": "monthly", + "price_id": "583fb57a-7549-4624-82d6-342d5e6542f7", + "product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f", + "_price": { + "pricing_model": "per_unit", + "unit_amount": 1500, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "15", + "sales_tax": "standard", + "active": true, + "price_display_in_journeys": "show_price", + "type": "recurring", + "_title": "Base Price", + "tax": [ + { + "_schema": "tax", + "active": true, + "description": "GST", + "rate": 19, + "region": "DE", + "type": "Custom", + "_id": "d792070e-328d-4d2c-8aba-5ac7b23ff621", + "_org": "739224", + "_created_at": "2024-12-18T14:14:53.340Z", + "_updated_at": "2025-02-11T11:07:49.660Z", + "_title": "GST", + "behavior": "inclusive" + } + ], + "tax_behavior": "inclusive", + "billing_period": "monthly", + "billing_duration_unit": "months", + "notice_time_unit": "months", + "termination_time_unit": "months", + "renewal_duration_unit": "months", + "description": "Base Price", + "is_tax_inclusive": false, + "internal_description": "Base Price", + "variable_price": true + }, + "taxes": [ + { + "tax": { + "_schema": "tax", + "active": true, + "description": "GST", + "rate": 19, + "region": "DE", + "type": "Custom", + "_id": "d792070e-328d-4d2c-8aba-5ac7b23ff621", + "_org": "739224", + "_created_at": "2024-12-18T14:14:53.340Z", + "_updated_at": "2025-02-11T11:07:49.660Z", + "_title": "GST", + "behavior": "inclusive" + }, + "amount": 285 + } + ], + "unit_amount": 1000, + "unit_amount_decimal": "10", + "currency": "EUR", + "description": "Base Price", + "is_tax_inclusive": false + }, + { + "pricing_model": "per_unit", + "quantity": 1, + "type": "recurring", + "billing_period": "monthly", + "price_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534", + "product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f", + "_price": { + "_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534", + "active": true, + "description": "Work Price", + "is_tax_inclusive": true, + "price_display_in_journeys": "show_price", + "pricing_model": "per_unit", + "type": "recurring", + "unit_amount": 10, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "0.10", + "variable_price": true, + "billing_period": "monthly", + "internal_description": "Work Price", + "_title": "Work Price", + "unit": "kwh" + }, + "taxes": [ + { + "tax": { + "_schema": "tax", + "active": true, + "description": "19%", + "rate": 19, + "region": "DE", + "type": "VAT", + "_id": "bd488a36-cae5-4b18-9ca5-f5cbf6d9735b", + "_org": "739224", + "_created_at": "2025-01-15T12:04:52.431Z", + "_updated_at": "2025-01-15T12:04:52.431Z", + "_title": "19%" + }, + "amount": 1331 + } + ], + "unit_amount": 8, + "unit_amount_decimal": "0.08", + "currency": "EUR", + "description": "Work Price", + "is_tax_inclusive": true + } + ] + }, + { + "description": "Product Name", + "quantity": 1, + "is_composite_price": true, + "item_components": [ + { + "quantity": 1, + "description": "Price Description", + "unit_amount": 10000, + "unit_amount_decimal": "100", + "unit_amount_currency": "EUR", + "pricing_model": "per_unit", + "taxes": [ + { + "rate": "nontaxable", + "rateValue": 0, + "amount": 0 + } + ], + "type": "one_time", + "is_tax_inclusive": true + } + ], + "currency": "EUR" + }, + { + "price_id": "b59acf37-3cc0-456c-a712-1db0fc478d2d", + "product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f", + "quantity": 1, + "description": "Power Test", + "is_composite_price": true, + "item_components": [ + { + "price_id": "583fb57a-7549-4624-82d6-342d5e6542f7", + "product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f", + "quantity": 1, + "description": "Base Price", + "unit_amount": 1500, + "unit_amount_decimal": "15", + "unit_amount_currency": "EUR", + "pricing_model": "per_unit", + "type": "recurring", + "billing_period": "monthly", + "is_tax_inclusive": false, + "_coupons": [ + { + "name": "My Custom Discount", + "type": "fixed", + "fixed_value": 500, + "fixed_value_currency": "EUR", + "fixed_value_decimal": "5", + "category": "discount", + "active": true, + "_schema": "coupon", + "requires_promo_code": false, + "_org": "739224", + "_created_at": "2025-02-24T10:01:24.537Z", + "_updated_at": "2025-02-24T10:01:24.537Z", + "percentage_value": "0", + "_title": "My Custom Discount", + "_id": "0f8c4852-23fa-4a64-a2f3-88702335f094" + } + ] + }, + { + "price_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534", + "product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f", + "quantity": 1, + "description": "Work Price", + "unit_amount": 10, + "unit_amount_decimal": "0.10123", + "unit_amount_currency": "EUR", + "pricing_model": "per_unit", + "taxes": [ + { + "tax": { + "_schema": "tax", + "active": true, + "description": "19%", + "rate": 19, + "region": "DE", + "type": "VAT", + "_id": "bd488a36-cae5-4b18-9ca5-f5cbf6d9735b", + "_org": "739224", + "_created_at": "2025-01-15T12:04:52.431Z", + "_updated_at": "2025-01-15T12:04:52.431Z", + "_title": "19%" + }, + "amount": 2 + } + ], + "type": "recurring", + "billing_period": "monthly", + "unit_amount_net": 8, + "unit_amount_gross": 10, + "amount_subtotal": 8, + "amount_total": 10, + "amount_tax": 2, + "is_tax_inclusive": true, + "unit_amount_net_decimal": "0.084033613445", + "unit_amount_gross_decimal": "0.1", + "amount_subtotal_decimal": "0.084033613445", + "amount_total_decimal": "0.1" + } + ], + "price_mappings": [ + { + "price_id": "583fb57a-7549-4624-82d6-342d5e6542f7", + "value": 1 + }, + { + "price_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534", + "value": 2000 + } + ], + "currency": "EUR" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Pricing details result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PricingDetailsResponse" + }, + "example": { + "amount_subtotal": 1000, + "amount_total": 1000, + "amount_tax": 0, + "total_details": { + "amount_tax": 0, + "breakdown": { + "taxes": [ + { + "tax": { + "rate": 0 + }, + "amount": 0 + } + ], + "recurrences": [ + { + "type": "one_time", + "unit_amount_gross": 1000, + "unit_amount_net": 1000, + "amount_subtotal": 1000, + "amount_total": 1000, + "amount_subtotal_decimal": "10", + "amount_total_decimal": "10", + "amount_tax": 0 + } + ], + "recurrencesByTax": [ + { + "type": "one_time", + "amount_total": 1000, + "amount_subtotal": 1000, + "amount_tax": 0, + "tax": { + "tax": { + "rate": 0 + }, + "amount": 0 + } + } + ] + } + }, + "line_items": [ + { + "product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f", + "price_id": "396cb5f3-ea0b-4629-99ca-303661de5a9b", + "quantity": 1, + "currency": "EUR", + "_price": { + "description": "Standard price component", + "pricing_model": "per_unit", + "unit_amount_currency": "EUR", + "unit_amount": 1000, + "unit_amount_decimal": "10", + "is_tax_inclusive": true, + "price_display_in_journeys": "show_price", + "active": true, + "variable_price": false, + "type": "one_time", + "billing_period": null, + "billing_duration_amount": null, + "billing_duration_unit": null, + "notice_time_amount": null, + "notice_time_unit": null, + "termination_time_amount": null, + "termination_time_unit": null, + "renewal_duration_amount": null, + "renewal_duration_unit": null, + "price_components": null, + "_tags": [], + "_title": "Standard price component", + "_id": "396cb5f3-ea0b-4629-99ca-303661de5a9b", + "internal_description": "Standard price component" + }, + "_product": { + "type": "product", + "_title": "Product PH", + "name": "Product PH ", + "price_options": { + "$relation": [ + { + "entity_id": "396cb5f3-ea0b-4629-99ca-303661de5a9b", + "_tags": [], + "_schema": "price" + } + ] + }, + "_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f", + "active": true, + "internal_name": "Product PH", + "description": "" + }, + "description": "Standard price component", + "unit_amount": 1000, + "unit_amount_net": 1000, + "unit_amount_net_decimal": "10", + "unit_amount_gross": 1000, + "unit_amount_gross_decimal": "10", + "unit_amount_decimal": "10", + "amount_subtotal": 1000, + "amount_total": 1000, + "amount_tax": 0, + "taxes": [ + { + "rate": "nontaxable", + "rateValue": 0, + "amount": 0 + } + ], + "is_tax_inclusive": true, + "amount_subtotal_decimal": "10", + "amount_total_decimal": "10" + } + ], + "currency": "EUR" + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/order": { + "post": { + "description": "Create an order", + "operationId": "createOrder", + "summary": "createOrder", + "tags": [ + "Order API" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "examples": { + "Order with Simple Prices": { + "value": { + "status": "quote", + "source_type": "manual", + "expires_at": "2022-06-30T16:17:00.000Z", + "line_items": [ + { + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "quantity": 16, + "is_composite_price": false + }, + { + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "quantity": 4, + "is_composite_price": false + }, + { + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "quantity": 1, + "is_composite_price": false + }, + { + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "quantity": 1, + "is_composite_price": false + } + ], + "currency": "EUR", + "payment_method": [ + { + "type": "IBAN", + "details": {} + } + ], + "billing_contact": { + "$relation": [ + { + "entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5", + "_tags": [] + } + ] + }, + "billing_first_name": "Joao", + "billing_last_name": "Pinho", + "billing_email": "j.pinho@epilot.cloud", + "billing_company_name": "epilot cloud", + "billing_address": [ + { + "_tags": [], + "street": "Im Media Park", + "street_number": "8a", + "postal_code": "52000", + "city": "Cologne", + "country": "DE", + "additional_info": "" + } + ], + "delivery_address": [], + "dates": [ + { + "_tags": [ + "Instalation Date" + ], + "dates": "", + "value": "2022-06-30T16:29:00.000Z" + } + ] + } + }, + "Order with Simple Prices and Dynamic Pricing": { + "value": { + "status": "quote", + "source_type": "manual", + "expires_at": "2022-06-30T16:17:00.000Z", + "line_items": [ + { + "price_id": "632b18b5-3f50-4231-b8d5-f8c33a392ed0", + "product_id": "3d1c9987-a7ae-4c1c-a7ef-e12caccab4e0", + "price_mappings": [ + { + "price_id": "632b18b5-3f50-4231-b8d5-f8c33a392ed0", + "frequency_unit": "yearly", + "value": 12000, + "name": "Estimated consumption", + "metadata": { + "journey_title": "P&G", + "step_name": "Number Inputs" + } + } + ], + "quantity": 16, + "is_composite_price": false + } + ], + "currency": "EUR", + "payment_method": [ + { + "type": "IBAN", + "details": {} + } + ], + "billing_contact": { + "$relation": [ + { + "entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5", + "_tags": [] + } + ] + }, + "billing_first_name": "Joao", + "billing_last_name": "Pinho", + "billing_email": "j.pinho@epilot.cloud", + "billing_company_name": "epilot cloud", + "billing_address": [ + { + "_tags": [], + "street": "Im Media Park", + "street_number": "8a", + "postal_code": "52000", + "city": "Cologne", + "country": "DE", + "additional_info": "" + } + ], + "delivery_address": [], + "dates": [ + { + "_tags": [ + "Instalation Date" + ], + "dates": "", + "value": "2022-06-30T16:29:00.000Z" + } + ] + } + }, + "Order with Composite Prices and Dynamic Pricing": { + "value": { + "status": "quote", + "source_type": "manual", + "expires_at": "2022-06-30T16:17:00.000Z", + "line_items": [ + { + "price_id": "b3900bf3-020c-4c58-8af9-32f2682929e3", + "product_id": "924f6881-7ae3-4e2e-a1dd-2d81b8fa2e32", + "price_mappings": [ + { + "price_id": "6dc88d6f-ba33-45ee-b5d0-62641344a0d9", + "frequency_unit": "yearly", + "value": 12000, + "name": "Estimated consumption", + "metadata": { + "journey_title": "P&G", + "step_name": "Number Inputs" + } + }, + { + "price_id": "60eb12cd-703d-4d41-9265-577ff657bfc9", + "value": 10, + "name": "Distance to power meter", + "metadata": { + "journey_title": "P&G", + "step_name": "Number Inputs" + } + } + ], + "quantity": 1, + "is_composite_price": true + } + ], + "currency": "EUR", + "payment_method": [ + { + "type": "IBAN", + "details": {} + } + ], + "billing_contact": { + "$relation": [ + { + "entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5", + "_tags": [] + } + ] + }, + "billing_first_name": "Joao", + "billing_last_name": "Pinho", + "billing_email": "j.pinho@epilot.cloud", + "billing_company_name": "epilot cloud", + "billing_address": [ + { + "_tags": [], + "street": "Im Media Park", + "street_number": "8a", + "postal_code": "52000", + "city": "Cologne", + "country": "DE", + "additional_info": "" + } + ], + "delivery_address": [], + "dates": [ + { + "_tags": [ + "Instalation Date" + ], + "dates": "", + "value": "2022-06-30T16:29:00.000Z" + } + ] + } + } + }, + "schema": { + "$ref": "#/components/schemas/OrderPayload" + } + } + } + }, + "responses": { + "201": { + "description": "Order result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/order/{id}": { + "put": { + "description": "Update an existing Order", + "operationId": "putOrder", + "summary": "putOrder", + "tags": [ + "Order API" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Order entity ID", + "schema": { + "type": "string" + }, + "required": true, + "example": "9d4602d3-03be-4d85-86b2-f3c6555fc606" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderPayload" + }, + "examples": { + "Order with Simple Prices": { + "value": { + "status": "quote", + "source_type": "manual", + "expires_at": "2022-06-30T16:17:00.000Z", + "line_items": [ + { + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "quantity": 16, + "is_composite_price": false + }, + { + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "quantity": 4, + "is_composite_price": false + }, + { + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "quantity": 1, + "is_composite_price": false + }, + { + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "quantity": 1, + "is_composite_price": false + } + ], + "currency": "EUR", + "payment_method": [ + { + "type": "IBAN", + "details": {} + } + ], + "billing_contact": { + "$relation": [ + { + "entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5", + "_tags": [] + } + ] + }, + "billing_first_name": "Joao", + "billing_last_name": "Pinho", + "billing_email": "j.pinho@epilot.cloud", + "billing_company_name": "epilot cloud", + "billing_address": [ + { + "_tags": [], + "street": "Im Media Park", + "street_number": "8a", + "postal_code": "52000", + "city": "Cologne", + "country": "DE", + "additional_info": "" + } + ], + "delivery_address": [], + "dates": [ + { + "_tags": [ + "Instalation Date" + ], + "dates": "", + "value": "2022-06-30T16:29:00.000Z" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Order result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/cart:checkout": { + "post": { + "description": "Checkouts a cart and executes the specified checkout `mode` process.\n\nA Checkout implicitly finalizes the provided cart (if not transient from a fast-checkout) and behaves in one of the following modes:\n- `create_order` (**default**): the payment happens at a later date or managed by 3rd-party CRM (SAP)\n- `create_invoice`: the payment happens on the online checkout (paypal, stripe, adyen)\n- `create_quote`: the checkout represents a price quote request\n\nFast checkout is also supported, by passing the Cart contents directly.\nWhen a fast checkout is performed the cart is considered transient and there is no cart persistance.\n\nIf the checkout `mode` is omitted, the `mode` will default to `create_order`.\n", + "operationId": "$checkoutCart", + "summary": "checkoutCart", + "security": [ + {}, + { + "EpilotPublicAuth": [] + } + ], + "tags": [ + "Cart API" + ], + "parameters": [ + { + "in": "header", + "name": "X-Ivy-Org-ID", + "description": "The target Organization Id represented by the caller", + "schema": { + "type": "string" + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CheckoutCart" + }, + "examples": { + "Checkout with a transient Cart": { + "$ref": "#/components/examples/checkout-with-transient-cart" + } + } + } + } + }, + "responses": { + "200": { + "description": "The checkout result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CheckoutCartResult" + }, + "examples": { + "Checkout with created order": { + "$ref": "#/components/examples/checkout-result" + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/catalog": { + "post": { + "description": "Provides a querying functionalities over products and prices of the Catalog for a given organization.", + "operationId": "$searchCatalog", + "summary": "searchCatalog", + "security": [ + {}, + { + "EpilotPublicAuth": [] + } + ], + "tags": [ + "Catalog API" + ], + "parameters": [ + { + "in": "header", + "name": "X-Ivy-Org-ID", + "description": "The target Organization Id represented by the caller", + "example": "739224", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Authorization", + "description": "The token identifying the client making the request", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CatalogSearch" + } + } + } + }, + "responses": { + "200": { + "description": "The search result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CatalogSearchResult" + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/catalog": { + "post": { + "description": "Provides a querying functionalities over products and prices of the Catalog for a given organization.", + "operationId": "$privateSearchCatalog", + "summary": "privateSearchCatalog", + "tags": [ + "Catalog API" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CatalogSearch" + } + } + } + }, + "responses": { + "200": { + "description": "The search result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CatalogSearchResult" + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/validate-promo-codes": { + "post": { + "description": "Validate a list of promo codes against a list of coupons", + "summary": "validatePromoCodes", + "operationId": "$validatePromoCodes", + "tags": [ + "Promo Codes API" + ], + "security": [ + { + "EpilotPublicAuth": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "X-Ivy-Org-ID", + "description": "The target Organization Id represented by the caller", + "schema": { + "type": "string" + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "coupon_ids": { + "type": "array", + "description": "The list of coupon ids to unlock with promo codes", + "items": { + "type": "string" + } + }, + "promo_codes": { + "type": "array", + "description": "The list of promo codes to validate against the coupons", + "items": { + "type": "string" + } + } + } + }, + "examples": { + "Find coupons matching codes": { + "value": { + "coupon_ids": [ + "81b8e841-5926-4a73-ac77-6607c1037b65", + "45964a30-1a42-4e59-9362-7d954baf4ea1" + ], + "promo_codes": [ + "ABC", + "DEF" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Pricing details result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromoCodeValidationResponse" + }, + "example": { + "matched_coupons": [ + { + "name": "Coupon with promo-codes", + "type": "fixed", + "percentage_value": null, + "fixed_value": 10, + "fixed_value_currency": "EUR", + "fixed_value_decimal": "10.00", + "category": "discount", + "cashback_period": "12", + "active": true, + "_schema": "coupon", + "requires_promo_code": true, + "_id": "81b8e841-5926-4a73-ac77-6607c1037b65", + "_org": "739224", + "_owners": [ + { + "org_id": "739224", + "user_id": "11000622" + } + ], + "_created_at": "2025-01-29T15:46:41.014Z", + "_updated_at": "2025-01-29T15:46:41.014Z", + "_title": "Coupon with promo-codes" + } + ] + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/availability:check": { + "post": { + "description": "The availability check endpoint", + "operationId": "$availabilityCheck", + "summary": "availabilityCheck", + "security": [ + { + "EpilotPublicAuth": [] + } + ], + "tags": [ + "Availability API" + ], + "parameters": [ + { + "in": "header", + "name": "X-Ivy-Org-ID", + "description": "The target Organization Id represented by the caller", + "schema": { + "type": "string" + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AvailabilityCheckParams" + }, + "examples": { + "Check availability with location dimension": { + "value": { + "products": [ + "cd75456a-30e4-4912-95be-e743d5ea175b" + ], + "filters": { + "location": { + "postal_code": "57008", + "city": "Cologne", + "street": "Media Park", + "street_number": "8a" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The availability check result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AvailabilityResult" + }, + "examples": { + "Response with available products": { + "value": { + "available_products": [ + "cd75456a-30e4-4912-95be-e743d5ea175b" + ], + "check_results": [ + { + "product_id": "cd75456a-30e4-4912-95be-e743d5ea175b", + "matching_hits": 1 + } + ] + } + }, + "Response with no available products": { + "value": { + "available_products": [] + } + }, + "Response with available and unavailable products": { + "value": { + "available_products": [ + "my-product-id-123-2" + ], + "checkResults": [ + { + "productId": "my-product-id-123-1", + "matchingError": { + "msg": "Error - Unknown file extension for availability file." + } + }, + { + "matchingHits": 1, + "productId": "my-product-id-123-2" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/validate-availability/{id}": { + "get": { + "description": "Validates an availability file, it returns an array of errors if the file is invalid", + "operationId": "$validateAvailabilityFile", + "summary": "validateAvailabilityFile", + "tags": [ + "Availability API" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Product ID that the Availability File is attached to", + "schema": { + "type": "string" + }, + "required": true, + "example": "72c803b2-2e5d-4bd6-bffc-fad998bbbe36" + }, + { + "in": "header", + "name": "X-Epilot-Org-ID", + "description": "The target Organization Id represented by the caller", + "schema": { + "type": "string" + }, + "required": true, + "example": "739224" + } + ], + "responses": { + "200": { + "description": "The availability get result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateAvailabilityFileResult" + }, + "examples": { + "Response when file has no errors": { + "value": { + "status": "success", + "rules_parsed_count": 10, + "errors": [] + } + }, + "Response when file has errors": { + "value": { + "status": "error", + "rules_parsed_count": 8, + "errors": [ + { + "line": 3, + "msg": "Postal code is missing or invalid", + "data": "Postal code: 12345" + }, + { + "line": 4, + "msg": "Postal code is missing or invalid", + "data": "Postal code: 12345" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/historicMarketPrices": { + "get": { + "description": "Get a series of historic energy prices for a given time period, market and bidding zone.", + "operationId": "$historicMarketPrices", + "summary": "historicMarketPrices", + "tags": [ + "Spot Market API" + ], + "security": [ + { + "EpilotPublicAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "market", + "schema": { + "$ref": "#/components/schemas/SpotMarketType" + }, + "required": true, + "description": "Market to use. For now, only day ahead prices are supported." + }, + { + "in": "query", + "name": "bidding_zone", + "schema": { + "$ref": "#/components/schemas/SpotMarketBiddingZone" + }, + "required": true, + "description": "Bidding zone to use. For now, only AT and DE-LU are supported." + }, + { + "in": "query", + "name": "frequency", + "schema": { + "$ref": "#/components/schemas/SpotMarketDataFrequency" + }, + "required": true, + "description": "Frequency of the price data points in ISO 8601 format." + }, + { + "in": "query", + "name": "from", + "schema": { + "type": "string", + "anyOf": [ + { + "format": "date" + }, + { + "format": "date-time" + } + ] + }, + "required": true, + "description": "Start of price data in ISO 8601 format.\nIf only a date is provided (YYYY-MM-DD) the timzone of the bidding zone is used.\n" + }, + { + "in": "query", + "name": "to", + "schema": { + "type": "string", + "anyOf": [ + { + "format": "date" + }, + { + "format": "date-time" + } + ] + }, + "required": true, + "description": "End of price data in ISO 8601 format.\nIf only a date is provided (YYYY-MM-DD) the timzone of the bidding zone is used.\n" + } + ], + "responses": { + "200": { + "description": "Price data returned successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricMarketPricesResult" + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "No prices for date range found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/averageMarketPrice": { + "get": { + "description": "Get the average energy prices for a given time period, market and bidding zone.", + "operationId": "$averageMarketPrice", + "summary": "averageMarketPrice", + "tags": [ + "Spot Market API" + ], + "security": [ + { + "EpilotPublicAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "market", + "schema": { + "$ref": "#/components/schemas/SpotMarketType" + }, + "required": true, + "description": "Market to use. For now, only day ahead prices are supported." + }, + { + "in": "query", + "name": "bidding_zone", + "schema": { + "$ref": "#/components/schemas/SpotMarketBiddingZone" + }, + "required": true, + "description": "Bidding zone to use. For now, only AT and DE-LU are supported." + }, + { + "in": "query", + "name": "from", + "schema": { + "type": "string", + "anyOf": [ + { + "format": "date" + }, + { + "format": "date-time" + } + ] + }, + "required": true, + "description": "Start of price data in ISO 8601 format.\nIf only a date is provided (YYYY-MM-DD) the timzone of the bidding zone is used.\n" + }, + { + "in": "query", + "name": "to", + "schema": { + "type": "string", + "anyOf": [ + { + "format": "date" + }, + { + "format": "date-time" + } + ] + }, + "required": true, + "description": "End of price data in ISO 8601 format.\nIf only a date is provided (YYYY-MM-DD) the timzone of the bidding zone is used.\n" + } + ], + "responses": { + "200": { + "description": "Price data returned successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AverageMarketPriceResult" + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "No prices for date range found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/integration/{integrationId}/products": { + "post": { + "description": "Returns the list of available products with computed prices based on a given context and for a given org integration.", + "operationId": "$searchExternalProducts", + "security": [ + {}, + { + "EpilotPublicAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "integrationId", + "description": "The integration identifier", + "schema": { + "$ref": "#/components/schemas/IntegrationId" + }, + "required": true, + "example": "external-catalog" + } + ], + "summary": "searchExternalProducts", + "tags": [ + "External Integrations API" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchExternalCatalogParams" + } + } + } + }, + "responses": { + "200": { + "description": "The available products response payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchExternalCatalogResult" + }, + "examples": { + "External products": { + "value": { + "hits": 1, + "results": [ + { + "pricing_details": { + "items": [ + { + "_id": "price-12312414", + "price_id": "price-12312414", + "is_composite_price": true, + "description": "Home Energy Package Composite", + "item_components": [ + { + "_id": "price-12312414-component-0", + "price_id": "price-12312414-component-0", + "description": "Working Price", + "is_tax_inclusive": true, + "amount_total_decimal": "100", + "amount_total": 10000, + "amount_subtotal_decimal": "100", + "amount_subtotal": 10000, + "unit_amount": 10, + "unit_amount_gross": 10, + "unit_amount_gross_decimal": "0.10", + "unit_amount_net": 10, + "unit_amount_net_decimal": "0.10", + "billing_period": "monthly", + "type": "recurring", + "taxes": [], + "pricing_model": "per_unit", + "quantity": 1, + "_price": { + "_id": "price-12312414-component-0", + "unit_amount_currency": "EUR", + "description": "Working Price", + "is_tax_inclusive": true, + "unit_amount": 10, + "unit_amount_decimal": "0.10", + "unit": "kWh", + "billing_period": "monthly", + "type": "recurring", + "billing_duration_amount": 24, + "billing_duration_unit": "months", + "notice_time_amount": 3, + "notice_time_unit": "months", + "termination_time_amount": 3, + "termination_time_unit": "months", + "renewal_duration_amount": 12, + "renewal_duration_unit": "months", + "active": true, + "is_composite_price": false, + "variable_price": true, + "pricing_model": "per_unit", + "price_display_in_journeys": "show_price" + } + } + ] + } + ], + "currency": "EUR", + "amount_subtotal": 10000, + "amount_total": 10000, + "amount_tax": 0, + "total_details": { + "amount_tax": 0, + "breakdown": { + "taxes": [], + "recurrences": [ + { + "type": "recurring", + "billing_period": "monthly", + "amount_total": 10000, + "amount_total_decimal": "100.00", + "amount_subtotal": 10000, + "amount_subtotal_decimal": "100.00", + "amount_tax": 0 + } + ] + } + } + }, + "_meta": { + "signature": "abc123", + "timestamp": 1712049221642 + } + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden, no credentials found for the given integration / organization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/integration/{integrationId}/product-recommendations": { + "post": { + "description": "Returns the list of available product recommendations with computed prices based on a given context and for a given org integration.", + "operationId": "$searchExternalProductRecommendations", + "security": [ + {}, + { + "EpilotPublicAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "integrationId", + "description": "The integration identifier", + "schema": { + "$ref": "#/components/schemas/IntegrationId" + }, + "required": true, + "example": "external-catalog" + } + ], + "summary": "searchExternalProductRecommendations", + "tags": [ + "External Integrations API" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchExternalCatalogParams" + }, + "examples": { + "Search recommendations": { + "value": { + "context": { + "journey_id": "8d0a2235-97ce-42d0-88a3-e374634ca44e", + "journey_name": "Energy Provider Selection", + "current_step_name": "product-selection", + "current_block_name": "recommendations-block", + "steps_data": [ + { + "step_name": "address", + "step_index": 1, + "blocks": { + "Adresse": { + "countryCode": "DE", + "city": "Koblenz", + "zipCode": "56068", + "streetName": "Am Alten Hospital", + "houseNumber": "123" + } + } + } + ] + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The available products response payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchExternalCatalogRecommendationsResult" + }, + "examples": { + "External catalog recommendations": { + "value": { + "source": { + "pricing_details": { + "items": [ + { + "_id": "price-12312414", + "price_id": "price-12312414", + "product_id": "product-12312414", + "is_composite_price": true, + "description": "Home Energy Package Composite", + "item_components": [ + { + "_id": "price-12312414-component-0", + "price_id": "price-12312414-component-0", + "product_id": "product-12312414", + "description": "Working Price", + "is_tax_inclusive": true, + "amount_total_decimal": "50", + "amount_total": 5000, + "amount_subtotal_decimal": "50", + "amount_subtotal": 5000, + "unit_amount": 5, + "unit_amount_gross": 5, + "unit_amount_gross_decimal": "0.05", + "unit_amount_net": 5, + "unit_amount_net_decimal": "0.05", + "billing_period": "monthly", + "type": "recurring", + "taxes": [], + "pricing_model": "per_unit", + "quantity": 1, + "_price": { + "_id": "price-12312414-component-0", + "unit_amount_currency": "EUR", + "description": "Working Price", + "is_tax_inclusive": true, + "unit_amount": 5, + "unit_amount_decimal": "0.05", + "unit": "kWh", + "billing_period": "monthly", + "type": "recurring", + "billing_duration_amount": 24, + "billing_duration_unit": "months", + "notice_time_amount": 3, + "notice_time_unit": "months", + "termination_time_amount": 3, + "termination_time_unit": "months", + "renewal_duration_amount": 12, + "renewal_duration_unit": "months", + "active": true, + "is_composite_price": false, + "variable_price": true, + "pricing_model": "per_unit", + "price_display_in_journeys": "show_price" + }, + "_product": { + "_id": "product-12312414", + "name": "Home Energy Package", + "description": "Composite home energy solution with solar panels and battery" + } + } + ] + } + ], + "currency": "EUR", + "amount_subtotal": 5000, + "amount_total": 5000, + "amount_tax": 0, + "total_details": { + "amount_tax": 0, + "breakdown": { + "taxes": [], + "recurrences": [ + { + "type": "recurring", + "billing_period": "monthly", + "amount_total": 5000, + "amount_total_decimal": "50.00", + "amount_subtotal": 5000, + "amount_subtotal_decimal": "50.00", + "amount_tax": 0 + } + ] + } + } + }, + "_meta": { + "signature": "abc123", + "timestamp": 1712049221642 + } + }, + "offers": [ + { + "pricing_details": { + "items": [ + { + "_id": "price-999857a4", + "price_id": "price-999857a4", + "product_id": "product-999857a4", + "is_composite_price": false, + "description": "Single Price", + "is_tax_inclusive": true, + "amount_total_decimal": "25", + "amount_total": 2500, + "amount_subtotal_decimal": "25", + "amount_subtotal": 2500, + "unit_amount": 25, + "unit_amount_gross": 25, + "unit_amount_gross_decimal": "25", + "unit_amount_net": 25, + "unit_amount_net_decimal": "25", + "billing_period": null, + "type": "one_time", + "taxes": [], + "pricing_model": "per_unit", + "quantity": 1, + "_price": { + "_id": "price-999857a4", + "unit_amount_currency": "EUR", + "description": "Single Price", + "is_tax_inclusive": true, + "unit_amount": 25, + "unit_amount_decimal": "25", + "billing_duration_amount": 24, + "billing_duration_unit": "months", + "notice_time_amount": 3, + "notice_time_unit": "months", + "termination_time_amount": 3, + "termination_time_unit": "months", + "renewal_duration_amount": 12, + "renewal_duration_unit": "months", + "active": true, + "is_composite_price": false, + "pricing_model": "per_unit", + "price_display_in_journeys": "show_price" + }, + "_product": { + "_id": "product-999857a4", + "name": "Solar Panel X2", + "description": "High-efficiency solar panel for residential use" + } + } + ] + }, + "currency": "EUR", + "amount_subtotal": 2500, + "amount_total": 2500, + "amount_tax": 0, + "total_details": { + "amount_tax": 0, + "breakdown": { + "taxes": [], + "recurrences": [ + { + "type": "one_time", + "amount_total": 2500, + "amount_total_decimal": "25.00", + "amount_subtotal": 2500, + "amount_subtotal_decimal": "25.00", + "amount_tax": 0 + } + ] + } + }, + "_meta": { + "signature": "def456", + "timestamp": 1712049221643 + } + }, + { + "pricing_details": { + "items": [ + { + "_id": "price-93f857a4", + "price_id": "price-93f857a4", + "product_id": "product-93f857a4", + "is_composite_price": false, + "description": "Single Price", + "is_tax_inclusive": false, + "amount_total_decimal": "29.75", + "amount_total": 2975, + "amount_subtotal_decimal": "25", + "amount_subtotal": 2500, + "unit_amount": 25, + "unit_amount_gross": 29.75, + "unit_amount_gross_decimal": "29.75", + "unit_amount_net": 25, + "unit_amount_net_decimal": "25", + "billing_period": null, + "type": "one_time", + "taxes": [ + { + "tax": { + "_id": "tax-vat-19", + "name": "VAT", + "type": "VAT", + "rate": 19, + "region": "DE" + }, + "amount": 475 + } + ], + "pricing_model": "per_unit", + "quantity": 1, + "_price": { + "_id": "price-93f857a4", + "unit_amount_currency": "EUR", + "description": "Single Price", + "is_tax_inclusive": false, + "unit_amount": 25, + "unit_amount_decimal": "25", + "active": true, + "is_composite_price": false, + "pricing_model": "per_unit", + "price_display_in_journeys": "show_price", + "tax": [ + { + "_id": "tax-vat-19", + "name": "VAT", + "type": "VAT", + "rate": 19, + "region": "DE" + } + ] + }, + "_product": { + "_id": "product-93f857a4", + "name": "Solar Panel X3", + "description": "New generation of high-efficiency solar panel for residential use" + } + } + ] + }, + "currency": "EUR", + "amount_subtotal": 2500, + "amount_total": 2975, + "amount_tax": 475, + "total_details": { + "amount_tax": 475, + "breakdown": { + "taxes": [ + { + "tax": { + "_id": "tax-vat-19", + "name": "VAT", + "type": "VAT", + "rate": 19, + "region": "DE" + }, + "amount": 475 + } + ], + "recurrences": [ + { + "type": "one_time", + "amount_total": 2975, + "amount_total_decimal": "29.75", + "amount_subtotal": 2500, + "amount_subtotal_decimal": "25.00", + "amount_tax": 475 + } + ] + } + }, + "_meta": { + "signature": "ghi789", + "timestamp": 1712049221644 + } + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden, no credentials found for the given integration / organization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/integration/{integrationId}/providers:search": { + "post": { + "description": "Returns the list of providers available based on a given location", + "operationId": "$searchProviders", + "security": [ + {}, + { + "EpilotPublicAuth": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "X-Epilot-Org-ID", + "description": "The target Organization Id represented by the caller", + "schema": { + "type": "string" + }, + "required": true, + "example": "739224" + }, + { + "in": "path", + "name": "integrationId", + "description": "The integration identifier", + "schema": { + "$ref": "#/components/schemas/IntegrationId" + }, + "required": true, + "example": "getag" + } + ], + "summary": "searchProviders", + "tags": [ + "External Integrations API" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchProvidersParams" + }, + "examples": { + "Search providers (power)": { + "value": { + "type": "power", + "postal_code": "04109", + "city": "Leipzig", + "street": "Willy-Brandt-Platz" + } + }, + "Search providers (gas)": { + "value": { + "type": "gas", + "postal_code": "57008", + "city": "Cologne", + "street": "Media Park", + "street_number": "8a" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The available providers response payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchProvidersResult" + }, + "examples": { + "Response with available providers": { + "value": [ + { + "name": "Provider 1", + "code": "code#1" + }, + { + "name": "Provider 2", + "code": "code#2" + } + ] + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden, no credentials found for the given integration / organization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/integration/{integrationId}/streets:search": { + "post": { + "description": "Returns the list of streets available for a given postal code and city", + "operationId": "$searchStreets", + "security": [ + {}, + { + "EpilotPublicAuth": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "X-Epilot-Org-ID", + "description": "The target Organization Id represented by the caller", + "schema": { + "type": "string" + }, + "required": true, + "example": "739224" + }, + { + "in": "path", + "name": "integrationId", + "description": "The integration identifier", + "schema": { + "$ref": "#/components/schemas/IntegrationId" + }, + "required": true, + "example": "getag" + } + ], + "summary": "searchStreets", + "tags": [ + "External Integrations API" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchStreetsParams" + }, + "examples": { + "Search streets": { + "value": { + "postal_code": "04109", + "city": "Leipzig" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The available streets response payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchStreetsResult" + }, + "examples": { + "Response with available streets": { + "value": [ + { + "street": "Street 1" + }, + { + "street": "Street 2" + } + ] + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden, no credentials found for the given integration / organization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/integration/{integrationId}/compute-price": { + "post": { + "description": "Returns the price for a given product type based on location and consumption", + "operationId": "$computePrice", + "security": [ + {}, + { + "EpilotPublicAuth": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "X-Epilot-Org-ID", + "description": "The target Organization Id represented by the caller", + "schema": { + "type": "string" + }, + "required": true, + "example": "739224" + }, + { + "in": "path", + "name": "integrationId", + "description": "The integration identifier", + "schema": { + "$ref": "#/components/schemas/IntegrationId" + }, + "required": true, + "example": "getag" + } + ], + "summary": "calculatePricingDetails", + "tags": [ + "External Integrations API" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ComputePriceParams" + }, + "examples": { + "Compute price": { + "value": { + "type": "power", + "billing_period": "monthly", + "postal_code": "04109", + "consumption": 3500, + "association_id": "123456789" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The compute price response payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ComputePriceResult" + }, + "examples": { + "Response of computed price": { + "value": { + "amount_total": 100, + "amount_total_decimal": "100.00", + "amount_static": 500, + "amount_static_decimal": "50.00", + "amount_variable": 500, + "amount_variable_decimal": "50.00", + "currency": "EUR", + "billing_period": "monthly", + "breakdown": { + "static": { + "maintenance_fee": { + "amount": 50, + "amount_decimal": "50.00" + } + }, + "variable": { + "offshore_liability_fee": { + "amount": 50, + "amount_decimal": "50.00" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden, no credentials found for the given integration / organization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/integration/{integrationId}/credentials": { + "get": { + "description": "Gets the credentials for a given integration / organization", + "operationId": "$getCredentials", + "summary": "getCredentials", + "tags": [ + "External Integrations API" + ], + "parameters": [ + { + "in": "path", + "name": "integrationId", + "description": "The integration identifier", + "schema": { + "$ref": "#/components/schemas/IntegrationId" + }, + "required": true, + "example": "getag" + } + ], + "responses": { + "200": { + "description": "The credentials response payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationCredentialsResult" + }, + "examples": { + "Response when credentials": { + "value": { + "username": "username", + "password": "password" + } + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Credentials not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/integration/{integrationId}/credentials:save": { + "put": { + "description": "Saves the credentials for a given integration / organization", + "operationId": "$saveCredentials", + "summary": "saveCredentials", + "tags": [ + "External Integrations API" + ], + "parameters": [ + { + "in": "path", + "name": "integrationId", + "description": "The integration identifier", + "schema": { + "$ref": "#/components/schemas/IntegrationId" + }, + "required": true, + "example": "getag" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveIntegrationCredentialsParams" + }, + "examples": { + "Save credentials": { + "value": { + "username": "username", + "password": "password" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Credentials saved" + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/integration/{integrationId}/credentials:delete": { + "delete": { + "description": "Delete the credentials for a given integration / organization", + "operationId": "$deleteCredentials", + "summary": "deleteCredentials", + "tags": [ + "External Integrations API" + ], + "parameters": [ + { + "in": "path", + "name": "integrationId", + "description": "The integration identifier", + "schema": { + "$ref": "#/components/schemas/IntegrationId" + }, + "required": true, + "example": "getag" + } + ], + "responses": { + "204": { + "description": "Credentials deleted" + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/external-catalog/products": { + "post": { + "description": "Returns the list of available external catalog products with computed prices based on a given context", + "operationId": "$getExternalCatalogProducts", + "security": [ + {}, + { + "EpilotPublicAuth": [] + } + ], + "summary": "getExternalCatalogProducts", + "tags": [ + "External Catalog API" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalCatalogRequest" + } + } + } + }, + "responses": { + "200": { + "description": "The available external catalog products response payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchExternalCatalogResult" + }, + "examples": { + "External products": { + "value": { + "hits": 1, + "results": [ + { + "pricing_details": { + "items": [ + { + "_id": "price-12312414", + "price_id": "price-12312414", + "is_composite_price": true, + "description": "Home Energy Package Composite", + "item_components": [ + { + "_id": "price-12312414-component-0", + "price_id": "price-12312414-component-0", + "description": "Working Price", + "is_tax_inclusive": true, + "amount_total_decimal": "100", + "amount_total": 10000, + "amount_subtotal_decimal": "100", + "amount_subtotal": 10000, + "unit_amount": 10, + "unit_amount_gross": 10, + "unit_amount_gross_decimal": "0.10", + "unit_amount_net": 10, + "unit_amount_net_decimal": "0.10", + "billing_period": "monthly", + "type": "recurring", + "taxes": [], + "pricing_model": "per_unit", + "quantity": 1, + "_price": { + "_id": "price-12312414-component-0", + "unit_amount_currency": "EUR", + "description": "Working Price", + "is_tax_inclusive": true, + "unit_amount": 10, + "unit_amount_decimal": "0.10", + "unit": "kWh", + "billing_period": "monthly", + "type": "recurring", + "billing_duration_amount": 24, + "billing_duration_unit": "months", + "notice_time_amount": 3, + "notice_time_unit": "months", + "termination_time_amount": 3, + "termination_time_unit": "months", + "renewal_duration_amount": 12, + "renewal_duration_unit": "months", + "active": true, + "is_composite_price": false, + "variable_price": true, + "pricing_model": "per_unit", + "price_display_in_journeys": "show_price" + } + } + ] + } + ], + "currency": "EUR", + "amount_subtotal": 10000, + "amount_total": 10000, + "amount_tax": 0, + "total_details": { + "amount_tax": 0, + "breakdown": { + "taxes": [], + "recurrences": [ + { + "type": "recurring", + "billing_period": "monthly", + "amount_total": 10000, + "amount_total_decimal": "100.00", + "amount_subtotal": 10000, + "amount_subtotal_decimal": "100.00", + "amount_tax": 0 + } + ] + } + } + }, + "_meta": { + "signature": "abc123", + "timestamp": 1712049221642 + } + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden, no valid configuration found for the given integration / organization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/external-catalog/product-recommendations": { + "post": { + "description": "Returns the list of available external catalog products recommendations based on a given context", + "operationId": "$getExternalCatalogProductRecommendations", + "security": [ + {}, + { + "EpilotPublicAuth": [] + } + ], + "summary": "getExternalCatalogProductRecommendations", + "tags": [ + "External Catalog API" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalCatalogRequest" + } + } + } + }, + "responses": { + "200": { + "description": "The available products response payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchExternalCatalogRecommendationsResult" + }, + "examples": { + "External catalog recommendations": { + "value": { + "source": { + "pricing_details": { + "items": [ + { + "_id": "price-12312414", + "price_id": "price-12312414", + "product_id": "product-12312414", + "is_composite_price": true, + "description": "Home Energy Package Composite", + "item_components": [ + { + "_id": "price-12312414-component-0", + "price_id": "price-12312414-component-0", + "product_id": "product-12312414", + "description": "Working Price", + "is_tax_inclusive": true, + "amount_total_decimal": "50", + "amount_total": 5000, + "amount_subtotal_decimal": "50", + "amount_subtotal": 5000, + "unit_amount": 5, + "unit_amount_gross": 5, + "unit_amount_gross_decimal": "0.05", + "unit_amount_net": 5, + "unit_amount_net_decimal": "0.05", + "billing_period": "monthly", + "type": "recurring", + "taxes": [], + "pricing_model": "per_unit", + "quantity": 1, + "_price": { + "_id": "price-12312414-component-0", + "unit_amount_currency": "EUR", + "description": "Working Price", + "is_tax_inclusive": true, + "unit_amount": 5, + "unit_amount_decimal": "0.05", + "unit": "kWh", + "billing_period": "monthly", + "type": "recurring", + "billing_duration_amount": 24, + "billing_duration_unit": "months", + "notice_time_amount": 3, + "notice_time_unit": "months", + "termination_time_amount": 3, + "termination_time_unit": "months", + "renewal_duration_amount": 12, + "renewal_duration_unit": "months", + "active": true, + "is_composite_price": false, + "variable_price": true, + "pricing_model": "per_unit", + "price_display_in_journeys": "show_price" + }, + "_product": { + "_id": "product-12312414", + "name": "Home Energy Package", + "description": "Composite home energy solution with solar panels and battery" + } + } + ] + } + ], + "currency": "EUR", + "amount_subtotal": 5000, + "amount_total": 5000, + "amount_tax": 0, + "total_details": { + "amount_tax": 0, + "breakdown": { + "taxes": [], + "recurrences": [ + { + "type": "recurring", + "billing_period": "monthly", + "amount_total": 5000, + "amount_total_decimal": "50.00", + "amount_subtotal": 5000, + "amount_subtotal_decimal": "50.00", + "amount_tax": 0 + } + ] + } + } + }, + "_meta": { + "signature": "abc123", + "timestamp": 1712049221642 + } + }, + "offers": [ + { + "pricing_details": { + "items": [ + { + "_id": "price-999857a4", + "price_id": "price-999857a4", + "product_id": "product-999857a4", + "is_composite_price": false, + "description": "Single Price", + "is_tax_inclusive": true, + "amount_total_decimal": "25", + "amount_total": 2500, + "amount_subtotal_decimal": "25", + "amount_subtotal": 2500, + "unit_amount": 25, + "unit_amount_gross": 25, + "unit_amount_gross_decimal": "25", + "unit_amount_net": 25, + "unit_amount_net_decimal": "25", + "billing_period": null, + "type": "one_time", + "taxes": [], + "pricing_model": "per_unit", + "quantity": 1, + "_price": { + "_id": "price-999857a4", + "unit_amount_currency": "EUR", + "description": "Single Price", + "is_tax_inclusive": true, + "unit_amount": 25, + "unit_amount_decimal": "25", + "billing_duration_amount": 24, + "billing_duration_unit": "months", + "notice_time_amount": 3, + "notice_time_unit": "months", + "termination_time_amount": 3, + "termination_time_unit": "months", + "renewal_duration_amount": 12, + "renewal_duration_unit": "months", + "active": true, + "is_composite_price": false, + "pricing_model": "per_unit", + "price_display_in_journeys": "show_price" + }, + "_product": { + "_id": "product-999857a4", + "name": "Solar Panel X2", + "description": "High-efficiency solar panel for residential use" + } + } + ] + }, + "currency": "EUR", + "amount_subtotal": 2500, + "amount_total": 2500, + "amount_tax": 0, + "total_details": { + "amount_tax": 0, + "breakdown": { + "taxes": [], + "recurrences": [ + { + "type": "one_time", + "amount_total": 2500, + "amount_total_decimal": "25.00", + "amount_subtotal": 2500, + "amount_subtotal_decimal": "25.00", + "amount_tax": 0 + } + ] + } + }, + "_meta": { + "signature": "def456", + "timestamp": 1712049221643 + } + }, + { + "pricing_details": { + "items": [ + { + "_id": "price-93f857a4", + "price_id": "price-93f857a4", + "product_id": "product-93f857a4", + "is_composite_price": false, + "description": "Single Price", + "is_tax_inclusive": false, + "amount_total_decimal": "29.75", + "amount_total": 2975, + "amount_subtotal_decimal": "25", + "amount_subtotal": 2500, + "unit_amount": 25, + "unit_amount_gross": 29.75, + "unit_amount_gross_decimal": "29.75", + "unit_amount_net": 25, + "unit_amount_net_decimal": "25", + "billing_period": null, + "type": "one_time", + "taxes": [ + { + "tax": { + "_id": "tax-vat-19", + "name": "VAT", + "type": "VAT", + "rate": 19, + "region": "DE" + }, + "amount": 475 + } + ], + "pricing_model": "per_unit", + "quantity": 1, + "_price": { + "_id": "price-93f857a4", + "unit_amount_currency": "EUR", + "description": "Single Price", + "is_tax_inclusive": false, + "unit_amount": 25, + "unit_amount_decimal": "25", + "active": true, + "is_composite_price": false, + "pricing_model": "per_unit", + "price_display_in_journeys": "show_price", + "tax": [ + { + "_id": "tax-vat-19", + "name": "VAT", + "type": "VAT", + "rate": 19, + "region": "DE" + } + ] + }, + "_product": { + "_id": "product-93f857a4", + "name": "Solar Panel X3", + "description": "New generation of high-efficiency solar panel for residential use" + } + } + ] + }, + "currency": "EUR", + "amount_subtotal": 2500, + "amount_total": 2975, + "amount_tax": 475, + "total_details": { + "amount_tax": 475, + "breakdown": { + "taxes": [ + { + "tax": { + "_id": "tax-vat-19", + "name": "VAT", + "type": "VAT", + "rate": 19, + "region": "DE" + }, + "amount": 475 + } + ], + "recurrences": [ + { + "type": "one_time", + "amount_total": 2975, + "amount_total_decimal": "29.75", + "amount_subtotal": 2500, + "amount_subtotal_decimal": "25.00", + "amount_tax": 475 + } + ] + } + }, + "_meta": { + "signature": "ghi789", + "timestamp": 1712049221644 + } + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden, no credentials found for the given integration / organization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/public/product-recommendations": { + "post": { + "description": "Get a list of product recommendations based on the search parameters.", + "operationId": "$productRecommendations", + "summary": "productRecommendations", + "security": [ + { + "EpilotPublicAuth": [] + } + ], + "tags": [ + "Product Recommendations API" + ], + "parameters": [ + { + "in": "header", + "name": "X-Ivy-Org-ID", + "description": "The target Organization Id represented by the caller", + "example": "739224", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductRecommendationSearch" + }, + "examples": { + "Search product recommendations by id": { + "value": { + "product_recommendation_ids": [ + "22c134b7-8dd8-4872-a5c1-8fc6dd4ac2ee" + ] + } + }, + "Search product recommendations by id with location filter": { + "value": { + "product_recommendation_ids": [ + "22c134b7-8dd8-4872-a5c1-8fc6dd4ac2ee" + ], + "filters": { + "location": { + "postal_code": "50670", + "city": "Köln" + } + } + } + }, + "Search product recommendations by source product and price": { + "value": { + "catalog_item": { + "product_id": "aa1ebf85-f36e-46ff-978c-ed948c646f12", + "price_id": "4ecf9a61-a974-4594-bae2-bcb798f54d76" + } + } + }, + "Search product recommendations by contract": { + "value": { + "contract_id": "98ffca40-46ab-4288-af10-a478893b2aa2" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The product recommendations result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductRecommendationResponse" + }, + "examples": { + "Product recommendations": { + "value": { + "hits": 1, + "results": [ + { + "_title": "Tarifwechsel 2025", + "_created_at": "2025-01-29T15:46:41.014Z", + "_updated_at": "2025-01-29T15:46:41.014Z", + "name": "Tarifwechsel 2025", + "type": "change", + "source_product": { + "$relation": [ + { + "entity_id": "e2b12b54-d904-42b7-ac44-802d8ebaadf4" + } + ] + }, + "source_price": { + "$relation": [ + { + "entity_id": "255877f3-f9c2-483e-9c71-89088c142bfc" + } + ] + }, + "_schema": "product_recommendation", + "offers": [ + { + "target_id": "f9aa8757-505b-46bd-9310-605d64849565", + "items": [ + { + "product_id": "70ad8a08-46c2-473b-b1c5-8bccfb85e452", + "price_id": "26c9c39d-db4a-4132-af2e-86ab5c7b156c" + }, + { + "product_id": "dd97a2a4-e48b-43c5-8717-7ac563c67e05", + "price_id": "4ecf9a61-a974-4594-bae2-bcb798f54d76" + }, + { + "product_id": "aa1ebf85-f36e-46ff-978c-ed948c646f12", + "price_id": "4ecf9a61-a974-4594-bae2-bcb798f54d76" + } + ] + } + ], + "_id": "6d872912-ef8a-4815-b9db-01744c0828ac", + "_org": "739224" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Epilot Bearer Token" + }, + "EpilotPublicAuth": { + "type": "http", + "scheme": "bearer", + "description": "Epilot Public Access Bearer Token", + "bearerFormat": "JWT" + } + }, + "schemas": { + "IntegrationId": { + "type": "string", + "enum": [ + "getag", + "external-catalog" + ] + }, + "Error": { + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "description": "Error message" + }, + "status": { + "type": "number", + "description": "The HTTP status code" + }, + "cause": { + "type": "string", + "description": "The cause of the error (visible for bad requests - http 400)" + } + } + }, + "Product": { + "type": "object", + "description": "The product entity", + "readOnly": true, + "additionalProperties": true, + "example": { + "type": "product", + "_schema": "product", + "_title": "Solar Panel with Battery Storage", + "name": "Solar Panel with Battery Storage", + "code": "SOLAR-BATT", + "active": true, + "description": "Solar Panel with battery solution, optimized for max efficiency. ", + "feature": [ + { + "_tags": [], + "feature": "Eco-Panels" + }, + { + "_tags": [], + "feature": "Remote Management Platform" + }, + { + "_tags": [], + "feature": "Battery Remote Control" + }, + { + "_tags": [], + "feature": "Mobile App" + } + ], + "cross_sellable_products": { + "$relation": [ + { + "entity_id": "068d0713-a650-4668-9ed2-eca7be31e337", + "_schema": "product", + "_tags": [] + }, + { + "entity_id": "c8402ee7-fba9-4f3d-bffd-6803ca655782", + "_tags": [] + } + ] + }, + "product_images": { + "$relation": [ + { + "entity_id": "37bdeaaa-65fe-403e-9894-65b01cd277f1" + }, + { + "entity_id": "56dde657-795c-41bb-bf53-98fd586b7e6e" + } + ] + }, + "product_downloads": { + "$relation": [ + { + "entity_id": "64211361-8759-414b-81c0-afbf24f83aa9" + } + ] + }, + "_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5", + "_org": "728", + "_created_at": "2022-06-03T15: 52: 27.512Z", + "_updated_at": "2022-06-03T16: 05: 15.029Z", + "price_options": { + "$relation": [ + { + "entity_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7", + "_tags": [] + }, + { + "entity_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741", + "_tags": [] + } + ] + } + }, + "properties": { + "description": { + "type": "string", + "description": "The description for the product" + }, + "code": { + "type": "string", + "description": "The product code" + }, + "type": { + "type": "string", + "description": "The type of Product:\n\n| type | description |\n|----| ----|\n| `product` | Represents a physical good |\n| `service` | Represents a service or virtual product |\n", + "enum": [ + "product", + "service" + ] + }, + "name": { + "type": "string", + "description": "The product main name" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The product categories" + }, + "feature": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "description": "An arbitrary set of tags attached to a feature", + "items": { + "type": "string" + } + }, + "feature": { + "type": "string" + } + } + } + }, + "cross_sellable_products": { + "type": "object", + "description": "Stores references to products that can be cross sold with the current product.", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + "product_images": { + "description": "Stores references to a set of file images of the product", + "oneOf": [ + { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/File" + } + } + ] + }, + "product_downloads": { + "description": "Stores references to a set of files downloadable from the product.\ne.g: tech specifications, quality control sheets, privacy policy agreements\n", + "oneOf": [ + { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/File" + } + } + ] + }, + "price_options": { + "type": "object", + "description": "A set of [prices](/api/pricing#tag/simple_price_schema) or [composite prices](/api/pricing#tag/dynamic_price_schema) for the current product.", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + "_availability_files": { + "type": "array", + "description": "Stores references to the availability files that define where this product is available.\nThese files are used when interacting with products via epilot Journeys, thought the AvailabilityCheck block.\n", + "items": { + "$ref": "#/components/schemas/File" + } + }, + "_id": { + "type": "string", + "description": "The product id" + }, + "_title": { + "type": "string", + "description": "The autogenerated product title" + }, + "_org_id": { + "type": "string", + "description": "The organization id the product belongs to" + }, + "_created_at": { + "type": "string", + "description": "The product creation date", + "readOnly": true + }, + "_updated_at": { + "type": "string", + "description": "The product last update date", + "readOnly": true + } + } + }, + "Opportunity": { + "type": "object", + "description": "The opportunity entity", + "additionalProperties": true, + "example": { + "opportunity_number": "OP 2022/335790", + "source": { + "title": "manual" + }, + "source_type": "manual", + "_schema": "opportunity", + "_title": "16 Module Solar Pack Lead", + "opportunity_title": "16 Module Solar Pack Lead", + "due_date": "2022-06-30T15:18:00.000Z", + "assignee": [ + { + "id": "10002563", + "email": "j.pinho@epilot.cloud", + "display_name": "j.pinho@epilot.cloud", + "token": "9e1758a3-2a32-4a5f-b034-a8ab883f8fb9", + "image_uri": "https://dummy-image.jpg", + "organization_id": "728", + "department": "Engineering", + "preferred_language": "en", + "status": "Active", + "phone": "+49123456789", + "email_notification_setting": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + }, + "is_signature_enabled": true, + "created_at": "2021-05-18T06:30:25.36046" + } + ], + "description": "Lead generated automatically via journey automation.", + "customer": { + "$relation": [ + { + "entity_id": "69bf4355-9c1e-498a-b87e-6c873668194d", + "_tags": [] + }, + { + "entity_id": "8625e2e4-978e-4d16-b3d2-0d05fb4091f0", + "_tags": [] + } + ] + }, + "dates": [ + { + "_tags": [ + "Installation Date" + ], + "dates": "", + "value": "2022-06-30T15:21:00.000Z" + } + ], + "items": { + "$relation": [ + { + "entity_id": "ff5fcdaf-9e36-4292-97f0-6a4e3f82a8f3" + }, + { + "entity_id": "ec10b7cf-95ce-4f6b-a266-c566c7734b96" + }, + { + "entity_id": "c3745dfe-4a46-4c22-8bf3-6159303474e4" + } + ] + }, + "billing_address": { + "$relation_ref": [ + { + "entity_id": "69bf4355-9c1e-498a-b87e-6c873668194d", + "path": "address.2" + } + ] + }, + "delivery_address": { + "$relation_ref": [ + { + "entity_id": "69bf4355-9c1e-498a-b87e-6c873668194d", + "path": "address.24" + } + ] + }, + "address": { + "$relation_ref": [ + { + "entity_id": "69bf4355-9c1e-498a-b87e-6c873668194d", + "path": "address.25" + } + ] + }, + "_id": "319a274b-0477-45e3-9d58-1f46c82d4604", + "_org": "728", + "_created_at": "2022-06-03T15:26:14.006Z", + "_updated_at": "2022-06-03T15:26:14.006Z" + }, + "properties": { + "opportunity_number": { + "type": "string", + "description": "The opportunity id number for the customer (autogenerated if left blank)" + }, + "opportunity_title": { + "type": "string", + "description": "The opportunity title for the opportunity" + }, + "description": { + "type": "string", + "description": "A description to frame this opportunity within its sales process" + }, + "status": { + "type": "string", + "description": "The opportunity status (defined by the opportunity workflow)" + }, + "due_date": { + "type": "string", + "description": "The expiration date" + }, + "assignee": { + "description": "The opportunity assignees", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "display_name": { + "type": "string" + }, + "token": { + "type": "string" + }, + "image_uri": { + "type": "string" + }, + "organization_id": { + "type": "string" + }, + "department": { + "type": "string" + }, + "preferred_language": { + "type": "string" + }, + "status": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "email_notification_settings": { + "type": "object" + }, + "is_signature_enabled": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + } + } + }, + "customer": { + "type": "object", + "description": "A list of customers related with the opportunity", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + "dates": { + "type": "array", + "description": "A set of dates associated with the opportunity", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "description": "The date tags", + "items": { + "type": "string" + } + }, + "value": { + "description": "The date value", + "type": "string" + } + } + } + ] + } + }, + "billing_address": { + "description": "The billing address", + "type": "object", + "properties": { + "$relation_ref": { + "description": "The relation from which a field is being referenced", + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "entity_id": { + "description": "The id of the referenced entity", + "type": "string" + }, + "path": { + "description": "The path to the target attribute being referenced", + "type": "string" + } + } + } + ] + } + } + } + }, + "delivery_address": { + "description": "The delivery address", + "type": "object", + "properties": { + "$relation_ref": { + "description": "The relation from which a field is being referenced", + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "entity_id": { + "description": "The id of the referenced entity", + "type": "string" + }, + "path": { + "description": "The path to the target attribute being referenced", + "type": "string" + } + } + } + ] + } + } + } + }, + "address": { + "description": "A list of additional addresses", + "type": "object", + "properties": { + "$relation_ref": { + "description": "The relation from which a field is being referenced", + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "entity_id": { + "description": "The id of the referenced entity", + "type": "string" + }, + "path": { + "description": "The path to the target attribute being referenced", + "type": "string" + } + } + } + ] + } + } + } + }, + "items": { + "type": "object", + "description": "The order relations items, representing quotes or orders associated with the opportunity", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrderRelation" + } + } + } + }, + "_org_id": { + "type": "string", + "description": "Organization Id the order belongs to" + }, + "_id": { + "type": "string", + "description": "The opportunity id", + "readOnly": true + }, + "_created_at": { + "type": "string", + "description": "The opportunity creation date", + "readOnly": true + }, + "_updated_at": { + "type": "string", + "description": "The opportunity last update date", + "readOnly": true + }, + "source_type": { + "type": "string", + "description": "Type of source, e.g. journey or manual", + "example": "journey" + }, + "source_id": { + "type": "string", + "description": "Identifier for source e.g. journey ID", + "example": "ce99875f-fba9-4fe2-a8f9-afaf52059051" + }, + "source": { + "$ref": "#/components/schemas/OpportunitySource" + }, + "_tags": { + "type": "array", + "description": "An arbitrary set of tags attached to the opportunity", + "items": { + "type": "string" + } + } + } + }, + "Order": { + "type": "object", + "description": "The order entity", + "additionalProperties": true, + "example": { + "order_number": "OR 2022/742701", + "status": "quote", + "source": { + "title": "manual", + "href": null + }, + "source_type": "manual", + "_schema": "order", + "_title": "OR 2022/742701", + "expires_at": "2022-06-30T16:17:00.000Z", + "line_items": [ + { + "price_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7", + "product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5", + "pricing_model": "per_unit", + "is_composite_price": false, + "taxes": [ + { + "tax": { + "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc", + "rate": 19, + "_schema": "tax", + "_org": "728", + "_created_at": "2021-09-24T15:06:13.859Z", + "_updated_at": "2022-04-04T17:36:15.273Z", + "_title": "Tax Standard", + "type": "VAT", + "active": true, + "region": "DE", + "description": "Standard" + }, + "amount": 255462 + } + ], + "_price": { + "_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7", + "unit_amount": 100000, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "1000", + "sales_tax": "standard", + "is_tax_inclusive": true, + "price_display_in_journeys": "show_price", + "type": "one_time", + "billing_period": "weekly", + "billing_duration_unit": "months", + "notice_time_unit": "months", + "termination_time_unit": "months", + "renewal_duration_unit": "months", + "_schema": "price", + "_title": "Solar Panel Module", + "description": "Solar Panel Module", + "active": true, + "pricing_model": "per_unit", + "is_composite_price": false, + "tax": { + "$relation": [ + { + "entity_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc" + } + ] + }, + "_org": "728", + "_created_at": "2022-06-03T16:04:10.369Z", + "_updated_at": "2022-06-03T16:04:10.369Z" + }, + "_product": { + "_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5", + "type": "product", + "_schema": "product", + "_title": "Solar Panel with Battery Storage", + "name": "Solar Panel with Battery Storage", + "code": "SOLAR-BATT", + "active": true, + "description": "Solar Panel with battery solution, optimized for max efficiency. ", + "feature": [ + { + "_tags": [], + "feature": "Eco-Panels" + }, + { + "_tags": [], + "feature": "Remote Management Platform" + }, + { + "_tags": [], + "feature": "Battery Remote Control" + }, + { + "_tags": [], + "feature": "Mobile App" + } + ], + "cross_sellable_products": { + "$relation": [ + { + "entity_id": "068d0713-a650-4668-9ed2-eca7be31e337", + "_schema": "product", + "_tags": [] + }, + { + "entity_id": "c8402ee7-fba9-4f3d-bffd-6803ca655782", + "_tags": [] + } + ] + }, + "product_images": { + "$relation": [ + { + "entity_id": "37bdeaaa-65fe-403e-9894-65b01cd277f1" + }, + { + "entity_id": "56dde657-795c-41bb-bf53-98fd586b7e6e" + } + ] + }, + "product_downloads": { + "$relation": [ + { + "entity_id": "64211361-8759-414b-81c0-afbf24f83aa9" + } + ] + }, + "_org": "728", + "_created_at": "2022-06-03T15:52:27.512Z", + "_updated_at": "2022-06-03T16:05:15.029Z", + "price_options": { + "$relation": [ + { + "entity_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7", + "_tags": [] + }, + { + "entity_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741", + "_tags": [] + } + ] + } + }, + "quantity": 16, + "currency": "EUR", + "description": "Solar Panel Module", + "unit_amount": 100000, + "unit_amount_net": 84034, + "amount_subtotal": 1344538, + "amount_total": 1600000 + }, + { + "price_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741", + "product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5", + "pricing_model": "per_unit", + "is_composite_price": false, + "taxes": [ + { + "tax": { + "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc", + "rate": 19, + "_schema": "tax", + "_org": "728", + "_created_at": "2021-09-24T15:06:13.859Z", + "_updated_at": "2022-04-04T17:36:15.273Z", + "_title": "Tax Standard", + "type": "VAT", + "active": true, + "region": "DE", + "description": "Standard" + }, + "amount": 31933 + } + ], + "_price": { + "_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741", + "unit_amount": 50000, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "500", + "sales_tax": "standard", + "is_tax_inclusive": true, + "price_display_in_journeys": "show_price", + "type": "one_time", + "billing_period": "weekly", + "billing_duration_unit": "months", + "notice_time_unit": "months", + "termination_time_unit": "months", + "renewal_duration_unit": "months", + "_schema": "price", + "_title": "Battery Module 500amps", + "description": "Battery Module 500amps", + "active": true, + "pricing_model": "per_unit", + "is_composite_price": false, + "tax": { + "$relation": [ + { + "entity_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc" + } + ] + }, + "_org": "728", + "_created_at": "2022-06-03T16:05:04.391Z", + "_updated_at": "2022-06-03T16:05:04.391Z" + }, + "_product": { + "_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5", + "type": "product", + "_schema": "product", + "_title": "Solar Panel with Battery Storage", + "name": "Solar Panel with Battery Storage", + "code": "SOLAR-BATT", + "active": true, + "description": "Solar Panel with battery solution, optimized for max efficiency. ", + "feature": [ + { + "_tags": [], + "feature": "Eco-Panels" + }, + { + "_tags": [], + "feature": "Remote Management Platform" + }, + { + "_tags": [], + "feature": "Battery Remote Control" + }, + { + "_tags": [], + "feature": "Mobile App" + } + ], + "cross_sellable_products": { + "$relation": [ + { + "entity_id": "068d0713-a650-4668-9ed2-eca7be31e337", + "_schema": "product", + "_tags": [] + }, + { + "entity_id": "c8402ee7-fba9-4f3d-bffd-6803ca655782", + "_tags": [] + } + ] + }, + "product_images": { + "$relation": [ + { + "entity_id": "37bdeaaa-65fe-403e-9894-65b01cd277f1" + }, + { + "entity_id": "56dde657-795c-41bb-bf53-98fd586b7e6e" + } + ] + }, + "product_downloads": { + "$relation": [ + { + "entity_id": "64211361-8759-414b-81c0-afbf24f83aa9" + } + ] + }, + "_org": "728", + "_created_at": "2022-06-03T15:52:27.512Z", + "_updated_at": "2022-06-03T16:05:15.029Z", + "price_options": { + "$relation": [ + { + "entity_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7", + "_tags": [] + }, + { + "entity_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741", + "_tags": [] + } + ] + } + }, + "quantity": 4, + "currency": "EUR", + "description": "Battery Module 500amps", + "unit_amount": 50000, + "unit_amount_net": 42017, + "amount_subtotal": 168067, + "amount_total": 200000 + }, + { + "price_id": "d88a8763-3e3d-4fc7-a7a5-2bc9117148bf", + "product_id": "065d6618-cc59-45f4-8e3a-700edf6813c3", + "pricing_model": "per_unit", + "is_composite_price": false, + "_price": { + "_id": "d88a8763-3e3d-4fc7-a7a5-2bc9117148bf", + "unit_amount": 12055, + "type": "recurring", + "billing_period": "monthly", + "billing_duration_amount": 8, + "billing_duration_unit": "years", + "notice_time_amount": 3, + "notice_time_unit": "months", + "termination_time_amount": 2, + "termination_time_unit": "months", + "renewal_duration_amount": 1, + "renewal_duration_unit": "years", + "active": true, + "sales_tax": "reduced", + "is_tax_inclusive": true, + "description": "Monthly", + "billing_scheme": "per_unit", + "_schema": "price", + "_org": "728", + "_created_at": "2021-11-10T14:40:27.695Z", + "_updated_at": "2021-12-14T18:16:33.248Z", + "_title": "Monthly", + "unit_amount_currency": "EUR", + "unit_amount_decimal": "120.55456634", + "pricing_model": "per_unit", + "is_composite_price": false + }, + "_product": { + "_id": "065d6618-cc59-45f4-8e3a-700edf6813c3", + "name": "Smartmeter: Schneider Electric PM5000 LCD Energiemessgerät / 3-phasig", + "code": "1312378123", + "_tags": [ + "wallbox", + "review demo", + "1" + ], + "categories": [ + "Power" + ], + "type": "product", + "active": true, + "feature": [ + { + "_tags": [], + "feature": "Bis zu 11 kW Ladeleistung (5x schneller laden)" + }, + { + "_tags": [], + "feature": "Integrierter MID Zähler für eine kilowattstundengenaue Abrechnung*" + }, + { + "_tags": [], + "feature": "Konfigurierbare Ladeleistung" + }, + { + "_tags": [], + "feature": "Zugangskontrolle über RFID-Karten" + }, + { + "_tags": [], + "feature": "Kommunikation über LAN" + }, + { + "_tags": [], + "feature": "New feature" + } + ], + "_schema": "product", + "_org": "728", + "_created_at": "2021-11-30T11:05:19.484Z", + "_updated_at": "2022-01-13T09:18:29.944Z", + "_title": "Smartmeter: Schneider Electric PM5000 LCD Energiemessgerät / 3-phasig", + "price_options": { + "$relation": [ + { + "entity_id": "5264b089-fc6a-4a91-9a2a-80c673958faa" + }, + { + "entity_id": "d88a8763-3e3d-4fc7-a7a5-2bc9117148bf" + } + ] + }, + "product_images": { + "$relation": [ + { + "entity_id": "16729e60-c527-44ef-93c9-c68b6acf1224" + } + ] + } + }, + "quantity": 1, + "currency": "EUR", + "description": "Monthly", + "unit_amount": 12055, + "unit_amount_net": 11267, + "amount_subtotal": 11267, + "amount_total": 12055, + "taxes": [ + { + "rate": "reduced", + "amount": 789 + } + ] + }, + { + "price_id": "e1ddf75a-d0d1-40b4-a07e-56e292867c88", + "product_id": "5b9f05b7-f0f8-49c2-8a8d-0f8f923d6382", + "pricing_model": "per_unit", + "is_composite_price": false, + "_price": { + "_id": "e1ddf75a-d0d1-40b4-a07e-56e292867c88", + "unit_amount": 9900, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "99", + "sales_tax": "standard", + "is_tax_inclusive": true, + "price_display_in_journeys": "show_price", + "type": "recurring", + "billing_period": "yearly", + "billing_duration_unit": "months", + "notice_time_unit": "months", + "termination_time_unit": "months", + "renewal_duration_unit": "months", + "_schema": "price", + "_title": "Yearly payment", + "description": "Yearly payment", + "active": true, + "pricing_model": "per_unit", + "is_composite_price": false, + "_org": "728", + "_created_at": "2022-02-07T22:58:39.884Z", + "_updated_at": "2022-02-07T22:58:39.884Z" + }, + "_product": { + "_id": "5b9f05b7-f0f8-49c2-8a8d-0f8f923d6382", + "_schema": "product", + "_title": "Yearly Payment Product", + "name": "Yearly Payment Product", + "type": "product", + "active": true, + "price_options": { + "$relation": [ + { + "entity_id": "e1ddf75a-d0d1-40b4-a07e-56e292867c88", + "_tags": [] + } + ] + }, + "_org": "728", + "_created_at": "2022-02-07T22:58:44.162Z", + "_updated_at": "2022-02-08T09:34:08.026Z", + "description": "Hier steht die Produktbeschreibung die sich auf dem Dokument, was generiert wird, gezogen wird." + }, + "quantity": 1, + "currency": "EUR", + "description": "Yearly payment", + "unit_amount": 9900, + "unit_amount_net": 8319, + "amount_subtotal": 8319, + "amount_total": 9900, + "taxes": [ + { + "rate": "standard", + "amount": 1581 + } + ] + } + ], + "amount_subtotal": 1532191, + "amount_total": 1821955, + "total_details": { + "amount_tax": 289764, + "breakdown": { + "taxes": [ + { + "tax": { + "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc", + "rate": 19, + "_schema": "tax", + "_org": "728", + "_created_at": "2021-09-24T15:06:13.859Z", + "_updated_at": "2022-04-04T17:36:15.273Z", + "_title": "Tax Standard", + "type": "VAT", + "active": true, + "region": "DE", + "description": "Standard" + }, + "amount": 287395 + } + ], + "recurrences": [ + { + "type": "one_time", + "amount_subtotal": 1512605, + "amount_subtotal_decimal": "15126.05", + "amount_total": 1800000, + "amount_total_decimal": "18000.00", + "amount_tax": 287395, + "amount_tax_decimal": "2873.95" + }, + { + "type": "recurring", + "billing_period": "monthly", + "amount_subtotal": 11267, + "amount_subtotal_decimal": "112.67", + "amount_total": 12055, + "amount_total_decimal": "120.55", + "amount_tax": 789, + "amount_tax_decimal": "7.89" + }, + { + "type": "recurring", + "billing_period": "yearly", + "amount_subtotal": 8319, + "amount_subtotal_decimal": "83.19", + "amount_total": 9900, + "amount_total_decimal": "99.00", + "amount_tax": 1581, + "amount_tax_decimal": "15.81" + } + ] + } + }, + "currency": "EUR", + "payment_method": [ + { + "type": "IBAN", + "details": {} + } + ], + "billing_contact": { + "$relation": [ + { + "entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5", + "_tags": [] + } + ] + }, + "billing_first_name": "Joao", + "billing_last_name": "Pinho", + "billing_email": "j.pinho@epilot.cloud", + "billing_company_name": "epilot cloud", + "billing_address": [ + { + "_tags": [], + "street": "Im Media Park", + "street_number": "8a", + "postal_code": "52000", + "city": "Cologne", + "country": "DE", + "additional_info": "" + } + ], + "delivery_address": [], + "dates": [ + { + "_tags": [ + "Instalation Date" + ], + "dates": "", + "value": "2022-06-30T16:29:00.000Z" + } + ], + "_id": "4c7c9562-f8f0-4af0-a3a6-6aebc5571a6e", + "_org": "728", + "_created_at": "2022-06-03T16:29:46.303Z", + "_updated_at": "2022-06-03T16:29:46.303Z" + }, + "properties": { + "order_number": { + "type": "string", + "description": "The order number (customer facing)" + }, + "cart_id": { + "type": "string", + "description": "The cart id that originated or is associated with the this order" + }, + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "source_type": { + "type": "string", + "description": "Type of source, e.g. journey or manual", + "example": "journey" + }, + "source_id": { + "type": "string", + "description": "Identifier for source e.g. journey ID", + "example": "ce99875f-fba9-4fe2-a8f9-afaf52059051" + }, + "source": { + "$ref": "#/components/schemas/OrderSource" + }, + "metadata": { + "$ref": "#/components/schemas/MetaData" + }, + "customer": { + "type": "object", + "description": "A list of customers related with the opportunity", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + "billing_first_name": { + "type": "string", + "description": "The billing contact first name" + }, + "billing_last_name": { + "type": "string", + "description": "The billing contact last name" + }, + "billing_company_name": { + "type": "string", + "description": "The billing account name" + }, + "billing_vat": { + "type": "string", + "description": "The billing account VAT" + }, + "billing_email": { + "type": "string", + "description": "The billing email" + }, + "billing_phone": { + "type": "string", + "description": "The billing phone" + }, + "billing_address": { + "type": "array", + "description": "The billing address", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "currency": { + "description": "The order main currency", + "oneOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + }, + "delivery_address": { + "type": "array", + "description": "The delivery address", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "payment_method": { + "type": "array", + "description": "The payment method details for the order", + "items": { + "$ref": "#/components/schemas/PaymentMethod" + } + }, + "line_items": { + "$ref": "#/components/schemas/PriceItems" + }, + "products": { + "type": "object", + "description": "The product entities referenced from within `line_items`", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + "prices": { + "type": "object", + "description": "The price entities referenced from within `line_items`", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + "coupons": { + "type": "object", + "description": "The coupons referenced from within `line_items`", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + "amount_subtotal": { + "readOnly": true, + "type": "integer", + "description": "Total of all items before (discounts or) taxes are applied." + }, + "amount_total": { + "readOnly": true, + "type": "integer", + "description": "Total of all items after (discounts and) taxes are applied." + }, + "total_details": { + "$ref": "#/components/schemas/TotalDetails" + }, + "_org_id": { + "type": "string", + "description": "Organization Id the order belongs to" + }, + "_id": { + "type": "string", + "description": "The order id", + "readOnly": true + }, + "_created_at": { + "type": "string", + "description": "The order creation date", + "readOnly": true + }, + "_updated_at": { + "type": "string", + "description": "The order last update date", + "readOnly": true + }, + "_tags": { + "type": "array", + "description": "An arbitrary set of tags attached to the order", + "items": { + "type": "string" + } + } + } + }, + "Price": { + "allOf": [ + { + "$ref": "#/components/schemas/PriceConditions" + } + ], + "type": "object", + "description": "The price entity schema for simple pricing", + "example": { + "unit_amount": 100000, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "1000", + "sales_tax": "standard", + "is_tax_inclusive": true, + "price_display_in_journeys": "show_price", + "type": "one_time", + "billing_period": "weekly", + "billing_duration_unit": "months", + "notice_time_unit": "months", + "termination_time_unit": "months", + "renewal_duration_unit": "months", + "_schema": "price", + "_title": "Solar Panel Module", + "description": "Solar Panel Module", + "active": true, + "_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7", + "_org": "728", + "_created_at": "2022-06-03T16:04:10.369Z", + "_updated_at": "2022-06-03T16:04:10.369Z", + "pricing_model": "per_unit", + "is_composite_price": false + }, + "additionalProperties": true, + "readOnly": true, + "properties": { + "active": { + "type": "boolean", + "description": "Whether the price can be used for new purchases." + }, + "is_composite_price": { + "description": "The flag for prices that contain price components.", + "type": "boolean", + "enum": [ + false + ] + }, + "pricing_model": { + "type": "string", + "description": "Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.\n - `dynamic_tariff` indicates that the price is dynamically dependend on the (quarter)-hourly spot market price.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n", + "enum": [ + "per_unit", + "tiered_graduated", + "tiered_volume", + "tiered_flatfee", + "dynamic_tariff", + "external_getag" + ] + }, + "tiers": { + "description": "Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.\n", + "type": "array", + "items": { + "$ref": "#/components/schemas/PriceTier" + } + }, + "description": { + "type": "string", + "description": "A brief description of the price." + }, + "long_description": { + "type": "string", + "description": "A detailed description of the price. This is shown on the order document and order table." + }, + "sales_tax": { + "deprecated": true, + "description": "The default tax rate applicable to the product.\nThis field is deprecated, use the new `tax` attribute.\n", + "oneOf": [ + { + "$ref": "#/components/schemas/SalesTax" + } + ] + }, + "tax": { + "description": "The default tax rate applied to the price", + "oneOf": [ + { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tax" + } + } + ] + }, + "is_tax_inclusive": { + "type": "boolean", + "description": "Specifies whether the price is considered `inclusive` of taxes or not." + }, + "type": { + "type": "string", + "description": "One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.", + "enum": [ + "one_time", + "recurring" + ] + }, + "billing_period": { + "description": "For recurring prices `billing_period` defines the default extent of the recurrence.", + "oneOf": [ + { + "$ref": "#/components/schemas/BillingPeriod" + } + ] + }, + "unit_amount": { + "description": "The unit amount in cents to be charged, represented as a whole integer if possible.", + "type": "number" + }, + "unit_amount_decimal": { + "description": "The unit amount in eur to be charged, represented as a decimal string with at most 12 decimal places.", + "type": "string" + }, + "unit_amount_currency": { + "description": "Three-letter ISO currency code, in lowercase.", + "oneOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + }, + "price_display_in_journeys": { + "description": "Defines the way the price amount is display in epilot journeys.", + "type": "string", + "enum": [ + "show_price", + "show_as_starting_price", + "show_as_on_request", + "estimated_price" + ] + }, + "variable_price": { + "description": "The flag for prices that can be influenced by external variables such as user input.", + "type": "boolean" + }, + "unit": { + "description": "The unit of measurement used for display purposes and possibly for calculations when the price is variable.", + "anyOf": [ + { + "type": "string", + "description": "built-in units", + "enum": [ + "kw", + "kwh", + "m", + "m2", + "l", + "cubic-meter", + "cubic-meter-h", + "ls", + "a", + "kva", + "w", + "wp", + "kwp" + ] + }, + { + "type": "string", + "description": "user custom unit" + } + ] + }, + "get_ag": { + "$ref": "#/components/schemas/PriceGetAg" + }, + "dynamic_tariff": { + "$ref": "#/components/schemas/PriceDynamicTariff" + }, + "_created_at": { + "description": "The price creation date", + "type": "string" + }, + "_id": { + "description": "The price id", + "type": "string" + }, + "_title": { + "description": "The price autogenerated title", + "type": "string" + }, + "_updated_at": { + "description": "The price last update date", + "type": "string" + }, + "_org_id": { + "type": "string", + "description": "The organization id the price belongs to" + }, + "_tags": { + "type": "array", + "description": "An arbitrary set of tags attached to the price", + "items": { + "type": "string" + } + } + }, + "required": [ + "pricing_model" + ] + }, + "BaseCompositePrice": { + "allOf": [ + { + "$ref": "#/components/schemas/PriceConditions" + } + ], + "type": "object", + "description": "The common properties for a composite price entity, without the price components", + "example": { + "_id": "c2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", + "_schema": "price", + "_title": "My Composite Price", + "description": "My Composite Price", + "_org": "739224", + "_created_at": "2022-02-18T10:10:26.439Z", + "_updated_at": "2022-02-18T11:53:04.191Z", + "active": true, + "is_composite_price": true, + "price_components": { + "$relation": [ + { + "entity_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", + "_schema": "price", + "_product_id": "target-price-product-id", + "quantity": 1, + "item": { + "_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", + "unit_amount": 10000, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "100.00", + "sales_tax": "standard", + "is_tax_inclusive": false, + "price_display_in_journeys": "show_price", + "type": "one_time", + "_schema": "price", + "_title": "Test 1", + "description": "Test 1", + "tax": { + "$relation": [ + { + "entity_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4" + } + ] + }, + "_org": "739224", + "_created_at": "2022-02-18T10:10:26.439Z", + "_updated_at": "2022-02-18T11:53:04.191Z", + "active": true, + "billing_period": "weekly", + "billing_duration_unit": "months", + "notice_time_unit": "months", + "termination_time_unit": "months", + "renewal_duration_unit": "months", + "is_composite_price": false + } + }, + { + "entity_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", + "_schema": "price", + "_product_id": "target-price-product-id", + "quantity": 2, + "item": { + "_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", + "unit_amount": 10000, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "100.00", + "sales_tax": "standard", + "is_tax_inclusive": false, + "price_display_in_journeys": "show_price", + "type": "one_time", + "_schema": "price", + "_title": "Test 1", + "description": "Test 1", + "tax": { + "$relation": [ + { + "entity_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4" + } + ] + }, + "_org": "739224", + "_created_at": "2022-02-18T10:10:26.439Z", + "_updated_at": "2022-02-18T11:53:04.191Z", + "active": true, + "billing_period": "weekly", + "billing_duration_unit": "months", + "notice_time_unit": "months", + "termination_time_unit": "months", + "renewal_duration_unit": "months", + "is_composite_price": false + } + } + ] + } + }, + "additionalProperties": true, + "readOnly": true, + "required": [ + "is_composite_price" + ], + "properties": { + "active": { + "type": "boolean", + "description": "Whether the price can be used for new purchases." + }, + "description": { + "type": "string", + "description": "A brief description of the price." + }, + "price_components": { + "description": "A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price.", + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Price" + } + }, + { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PriceComponentRelation" + } + } + } + } + ] + }, + "unit_amount_currency": { + "description": "Three-letter ISO currency code, in lowercase.", + "oneOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + }, + "is_composite_price": { + "description": "The flag for prices that contain price components.", + "type": "boolean", + "enum": [ + true + ] + }, + "_created_at": { + "description": "The price creation date", + "type": "string" + }, + "_id": { + "description": "The price id", + "type": "string" + }, + "_title": { + "description": "The price autogenerated title", + "type": "string" + }, + "_updated_at": { + "description": "The price last update date", + "type": "string" + }, + "_org_id": { + "type": "string", + "description": "The organization id the price belongs to" + }, + "_tags": { + "type": "array", + "description": "An arbitrary set of tags attached to the composite price", + "items": { + "type": "string" + } + } + } + }, + "NonHydratedCompositePrice": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseCompositePrice" + } + ], + "type": "object", + "description": "The composite price entity", + "properties": { + "price_components": { + "description": "A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price.", + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PriceComponentRelation" + } + } + } + } + } + }, + "HydratedCompositePrice": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseCompositePrice" + } + ], + "type": "object", + "description": "The composite price entity", + "properties": { + "price_components": { + "description": "A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Price" + } + } + } + }, + "CompositePrice": { + "anyOf": [ + { + "$ref": "#/components/schemas/NonHydratedCompositePrice" + }, + { + "$ref": "#/components/schemas/HydratedCompositePrice" + } + ], + "description": "The composite price entity", + "example": { + "_id": "c2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", + "_schema": "price", + "_title": "My Composite Price", + "description": "My Composite Price", + "_org": "739224", + "_created_at": "2022-02-18T10:10:26.439Z", + "_updated_at": "2022-02-18T11:53:04.191Z", + "active": true, + "is_composite_price": true, + "price_components": { + "$relation": [ + { + "entity_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", + "_schema": "price", + "_product_id": "target-price-product-id", + "quantity": 1, + "item": { + "_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", + "unit_amount": 10000, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "100.00", + "sales_tax": "standard", + "is_tax_inclusive": false, + "price_display_in_journeys": "show_price", + "type": "one_time", + "_schema": "price", + "_title": "Test 1", + "description": "Test 1", + "tax": { + "$relation": [ + { + "entity_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4" + } + ] + }, + "_org": "739224", + "_created_at": "2022-02-18T10:10:26.439Z", + "_updated_at": "2022-02-18T11:53:04.191Z", + "active": true, + "billing_period": "weekly", + "billing_duration_unit": "months", + "notice_time_unit": "months", + "termination_time_unit": "months", + "renewal_duration_unit": "months", + "is_composite_price": false + } + }, + { + "entity_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", + "_schema": "price", + "_product_id": "target-price-product-id", + "quantity": 2, + "item": { + "_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", + "unit_amount": 10000, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "100.00", + "sales_tax": "standard", + "is_tax_inclusive": false, + "price_display_in_journeys": "show_price", + "type": "one_time", + "_schema": "price", + "_title": "Test 1", + "description": "Test 1", + "tax": { + "$relation": [ + { + "entity_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4" + } + ] + }, + "_org": "739224", + "_created_at": "2022-02-18T10:10:26.439Z", + "_updated_at": "2022-02-18T11:53:04.191Z", + "active": true, + "billing_period": "weekly", + "billing_duration_unit": "months", + "notice_time_unit": "months", + "termination_time_unit": "months", + "renewal_duration_unit": "months", + "is_composite_price": false + } + } + ] + } + } + }, + "PriceComponentRelation": { + "type": "object", + "properties": { + "entity_id": { + "description": "The id of the price component", + "type": "string" + }, + "quantity": { + "description": "By default, the quantity is set to 1, when greater than 1 this value is used as a multiplicative factor.\nE.g: 16 x Solar Modules - Premium price.\n", + "type": "number" + }, + "_tags": { + "type": "array", + "description": "An arbitrary set of tags attached to the composite price - component relation", + "items": { + "type": "string" + } + } + } + }, + "MetaData": { + "description": "A set of key-value pairs used to store meta data information about an entity.", + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "description": "Key value pair entry", + "properties": { + "key": { + "type": "string", + "description": "Item key" + }, + "value": { + "type": "string", + "description": "Item value" + } + } + } + ] + } + }, + "PriceInputMappings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PriceInputMapping" + }, + "example": [ + { + "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F", + "frequency_unit": "weekly", + "value": 1000.245, + "name": "avg consumption", + "metadata": { + "journey_title": "energy journey", + "step_name": "avg consumption picker" + } + } + ] + }, + "PriceInputMapping": { + "type": "object", + "properties": { + "price_id": { + "type": "string" + }, + "frequency_unit": { + "type": "string", + "enum": [ + "weekly", + "monthly", + "every_quarter", + "every_6_months", + "yearly", + "one_time" + ] + }, + "name": { + "type": "string" + }, + "value": { + "type": "number" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "example": { + "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F", + "frequency_unit": "weekly", + "value": 1000.245, + "name": "avg consumption", + "metadata": { + "journey_title": "energy journey", + "step_name": "avg consumption picker" + } + } + }, + "PriceConditions": { + "type": "object", + "properties": { + "billing_duration_amount": { + "description": "The billing period duration", + "type": "number", + "nullable": true + }, + "billing_duration_unit": { + "description": "The billing period duration unit", + "type": "string", + "enum": [ + "days", + "weeks", + "months", + "years" + ], + "nullable": true + }, + "notice_time_amount": { + "description": "The notice period duration", + "type": "number", + "nullable": true + }, + "notice_time_unit": { + "description": "The notice period duration unit", + "type": "string", + "enum": [ + "days", + "weeks", + "months", + "years" + ], + "nullable": true + }, + "termination_time_amount": { + "description": "The termination period duration", + "type": "number", + "nullable": true + }, + "termination_time_unit": { + "description": "The termination period duration unit", + "type": "string", + "enum": [ + "days", + "weeks", + "months", + "years" + ], + "nullable": true + }, + "renewal_duration_amount": { + "description": "The renewal period duration", + "type": "number", + "nullable": true + }, + "renewal_duration_unit": { + "description": "The renewal period duration unit", + "type": "string", + "enum": [ + "days", + "weeks", + "months", + "years" + ], + "nullable": true + } + } + }, + "ExternalFeeMetadata": { + "allOf": [ + { + "$ref": "#/components/schemas/ComputePriceResult" + } + ], + "type": "object", + "properties": { + "inputs": { + "type": "object", + "additionalProperties": true + } + } + }, + "ExternalPriceMetadata": { + "allOf": [ + { + "$ref": "#/components/schemas/AverageMarketPriceResult" + } + ], + "type": "object", + "properties": { + "inputs": { + "type": "object", + "additionalProperties": true + } + } + }, + "ExternalFeeMappings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalFeeMapping" + }, + "example": [ + { + "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F", + "frequency_unit": "weekly", + "amount_total": 1000, + "amount_total_decimal": "10.00" + } + ] + }, + "ExternalFeeMapping": { + "type": "object", + "properties": { + "price_id": { + "type": "string" + }, + "frequency_unit": { + "type": "string", + "enum": [ + "weekly", + "monthly", + "every_quarter", + "every_6_months", + "yearly", + "one_time" + ] + }, + "amount_total": { + "type": "number" + }, + "amount_total_decimal": { + "type": "string" + } + }, + "example": { + "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F", + "frequency_unit": "weekly", + "amount_total": 1000, + "amount_total_decimal": "10.00" + } + }, + "CatalogSearch": { + "description": "A catalog search payload", + "type": "object", + "properties": { + "q": { + "description": "The query to perform using lucene query syntax.", + "type": "string" + }, + "sort": { + "description": "The sort expression to sort the results.", + "type": "string" + }, + "from": { + "description": "The index from which to query, used for pagination purposes. Defaults to 0", + "type": "number" + }, + "size": { + "description": "The max size of the response, defaults to 2000.", + "type": "number" + }, + "hydrate": { + "type": "boolean", + "description": "When true, enables entity hydration to resolve nested $relation references in-place.", + "default": false + }, + "availability": { + "$ref": "#/components/schemas/AvailabilityFilters" + } + }, + "example": { + "q": "_id:1233432 OR _id:123432454 OR _id:23445433", + "sort": "description ASC", + "from": 0, + "size": 200 + }, + "required": [ + "q" + ] + }, + "CatalogSearchResult": { + "description": "The query result payload", + "type": "object", + "properties": { + "hits": { + "type": "number", + "description": "The number of results returned." + }, + "results": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Product" + }, + { + "$ref": "#/components/schemas/Price" + }, + { + "$ref": "#/components/schemas/Coupon" + } + ] + } + } + }, + "example": { + "hits": 2, + "results": [ + { + "schema": "product", + "description": "product a" + }, + { + "schema": "price", + "unit_amount_decimal": "124.342343434" + } + ] + } + }, + "SearchProvidersParams": { + "description": "A search providers payload", + "type": "object", + "properties": { + "type": { + "description": "The provider type (power or gas)", + "type": "string", + "enum": [ + "power", + "gas" + ] + }, + "postal_code": { + "description": "The postal code to search for providers", + "type": "string" + }, + "city": { + "description": "The city to search for providers", + "type": "string", + "nullable": true + }, + "street": { + "description": "The street to search for providers", + "type": "string", + "nullable": true + }, + "street_number": { + "description": "The street number to search for providers", + "type": "string", + "nullable": true + } + }, + "required": [ + "type", + "postal_code" + ] + }, + "SearchStreetsParams": { + "description": "A search streets payload", + "type": "object", + "properties": { + "postal_code": { + "description": "The postal code to search for providers", + "type": "string" + }, + "city": { + "description": "The city to search for providers", + "type": "string", + "nullable": true + } + }, + "required": [ + "city", + "postal_code" + ] + }, + "AvailabilityCheckParams": { + "description": "Availability check request payload", + "type": "object", + "properties": { + "products": { + "description": "Products to check availability", + "type": "array", + "items": { + "type": "string", + "description": "Product under availability check" + } + }, + "filters": { + "$ref": "#/components/schemas/AvailabilityFilters" + } + }, + "required": [ + "products", + "filters" + ] + }, + "AvailabilityResult": { + "description": "The product availability check result payload", + "type": "object", + "properties": { + "available_products": { + "type": "array", + "items": { + "type": "string", + "description": "Available Products" + } + }, + "check_results": { + "description": "The check result details", + "type": "array", + "items": { + "type": "object", + "properties": { + "product_id": { + "type": "string" + }, + "matching_hits": { + "description": "The number of rules matched", + "type": "number" + }, + "matching_error": { + "description": "A set of matching errors when checking availability", + "type": "object", + "additionalProperties": true + } + }, + "required": [ + "product_id" + ] + } + } + }, + "required": [ + "available_products" + ], + "example": { + "available_products": [], + "check_results": [ + { + "product_id": "my-product-id-123-1", + "matching_hits": 0 + }, + { + "product_id": "my-product-id-123-2", + "matching_hits": 0 + } + ] + } + }, + "ValidateAvailabilityFileError": { + "description": "The availability rule error", + "type": "object", + "properties": { + "line": { + "description": "The line number where the error was found", + "type": "number" + }, + "msg": { + "description": "The error message", + "type": "string" + }, + "data": { + "description": "Data related to the error", + "type": "string" + } + }, + "required": [ + "msg" + ] + }, + "IntegrationCredentialsResult": { + "$ref": "#/components/schemas/IntegrationAuthCredentials" + }, + "SaveIntegrationCredentialsParams": { + "$ref": "#/components/schemas/IntegrationAuthCredentials" + }, + "ComputePriceParamsBase": { + "type": "object", + "properties": { + "postal_code": { + "description": "The postal code to search for providers", + "type": "string" + }, + "consumption_type": { + "description": "The consumption type", + "type": "string", + "default": "household", + "enum": [ + "household", + "heating_pump", + "night_storage_heating", + "night_storage_heating_common_meter" + ] + }, + "consumption": { + "description": "(DEPRECATED - use consumption_HT) The yearly consumption to compute the price in kWh", + "type": "number" + }, + "consumption_HT": { + "description": "The yearly HT consumption to compute the price in kWh", + "type": "number" + }, + "consumption_NT": { + "description": "The yearly NT consumption to compute the price in kWh", + "type": "number" + }, + "association_id": { + "description": "The association id", + "type": "string" + }, + "billing_period": { + "description": "The billing period (defaults to monthly)", + "type": "string", + "enum": [ + "weekly", + "monthly", + "every_quarter", + "every_6_months", + "yearly", + "one_time" + ], + "default": "monthly" + }, + "reference_date": { + "description": "The optional reference date for the price computation (ISO 8601 format)", + "type": "string", + "format": "date" + } + }, + "required": [ + "type", + "postal_code" + ] + }, + "ComputePriceParamsPower": { + "allOf": [ + { + "$ref": "#/components/schemas/ComputePriceParamsBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of energy to compute the price", + "enum": [ + "power" + ] + }, + "meter_type": { + "$ref": "#/components/schemas/PowerMeterType" + } + }, + "description": "The compute price payload for power" + } + ] + }, + "ComputePriceParamsGas": { + "allOf": [ + { + "$ref": "#/components/schemas/ComputePriceParamsBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of energy to compute the price", + "enum": [ + "gas" + ] + }, + "concession_type": { + "$ref": "#/components/schemas/GasConcessionType" + } + }, + "description": "The compute price payload for gas" + } + ] + }, + "SignatureMeta": { + "type": "object", + "description": "Signature meta data payload", + "properties": { + "signature": { + "description": "The signature hash of the payload", + "type": "string" + }, + "timestamp": { + "description": "Timestamp of the signature", + "type": "number" + } + }, + "required": [ + "timestamp", + "signature" + ] + }, + "ComputedBasePrice": { + "type": "object", + "description": "The computed price", + "properties": { + "amount": { + "description": "The computed price", + "type": "number" + }, + "amount_decimal": { + "description": "The computed price as decimal", + "type": "string" + }, + "unit_amount": { + "description": "The computed unit price", + "type": "number" + }, + "unit_amount_decimal": { + "description": "The computed unit price as decimal", + "type": "string" + } + }, + "required": [ + "amount", + "amount_decimal" + ] + }, + "ComputePriceParams": { + "description": "The compute price payload", + "oneOf": [ + { + "$ref": "#/components/schemas/ComputePriceParamsPower" + }, + { + "$ref": "#/components/schemas/ComputePriceParamsGas" + } + ] + }, + "GasConcessionType": { + "description": "The concession type for gas", + "type": "string", + "enum": [ + "standard", + "special" + ] + }, + "PowerMeterType": { + "type": "string", + "description": "The meter type for power", + "enum": [ + "classic", + "smart", + "digital" + ] + }, + "DynamicTariffMode": { + "description": "The mode of the dynamic tariff. `day_ahead_market` uses the Day-Ahead spot market price as base.", + "type": "string", + "enum": [ + "day_ahead_market", + "manual" + ] + }, + "DynamicTariffInterval": { + "description": "The interval of the tariff if a spot market price is used as base.", + "type": "string", + "enum": [ + "hourly", + "monthly_average" + ] + }, + "ComputedPriceBreakdown": { + "type": "object", + "description": "Price breakdown", + "properties": { + "static": { + "$ref": "#/components/schemas/ComputedPriceComponents" + }, + "variable": { + "$ref": "#/components/schemas/ComputedPriceComponents" + }, + "variable_ht": { + "$ref": "#/components/schemas/ComputedPriceComponents" + }, + "variable_nt": { + "$ref": "#/components/schemas/ComputedPriceComponents" + } + } + }, + "ComputedPriceComponents": { + "type": "object", + "description": "The computed price components", + "additionalProperties": { + "$ref": "#/components/schemas/ComputedBasePrice" + } + }, + "ComputePriceResult": { + "type": "object", + "properties": { + "amount_total": { + "description": "The computed total price", + "type": "number" + }, + "amount_total_decimal": { + "description": "The computed total price as decimal", + "type": "string" + }, + "amount_static": { + "description": "The computed static price", + "type": "number" + }, + "amount_static_decimal": { + "description": "The computed static price as decimal" + }, + "amount_variable_ht": { + "description": "The computed variable price, for the day period", + "type": "number" + }, + "amount_variable_decimal_ht": { + "description": "The computed variable price, for the day period, as decimal", + "type": "string" + }, + "unit_amount_variable_ht": { + "description": "The computed unit price, for the day period", + "type": "number" + }, + "unit_amount_variable_decimal_ht": { + "description": "The computed unit price, for the day period, as decimal", + "type": "string" + }, + "amount_variable_nt": { + "description": "The computed variable price, for the night period", + "type": "number" + }, + "amount_variable_decimal_nt": { + "description": "The computed variable price, for the night period, as decimal", + "type": "string" + }, + "unit_amount_variable_nt": { + "description": "The computed unit price, for the night period", + "type": "number" + }, + "unit_amount_variable_decimal_nt": { + "description": "The computed unit price, for the night period, as decimal", + "type": "string" + }, + "currency": { + "description": "The currency of the computed price (three-letter ISO currency code)", + "oneOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + }, + "billing_period": { + "description": "The billing period", + "type": "string", + "enum": [ + "weekly", + "monthly", + "every_quarter", + "every_6_months", + "yearly", + "one_time" + ] + }, + "breakdown": { + "$ref": "#/components/schemas/ComputedPriceBreakdown" + }, + "_meta": { + "$ref": "#/components/schemas/SignatureMeta" + } + }, + "required": [ + "amount_total", + "amount_total_decimal", + "currency", + "billing_period", + "breakdown" + ] + }, + "SpotMarketBiddingZone": { + "description": "The bidding zone for a spot market price.", + "type": "string", + "enum": [ + "AT", + "DE-LU" + ] + }, + "SpotMarketType": { + "description": "The market for a spot market price.", + "type": "string", + "enum": [ + "day_ahead" + ] + }, + "SpotMarketDataFrequency": { + "description": "The aggregation frequency for a series of spot market price data.", + "type": "string", + "enum": [ + "PT15M", + "PT1H", + "P1D", + "P1M" + ] + }, + "HistoricMarketPricesResult": { + "type": "object", + "properties": { + "market": { + "$ref": "#/components/schemas/SpotMarketType" + }, + "bidding_zone": { + "$ref": "#/components/schemas/SpotMarketBiddingZone" + }, + "prices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricMarketPriceRecord" + } + } + }, + "required": [ + "market", + "bidding_zone", + "prices" + ] + }, + "AverageMarketPriceResult": { + "type": "object", + "properties": { + "market": { + "$ref": "#/components/schemas/SpotMarketType" + }, + "bidding_zone": { + "$ref": "#/components/schemas/SpotMarketBiddingZone" + }, + "price": { + "$ref": "#/components/schemas/AverageMarketPriceRecord" + }, + "_meta": { + "$ref": "#/components/schemas/SignatureMeta" + } + }, + "required": [ + "market", + "bidding_zone", + "price" + ] + }, + "AverageMarketPriceRecord": { + "description": "An average market price over a given period in time.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseMarketPriceRecord" + }, + { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "description": "An ISO 8601 interval in the format 'start/end'.", + "example": "2025-01-01T00:00:00Z/2025-01-31T23:59:59Z" + } + } + } + ] + }, + "HistoricMarketPriceRecord": { + "description": "A market price at a given point in time.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseMarketPriceRecord" + }, + { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp of the price record in UTC." + } + } + } + ] + }, + "BaseMarketPriceRecord": { + "type": "object", + "properties": { + "unit_amount": { + "type": "number", + "description": "Cost in Cents, e.g. 12.3 for 12,3 Cents = 0.123€.", + "example": 12.3 + }, + "unit_amount_decimal": { + "type": "string", + "description": "Cost in decimal format, e.g. 0.123€.", + "example": "0.123" + }, + "unit_amount_currency": { + "$ref": "#/components/schemas/Currency" + } + }, + "required": [ + "timestamp", + "unit_amount", + "unit_amount_decimal", + "unit_amount_currency" + ] + }, + "OAuthCredentials": { + "type": "object", + "properties": { + "client_id": { + "description": "The OAuth client ID", + "type": "string", + "example": "client_id_123" + }, + "client_secret": { + "description": "The OAuth client secret", + "type": "string", + "example": "client_secret_456" + }, + "authorization_url": { + "description": "The URL to obtain OAuth tokens", + "type": "string", + "example": "https://api.example.com/oauth/token" + }, + "grant_type": { + "description": "The OAuth grant type", + "type": "string", + "enum": [ + "client_credentials" + ], + "default": "client_credentials" + }, + "scope": { + "description": "The OAuth scope", + "type": "string", + "example": "read:user write:user" + }, + "access_token": { + "description": "The OAuth access token", + "type": "string", + "example": "access_token_789" + }, + "access_token_expires_in": { + "description": "The expiration time of the OAuth access token in seconds", + "type": "number", + "example": 3600 + }, + "access_token_expires_at": { + "description": "The expiration time of the OAuth access token", + "type": "number", + "example": 1715731200 + } + }, + "required": [ + "client_id", + "client_secret", + "authorization_url", + "grant_type" + ] + }, + "BasicAuthCredentials": { + "type": "object", + "properties": { + "username": { + "description": "The username", + "type": "string", + "example": "username" + }, + "password": { + "description": "The password", + "type": "string", + "example": "123456" + } + }, + "required": [ + "username", + "password" + ] + }, + "BasicAuthIntegration": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BasicAuthCredentials" + }, + { + "type": "object", + "properties": { + "auth_type": { + "type": "string", + "enum": [ + "basic_auth" + ] + }, + "base_url": { + "description": "The base URL", + "type": "string", + "example": "https://api.example.com" + } + } + } + ] + }, + "OAuthIntegration": { + "type": "object", + "properties": { + "auth_type": { + "type": "string", + "enum": [ + "oauth" + ] + }, + "oauth": { + "$ref": "#/components/schemas/OAuthCredentials" + }, + "base_url": { + "description": "The base URL", + "type": "string", + "example": "https://api.example.com" + } + }, + "required": [ + "auth_type", + "oauth" + ] + }, + "IntegrationAuthCredentials": { + "description": "The auth credentials for external integrations", + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/BasicAuthIntegration" + }, + { + "$ref": "#/components/schemas/OAuthIntegration" + } + ] + }, + "SearchStreetsResult": { + "description": "The search providers payload", + "type": "array", + "items": { + "$ref": "#/components/schemas/Street" + } + }, + "SearchProvidersResult": { + "description": "The search providers payload", + "type": "array", + "items": { + "$ref": "#/components/schemas/Provider" + } + }, + "Provider": { + "description": "The provider entity", + "type": "object", + "properties": { + "name": { + "description": "The provider name", + "type": "string" + }, + "code": { + "description": "The provider code", + "type": "string" + } + }, + "required": [ + "name", + "code" + ] + }, + "Street": { + "description": "The street entity", + "type": "object", + "properties": { + "street": { + "description": "The street name", + "type": "string" + } + }, + "required": [ + "street" + ] + }, + "ValidateAvailabilityFileResult": { + "description": "The availability map file result payload", + "type": "object", + "properties": { + "status": { + "description": "The status of the validation", + "type": "string", + "enum": [ + "success", + "error" + ] + }, + "rules_parsed_count": { + "description": "The number of rules successfully parsed", + "type": "number" + }, + "errors": { + "description": "The errors found on the file", + "type": "array", + "items": { + "$ref": "#/components/schemas/ValidateAvailabilityFileError" + } + } + }, + "required": [ + "status", + "rules_parsed_count", + "errors" + ], + "example": { + "status": "success", + "rules_parsed_count": 10, + "errors": [] + } + }, + "CartDto": { + "description": "A valid cart payload from a client.", + "properties": { + "metadata": { + "$ref": "#/components/schemas/MetaData" + }, + "customer": { + "$ref": "#/components/schemas/Customer" + }, + "billing_address": { + "$ref": "#/components/schemas/Address" + }, + "delivery_address": { + "$ref": "#/components/schemas/Address" + }, + "source_type": { + "type": "string", + "description": "type of source, e.g. journey or manual", + "example": "journey" + }, + "source_id": { + "type": "string", + "description": "identifier for source e.g. journey ID", + "example": "ce99875f-fba9-4fe2-a8f9-afaf52059051" + }, + "source": { + "$ref": "#/components/schemas/OrderSource" + }, + "additional_addresses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "payment_method": { + "$ref": "#/components/schemas/PaymentMethod" + }, + "line_items": { + "$ref": "#/components/schemas/PriceItemsDto" + }, + "files": { + "type": "array", + "description": "An array of file IDs, already upload into the File API, that are related with this cart", + "items": { + "type": "string", + "description": "a string representing a file ID as received from the File API" + } + }, + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "journey_data": { + "type": "object", + "additionalProperties": true + }, + "consents": { + "type": "object", + "additionalProperties": true + } + }, + "required": [ + "line_items" + ] + }, + "CheckoutCart": { + "type": "object", + "description": "The cart checkout request payload", + "properties": { + "cart": { + "anyOf": [ + { + "description": "the cart id", + "type": "string" + }, + { + "$ref": "#/components/schemas/CartDto" + } + ] + }, + "redeemed_promos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RedeemedPromo" + } + }, + "mode": { + "$ref": "#/components/schemas/CheckoutMode" + } + } + }, + "CheckoutCartResult": { + "type": "object", + "description": "The cart checkout result", + "properties": { + "order": { + "$ref": "#/components/schemas/Order" + } + } + }, + "CheckoutMode": { + "type": "string", + "description": "The checkout mode for the cart checkout.", + "enum": [ + "create_order", + "create_invoice", + "create_quote" + ] + }, + "OrderStatus": { + "type": "string", + "enum": [ + "draft", + "quote", + "placed", + "cancelled", + "completed" + ], + "description": "\n| status | description |\n|-------------|-------|\n| `draft` | ​​Starting state for all orders, at this point we can still edit the order |\n| `quote` | The order is in a quoting phase, bound to an expiration date |\n| `placed` | The order has been paid and can now be fulfilled (shipped, delivered, complete) or canceled |\n| `cancelled` | The order has been cancelled |\n| `completed` | The order is now closed and finalized |\n" + }, + "BasePriceItemCommon": { + "description": "Represents the common keys in BasePriceItem and BasePriceItemDto", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/MetaData" + }, + "quantity": { + "type": "number", + "description": "The quantity of products being purchased." + }, + "product_id": { + "type": "string", + "description": "The id of the product." + }, + "price_id": { + "type": "string", + "description": "The id of the price." + }, + "description": { + "type": "string", + "description": "An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name." + }, + "product_description": { + "type": "string", + "description": "The description for the product." + }, + "product_name": { + "type": "string", + "description": "The name for the product." + }, + "price_mappings": { + "$ref": "#/components/schemas/PriceInputMappings" + }, + "is_tax_inclusive": { + "type": "boolean", + "description": "Specifies whether the price is considered `inclusive` of taxes or not." + }, + "_product": { + "description": "The snapshot of the product.", + "allOf": [ + { + "$ref": "#/components/schemas/Product" + } + ] + } + } + }, + "PriceItemDtoUnion": { + "anyOf": [ + { + "$ref": "#/components/schemas/PriceItemDto" + }, + { + "$ref": "#/components/schemas/CompositePriceItemDto" + } + ], + "discriminator": { + "propertyName": "is_composite_price", + "mapping": { + "false": "#/components/schemas/PriceItemDto", + "true": "#/components/schemas/CompositePriceItemDto" + } + } + }, + "PriceItemsDto": { + "description": "A valid set of product prices, quantities, (discounts) and taxes from a client.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PriceItemDtoUnion" + } + }, + "BasePriceItemDto": { + "description": "Represents a valid base price item from a client.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BasePriceItemCommon" + } + ], + "properties": { + "external_fees_mappings": { + "$ref": "#/components/schemas/ExternalFeeMappings" + }, + "external_fees_metadata": { + "$ref": "#/components/schemas/ExternalFeeMetadata" + }, + "external_price_metadata": { + "$ref": "#/components/schemas/ExternalPriceMetadata" + }, + "_immutable_pricing_details": { + "$ref": "#/components/schemas/PricingDetails" + }, + "coupon_ids": { + "type": "array", + "description": "The ids of the coupons applicable to the price item", + "readOnly": true, + "items": { + "type": "string", + "description": "The id of the coupon" + } + }, + "taxes": { + "type": "array", + "description": "The taxes applied to the price item.", + "readOnly": true, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TaxAmountDto" + } + ] + } + }, + "recurrences": { + "type": "array", + "description": "The taxes applied to the price item.", + "readOnly": true, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/RecurrenceAmountDto" + } + ] + } + }, + "_coupons": { + "type": "array", + "description": "The coupons applicable to the price item", + "readOnly": true, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/CouponItem" + } + ] + } + } + } + }, + "PriceItemDto": { + "description": "Represents a price input to the pricing library.", + "allOf": [ + { + "$ref": "#/components/schemas/BasePriceItemDto" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.", + "enum": [ + "one_time", + "recurring" + ] + }, + "billing_period": { + "description": "The price billing period.", + "oneOf": [ + { + "$ref": "#/components/schemas/BillingPeriod" + } + ] + }, + "unit_amount": { + "type": "integer", + "description": "The unit amount value" + }, + "unit_amount_gross": { + "type": "integer", + "description": "The unit gross amount value." + }, + "unit_amount_currency": { + "$ref": "#/components/schemas/Currency" + }, + "unit_amount_decimal": { + "description": "The unit amount in eur to be charged, represented as a decimal string with at most 12 decimal places.", + "type": "string" + }, + "is_composite_price": { + "description": "The flag for prices that contain price components.", + "type": "boolean", + "enum": [ + false + ] + }, + "pricing_model": { + "type": "string", + "description": "Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `tiered_flatfee` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `dynamic_tariff` indicates that the price is dynamically dependend on the (quarter)-hourly spot market price.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n", + "enum": [ + "per_unit", + "tiered_graduated", + "tiered_volume", + "tiered_flatfee", + "dynamic_tariff", + "external_getag" + ] + }, + "_price": { + "description": "The snapshot of the price linked to the price item.", + "allOf": [ + { + "$ref": "#/components/schemas/Price" + } + ] + } + } + } + ] + }, + "CompositePriceItemDto": { + "description": "Represents a composite price input to the pricing library.", + "allOf": [ + { + "$ref": "#/components/schemas/BasePriceItemDto" + }, + { + "type": "object", + "required": [ + "is_composite_price" + ], + "properties": { + "is_composite_price": { + "description": "The flag for prices that contain price components.", + "type": "boolean", + "enum": [ + true + ] + }, + "item_components": { + "type": "array", + "description": "Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).", + "items": { + "$ref": "#/components/schemas/PriceItemDto" + } + }, + "selected_price_component_ids": { + "type": "array", + "description": "The ids of the price components that should be selected for the price calculation.", + "items": { + "type": "string", + "description": "The id of the price component" + } + }, + "price_component_coupon_ids": { + "type": "object", + "description": "The map of coupon ids applicable to the price components", + "readOnly": true, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "description": "The id of the coupon" + } + } + }, + "_price": { + "$ref": "#/components/schemas/CompositePrice" + } + } + } + ] + }, + "TaxAmountDto": { + "type": "object", + "description": "A valid tax rate from a client.", + "properties": { + "rate": { + "type": "string", + "deprecated": true, + "description": "The deprecated tax rate applied.\nThis field has been deprecated in favor of the new Tax Management. You should use the new tax fields pointing to a proper tax entity.\n" + }, + "tax": { + "$ref": "#/components/schemas/Tax" + } + } + }, + "OrderSource": { + "type": "object", + "description": "The order generation source", + "properties": { + "http": { + "type": "string", + "description": "Link path for the source", + "example": "/app/v2/journey-builder/editor/db7f6940-994b-11ec-a46d-9f1824ff2939" + }, + "title": { + "type": "string", + "description": "Title for the source", + "example": "Journey: PH Journey" + } + } + }, + "OpportunitySource": { + "type": "object", + "description": "The opportunity generation source", + "properties": { + "http": { + "type": "string", + "description": "Link path for the source", + "example": "/app/v2/journey-builder/editor/db7f6940-994b-11ec-a46d-9f1824ff2939" + }, + "title": { + "type": "string", + "description": "Title for the source", + "example": "Journey: PH Journey" + } + } + }, + "RecurrenceAmountDto": { + "type": "object", + "description": "An amount associated with a specific recurrence.", + "allOf": [ + { + "$ref": "#/components/schemas/Amounts" + } + ], + "properties": { + "type": { + "type": "string", + "description": "The price type." + }, + "billing_period": { + "description": "The price billing period.", + "oneOf": [ + { + "$ref": "#/components/schemas/BillingPeriod" + } + ] + }, + "unit_amount_gross": { + "type": "integer", + "description": "The unit gross amount value." + }, + "unit_amount_net": { + "type": "integer", + "description": "The unit net amount value." + }, + "amount_tax": { + "type": "integer", + "description": "Total of all items taxes, with same recurrence." + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "amount_subtotal_decimal", + "amount_total_decimal" + ] + }, + "Currency": { + "type": "string", + "description": "Three-letter ISO currency code, in lowercase. Must be a supported currency.\nISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html\n", + "example": "EUR" + }, + "OrderRelation": { + "type": "object", + "description": "An order relation reference", + "properties": { + "entity_id": { + "type": "string", + "description": "The relation order id" + }, + "_tags": { + "type": "array", + "items": { + "type": "string", + "description": "The tags array associated with the relation" + } + } + } + }, + "OrderPayload": { + "type": "object", + "description": "Order Entity Payload", + "additionalProperties": true, + "properties": { + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "line_items": { + "$ref": "#/components/schemas/PriceItemsDto" + }, + "source_type": { + "type": "string", + "description": "type of source, e.g. journey or manual", + "example": "journey" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "contact": { + "readOnly": true, + "type": "string", + "description": "The id of an existing contact." + }, + "billing_first_name": { + "type": "string" + }, + "billing_last_name": { + "type": "string" + }, + "billing_company_name": { + "type": "string" + }, + "billing_vat": { + "type": "string" + }, + "billing_email": { + "type": "string" + }, + "billing_phone": { + "type": "string" + }, + "billing_address": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "delivery_address": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "payment_method": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentMethod" + } + }, + "redeemed_promos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RedeemedPromo" + } + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "PriceItems": { + "description": "Tracks a set of product prices, quantities, (discounts) and taxes.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/PriceItem" + }, + { + "$ref": "#/components/schemas/CompositePriceItem" + } + ] + } + }, + "CompositePriceItem": { + "allOf": [ + { + "$ref": "#/components/schemas/BasePriceItem" + } + ], + "description": "Represents a composite price input to the pricing library.", + "type": "object", + "required": [ + "is_composite_price" + ], + "properties": { + "is_composite_price": { + "description": "The flag for prices that contain price components.", + "type": "boolean", + "enum": [ + true + ] + }, + "item_components": { + "type": "array", + "description": "Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).", + "items": { + "$ref": "#/components/schemas/PriceItem" + } + }, + "total_details": { + "$ref": "#/components/schemas/TotalDetails" + }, + "_price": { + "description": "The price snapshot data.", + "anyOf": [ + { + "$ref": "#/components/schemas/CompositePrice" + } + ] + }, + "_coupons": { + "type": "array", + "description": "The coupons applicable to the composite price item + related (cashback) amounts", + "readOnly": true, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/CouponItem" + }, + { + "$ref": "#/components/schemas/CashbackAmounts" + } + ] + } + } + } + }, + "BasePriceItem": { + "description": "Represents a price item", + "type": "object", + "example": { + "amount_subtotal": 10000, + "amount_total": 10600, + "currency": "EUR", + "description": "Annual internet service", + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "taxes": [ + { + "amount": 600, + "tax": { + "active": true, + "description": "Without Behaviour", + "rate": 6, + "region": "DE", + "type": "VAT", + "_created_at": "2022-02-07T14:49:08.831Z", + "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4", + "_org": "739224", + "_schema": "tax", + "_title": "Tax Without Behaviour", + "_updated_at": "2022-02-07T14:49:08.831Z" + } + } + ], + "unit_amount": 10000, + "unit_amount_net": 10000, + "pricing_model": "per_unit", + "_price": { + "unit_amount": 10000, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "100.00", + "sales_tax": "standard", + "is_tax_inclusive": false, + "price_display_in_journeys": "show_price", + "type": "one_time", + "billing_period": "weekly", + "billing_duration_unit": "months", + "notice_time_unit": "months", + "termination_time_unit": "months", + "renewal_duration_unit": "months", + "_schema": "price", + "_title": "Solar Panel Module", + "description": "Solar Panel Module", + "active": true, + "tax": { + "$relation": [ + { + "entity_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc" + } + ] + }, + "_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "_org": "728", + "_created_at": "2022-06-03T16:04:10.369Z", + "_updated_at": "2022-06-03T16:04:10.369Z", + "pricing_model": "per_unit" + }, + "_product": { + "name": "Cool box", + "type": "product", + "_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6", + "_title": "Cool box" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Amounts" + }, + { + "$ref": "#/components/schemas/BasePriceItemCommon" + } + ], + "properties": { + "_id": { + "type": "string", + "description": "price item id", + "readOnly": true + }, + "unit_amount": { + "type": "integer", + "description": "The unit amount value", + "readOnly": true + }, + "unit_amount_decimal": { + "description": "The unit amount in eur to be charged, represented as a decimal string with at most 12 decimal places.", + "type": "string", + "readOnly": true + }, + "before_discount_unit_amount": { + "type": "integer", + "description": "The unit amount before any discount is applied", + "readOnly": true + }, + "before_discount_unit_amount_decimal": { + "type": "string", + "description": "The unit amount before any discount is applied, represented as a decimal string with at most 12 decimal places.", + "readOnly": true + }, + "before_discount_unit_amount_gross": { + "type": "integer", + "description": "The unit gross amount before any discount is applied", + "readOnly": true + }, + "before_discount_unit_amount_gross_decimal": { + "type": "string", + "description": "The unit gross amount before any discount is applied, represented as a decimal string with at most 12 decimal places.", + "readOnly": true + }, + "before_discount_unit_amount_net": { + "type": "integer", + "description": "The unit net amount before any discount is applied", + "readOnly": true + }, + "before_discount_unit_amount_net_decimal": { + "type": "string", + "description": "The unit net amount before any discount is applied, represented as a decimal string with at most 12 decimal places.", + "readOnly": true + }, + "unit_discount_amount": { + "type": "integer", + "description": "The discount amount applied for each unit", + "readOnly": true + }, + "unit_discount_amount_decimal": { + "type": "string", + "description": "The discount amount applied for each unit represented as a decimal string", + "readOnly": true + }, + "unit_amount_gross": { + "type": "integer", + "description": "The unit gross amount value.", + "readOnly": true + }, + "unit_amount_gross_decimal": { + "type": "string", + "description": "The unit gross amount value.", + "readOnly": true + }, + "unit_amount_net": { + "type": "integer", + "description": "Net unit amount without taxes or discounts.", + "readOnly": true + }, + "unit_amount_net_decimal": { + "type": "string", + "description": "Net unit amount without taxes or discounts.", + "readOnly": true + }, + "unit_discount_amount_net": { + "type": "integer", + "description": "The net discount amount applied for each unit", + "readOnly": true + }, + "unit_discount_amount_net_decimal": { + "type": "string", + "description": "The net discount amount applied for each unit represented as a decimal string", + "readOnly": true + }, + "tax_discount_amount": { + "type": "integer", + "description": "The discount amount applied to the tax", + "readOnly": true + }, + "tax_discount_amount_decimal": { + "type": "string", + "description": "The discount amount applied to the tax represented as a decimal string", + "readOnly": true + }, + "discount_amount_net": { + "type": "integer", + "description": "The net discount amount applied", + "readOnly": true + }, + "discount_amount_net_decimal": { + "type": "string", + "description": "The net discount amount applied represented as a decimal string", + "readOnly": true + }, + "amount_tax": { + "type": "integer", + "description": "Total tax amount for this line item." + }, + "before_discount_tax_amount": { + "type": "integer", + "description": "The tax amount before any discount is applied", + "readOnly": true + }, + "before_discount_tax_amount_decimal": { + "type": "string", + "description": "The tax amount before any discount is applied represented as a decimal string", + "readOnly": true + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "taxes": { + "type": "array", + "description": "The taxes applied to the price item.", + "readOnly": true, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TaxAmount" + } + ] + } + }, + "recurrences": { + "type": "array", + "description": "The sum of amounts of the price items by recurrence.", + "readOnly": true, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/RecurrenceAmount" + } + ] + } + }, + "_coupons": { + "type": "array", + "description": "The coupons applicable to the price item", + "readOnly": true, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/CouponItem" + } + ] + } + }, + "on_request_approved": { + "type": "boolean", + "description": "When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'." + } + } + }, + "CashbackAmounts": { + "type": "object", + "properties": { + "cashback_amount": { + "type": "integer", + "description": "The cashback amount.", + "readOnly": true + }, + "cashback_amount_decimal": { + "type": "string", + "description": "The cashback amount as a string with all the decimal places.", + "readOnly": true + }, + "cashback_period": { + "$ref": "#/components/schemas/CashbackPeriod" + }, + "after_cashback_amount_total": { + "type": "integer", + "description": "Total amount after cashback is applied.", + "readOnly": true + }, + "after_cashback_amount_total_decimal": { + "type": "string", + "description": "Total amount after cashback is applied as a string with all the decimal places.", + "readOnly": true + } + } + }, + "DiscountAmounts": { + "type": "object", + "properties": { + "discount_amount": { + "type": "integer", + "description": "The discount amount.", + "readOnly": true + }, + "discount_amount_decimal": { + "type": "string", + "description": "The discount amount as a string with all the decimal places.", + "readOnly": true + }, + "discount_percentage": { + "type": "integer", + "description": "The discount percentage, if the applied coupon had a percentage type.", + "readOnly": true + }, + "before_discount_amount_total": { + "type": "integer", + "description": "Total amount before discount is applied.", + "readOnly": true + }, + "before_discount_amount_total_decimal": { + "type": "string", + "description": "Total amount before discount is applied as a string with all the decimal places.", + "readOnly": true + }, + "before_discount_amount_subtotal": { + "type": "integer", + "description": "Total amount before discount is applied, excluding taxes.", + "readOnly": true + }, + "before_discount_amount_subtotal_decimal": { + "type": "string", + "description": "Total amount before discount is applied, excluding taxes, as a string with all the decimal places.", + "readOnly": true + } + } + }, + "PriceAmounts": { + "type": "object", + "properties": { + "amount_subtotal": { + "type": "integer", + "description": "Total of all items before (discounts or) taxes are applied." + }, + "amount_subtotal_decimal": { + "type": "string", + "description": "Total of all items before (discounts or) taxes are applied, as a string with all the decimal places." + }, + "amount_total": { + "type": "integer", + "description": "Total of all items after (discounts and) taxes are applied." + }, + "amount_total_decimal": { + "type": "string", + "description": "Total of all items after (discounts and) taxes are applied, as a string with all the decimal places." + } + } + }, + "Amounts": { + "allOf": [ + { + "$ref": "#/components/schemas/PriceAmounts" + }, + { + "$ref": "#/components/schemas/CashbackAmounts" + }, + { + "$ref": "#/components/schemas/DiscountAmounts" + } + ] + }, + "PriceItem": { + "allOf": [ + { + "$ref": "#/components/schemas/BasePriceItem" + } + ], + "description": "Represents a price item", + "type": "object", + "example": { + "amount_subtotal": 10000, + "amount_total": 10600, + "currency": "EUR", + "description": "Annual internet service", + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "taxes": [ + { + "amount": 600, + "tax": { + "active": true, + "description": "Without Behaviour", + "rate": 6, + "region": "DE", + "type": "VAT", + "_created_at": "2022-02-07T14:49:08.831Z", + "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4", + "_org": "739224", + "_schema": "tax", + "_title": "Tax Without Behaviour", + "_updated_at": "2022-02-07T14:49:08.831Z" + } + } + ], + "unit_amount": 10000, + "unit_amount_net": 10000, + "pricing_model": "per_unit", + "_price": { + "unit_amount": 10000, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "100.00", + "sales_tax": "standard", + "is_tax_inclusive": false, + "price_display_in_journeys": "show_price", + "type": "one_time", + "billing_period": "weekly", + "billing_duration_unit": "months", + "notice_time_unit": "months", + "termination_time_unit": "months", + "renewal_duration_unit": "months", + "_schema": "price", + "_title": "Solar Panel Module", + "description": "Solar Panel Module", + "active": true, + "tax": { + "$relation": [ + { + "entity_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc" + } + ] + }, + "_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "_org": "728", + "_created_at": "2022-06-03T16:04:10.369Z", + "_updated_at": "2022-06-03T16:04:10.369Z", + "pricing_model": "per_unit" + }, + "_product": { + "name": "Cool box", + "type": "product", + "_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6", + "_title": "Cool box" + } + }, + "properties": { + "type": { + "type": "string", + "description": "One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.", + "enum": [ + "one_time", + "recurring" + ] + }, + "is_composite_price": { + "description": "The flag for prices that contain price components.", + "type": "boolean", + "enum": [ + false + ] + }, + "billing_period": { + "description": "The price billing period.", + "oneOf": [ + { + "$ref": "#/components/schemas/BillingPeriod" + } + ] + }, + "pricing_model": { + "$ref": "#/components/schemas/PricingModel" + }, + "tiers_details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TierDetails" + } + }, + "get_ag": { + "$ref": "#/components/schemas/PriceGetAg" + }, + "dynamic_tariff": { + "$ref": "#/components/schemas/PriceDynamicTariff" + }, + "_price": { + "description": "The price snapshot data.", + "anyOf": [ + { + "$ref": "#/components/schemas/Price" + } + ] + } + }, + "required": [ + "pricing_model" + ] + }, + "TaxAmount": { + "type": "object", + "description": "A tax amount associated with a specific tax rate.", + "readOnly": true, + "properties": { + "amount": { + "type": "integer", + "description": "The tax amount." + }, + "rate": { + "type": "string", + "description": "The tax rate applied. With the release of the tax management feature this field is being deprecated in favor of the tax field.", + "deprecated": true + }, + "rateValue": { + "type": "number", + "description": "The tax rate value applied (represented as an integer percentage, e.g, 19 or 7).\nWith the release of the tax management feature this field is being deprecated in favor of the tax field.\n", + "example": 19, + "deprecated": true + }, + "tax": { + "description": "The tax applied.", + "oneOf": [ + { + "$ref": "#/components/schemas/Tax" + } + ] + } + } + }, + "TaxAmountBreakdown": { + "type": "object", + "description": "A tax amount associated with a specific tax rate.", + "readOnly": true, + "properties": { + "amount": { + "type": "integer", + "description": "The tax amount." + }, + "rate": { + "type": "string", + "description": "The tax rate applied. With the release of the tax manager feature this field is being deprecated in favor of the tax field.", + "deprecated": true + }, + "rateValue": { + "type": "number", + "description": "The tax rate value applied. With the release of the tax manager feature this field is being deprecated in favor of the tax field.", + "deprecated": true + }, + "tax": { + "$ref": "#/components/schemas/TaxBreakdownInfo" + } + } + }, + "RecurrenceAmount": { + "type": "object", + "description": "An amount associated with a specific recurrence.", + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/Amounts" + } + ], + "properties": { + "type": { + "type": "string", + "description": "The price type." + }, + "billing_period": { + "description": "The price billing period.", + "oneOf": [ + { + "$ref": "#/components/schemas/BillingPeriod" + } + ] + }, + "unit_amount_gross": { + "type": "integer", + "description": "The unit gross amount value." + }, + "unit_amount_net": { + "type": "integer", + "description": "The unit net amount value." + }, + "amount_tax": { + "type": "integer", + "description": "Total of all items taxes, with same recurrence." + }, + "amount_tax_decimal": { + "type": "string", + "description": "Total of all items taxes, with same recurrence, as a string with all the decimal places." + }, + "currency": { + "$ref": "#/components/schemas/Currency" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "amount_subtotal_decimal", + "amount_total_decimal" + ] + }, + "CashbackAmount": { + "type": "object", + "description": "An amount associated with a specific cashback period.", + "properties": { + "cashback_period": { + "$ref": "#/components/schemas/CashbackPeriod" + }, + "amount_total": { + "type": "integer", + "description": "The sum of all cashbacks for a specific cashback period" + } + }, + "required": [ + "cashback_period", + "amount_total" + ] + }, + "RecurrenceAmountWithTax": { + "type": "object", + "description": "An amount associated with a specific recurrence.", + "properties": { + "type": { + "type": "string", + "description": "The price type." + }, + "billing_period": { + "description": "The price billing period.", + "oneOf": [ + { + "$ref": "#/components/schemas/BillingPeriod" + } + ] + }, + "amount_total": { + "type": "integer", + "description": "Total amount of items with same recurrence." + }, + "amount_subtotal": { + "type": "integer", + "description": "Total amount of items with same recurrence, excluding taxes." + }, + "amount_tax": { + "type": "integer", + "description": "Total tax amount of items with same recurrence." + }, + "tax": { + "$ref": "#/components/schemas/TaxAmountBreakdown" + } + }, + "required": [ + "amount_subtotal", + "amount_total" + ] + }, + "TotalDetails": { + "type": "object", + "description": "The total details with tax (and discount) aggregated totals.", + "readOnly": true, + "properties": { + "amount_shipping": { + "type": "integer", + "description": "This is the sum of all the price item shipping amounts." + }, + "amount_tax": { + "type": "integer", + "description": "This is the sum of all the price item tax amounts." + }, + "breakdown": { + "type": "object", + "description": "Breakdown of individual tax (and discount) amounts that add up to the totals.", + "properties": { + "taxes": { + "type": "array", + "description": "The aggregated price items tax amount per rate.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TaxAmountBreakdown" + } + ] + } + }, + "recurrences": { + "type": "array", + "description": "The aggregated price items tax amount per rate.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/RecurrenceAmount" + } + ] + } + }, + "cashbacks": { + "type": "array", + "description": "The list of cashback sums for each cashback period.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/CashbackAmount" + } + ] + } + }, + "recurrencesByTax": { + "type": "array", + "description": "The aggregated price items recurrences by tax rate", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/RecurrenceAmountWithTax" + } + ] + } + } + } + } + } + }, + "PricingDetails": { + "type": "object", + "description": "The result from the calculation of a set of price items.", + "properties": { + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/PriceItem" + }, + { + "$ref": "#/components/schemas/CompositePriceItem" + } + ] + } + }, + "amount_subtotal": { + "type": "integer", + "description": "Total of all items before (discounts or) taxes are applied." + }, + "amount_total": { + "type": "integer", + "description": "Total of all items after (discounts and) taxes are applied." + }, + "unit_amount_gross": { + "type": "integer", + "description": "The unit gross amount value." + }, + "unit_amount_net": { + "type": "integer", + "description": "The unit net amount value." + }, + "amount_tax": { + "type": "integer", + "description": "This is the sum of all the price item tax amounts." + }, + "total_details": { + "$ref": "#/components/schemas/TotalDetails" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "redeemed_promos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RedeemedPromo" + } + } + } + }, + "PromoCodeValidationResponse": { + "type": "object", + "description": "The result from the validation of a set of promo codes.", + "properties": { + "matched_coupons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CouponWithoutPromoCodes" + } + } + } + }, + "PricingDetailsResponse": { + "type": "object", + "description": "The result from the calculation of a set of price items.", + "allOf": [ + { + "$ref": "#/components/schemas/PricingDetails" + } + ] + }, + "BillingPeriod": { + "type": "string", + "enum": [ + "weekly", + "monthly", + "every_quarter", + "every_6_months", + "yearly" + ] + }, + "CashbackPeriod": { + "type": "string", + "description": "The cashback period, for now it's limited to either 0 months or 12 months", + "enum": [ + "0", + "12" + ], + "nullable": true + }, + "SalesTax": { + "type": "string", + "enum": [ + "nontaxable", + "reduced", + "standard" + ] + }, + "AvailabilityLocation": { + "type": "object", + "properties": { + "street": { + "type": "string", + "description": "The first line of the address. Typically the street address or PO Box number." + }, + "street_number": { + "type": "string", + "description": "The second line of the address. Typically the number of the apartment, suite, or unit." + }, + "postal_code": { + "type": "string", + "description": "The postal code for the address." + }, + "city": { + "type": "string", + "description": "The name of the city, district, village, or town." + }, + "country": { + "type": "string", + "description": "The name of the country." + } + } + }, + "AvailabilityFilters": { + "description": "Availability filters dimensions", + "type": "object", + "properties": { + "location": { + "$ref": "#/components/schemas/AvailabilityLocation" + }, + "available_date": { + "type": "string", + "format": "date", + "example": "2017-07-21", + "description": "A value to be matched against the availability window (start & end date)" + } + }, + "required": [ + "location" + ] + }, + "Address": { + "type": "object", + "additionalProperties": true, + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "billing" + ] + }, + "street": { + "type": "string", + "description": "The first line of the address. Typically the street address or PO Box number.", + "nullable": true + }, + "street_number": { + "type": "string", + "description": "The second line of the address. Typically the number of the apartment, suite, or unit.", + "nullable": true + }, + "postal_code": { + "type": "string", + "description": "The postal code for the address.", + "nullable": true + }, + "city": { + "type": "string", + "description": "The name of the city, district, village, or town.", + "nullable": true + }, + "country": { + "type": "string", + "description": "The two-letter code for the country of the address.", + "nullable": true + }, + "additional_info": { + "type": "string", + "description": "An additional description for the address", + "nullable": true + }, + "company_name": { + "type": "string", + "description": "the company name, usually used as extra delivery instructions", + "nullable": true + }, + "first_name": { + "type": "string", + "description": "the first name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "last_name": { + "type": "string", + "description": "the last name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "salutation": { + "type": "string", + "description": "the salutation of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "title": { + "type": "string", + "description": "the title of the recipient, usually used as extra delivery instructions", + "nullable": true + } + } + }, + "PaymentMethod": { + "type": "object", + "description": "A PaymentMethod represent your customer's payment instruments.\n", + "properties": { + "type": { + "type": "string", + "description": "The type of the PaymentMethod." + }, + "details": { + "type": "object", + "description": "Contains relevant data associated with the payment method type.", + "additionalProperties": true + } + } + }, + "Customer": { + "type": "object", + "properties": { + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "company_name": { + "type": "string" + }, + "vat_id": { + "type": "string" + }, + "email": { + "type": "string", + "description": "A valid email identifying the customer." + }, + "phone": { + "type": "string" + } + } + }, + "File": { + "type": "object", + "additionalProperties": true, + "properties": { + "_id": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "mime_type": { + "type": "string" + }, + "versions": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "s3ref": { + "type": "object", + "properties": { + "bucket": { + "type": "string" + }, + "key": { + "type": "string" + } + }, + "required": [ + "bucket", + "key" + ] + } + }, + "required": [ + "s3ref" + ] + } + }, + "_schema": { + "type": "string" + }, + "_org": { + "type": "string" + }, + "_created_at": { + "type": "string", + "format": "date-time" + }, + "_updated_at": { + "type": "string", + "format": "date-time" + }, + "_title": { + "type": "string" + }, + "$relation": { + "$ref": "#/components/schemas/EntityRelation" + } + }, + "required": [ + "versions", + "_id", + "_schema", + "_created_at", + "_updated_at", + "_org", + "mime_type", + "filename" + ] + }, + "EntityId": { + "type": "string", + "format": "uuid" + }, + "EntityItem": { + "type": "object", + "properties": { + "_id": { + "$ref": "#/components/schemas/EntityId" + }, + "_title": { + "type": "string", + "description": "Title of entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to" + }, + "_schema": { + "type": "string" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "_created_at": { + "type": "string", + "format": "date-time" + }, + "_updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "_id", + "_title", + "_org", + "_schema", + "_created_at", + "_updated_at" + ], + "example": { + "_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6", + "_title": "Cool box", + "_org": "728", + "_schema": "order", + "_created_at": "2022-06-03T16:04:10.000Z", + "_updated_at": "2022-06-03T16:04:10.000Z", + "amount_subtotal": 10000, + "amount_total": 10600, + "currency": "EUR", + "description": "Annual internet service", + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "taxes": [ + { + "amount": 600, + "tax": { + "active": true, + "description": "Without Behaviour", + "rate": 6, + "region": "DE", + "type": "VAT", + "_created_at": "2022-02-07T14:49:08.831Z", + "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4", + "_org": "739224", + "_schema": "tax", + "_title": "Tax Without Behaviour", + "_updated_at": "2022-02-07T14:49:08.831Z" + } + } + ], + "unit_amount": 10000, + "unit_amount_net": 10000, + "pricing_model": "per_unit", + "_price": { + "_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "unit_amount": 10000, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "100.00", + "sales_tax": "standard", + "is_tax_inclusive": false, + "price_display_in_journeys": "show_price", + "type": "one_time", + "billing_period": "weekly", + "billing_duration_unit": "months", + "notice_time_unit": "months", + "termination_time_unit": "months", + "renewal_duration_unit": "months", + "_schema": "price", + "_title": "Solar Panel Module", + "description": "Solar Panel Module", + "active": true, + "tax": { + "$relation": [ + { + "entity_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc" + } + ] + }, + "_org": "728", + "_created_at": "2022-06-03T16:04:10.369Z", + "_updated_at": "2022-06-03T16:04:10.369Z", + "pricing_model": "per_unit" + }, + "_product": { + "name": "Cool box", + "type": "product", + "_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6", + "_title": "Cool box" + } + } + }, + "EntityRelation": { + "type": "object", + "additionalProperties": true, + "properties": { + "entity_id": { + "type": "string" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Tax": { + "type": "object", + "description": "the tax configuration", + "additionalProperties": true, + "required": [ + "type", + "rate", + "_id", + "_title", + "_org", + "_schema", + "_created_at", + "_updated_at" + ], + "properties": { + "_id": { + "$ref": "#/components/schemas/EntityId" + }, + "_title": { + "type": "string", + "description": "Title of entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to" + }, + "_schema": { + "type": "string" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "_created_at": { + "type": "string", + "format": "date-time" + }, + "_updated_at": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string", + "enum": [ + "VAT", + "GST", + "Custom" + ] + }, + "description": { + "type": "string" + }, + "rate": { + "type": "number", + "nullable": true + }, + "active": { + "type": "boolean" + }, + "region": { + "type": "string" + }, + "region_label": { + "type": "string" + } + }, + "example": { + "rate": 19, + "_title": "Tax Standard", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "VAT", + "description": "Tax description", + "active": true, + "region": "DE", + "region_label": "Germany", + "_org": "123", + "_schema": "tax", + "_tags": [ + "example", + "mock" + ], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z" + } + }, + "TaxBreakdownInfo": { + "type": "object", + "properties": { + "rate": { + "type": "number", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "VAT", + "GST", + "Custom" + ] + }, + "_id": { + "type": "string" + } + } + }, + "BaseCouponCommon": { + "type": "object", + "description": "The shared properties for the coupon entity and coupon item entity", + "additionalProperties": true, + "required": [ + "name", + "_id", + "_title", + "_org", + "_schema", + "_created_at", + "_updated_at", + "type", + "category" + ], + "properties": { + "_id": { + "$ref": "#/components/schemas/EntityId" + }, + "_title": { + "type": "string", + "description": "The auto-generated title for the title", + "readOnly": true + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true + }, + "_schema": { + "type": "string", + "enum": [ + "coupon" + ], + "readOnly": true, + "description": "The schema of the entity, for coupons it is always `coupon`" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "_created_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "The creation date for the opportunity" + }, + "_updated_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "The date the coupon was last updated" + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "fixed", + "percentage" + ] + }, + "category": { + "type": "string", + "enum": [ + "discount", + "cashback" + ] + }, + "percentage_value": { + "type": "string", + "description": "Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.", + "nullable": true + }, + "fixed_value": { + "description": "Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.", + "type": "number" + }, + "fixed_value_decimal": { + "description": "Use if type is set to fixed. The unit amount in eur to be discounted, represented as a decimal string with at most 12 decimal places.", + "type": "string" + }, + "fixed_value_currency": { + "description": "Use if type is set to fixed. Three-letter ISO currency code, in lowercase.", + "oneOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + }, + "cashback_period": { + "$ref": "#/components/schemas/CashbackPeriod" + }, + "active": { + "type": "boolean" + }, + "requires_promo_code": { + "type": "boolean", + "description": "Whether the coupon requires a promo code to be applied" + } + } + }, + "CouponWithoutPromoCodes": { + "type": "object", + "description": "The base for the coupon entity without promo codes", + "allOf": [ + { + "$ref": "#/components/schemas/BaseCouponCommon" + } + ], + "properties": { + "prices": { + "description": "The prices associated with the coupon. Will hold price entities if hydrated, relations otherwise.", + "oneOf": [ + { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Price" + } + } + ] + } + }, + "example": { + "_id": "123e4567-e89b-12d3-a456-426614174000", + "_schema": "coupon", + "_org": "org_12345", + "_created_at": "2024-01-15T10:00:00.000Z", + "_updated_at": "2024-01-20T12:00:00.000Z", + "_title": "Sample Coupon", + "name": "Sample Coupon", + "type": "fixed", + "fixed_value": 555, + "fixed_value_currency": "USD", + "fixed_value_decimal": "5.55", + "active": true, + "category": "cashback", + "prices": { + "$relation": [ + { + "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst", + "_tags": [ + "discount", + "special" + ], + "_schema": "price" + } + ] + } + } + }, + "Coupon": { + "description": "The coupon entity", + "allOf": [ + { + "$ref": "#/components/schemas/CouponWithoutPromoCodes" + } + ], + "type": "object", + "properties": { + "promo_codes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromoCode" + } + }, + "promo_code_usage": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "description": "Map of ids of promo codes with their usage count" + } + } + }, + "CouponItem": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BaseCouponCommon" + } + ] + }, + "PromoCode": { + "type": "object", + "required": [ + "id", + "code" + ], + "properties": { + "id": { + "type": "string", + "description": "The id of the promo code" + }, + "code": { + "type": "string", + "description": "The code of the promo code" + }, + "has_usage_limit": { + "type": "boolean", + "description": "Whether the promo code has a usage limit" + }, + "usage_limit": { + "type": "number", + "nullable": true, + "description": "The usage limit of the promo code" + } + }, + "example": { + "id": "123e4567-e89b-12d3-a456-426614174000", + "code": "123456", + "has_usage_limit": true, + "usage_limit": 10 + } + }, + "RedeemedPromo": { + "type": "object", + "required": [ + "code", + "coupons" + ], + "properties": { + "code": { + "description": "The promocode inserted by the customer to redeem the promotion", + "type": "string" + }, + "coupons": { + "description": "The coupons that got redeemed with received the code", + "type": "array", + "items": { + "$ref": "#/components/schemas/CouponWithoutPromoCodes" + } + } + } + }, + "PriceTier": { + "type": "object", + "properties": { + "up_to": { + "type": "number", + "nullable": true + }, + "flat_fee_amount": { + "type": "number" + }, + "flat_fee_amount_decimal": { + "type": "string" + }, + "unit_amount": { + "type": "number" + }, + "unit_amount_decimal": { + "type": "string" + }, + "display_mode": { + "$ref": "#/components/schemas/PriceTierDisplayMode" + } + } + }, + "PriceTierDisplayMode": { + "type": "string", + "enum": [ + "hidden", + "on_request" + ] + }, + "PricingModel": { + "type": "string", + "description": "Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.\n- `dynamic_tariff` indicates that the price is dynamically dependend on the (quarter)-hourly spot market price.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n", + "enum": [ + "per_unit", + "tiered_graduated", + "tiered_volume", + "tiered_flatfee", + "dynamic_tariff", + "external_getag" + ] + }, + "MarkupPricingModel": { + "type": "string", + "description": "Describes how to compute the markup per period. Either `per_unit`, `tiered_volume` or `tiered_flatfee`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unitary price for all purchased units.\n- `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.\n", + "enum": [ + "per_unit", + "tiered_volume", + "tiered_flatfee" + ] + }, + "TypeGetAg": { + "type": "string", + "enum": [ + "base_price", + "work_price" + ] + }, + "TariffTypeGetAg": { + "type": "string", + "enum": [ + "HT", + "NT" + ] + }, + "ConsumptionTypeGetAg": { + "type": "string", + "enum": [ + "household", + "heating_pump", + "night_storage_heating", + "night_storage_heating_common_meter" + ] + }, + "ProductCategory": { + "type": "string", + "enum": [ + "power", + "gas" + ] + }, + "PriceGetAg": { + "type": "object", + "properties": { + "category": { + "$ref": "#/components/schemas/ProductCategory" + }, + "markup_pricing_model": { + "$ref": "#/components/schemas/MarkupPricingModel" + }, + "type": { + "$ref": "#/components/schemas/TypeGetAg" + }, + "tariff_type": { + "$ref": "#/components/schemas/TariffTypeGetAg" + }, + "consumption_type": { + "$ref": "#/components/schemas/ConsumptionTypeGetAg" + }, + "concession_type": { + "oneOf": [ + { + "$ref": "#/components/schemas/GasConcessionType" + } + ] + }, + "meter_type": { + "oneOf": [ + { + "$ref": "#/components/schemas/PowerMeterType" + } + ] + }, + "markup_tiers": { + "description": "Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.\n", + "type": "array", + "items": { + "$ref": "#/components/schemas/PriceTier" + } + }, + "markup_amount": { + "type": "number" + }, + "markup_amount_decimal": { + "type": "string" + }, + "markup_amount_net": { + "type": "number" + }, + "markup_amount_net_decimal": { + "type": "string" + }, + "markup_amount_gross": { + "type": "number" + }, + "markup_amount_gross_decimal": { + "type": "string" + }, + "markup_total_amount_net": { + "type": "number" + }, + "markup_total_amount_net_decimal": { + "type": "string" + }, + "markup_total_amount_gross": { + "type": "number" + }, + "markup_total_amount_gross_decimal": { + "type": "string" + }, + "additional_markups_enabled": { + "type": "boolean", + "description": "Whether the additional markups are enabled" + }, + "additional_markups": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "amount_decimal": { + "type": "string" + }, + "amount": { + "type": "number" + }, + "amount_net": { + "type": "number" + }, + "amount_net_decimal": { + "type": "string" + }, + "amount_gross": { + "type": "number" + }, + "amount_gross_decimal": { + "type": "string" + } + }, + "required": [ + "amount_decimal", + "amount" + ] + } + }, + "unit_amount_gross": { + "type": "number" + }, + "unit_amount_gross_decimal": { + "type": "string" + }, + "unit_amount_net": { + "type": "number" + }, + "unit_amount_net_decimal": { + "type": "string" + } + }, + "required": [ + "category", + "markup_amount", + "markup_amount_decimal", + "unit_amount_gross", + "unit_amount_net" + ] + }, + "PriceDynamicTariff": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/DynamicTariffMode" + }, + "interval": { + "$ref": "#/components/schemas/DynamicTariffInterval" + }, + "average_price": { + "type": "number" + }, + "average_price_decimal": { + "type": "string" + }, + "markup_amount": { + "type": "number", + "description": "The markup amount, configured in Epilot, in cents." + }, + "markup_amount_decimal": { + "type": "string", + "description": "The markup amount, configured in Epilot, as a string with full precision." + }, + "markup_amount_net": { + "type": "number", + "description": "The markup amount net, configured in Epilot, in cents." + }, + "markup_amount_net_decimal": { + "type": "string", + "description": "The markup amount net, configured in Epilot, as a string with full precision." + }, + "markup_amount_gross": { + "type": "number", + "description": "The markup amount gross, configured in Epilot, in cents." + }, + "markup_amount_gross_decimal": { + "type": "string", + "description": "The markup amount gross, configured in Epilot, as a string with full precision." + }, + "unit_amount_net": { + "type": "number", + "description": "The unit amount net for the energy price in cents, it's provided by an external provider." + }, + "unit_amount_net_decimal": { + "type": "string", + "description": "The unit amount net for the energy price as a string with full precision, it's provided by an external provider." + }, + "unit_amount_gross": { + "type": "number", + "description": "The unit amount gross for the energy price in cents, it's provided by an external provider." + }, + "unit_amount_gross_decimal": { + "type": "string", + "description": "The unit amount gross for the energy price as a string with full precision, it's provided by an external provider." + } + }, + "required": [ + "mode", + "markup", + "markup_decimal", + "average_price", + "average_price_decimal" + ] + }, + "TierDetails": { + "type": "object", + "properties": { + "quantity": { + "type": "number" + }, + "unit_amount": { + "type": "number" + }, + "unit_amount_gross": { + "type": "number" + }, + "unit_amount_net": { + "type": "number" + }, + "amount_total": { + "type": "number" + }, + "amount_subtotal": { + "type": "number" + }, + "amount_tax": { + "type": "number" + }, + "unit_amount_decimal": { + "type": "string" + } + }, + "required": [ + "quantity", + "unit_amount", + "unit_amount_gross", + "unit_amount_net", + "amount_total", + "amount_subtotal", + "amount_tax", + "unit_amount_decimal" + ] + }, + "SearchExternalCatalogParams": { + "type": "object", + "properties": { + "context": { + "anyOf": [ + { + "$ref": "#/components/schemas/JourneyContext" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "context" + ] + }, + "ExternalCatalogRequest": { + "description": "The request payload for the external catalog service.", + "allOf": [ + { + "$ref": "#/components/schemas/ExternalCatalogConfigurationRequest" + }, + { + "oneOf": [ + { + "$ref": "#/components/schemas/ExternalCatalogJourneyRequest" + }, + { + "$ref": "#/components/schemas/ExternalCatalogPortalRequest" + }, + { + "$ref": "#/components/schemas/ExternalCatalogCustomRequest" + } + ] + } + ], + "discriminator": { + "propertyName": "origin", + "mapping": { + "journey": "#/components/schemas/ExternalCatalogJourneyRequest", + "portal": "#/components/schemas/ExternalCatalogPortalRequest", + "custom": "#/components/schemas/ExternalCatalogCustomRequest" + } + }, + "example": { + "config": { + "appId": "1234567890", + "componentId": "1234567890", + "hookId": "1234567890" + }, + "origin": "journey", + "context": { + "journey_id": "8d0a2235-97ce-42d0-88a3-e374634ca44e", + "entity_id": "9e1b3346-a8df-53e1-99b4-f485745db55f", + "journey_name": "Product Selection Journey", + "journey_tags": [ + "electricity", + "residential" + ], + "journey_url_params": { + "utm_source": "google", + "utm_campaign": "spring2024" + }, + "current_step_name": "Product Selection", + "current_block_name": "Energy Products", + "steps_data": [ + { + "step_name": "Address Information", + "step_index": 0, + "blocks": { + "Adresse": { + "countryCode": "DE", + "city": "Koblenz", + "zipCode": "56068", + "streetName": "Am Alten Hospital", + "houseNumber": "123" + } + } + } + ] + } + } + }, + "ExternalCatalogConfigurationRequest": { + "type": "object", + "description": "The request payload for the external catalog configuration service.", + "properties": { + "config": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "The app id.", + "example": "1234567890" + }, + "componentId": { + "type": "string", + "description": "The component id.", + "example": "1234567890" + }, + "hookId": { + "type": "string", + "description": "The hook id. If not provided, the first valid hook will be used.", + "example": "1234567890" + } + }, + "required": [ + "appId", + "componentId" + ] + } + }, + "example": { + "config": { + "appId": "1234567890", + "componentId": "1234567890", + "hookId": "1234567890" + } + } + }, + "ExternalCatalogJourneyRequest": { + "type": "object", + "description": "The request payload for the external catalog service with a journey context.", + "properties": { + "origin": { + "type": "string", + "description": "The origin of the request.", + "enum": [ + "journey" + ], + "example": "journey" + }, + "context": { + "$ref": "#/components/schemas/JourneyContext" + } + }, + "required": [ + "origin", + "context" + ] + }, + "ExternalCatalogPortalRequest": { + "type": "object", + "description": "The request payload for the external catalog service with a portal context.", + "properties": { + "origin": { + "type": "string", + "description": "The origin of the request.", + "enum": [ + "portal" + ], + "example": "portal" + }, + "context": { + "$ref": "#/components/schemas/PortalContext" + } + }, + "required": [ + "origin", + "context" + ] + }, + "ExternalCatalogCustomRequest": { + "type": "object", + "description": "The request payload for the external catalog service with a custom context. E.g. for requests from the Portal.", + "properties": { + "origin": { + "type": "string", + "description": "The origin of the request.", + "enum": [ + "custom" + ], + "example": "custom" + }, + "context": { + "$ref": "#/components/schemas/CustomContext" + } + }, + "required": [ + "origin", + "context" + ] + }, + "CustomContext": { + "type": "object", + "description": "A custom context object. E.g. for Portal context.", + "additionalProperties": true, + "example": { + "custom_context_key": "custom_context_value" + } + }, + "JourneyContext": { + "type": "object", + "additionalProperties": false, + "properties": { + "journey_id": { + "type": "string", + "description": "The ID of the journey.", + "example": "8d0a2235-97ce-42d0-88a3-e374634ca44e" + }, + "entity_id": { + "type": "string", + "description": "The ID of the entity.", + "example": "8d0a2235-97ce-42d0-88a3-e374634ca44e" + }, + "journey_name": { + "type": "string", + "description": "The name of the journey.", + "example": "journey name" + }, + "journey_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The tags of the journey." + }, + "journey_url_params": { + "type": "object", + "description": "The URL parameters of the journey.", + "additionalProperties": true + }, + "current_step_name": { + "description": "The name of the step where the products selection is happening.", + "type": "string", + "example": "step name" + }, + "current_block_name": { + "type": "string", + "example": "block name", + "description": "The name of the block where the products selection is happening." + }, + "steps_data": { + "type": "array", + "description": "The steps of the journey.", + "items": { + "type": "object", + "properties": { + "step_name": { + "type": "string", + "description": "The name of the step." + }, + "step_index": { + "type": "integer", + "description": "The index of the step." + }, + "blocks": { + "type": "object", + "description": "The data of the blocks.", + "additionalProperties": true, + "example": { + "Adresse": { + "countryCode": "DE", + "city": "Koblenz", + "zipCode": "56068", + "streetName": "Am Alten Hospital", + "houseNumber": "123" + } + } + } + }, + "additionalProperties": false, + "required": [ + "step_name", + "step_index", + "blocks" + ] + } + } + }, + "required": [ + "journey_id", + "journey_name", + "current_step_name", + "current_block_name", + "steps_data" + ] + }, + "PortalContext": { + "type": "object", + "additionalProperties": false, + "properties": { + "contract": { + "type": "object", + "description": "The contract information.", + "properties": { + "_id": { + "type": "string", + "description": "The unique identifier of the contract." + }, + "contract_name": { + "type": "string", + "description": "Contract Name" + }, + "contract_number": { + "type": "string", + "description": "Contract Number" + }, + "assignee": { + "type": "string", + "description": "Assignee user ID" + }, + "status": { + "type": "string", + "description": "Contract status", + "enum": [ + "draft", + "in_approval_process", + "approved", + "active", + "deactivated", + "revoked", + "terminated", + "expired" + ] + }, + "description": { + "type": "string", + "description": "Description of the contract" + }, + "billing_account": { + "type": "string", + "description": "Billing Account relation ID" + }, + "account_number": { + "type": "string", + "description": "Account Number" + }, + "branch": { + "type": "string", + "description": "Branch/commodity type", + "enum": [ + "power", + "gas", + "water", + "waste_water", + "district_heating" + ] + }, + "move_in_date": { + "type": "string", + "format": "date", + "description": "Move In Date" + }, + "move_out_date": { + "type": "string", + "format": "date", + "description": "Move Out Date" + }, + "billing_address": { + "type": "object", + "description": "Billing Address" + }, + "delivery_address": { + "type": "object", + "description": "Delivery Address" + }, + "additional_addresses": { + "type": "array", + "description": "Additional Addresses", + "items": { + "type": "object" + } + }, + "termination_date": { + "type": "string", + "format": "date", + "description": "Date of Termination" + }, + "termination_reason": { + "type": "string", + "description": "Reason For Termination" + }, + "start_date": { + "type": "string", + "format": "date", + "description": "Start Date" + }, + "end_date": { + "type": "string", + "format": "date", + "description": "End Date" + }, + "customer": { + "type": "array", + "description": "Customer relation (contact or account)", + "items": { + "type": "string" + } + }, + "order": { + "type": "string", + "description": "Order relation ID" + }, + "type": { + "type": "string", + "description": "Contract type", + "enum": [ + "one_time", + "recurring" + ] + }, + "billing_period": { + "type": "string", + "description": "Billing Period", + "enum": [ + "weekly", + "monthly", + "every_quarter", + "every_6_months", + "yearly" + ] + }, + "billing_duration_amount": { + "type": "number", + "description": "Billing Duration amount", + "minimum": 0 + }, + "billing_duration_unit": { + "type": "string", + "description": "Billing Duration Unit", + "enum": [ + "weeks", + "months", + "years" + ] + }, + "notice_time_amount": { + "type": "number", + "description": "Notice Time amount", + "minimum": 0 + }, + "notice_time_unit": { + "type": "string", + "description": "Notice Time Unit", + "enum": [ + "weeks", + "months", + "years" + ] + }, + "termination_time_amount": { + "type": "number", + "description": "Termination Time amount", + "minimum": 0 + }, + "termination_time_unit": { + "type": "string", + "description": "Termination Time Unit", + "enum": [ + "weeks", + "months", + "years" + ] + }, + "renewal_duration_amount": { + "type": "number", + "description": "Renewal Duration amount", + "minimum": 0 + }, + "renewal_duration_unit": { + "type": "string", + "description": "Renewal Duration Unit", + "enum": [ + "weeks", + "months", + "years" + ] + }, + "billing_due_day": { + "type": "number", + "description": "Billing Due Day" + }, + "installment_amount": { + "type": "object", + "description": "Installment Amount", + "properties": { + "value": { + "type": "number" + }, + "currency": { + "type": "string", + "default": "EUR" + } + } + }, + "balance": { + "type": "object", + "description": "Balance", + "properties": { + "value": { + "type": "number" + }, + "currency": { + "type": "string", + "default": "EUR" + } + } + }, + "meters": { + "type": "array", + "description": "Meters relation", + "items": { + "type": "string" + } + }, + "payment": { + "type": "string", + "description": "Payment Details relation ID" + }, + "last_sync_at": { + "type": "string", + "format": "date", + "description": "Last Sync At" + }, + "external_id": { + "type": "string", + "description": "External ID", + "readOnly": true + } + } + }, + "contact": { + "type": "object", + "description": "The contact information.", + "properties": { + "_id": { + "type": "string", + "description": "The unique identifier of the contact." + }, + "salutation": { + "type": "string", + "description": "Salutation", + "enum": [ + "Mr.", + "Ms. / Mrs.", + "Company", + "Contact Person", + "Company/Contact Person", + "Spouse", + "Family", + "Ownership", + "Assembly", + "Other" + ] + }, + "title": { + "type": "string", + "description": "Title", + "enum": [ + "Dr.", + "Prof.", + "Prof. Dr." + ] + }, + "first_name": { + "type": "string", + "description": "First Name" + }, + "last_name": { + "type": "string", + "description": "Last Name" + }, + "customer_number": { + "type": "string", + "description": "Customer Number" + }, + "birthdate": { + "type": "string", + "format": "date", + "description": "Date of Birth" + }, + "email": { + "type": "array", + "description": "Email addresses", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "_primary": { + "type": "boolean" + } + } + } + }, + "phone": { + "type": "array", + "description": "Phone numbers", + "items": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "_primary": { + "type": "boolean" + } + } + } + }, + "communication_preference": { + "type": "string", + "description": "Standard communication method", + "enum": [ + "postal", + "portal" + ] + }, + "address": { + "type": "array", + "description": "Addresses", + "items": { + "type": "object", + "properties": { + "_primary": { + "type": "boolean" + }, + "postal_code": { + "type": "string" + }, + "city": { + "type": "string" + }, + "street": { + "type": "string" + }, + "street_number": { + "type": "string" + }, + "country": { + "type": "string" + } + } + } + }, + "payment": { + "type": "array", + "description": "Payment methods", + "items": { + "type": "object", + "properties": { + "_primary": { + "type": "boolean" + } + } + } + }, + "account": { + "type": "array", + "description": "Account relations", + "items": { + "type": "string" + } + }, + "marketing_permission": { + "type": "boolean", + "description": "Marketing Permission (deprecated)", + "deprecated": true + }, + "contact_owner": { + "type": "string", + "description": "Contact Owner user ID" + }, + "consent_email_marketing": { + "type": "object", + "description": "Email Marketing consent" + }, + "consent_sms_marketing": { + "type": "object", + "description": "SMS Marketing consent" + }, + "consent_phone_call": { + "type": "object", + "description": "Direct Phone Marketing consent" + }, + "consent_print_marketing": { + "type": "object", + "description": "Print Marketing consent" + }, + "portal_users": { + "type": "array", + "description": "Portal Users relation", + "items": { + "type": "string" + } + }, + "opportunities": { + "type": "array", + "description": "Opportunities relation", + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Orders relation", + "items": { + "type": "string" + } + }, + "contracts": { + "type": "array", + "description": "Contracts relation", + "items": { + "type": "string" + } + }, + "external_id": { + "type": "string", + "description": "External ID", + "readOnly": true + } + } + } + }, + "required": [ + "contract", + "contact" + ] + }, + "SearchExternalCatalogResult": { + "type": "object", + "properties": { + "hits": { + "type": "number", + "description": "The number of results returned." + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalCatalogItem" + } + } + }, + "required": [ + "results", + "hits" + ] + }, + "SearchExternalCatalogRecommendationsResult": { + "type": "object", + "properties": { + "source": { + "$ref": "#/components/schemas/ExternalCatalogItem" + }, + "offers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalCatalogItem" + } + } + }, + "required": [ + "source", + "offers" + ] + }, + "ExternalCatalogItem": { + "type": "object", + "description": "An external product & price information (already computed) from an external catalog.", + "properties": { + "pricing_details": { + "$ref": "#/components/schemas/PricingDetails" + }, + "_meta": { + "$ref": "#/components/schemas/SignatureMeta" + } + }, + "required": [ + "pricing_details", + "_meta" + ] + }, + "ProductRecommendationSearch": { + "description": "Product recommendations request payload", + "type": "object", + "properties": { + "product_recommendation_ids": { + "type": "array", + "items": { + "type": "string", + "description": "Product recommendation id" + } + }, + "catalog_item": { + "type": "object", + "description": "The catalog item to be used as source for the recommendation", + "properties": { + "product_id": { + "type": "string", + "description": "Product id" + }, + "price_id": { + "type": "string", + "description": "Product id" + } + } + }, + "contract_id": { + "type": "string", + "description": "The contract id to be used as source for the recommendation" + }, + "filters": { + "$ref": "#/components/schemas/AvailabilityFilters" + } + } + }, + "ProductRecommendationResponse": { + "description": "Product recommendations request payload", + "type": "object", + "properties": { + "hits": { + "type": "number", + "description": "The number of results returned." + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductRecommendation" + } + } + }, + "required": [ + "results", + "hits" + ] + }, + "Offer": { + "type": "object", + "properties": { + "target_id": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "price_id": { + "type": "string" + }, + "product_id": { + "type": "string" + } + }, + "required": [ + "price_id", + "product_id" + ] + } + } + } + }, + "ProductRecommendation": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityItem" + } + ], + "type": "object", + "properties": { + "source_price": { + "type": "object", + "description": "Price being used as source", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + "source_product": { + "type": "object", + "description": "Product being used as source", + "properties": { + "$relation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + "type": { + "type": "string", + "description": "Type of product recommendation", + "enum": [ + "change", + "cross-sell", + "up-sell" + ] + }, + "offers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Offer" + } + } + } + } + }, + "examples": { + "checkout-with-transient-cart": { + "value": { + "mode": "create_order", + "cart": { + "customer": { + "first_name": "john", + "last_name": "doe", + "company_name": "company limited", + "vat_id": "123892321", + "email": "johndoe@company.com", + "phone": "+44233242423" + }, + "billing_address": { + "street1": "wallstreet", + "street2": 1, + "city": "new york city", + "country": "united states", + "country_code": "US", + "additional_info": "headquarters office" + }, + "delivery_address": { + "street1": "berverly hills avenue", + "street2": "block 1", + "city": "berverly hills", + "country": "california", + "country_code": "CA", + "additional_info": "remote cowork place" + }, + "line_items": [ + { + "quantity": 3, + "product_id": "b7185fb7-b10f-4875-bda7-288631446555", + "price_id": "df240bab-9f71-4a9a-a9e1-59f18827dbf9", + "is_composite_price": false + }, + { + "quantity": 2, + "product_id": "607d2952-8f3e-484f-a82b-4880528b7f55", + "price_id": "7b028fdf-0b0a-4077-a8f1-d0cbbd14b7cf", + "is_composite_price": false + } + ] + } + } + }, + "checkout-result": { + "value": { + "order": { + "_id": "d1ZoC1FwZ6", + "type": "Draft", + "cart_id": "p0ZoB1FwH6", + "order_number": "20201021-234324", + "_org_id": "123", + "metadata": [ + { + "key": "journey-id", + "value": "8d0a2235-97ce-42d0-88a3-e374634ca44e" + } + ], + "billing_first_name": "john", + "billing_last_name": "doe", + "billing_company_name": "i me and myself", + "billing_vat": "234823948", + "billing_email": "johndoe@nowhere.com", + "currency": "EUR", + "billing_phone": "+1234234545", + "billing_contact": "villy or zilly", + "line_items": [ + { + "id": "mSjGCTfn8w", + "pricing_model": "per_unit", + "is_composite_price": false, + "metadata": [ + { + "cart_id": "p0ZoB1FwH6" + } + ], + "description": "Wallbox Premium - Premium Price", + "currency": "EUR", + "unit_amount": 78900, + "amount_subtotal": 50000, + "amount_total": 61500, + "quantity": 1, + "product_id": "b7185fb7-b10f-4875-bda7-288631446555", + "price_id": "df240bab-9f71-4a9a-a9e1-59f18827dbf9", + "taxes": [ + { + "amount": 11500, + "rate": "MwSt. 23%" + } + ], + "_price": { + "_id": "df240bab-9f71-4a9a-a9e1-59f18827dbf9", + "unit_amount": 78900, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "789", + "type": "one_time", + "active": true, + "sales_tax": "standard", + "is_tax_inclusive": true, + "description": "Winter Sale", + "_created_at": "2021-11-10T18:02:58.318Z", + "_updated_at": "2021-11-10T18:02:58.318Z", + "_title": "Winter Sale", + "pricing_model": "per_unit", + "is_composite_price": false + } + }, + { + "id": "mZkGCTfn6p", + "metadata": [ + { + "cart_id": "p0ZoB1FwH6" + } + ], + "description": "Wallbox Basic with Full Add-ons - Basic Price", + "currency": "EUR", + "unit_amount": 78900, + "amount_subtotal": 50000, + "amount_total": 53500, + "quantity": 1, + "product_id": "zzzzzz-b10f-4875-bda7-288631446555", + "price_id": "zzzzz-9f71-4a9a-a9e1-59f18827dbf9", + "pricing_model": "per_unit", + "is_composite_price": false, + "taxes": [ + { + "amount": 3500, + "rate": "MwSt. 7%" + } + ], + "_price": { + "_id": "zzzzz-9f71-4a9a-a9e1-59f18827dbf9", + "unit_amount": 78900, + "unit_amount_decimal": "789", + "unit_amount_currency": "EUR", + "type": "one_time", + "active": true, + "sales_tax": "standard", + "is_tax_inclusive": true, + "description": "Winter Sale", + "billing_scheme": "per_unit", + "_created_at": "2021-11-10T18:02:58.318Z", + "_updated_at": "2021-11-10T18:02:58.318Z", + "_title": "Winter Sale", + "pricing_model": "per_unit", + "is_composite_price": false + } + } + ], + "amount_subtotal": 100000, + "amount_total": 115000, + "total_details": { + "amount_shipping": 10000, + "amount_tax": 15000, + "breakdown": { + "taxes": [ + { + "tax": { + "_id": "936db2a1-3748-45b6-bb9d-04943280ceeb", + "type": "VAT", + "rate": 23 + }, + "amount": 11500 + }, + { + "tax": { + "_id": "936db2a1-3748-45b6-bb9d-04943280cee4", + "type": "VAT", + "rate": 7 + }, + "amount": 3500 + } + ] + } + }, + "_created_at": "2021-11-10T18:02:58.318Z", + "_updated_at": "2021-11-10T18:02:58.318Z" + } + } + } + } + } +} diff --git a/packages/cli/definitions/purpose.json b/packages/cli/definitions/purpose.json new file mode 100644 index 00000000..d0cfcc1e --- /dev/null +++ b/packages/cli/definitions/purpose.json @@ -0,0 +1,524 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Purpose API", + "version": "1.0.0", + "description": "Purpose API - enables the management of purposes for the epilot platform. \n\nepilot 'Purposes' are a special system taxonomy used to tag and organize resources (entities, attributes, groups, automations, templates, etc.) across the platform.\nIn essence, purposes are deeply connected to what information users can see or not on epilot360 UIs based on the \"purpose\" of the tasks they have at hand.\n", + "contact": { + "name": "Support", + "email": "info@epilot.cloud", + "url": "https://help.epilot.cloud" + } + }, + "tags": [ + { + "name": "Purpose", + "description": "Purpose operations" + }, + { + "name": "purpose_schema", + "x-displayName": "Purpose", + "description": "\n" + } + ], + "x-tagGroups": [ + { + "name": "APIs", + "tags": [ + "Purpose" + ] + }, + { + "name": "Schemas", + "tags": [ + "purpose_schema" + ] + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "servers": [ + { + "url": "https://purpose.sls.epilot.io" + }, + { + "url": "https://purpose.sls.epilot.io", + "description": "Production server" + } + ], + "paths": { + "/v1/purpose": { + "post": { + "operationId": "createPurpose", + "summary": "Create Purpose", + "description": "Create a new purpose", + "tags": [ + "Purpose" + ], + "requestBody": { + "$ref": "#/components/requestBodies/CreatePurposeRequest" + }, + "responses": { + "201": { + "$ref": "#/components/responses/PurposeResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedResponse" + }, + "403": { + "$ref": "#/components/responses/ForbiddenResponse" + }, + "409": { + "$ref": "#/components/responses/ConflictResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + }, + "/v1/purpose:search": { + "get": { + "operationId": "searchPurposes", + "summary": "Search Purposes", + "description": "Search purposes using fuzzy matching.\n", + "tags": [ + "Purpose" + ], + "parameters": [ + { + "$ref": "#/components/parameters/QueryParam" + }, + { + "$ref": "#/components/parameters/SizeParam" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/PurposeSearchResponse" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + }, + "/v1/purpose:batchGet": { + "post": { + "operationId": "batchGetPurposes", + "summary": "Batch Get Purposes", + "description": "Fetch multiple purposes by their known IDs in a single request.\n\n**Use this for:**\n- Hydrating purpose references from entities\n- Resolving a list of purpose IDs to full objects\n\n**Do NOT use this for:**\n- Browsing/discovering purposes (use `searchPurposes` instead)\n- Autocomplete (use `searchPurposes` instead)\n\n**Examples:**\n- Entity has `_purposes: [\"uuid-1\", \"uuid-2\"]` → fetch full purpose objects\n- Display purpose names for a list of tagged entities\n", + "tags": [ + "Purpose" + ], + "requestBody": { + "$ref": "#/components/requestBodies/BatchGetPurposesRequest" + }, + "responses": { + "200": { + "$ref": "#/components/responses/PurposeListResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + }, + "/v1/purpose/{purposeId}": { + "get": { + "operationId": "getPurpose", + "summary": "Get Purpose", + "description": "Get a single purpose by ID", + "tags": [ + "Purpose" + ], + "parameters": [ + { + "$ref": "#/components/parameters/PurposeIdPathParam" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/PurposeResponse" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedResponse" + }, + "404": { + "$ref": "#/components/responses/NotFoundResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + }, + "put": { + "operationId": "updatePurpose", + "summary": "Update Purpose", + "description": "Update an existing purpose", + "tags": [ + "Purpose" + ], + "parameters": [ + { + "$ref": "#/components/parameters/PurposeIdPathParam" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/UpdatePurposeRequest" + }, + "responses": { + "200": { + "$ref": "#/components/responses/PurposeResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedResponse" + }, + "403": { + "$ref": "#/components/responses/ForbiddenResponse" + }, + "404": { + "$ref": "#/components/responses/NotFoundResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + }, + "delete": { + "operationId": "deletePurpose", + "summary": "Delete Purpose", + "description": "Permanently delete a purpose", + "tags": [ + "Purpose" + ], + "parameters": [ + { + "$ref": "#/components/parameters/PurposeIdPathParam" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/PurposeResponse" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedResponse" + }, + "403": { + "$ref": "#/components/responses/ForbiddenResponse" + }, + "404": { + "$ref": "#/components/responses/NotFoundResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", + "description": "Epilot Bearer token" + }, + "EpilotOrg": { + "type": "apiKey", + "in": "header", + "name": "x-epilot-org-id", + "description": "Epilot Organization ID" + } + }, + "parameters": { + "PurposeIdPathParam": { + "name": "purposeId", + "in": "path", + "required": true, + "description": "Purpose ID (UUID)", + "schema": { + "type": "string" + }, + "example": "1fdc8f66-0e2b-4e20-a347-9cbdbf6a7217" + }, + "QueryParam": { + "name": "query", + "in": "query", + "required": false, + "description": "Search query string", + "schema": { + "type": "string" + }, + "example": "electricity" + }, + "SizeParam": { + "name": "size", + "in": "query", + "required": false, + "description": "Maximum number of results to return", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + } + }, + "schemas": { + "Purpose": { + "type": "object", + "description": "A purpose used to tag and organize entities", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "name": { + "type": "string", + "description": "Human-readable name", + "example": "Electricity Contract" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "ISO timestamp of creation" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "ISO timestamp of last update" + } + } + }, + "CreatePurposeInput": { + "type": "object", + "description": "Input for creating a new purpose", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Human-readable name", + "example": "Electricity Contract" + } + } + }, + "UpdatePurposeInput": { + "type": "object", + "description": "Input for updating an existing purpose", + "properties": { + "name": { + "type": "string", + "description": "Human-readable name" + } + } + }, + "BatchGetPurposesInput": { + "type": "object", + "description": "Input for batch getting purposes", + "required": [ + "purposeIds" + ], + "properties": { + "purposeIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of purpose IDs to fetch", + "example": [ + "123e4567-e89b-12d3-a456-426614174000" + ] + } + } + }, + "Error": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "description": "HTTP status code" + }, + "error": { + "type": "string", + "description": "Error message" + } + } + } + }, + "requestBodies": { + "CreatePurposeRequest": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePurposeInput" + } + } + } + }, + "UpdatePurposeRequest": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePurposeInput" + } + } + } + }, + "BatchGetPurposesRequest": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchGetPurposesInput" + } + } + } + } + }, + "responses": { + "PurposeResponse": { + "description": "Single purpose response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Purpose" + } + } + } + }, + "PurposeListResponse": { + "description": "List of purposes", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Purpose" + } + }, + "hits": { + "type": "integer", + "description": "Total number of results" + } + } + } + } + } + }, + "PurposeSearchResponse": { + "description": "Search results", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Purpose" + } + } + } + } + } + } + }, + "ClientErrorResponse": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "UnauthorizedResponse": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "ForbiddenResponse": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "NotFoundResponse": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "ConflictResponse": { + "description": "Conflict - resource already exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "ServerErrorResponse": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } +} diff --git a/packages/cli/definitions/sandbox.json b/packages/cli/definitions/sandbox.json new file mode 100644 index 00000000..e3b96e3e --- /dev/null +++ b/packages/cli/definitions/sandbox.json @@ -0,0 +1,453 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Sandbox API", + "version": "0.0.1", + "description": "API to set up pipeline connections between epilot orgs to sync and promote configurations (from sandbox to production and vice-versa)\n" + }, + "tags": [ + { + "name": "Pipelines", + "description": "Manage Sandbox Pipelines" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v1/sandbox/pipelines": { + "get": { + "operationId": "listPipelines", + "summary": "listPipelines", + "description": "List pipelines the current organization is part of", + "tags": [ + "Pipelines" + ], + "responses": { + "200": { + "description": "List of pipelines the current organization is part of", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pipeline" + } + }, + "total": { + "type": "integer", + "example": 1 + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createPipeline", + "summary": "createPipeline", + "description": "Create a new pipeline by passing an api token from another organization.\n\nNote: The API token should have administrator role access for the other org.\n", + "tags": [ + "Pipelines" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePipelineRequest" + } + } + } + }, + "responses": { + "201": { + "description": "The created pipeline", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pipeline" + } + } + } + } + } + } + }, + "/v1/sandbox/pipelines/{pipeline_id}": { + "get": { + "operationId": "getPipeline", + "summary": "getPipeline", + "description": "Get pipeline by ID", + "tags": [ + "Pipelines" + ], + "parameters": [ + { + "name": "pipeline_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "responses": { + "200": { + "description": "The returned pipeline", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pipeline" + } + } + } + } + } + }, + "delete": { + "operationId": "deletePipeline", + "summary": "deletePipeline", + "description": "Delete a pipeline by ID", + "tags": [ + "Pipelines" + ], + "parameters": [ + { + "name": "pipeline_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "responses": { + "200": { + "description": "The deleted pipeline", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pipeline" + } + } + } + } + } + } + }, + "/v1/sandbox/pipelines/{pipeline_id}/token": { + "get": { + "operationId": "generatePipelineToken", + "summary": "generatePipelineToken", + "description": "Generate a temporary pipeline access token to access the other org from the pipeline", + "tags": [ + "Pipelines" + ], + "parameters": [ + { + "name": "pipeline_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "responses": { + "200": { + "description": "The generated temporary pipeline token", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "pipeline_token": { + "$ref": "#/components/schemas/PipelineToken" + } + } + } + } + } + } + } + } + }, + "/v1/sandbox:request": { + "post": { + "operationId": "requestSandbox", + "summary": "requestSandbox", + "description": "Request a sandbox account for a user", + "tags": [ + "Sandbox Requests" + ], + "security": [ + {}, + { + "EpilotAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SandboxRequest" + } + } + } + }, + "responses": { + "201": { + "description": "The created sandbox request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SandboxRequest" + } + } + } + } + } + } + }, + "/v1/sandbox/requests": { + "get": { + "operationId": "listSandboxRequests", + "summary": "listSandboxRequests", + "description": "List sandbox requests from users", + "tags": [ + "Sandbox Requests" + ], + "responses": { + "200": { + "description": "List of sandbox requests made by users", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SandboxRequest" + } + }, + "total": { + "type": "integer", + "example": 1 + } + } + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + } + }, + "schemas": { + "OrgId": { + "description": "Epilot Tenant Organization ID", + "type": "string", + "example": "54321" + }, + "PipelineId": { + "type": "string", + "description": "Unique identifier for a pipeline.\n\nThe format for a pipeline is: `::`\n", + "example": "12345::54321" + }, + "PipelineRole": { + "type": "string", + "description": "The role of the other organization in the pipeline from the perspective of the caller's organization", + "enum": [ + "sandbox", + "production" + ] + }, + "PipelineItem": { + "type": "object", + "properties": { + "pipeline_id": { + "$ref": "#/components/schemas/PipelineId" + }, + "sandbox_org_id": { + "allOf": [ + { + "$ref": "#/components/schemas/OrgId" + }, + { + "example": "12345" + } + ] + }, + "sandbox_org_name": { + "type": "string", + "example": "Sandbox" + }, + "production_org_id": { + "$ref": "#/components/schemas/OrgId" + }, + "production_org_name": { + "type": "string", + "example": "Production" + }, + "created_at": { + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "Pipeline": { + "allOf": [ + { + "properties": { + "pipeline_role": { + "$ref": "#/components/schemas/PipelineRole" + } + } + }, + { + "$ref": "#/components/schemas/PipelineItem" + } + ] + }, + "CreatePipelineRequest": { + "type": "object", + "properties": { + "pipeline_role": { + "$ref": "#/components/schemas/PipelineRole" + }, + "api_token": { + "$ref": "#/components/schemas/SandboxToken" + } + }, + "required": [ + "pipeline_role", + "api_token" + ] + }, + "AccessToken": { + "type": "string", + "description": "An epilot access token", + "example": "eyJhbGciOiJIUzI1NiIs..." + }, + "SandboxToken": { + "allOf": [ + { + "$ref": "#/components/schemas/AccessToken" + }, + { + "description": "An API token generated from the sandbox org" + } + ] + }, + "PipelineToken": { + "allOf": [ + { + "$ref": "#/components/schemas/AccessToken" + }, + { + "description": "A temporary access token" + } + ] + }, + "SandboxRequest": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the request", + "example": 12345, + "readOnly": true + }, + "fullname": { + "type": "string", + "description": "The user who made the request", + "example": "John Doe" + }, + "company_name": { + "type": "string", + "description": "The company name of the user who made the request", + "example": "Company Name" + }, + "position": { + "type": "string", + "description": "The position of the user who made the request", + "example": "Software Engineer" + }, + "email": { + "type": "string", + "format": "email", + "description": "The email of the user who made the request", + "example": "user@example.com" + }, + "sandbox_usecase": { + "type": "string", + "description": "The usecase for the request", + "example": "Build a payment integration" + }, + "status": { + "type": "string", + "description": "The status of the request", + "example": "pending", + "enum": [ + "pending", + "created", + "rejected" + ], + "readOnly": true + }, + "connected_to_existing_epilot_customer": { + "type": "boolean", + "description": "Whether the user is in contact with an existing epilot customer" + }, + "requested_at": { + "type": "string", + "format": "date-time", + "description": "The time the request was made", + "example": "2022-01-01T00:00:00Z", + "readOnly": true + }, + "sandbox_request_category": { + "type": "string", + "description": "The category of the sandbox requested", + "enum": [ + "APP_DEVELOPER_ACCOUNT", + "BLUEPRINT_SANDBOX", + "OTHER" + ] + } + }, + "required": [ + "fullname", + "company_name", + "position", + "email", + "sandbox_usecase", + "connected_to_existing_epilot_customer" + ] + } + } + }, + "servers": [ + { + "url": "https://sandbox.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/submission.json b/packages/cli/definitions/submission.json new file mode 100644 index 00000000..b39abc8a --- /dev/null +++ b/packages/cli/definitions/submission.json @@ -0,0 +1,313 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Submission API", + "version": "1.0.0", + "description": "Use this API to handle submissions entities from external sources e.g. journeys and frontends\n" + }, + "tags": [ + { + "name": "Submissions", + "description": "Journey Submission" + }, + { + "name": "submission_schema", + "x-displayName": "Submission", + "description": "\n" + } + ], + "x-tagGroups": [ + { + "name": "APIs", + "tags": [ + "Submissions" + ] + }, + { + "name": "Schemas", + "tags": [ + "submission_schema" + ] + } + ], + "security": [ + {}, + { + "EpilotAuth": [] + } + ], + "paths": { + "/v1/submission/submissions": { + "post": { + "operationId": "createSubmission", + "summary": "createSubmission", + "description": "Creates a submission from a public facing Journey\n", + "tags": [ + "Submissions" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmissionPayload" + } + } + } + }, + "responses": { + "201": { + "description": "Success" + } + } + } + }, + "/v1/submission/nonce/{nonce_id}": { + "get": { + "operationId": "getNonce", + "summary": "Check if a nonce was already used (aka exists in storage)", + "description": "Returns { exists: boolean } along some meta data", + "tags": [ + "Submissions" + ], + "parameters": [ + { + "name": "nonce_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Nonce found", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubmissionNonce" + }, + { + "type": "object", + "properties": { + "exists": { + "type": "boolean", + "example": true + } + } + } + ] + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Epilot Authorization Bearer Token - public access token / user token", + "bearerFormat": "JWT" + } + }, + "schemas": { + "SubmissionNonce": { + "type": "object", + "properties": { + "nonce": { + "type": "string" + }, + "submission_id": { + "type": "string" + }, + "organization_id": { + "type": "string" + }, + "ttl": { + "type": "number" + } + }, + "required": [ + "nonce", + "submission_id", + "organization_id" + ] + }, + "SubmissionPayload": { + "description": "Holds content and meta information", + "type": "object", + "properties": { + "organization_id": { + "description": "organization id – defaults to token value", + "type": "string", + "example": "123" + }, + "journey_submit_id": { + "description": "journey submit uid", + "type": "string", + "example": "123" + }, + "source_type": { + "type": "string", + "description": "type of source, e.g. journey or frontend", + "example": "journey" + }, + "source_id": { + "type": "string", + "description": "identifier for source e.g. journey ID or frontend ID", + "example": "ce99875f-fba9-4fe2-a8f9-afaf52059051" + }, + "opt_ins": { + "description": "Opt-ins to create from submission\n", + "type": "array", + "maxItems": 10, + "items": { + "$ref": "#/components/schemas/OptIn" + } + }, + "entities": { + "description": "Entities to create from submission\n", + "type": "array", + "minItems": 1, + "maxItems": 10, + "items": { + "$ref": "#/components/schemas/SubmissionEntity" + } + }, + "_ivy_opportunity_ids": { + "deprecated": true, + "description": "Related Ivy Opportunity Ids", + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "source_type", + "source_id", + "entities" + ] + }, + "SubmissionEntity": { + "type": "object", + "description": "The submission entity to create", + "additionalProperties": true, + "properties": { + "_schema": { + "type": "string", + "enum": [ + "submission" + ] + }, + "description": { + "type": "string", + "description": "Readable description of the submission. Will be used as the title if passed" + }, + "files": { + "type": "array", + "description": "Files to attach to Submission Entity as a relation (s3refs from File API)\n", + "items": { + "type": "object", + "properties": { + "s3ref": { + "$ref": "#/components/schemas/S3Reference" + }, + "filename": { + "type": "string", + "description": "Override the file name" + }, + "_tags": { + "type": "array", + "description": "List of tags for File entities", + "items": { + "type": "string" + } + }, + "relation_tags": { + "type": "array", + "description": "List of relation labels for File attachments", + "items": { + "type": "string" + } + } + }, + "additionalProperties": true, + "required": [ + "s3ref" + ] + } + } + }, + "required": [ + "_schema" + ], + "example": { + "_schema": "submission", + "description": "Submission created via API", + "contact_first_name": "First", + "contact_last_name": "Last", + "contact_email": "example@submission.com", + "request": "I would like to know more about electric vehicles", + "files": [ + { + "s3ref": { + "bucket": "epilot-user-content", + "key": "temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + }, + "filename": "document.pdf" + } + ] + } + }, + "OptIn": { + "type": "object", + "properties": { + "topic": { + "type": "string", + "example": "EMAIL_MARKETING" + }, + "identifier": { + "type": "string", + "description": "Consent identifier", + "example": "example@email.com" + }, + "meta": { + "type": "object", + "additionalProperties": true + } + } + }, + "S3Reference": { + "type": "object", + "description": "S3 Reference from File API", + "properties": { + "bucket": { + "type": "string", + "example": "epilot-user-content" + }, + "key": { + "type": "string", + "example": "temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + } + }, + "required": [ + "bucket", + "key" + ] + } + } + }, + "servers": [ + { + "url": "https://submission.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/targeting.json b/packages/cli/definitions/targeting.json new file mode 100644 index 00000000..b04e2bd8 --- /dev/null +++ b/packages/cli/definitions/targeting.json @@ -0,0 +1,1474 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Targeting API", + "description": "API for Targeting", + "version": "1.1.0" + }, + "tags": [ + { + "name": "Campaign", + "description": "Campaign Endpoints" + }, + { + "name": "Campaign Recipient", + "description": "Campaign Recipient Endpoints" + }, + { + "name": "Campaign Delivery", + "description": "Campaign Delivery Endpoints" + }, + { + "name": "Target", + "description": "Target Endpoints" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "servers": [ + { + "url": "https://targeting.sls.epilot.io" + }, + { + "url": "https://targeting.sls.epilot.io" + }, + { + "url": "https://targeting.sls.epilot.io", + "description": "Production Server" + } + ], + "paths": { + "/v1/campaign/{campaign_id}/status": { + "post": { + "operationId": "changeCampaignStatus", + "summary": "Change the status of a campaign", + "description": "Change the status of a campaign to a desired status.\n\nThe status can be one of the following: active, inactive.\n\nStatus transition is accompanied by side effects, e.g., automation execution.\n", + "tags": [ + "Campaign" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/CampaignIdPathParam" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/CampaignResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + }, + "/v1/campaign/{campaign_id}/job": { + "get": { + "operationId": "getCampaignJobStatus", + "description": "Get the status of a campaign's automation job", + "summary": "Get the status of a campaign's automation job", + "tags": [ + "Campaign" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/CampaignIdPathParam" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/JobStatusResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + }, + "/v1/campaign/{campaign_id}/portals": { + "get": { + "operationId": "getCampaignPortals", + "summary": "Get portals usage info for a campaign", + "description": "Get the list of portals and its widgets where the campaign is used.\n", + "tags": [ + "Campaign" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/CampaignIdPathParam" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/CampaignPortalsResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + }, + "/v1/campaign/{campaign_id}/automations:retrigger": { + "post": { + "operationId": "retriggerCampaignAutomations", + "summary": "Retrigger automations for campaign recipients", + "description": "Retrigger automation executions for specific campaign recipients that have failed.\n\nThis endpoint starts new automation executions for the specified recipients\nusing the campaign's associated automation flow. Only recipients with\nautomation_status 'failed' will be processed. Recipients with other statuses\n(success, pending, in_progress, cancelled) will be skipped to prevent\naccidentally retriggering successful or ongoing automations.\n", + "tags": [ + "Campaign Delivery" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/CampaignIdPathParam" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RetriggerAutomationsRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/RetriggerAutomationsResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "404": { + "$ref": "#/components/responses/ServerErrorResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + }, + "/v1/campaign:match": { + "post": { + "operationId": "matchCampaigns", + "summary": "Match campaigns", + "description": "Match campaigns based on target entities.\n\nThis endpoint returns the list of campaigns where the provided entities are part of the target.\n", + "tags": [ + "Campaign" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MatchCampaignParams" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/MatchCampaignsResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + }, + "/v1/target:match": { + "post": { + "operationId": "matchTargets", + "summary": "Match targets", + "description": "Find targets from the provided list that include the provide entities.\n", + "tags": [ + "Target" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MatchTargetParams" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/MatchTargetsResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + }, + "/v1/target/queries": { + "post": { + "operationId": "getTargetQueries", + "summary": "Get target queries", + "description": "Transform target filters into Lucene queries for the provided target IDs.\nReturns the transformed query string for each target along with any errors encountered.\n", + "tags": [ + "Target" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTargetQueriesParams" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/GetTargetQueriesResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + }, + "/v1/campaign/{campaign_id}/recipient": { + "post": { + "operationId": "createRecipient", + "summary": "Create a recipient associated with a campaign", + "description": "Creates a new recipient associated with a campaign.", + "tags": [ + "Campaign Recipient" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/CampaignIdPathParam" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateRecipientPayload" + } + } + } + }, + "responses": { + "201": { + "$ref": "#/components/responses/RecipientResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + }, + "/v1/campaign/{campaign_id}/recipient/{recipient_id}": { + "patch": { + "operationId": "updateRecipient", + "summary": "Update a recipient", + "description": "Updates a recipient's attributes.", + "tags": [ + "Campaign Recipient" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/CampaignIdPathParam" + }, + { + "$ref": "#/components/parameters/RecipientIdPathParam" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRecipientPayload" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/RecipientResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + }, + "/v1/campaign/{campaign_id}/recipient/{recipient_id}/portal:status": { + "patch": { + "operationId": "updateRecipientPortalStatus", + "summary": "Update portal status for a campaign recipient", + "description": "Updates the portal status for a specific campaign recipient.\nThe portal_status_updated_at timestamp is automatically set when the status changes.\n\nStatus transition rules:\n- From 'sent': can change to 'seen', 'dismissed', or 'clicked'\n- From 'seen': can change to 'dismissed' or 'clicked'\n- From 'dismissed' or 'clicked': cannot be changed (final states)\n", + "tags": [ + "Campaign Recipient" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/CampaignIdPathParam" + }, + { + "$ref": "#/components/parameters/RecipientIdPathParam" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePortalStatusRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/RecipientResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "404": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "409": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + }, + "/v1/campaign/{campaign_id}/recipients": { + "get": { + "operationId": "getRecipients", + "summary": "Get campaign recipients", + "description": "Get a paginated list of recipients for a campaign.", + "tags": [ + "Campaign Recipient" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/CampaignIdPathParam" + }, + { + "name": "limit", + "in": "query", + "description": "Number of items to return", + "schema": { + "type": "integer", + "default": 25 + } + }, + { + "name": "next", + "in": "query", + "description": "Cursor for pagination", + "schema": { + "type": "string" + } + }, + { + "name": "q", + "in": "query", + "description": "Search by recipient title", + "schema": { + "type": "string" + } + }, + { + "name": "automation_status", + "in": "query", + "description": "Filter by automation status", + "schema": { + "$ref": "#/components/schemas/AutomationStatus" + } + }, + { + "name": "portal_status", + "in": "query", + "description": "Filter by portal status", + "schema": { + "$ref": "#/components/schemas/PortalStatus" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/RecipientsResponse" + }, + "400": { + "$ref": "#/components/responses/ClientErrorResponse" + }, + "500": { + "$ref": "#/components/responses/ServerErrorResponse" + } + } + } + } + }, + "components": { + "schemas": { + "BaseError": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 404 + }, + "message": { + "type": "string", + "example": "Entity not found" + } + }, + "required": [ + "status", + "message" + ] + }, + "ServerError": { + "$ref": "#/components/schemas/BaseError" + }, + "ClientError": { + "oneOf": [ + { + "type": "object", + "title": "MessageError", + "description": "An error object containing a human-readable message.", + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message.", + "example": "The provided input was invalid." + } + }, + "required": [ + "message" + ], + "additionalProperties": false + }, + { + "type": "object", + "title": "CodeError", + "description": "An error object containing a specific machine-readable error code.", + "properties": { + "code": { + "type": "string", + "description": "A specific machine-readable error code indicating a known error condition.", + "enum": [ + "CAMPAIGN_NOT_FOUND", + "CAMPAIGN_HAS_NO_TARGET", + "CAMPAIGN_HAS_NO_DELIVERY_METHOD", + "CAMPAIGN_HAS_JOB_IN_PROGRESS", + "CAMPAIGN_HAS_UNEXPECTED_STATUS", + "JOB_TOKEN_MISSING", + "TARGET_WITHOUT_FILTERS" + ], + "example": "CAMPAIGN_NOT_FOUND" + } + }, + "required": [ + "code" + ], + "additionalProperties": false + }, + { + "type": "object", + "title": "StatusedError", + "description": "An error object containing a message and an explicit status, typically from a more generic error handler.", + "properties": { + "error": { + "type": "string", + "description": "A descriptive error message.", + "example": "An unexpected error occurred during processing." + }, + "status": { + "type": "integer", + "description": "An explicit status code in the body, often mirroring the HTTP status but provided for programmatic access.", + "example": 400 + } + }, + "required": [ + "error", + "status" + ], + "additionalProperties": false + } + ], + "description": "Describes the structure of a client error response, which can be one of several types:\n1. `MessageError`: Contains a 'message' field for general descriptive errors.\n2. `CodeError`: Contains a 'code' field for specific, machine-readable error codes.\n3. `StatusedError`: Contains 'error' and 'status' fields.\nThe HTTP status code of the response itself (e.g., 400, 404, 409) will always indicate the overall error category.\n" + }, + "BaseUUID": { + "type": "string", + "format": "uuid", + "example": "b8c01433-5556-4e2b-aad4-6f5348d1df84" + }, + "BaseNanoID": { + "type": "string", + "example": "xHcOoJCa07eysJ1GaQeSb" + }, + "BaseTags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "BaseRelation": { + "type": "object", + "properties": { + "$relation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/components/schemas/BaseUUID" + }, + "_tags": { + "$ref": "#/components/schemas/BaseTags" + } + } + } + } + } + }, + "BaseSystemId": { + "type": "object", + "readOnly": true, + "properties": { + "_id": { + "$ref": "#/components/schemas/BaseUUID" + } + }, + "required": [ + "_id" + ] + }, + "BaseEntityOwner": { + "description": "The user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n", + "type": "object", + "properties": { + "org_id": { + "type": "string", + "example": "123" + }, + "user_id": { + "type": "string", + "example": "123" + } + }, + "required": [ + "org_id" + ] + }, + "BaseEntityAcl": { + "type": "object", + "description": "Access control list (ACL) for an entity. Defines sharing access to external orgs or users.", + "additionalProperties": true, + "readOnly": true, + "properties": { + "view": { + "type": "array", + "items": { + "type": "string", + "example": "org:456" + } + }, + "edit": { + "type": "array", + "items": { + "type": "string", + "example": "org:456" + } + }, + "delete": { + "type": "array", + "items": { + "type": "string", + "example": "org:456" + } + } + } + }, + "BaseSystemFields": { + "type": "object", + "properties": { + "_id": { + "$ref": "#/components/schemas/BaseUUID" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true + }, + "_owners": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/BaseEntityOwner" + } + }, + "_schema": { + "readOnly": true, + "type": "string" + }, + "_title": { + "readOnly": true, + "type": "string" + }, + "_tags": { + "$ref": "#/components/schemas/BaseTags" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "_acl": { + "$ref": "#/components/schemas/BaseEntityAcl" + } + } + }, + "BaseSystemFieldsRequired": { + "type": "object", + "required": [ + "_org", + "_owners", + "_schema", + "_title", + "_tags", + "_created_at", + "_updated_at", + "_acl" + ] + }, + "CampaignStatus": { + "type": "string", + "default": "draft", + "enum": [ + "draft", + "activating", + "active", + "inactive" + ] + }, + "ExecutionSummaryItem": { + "type": "object", + "properties": { + "execution_id": { + "type": "string" + }, + "execution_status": { + "type": "string" + } + } + }, + "JobStatus": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "The status of the automation job", + "enum": [ + "queued", + "processing", + "finished", + "failed", + "cancelled", + "send_report" + ] + }, + "execution_summary": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExecutionSummaryItem" + } + } + } + }, + "Campaign": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseSystemFields" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "goal": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/CampaignStatus" + }, + "start_date": { + "type": "string", + "format": "date" + }, + "end_date": { + "type": "string", + "format": "date" + }, + "flow_id": { + "type": "string" + }, + "job_id": { + "type": "string" + }, + "target": { + "$ref": "#/components/schemas/BaseRelation" + } + } + } + ] + }, + "Target": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseSystemFields" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "entity_schema": { + "type": "string" + }, + "entity_filters": { + "type": "object", + "additionalProperties": true + } + } + } + ] + }, + "MatchCampaignParams": { + "type": "object", + "properties": { + "entity_refs": { + "type": "array", + "description": "List of entities (e.g. Contacts or Contracts) that should be part of the campaign target.", + "items": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/components/schemas/BaseUUID" + }, + "entity_schema": { + "type": "string" + } + }, + "required": [ + "entity_id", + "entity_schema" + ], + "additionalProperties": false + } + }, + "campaign_ids": { + "type": "array", + "description": "List of campaign IDs to check.", + "items": { + "$ref": "#/components/schemas/BaseUUID" + }, + "example": [ + "b8c01433-5556-4e2b-aad4-6f5348d1df84" + ], + "minItems": 1, + "maxItems": 100, + "uniqueItems": true + } + }, + "required": [ + "entity_refs", + "campaign_ids" + ], + "additionalProperties": false + }, + "MatchTargetParams": { + "type": "object", + "properties": { + "entity_refs": { + "type": "array", + "description": "List of entities (e.g. Contacts or Contracts) that should be part of the targets.", + "items": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/components/schemas/BaseUUID" + }, + "entity_schema": { + "type": "string" + } + }, + "required": [ + "entity_id", + "entity_schema" + ], + "additionalProperties": false + } + }, + "target_ids": { + "type": "array", + "description": "List of target IDs to check.", + "items": { + "$ref": "#/components/schemas/BaseUUID" + }, + "example": [ + "b8c01433-5556-4e2b-aad4-6f5348d1df84" + ], + "minItems": 1, + "maxItems": 100, + "uniqueItems": true + } + }, + "required": [ + "entity_refs", + "target_ids" + ], + "additionalProperties": false + }, + "GetTargetQueriesParams": { + "type": "object", + "properties": { + "target_ids": { + "type": "array", + "description": "List of target IDs to transform into queries.", + "items": { + "$ref": "#/components/schemas/BaseUUID" + }, + "example": [ + "b8c01433-5556-4e2b-aad4-6f5348d1df84" + ], + "minItems": 1, + "uniqueItems": true + } + }, + "required": [ + "target_ids" + ], + "additionalProperties": false + }, + "TargetQueryResult": { + "type": "object", + "properties": { + "target_id": { + "$ref": "#/components/schemas/BaseUUID" + }, + "query": { + "type": "string", + "description": "Transformed query string, or null if transformation failed.", + "nullable": true + }, + "error": { + "type": "string", + "description": "Error message if query transformation failed." + } + }, + "required": [ + "target_id", + "query" + ] + }, + "AutomationStatus": { + "type": "string", + "enum": [ + "pending", + "in_progress", + "success", + "failed", + "cancelled" + ] + }, + "PortalStatus": { + "type": "string", + "enum": [ + "sent", + "seen", + "dismissed", + "clicked" + ] + }, + "Recipient": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/components/schemas/BaseUUID" + }, + "entity_schema": { + "type": "string" + }, + "title": { + "type": "string" + }, + "automation_status": { + "$ref": "#/components/schemas/AutomationStatus" + }, + "automation_execution_id": { + "type": "string" + }, + "portal_status": { + "$ref": "#/components/schemas/PortalStatus" + }, + "portal_status_updated_at": { + "type": "string", + "format": "date-time" + }, + "portal_state": { + "type": "object", + "additionalProperties": true + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + }, + "BaseRecipientPayload": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/components/schemas/BaseUUID" + }, + "entity_schema": { + "type": "string" + } + }, + "required": [ + "entity_id", + "entity_schema" + ] + }, + "AutomationRecipientPayload": { + "type": "object", + "properties": { + "automation_status": { + "$ref": "#/components/schemas/AutomationStatus" + }, + "automation_execution_id": { + "type": "string" + } + }, + "required": [ + "automation_status", + "automation_execution_id" + ] + }, + "PortalRecipientPayload": { + "type": "object", + "properties": { + "portal_status": { + "$ref": "#/components/schemas/PortalStatus" + }, + "portal_state": { + "type": "object", + "additionalProperties": true + } + }, + "required": [ + "portal_status" + ] + }, + "CreateRecipientPayload": { + "oneOf": [ + { + "allOf": [ + { + "$ref": "#/components/schemas/BaseRecipientPayload" + }, + { + "$ref": "#/components/schemas/AutomationRecipientPayload" + } + ] + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BaseRecipientPayload" + }, + { + "$ref": "#/components/schemas/PortalRecipientPayload" + } + ] + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BaseRecipientPayload" + }, + { + "$ref": "#/components/schemas/AutomationRecipientPayload" + }, + { + "$ref": "#/components/schemas/PortalRecipientPayload" + } + ] + } + ] + }, + "UpdateRecipientPayload": { + "type": "object", + "properties": { + "automation_status": { + "$ref": "#/components/schemas/AutomationStatus" + }, + "automation_execution_id": { + "type": "string" + }, + "portal_status": { + "$ref": "#/components/schemas/PortalStatus" + }, + "portal_state": { + "type": "object", + "additionalProperties": true + } + } + }, + "RetriggerAutomationsRequest": { + "type": "object", + "properties": { + "recipient_ids": { + "type": "array", + "description": "List of recipient IDs to retrigger automations for", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "recipient_ids" + ] + }, + "RetriggerAutomationsResult": { + "type": "object", + "properties": { + "recipient_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the recipient" + }, + "result": { + "type": "string", + "description": "The result of the retriggering operation", + "enum": [ + "success", + "failure", + "not_found", + "invalid_status" + ] + }, + "execution_id": { + "type": "string", + "description": "The ID of the new automation execution (if successful)" + }, + "error": { + "type": "string", + "description": "The error message if the operation failed" + } + }, + "required": [ + "recipient_id", + "result" + ] + }, + "UpdatePortalStatusRequest": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/PortalStatus" + } + }, + "required": [ + "status" + ] + } + }, + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + } + }, + "parameters": { + "CampaignIdPathParam": { + "name": "campaign_id", + "description": "The campaign ID", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/BaseUUID" + } + }, + "RecipientIdPathParam": { + "name": "recipient_id", + "description": "The entity ID of the recipient", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/BaseUUID" + } + } + }, + "responses": { + "ClientErrorResponse": { + "description": "Any error based on client data errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClientError" + } + } + } + }, + "ServerErrorResponse": { + "description": "Any error based on the server-side", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServerError" + } + } + } + }, + "CampaignResponse": { + "description": "Campaign entity response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "campaign": { + "$ref": "#/components/schemas/Campaign" + } + } + } + } + } + }, + "JobStatusResponse": { + "description": "Campaign job status response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobStatus" + } + } + } + }, + "RecipientResponse": { + "description": "Recipient response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Recipient" + } + } + } + }, + "RecipientsResponse": { + "description": "List of campaign recipients", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Recipient" + } + }, + "next": { + "type": "string", + "nullable": true, + "description": "Cursor for next page of results" + }, + "total": { + "type": "integer", + "description": "Total number of recipients" + } + } + } + } + } + }, + "MatchCampaignsResponse": { + "description": "List of campaigns where the target entities match the given entities.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hits": { + "type": "number", + "description": "Number of matching campaigns." + }, + "results": { + "type": "array", + "description": "List of matching campaigns.", + "items": { + "type": "object", + "properties": { + "campaign": { + "$ref": "#/components/schemas/Campaign" + } + }, + "required": [ + "campaign" + ] + } + } + } + } + } + } + }, + "MatchTargetsResponse": { + "description": "List of targets where the given entities are found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hits": { + "type": "number", + "description": "Number of matching targets." + }, + "results": { + "type": "array", + "description": "List of matching targets.", + "items": { + "type": "object", + "properties": { + "target": { + "$ref": "#/components/schemas/Target" + } + }, + "required": [ + "target" + ] + } + } + } + } + } + } + }, + "GetTargetQueriesResponse": { + "description": "List of transformed target queries.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "description": "List of target query results.", + "items": { + "$ref": "#/components/schemas/TargetQueryResult" + } + } + }, + "required": [ + "results" + ] + } + } + } + }, + "CampaignPortalsResponse": { + "description": "List of portals and its widgets where the campaign is used", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "portal": { + "type": "object", + "properties": { + "origin": { + "type": "string", + "description": "The origin of the portal" + }, + "domain": { + "type": "string", + "description": "The domain of the portal" + }, + "name": { + "type": "string", + "description": "The name of the portal" + } + } + }, + "widgets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the widget" + }, + "headline": { + "type": "object", + "properties": { + "en": { + "type": "string", + "description": "The headline in English" + }, + "de": { + "type": "string", + "description": "The headline in German" + } + } + } + }, + "required": [ + "id" + ] + } + } + }, + "required": [ + "portal", + "widgets" + ] + } + } + } + } + }, + "RetriggerAutomationsResponse": { + "description": "Response to a request to retrigger automations for campaign recipients", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "A confirmation message indicating the request was received and processed" + }, + "results": { + "type": "array", + "description": "List of retriggering results", + "items": { + "$ref": "#/components/schemas/RetriggerAutomationsResult" + } + } + }, + "required": [ + "message", + "results" + ] + } + } + } + } + } + } +} diff --git a/packages/cli/definitions/template-variables.json b/packages/cli/definitions/template-variables.json new file mode 100644 index 00000000..0b43a9db --- /dev/null +++ b/packages/cli/definitions/template-variables.json @@ -0,0 +1,1408 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Template Variables API", + "description": "This API provides dynamic template processing and variable management, seamless Handlebars template compilation, custom variable operations, and context-aware content generation across email, document templates and snippets.\n", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://template-variables-api.sls.epilot.io" + }, + { + "url": "https://template-variables-api.sls.epilot.io" + }, + { + "url": "https://template-variables-api.dev.sls.epilot.io", + "description": "Production server" + } + ], + "tags": [ + { + "name": "Templates", + "description": "Template-based Operations" + }, + { + "name": "Custom Variables", + "description": "Custom Variables Operations" + } + ], + "security": [ + { + "EpilotAuth": [] + }, + { + "EpilotOrg": [] + } + ], + "paths": { + "/v1/template-variables/categories": { + "get": { + "operationId": "getCategories", + "summary": "getCategories", + "description": "Get all template variable categories", + "tags": [ + "Templates" + ], + "parameters": [ + { + "name": "lang", + "in": "query", + "schema": { + "$ref": "#/components/schemas/Language" + } + } + ], + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CategoryResult" + } + }, + "example": [ + { + "category": "contact", + "description": "Contact" + }, + { + "category": "account", + "description": "Account" + }, + { + "category": "organization", + "description": "Organization" + } + ] + } + } + } + } + } + }, + "/v1/template-variables:search": { + "post": { + "operationId": "searchVariables", + "summary": "searchVariables", + "description": "Search variables", + "tags": [ + "Templates" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "template_type": { + "$ref": "#/components/schemas/TemplateType" + }, + "query": { + "type": "string", + "description": "Search string", + "example": "logo" + }, + "from": { + "type": "integer", + "default": 0 + }, + "size": { + "type": "integer", + "default": 25 + }, + "lang": { + "$ref": "#/components/schemas/Language" + }, + "entity_schemas": { + "type": "array", + "items": { + "type": "string", + "description": "Schema slug", + "example": "contact" + } + } + }, + "required": [ + "template_type", + "query" + ] + } + } + } + }, + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VariableResult" + } + }, + "example": [ + { + "group": "Personal Details", + "insert": "{{account.name}}", + "description": "Company name", + "type": "simple" + }, + { + "group": "Personal Details", + "insert": "{{account.tax_id}}", + "description": "Tax ID", + "type": "simple" + }, + { + "group": "Address details", + "qrdata": "{{account.address_details}}", + "description": "Address Details", + "type": "partial" + }, + { + "group": "Address Details", + "insert": "{{account.address.street}}", + "description": "Address - Street name", + "type": "simple" + }, + { + "group": "Address Details", + "insert": "{{account.address.street_number}}", + "description": "Address - Street number", + "type": "simple" + }, + { + "group": "Address Details", + "insert": "{{account.address.postal_code}}", + "description": "Address - Postal code", + "type": "simple" + }, + { + "group": "Address Details", + "insert": "{{account.address.city}}", + "description": "Address - City", + "type": "simple" + } + ] + } + } + } + } + } + }, + "/v1/template-variables:context": { + "post": { + "operationId": "getVariableContext", + "summary": "getVariableContext", + "description": "Get full variable context\n\nCalls Entity API, User API, Brand API and others to construct full context object used for template variable replace\n", + "tags": [ + "Templates" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "parameters": { + "$ref": "#/components/schemas/VariableParameters" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableContext" + } + } + } + } + } + } + }, + "/v1/template-variables:replace": { + "post": { + "operationId": "replaceTemplates", + "summary": "replaceTemplates", + "description": "Replace variables in handlebars templates\n\nTakes in an array of input templates and outputs the output text with replaced variables\n", + "tags": [ + "Templates" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "inputs": { + "type": "array", + "items": { + "type": "string", + "example": "Hello, {{contact.first_name}}!\n\n{{{brand.signature}}}\n" + } + }, + "parameters": { + "$ref": "#/components/schemas/VariableParameters" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReplacementOutput" + } + } + } + } + } + } + }, + "/v2/template:replace": { + "post": { + "operationId": "replaceTemplatesV2", + "summary": "Replace variables in templates (V2)", + "description": "Replace variables in handlebars templates with raw value preservation\n\nV2 returns parsed outputs that preserve the original data types (arrays, objects, strings)\ninstead of stringifying always. Variables with strings mixed with other variables will be returned in the stringified format. \nAlongside the parsed outputs for every single variable.\n\nTakes in an array of input templates and outputs an object mapping each input and variable\nto their rendered values with type preservation.\n", + "tags": [ + "Templates" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "inputs": { + "type": "array", + "items": { + "type": "string", + "example": "Hello, {{contact.first_name}}!\n" + } + }, + "parameters": { + "$ref": "#/components/schemas/VariableParameters" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReplacementOutputV2" + } + } + } + } + } + } + }, + "/v1/custom-variables": { + "get": { + "operationId": "getCustomVariables", + "summary": "Get custom variables", + "description": "Get all custom variables of organization", + "tags": [ + "Custom Variables" + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomVariable" + } + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + }, + "post": { + "operationId": "createCustomVariable", + "summary": "Create custom variable", + "description": "Create custom variable", + "tags": [ + "Custom Variables" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomVariable" + } + } + } + }, + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomVariable" + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "409": { + "description": "Conflict - Custom variable with the same key already exists" + } + } + } + }, + "/v1/custom-variables:search": { + "post": { + "operationId": "searchCustomVariables", + "summary": "searchCustomVariables", + "description": "Search custom variables", + "tags": [ + "Custom Variables" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomVariablesSearchParams" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomVariable" + } + }, + "hits": { + "type": "integer", + "description": "Total number of results", + "example": 100 + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/custom-variables/{id}": { + "put": { + "operationId": "updateCustomVariable", + "summary": "Update custom variable", + "description": "Update custom variable", + "tags": [ + "Custom Variables" + ], + "parameters": [ + { + "name": "id", + "description": "Custom variable ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "example": "rbse777b-3cf8-4bff-bb0c-253fd1123250" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomVariable" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomVariable" + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "409": { + "description": "Conflict - Custom variable with the same key already exists" + } + } + }, + "get": { + "operationId": "getCustomVariable", + "summary": "Get custom variable", + "description": "Get custom variable", + "tags": [ + "Custom Variables" + ], + "parameters": [ + { + "name": "id", + "description": "Custom vairable ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "example": "rbse777b-3cf8-4bff-bb0c-253fd1123250" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomVariable" + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + }, + "delete": { + "operationId": "deleteCustomVariable", + "summary": "Delete custom variable", + "description": "Immediately and permanently deletes a custom variable", + "tags": [ + "Custom Variables" + ], + "parameters": [ + { + "name": "id", + "description": "Custom vairable ID", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "example": "rbse777b-3cf8-4bff-bb0c-253fd1123250" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/v1/custom-variables/order-table-blueprint": { + "get": { + "operationId": "getBluePrintTableConfig", + "summary": "Get default table config", + "description": "Get default table config", + "tags": [ + "Custom Variables" + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomVariable" + } + } + } + }, + "403": { + "description": "Forbidden" + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotOrg": { + "description": "Overrides the target organization", + "name": "x-ivy-org-id", + "in": "header", + "type": "apiKey" + } + }, + "schemas": { + "Language": { + "type": "string", + "description": "2-letter language code (ISO 639-1)", + "default": "de" + }, + "VariableParameters": { + "type": "object", + "properties": { + "template_type": { + "$ref": "#/components/schemas/TemplateType" + }, + "language": { + "$ref": "#/components/schemas/Language" + }, + "main_entity_id": { + "type": "string", + "format": "uuid", + "description": "The main entity ID. Use main entity in order to use the variable without schema slug prefix - or just pass directly to other object ID.", + "example": "63753437-c9e2-4e83-82bb-b1c666514561" + }, + "brand_id": { + "type": "number", + "nullable": true, + "description": "Brand ID", + "example": 123451 + }, + "user_id": { + "type": "string", + "nullable": true, + "description": "User ID", + "example": "50001" + }, + "user_org_id": { + "type": "string", + "nullable": true, + "description": "Organization ID of the user", + "example": "729224" + }, + "custom_variables": { + "type": "array", + "description": "Custom variables with specified values form other services.", + "items": { + "$ref": "#/components/schemas/ExternalCustomVariable" + } + }, + "context_data": { + "type": "object", + "description": "If context data is available, this data will be used for variable replace." + }, + "template_name": { + "type": "string", + "description": "The name of email template" + }, + "template_tags": { + "type": "array", + "description": "The tags of email template", + "items": { + "type": "string" + } + }, + "variables_version": { + "type": "string", + "description": "The version of the variables syntax supported. Default is 1.0", + "example": "2" + } + }, + "required": [ + "template_type" + ] + }, + "ReplacementOutput": { + "type": "object", + "properties": { + "outputs": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "[Brand Name GmbH] Order confirmation\nHello Customer Name\n\nBrand Name GmbH\n\"Brand\nimprint\n" + ] + } + } + }, + "ReplacementOutputV2": { + "type": "object", + "properties": { + "outputs": { + "type": "object", + "description": "Dictionary mapping input templates and variable names to their resolved output values.\nValues preserve their original types (string, array, object) instead of being stringified.\n\nKeys include:\n- Original input templates (e.g., \"Hello {{name}}\")\n- Individual variables found in templates (e.g., \"{{name}}\", \"{{product_images[*].public_url}}\")\n", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "additionalProperties": {} + } + ] + }, + "example": { + "Hello {{first_name}}": "Hello John", + "{{first_name}}": "John", + "{{product_images[*].public_url}}": [ + "http://myimage.server.com/img1.png", + "http://myimage.server.com/img2.png" + ] + } + } + } + }, + "VariableResult": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "simple", + "partial" + ] + }, + "qrdata": { + "type": "string", + "description": "Payload for the QR data" + }, + "group": { + "type": "string", + "description": "Variable group" + }, + "insert": { + "type": "string", + "description": "The value which is used to insert to template" + }, + "description": { + "type": "string", + "description": "Variable description" + } + } + }, + "CustomVariablesSearchParams": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Variable type", + "enum": [ + "order_table", + "custom", + "journey_link", + "snippet" + ] + }, + "tags": { + "type": "array", + "description": "The tags of custom variable", + "items": { + "type": "string" + } + }, + "query": { + "type": "string", + "description": "Search string", + "example": "logo" + }, + "from": { + "type": "integer", + "default": 0 + }, + "size": { + "type": "integer", + "default": 25 + }, + "sort_by": { + "type": "string", + "description": "Sort by field", + "example": "created_at, name, key" + }, + "fields": { + "type": "array", + "description": "Fields to return", + "items": { + "type": "string" + } + } + } + }, + "VariableContext": { + "type": "object", + "properties": { + "unsubscribe_url": { + "type": "string", + "example": "https://consent.sls.epilot.io/v1/unsubscribe?token=abc123" + }, + "main": { + "type": "object", + "additionalProperties": true, + "example": { + "_id": "03be777b-3cf8-4bff-bb0c-253fd1128479", + "_title": "Example Customer", + "customer_number": 123, + "first_name": "Example", + "last_name": "Customer", + "title": "Prof.", + "salutation": "Ms. / Mrs.", + "birthdate": "2018-03-03", + "email": [ + { + "email": "contact.primary@domain.com", + "_tags": [ + "primary" + ] + }, + { + "email": "sale@domain.com" + } + ], + "phone": [ + { + "phone": "+49123456789", + "_tags": [ + "primary", + "support" + ] + }, + { + "phone": "+49504305025" + } + ], + "address": [ + { + "_tags": [ + "primary", + "delivery" + ], + "country": "Germany", + "city": "Köln", + "postal_code": "50825", + "street": "Im Mediapark", + "street_number": "8a", + "additional_info": "11th floor" + }, + { + "_tags": [ + "billing" + ], + "country": "Finland", + "city": "Köln", + "postal_code": "50670", + "street": "Im Mediapark", + "street_number": "8a", + "additional_info": "" + } + ], + "account": [ + { + "status": "Active", + "_id": "c8d20ff6-df7a-465a-a26e-e5d28c2a3f79", + "tax_id": "123abc", + "name": "name", + "email": [ + { + "email": "account.primary@domain.com", + "_tags": [ + "primary" + ] + }, + { + "email": "account.sale@domain.com" + } + ], + "phone": [ + { + "phone": "+49123456789", + "_tags": [ + "primary", + "support" + ] + }, + { + "phone": "+49504305025" + } + ], + "address": [ + { + "_tags": [ + "primary", + "delivery" + ], + "country": "Germany", + "city": "Köln", + "postal_code": "50825", + "street": "Im Mediapark", + "street_number": "8a", + "additional_info": "11th floor" + } + ] + } + ] + } + }, + "contact": { + "type": "object", + "additionalProperties": true, + "example": { + "_id": "03be777b-3cf8-4bff-bb0c-253fd1128479", + "_title": "Example Customer", + "customer_number": 123, + "first_name": "Example", + "last_name": "Customer", + "title": "Prof.", + "salutation": "Ms. / Mrs.", + "birthdate": "2018-03-03", + "email": [ + { + "email": "contact.primary@domain.com", + "_tags": [ + "primary" + ] + }, + { + "email": "sale@domain.com" + } + ], + "phone": [ + { + "phone": "+49123456789", + "_tags": [ + "primary", + "support" + ] + }, + { + "phone": "+49504305025" + } + ], + "address": [ + { + "_tags": [ + "primary", + "delivery" + ], + "country": "Germany", + "city": "Köln", + "postal_code": "50825", + "street": "Im Mediapark", + "street_number": "8a", + "additional_info": "11th floor" + }, + { + "_tags": [ + "billing" + ], + "country": "Finland", + "city": "Köln", + "postal_code": "50670", + "street": "Im Mediapark", + "street_number": "8a", + "additional_info": "" + } + ], + "account": [ + { + "status": "Active", + "_id": "c8d20ff6-df7a-465a-a26e-e5d28c2a3f79", + "tax_id": "123abc", + "name": "name", + "email": [ + { + "email": "account.primary@domain.com", + "_tags": [ + "primary" + ] + }, + { + "email": "account.sale@domain.com" + } + ], + "phone": [ + { + "phone": "+49123456789", + "_tags": [ + "primary", + "support" + ] + }, + { + "phone": "+49504305025" + } + ], + "address": [ + { + "_tags": [ + "primary", + "delivery" + ], + "country": "Germany", + "city": "KölnSS", + "postal_code": "50825", + "street": "Im Mediapark", + "street_number": "8a", + "additional_info": "11th floor" + } + ] + } + ] + } + }, + "brand": { + "type": "object", + "additionalProperties": true, + "example": { + "id": 123453, + "name": "Brand name", + "signature": "Signature" + } + } + } + }, + "TemplateType": { + "type": "string", + "enum": [ + "email", + "document" + ] + }, + "CategoryResult": { + "type": "object", + "properties": { + "category": { + "type": "string", + "example": "contact" + }, + "description": { + "type": "string", + "example": "Contact" + } + } + }, + "ExternalCustomVariable": { + "type": "object", + "properties": { + "variable": { + "type": "string", + "example": "{{craftsmen.invitation_link}}" + }, + "value": { + "type": "string", + "example": "https://partner.epilot.cloud/activate-account?user_name=htny.pct%2Btet%40gmail.com&confirmation_code=EdXPRW19" + } + } + }, + "CustomVariable": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID", + "example": "rbse777b-3cf8-4bff-bb0c-253fd1123250" + }, + "type": { + "type": "string", + "description": "Custom variable type", + "enum": [ + "order_table", + "custom", + "journey_link", + "snippet" + ] + }, + "name": { + "type": "string", + "description": "Custom variable name", + "example": "My Custom table" + }, + "key": { + "type": "string", + "description": "The key which is used for Handlebar variable syntax {{key}}", + "example": "my_custom_table" + }, + "_tags": { + "type": "array", + "description": "The tags of custom variable", + "items": { + "type": "string" + } + }, + "helper_params": { + "type": "array", + "description": "The helper function parameter's names", + "items": { + "type": "string" + }, + "example": [ + "param1", + "param2" + ] + }, + "helper_logic": { + "type": "string", + "description": "The helper function logic", + "example": "return param1 * param2;" + }, + "config": { + "type": "object", + "description": "Variable configuration", + "example": { + "header": null, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "16px", + "font-family": "", + "padding-bottom": "4px", + "font-weight": "bold", + "border": "none !important", + "text-align": "left" + }, + "columns": [ + { + "id": "item", + "index": 0, + "label": { + "en": "Item", + "de": "Produkt" + }, + "enable": true, + "draggable": true, + "style": { + "padding-left": "10px", + "max-width": "30%" + } + }, + { + "id": "quantity", + "index": 1, + "label": { + "en": "Quanity", + "de": "Menge" + }, + "enable": true, + "draggable": true, + "style": { + "min-width": "60px", + "width": "30%" + } + }, + { + "id": "tax", + "index": 2, + "label": { + "en": "Tax Rate", + "de": "Steuerrate" + }, + "enable": true, + "draggable": true, + "style": { + "min-width": "60px", + "width": "30%" + } + }, + { + "id": "unit_amount", + "index": 3, + "label": { + "en": "Unit Net Price", + "de": "Nettopreis" + }, + "enable": true, + "draggable": true, + "style": { + "min-width": "60px", + "width": "30%" + } + }, + { + "id": "net_total", + "index": 4, + "label": { + "en": "Net total", + "de": "Nettosumme" + }, + "enable": "true,", + "draggable": true, + "style": { + "min-width": "60px", + "width": "30%" + } + }, + { + "id": "gross_total", + "index": 5, + "label": { + "en": "Total", + "de": "Gesamt" + }, + "enable": true, + "draggable": true, + "style": { + "min-width": "60px", + "width": "30%" + } + } + ], + "body": { + "product_name": { + "parent_column": "item", + "enable": true, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "14px", + "font-family": "", + "font-weight": "bold", + "font-style": "normal", + "padding-top": "16px", + "padding-bottom": "8px", + "border": "none !important", + "vertical-align": "top", + "text-align": "left", + "max-width": "30%", + "padding-left": "10px" + } + }, + "price_description": { + "parent_column": "item", + "enable": true, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "12px", + "font-family": "", + "font-weight": "normal", + "font-style": "normal", + "text-align": "left", + "max-width": "30%" + } + }, + "product_description": { + "parent_column": "item", + "enable": true, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "12px", + "font-family": "", + "font-weight": "normal", + "font-style": "normal", + "text-align": "left", + "max-width": "30%" + } + }, + "quantity": { + "enable": true, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "12px", + "font-family": "", + "font-weight": "normal", + "font-style": "normal", + "text-align": "left", + "max-width": "30%" + } + }, + "tax": { + "enable": true, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "12px", + "font-family": "", + "font-weight": "normal", + "font-style": "normal", + "text-align": "left", + "max-width": "30%" + } + }, + "unit_amount": { + "enable": true, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "12px", + "font-family": "", + "font-weight": "normal", + "font-style": "normal", + "text-align": "left", + "max-width": "30%" + } + }, + "net_total": { + "enable": true, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "12px", + "font-family": "", + "font-weight": "normal", + "font-style": "normal", + "text-align": "left", + "max-width": "30%" + } + }, + "gross_total": { + "enable": true, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "12px", + "font-family": "", + "font-weight": "normal", + "font-style": "normal", + "text-align": "left", + "max-width": "30%" + } + } + }, + "footer": { + "payment_type": { + "enable": true, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "12px", + "font-family": "", + "font-weight": "normal", + "font-style": "normal", + "text-align": "left", + "max-width": "30%" + } + }, + "net_total": { + "enable": true, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "12px", + "font-family": "", + "font-weight": "normal", + "font-style": "normal", + "text-align": "left", + "max-width": "30%" + } + }, + "amount_tax": { + "enable": true, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "12px", + "font-family": "", + "font-weight": "normal", + "font-style": "normal", + "text-align": "left", + "max-width": "30%" + } + }, + "gross_total": { + "enable": true, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "12px", + "font-family": "", + "font-weight": "normal", + "font-style": "normal", + "text-align": "left", + "max-width": "30%" + } + } + } + } + }, + "template": { + "type": "string", + "description": "Handlebar template that used to generate the variable content", + "example": "\n \n \n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n \n {{/if}}\n {{/each}}\n \n \n \n \n {{#each order.products as |product|}}\n {{#if @last}}\n \n {{else}}\n \n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n \n \n {{/if}}\n {{#if (eq column.id 'quantity')}}\n \n \n {{/if}}\n {{#if (eq column.id 'tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n \n \n {{/if}}\n {{#if (eq column.id 'net_total')}}\n \n \n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n \n \n {{/if}}\n {{/if}}\n {{/each}}\n \n {{/each}}\n \n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n \n \n {{#if @root.table_config.footer.payment_type.enable}}\n \n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n \n {{/if}}\n {{/if}}\n \n \n {{/each}}\n {{/if}}\n \n \n
{{column._label}}
\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n
\n {{product.price.description}}\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n
\n {{product.description}}\n {{/if}}\n
{{product.price.quantity}}\n \n {{product.price.tax_rate}}\n \n {{product.price.unit_amount_net}}\n \n {{product.price.amount_subtotal}}\n \n {{product.price.amount_tax}}\n \n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n
\n {{product.price.billing_period}}\n {{/if}}\n {{/if}}\n
{{item.billing_period}}{{item.amount_subtotal}}{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n
\n {{item.full_amount_tax}}\n {{/if}}\n
\n" + }, + "created_at": { + "type": "string", + "description": "Creation time", + "example": "2022-04-19T12:41:43.662Z", + "readOnly": true + }, + "created_by": { + "type": "string", + "description": "Created by", + "example": "100042", + "readOnly": true + }, + "updated_at": { + "type": "string", + "description": "Last update time", + "example": "2022-04-20T12:41:43.662Z", + "readOnly": true + }, + "updated_by": { + "type": "string", + "description": "Updated by", + "example": "100042", + "readOnly": true + } + }, + "required": [ + "key", + "template" + ] + } + } + } +} diff --git a/packages/cli/definitions/user.json b/packages/cli/definitions/user.json new file mode 100644 index 00000000..becd9929 --- /dev/null +++ b/packages/cli/definitions/user.json @@ -0,0 +1,2408 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "User API", + "version": "2.0.0", + "description": "Manage users in epilot organization(s)\n" + }, + "tags": [ + { + "name": "User V2", + "description": "User API V2" + }, + { + "name": "User V1", + "description": "Legacy User API" + }, + { + "name": "Group", + "description": "User Groups" + }, + { + "name": "Navigation", + "description": "Customized Workplace Navigation Configurations" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v2/users/public/signup": { + "post": { + "operationId": "signUpUser", + "summary": "signUpUser", + "security": [], + "parameters": [ + { + "name": "token", + "in": "query", + "description": "Partner invitation token", + "required": false, + "schema": { + "$ref": "#/components/schemas/PartnerInvitationToken" + } + } + ], + "tags": [ + "User V2" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignupUserPayload" + } + } + } + }, + "responses": { + "200": { + "description": "The created user and organization", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "organization": { + "$ref": "#/components/schemas/Organization" + } + } + } + } + } + } + } + } + }, + "/v2/users/me": { + "get": { + "operationId": "getMeV2", + "summary": "getMeV2", + "description": "Get currently logged in user", + "tags": [ + "User V2" + ], + "responses": { + "200": { + "description": "currently logged in user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserV2" + } + } + } + } + } + } + }, + "/v2/users": { + "get": { + "operationId": "listUsersV2", + "summary": "listUsersV2", + "parameters": [ + { + "name": "query", + "in": "query", + "description": "Query text to filter by", + "required": false, + "schema": { + "$ref": "#/components/schemas/Query" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the results size", + "required": false, + "schema": { + "$ref": "#/components/schemas/Limit" + } + }, + { + "name": "offset", + "in": "query", + "description": "Specify the offset", + "required": false, + "schema": { + "$ref": "#/components/schemas/Offset" + } + } + ], + "description": "Get the list of organization users", + "tags": [ + "User V2" + ], + "responses": { + "200": { + "description": "List of organization users", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserV2" + } + } + } + } + } + } + } + } + } + }, + "/v2/users/{id}": { + "get": { + "operationId": "getUserV2", + "summary": "getUserV2", + "description": "Get user details by user id", + "tags": [ + "User V2" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/UserId" + }, + "required": true, + "description": "The Id of user" + } + ], + "responses": { + "200": { + "description": "The returned user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserV2" + } + } + } + } + } + }, + "patch": { + "operationId": "updateUserV2", + "summary": "updateUserV2", + "description": "Update user details", + "tags": [ + "User V2" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/UserId" + }, + "required": true, + "description": "The Id of user" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserV2" + } + } + } + }, + "responses": { + "200": { + "description": "The returned user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserV2" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteUserV2", + "summary": "deleteUserV2", + "description": "Delete user by user id", + "tags": [ + "User V2" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/UserId" + }, + "required": true, + "description": "The Id of user" + } + ], + "responses": { + "200": { + "description": "The deleted user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + } + }, + "/v2/users/invite": { + "post": { + "operationId": "inviteUser", + "summary": "inviteUser", + "description": "Creates a new user in the caller's organization and sends an invite email to activate the user\n", + "tags": [ + "User V2" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInvitationPayload" + } + } + } + }, + "responses": { + "201": { + "description": "Invited successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserV2" + } + } + } + }, + "400": { + "description": "Unable to invite the above email address." + } + } + } + }, + "/v2/users/invite:resendEmail": { + "post": { + "operationId": "resendUserInvitation", + "summary": "resendUserInvitation", + "description": "Resend user invitation email", + "tags": [ + "User V2" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email address of the address", + "example": "test@example.com" + }, + "language": { + "type": "string", + "description": "Language for user invitation email", + "enum": [ + "en", + "de" + ], + "default": "en" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "User Invitation sent successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserV2" + } + } + } + }, + "400": { + "description": "User not found." + } + } + } + }, + "/v2/users/{id}/groups": { + "get": { + "operationId": "getGroupsForUser", + "summary": "getGroupsForUser", + "description": "Get groups of a user", + "tags": [ + "User V2" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/UserId" + }, + "required": true, + "description": "The Id of user" + } + ], + "responses": { + "200": { + "description": "The returned user groups", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + } + } + } + } + } + } + }, + "/v1/groups": { + "get": { + "operationId": "getGroups", + "summary": "getGroups", + "description": "Lists groups in organizations you have access to", + "tags": [ + "Group" + ], + "parameters": [ + { + "name": "query", + "in": "query", + "description": "Query name to filter by", + "required": false, + "schema": { + "$ref": "#/components/schemas/Query" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the results size", + "required": false, + "schema": { + "$ref": "#/components/schemas/Limit" + } + }, + { + "name": "offset", + "in": "query", + "description": "Specify the offset", + "required": false, + "schema": { + "$ref": "#/components/schemas/Offset" + } + }, + { + "name": "hydrate", + "in": "query", + "description": "Pass it true when you want to hydrate the group with full user details", + "required": false, + "schema": { + "$ref": "#/components/schemas/Hydrate" + } + } + ], + "responses": { + "200": { + "description": "List of groups", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hits": { + "type": "number", + "example": 1 + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createGroup", + "summary": "createGroup", + "description": "Create a new group", + "tags": [ + "Group" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateGroupReq" + } + } + } + }, + "responses": { + "201": { + "description": "Group created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Group" + } + } + } + } + } + } + }, + "/v1/groups/{id}": { + "get": { + "operationId": "getGroup", + "summary": "getGroup", + "description": "Get group by id", + "tags": [ + "Group" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Group id", + "required": true, + "schema": { + "$ref": "#/components/schemas/GroupId" + } + }, + { + "name": "hydrate", + "in": "query", + "description": "Pass it true when you want to hydrate the group with full user details", + "required": false, + "schema": { + "$ref": "#/components/schemas/Hydrate" + } + } + ], + "responses": { + "200": { + "description": "Group", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Group" + } + } + } + }, + "404": { + "description": "Group not found" + } + } + }, + "patch": { + "operationId": "updateGroup", + "summary": "updateGroup", + "description": "Update group by id", + "tags": [ + "Group" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Group id", + "required": true, + "schema": { + "$ref": "#/components/schemas/GroupId" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGroupReq" + } + } + } + }, + "responses": { + "201": { + "description": "Group created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Group" + } + } + } + }, + "404": { + "description": "Group not found" + } + } + }, + "delete": { + "operationId": "deleteGroup", + "summary": "deleteGroup", + "description": "Delete group by id", + "tags": [ + "Group" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Group id", + "required": true, + "schema": { + "$ref": "#/components/schemas/GroupId" + } + } + ], + "responses": { + "204": { + "description": "Group deleted successfully" + } + } + } + }, + "/v1/groups/{id}/user:next": { + "post": { + "operationId": "advanceUserAssignment", + "summary": "advanceUserAssignment", + "description": "Advance user assignment to next user in line", + "tags": [ + "Group" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Group id", + "required": true, + "schema": { + "$ref": "#/components/schemas/GroupId" + } + } + ], + "responses": { + "200": { + "description": "Updated user group with crt_assignee updated to next user in line", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Group" + } + } + } + }, + "404": { + "description": "Group not found" + }, + "422": { + "description": "User Group has no users assigned, thus it cannot advance to next user" + } + } + } + }, + "/v2/user/navigations": { + "post": { + "operationId": "createNavigation", + "summary": "createNavigation", + "description": "Create a new navigation configuration. Navigations are immutable and globally accessible across organizations.\nEach creation generates a new id. To update a navigation, create a new one.\n", + "tags": [ + "Navigation" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NavigationCreateRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Navigation created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Navigation" + } + } + } + } + } + } + }, + "/v2/user/navigations/{id}": { + "get": { + "operationId": "getNavigation", + "summary": "getNavigation", + "description": "Get a navigation configuration by ID", + "tags": [ + "Navigation" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "$ref": "#/components/schemas/NavigationId" + }, + "required": true, + "description": "The UUID of the navigation" + } + ], + "responses": { + "200": { + "description": "The navigation configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Navigation" + } + } + } + }, + "404": { + "description": "Navigation not found" + } + } + } + }, + "/v2/users/public/verifyEmail": { + "post": { + "operationId": "verifyEmailWithToken", + "summary": "verifyEmailWithToken", + "description": "Update new email using an verification token", + "security": [], + "tags": [ + "User V2" + ], + "parameters": [ + { + "in": "query", + "name": "token", + "schema": { + "$ref": "#/components/schemas/VerificationToken" + }, + "required": true, + "description": "Verification Token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserVerificationPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Verified successfully" + }, + "404": { + "description": "Token not found" + } + } + } + }, + "/v2/users/public/checkToken": { + "get": { + "operationId": "checkInviteToken", + "summary": "checkInviteToken", + "description": "Check an invite token", + "security": [], + "tags": [ + "User V2" + ], + "parameters": [ + { + "in": "query", + "name": "token", + "schema": { + "$ref": "#/components/schemas/InviteToken" + }, + "required": true, + "description": "Invite Token" + } + ], + "responses": { + "200": { + "description": "Invite token found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "invitation_org_id": { + "type": "string", + "description": "Organization ID of the organization that invited the user" + }, + "invitation_org_name": { + "type": "string", + "description": "Name of the organization that invited the user" + }, + "invitation_org_logo_url": { + "type": "string", + "description": "Logo URL of the organization that invited the user" + }, + "invitation_org_logo_thumbnail_url": { + "type": "string", + "description": "Logo Thumbnail URL of the organization that invited the user" + }, + "invitee_user_id": { + "type": "string", + "description": "User ID of the invited user" + }, + "invitee_primary_org_id": { + "type": "string", + "description": "Organization ID of the primary organization of the user (when inviting an existing epilot user)" + } + }, + "required": [ + "invitee_user_id", + "invitation_org_id", + "invitation_org_name" + ] + } + } + } + }, + "404": { + "description": "Token not found" + } + } + } + }, + "/v2/users/public/activate": { + "post": { + "operationId": "activateUser", + "summary": "activateUser", + "description": "Activate user using an invite token", + "security": [], + "tags": [ + "User V2" + ], + "parameters": [ + { + "in": "query", + "name": "token", + "schema": { + "$ref": "#/components/schemas/InviteToken" + }, + "required": true, + "description": "Invite Token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserActivationPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Activated successfully" + }, + "400": { + "description": "Invalid payload" + }, + "404": { + "description": "Token not found for the user" + } + } + } + }, + "/v2/users/public/reject": { + "delete": { + "operationId": "rejectInvite", + "summary": "rejectInvite", + "description": "Reject an invite", + "security": [], + "tags": [ + "User V2" + ], + "parameters": [ + { + "in": "query", + "name": "token", + "schema": { + "$ref": "#/components/schemas/InviteToken" + }, + "required": true, + "description": "Invite Token" + } + ], + "responses": { + "200": { + "description": "Rejected invite successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + } + } + } + } + } + }, + "404": { + "description": "Token not found for the user" + } + } + } + }, + "/v2/users/public/username/{username}:getLoginParameters": { + "get": { + "operationId": "getUserLoginParametersV2", + "summary": "getUserLoginParametersV2", + "description": "Get user organization login parameters by username\n\nThe first item in the list corresponds to the user's primary organization and must be used for initial login.\n", + "security": [], + "parameters": [ + { + "name": "username", + "in": "path", + "description": "Username", + "required": true, + "schema": { + "$ref": "#/components/schemas/Username" + } + } + ], + "tags": [ + "User V2" + ], + "responses": { + "200": { + "description": "User", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "login_parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LoginParameters" + } + } + } + } + } + } + } + } + } + }, + "/v2/users/public/passkeys:authenticateBegin": { + "post": { + "operationId": "beginPasskeyAuthentication", + "summary": "beginPasskeyAuthentication", + "description": "Begin passkey authentication flow. Returns WebAuthn options and a signed challenge token.", + "security": [], + "tags": [ + "User V2" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + } + }, + "required": [ + "email" + ] + } + } + } + }, + "responses": { + "200": { + "description": "WebAuthn authentication options", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasskeyAuthenticationOptions" + } + } + } + }, + "404": { + "description": "User not found or no passkeys registered" + } + } + } + }, + "/v2/users/public/passkeys:authenticateBeginDiscoverable": { + "post": { + "operationId": "beginDiscoverablePasskeyAuthentication", + "summary": "beginDiscoverablePasskeyAuthentication", + "description": "Begin discoverable passkey authentication flow (no email required). Returns WebAuthn options with empty allowCredentials for the browser credential picker.", + "security": [], + "tags": [ + "User V2" + ], + "responses": { + "200": { + "description": "WebAuthn discoverable authentication options", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasskeyAuthenticationOptions" + } + } + } + } + } + } + }, + "/v2/users/public/passkeys:resolveCredential": { + "post": { + "operationId": "resolveDiscoverableCredential", + "summary": "resolveDiscoverableCredential", + "description": "Resolve user identity from a discoverable passkey assertion. Returns the user's email and login parameters.", + "security": [], + "tags": [ + "User V2" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "challenge_token": { + "type": "string", + "description": "The challenge token from authenticateBeginDiscoverable" + }, + "assertion_response": { + "type": "object", + "description": "WebAuthn AuthenticatorAssertionResponse JSON" + } + }, + "required": [ + "challenge_token", + "assertion_response" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Resolved user identity and login parameters", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "organization_id": { + "type": "string" + }, + "user_id": { + "type": "string" + }, + "login_parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LoginParameters" + } + } + } + } + } + } + }, + "404": { + "description": "Credential not found" + } + } + } + }, + "/v2/users/me/passkeys:registerBegin": { + "post": { + "operationId": "beginPasskeyRegistration", + "summary": "beginPasskeyRegistration", + "description": "Begin passkey registration flow for the authenticated user.", + "tags": [ + "User V2" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "friendly_name": { + "type": "string", + "example": "My Laptop" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "WebAuthn registration options", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasskeyRegistrationOptions" + } + } + } + } + } + } + }, + "/v2/users/me/passkeys:registerComplete": { + "post": { + "operationId": "completePasskeyRegistration", + "summary": "completePasskeyRegistration", + "description": "Complete passkey registration by verifying the attestation response.", + "tags": [ + "User V2" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasskeyRegistrationResponse" + } + } + } + }, + "responses": { + "200": { + "description": "Passkey registered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Passkey" + } + } + } + } + } + } + }, + "/v2/users/me/passkeys": { + "get": { + "operationId": "listPasskeys", + "summary": "listPasskeys", + "description": "List all passkeys registered for the authenticated user.", + "tags": [ + "User V2" + ], + "responses": { + "200": { + "description": "List of passkeys", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "passkeys": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Passkey" + } + } + } + } + } + } + } + } + } + }, + "/v2/users/me/passkeys/{credentialId}": { + "delete": { + "operationId": "deletePasskey", + "summary": "deletePasskey", + "description": "Delete a passkey by credential ID.", + "tags": [ + "User V2" + ], + "parameters": [ + { + "name": "credentialId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Passkey deleted successfully" + }, + "404": { + "description": "Passkey not found" + } + } + } + }, + "/v2/users/switchOrganization": { + "post": { + "operationId": "switchOrganization", + "summary": "switchOrganization", + "description": "Switch to another organization the user is part of", + "tags": [ + "User V2" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "org_id": { + "$ref": "#/components/schemas/OrganizationId" + } + }, + "required": [ + "org_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "A login token for the new organization to be used with CUSTOM_AUTH flow", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "login_token": { + "type": "string", + "description": "A login token for the new organization to be used with CUSTOM_AUTH flow against login parameters" + } + }, + "required": [ + "login_token" + ] + } + } + } + } + } + } + }, + "/v1/users/me": { + "get": { + "operationId": "getMe", + "summary": "getMe", + "description": "Get currently logged in user", + "tags": [ + "User V1" + ], + "responses": { + "200": { + "description": "Currently logged in user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + } + }, + "/v1/users": { + "get": { + "operationId": "listUsers", + "summary": "listUsers", + "description": "Lists users in organizations you have access to", + "parameters": [ + { + "name": "org_ids", + "in": "query", + "description": "Comma-separated list of organization ids to filter by", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationId" + } + } + }, + { + "name": "query", + "in": "query", + "description": "Query text to filter by", + "required": false, + "schema": { + "$ref": "#/components/schemas/Query" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the results size", + "required": false, + "schema": { + "$ref": "#/components/schemas/Limit" + } + }, + { + "name": "offset", + "in": "query", + "description": "Specify the offset", + "required": false, + "schema": { + "$ref": "#/components/schemas/Offset" + } + } + ], + "tags": [ + "User V1" + ], + "responses": { + "200": { + "description": "List of users", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + } + } + } + } + }, + "/v1/users/{id}": { + "get": { + "operationId": "getUser", + "summary": "getUser", + "description": "Get user by id", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "User id", + "required": true, + "schema": { + "$ref": "#/components/schemas/UserId" + } + } + ], + "tags": [ + "User V1" + ], + "responses": { + "200": { + "description": "User", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + } + }, + "/v1/users/username/{username}:getLoginParameters": { + "get": { + "operationId": "getUserLoginParameters", + "summary": "getUserLoginParameters", + "description": "Get user organization login parameters by username", + "security": [], + "parameters": [ + { + "name": "username", + "in": "path", + "description": "Username", + "required": true, + "schema": { + "$ref": "#/components/schemas/Username" + } + } + ], + "tags": [ + "User V1" + ], + "responses": { + "200": { + "description": "User", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "login_parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LoginParameters" + } + } + } + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + } + }, + "schemas": { + "NavigationId": { + "description": "Navigation unique identifier - a hash of the normalized navigation payload (name + configuration). Identical navigations across orgs will have the same ID.", + "type": "string", + "example": "5gbe4nkp6jsfq", + "nullable": true + }, + "Navigation": { + "type": "object", + "description": "A customized workplace navigation configuration. The ID is a content-hash, so identical configurations will have the same ID.", + "required": [ + "id", + "name", + "configuration" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/NavigationId" + }, + "name": { + "type": "string", + "description": "Human-readable name for the navigation configuration", + "example": "Sales Team Navigation" + }, + "configuration": { + "$ref": "#/components/schemas/NavigationConfiguration" + } + } + }, + "NavigationCreateRequest": { + "type": "object", + "description": "Request payload to create a new navigation configuration", + "required": [ + "name", + "configuration" + ], + "properties": { + "name": { + "type": "string", + "description": "Human-readable name for the navigation configuration", + "example": "Sales Team Navigation" + }, + "configuration": { + "$ref": "#/components/schemas/NavigationConfiguration" + } + } + }, + "NavigationConfiguration": { + "type": "object", + "description": "Navigation configuration organized by sections. Each section contains an array of navigation items.\n", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NavigationItem" + } + }, + "example": { + "customer_relations": [ + { + "key": "dashboard" + }, + { + "key": "contact" + } + ], + "configurations": [ + { + "name": "Product Catalog", + "subItems": [ + { + "key": "product" + }, + { + "key": "price" + } + ] + }, + { + "key": "journey" + } + ] + } + }, + "NavigationItem": { + "description": "A navigation item - either a simple key item or a group with sub-items", + "oneOf": [ + { + "$ref": "#/components/schemas/NavigationKeyItem" + }, + { + "$ref": "#/components/schemas/NavigationGroupItem" + } + ] + }, + "NavigationKeyItem": { + "type": "object", + "description": "A simple navigation item with a key", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique key identifier for the navigation item", + "example": "dashboard" + } + } + }, + "NavigationGroupItem": { + "type": "object", + "description": "A navigation group containing sub-items", + "required": [ + "name", + "subItems" + ], + "properties": { + "name": { + "type": "string", + "description": "The display name of the navigation group", + "example": "Product Catalog" + }, + "subItems": { + "type": "array", + "description": "The list of navigation items within this group", + "items": { + "$ref": "#/components/schemas/NavigationKeyItem" + } + } + } + }, + "InviteToken": { + "description": "Token used to invite a user to epilot", + "type": "string" + }, + "PartnerInvitationToken": { + "description": "Token used to invite a partner user to epilot", + "type": "string" + }, + "VerificationToken": { + "type": "string" + }, + "GroupId": { + "description": "Group unique identifier", + "type": "string", + "readOnly": true + }, + "UserId": { + "description": "User's unique identifier", + "type": "string", + "readOnly": true + }, + "Query": { + "type": "string" + }, + "OrganizationId": { + "type": "string" + }, + "Limit": { + "type": "number" + }, + "Offset": { + "type": "number" + }, + "Hydrate": { + "type": "boolean" + }, + "Username": { + "type": "string" + }, + "UserInvitationPayload": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email address of the address", + "example": "test@example.com" + }, + "language": { + "type": "string", + "description": "Language for user invitation email", + "enum": [ + "en", + "de" + ], + "default": "en" + }, + "roles": { + "type": "array", + "items": { + "type": "string", + "description": "Role IDs for the user", + "example": "123:owner" + } + } + } + }, + "UserActivationPayload": { + "type": "object", + "properties": { + "display_name": { + "type": "string", + "description": "User's display name (default: email address)", + "example": "Example User" + }, + "password": { + "type": "string", + "description": "User's password", + "example": "AKjhdakjsdh@!34" + } + } + }, + "UserVerificationPayload": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "User's password", + "example": "AKjhdakjsdh@!34" + } + } + }, + "UserV2": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/UserId" + }, + "organization_id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "activated_at": { + "type": "string", + "format": "date-time" + }, + "display_name": { + "type": "string", + "description": "User's display name (default: email address)", + "example": "Example User" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Pending", + "Deactivated", + "Deleted" + ] + }, + "email": { + "description": "User's email address", + "type": "string", + "format": "email" + }, + "draft_email": { + "description": "User's pending email address", + "type": "string", + "nullable": true, + "format": "email" + }, + "department": { + "type": "string", + "description": "User's department", + "nullable": true, + "example": "Sales" + }, + "phone": { + "description": "User's phone number", + "type": "string", + "nullable": true, + "example": 1234567890 + }, + "secondary_phone": { + "description": "User's secondary phone number, preferred for communication", + "type": "string", + "nullable": true, + "example": 1234567890 + }, + "mfa_enabled": { + "description": "User's multi-factor authentication status", + "type": "boolean", + "example": false + }, + "phone_verified": { + "description": "User's phone number verification status", + "type": "boolean", + "example": true + }, + "token": { + "$ref": "#/components/schemas/InviteToken" + }, + "signature": { + "description": "User's email signature", + "type": "string", + "example": "

Thanks

", + "nullable": true + }, + "is_signature_enabled": { + "description": "Whether the user's signature is enabled", + "type": "boolean", + "example": true, + "nullable": true + }, + "preferred_language": { + "description": "User's preferred language", + "type": "string", + "example": "de" + }, + "custom_start_page": { + "description": "User's start page after login", + "type": "string", + "pattern": "^/app/*", + "default": "/app/dashboard", + "nullable": true + }, + "custom_navigation": { + "$ref": "#/components/schemas/NavigationId" + }, + "override_release_channel": { + "description": "This field is used to override the release channel for the user.", + "type": "string", + "nullable": true, + "enum": [ + "canary", + "rc", + "stable", + null + ] + }, + "feature_preferences": { + "description": "User's feature preferences", + "type": "object", + "nullable": true, + "additionalProperties": true, + "example": { + "feature_name": true + } + }, + "image_uri": { + "type": "object", + "description": "User's custom profile image", + "additionalProperties": true, + "properties": { + "original": { + "type": "string", + "format": "uri" + }, + "thumbnail_32": { + "type": "string", + "format": "uri" + } + }, + "nullable": true, + "example": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + } + }, + "favorites": { + "type": "object", + "additionalProperties": true, + "example": { + "entity_views": { + "opportunity": "891a5409850abf8b92bd2cb7bdd2844d32ce6bec", + "order": "628aee91-7c2f-4047-ab0d-433582a19c49" + }, + "dashboard": "751ff121-9ac2-4511-a2e6-851f11287380" + } + }, + "email_notification_setting": { + "type": "object", + "additionalProperties": true, + "example": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + } + }, + "properties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "profileImageName" + }, + "value": { + "type": "string", + "example": "avatar.png" + } + }, + "required": [ + "name", + "value" + ] + } + } + } + }, + "User": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/UserId" + }, + "organization_id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "email": { + "type": "string", + "format": "email" + }, + "display_name": { + "type": "string", + "example": "Example user", + "deprecated": true + }, + "name": { + "type": "string", + "example": "Example user", + "deprecated": true + }, + "preferred_language": { + "type": "string", + "example": "de" + }, + "signature": { + "type": "string", + "example": "

Thanks

" + }, + "custom_navigation": { + "$ref": "#/components/schemas/NavigationId" + }, + "roles": { + "type": "array", + "items": { + "type": "string", + "example": "Owner" + }, + "deprecated": true, + "description": "Deprecated! Please use Permissions API instead" + }, + "image_uri": { + "type": "object", + "additionalProperties": true, + "properties": { + "original": { + "type": "string", + "format": "uri", + "example": "https://account-profile-images.epilot.cloud/1/avatar.png" + }, + "thumbnail_32": { + "type": "string", + "format": "uri", + "example": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + } + }, + "nullable": true + }, + "properties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "profileImageName" + }, + "value": { + "type": "string", + "example": "avatar.png" + } + }, + "required": [ + "name", + "value" + ] + } + } + }, + "required": [ + "id", + "organization_id", + "email", + "name", + "preferred_language", + "roles", + "properties" + ] + }, + "LoginParameters": { + "type": "object", + "properties": { + "organization_id": { + "type": "string", + "example": "123" + }, + "organization_name": { + "type": "string", + "example": "epilot GmbH" + }, + "organization_type": { + "type": "string", + "example": "Vendor" + }, + "organization_use": { + "type": "string", + "example": "Production" + }, + "cognito_region": { + "type": "string", + "example": "eu-central-1" + }, + "cognito_user_pool_id": { + "type": "string", + "example": "eu-central-sample" + }, + "cognito_user_pool_client_id": { + "type": "string", + "example": "asbkh213ehkquwhdi" + }, + "cognito_oauth_domain": { + "type": "string", + "example": "epilot-org-123" + }, + "cognito_oauth_scopes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "openid" + ] + }, + "oauth_response_type": { + "type": "string", + "enum": [ + "code", + "token" + ] + }, + "passkey_enabled": { + "type": "boolean", + "description": "Whether passkey login is enabled for this organization" + } + } + }, + "CreateGroupReq": { + "type": "object", + "properties": { + "name": { + "description": "The name of the group. Could be a department or a team.", + "type": "string", + "example": "Finance" + }, + "user_ids": { + "description": "The list of user ids in the group.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserId" + }, + "example": [ + "123", + "456" + ] + } + }, + "required": [ + "name" + ] + }, + "UpdateGroupReq": { + "type": "object", + "properties": { + "name": { + "description": "The name of the group. Could be a department or a team.", + "type": "string", + "example": "Finance" + }, + "user_ids": { + "description": "The list of user ids in the group.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserId" + }, + "example": [ + "123", + "456" + ] + } + } + }, + "Group": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/GroupId" + }, + "org_id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "name": { + "description": "The name of the group. Could be a department or a team.", + "type": "string", + "example": "Finance" + }, + "created_at": { + "type": "string", + "example": "2024-02-08T04:44:32.246Z" + }, + "updated_at": { + "type": "string", + "example": "2024-02-08T04:44:32.246Z" + }, + "created_by": { + "description": "The user id of the user that created the group.", + "type": "string", + "example": "123" + }, + "crt_assignee": { + "description": "The current user assignee of the group. This is the user, from within the group, that has last been assigned to a workflow task.", + "allOf": [ + { + "$ref": "#/components/schemas/UserV2" + }, + { + "type": "object", + "properties": { + "crt_index": { + "description": "The index of the current assignee in the group's user list.", + "type": "number", + "example": 3 + } + } + } + ] + }, + "users": { + "description": "The list of users in the group. Only contains the full user when respective endpoint is called with a flag. Otherwise only contains the user id.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserV2" + } + } + }, + "required": [ + "id", + "org_id", + "name", + "created_at", + "updated_at" + ] + }, + "SignupUserPayload": { + "type": "object", + "properties": { + "organization_detail": { + "$ref": "#/components/schemas/OrganizationDetail" + }, + "user_detail": { + "$ref": "#/components/schemas/UserDetail" + }, + "language": { + "type": "string", + "description": "Language for user invitation email", + "enum": [ + "en", + "de" + ], + "default": "en" + } + } + }, + "OrganizationDetail": { + "additionalProperties": true, + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Vendor", + "Partner" + ] + }, + "name": { + "type": "string", + "example": "Epilot" + }, + "pricing_tier": { + "type": "string", + "example": "professional" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "website": { + "type": "string" + }, + "is_privacy_policy_checked": { + "type": "boolean", + "example": false, + "nullable": true + }, + "is_terms_and_conditions_checked": { + "type": "boolean", + "example": false, + "nullable": true + } + }, + "required": [ + "type", + "name", + "pricing_tier", + "email" + ] + }, + "CognitoDetails": { + "type": "object", + "properties": { + "cognito_region": { + "type": "string", + "example": "eu-central-1" + }, + "cognito_user_pool_id": { + "type": "string", + "example": "eu-central-sample" + }, + "cognito_user_pool_client_id": { + "type": "string", + "example": "asbkh213ehkquwhdi" + }, + "cognito_user_pool_arn": { + "type": "string", + "example": "arn:aws:cognito-idp:eu-central-1:123456789012:userpool/eu-central-sample" + } + } + }, + "UserDetail": { + "type": "object", + "properties": { + "full_name": { + "type": "string", + "example": "Example user" + }, + "email": { + "type": "string", + "format": "email" + }, + "password": { + "type": "string", + "description": "User's password", + "example": "AKjhdakjsdh@!34" + } + }, + "required": [ + "full_name", + "email", + "password" + ] + }, + "Organization": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/OrganizationId" + }, + "type": { + "type": "string", + "enum": [ + "Vendor", + "Partner" + ], + "nullable": true + }, + "name": { + "type": "string", + "example": "Epilot", + "nullable": true + }, + "signature": { + "type": "string", + "example": "

Thanks

", + "nullable": true + }, + "symbol": { + "type": "string", + "example": "EPI", + "nullable": true + }, + "pricing_tier": { + "type": "string", + "example": "professional", + "nullable": true + }, + "email": { + "type": "string", + "example": "someone@epilot.cloud", + "nullable": true + }, + "phone": { + "type": "string", + "example": 49123123123, + "nullable": true + }, + "website": { + "type": "string", + "example": "https://epilot.cloud", + "nullable": true + }, + "address": { + "type": "object", + "properties": { + "country": { + "type": "string", + "nullable": true + }, + "city": { + "type": "string", + "nullable": true + }, + "postal_code": { + "type": "string", + "nullable": true + }, + "street": { + "type": "string", + "nullable": true + }, + "street_number": { + "type": "string", + "nullable": true + } + } + }, + "logo_url": { + "type": "string", + "example": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "nullable": true + }, + "logo_thumbnail_url": { + "type": "string", + "example": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "nullable": true + }, + "is_unlicensed_org": { + "type": "boolean", + "example": false, + "nullable": true + }, + "cognito_details": { + "$ref": "#/components/schemas/CognitoDetails" + } + } + }, + "DataPointsResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataPoint" + } + }, + "DataPoint": { + "type": "object", + "properties": { + "id": { + "description": "Organization id", + "type": "number", + "example": 206801 + }, + "actual_users": { + "description": "Number of current user", + "type": "number", + "example": 10 + }, + "max_users_last_month": { + "description": "Max user last month", + "type": "number", + "example": 10 + }, + "non_billable_users_last_month": { + "description": "Max non-billable user last month", + "type": "number", + "example": 10 + } + } + }, + "Passkey": { + "type": "object", + "properties": { + "credential_id": { + "type": "string", + "description": "Base64url-encoded credential ID" + }, + "friendly_name": { + "type": "string", + "example": "My Laptop" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "transports": { + "type": "array", + "items": { + "type": "string" + } + }, + "aaguid": { + "type": "string" + } + } + }, + "PasskeyAuthenticationOptions": { + "type": "object", + "properties": { + "options": { + "type": "object", + "description": "WebAuthn PublicKeyCredentialRequestOptions" + }, + "challenge_token": { + "type": "string", + "description": "Signed JWT containing the challenge" + } + } + }, + "PasskeyRegistrationOptions": { + "type": "object", + "properties": { + "options": { + "type": "object", + "description": "WebAuthn PublicKeyCredentialCreationOptions" + }, + "challenge_token": { + "type": "string", + "description": "Signed JWT containing the challenge" + } + } + }, + "PasskeyRegistrationResponse": { + "type": "object", + "properties": { + "challenge_token": { + "type": "string", + "description": "The challenge token from registerBegin" + }, + "registration_response": { + "type": "object", + "description": "WebAuthn AuthenticatorAttestationResponse" + }, + "friendly_name": { + "type": "string", + "example": "My Laptop" + } + }, + "required": [ + "challenge_token", + "registration_response" + ] + } + } + }, + "servers": [ + { + "url": "https://user.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/validation-rules.json b/packages/cli/definitions/validation-rules.json new file mode 100644 index 00000000..95f49bb7 --- /dev/null +++ b/packages/cli/definitions/validation-rules.json @@ -0,0 +1,1491 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Validation Rules API", + "version": "1.0.0" + }, + "tags": [ + { + "name": "Validation Rules", + "description": "Endpoints for managing validation rules" + } + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "paths": { + "/v1/validation-rules": { + "get": { + "operationId": "getValidationRules", + "summary": "Get all validation rules by organization Id", + "description": "Gets all validation rules by organization Id", + "tags": [ + "Validation Rules" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetValidationRulesResponse" + } + } + } + }, + "400": { + "description": "Bad Request - Invalid request body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Invalid request body" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Unknown API Error" + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createValidationRule", + "summary": "Create Validation Rule", + "description": "Creates a new validation rule", + "tags": [ + "Validation Rules" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateValidationRuleRequest" + } + } + }, + "description": "Payload" + }, + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationRule" + } + } + } + } + } + } + }, + "/v1/validation-rules/{ruleId}": { + "get": { + "operationId": "getValidationRuleById", + "summary": "Get validation rule by ID", + "description": "Retrieves a specific validation rule by its ID", + "tags": [ + "Validation Rules" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The unique identifier of the validation rule to retrieve." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationRule" + } + } + } + }, + "404": { + "description": "Validation rule not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Validation rule not found" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Unknown API Error" + } + } + } + } + } + } + } + }, + "patch": { + "operationId": "updateValidationRule", + "summary": "Update Validation Rule (partial update)", + "description": "Updates an existing validation rule partially by ID", + "tags": [ + "Validation Rules" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The unique identifier of the validation rule to update." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateValidationRuleRequest" + } + } + }, + "description": "Fields to update in the validation rule" + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationRule" + } + } + } + }, + "400": { + "description": "Bad Request - Invalid request body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Invalid request body" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Unknown API Error" + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "deleteValidationRule", + "summary": "Delete Validation Rule", + "description": "Deletes a validation rule by ID", + "tags": [ + "Validation Rules" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The unique identifier of the validation rule to delete." + } + ], + "responses": { + "204": { + "description": "Validation rule deleted successfully" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Unknown API Error" + } + } + } + } + } + } + } + } + }, + "/v1/validation-rules/{ruleId}/used-by": { + "post": { + "operationId": "addUsedByReference", + "summary": "Add a reference to the usedBy array", + "description": "Adds a single reference to the usedBy array of a validation rule", + "tags": [ + "Validation Rules" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The unique identifier of the validation rule to update." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsedBy" + } + } + }, + "description": "The usedBy reference to add" + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationRule" + } + } + } + }, + "400": { + "description": "Bad Request - Invalid request body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Invalid request body" + } + } + } + } + } + }, + "404": { + "description": "Validation rule not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Validation rule not found" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Unknown API Error" + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "removeUsedByReference", + "summary": "Remove a reference from the usedBy array", + "description": "Removes a specific reference from the usedBy array of a validation rule", + "tags": [ + "Validation Rules" + ], + "security": [ + { + "EpilotAuth": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The unique identifier of the validation rule to update." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsedBy" + } + } + }, + "description": "The usedBy reference to remove" + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationRule" + } + } + } + }, + "400": { + "description": "Bad Request - Invalid request body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Invalid request body" + } + } + } + } + } + }, + "404": { + "description": "Validation rule not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Validation rule not found" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Unknown API Error" + } + } + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + }, + "EpilotPublicAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot public access token", + "bearerFormat": "JWT" + } + }, + "schemas": { + "GetValidationRulesResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ValidationRule" + } + } + } + }, + "CreateValidationRuleRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/ValidationRuleBase" + }, + { + "type": "object", + "required": [ + "title", + "rule" + ] + } + ] + }, + "UpdateValidationRuleRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/ValidationRuleBase" + } + ] + }, + "ValidationRuleBase": { + "allOf": [ + { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the validation rule." + }, + "placeholder": { + "type": "string", + "description": "Placeholder for the validation rule." + }, + "used_by": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UsedBy" + }, + "description": "Describes where and how a validation rule is applied." + }, + "rule": { + "oneOf": [ + { + "$ref": "#/components/schemas/RegexRuleType" + }, + { + "$ref": "#/components/schemas/PatternRuleType" + }, + { + "$ref": "#/components/schemas/NumericRuleType" + } + ] + } + } + } + ] + }, + "ValidationRule": { + "allOf": [ + { + "$ref": "#/components/schemas/ValidationRuleBase" + }, + { + "type": "object", + "required": [ + "_schema_version", + "_id", + "_organization_id", + "title", + "type", + "created_at", + "updated_at", + "created_by", + "updated_by" + ], + "properties": { + "_schema_version": { + "type": "string", + "description": "Schema version of the validation rule." + }, + "_id": { + "type": "string", + "description": "Unique identifier for the validation rule." + }, + "_organization_id": { + "type": "string", + "description": "Organization ID that owns this rule." + }, + "created_at": { + "type": "string", + "description": "ISO timestamp when the rule was created." + }, + "updated_at": { + "type": "string", + "description": "ISO timestamp when the rule was last updated." + }, + "created_by": { + "type": "string", + "description": "User ID of the creator." + }, + "updated_by": { + "type": "string", + "description": "User ID of the last updater." + } + } + } + ], + "description": "The Validation rule definition." + }, + "UsedBy": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "journey", + "entity" + ], + "description": "The context in which the rule is used (e.g., journey or entity)." + }, + "schema_slug": { + "type": "string", + "description": "Slug of the schema using this rule for entities." + }, + "source_id": { + "type": "string", + "description": "Source identifier for the usage context." + } + }, + "description": "Describes where and how a validation rule is applied." + }, + "RegexRuleType": { + "description": "Validation rule that uses a regular expression to validate input.", + "type": "object", + "required": [ + "type", + "conditions" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "regex" + ], + "description": "Indicates this is a regex-based validation rule." + }, + "conditions": { + "$ref": "#/components/schemas/RegexCondition", + "description": "The conditions that must be met for the rule to trigger" + } + } + }, + "PatternRuleType": { + "description": "Validation rule that uses a sequence of patterns to validate input.", + "type": "object", + "required": [ + "type", + "conditions" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "pattern" + ], + "description": "Indicates this is a pattern-based validation rule." + }, + "conditions": { + "$ref": "#/components/schemas/PatternCondition", + "description": "The conditions that must be met for the rule to trigger" + } + } + }, + "NumericRuleType": { + "description": "Validation rule for numeric values, supporting range and digit count constraints.", + "type": "object", + "required": [ + "type", + "conditions" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "numeric" + ], + "description": "Indicates this is a numeric-based validation rule." + }, + "conditions": { + "$ref": "#/components/schemas/NumericCondition", + "description": "The conditions that must be met for the rule to trigger" + } + } + }, + "RegexCondition": { + "description": "Condition definition for a regex-based validation rule (2 levels deep)", + "anyOf": [ + { + "type": "object", + "description": "All conditions must be true (AND logic)", + "properties": { + "all": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/RegexFactCondition" + }, + { + "$ref": "#/components/schemas/RegexNestedCondition" + } + ] + } + } + }, + "required": [ + "all" + ], + "additionalProperties": false + }, + { + "type": "object", + "description": "Any conditions must be true (OR logic)", + "properties": { + "any": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/RegexFactCondition" + }, + { + "$ref": "#/components/schemas/RegexNestedCondition" + } + ] + } + } + }, + "required": [ + "any" + ], + "additionalProperties": false + }, + { + "type": "object", + "description": "NOT condition (negation)", + "properties": { + "not": { + "anyOf": [ + { + "$ref": "#/components/schemas/RegexFactCondition" + }, + { + "$ref": "#/components/schemas/RegexNestedCondition" + } + ] + } + }, + "required": [ + "not" + ], + "additionalProperties": false + } + ] + }, + "RegexNestedCondition": { + "description": "Nested condition with logical operators (level 2 only)", + "anyOf": [ + { + "type": "object", + "properties": { + "all": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RegexFactCondition" + } + } + }, + "required": [ + "all" + ] + }, + { + "type": "object", + "properties": { + "any": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RegexFactCondition" + } + } + }, + "required": [ + "any" + ] + }, + { + "type": "object", + "properties": { + "not": { + "$ref": "#/components/schemas/RegexFactCondition" + } + }, + "required": [ + "not" + ] + } + ] + }, + "RegexFactCondition": { + "description": "Fact-based condition for regex validation", + "type": "object", + "required": [ + "fact", + "operator", + "value" + ], + "properties": { + "fact": { + "type": "string", + "enum": [ + "inputValue" + ], + "description": "The name of the value to validate. Should always be 'inputValue' because this property name is passed to the engine" + }, + "operator": { + "type": "string", + "enum": [ + "regexMatch" + ], + "description": "The operator to use for comparison" + }, + "value": { + "type": "string", + "description": "The actual regex" + }, + "params": { + "description": "Additional parameters for the condition", + "type": "object", + "properties": { + "errorMessage": { + "type": "string", + "description": "Custom error message" + } + } + } + } + }, + "PatternCondition": { + "description": "Condition definition for a pattern-based validation rule (2 levels deep)", + "anyOf": [ + { + "type": "object", + "description": "All conditions must be true (AND logic)", + "properties": { + "all": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/PatternFactCondition" + }, + { + "$ref": "#/components/schemas/PatternNestedCondition" + } + ] + } + } + }, + "required": [ + "all" + ], + "additionalProperties": false + }, + { + "type": "object", + "description": "Any conditions must be true (OR logic)", + "properties": { + "any": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/PatternFactCondition" + }, + { + "$ref": "#/components/schemas/PatternNestedCondition" + } + ] + } + } + }, + "required": [ + "any" + ], + "additionalProperties": false + }, + { + "type": "object", + "description": "NOT condition (negation)", + "properties": { + "not": { + "anyOf": [ + { + "$ref": "#/components/schemas/PatternFactCondition" + }, + { + "$ref": "#/components/schemas/PatternNestedCondition" + } + ] + } + }, + "required": [ + "not" + ], + "additionalProperties": false + } + ] + }, + "PatternNestedCondition": { + "description": "Nested condition with logical operators (level 2 only)", + "anyOf": [ + { + "type": "object", + "properties": { + "all": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PatternFactCondition" + } + } + }, + "required": [ + "all" + ] + }, + { + "type": "object", + "properties": { + "any": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PatternFactCondition" + } + } + }, + "required": [ + "any" + ] + }, + { + "type": "object", + "properties": { + "not": { + "$ref": "#/components/schemas/PatternFactCondition" + } + }, + "required": [ + "not" + ] + } + ] + }, + "PatternFactCondition": { + "description": "Fact-based condition for pattern validation", + "type": "object", + "oneOf": [ + { + "description": "Numeric condition (total-length fact)", + "required": [ + "fact", + "operator", + "value" + ], + "properties": { + "fact": { + "type": "string", + "enum": [ + "total-length" + ], + "description": "The name of the value to validate." + }, + "operator": { + "type": "string", + "enum": [ + "equal", + "notEqual", + "lessThan", + "lessThanInclusive", + "greaterThan", + "greaterThanInclusive" + ], + "description": "Numeric comparison operator" + }, + "value": { + "type": "number", + "description": "Numeric value to compare against" + }, + "params": { + "description": "Additional parameters for the condition", + "type": "object", + "properties": { + "errorMessage": { + "type": "string", + "description": "Custom error message" + }, + "start": { + "type": "number", + "description": "From where to check" + }, + "end": { + "type": "number", + "description": "To where to check" + } + } + } + } + }, + { + "description": "Exact digits condition", + "required": [ + "fact", + "operator", + "value" + ], + "properties": { + "fact": { + "type": "string", + "enum": [ + "static-check", + "total-length" + ], + "description": "The name of the value to validate." + }, + "operator": { + "type": "string", + "enum": [ + "exactlyNDigits" + ], + "description": "Exact digit count operator" + }, + "value": { + "type": "number", + "description": "Number of digits required" + }, + "params": { + "description": "Additional parameters for the condition", + "type": "object", + "properties": { + "errorMessage": { + "type": "string", + "description": "Custom error message" + }, + "start": { + "type": "number", + "description": "From where to check" + }, + "end": { + "type": "number", + "description": "To where to check" + } + } + } + } + }, + { + "description": "Array-based condition (in, notIn, contains, doesNotContain)", + "required": [ + "fact", + "operator", + "value" + ], + "properties": { + "fact": { + "type": "string", + "enum": [ + "static-check" + ], + "description": "The name of the value to validate." + }, + "operator": { + "type": "string", + "enum": [ + "in", + "notIn", + "contains", + "doesNotContain" + ], + "description": "Array-based comparison operator" + }, + "value": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of string values for array-based operators" + }, + "params": { + "description": "Additional parameters for the condition", + "type": "object", + "properties": { + "errorMessage": { + "type": "string", + "description": "Custom error message" + }, + "start": { + "type": "number", + "description": "From where to check" + }, + "end": { + "type": "number", + "description": "To where to check" + } + } + } + } + }, + { + "description": "String-based condition", + "required": [ + "fact", + "operator", + "value" + ], + "properties": { + "fact": { + "type": "string", + "enum": [ + "static-check" + ], + "description": "The name of the value to validate." + }, + "operator": { + "type": "string", + "enum": [ + "equal", + "notEqual" + ], + "description": "String comparison operator" + }, + "value": { + "type": "string", + "description": "String value to compare against" + }, + "params": { + "description": "Additional parameters for the condition", + "type": "object", + "properties": { + "errorMessage": { + "type": "string", + "description": "Custom error message" + }, + "start": { + "type": "number", + "description": "From where to check" + }, + "end": { + "type": "number", + "description": "To where to check" + } + } + } + } + } + ] + }, + "NumericCondition": { + "description": "Condition definition for a numeric-based validation rule (2 levels deep)", + "anyOf": [ + { + "type": "object", + "description": "All conditions must be true (AND logic)", + "properties": { + "all": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/NumericFactCondition" + }, + { + "$ref": "#/components/schemas/NumericNestedCondition" + } + ] + } + } + }, + "required": [ + "all" + ], + "additionalProperties": false + }, + { + "type": "object", + "description": "Any conditions must be true (OR logic)", + "properties": { + "any": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/NumericFactCondition" + }, + { + "$ref": "#/components/schemas/NumericNestedCondition" + } + ] + } + } + }, + "required": [ + "any" + ], + "additionalProperties": false + }, + { + "type": "object", + "description": "NOT condition (negation)", + "properties": { + "not": { + "anyOf": [ + { + "$ref": "#/components/schemas/NumericFactCondition" + }, + { + "$ref": "#/components/schemas/NumericNestedCondition" + } + ] + } + }, + "required": [ + "not" + ], + "additionalProperties": false + } + ] + }, + "NumericNestedCondition": { + "description": "Nested condition with logical operators (level 2 only)", + "anyOf": [ + { + "type": "object", + "properties": { + "all": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NumericFactCondition" + } + } + }, + "required": [ + "all" + ] + }, + { + "type": "object", + "properties": { + "any": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NumericFactCondition" + } + } + }, + "required": [ + "any" + ] + }, + { + "type": "object", + "properties": { + "not": { + "$ref": "#/components/schemas/NumericFactCondition" + } + }, + "required": [ + "not" + ] + } + ] + }, + "NumericFactCondition": { + "description": "Fact-based condition for numeric validation", + "type": "object", + "oneOf": [ + { + "description": "Numeric value comparison", + "required": [ + "fact", + "operator", + "value" + ], + "properties": { + "fact": { + "type": "string", + "enum": [ + "numeric-value", + "total-length" + ], + "description": "The numeric value extracted from input; The amount of digits" + }, + "operator": { + "type": "string", + "enum": [ + "equal", + "notEqual", + "lessThan", + "lessThanInclusive", + "greaterThan", + "greaterThanInclusive" + ], + "description": "Numeric comparison operator" + }, + "value": { + "type": "number", + "description": "Numeric value to compare against" + }, + "params": { + "description": "Additional parameters for the condition", + "type": "object", + "properties": { + "errorMessage": { + "type": "string", + "description": "Custom error message" + } + } + } + } + }, + { + "description": "Integer digits count validation", + "required": [ + "fact", + "operator", + "value" + ], + "properties": { + "fact": { + "type": "string", + "enum": [ + "integer-digits-count" + ], + "description": "Count of integer digits (excludes leading zeros unless allowed)" + }, + "operator": { + "type": "string", + "enum": [ + "equal", + "exactlyNDigits", + "minIntegerDigits", + "maxIntegerDigits" + ], + "description": "Digit count comparison operator" + }, + "value": { + "type": "number", + "description": "Expected number of integer digits" + }, + "params": { + "description": "Additional parameters for the condition", + "type": "object", + "properties": { + "errorMessage": { + "type": "string", + "description": "Custom error message" + }, + "allowLeadingZeroes": { + "type": "boolean", + "description": "Whether to count leading zeroes in digit count", + "default": false + } + } + } + } + }, + { + "description": "Decimal digits count validation", + "required": [ + "fact", + "operator", + "value" + ], + "properties": { + "fact": { + "type": "string", + "enum": [ + "decimal-digits-count" + ], + "description": "Count of decimal digits" + }, + "operator": { + "type": "string", + "enum": [ + "equal", + "minDecimalDigits", + "maxDecimalDigits" + ], + "description": "Decimal digit count comparison operator" + }, + "value": { + "type": "number", + "description": "Expected number of decimal digits" + }, + "params": { + "description": "Additional parameters for the condition", + "type": "object", + "properties": { + "errorMessage": { + "type": "string", + "description": "Custom error message" + } + } + } + } + }, + { + "description": "Leading zeros validation", + "required": [ + "fact", + "operator", + "value" + ], + "properties": { + "fact": { + "type": "string", + "enum": [ + "has-leading-zeroes" + ], + "description": "Whether the input has leading zeros" + }, + "operator": { + "type": "string", + "enum": [ + "equal", + "notAllowed" + ], + "description": "Leading zeros check operator" + }, + "value": { + "type": "boolean", + "description": "Whether leading zeros should be present or not" + }, + "params": { + "description": "Additional parameters for the condition", + "type": "object", + "properties": { + "errorMessage": { + "type": "string", + "description": "Custom error message" + } + } + } + } + } + ] + } + } + }, + "servers": [ + { + "url": "https://validation-rules.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/webhooks.json b/packages/cli/definitions/webhooks.json new file mode 100644 index 00000000..2e230197 --- /dev/null +++ b/packages/cli/definitions/webhooks.json @@ -0,0 +1,1525 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Webhooks", + "version": "1.0.0", + "description": "Service for configuring webhooks on different events\n" + }, + "tags": [ + { + "name": "webhooks", + "description": "Configure and trigger webhooks" + }, + { + "name": "example", + "description": "Generate example payloads for webhooks" + } + ], + "paths": { + "/v1/webhooks/.well-known/public-key": { + "get": { + "operationId": "getPublicKey", + "summary": "getPublicKey", + "parameters": [ + { + "in": "query", + "name": "orgId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Organization ID to retrieve the public key for." + } + ], + "description": "Returns the platform-level Ed25519 public key used to verify\nasymmetric (v1a) webhook signatures. This endpoint is unauthenticated since the public key is not a secret, but the orgId parameter is required to ensure clients retrieve the correct key for their organization in case of key rotation.\n", + "tags": [ + "webhooks" + ], + "security": [], + "responses": { + "200": { + "description": "Success - public key returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicKeyResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/webhooks/configured-events": { + "get": { + "operationId": "getConfiguredEvents", + "summary": "getConfiguredEvents", + "description": "Retrieve events that can trigger webhooks", + "tags": [ + "webhooks" + ], + "responses": { + "200": { + "description": "Success - configured events loaded with success. Empty array if no events have been configured.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventConfigResp" + } + } + } + } + } + } + }, + "/v1/webhooks/configs": { + "get": { + "operationId": "getConfigs", + "summary": "getConfigs", + "description": "Search Webhook Client Configs", + "tags": [ + "webhooks" + ], + "parameters": [ + { + "in": "query", + "name": "eventName", + "schema": { + "type": "string" + }, + "required": false, + "description": "Filter configurations by event Name", + "example": "customer_request_created" + } + ], + "responses": { + "200": { + "description": "Success - configs loaded with success. Empty array if org has configs.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookConfig" + } + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "post": { + "operationId": "createConfig", + "summary": "createConfig", + "description": "Create Webhook Client Config", + "tags": [ + "webhooks" + ], + "requestBody": { + "description": "Webhook config payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookConfig" + } + } + } + }, + "responses": { + "201": { + "description": "Success - if the config is created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookConfig" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/webhooks/configs/{configId}": { + "get": { + "operationId": "getConfig", + "summary": "getConfig", + "description": "Get webhook config by id", + "tags": [ + "webhooks" + ], + "parameters": [ + { + "in": "path", + "name": "configId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Short uuid to identify the webhook configuration.", + "example": "7hj28aasgag2gha2" + } + ], + "responses": { + "200": { + "description": "Success - if the config is updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookConfig" + } + } + } + }, + "404": { + "description": "No configuration found for this id", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "put": { + "operationId": "updateConfig", + "summary": "updateConfig", + "description": "Update Webhook Client Config", + "tags": [ + "webhooks" + ], + "parameters": [ + { + "in": "path", + "name": "configId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Short uuid (length 6) to identify the webhook configuration.", + "example": "7hj28a" + } + ], + "requestBody": { + "description": "Webhook config payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookConfig" + } + } + } + }, + "responses": { + "200": { + "description": "Success - if the config is updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookConfig" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteConfig", + "summary": "deleteConfig", + "description": "Delete Webhook Client Config", + "tags": [ + "webhooks" + ], + "parameters": [ + { + "in": "path", + "name": "configId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the config to de deleted.", + "example": "CustomerRequest" + } + ], + "responses": { + "204": { + "description": "Success - if the config is deleted successfully" + }, + "401": { + "description": "Failed to authenticate", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "No config found" + } + } + } + }, + "/v1/webhooks/configs/{configId}/trigger": { + "post": { + "operationId": "triggerWebhook", + "summary": "triggers a webhook event either async or sync", + "description": "Trigger a webhook", + "tags": [ + "webhooks", + "trigger" + ], + "parameters": [ + { + "in": "query", + "name": "sync", + "description": "If set to true, the webhook will be triggered synchronously. Otherwise, it will be triggered asynchronously.", + "schema": { + "type": "boolean" + } + }, + { + "in": "path", + "name": "configId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Short uuid to identify the webhook configuration.", + "example": "7hj28aasgag2gha2" + } + ], + "requestBody": { + "description": "Webhook payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Success - if the webhook is triggered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerWebhookResp" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/webhooks/configs/{configId}/events": { + "get": { + "deprecated": true, + "operationId": "getWehookEvents", + "summary": "getWehookEvents", + "description": "This endpoint is deprecated and will be removed on 2025-12-31. Use /v2/webhooks/configs/{configId}/events instead.", + "tags": [ + "webhooks", + "events" + ], + "parameters": [ + { + "in": "path", + "name": "configId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Short uuid to identify the webhook configuration.", + "example": "7hj28aasgag2gha2" + }, + { + "in": "query", + "name": "status", + "schema": { + "type": "string", + "enum": [ + "succeeded", + "failed", + "in_progress" + ] + }, + "description": "Get all events for a given webhook config id", + "example": "succeeded" + }, + { + "in": "query", + "name": "cursor", + "schema": { + "type": "string" + }, + "required": false, + "description": "Base64 encoded cursor to be used for pagination" + } + ], + "responses": { + "200": { + "description": "Success - list events", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookEvent" + } + }, + "cursor": { + "type": "string", + "description": "Cursor to be used for pagination" + } + } + } + } + } + }, + "404": { + "description": "No events found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/webhooks/configs/{configId}/events/replay-batch": { + "post": { + "operationId": "batchReplayEvents", + "summary": "batchReplayEvents", + "description": "Replay a batch of webhook events", + "tags": [ + "webhooks", + "events" + ], + "parameters": [ + { + "in": "path", + "name": "configId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Short uuid to identify the webhook configuration.", + "example": "7hj28aasgag2gha2" + } + ], + "requestBody": { + "description": "Batch replay request payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchReplayRequest" + } + } + } + }, + "responses": { + "202": { + "description": "Success - enqueued events for replay", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "replayed_event_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of event ids that were enqueued for replay" + } + } + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "No webhook config found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/webhooks/configs/{configId}/events/{eventId}": { + "get": { + "operationId": "getEventById", + "summary": "getEventById", + "description": "Get a webhook event by its id", + "tags": [ + "webhooks", + "event" + ], + "parameters": [ + { + "in": "path", + "name": "configId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Short uuid to identify the webhook configuration.", + "example": "7hj28aasgag2gha2" + }, + { + "in": "path", + "name": "eventId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Event id" + } + ], + "responses": { + "200": { + "description": "Success - event", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookEvent" + } + } + } + }, + "404": { + "description": "No events found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/webhooks/configs/{configId}/events/{eventId}/replay": { + "post": { + "operationId": "replayEvent", + "summary": "replayEvent", + "description": "Replay a webhook event", + "tags": [ + "webhooks", + "event" + ], + "parameters": [ + { + "in": "path", + "name": "configId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Short uuid to identify the webhook configuration.", + "example": "7hj28aasgag2gha2" + }, + { + "in": "path", + "name": "eventId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Event id" + } + ], + "responses": { + "204": { + "description": "Success - replay event" + }, + "404": { + "description": "No events found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/webhooks/configs/{configId}/example": { + "post": { + "operationId": "getWebhookExample", + "summary": "getWebhookExample", + "description": "Generate an example payload for a webhook configuration based on trigger type", + "tags": [ + "webhooks", + "example" + ], + "parameters": [ + { + "in": "path", + "name": "configId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Short uuid to identify the webhook configuration.", + "example": "7hj28aasgag2gha2" + } + ], + "requestBody": { + "description": "Example generation parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExampleRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success - example payload generated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExampleResponse" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "No configuration found for this configId", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/webhooks/configs/{configId}/events": { + "post": { + "operationId": "getWebhookEventsV2", + "summary": "getWebhookEventsV2", + "description": "List webhook events and filter them by status, timestamp, etc.", + "tags": [ + "Events" + ], + "parameters": [ + { + "in": "path", + "name": "configId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Short uuid to identify the webhook configuration.", + "example": "7hj28aasgag2gha2" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchOptions" + } + } + } + }, + "responses": { + "200": { + "description": "Success - events where loaded successfully. Empty array if org has no events.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventListResponse" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PublicKeyResponse": { + "type": "object", + "properties": { + "public_key": { + "type": "string", + "description": "PEM-encoded Ed25519 public key for verifying webhook signatures", + "example": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA...\n-----END PUBLIC KEY-----\n" + }, + "algorithm": { + "type": "string", + "description": "The signing algorithm used", + "example": "ed25519" + }, + "issuer": { + "type": "string", + "description": "The issuer of the signing key", + "example": "epilot" + } + }, + "required": [ + "public_key", + "algorithm" + ] + }, + "SearchOptions": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "description": "Maximum number of results to return", + "example": 25, + "default": 25, + "minimum": 1, + "maximum": 25 + }, + "cursor": { + "type": "object", + "description": "Cursor for pagination. Use the next_cursor from the previous response to get the next page.", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp from the last event in the previous page", + "example": "2025-10-31T12:34:56Z" + }, + "event_id": { + "type": "string", + "description": "Event ID from the last event in the previous page", + "example": "evt_1234567890abcdef" + } + } + }, + "timestamp": { + "type": "object", + "description": "Filter events by timestamp range", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "Start timestamp in ISO 8601 format", + "example": "2025-10-01T00:00:00Z" + }, + "to": { + "type": "string", + "format": "date-time", + "description": "End timestamp in ISO 8601 format", + "example": "2025-10-31T23:59:59Z" + } + } + }, + "event_id": { + "type": "string", + "description": "Filter by specific event ID", + "example": "evt_1234567890abcdef" + }, + "status": { + "type": "string", + "description": "Filter by event outcome", + "enum": [ + "succeeded", + "failed" + ], + "example": "succeeded" + } + } + }, + "EventListResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookEvent" + }, + "description": "List of webhook events" + }, + "next_cursor": { + "type": "object", + "nullable": true, + "description": "Cursor to fetch the next page. Null if no more results.", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "example": "2025-10-31T12:34:56Z" + }, + "event_id": { + "type": "string", + "example": "evt_1234567890abcdef" + } + } + }, + "has_more": { + "type": "boolean", + "description": "Indicates if more results are available", + "example": true + } + } + }, + "HttpMethod": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ] + }, + "AuthType": { + "type": "string", + "enum": [ + "BASIC", + "OAUTH_CLIENT_CREDENTIALS", + "API_KEY", + "NONE" + ] + }, + "Filter": { + "type": "object", + "properties": { + "keyToFilter": { + "type": "string" + }, + "supportedValues": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "keyToFilter", + "supportedValues" + ] + }, + "Auth": { + "type": "object", + "properties": { + "authType": { + "$ref": "#/components/schemas/AuthType" + }, + "basicAuthConfig": { + "$ref": "#/components/schemas/BasicAuthConfig" + }, + "oauthConfig": { + "$ref": "#/components/schemas/OAuthConfig" + }, + "apiKeyConfig": { + "$ref": "#/components/schemas/ApiKeyConfig" + } + }, + "required": [ + "authType" + ] + }, + "BasicAuthConfig": { + "type": "object", + "description": "To be sent only if authType is BASIC", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "passwordIsEnvVar": { + "type": "boolean", + "description": "When true, indicates the password value is an environment variable reference (e.g. {{ env.my_secret }})" + } + }, + "required": [ + "username" + ] + }, + "OAuthConfig": { + "type": "object", + "description": "To be sent only if authType is OAUTH_CLIENT_CREDENTIALS", + "properties": { + "clientId": { + "type": "string" + }, + "clientSecret": { + "type": "string" + }, + "clientSecretIsEnvVar": { + "type": "boolean", + "description": "When true, indicates the clientSecret value is an environment variable reference (e.g. {{ env.my_secret }})" + }, + "endpoint": { + "type": "string", + "description": "Https Endpoint for authentication" + }, + "httpMethod": { + "$ref": "#/components/schemas/HttpMethod" + }, + "customParameterList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomOAuthParameter" + } + } + }, + "required": [ + "clientId", + "endpoint", + "httpMethod" + ] + }, + "ApiKeyConfig": { + "type": "object", + "description": "To be sent only if authType is API_KEY", + "properties": { + "keyName": { + "type": "string" + }, + "keyValue": { + "type": "string" + }, + "keyValueIsEnvVar": { + "type": "boolean", + "description": "When true, indicates the keyValue is an environment variable reference (e.g. {{ env.my_secret }})" + } + }, + "required": [ + "keyName" + ] + }, + "WebhookConfig": { + "type": "object", + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "name": { + "type": "string" + }, + "eventName": { + "type": "string" + }, + "url": { + "type": "string" + }, + "creationTime": { + "type": "string", + "description": "creation timestamp", + "example": "2021-04-27T12:01:13.000Z" + }, + "httpMethod": { + "$ref": "#/components/schemas/HttpMethod" + }, + "enabled": { + "type": "boolean" + }, + "auth": { + "$ref": "#/components/schemas/Auth" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + }, + "payloadConfiguration": { + "$ref": "#/components/schemas/PayloadConfiguration" + }, + "enableStaticIP": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "active", + "inactive", + "incomplete" + ] + }, + "jsonataExpression": { + "type": "string", + "description": "JSONata expression to transform the payload" + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the webhook resource", + "items": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "signingSecret": { + "type": "string", + "readOnly": true, + "description": "Per-webhook signing secret following the Standard Webhooks specification.\nOnly returned once during webhook creation. Use this secret to verify\nwebhook signatures using the `webhook-id`, `webhook-timestamp`, and\n`webhook-signature` headers.\n", + "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD" + } + }, + "required": [ + "name", + "eventName" + ], + "example": { + "eventName": "CustomerRequest_Created", + "url": "https://my-partner-service.api.com", + "httpMethod": "POST", + "enabled": true, + "auth": { + "authType": "BASIC", + "basicAuthConfig": { + "username": "secretUsername", + "password": "secret7825@!" + } + }, + "filter": { + "keyToFilter": "customer_request.productId", + "supportedValues": [ + "2324245", + "5253642" + ] + } + } + }, + "EventConfigResp": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventConfigEntry" + }, + "example": [ + { + "eventName": "customer_request_created", + "eventLabel": "Customer Request Created" + } + ] + }, + "EventConfigEntry": { + "type": "object", + "properties": { + "eventName": { + "type": "string", + "description": "Name for identifying the event. Unique." + }, + "eventLabel": { + "type": "string", + "description": "Either a user friendly label, or the eventName itself." + } + } + }, + "ErrorResp": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "TriggerWebhookResp": { + "type": "object", + "required": [ + "event_id" + ], + "properties": { + "status_code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "body": { + "type": "object" + }, + "code": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "succeeded", + "failed" + ] + }, + "start_date": { + "type": "string" + }, + "end_date": { + "type": "string" + }, + "event_id": { + "type": "string" + } + } + }, + "PayloadConfiguration": { + "type": "object", + "description": "Configuration for the webhook payload", + "properties": { + "hydrate_entity": { + "type": "boolean" + }, + "include_relations": { + "type": "boolean" + }, + "include_activity": { + "type": "boolean" + }, + "include_changed_attributes": { + "type": "boolean" + }, + "custom_headers": { + "$ref": "#/components/schemas/CustomHeader" + } + } + }, + "CustomHeader": { + "type": "object", + "description": "Object representing custom headers as key-value pairs.", + "additionalProperties": { + "type": "string", + "description": "Header value" + } + }, + "CustomOAuthParameter": { + "type": "object", + "description": "Custom key/value pair of either type body, query or header", + "properties": { + "type": { + "type": "string", + "enum": [ + "body", + "query", + "header" + ] + }, + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "type", + "key", + "value" + ] + }, + "Metadata": { + "type": "object", + "description": "Contains the metadata about the configured event", + "properties": { + "action": { + "type": "string", + "description": "Action that triggered the event", + "example": "Manual triggered by user with id 123456" + }, + "origin": { + "type": "string", + "description": "Origin of the event" + }, + "creation_timestamp": { + "type": "string", + "description": "Time of event creation" + }, + "webhook_id": { + "type": "string", + "description": "The ID of the webhook configuration" + }, + "webhook_name": { + "type": "string", + "description": "The name of the webhook configuration" + }, + "automation_name": { + "type": "string", + "description": "The name of the automation that triggered the event" + }, + "organization_id": { + "type": "string", + "description": "The ID of the given organization" + }, + "user_id": { + "type": "string", + "description": "The ID of the user for manual triggered events" + }, + "correlation_id": { + "type": "string", + "description": "ID used to track the event" + }, + "execution_id": { + "type": "string", + "description": "When triggered by an automation this is its execution id" + }, + "action_id": { + "type": "string", + "description": "When triggered by an automation this is the id of the action" + } + }, + "required": [ + "organization_id" + ] + }, + "ExecutionPayload": { + "type": "object", + "description": "Payload for triggering a webhook", + "additionalProperties": true, + "properties": { + "metadata": { + "$ref": "#/components/schemas/Metadata" + } + }, + "required": [ + "metadata" + ] + }, + "WebhookEvent": { + "type": "object", + "properties": { + "event_id": { + "type": "string" + }, + "org_id": { + "type": "string" + }, + "webhook_config_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string", + "example": "2021-04-27T12:01:13.000Z" + }, + "event_name": { + "type": "string" + }, + "http_response": { + "type": "object", + "properties": { + "status_code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "body": { + "type": "object" + }, + "code": { + "type": "string" + } + } + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "status": { + "type": "string", + "enum": [ + "succeeded", + "failed", + "in_progress" + ] + }, + "http_method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT" + ] + }, + "payload": { + "type": "string", + "description": "stringified payload of the webhook request" + } + }, + "required": [ + "event_id", + "webhook_config_id", + "org_id" + ] + }, + "ExampleRequest": { + "type": "object", + "properties": { + "automation_id": { + "type": "string", + "description": "ID of the automation, if applicable", + "example": "automation_123" + } + } + }, + "ExampleResponse": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "entity": { + "type": "object", + "description": "Example payload for the webhook event", + "additionalProperties": true + }, + "relations": { + "type": "array", + "description": "Example relations for the webhook event", + "items": { + "type": "object", + "additionalProperties": true + } + } + }, + "additionalProperties": true + }, + "BatchReplayRequest": { + "type": "object", + "properties": { + "eventIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of event IDs to replay", + "minItems": 1, + "maxItems": 100, + "example": [ + "2f1b7cf8-ff55-4359-966f-e56f39a52c94", + "48c984bf-466b-470b-b743-d07cea168243" + ] + } + }, + "required": [ + "eventIds" + ] + } + }, + "securitySchemes": { + "EpilotAuth": { + "type": "http", + "scheme": "bearer", + "description": "Authorization header with epilot OAuth2 bearer token", + "bearerFormat": "JWT" + } + } + }, + "security": [ + { + "EpilotAuth": [] + } + ], + "servers": [ + { + "url": "https://webhooks.sls.epilot.io" + } + ] +} diff --git a/packages/cli/definitions/workflow-definition.json b/packages/cli/definitions/workflow-definition.json new file mode 100644 index 00000000..533c5333 --- /dev/null +++ b/packages/cli/definitions/workflow-definition.json @@ -0,0 +1,3417 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Workflows Definitions", + "version": "1.0.0", + "description": "Service for Workflow Definitions for different processes inside of an Organization\n" + }, + "servers": [ + { + "url": "https://workflows-definition.sls.epilot.io" + } + ], + "security": [ + { + "BearerAuth": [] + } + ], + "paths": { + "/v1/workflows/limits/max-allowed": { + "get": { + "operationId": "getMaxAllowedLimit", + "summary": "getMaxAllowedLimit", + "description": "Get limits and number of created executions for an Organization.", + "tags": [ + "Workflows" + ], + "responses": { + "200": { + "description": "A combo of current number of workflows, and the max allowed number of workflows.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MaxAllowedLimit" + }, + "example": { + "currentNoOfWorkflows": 5, + "maxAllowed": 7 + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/workflows/definitions": { + "get": { + "operationId": "getDefinitions", + "summary": "getDefinitions", + "description": "Retrieve all Workflow Definitions from an Organization", + "tags": [ + "Workflows" + ], + "responses": { + "200": { + "description": "Success - definitions loaded with success. Empty array if org has no definitions.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowDefinition" + } + }, + "example": [ + { + "id": "25n2k52ja", + "name": "Lead Qualification", + "assignedTo": [ + "18625", + "90252" + ], + "description": "Lead Qualification description", + "lastUpdateTime": "2021-08-04T21:13:50.373Z", + "creationTime": "2021-08-04T21:13:50.373Z", + "dueDate": "2021-08-04T21:13:50.373Z", + "flow": [ + { + "id": "5892na2", + "name": "Initial Information Gathering", + "order": 1, + "type": "SECTION", + "steps": [ + { + "id": "2hja82a", + "name": "Call client and confirm address and product", + "type": "STEP", + "order": 1, + "assignedTo": [ + "123482" + ] + }, + { + "id": "ga92ha2", + "name": "Check product availability", + "type": "STEP", + "order": 2, + "assignedTo": [ + "123482" + ] + }, + { + "id": "jga92ha", + "name": "Send email confirming contact with the client", + "type": "STEP", + "order": 3, + "assignedTo": [ + "123482" + ] + } + ] + }, + { + "id": "0a7g22a", + "name": "Print and send catalog", + "type": "STEP", + "order": 2, + "assignedTo": [ + "123482" + ] + } + ] + } + ] + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "post": { + "operationId": "createDefinition", + "summary": "createDefinition", + "description": "Create a Workflow Definition.", + "tags": [ + "Workflows" + ], + "requestBody": { + "description": "Workflow Definition payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowDefinition" + }, + "example": { + "name": "Lead Qualification", + "description": "Lead Qualification description", + "dueDate": "2022-08-04T12:00:00.000Z", + "assignedTo": [ + "952802", + "80225" + ], + "flow": [ + { + "name": "Initial Information Gathering", + "order": 1, + "type": "SECTION", + "steps": [ + { + "name": "Call client and confirm address and product", + "type": "STEP", + "order": 1, + "assignedTo": [ + "123482" + ] + }, + { + "name": "Check product availability", + "type": "STEP", + "order": 2, + "assignedTo": [ + "123482" + ] + }, + { + "name": "Send email confirming contact with the client", + "type": "STEP", + "order": 3, + "assignedTo": [ + "123482" + ] + } + ] + }, + { + "name": "Print and send catalog", + "type": "STEP", + "order": 2, + "assignedTo": [ + "123482" + ] + } + ] + } + } + } + }, + "responses": { + "201": { + "description": "Success - if the definition is created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowDefinition" + }, + "example": { + "id": "25n2k52ja", + "name": "Lead Qualification", + "description": "Lead Qualification description", + "lastUpdateTime": "2021-08-04T21:13:50.373Z", + "creationTime": "2021-08-04T21:13:50.373Z", + "dueDate": "2022-08-04T12:00:00.000Z", + "assignedTo": [ + "952802", + "80225" + ], + "flow": [ + { + "id": "5892na2", + "name": "Initial Information Gathering", + "order": 1, + "type": "SECTION", + "steps": [ + { + "id": "2hja82a", + "name": "Call client and confirm address and product", + "type": "STEP", + "order": 1, + "assignedTo": [ + "48829" + ] + }, + { + "id": "ga92ha2", + "name": "Check product availability", + "type": "STEP", + "order": 2, + "assignedTo": [ + "45390" + ] + }, + { + "id": "jga92ha", + "name": "Send email confirming contact with the client", + "type": "STEP", + "order": 3, + "assignedTo": [ + "8230" + ] + } + ] + }, + { + "id": "0a7g22a", + "name": "Print and send catalog", + "type": "STEP", + "order": 2, + "assignedTo": [ + "8239" + ] + } + ] + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/templates": { + "get": { + "operationId": "listFlowTemplates", + "summary": "listFlowTemplates", + "description": "List all Flow Templates for a customer. Optionally, you can filter flow templates by trigger values.", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "in": "query", + "name": "trigger_type", + "schema": { + "type": "string", + "enum": [ + "automation", + "manual", + "journey_submission" + ] + }, + "required": false, + "description": "Type of trigger for whom to filter flow templates", + "example": "journey_submission" + }, + { + "in": "query", + "name": "trigger_source_id", + "schema": { + "type": "string" + }, + "required": false, + "description": "Id of the trigger source to filter flow templates. Interpretation depends on **trigger_type**:\n- **automation**: use an `{automation_flow_id}` value\n- **journey_submission**: use a `{journey_id}` value\n- **manual**: this parameter is ignored; you can optionally filter by `{trigger_schema}`\n", + "example": "j208g0aj-08g9agajggak-g9aug9-892kgl1m" + }, + { + "in": "query", + "name": "trigger_schema", + "schema": { + "type": "string" + }, + "required": false, + "description": "Schema of the trigger source to filter flow templates. This parameter only makes sense when **trigger_type** is `manual`\n", + "example": "opportunity" + } + ], + "responses": { + "200": { + "description": "Success - flow templates loaded with success. Empty array if customer has no flows defined.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowTemplatesList" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "post": { + "operationId": "createFlowTemplate", + "summary": "createFlowTemplate", + "description": "Create a new Flow Template.", + "tags": [ + "Flows V2" + ], + "requestBody": { + "description": "Flow Template payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFlowTemplate" + } + } + } + }, + "responses": { + "201": { + "description": "Success - if the flow template is created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowTemplate" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/templates:search": { + "post": { + "operationId": "searchFlowTemplates", + "summary": "searchFlowTemplates", + "description": "Search for flow templates by name, trigger type, enabled status, and more.", + "tags": [ + "Flows V2" + ], + "requestBody": { + "description": "Search for flow templates by name, trigger type, enabled status, and more.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchFlowTemplates" + }, + "example": { + "name": "Lead Qualification", + "definition_id": "25n2k52ja", + "trigger_type": "journey_submission", + "enabled": true, + "from": 0, + "size": 10 + } + } + } + }, + "responses": { + "200": { + "description": "Success - flow templates loaded with success. Empty array if customer has no flows defined.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hits": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowTemplate" + } + } + } + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/templates/{flowId}": { + "get": { + "operationId": "getFlowTemplate", + "summary": "getFlowTemplate", + "description": "Get specific FLow template for a customer", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "in": "path", + "name": "flowId", + "schema": { + "$ref": "#/components/schemas/FlowTemplateId" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Returns the Flow Template", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowTemplate" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "Definition Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefinitionNotFoundResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "put": { + "operationId": "updateFlowTemplate", + "summary": "updateFlowTemplate", + "description": "Update Flow Template.", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "in": "path", + "name": "flowId", + "schema": { + "$ref": "#/components/schemas/FlowTemplateId" + }, + "required": true + } + ], + "requestBody": { + "description": "Flow Template payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowTemplate" + } + } + } + }, + "responses": { + "200": { + "description": "Flow template has been updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowTemplate" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteFlowTemplate", + "summary": "deleteFlowTemplate", + "description": "Delete Flow Template.", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "in": "path", + "name": "flowId", + "schema": { + "$ref": "#/components/schemas/FlowTemplateId" + }, + "required": true, + "description": "Id of the flow template to de deleted." + } + ], + "responses": { + "204": { + "description": "Flow template has been deleted successfully" + }, + "401": { + "description": "Failed to authenticate", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "No definition found" + } + } + } + }, + "/v2/flows/templates/{flowId}/duplicate": { + "post": { + "operationId": "duplicateFlowTemplate", + "summary": "duplicateFlowTemplate", + "description": "Duplicate a Flow Template from an existing workflow.", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "in": "path", + "name": "flowId", + "schema": { + "$ref": "#/components/schemas/FlowTemplateId" + }, + "required": true + } + ], + "responses": { + "201": { + "description": "Flow template has been duplicated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowTemplate" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/templates/{flowId}/export": { + "get": { + "operationId": "exportFlowTemplate", + "summary": "exportFlowTemplate", + "description": "Export a Flow Template with all referenced automations resolved and bundled alongside.", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "in": "path", + "name": "flowId", + "schema": { + "$ref": "#/components/schemas/FlowTemplateId" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Exported flow template with resolved automations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowTemplateExport" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "Flow template not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/templates/import": { + "post": { + "operationId": "importFlowTemplate", + "summary": "importFlowTemplate", + "description": "Import a Flow Template from an export payload. Creates all automations and the flow in the caller's organization.", + "tags": [ + "Flows V2" + ], + "requestBody": { + "description": "Export payload containing the flow template and resolved automations", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowTemplateExport" + } + } + } + }, + "responses": { + "201": { + "description": "Flow template imported successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowTemplateImportResult" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/workflows/definitions/{definitionId}": { + "get": { + "operationId": "getDefinition", + "summary": "getDefinition", + "description": "Get specific Definition by id from the Organization.", + "tags": [ + "Workflows" + ], + "parameters": [ + { + "in": "path", + "name": "definitionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Short uuid (length 8) to identify the Workflow Definition.", + "example": "7hj28a" + } + ], + "responses": { + "200": { + "description": "Returns the Workflow definition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowDefinition" + }, + "example": { + "id": "25n2k52ja", + "name": "Lead Qualification", + "dueDate": "2022-08-04T12:00:00.000Z", + "assignedTo": [ + "952802", + "80225" + ], + "lastUpdateTime": "2021-08-04T21:13:50.373Z", + "creationTime": "2021-08-04T21:13:50.373Z", + "flow": [ + { + "id": "5892na2", + "name": "Initial Information Gathering", + "order": 1, + "type": "SECTION", + "steps": [ + { + "id": "2hja82a", + "name": "Call client and confirm address and product", + "type": "STEP", + "order": 1, + "assignedTo": [ + "923432" + ] + }, + { + "id": "ga92ha2", + "name": "Check product availability", + "type": "STEP", + "order": 2, + "assignedTo": [ + "45488" + ] + }, + { + "id": "jga92ha", + "name": "Send email confirming contact with the client", + "type": "STEP", + "order": 3, + "assignedTo": [ + "45488" + ] + } + ] + }, + { + "id": "0a7g22a", + "name": "Print and send catalog", + "type": "STEP", + "order": 2, + "assignedTo": [ + "8988" + ] + } + ], + "closingReasons": [ + { + "id": "ffoowef", + "title": "test" + }, + { + "id": "hebwoeu", + "title": "Closing because all" + }, + { + "id": "mbnoenq", + "title": "Better offer" + } + ] + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "Definition Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefinitionNotFoundResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "put": { + "operationId": "updateDefinition", + "summary": "updateDefinition", + "description": "Update Workflow Definition.", + "tags": [ + "Workflows" + ], + "parameters": [ + { + "in": "path", + "name": "definitionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Short uuid (length 8) to identify the Workflow Definition.", + "example": "7hj28a" + } + ], + "requestBody": { + "description": "Workflow Definition payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowDefinition" + }, + "example": { + "id": "25n2k52ja", + "name": "Lead Qualification", + "dueDate": "2022-08-04T12:00:00.000Z", + "assignedTo": [ + "952802", + "80225" + ], + "lastUpdateTime": "2021-08-04T21:13:50.373Z", + "creationTime": "2021-08-04T21:13:50.373Z", + "flow": [ + { + "id": "5892na2", + "name": "Initial Information Gathering", + "order": 1, + "type": "SECTION", + "steps": [ + { + "id": "2hja82a", + "name": "Call client and confirm address and product", + "type": "STEP", + "order": 1, + "assignedTo": [ + "8988" + ] + }, + { + "id": "ga92ha2", + "name": "Check product availability", + "type": "STEP", + "order": 2, + "assignedTo": [ + "8988" + ] + }, + { + "id": "jga92ha", + "name": "Send email confirming contact with the client", + "type": "STEP", + "order": 3, + "assignedTo": [ + "8988" + ] + } + ] + }, + { + "id": "0a7g22a", + "name": "Print and send catalog", + "type": "STEP", + "order": 2, + "assignedTo": [ + "8988" + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Success - if the definition is updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowDefinition" + }, + "example": { + "id": "25n2k52ja", + "name": "Lead Qualification", + "dueDate": "2022-08-04T12:00:00.000Z", + "assignedTo": [ + "952802", + "80225" + ], + "lastUpdateTime": "2021-08-04T21:13:50.373Z", + "creationTime": "2021-08-04T21:13:50.373Z", + "flow": [ + { + "id": "5892na2", + "name": "Initial Information Gathering", + "order": 1, + "type": "SECTION", + "steps": [ + { + "id": "2hja82a", + "name": "Call client and confirm address and product", + "type": "STEP", + "order": 1, + "assignedTo": [ + "1" + ] + }, + { + "id": "ga92ha2", + "name": "Check product availability", + "type": "STEP", + "order": 2, + "assignedTo": [ + "56645" + ] + }, + { + "id": "jga92ha", + "name": "Send email confirming contact with the client", + "type": "STEP", + "order": 3, + "assignedTo": [ + "949923" + ] + } + ] + }, + { + "id": "0a7g22a", + "name": "Print and send catalog", + "type": "STEP", + "order": 2, + "assignedTo": [ + "156645" + ] + } + ] + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteDefinition", + "summary": "deleteDefinition", + "description": "Delete Workflow Definition.", + "tags": [ + "Workflows" + ], + "parameters": [ + { + "in": "path", + "name": "definitionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the definition to de deleted.", + "example": "CustomerRequest" + } + ], + "responses": { + "204": { + "description": "Success - if the definition is deleted successfully" + }, + "401": { + "description": "Failed to authenticate", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "No definition found" + } + } + } + }, + "/v1/workflows/closing-reasons": { + "get": { + "operationId": "getAllClosingReasons", + "summary": "getAllClosingReasons", + "description": "Get all Closing Reasons defined in the organization by default all Active.", + "parameters": [ + { + "in": "query", + "name": "includeInactive", + "schema": { + "type": "boolean" + }, + "required": false, + "description": "Filter Closing Reasons by status like active inactiv", + "example": true + } + ], + "tags": [ + "Closing Reason" + ], + "responses": { + "200": { + "description": "Returns the entire catalog of closing reasons per organization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReasons" + } + } + } + } + } + }, + "post": { + "operationId": "createClosingReason", + "summary": "createClosingReason", + "description": "A created Closing Reason is stored for the organization and will be displayed in the library of reasons.", + "tags": [ + "Closing Reason" + ], + "requestBody": { + "description": "closing reason to store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReason" + }, + "example": { + "title": "better offer", + "description": "A customer closes the process because he found something better" + } + } + } + }, + "responses": { + "201": { + "description": "closing reason is stored successfully in the repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReason" + } + } + } + } + } + } + }, + "/v2/workflows/closing-reasons/{reasonId}": { + "get": { + "operationId": "getClosingReason", + "summary": "getClosingReason", + "description": "Get specific closing reason by id from the organisation.", + "tags": [ + "Closing Reason" + ], + "parameters": [ + { + "in": "path", + "name": "reasonId", + "schema": { + "type": "string", + "example": "x739cew" + }, + "required": true, + "description": "unique id to identify the closing reason." + } + ], + "responses": { + "200": { + "description": "Returns the closing reason", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReason" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "Closing reason not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReasonNotFoundResp" + } + } + } + } + } + }, + "patch": { + "operationId": "updateClosingReason", + "summary": "updateClosingReason", + "description": "Update an existing closing reason", + "tags": [ + "Closing Reason" + ], + "parameters": [ + { + "in": "path", + "name": "reasonId", + "schema": { + "type": "string", + "example": "x739cew" + }, + "required": true, + "description": "unique id to identify the closing reason." + } + ], + "requestBody": { + "description": "Updated closing reason fields", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReason" + } + } + } + }, + "responses": { + "200": { + "description": "Closing reason updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReason" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "Closing reason not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReasonNotFoundResp" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteClosingReason", + "summary": "deleteClosingReason", + "description": "Permanently delete a closing reason (Using INACTIVE status is recommended instead)", + "tags": [ + "Closing Reason" + ], + "parameters": [ + { + "in": "path", + "name": "reasonId", + "schema": { + "type": "string", + "example": "x739cew" + }, + "required": true, + "description": "unique id to identify the closing reason." + } + ], + "responses": { + "204": { + "description": "Closing reason deleted successfully" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "Closing reason not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReasonNotFoundResp" + } + } + } + } + } + } + }, + "/v1/workflows/closing-reasons/{reasonId}": { + "get": { + "deprecated": true, + "operationId": "getClosingReasonV1", + "summary": "getClosingReasonV1", + "description": "Get specific closing reason by id from the organisation.", + "tags": [ + "Closing Reason" + ], + "parameters": [ + { + "in": "path", + "name": "reasonId", + "schema": { + "type": "string" + }, + "required": true, + "description": "uuid to identify the closing reason.", + "example": "-poOAPBa-jFZA_AWV3zN0" + } + ], + "responses": { + "200": { + "description": "Returns the closing reason", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReason" + }, + "example": { + "id": "-poOAPBa-jFZA_AWV3zN0", + "title": "Closing due to example reason", + "status": "ACTIVE", + "lastUpdateTime": "2021-08-04T21:13:50.373Z", + "creationTime": "2021-08-04T21:13:50.373Z" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "Closing reason not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReasonNotFoundResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "patch": { + "operationId": "changeReasonStatus", + "summary": "changeReasonStatus", + "description": "Change the status of a Closing Reason (eg. ACTIVE to INACTIVE).", + "tags": [ + "Closing Reason" + ], + "parameters": [ + { + "in": "path", + "name": "reasonId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "change the status of a closing reason", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeReasonStatusReq" + } + } + } + }, + "responses": { + "202": { + "description": "The status change was accepted" + }, + "400": { + "description": "bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/workflows/definitions/{definitionId}/closing-reasons": { + "get": { + "operationId": "getWorkflowClosingReasons", + "summary": "getWorkflowClosingReasons", + "description": "Returns all closing reasons defined for the workflow.", + "parameters": [ + { + "in": "path", + "name": "definitionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "ID of a workflow definition", + "example": "fxcwfw" + } + ], + "tags": [ + "Workflows" + ], + "responses": { + "200": { + "description": "Returns the entire catalog of closing reasons for a specific workflow", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReasonsIds" + } + } + } + } + } + }, + "patch": { + "operationId": "setWorkflowClosingReasons", + "summary": "setWorkflowClosingReasons", + "description": "Sets which closing reasons are defined for this workflow, based on the entire closing reasons catalog.", + "tags": [ + "Workflows" + ], + "parameters": [ + { + "in": "path", + "name": "definitionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "ID of a workflow definition", + "example": 7889 + } + ], + "requestBody": { + "description": "set all closing reasons for a specific definition", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReasonsIds" + } + } + } + }, + "responses": { + "201": { + "description": "closing reasons are set for this workflow" + } + } + } + } + }, + "components": { + "securitySchemes": { + "BearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + }, + "schemas": { + "FlowTemplateBase": { + "type": "object", + "required": [ + "name", + "tasks", + "edges" + ], + "properties": { + "id": { + "type": "string" + }, + "org_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "trigger": { + "$ref": "#/components/schemas/Trigger" + }, + "enabled": { + "type": "boolean", + "description": "Whether the workflow is enabled or not", + "default": true + }, + "version": { + "$ref": "#/components/schemas/Version" + }, + "created_at": { + "type": "string", + "description": "ISO String Date & Time", + "example": "2021-04-27T12:01:13.000Z" + }, + "updated_at": { + "type": "string", + "description": "ISO String Date & Time", + "example": "2021-04-27T12:01:13.000Z" + }, + "due_date": { + "type": "string", + "example": "2021-04-27T12:00:00.000Z" + }, + "due_date_config": { + "$ref": "#/components/schemas/DueDateConfig" + }, + "assigned_to": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/VariableAssignment" + } + ] + } + }, + "available_in_ecp": { + "type": "boolean", + "description": "Indicates whether this workflow is available for End Customer Portal or not. By default it's not." + }, + "additional_triggers": { + "type": "array", + "description": "Additional trigger configurations that can also start this flow. Useful for flows that should be startable via multiple methods (e.g., both automation AND manual).", + "items": { + "$ref": "#/components/schemas/Trigger" + } + }, + "phases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Phase" + } + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task" + } + }, + "edges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } + }, + "closing_reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClosingReason" + } + }, + "entity_sync": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySync" + } + }, + "taxonomies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Taxonomy ids that are associated with this workflow and used for filtering" + }, + "singleClosingReasonSelection": { + "type": "boolean", + "description": "Whether only a single closing reason can be selected" + } + } + }, + "FlowTemplate": { + "allOf": [ + { + "$ref": "#/components/schemas/FlowTemplateBase" + }, + { + "type": "object", + "properties": { + "closing_reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClosingReason" + } + } + } + } + ] + }, + "Version": { + "type": "string", + "enum": [ + "v1", + "v2", + "v3" + ], + "description": "Version of the workflow schema.\n\n- `v1` – *Deprecated*. The initial version of workflows with limited structure and automation capabilities. \n- `v2` – Linear workflows. Supports sequential task execution with basic automation triggers. \n- `v3` – Advanced workflows. Adds support for branching logic (conditions), parallel paths, and enhanced automation features such as dynamic triggers and flow control.\n", + "example": 2 + }, + "Trigger": { + "anyOf": [ + { + "$ref": "#/components/schemas/ManualTrigger" + }, + { + "$ref": "#/components/schemas/AutomationTrigger" + }, + { + "$ref": "#/components/schemas/JourneySubmissionTrigger" + }, + { + "$ref": "#/components/schemas/JourneyAutomationTrigger" + } + ], + "example": { + "type": "automation", + "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" + } + }, + "ManualTrigger": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "manual" + ] + }, + "entity_schema": { + "type": "string" + } + } + }, + "AutomationTrigger": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "automation" + ] + }, + "automation_id": { + "type": "string", + "description": "Id of the automation config that triggers this workflow" + }, + "trigger_config": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The trigger type (e.g. entity_operation, activity)" + }, + "configuration": { + "type": "object", + "additionalProperties": true, + "description": "Trigger-specific configuration" + } + }, + "additionalProperties": true + }, + "description": "Transient field. Trigger configurations for creating or updating the trigger automation flow. Each item follows the automation API trigger schema. Processed by the backend during create/update and stripped before storage.\n" + } + } + }, + "JourneyAutomationTrigger": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "journey_automation" + ] + }, + "entity_schema": { + "type": "string", + "description": "Schema of the main entity where flow will be triggered. The entity will be picked from automation context." + } + } + }, + "JourneySubmissionTrigger": { + "type": "object", + "required": [ + "type", + "journey_id" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "journey_submission" + ] + }, + "journey_id": { + "type": "string", + "description": "ID of the journey that will trigger this flow" + }, + "journey_name": { + "type": "string", + "description": "Name of the journey that will trigger this flow" + }, + "automation_id": { + "type": "string" + } + } + }, + "CreateFlowTemplate": { + "allOf": [ + { + "$ref": "#/components/schemas/FlowTemplateBase" + }, + { + "type": "object", + "properties": { + "closing_reasons": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + } + } + } + } + ] + }, + "SearchFlowTemplates": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "definition_id": { + "type": "string" + }, + "trigger_type": { + "type": "string", + "enum": [ + "journey_submission", + "manual", + "automation" + ] + }, + "enabled": { + "type": "boolean" + }, + "from": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "sort_by": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "default": "updated_at" + }, + "sort_order": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + } + } + }, + "FlowTemplatesList": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowTemplate" + } + } + }, + "required": [ + "results" + ] + }, + "FlowTemplateId": { + "type": "string", + "description": "Short unique id (length 8) to identify the Flow Template.", + "example": "7hj28akg" + }, + "Task": { + "anyOf": [ + { + "$ref": "#/components/schemas/ManualTask" + }, + { + "$ref": "#/components/schemas/AutomationTask" + }, + { + "$ref": "#/components/schemas/DecisionTask" + }, + { + "$ref": "#/components/schemas/AiAgentTask" + } + ] + }, + "ManualTask": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskBase" + } + ] + }, + "AutomationTask": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskBase" + }, + { + "type": "object", + "required": [ + "automation_config" + ], + "properties": { + "automation_config": { + "$ref": "#/components/schemas/AutomationConfig" + }, + "trigger_mode": { + "$ref": "#/components/schemas/TriggerMode" + }, + "schedule": { + "$ref": "#/components/schemas/ActionSchedule" + }, + "created_automatically": { + "type": "boolean", + "description": "Indicates whether this task was created automatically by journeys or manually by an user", + "default": false + } + } + } + ] + }, + "AutomationConfig": { + "type": "object", + "description": "Configuration for automation execution to run", + "properties": { + "flow_id": { + "type": "string", + "description": "Id of the configured automation to run" + }, + "action_config": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The action type (e.g. send-email, trigger-workflow)" + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action-specific configuration" + } + }, + "additionalProperties": true, + "description": "Transient field. The full automation action configuration following the automation API action schema. Processed by the backend during create/update and stripped before storage. When present without a flow_id, a new automation flow is created. When present with a flow_id, the existing automation flow is updated.\n" + } + } + }, + "AiAgentTask": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskBase" + }, + { + "type": "object", + "properties": { + "agent_config": { + "$ref": "#/components/schemas/AgentConfig" + } + } + } + ] + }, + "AgentConfig": { + "type": "object", + "description": "Configuration for AI Agent to run", + "required": [ + "agent_id" + ], + "properties": { + "agent_id": { + "type": "string", + "description": "Id of the configured AI Agent to run" + } + }, + "additionalProperties": true + }, + "TriggerMode": { + "type": "string", + "enum": [ + "manual", + "automatic" + ] + }, + "ActionSchedule": { + "anyOf": [ + { + "$ref": "#/components/schemas/ImmediateSchedule" + }, + { + "$ref": "#/components/schemas/DelayedSchedule" + }, + { + "$ref": "#/components/schemas/RelativeSchedule" + } + ] + }, + "ImmediateSchedule": { + "type": "object", + "properties": { + "mode": { + "enum": [ + "immediate" + ] + } + } + }, + "DelayedSchedule": { + "type": "object", + "required": [ + "mode", + "duration", + "unit" + ], + "properties": { + "mode": { + "enum": [ + "delayed" + ] + }, + "duration": { + "type": "number" + }, + "unit": { + "$ref": "#/components/schemas/TimeUnit" + } + } + }, + "RelativeSchedule": { + "type": "object", + "properties": { + "mode": { + "enum": [ + "relative" + ] + }, + "direction": { + "type": "string", + "enum": [ + "before", + "after" + ] + }, + "duration": { + "type": "number" + }, + "unit": { + "$ref": "#/components/schemas/TimeUnit" + }, + "reference": { + "type": "object", + "required": [ + "id", + "origin" + ], + "properties": { + "id": { + "type": "string", + "description": "The id of the entity / workflow / task, based on the origin of the schedule" + }, + "origin": { + "type": "string", + "enum": [ + "flow_started", + "task_completed", + "trigger_entity_attribute" + ] + }, + "schema": { + "type": "string", + "description": "The schema of the entity" + }, + "attribute": { + "type": "string", + "description": "An entity attribute that identifies a date / datetime" + } + } + } + }, + "required": [ + "mode", + "direction", + "duration", + "unit", + "reference" + ] + }, + "DecisionTask": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskBase" + }, + { + "type": "object", + "properties": { + "trigger_mode": { + "$ref": "#/components/schemas/TriggerMode" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + "schedule": { + "anyOf": [ + { + "$ref": "#/components/schemas/DelayedSchedule" + }, + { + "$ref": "#/components/schemas/RelativeSchedule" + } + ] + }, + "loop_config": { + "type": "object", + "properties": { + "loop_branch_id": { + "type": "string", + "description": "The id of the branch that will be looped" + }, + "exit_branch_id": { + "type": "string", + "description": "The id of the branch that will be used to exit the loop" + }, + "max_iterations": { + "type": "integer", + "description": "Maximum number of iterations for the loop branch", + "default": 3, + "minimum": 1, + "maximum": 10 + } + }, + "required": [ + "loop_branch_id", + "exit_branch_id", + "max_iterations" + ] + } + }, + "required": [ + "trigger_mode", + "conditions" + ] + } + ] + }, + "TaskBase": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "$ref": "#/components/schemas/StepDescription" + }, + "journey": { + "$ref": "#/components/schemas/StepJourney" + }, + "due_date": { + "type": "string", + "example": "2021-04-27T12:00:00.000Z" + }, + "due_date_config": { + "$ref": "#/components/schemas/DueDateConfig" + }, + "requirements": { + "type": "array", + "description": "requirements that need to be fulfilled in order to enable the task while flow instances are running", + "items": { + "$ref": "#/components/schemas/EnableRequirement" + } + }, + "assigned_to": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/VariableAssignment" + } + ] + } + }, + "ecp": { + "$ref": "#/components/schemas/ECPDetails" + }, + "installer": { + "$ref": "#/components/schemas/ECPDetails" + }, + "taxonomies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Taxonomy ids that are associated with this workflow and used for filtering" + }, + "phase_id": { + "type": "string" + }, + "task_type": { + "$ref": "#/components/schemas/TaskType" + } + }, + "required": [ + "id", + "name", + "task_type" + ] + }, + "Phase": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "due_date": { + "type": "string", + "example": "2021-04-27T12:00:00.000Z" + }, + "due_date_config": { + "$ref": "#/components/schemas/DueDateConfig" + }, + "assigned_to": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/VariableAssignment" + } + ] + } + }, + "taxonomies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Taxonomy ids that are associated with this workflow and used for filtering" + } + }, + "required": [ + "id", + "name" + ] + }, + "VariableAssignment": { + "type": "object", + "description": "Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution.", + "properties": { + "variable": { + "type": "string", + "description": "The variable expression, e.g., \"{{entity.owner}}\"", + "example": "{{entity.owner}}" + }, + "value": { + "type": "string", + "description": "The resolved value after variable evaluation (populated during execution)", + "example": "user_12345" + } + }, + "required": [ + "variable" + ] + }, + "TaskType": { + "type": "string", + "enum": [ + "MANUAL", + "AUTOMATION", + "DECISION", + "AI_AGENT" + ] + }, + "Edge": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "from_id": { + "type": "string" + }, + "to_id": { + "type": "string" + }, + "condition_id": { + "type": "string" + }, + "none_met": { + "type": "boolean", + "description": "Indicates a default case for a decision task. Only decision task edges can have this field and the flow advances using this edge if no conditions are met." + } + }, + "required": [ + "id", + "from_id", + "to_id" + ] + }, + "Condition": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "branch_name": { + "type": "string", + "description": "The name of the branch", + "maxLength": 255, + "example": "Branch 1" + }, + "logical_operator": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "statements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Statement" + } + } + }, + "required": [ + "id", + "branch_name", + "logical_operator", + "statements" + ] + }, + "Statement": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/EvaluationSource" + }, + "operator": { + "$ref": "#/components/schemas/Operator" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "source", + "operator", + "values" + ] + }, + "EvaluationSource": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the action or trigger" + }, + "origin": { + "type": "string", + "enum": [ + "trigger", + "action" + ] + }, + "origin_type": { + "type": "string", + "enum": [ + "entity", + "workflow", + "journey_block" + ] + }, + "schema": { + "type": "string" + }, + "attribute": { + "type": "string" + }, + "attribute_type": { + "type": "string", + "enum": [ + "string", + "text", + "number", + "boolean", + "date", + "datetime", + "tags", + "country", + "email", + "phone", + "product", + "price", + "status", + "relation", + "multiselect", + "select", + "radio", + "relation_user", + "purpose", + "label", + "message_email_address" + ] + }, + "attribute_repeatable": { + "type": "boolean" + }, + "attribute_operation": { + "enum": [ + "all", + "updated", + "added", + "deleted" + ] + }, + "attribute_sub_field": { + "type": "string", + "description": "For complex attribute types, specifies which sub-field to extract (e.g., 'address', 'name', 'email_type')" + } + } + }, + "Operator": { + "type": "string", + "enum": [ + "equals", + "not_equals", + "any_of", + "none_of", + "contains", + "not_contains", + "starts_with", + "ends_with", + "greater_than", + "less_than", + "greater_than_or_equals", + "less_than_or_equals", + "is_empty", + "is_not_empty" + ] + }, + "DueDateConfig": { + "description": "Set due date for the task based on a dynamic condition", + "type": "object", + "properties": { + "duration": { + "type": "number" + }, + "unit": { + "$ref": "#/components/schemas/TimeUnit" + }, + "type": { + "type": "string", + "enum": [ + "WORKFLOW_STARTED", + "TASK_FINISHED", + "PHASE_FINISHED" + ] + }, + "task_id": { + "type": "string" + }, + "phase_id": { + "type": "string" + } + }, + "required": [ + "duration", + "unit", + "type" + ] + }, + "TimeUnit": { + "type": "string", + "enum": [ + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "EnableRequirement": { + "description": "describe the requirement for a task to be enabled", + "type": "object", + "properties": { + "task_id": { + "type": "string", + "description": "The id of the task that it points to" + }, + "phase_id": { + "type": "string", + "description": "The id of the phase that it points to" + }, + "when": { + "type": "string", + "enum": [ + "TASK_FINISHED", + "PHASE_FINISHED" + ] + } + }, + "required": [ + "when" + ] + }, + "WorkflowDefinition": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creationTime": { + "type": "string", + "description": "ISO String Date & Time", + "example": "2021-04-27T12:01:13.000Z" + }, + "enabled": { + "type": "boolean", + "description": "Whether the workflow is enabled or not", + "default": true + }, + "lastUpdateTime": { + "type": "string", + "description": "ISO String Date & Time", + "example": "2021-04-27T12:01:13.000Z" + }, + "dueDate": { + "type": "string", + "example": "2021-04-27T12:00:00.000Z" + }, + "dynamicDueDate": { + "$ref": "#/components/schemas/DynamicDueDate" + }, + "userIds": { + "type": "array", + "items": { + "type": "number" + }, + "deprecated": true, + "description": "This field is deprecated. Please use assignedTo" + }, + "assignedTo": { + "type": "array", + "items": { + "type": "string" + } + }, + "enableECPWorkflow": { + "type": "boolean", + "description": "Indicates whether this workflow is available for End Customer Portal or not. By default it's not." + }, + "flow": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Section" + }, + { + "$ref": "#/components/schemas/Step" + } + ] + } + }, + "closingReasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClosingReasonId" + } + }, + "updateEntityAttributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateEntityAttributes" + } + }, + "taxonomies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Taxonomy ids that are associated with this workflow and used for filtering" + }, + "singleClosingReasonSelection": { + "type": "boolean", + "description": "Whether only a single closing reason can be selected" + } + }, + "required": [ + "name", + "flow" + ] + }, + "Step": { + "type": "object", + "description": "Action that needs to be done in a Workflow", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "$ref": "#/components/schemas/StepDescription" + }, + "executionType": { + "$ref": "#/components/schemas/StepType" + }, + "automationConfig": { + "type": "object", + "properties": { + "flowId": { + "type": "string", + "description": "Id of the configured automation to run" + } + }, + "required": [ + "flowId" + ] + }, + "journey": { + "$ref": "#/components/schemas/StepJourney" + }, + "order": { + "type": "number" + }, + "dueDate": { + "type": "string", + "example": "2021-04-27T12:00:00.000Z" + }, + "dynamicDueDate": { + "$ref": "#/components/schemas/DynamicDueDate" + }, + "userIds": { + "type": "array", + "items": { + "type": "number" + }, + "deprecated": true, + "description": "This field is deprecated. Please use assignedTo" + }, + "requirements": { + "type": "array", + "description": "requirements that need to be fulfilled in order to enable the step execution", + "items": { + "$ref": "#/components/schemas/StepRequirement" + } + }, + "assignedTo": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "$ref": "#/components/schemas/ItemType" + }, + "ecp": { + "$ref": "#/components/schemas/ECPDetails" + }, + "installer": { + "$ref": "#/components/schemas/ECPDetails" + }, + "taxonomies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Taxonomy ids that are associated with this workflow and used for filtering" + } + }, + "required": [ + "name", + "order", + "type" + ] + }, + "Section": { + "type": "object", + "description": "A group of Steps that define the progress of the Workflow", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "order": { + "type": "number" + }, + "type": { + "$ref": "#/components/schemas/ItemType" + }, + "dueDate": { + "type": "string", + "example": "2021-04-27T12:00:00.000Z" + }, + "dynamicDueDate": { + "$ref": "#/components/schemas/DynamicDueDate" + }, + "assignedTo": { + "type": "array", + "items": { + "type": "string" + } + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Step" + } + }, + "taxonomies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Taxonomy ids that are associated with this workflow and used for filtering" + } + }, + "required": [ + "name", + "order", + "type", + "steps" + ] + }, + "TriggerType": { + "type": "string", + "enum": [ + "MANUAL", + "AUTOMATIC" + ] + }, + "ItemType": { + "type": "string", + "enum": [ + "STEP", + "SECTION" + ] + }, + "StepType": { + "type": "string", + "enum": [ + "MANUAL", + "AUTOMATION" + ] + }, + "StepJourney": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "journeyId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "complete_task_automatically": { + "type": "boolean", + "default": true, + "description": "If true, the task be auto completed when the journey is completed. By default it is true." + } + } + }, + "ECPDetails": { + "type": "object", + "description": "Details regarding ECP for the workflow step", + "properties": { + "enabled": { + "type": "boolean" + }, + "label": { + "type": "string" + }, + "description": { + "type": "string" + }, + "journey": { + "$ref": "#/components/schemas/StepJourney" + } + } + }, + "StepDescription": { + "type": "object", + "description": "Longer information regarding Task", + "properties": { + "enabled": { + "type": "boolean" + }, + "value": { + "type": "string" + } + } + }, + "MaxAllowedLimit": { + "type": "object", + "properties": { + "currentNoOfWorkflows": { + "type": "number" + }, + "maxAllowed": { + "type": "number" + } + } + }, + "DefinitionNotFoundResp": { + "description": "Definition could be not found", + "properties": { + "message": { + "type": "string" + } + } + }, + "ClosingReasonNotFoundResp": { + "description": "Closing reason could be not found", + "properties": { + "message": { + "type": "string" + } + } + }, + "ChangeReasonStatusReq": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/ClosingReasonsStatus" + } + }, + "required": [ + "status" + ] + }, + "ClosingReasons": { + "type": "object", + "properties": { + "reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClosingReason" + } + } + }, + "required": [ + "reasons" + ] + }, + "ClosingReason": { + "type": "object", + "description": "One Closing reason for a workflow", + "required": [ + "title", + "status" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "title": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/ClosingReasonsStatus" + }, + "lastUpdateTime": { + "type": "string", + "readOnly": true + }, + "creationTime": { + "type": "string", + "readOnly": true + } + } + }, + "ClosingReasonsStatus": { + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE" + ] + }, + "ClosingReasonsIds": { + "type": "object", + "properties": { + "reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClosingReasonId" + } + } + }, + "required": [ + "reasons" + ] + }, + "ClosingReasonId": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "x739cew" + } + }, + "required": [ + "id" + ] + }, + "ErrorResp": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "UpdateEntityAttributes": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "workflow_status", + "current_section", + "current_step" + ] + }, + "target": { + "type": "object", + "properties": { + "entitySchema": { + "type": "string", + "example": "opportunity" + }, + "entityAttribute": { + "type": "string", + "example": "my_status" + } + }, + "required": [ + "entitySchema", + "entityAttribute" + ] + } + }, + "required": [ + "source", + "target" + ] + }, + "EntitySync": { + "type": "object", + "properties": { + "trigger": { + "type": "object", + "description": "Trigger configuration that determines when entity sync occurs.\nContains the event type and optional filter to target specific tasks/phases.\n", + "required": [ + "event" + ], + "properties": { + "event": { + "type": "string", + "description": "Event or condition that triggers the entity sync.\nDirect triggers match EventBridge event names (PascalCase).\nStatus triggers are deduced from event + entity status combination.\n", + "enum": [ + "FlowStarted", + "FlowCompleted", + "FlowCancelled", + "FlowReopened", + "FlowDeleted", + "FlowAssigned", + "FlowDueDateChanged", + "FlowContextsChanged", + "TaskUpdated", + "CurrTaskChanged", + "TaskCompleted", + "TaskSkipped", + "TaskMarkedInProgress", + "TaskMarkedOnHold", + "PhaseUpdated", + "PhaseCompleted", + "PhaseSkipped", + "PhaseMarkedInProgress" + ] + }, + "filter": { + "type": "object", + "description": "Optional filter to target specific tasks or phases.\nSpecify either task_template_id OR phase_template_id (mutually exclusive).\nIf omitted, trigger applies to all tasks/phases.\n", + "properties": { + "task_template_id": { + "type": "string", + "description": "Target a specific task by its template ID (stable across executions)" + }, + "phase_template_id": { + "type": "string", + "description": "Target a specific phase by its template ID (stable across executions)" + } + } + } + } + }, + "value": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "workflow_name", + "workflow_status", + "workflow_assigned_to", + "task_name", + "task_status", + "task_assigned_to", + "phase_name", + "phase_status", + "phase_assigned_to", + "custom_value" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "source" + ] + }, + "target": { + "type": "object", + "properties": { + "entitySchema": { + "type": "string", + "example": "opportunity" + }, + "entityAttribute": { + "type": "string", + "example": "title" + } + }, + "required": [ + "entitySchema", + "entityAttribute" + ] + } + }, + "example": { + "trigger": { + "event": "FlowStarted" + }, + "target": { + "entitySchema": "opportunity", + "entityAttribute": "title" + }, + "value": { + "source": "workflow_name" + } + }, + "required": [ + "trigger", + "target", + "value" + ] + }, + "DynamicDueDate": { + "description": "set a Duedate for a step then a specific", + "type": "object", + "properties": { + "numberOfUnits": { + "type": "number" + }, + "timePeriod": { + "$ref": "#/components/schemas/TimeUnit" + }, + "actionTypeCondition": { + "type": "string", + "enum": [ + "WORKFLOW_STARTED", + "STEP_CLOSED", + "PHASE_FINISHED" + ] + }, + "stepId": { + "type": "string" + }, + "phaseId": { + "type": "string" + } + }, + "required": [ + "numberOfUnits", + "timePeriod", + "actionTypeCondition" + ] + }, + "StepRequirement": { + "description": "describe the requirement for step enablement", + "type": "object", + "properties": { + "definitionId": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/ItemType" + }, + "condition": { + "type": "string", + "enum": [ + "CLOSED" + ] + } + }, + "required": [ + "definitionId", + "type", + "condition" + ] + }, + "FlowTemplateExport": { + "allOf": [ + { + "$ref": "#/components/schemas/FlowTemplate" + }, + { + "type": "object", + "properties": { + "_resolved_automations": { + "type": "object", + "description": "Map of automation_id to full AutomationFlow object. Null values indicate automations that could not be resolved.", + "additionalProperties": { + "type": "object" + } + } + } + } + ] + }, + "FlowTemplateImportResult": { + "type": "object", + "properties": { + "flow": { + "$ref": "#/components/schemas/FlowTemplate" + }, + "_id_mappings": { + "type": "object", + "description": "Maps old IDs to new IDs for cross-referencing by callers (e.g. blueprint service)", + "properties": { + "flow_id": { + "type": "object", + "properties": { + "old": { + "type": "string" + }, + "new": { + "type": "string" + } + } + }, + "task_ids": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Map of old_task_id to new_task_id" + }, + "automation_ids": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Map of old_automation_id to new_automation_id" + } + } + } + } + } + } + } +} diff --git a/packages/cli/definitions/workflow.json b/packages/cli/definitions/workflow.json new file mode 100644 index 00000000..1d275204 --- /dev/null +++ b/packages/cli/definitions/workflow.json @@ -0,0 +1,4106 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Workflows Executions", + "version": "1.0.0", + "description": "Service for Workflow Executions which covers executions of processes defined in an Organization\n" + }, + "servers": [ + { + "url": "https://workflows-execution.sls.epilot.io" + } + ], + "tags": [ + { + "name": "Workflow Executions", + "description": "Interact with workflow executions - start / close / retrieve one or all / search / delete" + }, + { + "name": "Workflow Steps" + }, + { + "name": "Closing Reasons" + }, + { + "name": "Flows V2" + } + ], + "security": [ + { + "BearerAuth": [] + } + ], + "paths": { + "/v1/workflows/executions": { + "get": { + "operationId": "getExecutions", + "summary": "getExecutions", + "description": "Retrieve Workflow Executions. Optionally, you can filter them by context & schema. Please be aware, these executions are more light weight - steps are not loaded with all information.", + "tags": [ + "Workflow Executions" + ], + "parameters": [ + { + "in": "query", + "name": "context", + "schema": { + "type": "string" + }, + "required": false, + "description": "Id of an Entity", + "example": "2843c005-c5b0-4df2-94ee-1ca2ddd998ac" + }, + { + "in": "query", + "name": "schema", + "schema": { + "type": "string" + }, + "required": false, + "description": "Schema of an Entity", + "example": "contact" + } + ], + "responses": { + "200": { + "description": "Success - executions loaded with success. Empty array if org has no executions.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowExecutionSlim" + } + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "post": { + "operationId": "createExecution", + "summary": "createExecution", + "description": "Create a Workflow Execution. Start a new workflow execution, based on a workflow definition (template).", + "tags": [ + "Workflow Executions" + ], + "requestBody": { + "description": "Workflow Execution payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowExecutionCreateReq" + } + } + } + }, + "responses": { + "201": { + "description": "Success - if the execution is created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowExecution" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/workflows/executions/{executionId}": { + "get": { + "operationId": "getExecution", + "summary": "getExecution", + "description": "Get a full workflow execution, included steps information, by execution id.", + "tags": [ + "Workflow Executions" + ], + "parameters": [ + { + "in": "path", + "name": "executionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the execution", + "example": "wd561" + } + ], + "responses": { + "200": { + "description": "Success - execution loaded with success. Empty response execution was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowExecution" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "patch": { + "operationId": "updateExecution", + "summary": "updateExecution", + "description": "Patches updates like assignees, status, closingReason for a single Workflow Execution.", + "tags": [ + "Workflow Executions" + ], + "parameters": [ + { + "in": "path", + "name": "executionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the execution", + "example": "wd561" + } + ], + "requestBody": { + "description": "Patch Updates for Workflow Execution payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowExecutionUpdateReq" + } + } + } + }, + "responses": { + "204": { + "description": "Success - execution updated with success." + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteExecution", + "summary": "deleteExecution", + "description": "Delete workflow execution by id. Workflow contexts will NOT be deleted.", + "tags": [ + "Workflow Executions" + ], + "parameters": [ + { + "in": "path", + "name": "executionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the execution to de deleted.", + "example": "CustomerRequest" + } + ], + "responses": { + "204": { + "description": "Success - if the execution was deleted successfully" + }, + "401": { + "description": "Failed to authenticate", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "No execution found" + } + } + } + }, + "/v1/workflows/executions/{executionId}/steps": { + "post": { + "operationId": "createStep", + "summary": "createStep", + "description": "Create a new step in current workflow execution.", + "tags": [ + "Workflow Steps" + ], + "parameters": [ + { + "in": "path", + "name": "executionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the execution", + "example": "wd56125gah" + } + ], + "requestBody": { + "description": "Workflow Execution Step payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateStepReq" + } + } + } + }, + "responses": { + "201": { + "description": "Success - if the step is created with success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Step" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/workflows/executions/{executionId}/steps/{stepId}": { + "patch": { + "operationId": "updateStep", + "summary": "updateStep", + "description": "Patches various changes to a workflow execution step.", + "tags": [ + "Workflow Steps" + ], + "parameters": [ + { + "in": "path", + "name": "executionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the execution", + "example": "wd56125gah" + }, + { + "in": "path", + "name": "stepId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Short uuid (length 6) to identify the Workflow Execution Step.", + "example": "7hj28a" + } + ], + "requestBody": { + "description": "Workflow Execution Step payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStepReq" + }, + "examples": { + "dynamicDueDate": { + "value": { + "stepId": "string", + "assignedTo": [ + "10010730" + ], + "dynamicDueDate": { + "numberOfUnits": 2, + "timePeriod": "weeks", + "actionTypeCondition": "STEP_CLOSED", + "stepId": "optional" + }, + "name": "Static Duedate", + "position": { + "index": 0 + }, + "sectionId": "string", + "status": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Success - if the step is updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Step" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteStep", + "summary": "deleteStep", + "description": "Deletes a step from a workflow execution.", + "tags": [ + "Workflow Steps" + ], + "parameters": [ + { + "in": "path", + "name": "executionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the execution", + "example": "wd56125gah" + }, + { + "in": "path", + "name": "stepId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Short uuid (length 6) to identify the Workflow Execution Step.", + "example": "7hj28a" + } + ], + "responses": { + "204": { + "description": "Deletion happened with success." + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/workflows/executions/search": { + "post": { + "deprecated": true, + "operationId": "searchExecutions", + "summary": "searchExecutions", + "description": "Search Workflow Executions by different filters.", + "tags": [ + "Workflow Executions" + ], + "requestBody": { + "description": "Search steps request", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchExecutionsReq" + } + } + } + }, + "responses": { + "200": { + "description": "Success - filtered steps are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchExecutionsResp" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/workflows/executions/steps/search": { + "post": { + "deprecated": true, + "operationId": "searchSteps", + "summary": "searchSteps", + "description": "Search workflow execution steps by different filters.", + "tags": [ + "Workflow Steps" + ], + "requestBody": { + "description": "Search steps request", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchStepsReq" + } + } + } + }, + "responses": { + "200": { + "description": "Success - filtered steps are returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/SearchStepsResp" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v1/workflows/executions/{executionId}/closing-reasons": { + "get": { + "operationId": "getClosingReasonExecution", + "summary": "getClosingReasonExecution", + "description": "Shows all Closing Reasons defined at the moment of starting the Workflow Execution.\nThe Closing Reasons shown in the execution are just snapshots\nfrom the state of the Definition when the instance was created.\n", + "tags": [ + "Closing Reasons" + ], + "parameters": [ + { + "in": "path", + "name": "executionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the execution", + "example": "wd561" + } + ], + "responses": { + "200": { + "description": "returns all Closing Reasons for this Execution", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClosingReasonResp" + } + } + } + }, + "500": { + "description": "Internal Issues", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/executions": { + "post": { + "operationId": "startFlowExecution", + "summary": "startFlowExecution", + "description": "Starts a new Flow Execution based on a flow template.", + "tags": [ + "Flows V2" + ], + "requestBody": { + "description": "Flow Execution payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartFlowReq" + } + } + } + }, + "responses": { + "201": { + "description": "Success - when the flow execution is started successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowExecution" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/executions/{execution_id}": { + "get": { + "operationId": "getFlowExecution", + "summary": "getFlowExecution", + "description": "Get a full flow execution, included tasks, phases, edges & analytics.", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExecutionIdParam" + } + ], + "responses": { + "200": { + "description": "Success - execution", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowExecution" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + }, + "patch": { + "operationId": "patchFlowExecution", + "summary": "patchFlowExecution", + "description": "Patch flow execution with new assignees, status, analytics & other changes.", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExecutionIdParam" + } + ], + "requestBody": { + "description": "Patch Flow Execution payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchFlowReq" + } + } + } + }, + "responses": { + "200": { + "description": "Success - execution updated with success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowExecution" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteFlowExecution", + "summary": "deleteFlowExecution", + "description": "Deletes a specific execution of a flow, identified by id. Flow contexts will NOT be deleted.", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExecutionIdParam" + }, + { + "$ref": "#/components/parameters/SoftDeleteParam" + } + ], + "responses": { + "204": { + "description": "Success - if the execution was deleted successfully" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/v2/flows/executions:search": { + "post": { + "operationId": "searchFlowExecutions", + "summary": "searchFlowExecutions", + "description": "Search Flow Executions for a specific Entity.", + "tags": [ + "Flows V2" + ], + "requestBody": { + "description": "Search Flow Executions for a specific Entity", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchFlowsReq" + } + } + } + }, + "responses": { + "200": { + "description": "List of Running Flow Executions", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowExecution" + } + } + } + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/executions/{execution_id}/tasks/{task_id}": { + "patch": { + "operationId": "patchTask", + "summary": "patchTask", + "description": "Changes various attributes of a flow task, like assignees, status, due date, etc.", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExecutionIdParam" + }, + { + "$ref": "#/components/parameters/TaskIdParam" + } + ], + "requestBody": { + "description": "Patch Task Payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchTaskReq" + } + } + } + }, + "responses": { + "200": { + "description": "Success - when task has been successfully updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/executions/{execution_id}/tasks/{task_id}/automation:run": { + "post": { + "operationId": "runTaskAutomation", + "summary": "runTaskAutomation", + "description": "Runs configured automation for a flow task", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExecutionIdParam" + }, + { + "$ref": "#/components/parameters/TaskIdParam" + } + ], + "responses": { + "200": { + "description": "Success - when task automation has been successfully started", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationTask" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/executions/{execution_id}/tasks/{task_id}/execute": { + "post": { + "operationId": "executeTask", + "summary": "executeTask", + "description": "Executes any kind of flow task immediately.", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExecutionIdParam" + }, + { + "$ref": "#/components/parameters/TaskIdParam" + } + ], + "responses": { + "200": { + "description": "Success - when task has been executed manually or automation has been started.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/executions/{execution_id}/phases/{phase_id}": { + "patch": { + "operationId": "patchPhase", + "summary": "patchPhase", + "description": "Apply updates to a phase within flow execution", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExecutionIdParam" + }, + { + "$ref": "#/components/parameters/PhaseIdParam" + } + ], + "requestBody": { + "description": "Patch Phase Payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchPhaseReq" + } + } + } + }, + "responses": { + "200": { + "description": "Success - when phase has been successfully updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Phase" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/executions/{execution_id}/tasks": { + "post": { + "operationId": "addTask", + "summary": "addTask", + "description": "Create a new task in current workflow execution.", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExecutionIdParam" + } + ], + "requestBody": { + "description": "Workflow Execution Task payload", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddTaskReq" + } + } + } + }, + "responses": { + "201": { + "description": "Success - if the task is created with success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } + } + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/executions/{execution_id}/tasks/{task_id}/schedule": { + "delete": { + "operationId": "cancelTaskSchedule", + "summary": "cancelTaskSchedule", + "description": "Cancels a scheduled task, deleting the schedule and marking the task as skipped.", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExecutionIdParam" + }, + { + "$ref": "#/components/parameters/TaskIdParam" + } + ], + "responses": { + "204": { + "description": "Success - when schedule has been successfully canceled" + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + }, + "/v2/flows/executions/{execution_id}/schedules/{schedule_id}": { + "post": { + "operationId": "cancelSchedule", + "summary": "cancelSchedule", + "deprecated": true, + "description": "Cancels a flow schedule, marking it as canceled.\n\n**Deprecated**: Use DELETE /v2/flows/executions/{execution_id}/tasks/{task_id}/schedule instead.\n", + "tags": [ + "Flows V2" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExecutionIdParam" + }, + { + "$ref": "#/components/parameters/ScheduleIdParam" + } + ], + "responses": { + "204": { + "description": "Success - when schedule has been successfully canceled" + }, + "400": { + "description": "Validation Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "401": { + "description": "Authentication Errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + }, + "500": { + "description": "Other errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResp" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "BearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + }, + "parameters": { + "ExecutionIdParam": { + "in": "path", + "name": "execution_id", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the execution", + "example": "wd561" + }, + "TaskIdParam": { + "in": "path", + "name": "task_id", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the task", + "example": "7hj28a" + }, + "PhaseIdParam": { + "in": "path", + "name": "phase_id", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the phase", + "example": "9gjs2952j" + }, + "ScheduleIdParam": { + "in": "path", + "name": "schedule_id", + "schema": { + "type": "string" + }, + "required": true, + "description": "Id of the schedule", + "example": "sch_8k2m9n4p" + }, + "SoftDeleteParam": { + "in": "query", + "name": "soft", + "schema": { + "type": "boolean", + "default": false + }, + "required": false, + "description": "If true, the execution will NOT be deleted permanently, but rather kept for archive purpose.", + "example": true + } + }, + "schemas": { + "WorkflowExecutionCreateReq": { + "type": "object", + "properties": { + "workflowId": { + "type": "string" + }, + "trigger": { + "$ref": "#/components/schemas/TriggerType" + }, + "assignedTo": { + "deprecated": true, + "type": "array", + "items": { + "type": "string" + } + }, + "contexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowContext" + } + }, + "purposes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of purposes to filter workflow phases." + } + }, + "required": [ + "workflowId" + ], + "example": { + "workflowId": "j3f23fh23uif98", + "trigger": "AUTOMATIC", + "contexts": [ + { + "id": "3fa3fa86-0907-4642-a57e-0fe30a19874d", + "schema": "contact" + }, + { + "id": "3a6d42fa-5070-4723-b90f-41ead4303e33", + "schema": "opportunity" + } + ] + } + }, + "WorkflowExecutionUpdateReq": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/WorkflowStatus" + }, + "assignedTo": { + "type": "array", + "items": { + "type": "string" + } + }, + "selectedClosingReasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClosingReason" + } + }, + "closingReasonDescription": { + "type": "string" + }, + "dueDate": { + "type": "string" + }, + "dynamicDueDate": { + "$ref": "#/components/schemas/DynamicDueDate" + }, + "closedBy": { + "type": "string", + "description": "id of the user / partner user who is closing the workflow. For partner pass orgId_userId." + }, + "contexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowContext" + } + }, + "completedTime": { + "type": "string", + "description": "Completed time of the workflow execution" + } + } + }, + "ClosingReason": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "id", + "title" + ] + }, + "WorkflowContext": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "schema": { + "type": "string" + } + }, + "required": [ + "id", + "title", + "schema" + ] + }, + "WorkflowExecutionBase": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "definitionId": { + "type": "string" + }, + "orgId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "creationTime": { + "type": "string", + "description": "Creation timestamp which will double as started time as well" + }, + "lastUpdateTime": { + "type": "string", + "description": "Last Update timestamp" + }, + "dueDate": { + "type": "string", + "description": "Due date for finishing the workflow" + }, + "completedTime": { + "type": "string", + "description": "Completed time of the workflow execution" + }, + "dynamicDueDate": { + "$ref": "#/components/schemas/DynamicDueDate" + }, + "status": { + "$ref": "#/components/schemas/WorkflowStatus" + }, + "trigger": { + "$ref": "#/components/schemas/TriggerType" + }, + "assignedTo": { + "type": "array", + "items": { + "type": "string" + } + }, + "lastModifiedBy": { + "type": "string", + "description": "Id of the user who closed workflow" + }, + "contexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowContext" + } + }, + "nextOpenStep": { + "$ref": "#/components/schemas/StepId" + }, + "configuredClosingReasonSnapshot": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClosingReason" + } + }, + "selectedClosingReasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClosingReason" + } + }, + "closingReasonDescription": { + "type": "string" + }, + "enableECPWorkflow": { + "type": "boolean", + "description": "Indicates whether this workflow is available for End Customer Portal or not. By default it's not." + }, + "updateEntityAttributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateEntityAttributes" + } + }, + "version": { + "type": "integer", + "description": "Version of the workflow execution." + }, + "taxonomies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Taxonomy ids (both Labels and Purposes) that are associated with this workflow and used for filtering" + }, + "singleClosingReasonSelection": { + "type": "boolean", + "description": "Indicates whether only a single closing reason can be selected when closing the workflow execution" + } + } + }, + "WorkflowExecutionSlim": { + "allOf": [ + { + "$ref": "#/components/schemas/WorkflowExecutionBase" + }, + { + "$ref": "#/components/schemas/FlowSlim" + } + ], + "example": { + "id": "8gja72h6kas6h", + "name": "Lead Qualification", + "trigger": "MANUAL", + "status": "STARTED", + "creationTime": "2021-04-27T12:01:13.000Z", + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:01:13.000Z", + "flow": [ + { + "id": "sectionId1", + "definitionId": "section_definition_id_1", + "name": "Initial Information Gathering", + "type": "SECTION", + "steps": [ + { + "id": "sada5641f3a21", + "definitionId": "step_definition_id_1", + "name": "Call client" + }, + { + "id": "sada5641f3a22", + "definitionId": "step_definition_id_2", + "name": "Check product availability" + }, + { + "id": "sada5641f3a23", + "definitionId": "step_definition_id_3", + "name": "Send email confirming contact with the client" + } + ] + }, + { + "id": "firstLevelStepId1", + "definitionId": "step_definition_id_4", + "name": "Print and send catalog", + "type": "STEP" + } + ] + } + }, + "FlowSlim": { + "type": "object", + "properties": { + "flow": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Section" + }, + { + "$ref": "#/components/schemas/Step" + } + ] + } + } + }, + "required": [ + "flow" + ] + }, + "Flow": { + "type": "object", + "properties": { + "flow": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Section" + }, + { + "$ref": "#/components/schemas/Step" + } + ] + } + } + }, + "required": [ + "flow" + ] + }, + "WorkflowExecution": { + "allOf": [ + { + "$ref": "#/components/schemas/WorkflowExecutionBase" + }, + { + "$ref": "#/components/schemas/Flow" + } + ], + "example": { + "id": "8gja72h6kas6h", + "name": "Lead Qualification", + "trigger": "MANUAL", + "status": "STARTED", + "creationTime": "2021-04-27T12:01:13.000Z", + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:01:13.000Z", + "assignedTo": [ + "252", + "29052" + ], + "flow": [ + { + "id": "sectionId1", + "name": "Initial Information Gathering", + "steps": [ + { + "id": "sada5641f3a21", + "name": "Call client and confirm address and product", + "definitionId": "step_definition_id_1", + "status": "ASSIGNED", + "assignedTo": [ + "11" + ] + }, + { + "id": "sada5641f3a22", + "name": "Check product availability", + "status": "UNASSIGNED", + "definitionId": "step_definition_id_2" + }, + { + "id": "sada5641f3a23", + "name": "Send email confirming contact with the client", + "definitionId": "step_definition_id_3", + "status": "SKIPPED" + } + ] + }, + { + "id": "firstLevelStepId1", + "definitionId": "step_definition_id_4", + "name": "Print and send catalog", + "status": "SKIPPED", + "dueDate": "2023-01-15T20:00:00" + } + ] + } + }, + "WorkflowStatus": { + "type": "string", + "enum": [ + "STARTED", + "DONE", + "CLOSED" + ] + }, + "SectionSimplified": { + "type": "object", + "description": "A group of Steps that define the progress of the Workflow", + "properties": { + "id": { + "type": "string" + }, + "definitionId": { + "type": "string" + }, + "name": { + "type": "string", + "description": "Name for this Section", + "example": "Lead Qualification" + }, + "type": { + "$ref": "#/components/schemas/ItemType" + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StepSimplified" + } + }, + "assignedTo": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "type", + "steps" + ] + }, + "Section": { + "type": "object", + "description": "A group of Steps that define the progress of the Workflow", + "properties": { + "id": { + "type": "string" + }, + "definitionId": { + "type": "string" + }, + "name": { + "type": "string", + "description": "Name for this Section", + "example": "Lead Qualification" + }, + "userIds": { + "type": "array", + "items": { + "type": "number" + }, + "deprecated": true, + "description": "This field is deprecated. Please use assignedTo" + }, + "assignedTo": { + "type": "array", + "items": { + "type": "string" + } + }, + "dueDate": { + "type": "string", + "example": "2021-04-27T12:00:00.000Z" + }, + "dynamicDueDate": { + "$ref": "#/components/schemas/DynamicDueDate" + }, + "startedTime": { + "type": "string" + }, + "completedTime": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/SectionStatus" + }, + "type": { + "$ref": "#/components/schemas/ItemType" + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Step" + } + }, + "taxonomies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Taxonomy ids (purposes in this case) that are associated with this section and used for filtering" + } + }, + "required": [ + "id", + "name", + "type", + "steps" + ] + }, + "StepId": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "entityRefId": { + "type": "string", + "deprecated": true, + "description": "This field is deprecated. It will be soon removed. Please use only id." + } + } + }, + "StepSimplified": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "definitionId": { + "type": "string" + }, + "entityRefId": { + "type": "string", + "deprecated": true, + "description": "This field is deprecated. It will be soon removed. Please use only id." + }, + "name": { + "type": "string" + }, + "description": { + "$ref": "#/components/schemas/StepDescription" + }, + "type": { + "$ref": "#/components/schemas/ItemType" + }, + "ecp": { + "$ref": "#/components/schemas/ECPDetails" + }, + "installer": { + "$ref": "#/components/schemas/ECPDetails" + }, + "enabled": { + "type": "boolean" + }, + "requirements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StepRequirement" + } + }, + "executionType": { + "description": "Manual / Automation step", + "$ref": "#/components/schemas/StepType" + } + }, + "required": [ + "id", + "name", + "type" + ] + }, + "Step": { + "allOf": [ + { + "$ref": "#/components/schemas/StepSimplified" + }, + { + "type": "object", + "properties": { + "sectionId": { + "type": "string" + }, + "executionId": { + "type": "string" + }, + "userIds": { + "type": "array", + "items": { + "type": "number" + }, + "deprecated": true, + "description": "This field is deprecated. Please use assignedTo" + }, + "assignedTo": { + "type": "array", + "items": { + "type": "string" + } + }, + "assignedToInProgress": { + "description": "The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task", + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/StepStatus" + }, + "created": { + "type": "string" + }, + "lastUpdated": { + "type": "string" + }, + "statusLastUpdated": { + "type": "string", + "description": "Last updated timestamp of the status" + }, + "startedTime": { + "type": "string" + }, + "completedTime": { + "type": "string" + }, + "dueDate": { + "type": "string" + }, + "dynamicDueDate": { + "$ref": "#/components/schemas/DynamicDueDate" + }, + "manuallyCreated": { + "type": "boolean" + }, + "enabled": { + "type": "boolean", + "description": "enabled flag results from calculating the requirements" + }, + "automationConfig": { + "description": "Configuration for automated steps", + "$ref": "#/components/schemas/AutomationConfig" + }, + "journey": { + "$ref": "#/components/schemas/StepJourney" + }, + "taxonomies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Taxonomy ids (purposes in this case) that are associated with this step/task and used for filtering" + } + } + } + ] + }, + "StepExtended": { + "allOf": [ + { + "$ref": "#/components/schemas/Step" + }, + { + "type": "object", + "properties": { + "executionId": { + "type": "string" + }, + "executionName": { + "type": "string" + }, + "executionStatus": { + "$ref": "#/components/schemas/WorkflowStatus" + }, + "contexts": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/WorkflowContext" + } + ] + } + } + }, + "required": [ + "executionId", + "executionName", + "executionStatus" + ] + } + ] + }, + "StepStatus": { + "type": "string", + "enum": [ + "UNASSIGNED", + "ASSIGNED", + "COMPLETED", + "SKIPPED", + "IN_PROGRESS", + "SCHEDULED", + "PENDING", + "CONDITION_PENDING", + "WAITING_FOR_CONFIRMATION", + "ON_HOLD", + "FAILED" + ], + "description": "**Note**: \"UNASSIGNED\" and \"ASSIGNED\" are deprecated and will be removed in a future version. Please use \"PENDING\" instead. Status values for workflow execution steps/tasks:\n- **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)\n- **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)\n- **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution\n- **IN_PROGRESS**: Step/Task is currently being worked on by a user\n- **COMPLETED**: Step/Task has been finished successfully\n- **SKIPPED**: Step/Task was intentionally bypassed and will not be executed\n- **SCHEDULED**: Task is scheduled to run at a specific time in the future\n- **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed\n- **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.\n- **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed\n- **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.\n" + }, + "SectionStatus": { + "type": "string", + "enum": [ + "OPEN", + "IN_PROGRESS", + "COMPLETED" + ] + }, + "StepType": { + "type": "string", + "enum": [ + "MANUAL", + "AUTOMATION" + ] + }, + "StepJourney": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "journeyId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "complete_task_automatically": { + "type": "boolean", + "description": "If true, the task be auto completed when the journey is completed" + } + } + }, + "AutomationConfig": { + "type": "object", + "description": "Configuration for automation execution to run", + "properties": { + "flowId": { + "type": "string", + "description": "Id of the configured automation to run" + }, + "executionId": { + "type": "string", + "description": "Id of the automation execution which ran" + }, + "executionStatus": { + "type": "string", + "description": "Status of Automation Execution. Types can be found in Automation API" + } + }, + "required": [ + "flowId" + ] + }, + "ECPDetails": { + "type": "object", + "description": "Details regarding ECP for the workflow step", + "properties": { + "enabled": { + "type": "boolean" + }, + "label": { + "type": "string" + }, + "description": { + "type": "string" + }, + "journey": { + "$ref": "#/components/schemas/StepJourney" + } + } + }, + "StepDescription": { + "type": "object", + "description": "Longer information regarding Task", + "properties": { + "enabled": { + "type": "boolean" + }, + "value": { + "type": "string" + } + } + }, + "ItemType": { + "type": "string", + "enum": [ + "STEP", + "SECTION" + ] + }, + "TriggerType": { + "type": "string", + "enum": [ + "MANUAL", + "AUTOMATIC" + ] + }, + "CreateStepReq": { + "type": "object", + "properties": { + "insertionIndex": { + "type": "number", + "default": 0 + }, + "name": { + "type": "string" + }, + "description": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "value": { + "type": "string" + } + }, + "required": [ + "enabled", + "value" + ], + "description": "Longer information regarding Task" + }, + "status": { + "$ref": "#/components/schemas/StepStatus" + }, + "sectionId": { + "type": "string" + }, + "executionType": { + "description": "Manual / Automation step", + "$ref": "#/components/schemas/StepType" + }, + "automationConfig": { + "description": "Configuration for automated steps", + "$ref": "#/components/schemas/AutomationConfig" + } + }, + "required": [ + "name", + "insertionIndex" + ] + }, + "UpdateStepReq": { + "type": "object", + "properties": { + "stepId": { + "type": "string" + }, + "entityRefId": { + "type": "string", + "deprecated": true, + "description": "This field is deprecated. Please use stepId" + }, + "userIds": { + "type": "array", + "items": { + "type": "number" + }, + "deprecated": true, + "description": "This field is deprecated. Please use assignedTo" + }, + "assignedTo": { + "type": "array", + "items": { + "type": "string" + } + }, + "assignedToInProgress": { + "description": "The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task", + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/StepStatus" + }, + "dueDate": { + "type": "string" + }, + "dynamicDueDate": { + "$ref": "#/components/schemas/DynamicDueDate" + }, + "name": { + "type": "string" + }, + "description": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "value": { + "type": "string" + } + }, + "required": [ + "enabled", + "value" + ], + "description": "Longer information regarding Task" + }, + "position": { + "$ref": "#/components/schemas/StepPositionAt" + }, + "automationConfig": { + "$ref": "#/components/schemas/AutomationConfig" + }, + "startedTime": { + "type": "string" + }, + "completedTime": { + "type": "string" + } + } + }, + "StepPositionAt": { + "type": "object", + "properties": { + "index": { + "type": "number", + "default": 0 + }, + "sectionId": { + "type": "string" + } + }, + "required": [ + "index" + ] + }, + "UpdateStepResp": { + "allOf": [ + { + "$ref": "#/components/schemas/Step" + } + ] + }, + "SearchStepsResp": { + "type": "object", + "properties": { + "hits": { + "type": "number", + "example": 50 + }, + "results": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/StepExtended" + } + ] + } + } + } + }, + "SearchExecutionsReq": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/WorkflowStatus" + }, + "includeDoneWorkflows": { + "type": "boolean" + }, + "assignedTo": { + "type": "string" + }, + "sorting": { + "$ref": "#/components/schemas/SearchSorting" + }, + "pagination": { + "$ref": "#/components/schemas/ExecutionPaginationDynamo" + } + } + }, + "SearchExecutionsResp": { + "type": "object", + "properties": { + "executions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowExecutionSlim" + } + }, + "lastEvaluatedKey": { + "$ref": "#/components/schemas/LastEvaluatedKey" + } + }, + "required": [ + "executions" + ] + }, + "LastEvaluatedKey": { + "type": "object", + "properties": { + "orgId": { + "type": "string" + }, + "creationTime": { + "type": "string" + } + } + }, + "SearchStepsReq": { + "type": "object", + "properties": { + "executionName": { + "type": "string" + }, + "stepName": { + "type": "string" + }, + "assignedTo": { + "type": "number" + }, + "includeDoneWorkflows": { + "type": "boolean" + }, + "manuallyCreated": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "OPEN", + "COMPLETE", + "NEXT_OPEN_ITEM_IN_WORKFLOW" + ] + }, + "sorting": { + "$ref": "#/components/schemas/SearchSorting" + }, + "pagination": { + "$ref": "#/components/schemas/SearchPagination" + } + } + }, + "SearchSorting": { + "type": "string", + "enum": [ + "A_Z", + "Z_A", + "DUE_DATE_ASC", + "DUE_DATE_DESC", + "TRIGGER_DATE_ASC", + "TRIGGER_DATE_DESC" + ] + }, + "SearchPagination": { + "type": "object", + "properties": { + "from": { + "type": "number" + }, + "size": { + "type": "number" + } + } + }, + "ExecutionPaginationDynamo": { + "type": "object", + "properties": { + "orgId": { + "type": "string" + }, + "creationTime": { + "type": "string" + } + } + }, + "ErrorResp": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "ClosingReasonResp": { + "type": "object", + "properties": { + "reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClosingReason" + } + } + } + }, + "PhaseInEntity": { + "type": "object", + "properties": { + "phase_id": { + "type": "string" + }, + "phase_name": { + "type": "string" + }, + "phase_progress": { + "type": "number" + }, + "phase_assignees": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "WorkflowInEntity": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "definition_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/WorkflowStatus" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "duedate": { + "type": "string", + "format": "date-time" + }, + "last_update_time": { + "type": "string", + "format": "date-time" + }, + "progress": { + "type": "number" + }, + "upcoming_tasks_assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "task_id": { + "type": "string" + }, + "task_name": { + "type": "string" + }, + "task_assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "task_duedate": { + "type": "string", + "format": "date-time" + }, + "task_execution_type": { + "$ref": "#/components/schemas/StepType" + }, + "task_status": { + "$ref": "#/components/schemas/StepStatus" + }, + "phase_id": { + "type": "string" + }, + "phase_name": { + "type": "string" + }, + "phase_assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "phase_progress": { + "type": "number" + }, + "phases_in_progress": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhaseInEntity" + } + }, + "selected_closing_reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClosingReason" + } + }, + "closing_reason_description": { + "type": "string" + } + } + }, + "UpdateEntityAttributes": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "workflow_status", + "current_section", + "current_step" + ] + }, + "target": { + "type": "object", + "properties": { + "entitySchema": { + "type": "string", + "example": "opportunity" + }, + "entityAttribute": { + "type": "string", + "example": "my_status" + } + }, + "required": [ + "entitySchema", + "entityAttribute" + ] + } + }, + "required": [ + "source", + "target" + ] + }, + "EntitySync": { + "type": "object", + "properties": { + "trigger": { + "type": "object", + "description": "Trigger configuration that determines when entity sync occurs.\nContains the event type and optional filter to target specific tasks/phases.\n", + "required": [ + "event" + ], + "properties": { + "event": { + "type": "string", + "description": "Event or condition that triggers the entity sync.\nDirect triggers match EventBridge event names (PascalCase).\nStatus triggers are deduced from event + entity status combination.\n", + "enum": [ + "FlowStarted", + "FlowCompleted", + "FlowCancelled", + "FlowReopened", + "FlowDeleted", + "FlowAssigned", + "FlowDueDateChanged", + "FlowContextsChanged", + "TaskUpdated", + "CurrTaskChanged", + "TaskCompleted", + "TaskSkipped", + "TaskMarkedInProgress", + "TaskMarkedOnHold", + "PhaseUpdated", + "PhaseCompleted", + "PhaseSkipped", + "PhaseMarkedInProgress" + ] + }, + "filter": { + "type": "object", + "description": "Optional filter to target specific tasks or phases.\nSpecify either task_template_id OR phase_template_id (mutually exclusive).\nIf omitted, trigger applies to all tasks/phases.\n", + "properties": { + "task_template_id": { + "type": "string", + "description": "Target a specific task by its template ID (stable across executions)" + }, + "phase_template_id": { + "type": "string", + "description": "Target a specific phase by its template ID (stable across executions)" + } + } + } + } + }, + "value": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "workflow_name", + "workflow_status", + "workflow_assigned_to", + "task_name", + "task_status", + "task_assigned_to", + "phase_name", + "phase_status", + "phase_assigned_to", + "custom_value" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "source" + ] + }, + "target": { + "type": "object", + "properties": { + "entitySchema": { + "type": "string", + "example": "opportunity" + }, + "entityAttribute": { + "type": "string", + "example": "title" + } + }, + "required": [ + "entitySchema", + "entityAttribute" + ] + } + }, + "example": { + "trigger": { + "event": "FlowStarted" + }, + "target": { + "entitySchema": "opportunity", + "entityAttribute": "title" + }, + "value": { + "source": "workflow_name" + } + }, + "required": [ + "trigger", + "target", + "value" + ] + }, + "DynamicDueDate": { + "description": "set a Duedate for a step then a specific", + "type": "object", + "properties": { + "numberOfUnits": { + "type": "number" + }, + "timePeriod": { + "type": "string", + "enum": [ + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "actionTypeCondition": { + "type": "string", + "enum": [ + "WORKFLOW_STARTED", + "STEP_CLOSED", + "PHASE_FINISHED" + ] + }, + "stepId": { + "type": "string" + }, + "phaseId": { + "type": "string" + } + }, + "required": [ + "numberOfUnits", + "timePeriod", + "actionType" + ] + }, + "StepRequirement": { + "description": "describe the requirement for step enablement", + "type": "object", + "properties": { + "definitionId": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/ItemType" + }, + "condition": { + "type": "string", + "enum": [ + "CLOSED" + ] + } + }, + "required": [ + "definitionId", + "type", + "condition" + ] + }, + "StartFlowReq": { + "type": "object", + "required": [ + "flow_template_id", + "contexts" + ], + "properties": { + "flow_template_id": { + "type": "string" + }, + "trigger": { + "$ref": "#/components/schemas/FlowTrigger" + }, + "contexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowContext" + } + }, + "purposes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of purposes to filter workflow phases." + } + } + }, + "SearchFlowsReq": { + "type": "object", + "properties": { + "entity_id": { + "type": "string" + }, + "entity_schema": { + "type": "string" + } + }, + "required": [ + "entity_id", + "entity_schema" + ] + }, + "PatchFlowReq": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/WorkflowStatus" + }, + "assigned_to": { + "$ref": "#/components/schemas/Assignees" + }, + "closing_reason": { + "$ref": "#/components/schemas/FlowClosingReason" + }, + "due_date": { + "type": "string" + }, + "due_date_config": { + "$ref": "#/components/schemas/DueDateConfig" + }, + "contexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowContext" + } + } + } + }, + "FlowExecution": { + "type": "object", + "required": [ + "id", + "flow_template_id", + "org_id", + "name", + "created_at", + "updated_at", + "analytics", + "status", + "trigger", + "contexts", + "crt_tasks", + "tasks", + "edges" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/FlowExecutionId" + }, + "flow_template_id": { + "$ref": "#/components/schemas/FlowTemplateId" + }, + "org_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "created_at": { + "type": "string", + "description": "Creation timestamp which will double as started time as well" + }, + "updated_at": { + "type": "string", + "description": "Last Update timestamp" + }, + "due_date": { + "type": "string", + "description": "Due date for finishing the workflow" + }, + "due_date_config": { + "$ref": "#/components/schemas/DueDateConfig" + }, + "status": { + "$ref": "#/components/schemas/WorkflowStatus" + }, + "assigned_to": { + "$ref": "#/components/schemas/Assignees" + }, + "analytics": { + "type": "object", + "properties": { + "started_at": { + "type": "string", + "description": "Timestamp when the flow execution started" + }, + "completed_at": { + "type": "string", + "description": "Timestamp when the flow execution was completed" + }, + "closed_at": { + "type": "string", + "description": "Timestamp when the flow execution was closed" + }, + "started_by": { + "type": "string", + "description": "User who started the flow execution." + }, + "closed_by": { + "type": "string", + "description": "User who closed the flow execution" + } + } + }, + "contexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowContext" + } + }, + "crt_tasks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/TaskId" + } + } + } + }, + "phases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Phase" + } + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task" + } + }, + "edges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } + }, + "_execution_chain": { + "type": "object", + "description": "[Internal] Tracks the chain of automation-originated executions to prevent infinite loops. This is an internal property and should not be used by external consumers.", + "properties": { + "parent_execution_id": { + "type": "string", + "description": "ID of the parent flow execution that triggered this execution via automation" + }, + "parent_task_id": { + "type": "string", + "description": "ID of the automation task in the parent execution that triggered this" + }, + "depth": { + "type": "integer", + "description": "The depth in the execution chain (0 for manual triggers, 1+ for automation-triggered)", + "default": 0, + "minimum": 0, + "maximum": 10 + } + } + }, + "closing_reason": { + "$ref": "#/components/schemas/FlowClosingReason" + }, + "available_in_ecp": { + "type": "boolean", + "description": "Indicates whether this flow execution is available for End Customer Portal or not. By default it's not." + }, + "entity_sync": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySync" + } + }, + "taxonomies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Taxonomy ids (both Labels and Purposes) that are associated with this workflow and used for filtering" + }, + "trigger": { + "$ref": "#/components/schemas/FlowTrigger" + }, + "singleClosingReasonSelection": { + "type": "boolean", + "description": "Indicates whether only a single closing reason can be selected when closing the flow execution" + } + } + }, + "FlowClosingReason": { + "type": "object", + "properties": { + "selected_reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClosingReason" + } + }, + "configured_reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClosingReason" + } + }, + "extra_description": { + "type": "string" + } + } + }, + "FlowTrigger": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/TriggerType" + }, + "automation_config": { + "$ref": "#/components/schemas/AutomationInfo" + } + } + }, + "FlowContext": { + "anyOf": [ + { + "$ref": "#/components/schemas/EntityRef" + } + ] + }, + "EntityRef": { + "type": "object", + "properties": { + "entity_id": { + "type": "string" + }, + "entity_schema": { + "type": "string" + }, + "is_primary": { + "type": "boolean", + "description": "Flag to indicate if the entity is primary and should be used for evaluating the conditions of the tasks", + "default": false + } + } + }, + "PhaseId": { + "type": "string" + }, + "TaskId": { + "type": "string" + }, + "Task": { + "oneOf": [ + { + "$ref": "#/components/schemas/ManualTask" + }, + { + "$ref": "#/components/schemas/AutomationTask" + }, + { + "$ref": "#/components/schemas/DecisionTask" + }, + { + "$ref": "#/components/schemas/AiAgentTask" + } + ] + }, + "TaskType": { + "type": "string", + "enum": [ + "MANUAL", + "AUTOMATION", + "DECISION", + "AI_AGENT" + ] + }, + "ManualTask": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskBase" + }, + { + "type": "object", + "properties": { + "loop_config": { + "$ref": "#/components/schemas/LoopInfo" + } + } + } + ] + }, + "AutomationTask": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskBase" + }, + { + "type": "object", + "required": [ + "automation_config" + ], + "properties": { + "automation_config": { + "$ref": "#/components/schemas/AutomationInfo" + }, + "automation_execution_id": { + "type": "string", + "description": "ID of the automation execution, used for tracking status updates." + }, + "trigger_mode": { + "$ref": "#/components/schemas/TriggerMode" + }, + "schedule": { + "$ref": "#/components/schemas/ActionSchedule" + }, + "loop_config": { + "$ref": "#/components/schemas/LoopInfo" + } + } + } + ] + }, + "LoopInfo": { + "type": "object", + "description": "Information about loop iterations, when task is part of a loop branch", + "properties": { + "max_iterations": { + "type": "integer", + "description": "Maximum number of iterations for the loop branch", + "default": 3, + "minimum": 1, + "maximum": 10 + }, + "crt_iterations": { + "type": "integer", + "description": "Current number of iterations for the loop branch", + "default": 0 + } + }, + "required": [ + "max_iterations" + ] + }, + "LoopConfig": { + "type": "object", + "properties": { + "loop_branch_id": { + "type": "string", + "description": "The id of the branch that will be looped" + }, + "exit_branch_id": { + "type": "string", + "description": "The id of the branch that will be used to exit the loop" + }, + "max_iterations": { + "type": "integer", + "description": "Maximum number of iterations for the loop branch", + "default": 3, + "minimum": 1, + "maximum": 10 + }, + "crt_iterations": { + "type": "integer", + "description": "Current number of iterations for the loop branch", + "default": 0 + } + }, + "required": [ + "loop_branch_id", + "exit_branch_id", + "max_iterations" + ] + }, + "TriggerMode": { + "type": "string", + "enum": [ + "manual", + "automatic" + ] + }, + "ActionSchedule": { + "anyOf": [ + { + "$ref": "#/components/schemas/ImmediateSchedule" + }, + { + "$ref": "#/components/schemas/DelayedSchedule" + }, + { + "$ref": "#/components/schemas/RelativeSchedule" + } + ] + }, + "ImmediateSchedule": { + "type": "object", + "properties": { + "mode": { + "enum": [ + "immediate" + ] + } + }, + "required": [ + "mode" + ] + }, + "DelayedSchedule": { + "type": "object", + "required": [ + "mode", + "duration", + "unit" + ], + "properties": { + "mode": { + "enum": [ + "delayed" + ] + }, + "duration": { + "type": "number" + }, + "unit": { + "$ref": "#/components/schemas/TimeUnit" + }, + "schedule_id": { + "type": "string", + "description": "The id of the created schedule" + } + } + }, + "RelativeSchedule": { + "type": "object", + "properties": { + "mode": { + "enum": [ + "relative" + ] + }, + "direction": { + "type": "string", + "enum": [ + "before", + "after" + ] + }, + "duration": { + "type": "number" + }, + "unit": { + "$ref": "#/components/schemas/TimeUnit" + }, + "reference": { + "type": "object", + "required": [ + "id", + "origin" + ], + "properties": { + "id": { + "type": "string", + "description": "The id of the entity / workflow / task, based on the origin of the schedule. For all_preceding_tasks_completed, use the sentinel value 'all_preceding_tasks_completed'." + }, + "origin": { + "type": "string", + "enum": [ + "flow_started", + "task_completed", + "trigger_entity_attribute", + "all_preceding_tasks_completed" + ] + }, + "schema": { + "type": "string", + "description": "The schema of the entity" + }, + "attribute": { + "type": "string", + "description": "An entity attribute that identifies a date / datetime" + } + } + }, + "schedule_id": { + "type": "string", + "description": "The id of the created schedule" + } + }, + "required": [ + "mode", + "direction", + "duration", + "unit", + "reference" + ] + }, + "DecisionTask": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskBase" + }, + { + "type": "object", + "properties": { + "trigger_mode": { + "$ref": "#/components/schemas/TriggerMode" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + "schedule": { + "anyOf": [ + { + "$ref": "#/components/schemas/DelayedSchedule" + }, + { + "$ref": "#/components/schemas/RelativeSchedule" + } + ] + }, + "loop_config": { + "$ref": "#/components/schemas/LoopConfig" + } + }, + "required": [ + "trigger_mode", + "conditions" + ] + } + ] + }, + "AiAgentTask": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskBase" + }, + { + "type": "object", + "properties": { + "agent_config": { + "$ref": "#/components/schemas/AgentConfig" + }, + "loop_config": { + "$ref": "#/components/schemas/LoopInfo" + }, + "agent_execution": { + "$ref": "#/components/schemas/AgentExecutionInfo" + }, + "agent_execution_id": { + "type": "string", + "description": "ID of the agent execution, used for tracking status updates. This is needed as a separate field to allow indexing." + } + } + } + ] + }, + "AgentConfig": { + "type": "object", + "description": "Configuration for AI Agent to run", + "required": [ + "agent_id" + ], + "properties": { + "agent_id": { + "type": "string", + "description": "Id of the configured AI Agent to run" + }, + "parameters": { + "type": "object", + "description": "Parameters to customize the AI Agent behavior" + } + }, + "additionalProperties": true + }, + "AgentExecutionInfo": { + "type": "object", + "properties": { + "execution_id": { + "type": "string", + "description": "Id of the agent execution started by this task" + }, + "execution_status": { + "type": "string", + "description": "Status of the agent execution, when it already ran" + }, + "error_reason": { + "type": "string" + } + } + }, + "TaskBase": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/TaskId" + }, + "template_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "$ref": "#/components/schemas/StepDescription" + }, + "status": { + "$ref": "#/components/schemas/StepStatus" + }, + "journey": { + "$ref": "#/components/schemas/StepJourney" + }, + "due_date": { + "type": "string", + "example": "2021-04-27T12:00:00.000Z" + }, + "due_date_config": { + "$ref": "#/components/schemas/DueDateConfig" + }, + "requirements": { + "type": "array", + "description": "requirements that need to be fulfilled in order to enable the task while flow instances are running", + "items": { + "$ref": "#/components/schemas/EnableRequirement" + } + }, + "assigned_to": { + "$ref": "#/components/schemas/Assignees" + }, + "analytics": { + "$ref": "#/components/schemas/AnalyticsInfo" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Time when the task was created" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Last Update timestamp" + }, + "manually_created": { + "type": "boolean", + "description": "Flag to indicate if the task was created manually" + }, + "enabled": { + "type": "boolean", + "description": "enabled flag results from calculating the requirements" + }, + "ecp": { + "$ref": "#/components/schemas/ECPDetails" + }, + "installer": { + "$ref": "#/components/schemas/ECPDetails" + }, + "taxonomies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Taxonomy ids that are associated with this workflow and used for filtering" + }, + "phase_id": { + "type": "string" + }, + "task_type": { + "$ref": "#/components/schemas/TaskType" + } + }, + "required": [ + "id", + "template_id", + "name", + "task_type", + "status", + "analytics", + "enabled" + ] + }, + "Phase": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/PhaseId" + }, + "template_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/SectionStatus" + }, + "updated_at": { + "type": "string", + "description": "Last Update timestamp" + }, + "due_date": { + "type": "string", + "example": "2021-04-27T12:00:00.000Z" + }, + "due_date_config": { + "$ref": "#/components/schemas/DueDateConfig" + }, + "assigned_to": { + "$ref": "#/components/schemas/Assignees" + }, + "analytics": { + "$ref": "#/components/schemas/AnalyticsInfo" + }, + "taxonomies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Taxonomy ids that are associated with this workflow and used for filtering" + }, + "loop_config": { + "$ref": "#/components/schemas/LoopInfo" + } + }, + "required": [ + "id", + "template_id", + "name" + ] + }, + "Edge": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "from_id": { + "$ref": "#/components/schemas/TaskId" + }, + "to_id": { + "$ref": "#/components/schemas/TaskId" + }, + "condition_id": { + "$ref": "#/components/schemas/ConditionId" + }, + "none_met": { + "type": "boolean", + "description": "Indicates a default case for a decision task. Only decision task edges can have this field and the flow advances using this edge if no conditions are met." + } + }, + "required": [ + "id", + "from_id", + "to_id" + ] + }, + "AutomationInfo": { + "type": "object", + "properties": { + "flow_id": { + "type": "string", + "description": "Id of the automation that should be run by this task" + }, + "execution_id": { + "type": "string", + "description": "Id of the automation execution, when it already ran" + }, + "execution_status": { + "type": "string", + "description": "Status of the automation execution, when it already ran" + }, + "error_reason": { + "type": "string" + } + }, + "required": [ + "flow_id" + ] + }, + "AnalyticsInfo": { + "type": "object", + "properties": { + "started_at": { + "type": "string", + "format": "date-time" + }, + "in_progress_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "status_updated_at": { + "type": "string", + "format": "date-time", + "description": "Last updated timestamp of the status" + }, + "in_progress_by": { + "$ref": "#/components/schemas/UserId", + "description": "The user which moved the task/phase to IN_PROGRESS state." + }, + "completed_by": { + "$ref": "#/components/schemas/UserId", + "description": "The user which moved the task/phase to COMPLETED state." + }, + "skipped_by": { + "$ref": "#/components/schemas/UserId", + "description": "The user which moved the task/phase to SKIPPED state." + } + } + }, + "ConditionId": { + "description": "A locally unique identifier for the condition", + "type": "string", + "example": "abc123" + }, + "Condition": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/ConditionId" + }, + "branch_name": { + "type": "string", + "description": "The name of the branch", + "maxLength": 255, + "example": "Branch 1" + }, + "logical_operator": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "statements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Statement" + } + }, + "evaluated_at": { + "type": "string", + "format": "date-time", + "description": "Time when the condition was evaluated" + }, + "is_met": { + "type": "boolean", + "description": "The result of evaluating this condition - true / false" + } + }, + "required": [ + "id", + "branch_name", + "logical_operator", + "statements" + ] + }, + "Statement": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/EvaluationSource" + }, + "operator": { + "$ref": "#/components/schemas/Operator" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "source", + "operator", + "values" + ] + }, + "EvaluationSource": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the action or trigger" + }, + "origin": { + "type": "string", + "enum": [ + "trigger", + "action" + ] + }, + "origin_type": { + "type": "string", + "enum": [ + "entity", + "workflow", + "journey_block" + ] + }, + "schema": { + "type": "string" + }, + "attribute": { + "type": "string" + }, + "attribute_type": { + "type": "string", + "enum": [ + "string", + "text", + "number", + "boolean", + "date", + "datetime", + "tags", + "country", + "email", + "phone", + "product", + "price", + "status", + "relation", + "multiselect", + "select", + "radio", + "relation_user", + "purpose", + "label", + "message_email_address" + ] + }, + "attribute_repeatable": { + "type": "boolean" + }, + "attribute_operation": { + "enum": [ + "all", + "updated", + "added", + "deleted" + ] + }, + "attribute_sub_field": { + "type": "string", + "description": "For complex attribute types, specifies which sub-field to extract (e.g., 'address', 'name', 'email_type')" + } + } + }, + "Operator": { + "type": "string", + "enum": [ + "equals", + "not_equals", + "any_of", + "none_of", + "contains", + "not_contains", + "starts_with", + "ends_with", + "greater_than", + "less_than", + "greater_than_or_equals", + "less_than_or_equals", + "is_empty", + "is_not_empty" + ] + }, + "DueDateConfig": { + "description": "Set due date for the task based on a dynamic condition", + "type": "object", + "properties": { + "duration": { + "type": "number" + }, + "unit": { + "$ref": "#/components/schemas/TimeUnit" + }, + "type": { + "type": "string", + "enum": [ + "WORKFLOW_STARTED", + "TASK_FINISHED", + "PHASE_FINISHED", + "A_PRECEDING_TASK_COMPLETED", + "ALL_PRECEDING_TASKS_COMPLETED" + ] + }, + "task_id": { + "type": "string" + }, + "phase_id": { + "type": "string" + } + }, + "required": [ + "duration", + "unit", + "type" + ] + }, + "TimeUnit": { + "type": "string", + "enum": [ + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "EnableRequirement": { + "description": "describe the requirement for a task to be enabled", + "type": "object", + "properties": { + "task_id": { + "type": "string", + "description": "The template_id of the task that this requirement points to" + }, + "phase_id": { + "type": "string", + "description": "The template_id of the phase that this requirement points to" + }, + "when": { + "type": "string", + "enum": [ + "TASK_FINISHED", + "PHASE_FINISHED" + ] + } + }, + "required": [ + "when" + ] + }, + "FlowTemplateId": { + "type": "string" + }, + "FlowExecutionId": { + "type": "string" + }, + "UserId": { + "type": "string", + "description": "The user id" + }, + "VariableAssignment": { + "type": "object", + "description": "Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution.", + "properties": { + "variable": { + "type": "string", + "description": "The variable expression, e.g., \"{{entity.owner}}\"", + "example": "{{entity.owner}}" + }, + "value": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The resolved values after variable evaluation (populated during execution)", + "example": [ + "user_12345" + ] + } + }, + "required": [ + "variable" + ] + }, + "Assignees": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/VariableAssignment" + } + ] + }, + "description": "The user ids or variable assignments" + }, + "PatchTaskReq": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/StepStatus" + }, + "due_date": { + "type": "string", + "example": "2021-04-27T12:00:00.000Z" + }, + "due_date_config": { + "$ref": "#/components/schemas/DueDateConfig" + }, + "assigned_to": { + "$ref": "#/components/schemas/Assignees" + }, + "enabled": { + "type": "boolean", + "description": "flag for controlling enabled/disabled state of the task" + }, + "automation_config": { + "$ref": "#/components/schemas/AutomationInfo" + }, + "description": { + "$ref": "#/components/schemas/StepDescription" + }, + "ecp": { + "$ref": "#/components/schemas/ECPDetails" + }, + "installer": { + "$ref": "#/components/schemas/ECPDetails" + }, + "next_condition_id": { + "type": "string", + "description": "Condition to evaluate as true for a decision task with a manual trigger mode" + }, + "revert_execution": { + "type": "boolean", + "description": "When patching an already completed/skipped task that comes before the current task, this flag controls whether to revert the execution:\n- `true`: The patched task becomes the current task AND all succeeding tasks are reset to PENDING (full revert)\n- `false` or omitted (undefined): The task is updated but the current task does not change and no downstream tasks are affected\nThis parameter is silently ignored when patching the current task or future tasks.\n", + "default": false + } + } + }, + "PatchPhaseReq": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "due_date": { + "type": "string", + "example": "2021-04-27T12:00:00.000Z" + }, + "due_date_config": { + "$ref": "#/components/schemas/DueDateConfig" + }, + "assigned_to": { + "$ref": "#/components/schemas/Assignees" + } + } + }, + "AddTaskReq": { + "type": "object", + "properties": { + "previous_task_id": { + "type": "string", + "description": "Source node id for the edge to this task", + "format": "uuid" + }, + "next_task_id": { + "type": "string", + "description": "Target node id for the edge from this task", + "format": "uuid" + }, + "task": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the task", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/StepStatus" + }, + "due_date": { + "type": "string", + "example": "2021-04-27T12:00:00.000Z" + }, + "due_date_config": { + "$ref": "#/components/schemas/DueDateConfig" + }, + "assigned_to": { + "$ref": "#/components/schemas/Assignees" + }, + "enabled": { + "type": "boolean", + "description": "flag for controlling enabled/disabled state of the task" + }, + "automation_config": { + "$ref": "#/components/schemas/AutomationInfo" + }, + "phase_id": { + "type": "string" + }, + "task_type": { + "$ref": "#/components/schemas/TaskType" + } + }, + "required": [ + "name" + ] + } + }, + "required": [ + "previous_task_id", + "next_task_id", + "task" + ] + } + } + } +} diff --git a/packages/cli/docs/access-token.md b/packages/cli/docs/access-token.md new file mode 100644 index 00000000..eceaab16 --- /dev/null +++ b/packages/cli/docs/access-token.md @@ -0,0 +1,444 @@ +# Access Token API + +- **Base URL:** `https://access-token.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/access-token](https://docs.epilot.io/api/access-token) + +Generate Access Tokens for 3rd party applications that need access to epilot APIs. + +## Quick Start + +```bash +# List available operations +epilot access-token + +# Call an operation +epilot access-token listAccessTokens +``` + +## Operations + +**Access Tokens** +- [`listAccessTokens`](#listaccesstokens) — Lists all Access Tokens for current user (by default excludes system generated tokens) +- [`createAccessToken`](#createaccesstoken) — **Access Token type: `API`** (default if not specified): +- [`revokeAccessToken`](#revokeaccesstoken) — Revokes an Access Token so it can't be used anymore. + +**Public** +- [`getAccessTokenJwks`](#getaccesstokenjwks) — Get jwks public key set to verify access tokens generated by this API +- [`getAccessTokenOIDC`](#getaccesstokenoidc) — OpenID Connect configuration for Access Token API as identity provider +- [`getPublicTokenJwks`](#getpublictokenjwks) — Get jwks public key set to verify public tokens generated by this API +- [`getPublicTokenOIDC`](#getpublictokenoidc) — OpenID Connect configuration for Access Token API a a public identity provider + +### `listAccessTokens` + +Lists all Access Tokens for current user (by default excludes system generated tokens) + +`GET /v1/access-tokens` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `token_type` | query | "api" \| "journey" \| "portal" \| "assume" \| "app"[] | No | Filter by token types | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot access-token listAccessTokens +``` + +With JSONata filter: + +```bash +epilot access-token listAccessTokens --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "api_5ZugdRXasLfWBypHi93Fk", + "created_at": "1970-01-01T00:00:00.000Z", + "name": "Postman Access Token", + "token_type": "api", + "journey_id": "string", + "portal_id": "string", + "assignments": ["123:owner"], + "last_used": "2026-02-24" + } +] +``` + +
+ +--- + +### `createAccessToken` + +**Access Token type: `API`** (default if not specified): + +`POST /v1/access-tokens` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot access-token createAccessToken \ + -d '{"name":"Postman Access Token","token_type":"api","assignments":["123:owner"],"expires_in":3600}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot access-token createAccessToken +``` + +With JSONata filter: + +```bash +epilot access-token createAccessToken --jsonata '$' +``` + +
+Sample Response + +```json +{ + "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6Ikp...", + "id": "api_5ZugdRXasLfWBypHi93Fk", + "created_at": "1970-01-01T00:00:00.000Z", + "name": "Postman Access Token", + "token_type": "api", + "journey_id": "string", + "portal_id": "string", + "assignments": ["123:owner"], + "last_used": "2026-02-24" +} +``` + +
+ +--- + +### `revokeAccessToken` + +Revokes an Access Token so it can't be used anymore. + +`DELETE /v1/access-tokens/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot access-token revokeAccessToken \ + -p id=api_5ZugdRXasLfWBypHi93Fk +``` + +Using positional args for path parameters: + +```bash +epilot access-token revokeAccessToken api_5ZugdRXasLfWBypHi93Fk +``` + +With JSONata filter: + +```bash +epilot access-token revokeAccessToken -p id=api_5ZugdRXasLfWBypHi93Fk --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "api_5ZugdRXasLfWBypHi93Fk", + "created_at": "1970-01-01T00:00:00.000Z", + "name": "Postman Access Token", + "token_type": "api", + "journey_id": "string", + "portal_id": "string", + "assignments": ["123:owner"], + "last_used": "2026-02-24" +} +``` + +
+ +--- + +### `getAccessTokenJwks` + +Get jwks public key set to verify access tokens generated by this API + +`GET /v1/access-tokens/.well-known/jwks.json` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot access-token getAccessTokenJwks +``` + +With JSONata filter: + +```bash +epilot access-token getAccessTokenJwks --jsonata 'keys' +``` + +
+Sample Response + +```json +{ + "keys": [ + { + "alg": "RS256", + "e": "AQAB", + "kid": "tXWU5mPMbRPczpbQwi6vbhLF4GgF3wlMDSyqo7pfeiw=", + "kty": "RSA", + "n": "h_QDoCjZ8W_trtYXaP7_S22wf5r5Wd9XBLED78oT44bJjQXn8ddcFV8Hik65_4IYXVX_hTTU4zpxe3H8vx2j7-Zz3O59mYMp5S0MzODNEdf5Y_2o19eis0brmAJniixsNlQ9LlYkdrVamrgaxHu3ZpP_99zkfFybYeuYoQNzb3PyrT8xVnz_USs_nlFMHpGUxvvz7gfKPqxcLvgLJr4cwI9yzaSY9CD4qW181QVcnL_WzpQ8xx6AuhhHZQ1l_3GG4InTk8ahE7U2ZHVu8RrX6d01pMgc3piEcet9RgFLnhbTg3YIiKGoAbN42wJn_x3lgIAC42T9mbmTsHyUdS6nUQ", + "use": "sig" + } + ] +} +``` + +
+ +--- + +### `getAccessTokenOIDC` + +OpenID Connect configuration for Access Token API as identity provider + +`GET /v1/access-tokens/.well-known/openid-configuration` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot access-token getAccessTokenOIDC +``` + +With JSONata filter: + +```bash +epilot access-token getAccessTokenOIDC --jsonata 'issuer' +``` + +
+Sample Response + +```json +{ + "issuer": "https://access-token.sls.epilot.io/v1/access-tokens", + "jwks_uri": "https://access-token.sls.epilot.io/v1/access-tokens/.well-known/jwks.json" +} +``` + +
+ +--- + +### `getPublicTokenJwks` + +Get jwks public key set to verify public tokens generated by this API + +`GET /v1/access-tokens/public/.well-known/jwks.json` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot access-token getPublicTokenJwks +``` + +With JSONata filter: + +```bash +epilot access-token getPublicTokenJwks --jsonata 'keys' +``` + +
+Sample Response + +```json +{ + "keys": [ + { + "alg": "RS256", + "e": "AQAB", + "kid": "tXWU5mPMbRPczpbQwi6vbhLF4GgF3wlMDSyqo7pfeiw=", + "kty": "RSA", + "n": "h_QDoCjZ8W_trtYXaP7_S22wf5r5Wd9XBLED78oT44bJjQXn8ddcFV8Hik65_4IYXVX_hTTU4zpxe3H8vx2j7-Zz3O59mYMp5S0MzODNEdf5Y_2o19eis0brmAJniixsNlQ9LlYkdrVamrgaxHu3ZpP_99zkfFybYeuYoQNzb3PyrT8xVnz_USs_nlFMHpGUxvvz7gfKPqxcLvgLJr4cwI9yzaSY9CD4qW181QVcnL_WzpQ8xx6AuhhHZQ1l_3GG4InTk8ahE7U2ZHVu8RrX6d01pMgc3piEcet9RgFLnhbTg3YIiKGoAbN42wJn_x3lgIAC42T9mbmTsHyUdS6nUQ", + "use": "sig" + } + ] +} +``` + +
+ +--- + +### `getPublicTokenOIDC` + +OpenID Connect configuration for Access Token API a a public identity provider + +`GET /v1/access-tokens/public/.well-known/openid-configuration` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot access-token getPublicTokenOIDC +``` + +With JSONata filter: + +```bash +epilot access-token getPublicTokenOIDC --jsonata 'issuer' +``` + +
+Sample Response + +```json +{ + "issuer": "https://access-token.sls.epilot.io/v1/access-tokens", + "jwks_uri": "https://access-token.sls.epilot.io/v1/access-tokens/.well-known/jwks.json" +} +``` + +
+ +--- diff --git a/packages/cli/docs/address-suggestions.md b/packages/cli/docs/address-suggestions.md new file mode 100644 index 00000000..4716fef1 --- /dev/null +++ b/packages/cli/docs/address-suggestions.md @@ -0,0 +1,219 @@ +# Address Suggestions API + +- **Base URL:** `https://address-suggestions-api.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/address-suggestions](https://docs.epilot.io/api/address-suggestions) + +## Quick Start + +```bash +# List available operations +epilot address-suggestions + +# Call an operation +epilot address-suggestions getAddresses -p X-Epilot-Org-ID=739224 +``` + +## Operations + +**Addresses API** +- [`getAddresses`](#getaddresses) — Get address suggestions for the given file id +- [`checkAvailability`](#checkavailability) — Check the availability of a given address within multiple files +- [`validateAddressesFile`](#validateaddressesfile) — Validates an addresses file, it returns an array of errors if the file is invalid + +### `getAddresses` + +Get address suggestions for the given file id + +`GET /v1/public/suggestions` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `X-Epilot-Org-ID` | header | string | Yes | The target Organization Id represented by the caller | +| `s3FileUrl` | query | string | No | file s3 reference | +| `fileId` | query | string | No | file id to get suggestions from | +| `countryCodeSearchTerm` | query | string | No | country code search term | +| `postalCodeSearchTerm` | query | string | No | postal code search term | +| `streetSearchTerm` | query | string | No | street search term | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot address-suggestions getAddresses \ + -p X-Epilot-Org-ID=739224 +``` + +With JSONata filter: + +```bash +epilot address-suggestions getAddresses -p X-Epilot-Org-ID=739224 --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "country": "string", + "postal_code": "string", + "city": "string", + "street": "string", + "street_number": "string" + } +] +``` + +
+ +--- + +### `checkAvailability` + +Check the availability of a given address within multiple files + +`GET /v1/public/availability:check` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `X-Epilot-Org-ID` | header | string | Yes | The target Organization Id represented by the caller | +| `files` | query | string | Yes | file ids to check, comma separated | +| `countryCode` | query | string | Yes | country code | +| `postalCode` | query | string | Yes | postal code | +| `street` | query | string | No | street | +| `streetNumber` | query | string | No | street number | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot address-suggestions checkAvailability \ + -p X-Epilot-Org-ID=739224 \ + -p files=example \ + -p countryCode=de \ + -p postalCode=50667 +``` + +With JSONata filter: + +```bash +epilot address-suggestions checkAvailability -p X-Epilot-Org-ID=739224 -p files=example -p countryCode=de -p postalCode=50667 --jsonata 'fileId' +``` + +
+Sample Response + +```json +{ + "fileId": "4e7b7d95-ced6-4f5f-9326-0c61f30dcadb" +} +``` + +
+ +--- + +### `validateAddressesFile` + +Validates an addresses file, it returns an array of errors if the file is invalid + +`GET /v1/addresses-files:validate` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `fileId` | query | string | No | file id to validate | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot address-suggestions validateAddressesFile +``` + +With JSONata filter: + +```bash +epilot address-suggestions validateAddressesFile --jsonata 'status' +``` + +
+Sample Response + +```json +{ + "status": "success", + "rules_parsed_count": 0, + "errors": [ + { + "line": 0, + "msg": "string", + "data": "string" + } + ] +} +``` + +
+ +--- + +## Deprecated Operations + +- ~~`validateAddresses`~~ GET `/v1/suggestions:validate` diff --git a/packages/cli/docs/address.md b/packages/cli/docs/address.md new file mode 100644 index 00000000..294598e7 --- /dev/null +++ b/packages/cli/docs/address.md @@ -0,0 +1,228 @@ +# Address API + +- **Base URL:** `https://address.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/address](https://docs.epilot.io/api/address) + +API for address based operations on the Epilot platform + +## Quick Start + +```bash +# List available operations +epilot address + +# Call an operation +epilot address getAddressSuggestions -p fileRef=https://epilot-dev-user-content.s3.eu-central-1.amazonaws.com/739224/0a3639af-d4c3-4f96-bfc1-9dcbafdfaa42/availability-file-template%2520(13).csv +``` + +## Operations + +**Address Suggestion** +- [`getAddressSuggestions`](#getaddresssuggestions) — Get address suggestions for the given Availability File + +**Availability** +- [`availabilityCheck`](#availabilitycheck) — Check for Entities that contain a matching availability range in related availability files. +- [`validateAvailabilityFile`](#validateavailabilityfile) — Validates an already uploaded availability file, it returns an array of errors if any errors are found in the file. + +### `getAddressSuggestions` + +Get address suggestions for the given Availability File + +`GET /v1/public/suggestions` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `fileRef` | query | string (uri) | Yes | Reference to the File URL | +| `countryCodeSearchTerm` | query | string | No | Country code search term | +| `postalCodeSearchTerm` | query | string (postal-code) | No | Postal code search term | +| `streetSearchTerm` | query | string (street-address) | No | street search term | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot address getAddressSuggestions \ + -p fileRef=https://epilot-dev-user-content.s3.eu-central-1.amazonaws.com/739224/0a3639af-d4c3-4f96-bfc1-9dcbafdfaa42/availability-file-template%2520(13).csv +``` + +With JSONata filter: + +```bash +epilot address getAddressSuggestions -p fileRef=https://epilot-dev-user-content.s3.eu-central-1.amazonaws.com/739224/0a3639af-d4c3-4f96-bfc1-9dcbafdfaa42/availability-file-template%2520(13).csv --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "country": "st", + "postal_code": "string", + "city": "string", + "street": "string", + "street_number": "string" + } +] +``` + +
+ +--- + +### `availabilityCheck` + +Check for Entities that contain a matching availability range in related availability files. + +`POST /v1/public/availability` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot address availabilityCheck \ + -d '{}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot address availabilityCheck +``` + +With JSONata filter: + +```bash +epilot address availabilityCheck --jsonata 'available_entities' +``` + +
+Sample Response + +```json +{ + "available_entities": [], + "check_results": [ + { + "entity_id": "72c803b2-2e5d-4bd6-bffc-fad998bbbe36", + "matching_hits": 0 + }, + { + "entity_id": "72c803b2-2e5d-4bd6-bffc-fad998bbbe37", + "matching_hits": 0 + } + ] +} +``` + +
+ +--- + +### `validateAvailabilityFile` + +Validates an already uploaded availability file, it returns an array of errors if any errors are found in the file. + +`GET /v1/availability/{id}/validate` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Entity ID of the File Entity with the Availability File. The accepted formats are `.csv` and `.xlsx`. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot address validateAvailabilityFile \ + -p id=72c803b2-2e5d-4bd6-bffc-fad998bbbe36 +``` + +Using positional args for path parameters: + +```bash +epilot address validateAvailabilityFile 72c803b2-2e5d-4bd6-bffc-fad998bbbe36 +``` + +With JSONata filter: + +```bash +epilot address validateAvailabilityFile -p id=72c803b2-2e5d-4bd6-bffc-fad998bbbe36 --jsonata 'status' +``` + +
+Sample Response + +```json +{ + "status": "success", + "rules_parsed_count": 0, + "errors": [ + { + "line": 0, + "message": "string", + "data": "string" + } + ] +} +``` + +
+ +--- diff --git a/packages/cli/docs/ai-agents.md b/packages/cli/docs/ai-agents.md new file mode 100644 index 00000000..1d580270 --- /dev/null +++ b/packages/cli/docs/ai-agents.md @@ -0,0 +1,1306 @@ +# AI Agents API - OpenAPI 3.0 + +- **Base URL:** `https://ai-agents.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/ai-agents](https://docs.epilot.io/api/ai-agents) + +API for configuring and invoking AI agents in epilot platform + +## Quick Start + +```bash +# List available operations +epilot ai-agents + +# Call an operation +epilot ai-agents listAgents +``` + +## Operations + +**Agents Configuration** +- [`listAgents`](#listagents) — Lists agents from both system skills and custom agents. +- [`createAgent`](#createagent) — Creates a new custom agent. System skills cannot be created via this endpoint. +- [`getAgentById`](#getagentbyid) — Retrieves an agent by ID. Supports both: +- [`updateAgentById`](#updateagentbyid) — Updates a custom agent. System skills cannot be updated via this endpoint. +- [`deleteAgentById`](#deleteagentbyid) — Deletes a custom agent. System skills cannot be deleted via this endpoint. + +**Agent Execution** +- [`executeAgent`](#executeagent) — Executes an agent (system skill or custom agent). +- [`listExecutions`](#listexecutions) — GET /v1/executions +- [`getExecution`](#getexecution) — GET /v1/executions/{execution_id} +- [`cancelExecution`](#cancelexecution) — DELETE /v1/executions/{execution_id} +- [`getExecutionTrace`](#getexecutiontrace) — Returns the step-by-step reasoning and tool calls for ReAct mode executions. Returns empty iterations array for direct m +- [`approveExecution`](#approveexecution) — Approves a pending tool action when execution is in waiting_approval status +- [`rejectExecution`](#rejectexecution) — Rejects a pending tool action when execution is in waiting_approval status + +### `listAgents` + +Lists agents from both system skills and custom agents. + +`GET /v1/agents` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `source` | query | "system" \| "custom" | No | Filter by agent source (system = pre-built skills, custom = user-created) | +| `availability` | query | "flows" \| "copilot" \| "all" | No | Filter by availability context (flows, copilot) | +| `entity_schema` | query | string | No | Filter by allowed entity schema (e.g., "message" for email-related skills) | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot ai-agents listAgents +``` + +With JSONata filter: + +```bash +epilot ai-agents listAgents --jsonata 'agents' +``` + +
+Sample Response + +```json +{ + "agents": [ + { + "agent_id": "skill:email-categorizer", + "org_id": "string", + "name": "string", + "description": "string", + "category": "message", + "icon": "string", + "source": "system", + "availability": ["flows", "copilot"], + "allowed_entity_schemas": ["message"], + "system_prompt": "string", + "tools": ["string"], + "model_config": { + "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0", + "temperature": 0.7, + "max_tokens": 4096 + }, + "max_iterations": 0, + "execution_pattern": "direct", + "execution_mode": "automatic", + "output_schema": {}, + "input_parameters_schema": { + "type": "object", + "parameters": [ + { + "name": "target_schema", + "label": "Target Schema", + "type": "entity-schema", + "description": "Entity type to create" + }, + { + "name": "confidence_threshold", + "label": "Confidence Threshold", + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 0.8 + } + ], + "required": ["target_schema"] + }, + "version": 0, + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": "string" + } + ], + "next_cursor": "string" +} +``` + +
+ +--- + +### `createAgent` + +Creates a new custom agent. System skills cannot be created via this endpoint. + +`POST /v1/agents` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot ai-agents createAgent +``` + +With request body: + +```bash +epilot ai-agents createAgent \ + -d '{ + "name": "Email Reply Generator", + "description": "string", + "category": "message", + "icon": "mail-reply", + "system_prompt": "string", + "tools": ["entity.search", "message.draft"], + "model_config": { + "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0", + "temperature": 0.7, + "max_tokens": 4096 + }, + "max_iterations": 10, + "execution_pattern": "direct", + "execution_mode": "automatic", + "output_schema": {}, + "input_parameters_schema": { + "type": "object", + "parameters": [ + { + "name": "target_schema", + "label": "Target Schema", + "type": "entity-schema", + "description": "Entity type to create" + }, + { + "name": "confidence_threshold", + "label": "Confidence Threshold", + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 0.8 + } + ], + "required": ["target_schema"] + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot ai-agents createAgent +``` + +With JSONata filter: + +```bash +epilot ai-agents createAgent --jsonata 'agent_id' +``` + +
+Sample Response + +```json +{ + "agent_id": "skill:email-categorizer", + "org_id": "string", + "name": "string", + "description": "string", + "category": "message", + "icon": "string", + "source": "system", + "availability": ["flows", "copilot"], + "allowed_entity_schemas": ["message"], + "system_prompt": "string", + "tools": ["string"], + "model_config": { + "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0", + "temperature": 0.7, + "max_tokens": 4096 + }, + "max_iterations": 0, + "execution_pattern": "direct", + "execution_mode": "automatic", + "output_schema": {}, + "input_parameters_schema": { + "type": "object", + "parameters": [ + { + "name": "target_schema", + "label": "Target Schema", + "type": "entity-schema", + "description": "Entity type to create" + }, + { + "name": "confidence_threshold", + "label": "Confidence Threshold", + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 0.8 + } + ], + "required": ["target_schema"] + }, + "version": 0, + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": "string" +} +``` + +
+ +--- + +### `getAgentById` + +Retrieves an agent by ID. Supports both: + +`GET /v1/agents/{agent_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `agent_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot ai-agents getAgentById \ + -p agent_id=skill:email-categorizer +``` + +Using positional args for path parameters: + +```bash +epilot ai-agents getAgentById skill:email-categorizer +``` + +With JSONata filter: + +```bash +epilot ai-agents getAgentById -p agent_id=skill:email-categorizer --jsonata 'agent_id' +``` + +
+Sample Response + +```json +{ + "agent_id": "skill:email-categorizer", + "org_id": "string", + "name": "string", + "description": "string", + "category": "message", + "icon": "string", + "source": "system", + "availability": ["flows", "copilot"], + "allowed_entity_schemas": ["message"], + "system_prompt": "string", + "tools": ["string"], + "model_config": { + "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0", + "temperature": 0.7, + "max_tokens": 4096 + }, + "max_iterations": 0, + "execution_pattern": "direct", + "execution_mode": "automatic", + "output_schema": {}, + "input_parameters_schema": { + "type": "object", + "parameters": [ + { + "name": "target_schema", + "label": "Target Schema", + "type": "entity-schema", + "description": "Entity type to create" + }, + { + "name": "confidence_threshold", + "label": "Confidence Threshold", + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 0.8 + } + ], + "required": ["target_schema"] + }, + "version": 0, + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": "string" +} +``` + +
+ +--- + +### `updateAgentById` + +Updates a custom agent. System skills cannot be updated via this endpoint. + +`PUT /v1/agents/{agent_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `agent_id` | path | string | Yes | | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot ai-agents updateAgentById \ + -p agent_id=skill:email-categorizer +``` + +With request body: + +```bash +epilot ai-agents updateAgentById \ + -p agent_id=skill:email-categorizer \ + -d '{ + "name": "string", + "description": "string", + "category": "message", + "icon": "string", + "system_prompt": "string", + "tools": ["string"], + "model_config": { + "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0", + "temperature": 0.7, + "max_tokens": 4096 + }, + "max_iterations": 1, + "execution_pattern": "direct", + "execution_mode": "automatic", + "output_schema": {}, + "input_parameters_schema": { + "type": "object", + "parameters": [ + { + "name": "target_schema", + "label": "Target Schema", + "type": "entity-schema", + "description": "Entity type to create" + }, + { + "name": "confidence_threshold", + "label": "Confidence Threshold", + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 0.8 + } + ], + "required": ["target_schema"] + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot ai-agents updateAgentById skill:email-categorizer +``` + +Using stdin pipe: + +```bash +cat body.json | epilot ai-agents updateAgentById -p agent_id=skill:email-categorizer +``` + +With JSONata filter: + +```bash +epilot ai-agents updateAgentById -p agent_id=skill:email-categorizer --jsonata 'agent_id' +``` + +
+Sample Response + +```json +{ + "agent_id": "skill:email-categorizer", + "org_id": "string", + "name": "string", + "description": "string", + "category": "message", + "icon": "string", + "source": "system", + "availability": ["flows", "copilot"], + "allowed_entity_schemas": ["message"], + "system_prompt": "string", + "tools": ["string"], + "model_config": { + "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0", + "temperature": 0.7, + "max_tokens": 4096 + }, + "max_iterations": 0, + "execution_pattern": "direct", + "execution_mode": "automatic", + "output_schema": {}, + "input_parameters_schema": { + "type": "object", + "parameters": [ + { + "name": "target_schema", + "label": "Target Schema", + "type": "entity-schema", + "description": "Entity type to create" + }, + { + "name": "confidence_threshold", + "label": "Confidence Threshold", + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 0.8 + } + ], + "required": ["target_schema"] + }, + "version": 0, + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": "string" +} +``` + +
+ +--- + +### `deleteAgentById` + +Deletes a custom agent. System skills cannot be deleted via this endpoint. + +`DELETE /v1/agents/{agent_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `agent_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot ai-agents deleteAgentById \ + -p agent_id=skill:email-categorizer +``` + +Using positional args for path parameters: + +```bash +epilot ai-agents deleteAgentById skill:email-categorizer +``` + +With JSONata filter: + +```bash +epilot ai-agents deleteAgentById -p agent_id=skill:email-categorizer --jsonata '$' +``` + +--- + +### `executeAgent` + +Executes an agent (system skill or custom agent). + +`POST /v1/agents/{agent_id}/execute` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `agent_id` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot ai-agents executeAgent \ + -p agent_id=skill:email-categorizer +``` + +With request body: + +```bash +epilot ai-agents executeAgent \ + -p agent_id=skill:email-categorizer \ + -d '{ + "input": { + "entity_id": "string", + "entity_schema": "string", + "workflow_id": "string", + "workflow_execution_id": "string", + "task_id": "string", + "custom_data": {}, + "flow_context": [ + { + "entity_id": "string", + "entity_schema": "string" + } + ] + }, + "parameters": {}, + "execution_mode_override": "automatic", + "execution_context": "flows", + "callback_url": "https://example.com/path", + "timeout_ms": 30000 +}' +``` + +Using positional args for path parameters: + +```bash +epilot ai-agents executeAgent skill:email-categorizer +``` + +Using stdin pipe: + +```bash +cat body.json | epilot ai-agents executeAgent -p agent_id=skill:email-categorizer +``` + +With JSONata filter: + +```bash +epilot ai-agents executeAgent -p agent_id=skill:email-categorizer --jsonata 'execution_id' +``` + +
+Sample Response + +```json +{ + "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "agent_id": "skill:email-categorizer", + "agent_source": "system", + "agent_name": "string", + "execution_context": "flows", + "org_id": "string", + "status": "pending", + "input": {}, + "parameters": {}, + "result": { + "response": "string", + "structured_output": {} + }, + "error": { + "code": "TIMEOUT", + "message": "string", + "details": {} + }, + "pending_action": { + "tool": "string", + "input": {}, + "description": "string", + "preview": { + "action": {}, + "source": {}, + "target": {}, + "changes": [], + "metadata": {}, + "summary": "This email discusses solar panel installation and should be handled by the Service team." + } + }, + "metrics": { + "total_tokens": 0, + "input_tokens": 0, + "output_tokens": 0, + "total_cost_usd": 0, + "duration_ms": 0, + "iteration_count": 0 + }, + "started_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `listExecutions` + +`GET /v1/executions` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `agent_id` | query | string | No | Filter by agent ID | +| `status` | query | "pending" \| "running" \| "waiting_approval" \| "completed" \| "failed" \| "cancelled" | No | Filter by status | +| `limit` | query | number | No | Maximum number of executions to return | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot ai-agents listExecutions +``` + +With JSONata filter: + +```bash +epilot ai-agents listExecutions --jsonata 'executions' +``` + +
+Sample Response + +```json +{ + "executions": [ + { + "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "agent_id": "skill:email-categorizer", + "agent_source": "system", + "agent_name": "string", + "execution_context": "flows", + "org_id": "string", + "status": "pending", + "input": {}, + "parameters": {}, + "result": {}, + "error": {}, + "pending_action": {}, + "metrics": {}, + "started_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z" + } + ], + "next_cursor": "string" +} +``` + +
+ +--- + +### `getExecution` + +`GET /v1/executions/{execution_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string (uuid) | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot ai-agents getExecution \ + -p execution_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot ai-agents getExecution 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot ai-agents getExecution -p execution_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'execution_id' +``` + +
+Sample Response + +```json +{ + "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "agent_id": "skill:email-categorizer", + "agent_source": "system", + "agent_name": "string", + "execution_context": "flows", + "org_id": "string", + "status": "pending", + "input": {}, + "parameters": {}, + "result": { + "response": "string", + "structured_output": {} + }, + "error": { + "code": "TIMEOUT", + "message": "string", + "details": {} + }, + "pending_action": { + "tool": "string", + "input": {}, + "description": "string", + "preview": { + "action": {}, + "source": {}, + "target": {}, + "changes": [], + "metadata": {}, + "summary": "This email discusses solar panel installation and should be handled by the Service team." + } + }, + "metrics": { + "total_tokens": 0, + "input_tokens": 0, + "output_tokens": 0, + "total_cost_usd": 0, + "duration_ms": 0, + "iteration_count": 0 + }, + "started_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `cancelExecution` + +`DELETE /v1/executions/{execution_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string (uuid) | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot ai-agents cancelExecution \ + -p execution_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot ai-agents cancelExecution 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot ai-agents cancelExecution -p execution_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'execution_id' +``` + +
+Sample Response + +```json +{ + "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "agent_id": "skill:email-categorizer", + "agent_source": "system", + "agent_name": "string", + "execution_context": "flows", + "org_id": "string", + "status": "pending", + "input": {}, + "parameters": {}, + "result": { + "response": "string", + "structured_output": {} + }, + "error": { + "code": "TIMEOUT", + "message": "string", + "details": {} + }, + "pending_action": { + "tool": "string", + "input": {}, + "description": "string", + "preview": { + "action": {}, + "source": {}, + "target": {}, + "changes": [], + "metadata": {}, + "summary": "This email discusses solar panel installation and should be handled by the Service team." + } + }, + "metrics": { + "total_tokens": 0, + "input_tokens": 0, + "output_tokens": 0, + "total_cost_usd": 0, + "duration_ms": 0, + "iteration_count": 0 + }, + "started_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `getExecutionTrace` + +Returns the step-by-step reasoning and tool calls for ReAct mode executions. Returns empty iterations array for direct m + +`GET /v1/executions/{execution_id}/trace` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string (uuid) | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot ai-agents getExecutionTrace \ + -p execution_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot ai-agents getExecutionTrace 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot ai-agents getExecutionTrace -p execution_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'execution_id' +``` + +
+Sample Response + +```json +{ + "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "iterations": [ + { + "iteration_index": 0, + "thought": "string", + "action": { + "tool": "string", + "input": {} + }, + "observation": {}, + "timestamp": "1970-01-01T00:00:00.000Z", + "tokens_used": 0, + "latency_ms": 0 + } + ], + "total_iterations": 0 +} +``` + +
+ +--- + +### `approveExecution` + +Approves a pending tool action when execution is in waiting_approval status + +`POST /v1/executions/{execution_id}/approve` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string (uuid) | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot ai-agents approveExecution \ + -p execution_id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"reason":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot ai-agents approveExecution 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot ai-agents approveExecution -p execution_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot ai-agents approveExecution -p execution_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'execution_id' +``` + +
+Sample Response + +```json +{ + "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "agent_id": "skill:email-categorizer", + "agent_source": "system", + "agent_name": "string", + "execution_context": "flows", + "org_id": "string", + "status": "pending", + "input": {}, + "parameters": {}, + "result": { + "response": "string", + "structured_output": {} + }, + "error": { + "code": "TIMEOUT", + "message": "string", + "details": {} + }, + "pending_action": { + "tool": "string", + "input": {}, + "description": "string", + "preview": { + "action": {}, + "source": {}, + "target": {}, + "changes": [], + "metadata": {}, + "summary": "This email discusses solar panel installation and should be handled by the Service team." + } + }, + "metrics": { + "total_tokens": 0, + "input_tokens": 0, + "output_tokens": 0, + "total_cost_usd": 0, + "duration_ms": 0, + "iteration_count": 0 + }, + "started_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `rejectExecution` + +Rejects a pending tool action when execution is in waiting_approval status + +`POST /v1/executions/{execution_id}/reject` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string (uuid) | Yes | | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot ai-agents rejectExecution \ + -p execution_id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"reason":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot ai-agents rejectExecution 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot ai-agents rejectExecution -p execution_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot ai-agents rejectExecution -p execution_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'execution_id' +``` + +
+Sample Response + +```json +{ + "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "agent_id": "skill:email-categorizer", + "agent_source": "system", + "agent_name": "string", + "execution_context": "flows", + "org_id": "string", + "status": "pending", + "input": {}, + "parameters": {}, + "result": { + "response": "string", + "structured_output": {} + }, + "error": { + "code": "TIMEOUT", + "message": "string", + "details": {} + }, + "pending_action": { + "tool": "string", + "input": {}, + "description": "string", + "preview": { + "action": {}, + "source": {}, + "target": {}, + "changes": [], + "metadata": {}, + "summary": "This email discusses solar panel installation and should be handled by the Service team." + } + }, + "metrics": { + "total_tokens": 0, + "input_tokens": 0, + "output_tokens": 0, + "total_cost_usd": 0, + "duration_ms": 0, + "iteration_count": 0 + }, + "started_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- diff --git a/packages/cli/docs/app.md b/packages/cli/docs/app.md new file mode 100644 index 00000000..0ca1c892 --- /dev/null +++ b/packages/cli/docs/app.md @@ -0,0 +1,2732 @@ +# App API + +- **Base URL:** `https://app.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/app](https://docs.epilot.io/api/app) + +API for managing app publishing and installed app. + +## Quick Start + +```bash +# List available operations +epilot app + +# Call an operation +epilot app getPublicFacingComponent -p appId=123e4567-e89b-12d3-a456-426614174000 -p componentId=123e4567-e89b-12d3-a456-426614174000 +``` + +## Operations + +**App Installation** +- [`getPublicFacingComponent`](#getpublicfacingcomponent) — Retrieve public facing components for an installed app +- [`listInstallations`](#listinstallations) — Retrieve a list of installed apps for the organization. +- [`getInstallation`](#getinstallation) — Retrieve details of an installed app by its ID. +- [`install`](#install) — Upsert app installation by its ID. +- [`patchInstallation`](#patchinstallation) — Patch an installed app by its ID. +- [`uninstall`](#uninstall) — Uninstall an app by its ID. +- [`promoteVersion`](#promoteversion) — Update an installed app to a new version + +**App Configuration** +- [`listConfigurations`](#listconfigurations) — List all app configuration metadata owned by an organization. To get full app configuration details, use the /v1/app-con +- [`createConfiguration`](#createconfiguration) — Create a new private app configuration. To make it public a verification process needs to be triggered +- [`listPublicConfigurations`](#listpublicconfigurations) — List all publicly available app configurations that can be installed. This endpoint returns apps that have at least one +- [`getPublicConfiguration`](#getpublicconfiguration) — Retrieve the public configuration of an app to install in your tenant +- [`getConfiguration`](#getconfiguration) — Retrieve a specific app configuration +- [`patchMetadata`](#patchmetadata) — Patch non-versioned configuration metadata of a given app configuration. +- [`deleteConfiguration`](#deleteconfiguration) — Delete an app configuration and all its versions and components. +- [`createBundleUploadUrl`](#createbundleuploadurl) — Generate a presigned URL for uploading app bundle to //bundle.js path +- [`createZipUploadUrl`](#createzipuploadurl) — Generate a presigned URL to upload a zip file with artifacts that will be unpacked in a new directory under the //logo.png path +- [`deleteLogo`](#deletelogo) — Delete the app logo from //logo.png path +- [`listVersions`](#listversions) — Retrieve a list of versions for an app configuration +- [`getVersion`](#getversion) — Retrieve a specific version of an app configuration +- [`patchVersion`](#patchversion) — Patch an existing app version +- [`deleteVersion`](#deleteversion) — Delete a specific version of an app configuration +- [`getReview`](#getreview) — Retrieve the review status of a specific app version +- [`createReview`](#createreview) — Submit an app version for review to make it public +- [`createComponent`](#createcomponent) — Patch an existing app version to create/add a component +- [`patchComponent`](#patchcomponent) — Patch an existing app version to update its components +- [`deleteComponent`](#deletecomponent) — Delete a specific component from an app version +- [`cloneVersion`](#cloneversion) — Clone an existing app version to create a new version + +**App Analytics** +- [`queryEvents`](#queryevents) — Query analytics events for a specific app with flexible filtering +- [`ingestEvent`](#ingestevent) — Internal endpoint for services to submit app events for analytic purposes + +### `getPublicFacingComponent` + +Retrieve public facing components for an installed app + +`GET /v1/public/app/{appId}/components/{componentId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration to install | +| `componentId` | path | string | Yes | ID of the component to retrieve | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app getPublicFacingComponent \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -p componentId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot app getPublicFacingComponent 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app getPublicFacingComponent -p appId=123e4567-e89b-12d3-a456-426614174000 -p componentId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'component' +``` + +
+Sample Response + +```json +{ + "component": { + "component_type": "CUSTOM_JOURNEY_BLOCK", + "configuration": { + "override_dev_mode": { + "override_url": "http://localhost:3000" + }, + "component_url": "https://cdn.apps.com/123/v1.0.0/bundle.js", + "component_tag": "string", + "component_args": [ + { + "type": "text" + } + ], + "component_size": 0, + "component_mapping": {} + } + } +} +``` + +
+ +--- + +### `listConfigurations` + +List all app configuration metadata owned by an organization. To get full app configuration details, use the /v1/app-con + +`GET /v1/app-configurations` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `page` | query | number | No | Page number for pagination | +| `pageSize` | query | number | No | Number of items per page | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app listConfigurations +``` + +With JSONata filter: + +```bash +epilot app listConfigurations --jsonata 'configurations' +``` + +
+Sample Response + +```json +{ + "configurations": [ + { + "app_id": "string", + "name": "string", + "author": { + "name": "string", + "company": "string", + "email": "string" + }, + "dev_mode": true, + "versions": ["string"], + "public_versions": ["string"], + "support_email": "string", + "latest_version": "string", + "category": "string", + "icon_url": "string", + "documentation_url": "string", + "description": { + "en": "string", + "de": "string" + }, + "notifications": { + "email": "developer@example.com", + "events": ["app.installed"] + }, + "owner_org_id": "string", + "internal": false, + "pricing": { + "pricing_type": "FREE", + "billing_frequency": "MONTHLY" + }, + "configuration_audit": { + "created_at": "string", + "created_by": "string", + "updated_at": "string", + "updated_by": "string" + } + } + ], + "pagination": { + "total": 0, + "page": 0, + "pageSize": 0 + } +} +``` + +
+ +--- + +### `createConfiguration` + +Create a new private app configuration. To make it public a verification process needs to be triggered + +`POST /v1/app-configurations` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app createConfiguration \ + -d '{"name":"string","description":{"en":"string","de":"string"},"category":"string","logo_url_key":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot app createConfiguration +``` + +With JSONata filter: + +```bash +epilot app createConfiguration --jsonata 'app_id' +``` + +
+Sample Response + +```json +{ + "app_id": "string" +} +``` + +
+ +--- + +### `listPublicConfigurations` + +List all publicly available app configurations that can be installed. This endpoint returns apps that have at least one + +`GET /v1/app-configurations/public` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `page` | query | number | No | Page number for pagination | +| `pageSize` | query | number | No | Number of items per page | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app listPublicConfigurations +``` + +With JSONata filter: + +```bash +epilot app listPublicConfigurations --jsonata 'configurations' +``` + +
+Sample Response + +```json +{ + "configurations": [ + { + "app_id": "string", + "name": "string", + "author": { + "name": "string", + "company": "string", + "email": "string" + }, + "dev_mode": true, + "versions": ["string"], + "public_versions": ["string"], + "support_email": "string", + "latest_version": "string", + "category": "string", + "icon_url": "string", + "documentation_url": "string", + "description": { + "en": "string", + "de": "string" + }, + "notifications": { + "email": "developer@example.com", + "events": ["app.installed"] + }, + "owner_org_id": "string", + "internal": false, + "pricing": { + "pricing_type": "FREE", + "billing_frequency": "MONTHLY" + }, + "configuration_audit": { + "created_at": "string", + "created_by": "string", + "updated_at": "string", + "updated_by": "string" + } + } + ], + "pagination": { + "total": 0, + "page": 0, + "pageSize": 0 + } +} +``` + +
+ +--- + +### `getPublicConfiguration` + +Retrieve the public configuration of an app to install in your tenant + +`GET /v1/app-configurations/public/{appId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration to install | +| `version` | query | string | No | Version of the app configuration to retrieve | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app getPublicConfiguration \ + -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot app getPublicConfiguration 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app getPublicConfiguration -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'app_id' +``` + +
+Sample Response + +```json +{ + "app_id": "string", + "support_email": "string", + "owner_org_id": "string", + "name": "string", + "author": { + "name": "string", + "company": "string", + "email": "string" + }, + "dev_mode": true, + "category": "string", + "icon_url": "string", + "documentation_url": "string", + "description": { + "en": "string", + "de": "string" + }, + "pricing": { + "pricing_type": "FREE", + "billing_frequency": "MONTHLY" + }, + "components": [ + { + "component_type": "CUSTOM_JOURNEY_BLOCK", + "configuration": {} + } + ], + "is_beta": true, + "deprecated_at": "string", + "version": "string", + "role": { + "id": "string", + "grants": [ + {} + ] + }, + "blueprint_ref": { + "manifest_id": "string", + "job_id": "string" + }, + "latest_version": "string", + "public": true, + "versions": [ + { + "app_id": "string", + "owner_org_id": "string", + "components": [], + "visibility": "private", + "public": false, + "pending": false, + "version": "string", + "is_beta": true, + "deprecated_at": "string", + "changelog": "string", + "review_status": "approved", + "role": {}, + "blueprint_ref": {}, + "version_audit": {} + } + ] +} +``` + +
+ +--- + +### `getConfiguration` + +Retrieve a specific app configuration + +`GET /v1/app-configurations/{appId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | +| `version` | query | string | No | Version of the app configuration to retrieve | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app getConfiguration \ + -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot app getConfiguration 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app getConfiguration -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "app_id": "string", + "name": "string", + "author": { + "name": "string", + "company": "string", + "email": "string" + }, + "dev_mode": true, + "versions": ["string"], + "public_versions": ["string"], + "support_email": "string", + "latest_version": "string", + "category": "string", + "icon_url": "string", + "documentation_url": "string", + "description": { + "en": "string", + "de": "string" + }, + "notifications": { + "email": "developer@example.com", + "events": ["app.installed"] + }, + "owner_org_id": "string", + "internal": false, + "pricing": { + "pricing_type": "FREE", + "billing_frequency": "MONTHLY" + }, + "configuration_audit": { + "created_at": "string", + "created_by": "string", + "updated_at": "string", + "updated_by": "string" + }, + "components": [ + { + "component_type": "CUSTOM_JOURNEY_BLOCK", + "configuration": {} + } + ], + "visibility": "private", + "public": false, + "pending": false, + "version": "string", + "is_beta": true, + "deprecated_at": "string", + "changelog": "string", + "review_status": "approved", + "role": { + "id": "string", + "grants": [ + {} + ] + }, + "blueprint_ref": { + "manifest_id": "string", + "job_id": "string" + }, + "version_audit": { + "created_at": "string", + "created_by": "string", + "updated_at": "string", + "updated_by": "string", + "versioned_at": "string", + "versioned_by": "string" + } +} +``` + +
+ +--- + +### `patchMetadata` + +Patch non-versioned configuration metadata of a given app configuration. + +`PATCH /v1/app-configurations/{appId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app patchMetadata \ + -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot app patchMetadata \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "name": "string", + "description": { + "en": "string", + "de": "string" + }, + "category": "string", + "documentation_url": "string", + "notifications": { + "email": "developer@example.com", + "events": ["app.installed"] + }, + "pricing": { + "pricing_type": "FREE", + "billing_frequency": "MONTHLY" + }, + "logo_url_key": "string", + "support_email": "string", + "dev_mode": true +}' +``` + +Using positional args for path parameters: + +```bash +epilot app patchMetadata 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot app patchMetadata -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app patchMetadata -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `deleteConfiguration` + +Delete an app configuration and all its versions and components. + +`DELETE /v1/app-configurations/{appId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app deleteConfiguration \ + -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot app deleteConfiguration 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app deleteConfiguration -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `queryEvents` + +Query analytics events for a specific app with flexible filtering + +`POST /v1/app-configurations/{appId}/events` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app queryEvents \ + -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot app queryEvents \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "time_range": { + "start": "1970-01-01T00:00:00.000Z", + "end": "1970-01-01T00:00:00.000Z", + "preset": "1h" + }, + "filters": { + "source": ["CUSTOM_JOURNEY_BLOCK"], + "component_id": ["string"], + "event_type": ["ERROR"], + "correlation_id": "string" + }, + "aggregation": { + "group_by": ["source"], + "metrics": ["count"] + }, + "pagination": { + "page": 1, + "page_size": 100 + }, + "sort": { + "field": "timestamp", + "order": "desc" + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot app queryEvents 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot app queryEvents -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app queryEvents -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "query": { + "time_range": { + "start": "1970-01-01T00:00:00.000Z", + "end": "1970-01-01T00:00:00.000Z", + "preset": "1h" + }, + "filters": { + "source": ["CUSTOM_JOURNEY_BLOCK"], + "component_id": ["string"], + "event_type": ["ERROR"], + "correlation_id": "string" + }, + "aggregation": { + "group_by": ["source"], + "metrics": ["count"] + }, + "pagination": { + "page": 1, + "page_size": 100 + }, + "sort": { + "field": "timestamp", + "order": "desc" + } + }, + "results": { + "type": "raw", + "events": [ + { + "app_id": "string", + "version": "string", + "event_id": "string", + "component_id": "string", + "timestamp": "string", + "correlation_id": "string", + "event_type": "ERROR", + "source": "CUSTOM_JOURNEY_BLOCK", + "actor": { + "org_id": "string", + "user_id": "string", + "type": "user" + }, + "details": {} + } + ] + }, + "pagination": { + "page": 0, + "page_size": 0, + "total_items": 0, + "has_next": true + } +} +``` + +
+ +--- + +### `createBundleUploadUrl` + +Generate a presigned URL for uploading app bundle to //bundle.js path + +`POST /v1/app-configurations/{appId}/bundle` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app createBundleUploadUrl \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"version":"string","component_id":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot app createBundleUploadUrl 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot app createBundleUploadUrl -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app createBundleUploadUrl -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'component_id' +``` + +
+Sample Response + +```json +{ + "component_id": "string", + "component_url": "string", + "upload_url": "string", + "s3ref": { + "bucket": "my-bucket", + "key": "manifest.json" + }, + "expires_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `createZipUploadUrl` + +Generate a presigned URL to upload a zip file with artifacts that will be unpacked in a new directory under the /` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app createZipUploadUrl \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"version":"1.0.0","component_id":"string","filename":"dist.zip"}' +``` + +Using positional args for path parameters: + +```bash +epilot app createZipUploadUrl 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot app createZipUploadUrl -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app createZipUploadUrl -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'component_id' +``` + +
+Sample Response + +```json +{ + "component_id": "string", + "upload_url": "string", + "artifact_url": "string", + "s3ref": { + "bucket": "my-bucket", + "key": "manifest.json" + }, + "expires_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `createLogoUploadUrl` + +Generate a presigned URL for uploading app logo to //logo.png path + +`POST /v1/app-configurations/{appId}/logo` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app createLogoUploadUrl \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"filename":"company-logo.png","mime_type":"image/png"}' +``` + +Using positional args for path parameters: + +```bash +epilot app createLogoUploadUrl 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot app createLogoUploadUrl -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app createLogoUploadUrl -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'upload_url' +``` + +
+Sample Response + +```json +{ + "upload_url": "string", + "s3ref": { + "bucket": "my-bucket", + "key": "manifest.json" + }, + "expires_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `deleteLogo` + +Delete the app logo from //logo.png path + +`DELETE /v1/app-configurations/{appId}/logo` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app deleteLogo \ + -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot app deleteLogo 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app deleteLogo -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `listVersions` + +Retrieve a list of versions for an app configuration + +`GET /v1/app-configurations/{appId}/versions` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | +| `page` | query | number | No | Page number for pagination | +| `pageSize` | query | number | No | Number of items per page | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app listVersions \ + -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot app listVersions 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app listVersions -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'versions' +``` + +
+Sample Response + +```json +{ + "versions": [ + { + "app_id": "string", + "owner_org_id": "string", + "components": [ + { + "component_type": "CUSTOM_JOURNEY_BLOCK", + "configuration": { + "override_dev_mode": { + "override_url": "http://localhost:3000" + }, + "component_url": "https://cdn.apps.com/123/v1.0.0/bundle.js", + "component_tag": "string", + "component_args": [ + { + "type": "text" + } + ], + "component_size": 0, + "component_mapping": {} + } + } + ], + "visibility": "private", + "public": false, + "pending": false, + "version": "string", + "is_beta": true, + "deprecated_at": "string", + "changelog": "string", + "review_status": "approved", + "role": { + "id": "string", + "grants": [ + { + "action": "string", + "resource": "string" + } + ] + }, + "blueprint_ref": { + "manifest_id": "string", + "job_id": "string" + }, + "version_audit": { + "created_at": "string", + "created_by": "string", + "updated_at": "string", + "updated_by": "string", + "versioned_at": "string", + "versioned_by": "string" + } + } + ], + "pagination": { + "total": 0, + "page": 0, + "pageSize": 0 + } +} +``` + +
+ +--- + +### `getVersion` + +Retrieve a specific version of an app configuration + +`GET /v1/app-configurations/{appId}/versions/{version}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | +| `version` | path | string | Yes | Version of the app configuration to retrieve | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app getVersion \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -p version=example +``` + +Using positional args for path parameters: + +```bash +epilot app getVersion 123e4567-e89b-12d3-a456-426614174000 example +``` + +With JSONata filter: + +```bash +epilot app getVersion -p appId=123e4567-e89b-12d3-a456-426614174000 -p version=example --jsonata '$' +``` + +
+Sample Response + +```json +{ + "app_id": "string", + "name": "string", + "author": { + "name": "string", + "company": "string", + "email": "string" + }, + "dev_mode": true, + "versions": ["string"], + "public_versions": ["string"], + "support_email": "string", + "latest_version": "string", + "category": "string", + "icon_url": "string", + "documentation_url": "string", + "description": { + "en": "string", + "de": "string" + }, + "notifications": { + "email": "developer@example.com", + "events": ["app.installed"] + }, + "owner_org_id": "string", + "internal": false, + "pricing": { + "pricing_type": "FREE", + "billing_frequency": "MONTHLY" + }, + "configuration_audit": { + "created_at": "string", + "created_by": "string", + "updated_at": "string", + "updated_by": "string" + }, + "components": [ + { + "component_type": "CUSTOM_JOURNEY_BLOCK", + "configuration": {} + } + ], + "visibility": "private", + "public": false, + "pending": false, + "version": "string", + "is_beta": true, + "deprecated_at": "string", + "changelog": "string", + "review_status": "approved", + "role": { + "id": "string", + "grants": [ + {} + ] + }, + "blueprint_ref": { + "manifest_id": "string", + "job_id": "string" + }, + "version_audit": { + "created_at": "string", + "created_by": "string", + "updated_at": "string", + "updated_by": "string", + "versioned_at": "string", + "versioned_by": "string" + } +} +``` + +
+ +--- + +### `patchVersion` + +Patch an existing app version + +`PATCH /v1/app-configurations/{appId}/versions/{version}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | +| `version` | path | string | Yes | Version to update | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app patchVersion \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -p version=example \ + -d '{"manifest_id":"string","role_id":"string","grants":[{"action":"string","resource":"string"}]}' +``` + +Using positional args for path parameters: + +```bash +epilot app patchVersion 123e4567-e89b-12d3-a456-426614174000 example +``` + +Using stdin pipe: + +```bash +cat body.json | epilot app patchVersion -p appId=123e4567-e89b-12d3-a456-426614174000 -p version=example +``` + +With JSONata filter: + +```bash +epilot app patchVersion -p appId=123e4567-e89b-12d3-a456-426614174000 -p version=example --jsonata '$' +``` + +--- + +### `deleteVersion` + +Delete a specific version of an app configuration + +`DELETE /v1/app-configurations/{appId}/versions/{version}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | +| `version` | path | string | Yes | Version to delete | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app deleteVersion \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -p version=example +``` + +Using positional args for path parameters: + +```bash +epilot app deleteVersion 123e4567-e89b-12d3-a456-426614174000 example +``` + +With JSONata filter: + +```bash +epilot app deleteVersion -p appId=123e4567-e89b-12d3-a456-426614174000 -p version=example --jsonata '$' +``` + +--- + +### `getReview` + +Retrieve the review status of a specific app version + +`GET /v1/app-configurations/{appId}/versions/{version}/review` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | +| `version` | path | string | Yes | Version to retrieve the review status for | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app getReview \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -p version=example +``` + +Using positional args for path parameters: + +```bash +epilot app getReview 123e4567-e89b-12d3-a456-426614174000 example +``` + +With JSONata filter: + +```bash +epilot app getReview -p appId=123e4567-e89b-12d3-a456-426614174000 -p version=example --jsonata 'review' +``` + +
+Sample Response + +```json +{ + "review": { + "version": "string", + "review_status": "approved", + "requested_at": "string", + "requested_by": "string", + "technical_contact": "string", + "marketing_contact": "string", + "demo_url": "string" + } +} +``` + +
+ +--- + +### `createReview` + +Submit an app version for review to make it public + +`POST /v1/app-configurations/{appId}/versions/{version}/review` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | +| `version` | path | string | Yes | Version to submit for review | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app createReview \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -p version=example \ + -d '{"technical_contact":"string","marketing_contact":"string","demo_url":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot app createReview 123e4567-e89b-12d3-a456-426614174000 example +``` + +Using stdin pipe: + +```bash +cat body.json | epilot app createReview -p appId=123e4567-e89b-12d3-a456-426614174000 -p version=example +``` + +With JSONata filter: + +```bash +epilot app createReview -p appId=123e4567-e89b-12d3-a456-426614174000 -p version=example --jsonata 'review' +``` + +
+Sample Response + +```json +{ + "review": { + "version": "string", + "review_status": "approved", + "requested_at": "string", + "requested_by": "string", + "technical_contact": "string", + "marketing_contact": "string", + "demo_url": "string" + } +} +``` + +
+ +--- + +### `createComponent` + +Patch an existing app version to create/add a component + +`POST /v1/app-configurations/{appId}/versions/{version}/components` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | +| `version` | path | string | Yes | Version to update | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app createComponent \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -p version=example +``` + +With request body: + +```bash +epilot app createComponent \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -p version=example \ + -d '{ + "component_type": "CUSTOM_JOURNEY_BLOCK", + "configuration": { + "override_dev_mode": { + "override_url": "http://localhost:3000" + }, + "component_url": "https://cdn.apps.com/123/v1.0.0/bundle.js", + "component_tag": "string", + "component_args": [ + { + "type": "text" + } + ], + "component_size": 0, + "component_mapping": {} + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot app createComponent 123e4567-e89b-12d3-a456-426614174000 example +``` + +Using stdin pipe: + +```bash +cat body.json | epilot app createComponent -p appId=123e4567-e89b-12d3-a456-426614174000 -p version=example +``` + +With JSONata filter: + +```bash +epilot app createComponent -p appId=123e4567-e89b-12d3-a456-426614174000 -p version=example --jsonata 'component' +``` + +
+Sample Response + +```json +{ + "component": { + "component_type": "CUSTOM_JOURNEY_BLOCK", + "configuration": { + "override_dev_mode": { + "override_url": "http://localhost:3000" + }, + "component_url": "https://cdn.apps.com/123/v1.0.0/bundle.js", + "component_tag": "string", + "component_args": [ + { + "type": "text" + } + ], + "component_size": 0, + "component_mapping": {} + } + } +} +``` + +
+ +--- + +### `patchComponent` + +Patch an existing app version to update its components + +`PATCH /v1/app-configurations/{appId}/versions/{version}/components/{componentId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | +| `version` | path | string | Yes | Version to update | +| `componentId` | path | string | Yes | ID of the component to update | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app patchComponent \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -p version=example \ + -p componentId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot app patchComponent \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -p version=example \ + -p componentId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "component_type": "CUSTOM_JOURNEY_BLOCK", + "configuration": { + "override_dev_mode": { + "override_url": "http://localhost:3000" + }, + "component_url": "https://cdn.apps.com/123/v1.0.0/bundle.js", + "component_tag": "string", + "component_args": [ + { + "type": "text" + } + ], + "component_size": 0, + "component_mapping": {} + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot app patchComponent 123e4567-e89b-12d3-a456-426614174000 example 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot app patchComponent -p appId=123e4567-e89b-12d3-a456-426614174000 -p version=example -p componentId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app patchComponent -p appId=123e4567-e89b-12d3-a456-426614174000 -p version=example -p componentId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `deleteComponent` + +Delete a specific component from an app version + +`DELETE /v1/app-configurations/{appId}/versions/{version}/components/{componentId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | +| `version` | path | string | Yes | Version to update | +| `componentId` | path | string | Yes | ID of the component to delete | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app deleteComponent \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -p version=example \ + -p componentId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot app deleteComponent 123e4567-e89b-12d3-a456-426614174000 example 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app deleteComponent -p appId=123e4567-e89b-12d3-a456-426614174000 -p version=example -p componentId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `cloneVersion` + +Clone an existing app version to create a new version + +`POST /v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | ID of the app configuration | +| `sourceVersion` | path | string | Yes | Source version to clone from | +| `targetVersion` | path | string | Yes | Target version to create | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app cloneVersion \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -p sourceVersion=example \ + -p targetVersion=example +``` + +Using positional args for path parameters: + +```bash +epilot app cloneVersion 123e4567-e89b-12d3-a456-426614174000 example example +``` + +With JSONata filter: + +```bash +epilot app cloneVersion -p appId=123e4567-e89b-12d3-a456-426614174000 -p sourceVersion=example -p targetVersion=example --jsonata 'app_id' +``` + +
+Sample Response + +```json +{ + "app_id": "string", + "version": "string", + "status": "pending" +} +``` + +
+ +--- + +### `listInstallations` + +Retrieve a list of installed apps for the organization. + +`GET /v1/app` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `componentType` | query | "CUSTOM_JOURNEY_BLOCK" \| "CUSTOM_PORTAL_BLOCK" \| "PORTAL_EXTENSION" \| "CUSTOM_FLOW_ACTION" \| "ERP_INFORM_TOOLKIT" \| "CUSTOM_CAPABILITY" \| "EXTERNAL_PRODUCT_CATALOG" \| "CUSTOM_PAGE" | No | Filter apps by specific component type | +| `enabled` | query | boolean | No | Filter apps by enabled status | +| `page` | query | number | No | Page number for pagination | +| `pageSize` | query | number | No | Number of items per page | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app listInstallations +``` + +With JSONata filter: + +```bash +epilot app listInstallations --jsonata 'apps' +``` + +
+Sample Response + +```json +{ + "apps": [ + { + "app_id": "string", + "installer_org_id": "string", + "owner_org_id": "string", + "enabled": true, + "name": "string", + "option_values": [ + { + "component_id": "string", + "options": [ + { + "key": "string", + "value": {} + } + ] + } + ], + "components": [ + { + "component_type": "CUSTOM_JOURNEY_BLOCK", + "configuration": { + "override_dev_mode": { + "override_url": "http://localhost:3000" + }, + "component_url": "https://cdn.apps.com/123/v1.0.0/bundle.js", + "component_tag": "string", + "component_args": [ + { + "type": "text" + } + ], + "component_size": 0, + "component_mapping": {} + } + } + ], + "installed_version": "string", + "role": "string", + "blueprint_ref": { + "manifest_id": "string", + "job_id": "string" + }, + "installation_audit": { + "created_at": "string", + "created_by": "string", + "updated_at": "string", + "updated_by": "string" + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ], + "pagination": { + "total": 0, + "page": 0, + "pageSize": 0 + } +} +``` + +
+ +--- + +### `getInstallation` + +Retrieve details of an installed app by its ID. + +`GET /v1/app/{appId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app getInstallation \ + -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot app getInstallation 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app getInstallation -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'app_id' +``` + +
+Sample Response + +```json +{ + "app_id": "string", + "installer_org_id": "string", + "owner_org_id": "string", + "enabled": true, + "name": "string", + "option_values": [ + { + "component_id": "string", + "options": [ + { + "key": "string", + "value": {} + } + ] + } + ], + "components": [ + { + "component_type": "CUSTOM_JOURNEY_BLOCK", + "configuration": { + "override_dev_mode": { + "override_url": "http://localhost:3000" + }, + "component_url": "https://cdn.apps.com/123/v1.0.0/bundle.js", + "component_tag": "string", + "component_args": [ + { + "type": "text" + } + ], + "component_size": 0, + "component_mapping": {} + } + } + ], + "installed_version": "string", + "role": "string", + "blueprint_ref": { + "manifest_id": "string", + "job_id": "string" + }, + "installation_audit": { + "created_at": "string", + "created_by": "string", + "updated_at": "string", + "updated_by": "string" + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `install` + +Upsert app installation by its ID. + +`POST /v1/app/{appId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app install \ + -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot app install \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "version": "string", + "option_values": [ + { + "component_id": "string", + "options": [ + { + "key": "string", + "value": {} + } + ] + } + ], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot app install 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot app install -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app install -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'app_id' +``` + +
+Sample Response + +```json +{ + "app_id": "string", + "installer_org_id": "string", + "owner_org_id": "string", + "enabled": true, + "name": "string", + "option_values": [ + { + "component_id": "string", + "options": [ + { + "key": "string", + "value": {} + } + ] + } + ], + "components": [ + { + "component_type": "CUSTOM_JOURNEY_BLOCK", + "configuration": { + "override_dev_mode": { + "override_url": "http://localhost:3000" + }, + "component_url": "https://cdn.apps.com/123/v1.0.0/bundle.js", + "component_tag": "string", + "component_args": [ + { + "type": "text" + } + ], + "component_size": 0, + "component_mapping": {} + } + } + ], + "installed_version": "string", + "role": "string", + "blueprint_ref": { + "manifest_id": "string", + "job_id": "string" + }, + "installation_audit": { + "created_at": "string", + "created_by": "string", + "updated_at": "string", + "updated_by": "string" + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `patchInstallation` + +Patch an installed app by its ID. + +`PATCH /v1/app/{appId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app patchInstallation \ + -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot app patchInstallation \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "version": "string", + "option_values": [ + { + "component_id": "string", + "options": [ + { + "key": "string", + "value": {} + } + ] + } + ], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot app patchInstallation 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot app patchInstallation -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app patchInstallation -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `uninstall` + +Uninstall an app by its ID. + +`DELETE /v1/app/{appId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app uninstall \ + -p appId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot app uninstall 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot app uninstall -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `promoteVersion` + +Update an installed app to a new version + +`POST /v1/app/{appId}/promote-to/{version}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `appId` | path | string | Yes | | +| `version` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app promoteVersion \ + -p appId=123e4567-e89b-12d3-a456-426614174000 \ + -p version=example +``` + +Using positional args for path parameters: + +```bash +epilot app promoteVersion 123e4567-e89b-12d3-a456-426614174000 example +``` + +With JSONata filter: + +```bash +epilot app promoteVersion -p appId=123e4567-e89b-12d3-a456-426614174000 -p version=example --jsonata 'app_id' +``` + +
+Sample Response + +```json +{ + "app_id": "string", + "installer_org_id": "string", + "owner_org_id": "string", + "enabled": true, + "name": "string", + "option_values": [ + { + "component_id": "string", + "options": [ + { + "key": "string", + "value": {} + } + ] + } + ], + "components": [ + { + "component_type": "CUSTOM_JOURNEY_BLOCK", + "configuration": { + "override_dev_mode": { + "override_url": "http://localhost:3000" + }, + "component_url": "https://cdn.apps.com/123/v1.0.0/bundle.js", + "component_tag": "string", + "component_args": [ + { + "type": "text" + } + ], + "component_size": 0, + "component_mapping": {} + } + } + ], + "installed_version": "string", + "role": "string", + "blueprint_ref": { + "manifest_id": "string", + "job_id": "string" + }, + "installation_audit": { + "created_at": "string", + "created_by": "string", + "updated_at": "string", + "updated_by": "string" + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `ingestEvent` + +Internal endpoint for services to submit app events for analytic purposes + +`POST /v1/app-events` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot app ingestEvent +``` + +With request body: + +```bash +epilot app ingestEvent \ + -d '{ + "app_id": "string", + "version": "string", + "event_id": "string", + "component_id": "string", + "timestamp": "string", + "correlation_id": "string", + "event_type": "ERROR", + "source": "CUSTOM_JOURNEY_BLOCK", + "actor": { + "org_id": "string", + "user_id": "string", + "type": "user" + }, + "details": {} +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot app ingestEvent +``` + +With JSONata filter: + +```bash +epilot app ingestEvent --jsonata '$' +``` + +--- diff --git a/packages/cli/docs/audit-logs.md b/packages/cli/docs/audit-logs.md new file mode 100644 index 00000000..788ece4e --- /dev/null +++ b/packages/cli/docs/audit-logs.md @@ -0,0 +1,227 @@ +# Audit Log + +- **Base URL:** `https://audit-logs.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/audit-logs](https://docs.epilot.io/api/audit-logs) + +Service for managing and retrieving auditing logs in the scope of an organization + +## Quick Start + +```bash +# List available operations +epilot audit-logs + +# Call an operation +epilot audit-logs getLogs +``` + +## Operations + +**Events** +- [`getLogs`](#getlogs) — Retrieve Audit Log events. Optionally, you can filter them by organization. + +**Audit Log** +- [`getLogById`](#getlogbyid) — Retrieve Audit Log events + +### `getLogs` + +Retrieve Audit Log events. Optionally, you can filter them by organization. + +`POST /v1/logs` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot audit-logs getLogs +``` + +With request body: + +```bash +epilot audit-logs getLogs \ + -d '{ + "limit": 50, + "page": 0, + "timestamp": "2021-06-01T12:00:00Z", + "service_name": "workflows", + "event_name": "deleteWorkflow", + "outcome": "success", + "method": "POST", + "user": { + "email": "max.mustermann@mail.com", + "user_id": 123456 + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot audit-logs getLogs +``` + +With JSONata filter: + +```bash +epilot audit-logs getLogs --jsonata 'logs' +``` + +
+Sample Response + +```json +{ + "logs": [ + { + "id": "2843c005-c5b0-4df2-94ee-1ca2ddd998ac", + "org_id": 123456, + "service_name": "workflows", + "event_name": "deleteWorkflow", + "status_code": 200, + "timestamp": "2021-06-01T12:00:00Z", + "caller": { + "user_email": "max.mustermann@mail.com", + "user_id": 123456, + "trigger_type": "user" + }, + "http": { + "method": "GET", + "ip": null, + "headers": { + "Authorization": "Bearer token" + }, + "query": { + "limit": 50, + "page": 0 + }, + "pathParams": { + "eventId": "2843c005-c5b0-4df2-94ee-1ca2ddd998ac" + }, + "path": "/v1/logs", + "domainName": "audit-logs.sls.epilot.io" + }, + "detail": "{\"workflow_id\": \"123456\"}", + "activity": "Workflow with ID 123456 was deleted", + "source_url": "string" + } + ], + "total": 1 +} +``` + +
+ +--- + +### `getLogById` + +Retrieve Audit Log events + +`GET /v1/logs/{logId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `logId` | path | string | Yes | ID of the log event | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot audit-logs getLogById \ + -p logId=2843c005-c5b0-4df2-94ee-1ca2ddd998ac +``` + +Using positional args for path parameters: + +```bash +epilot audit-logs getLogById 2843c005-c5b0-4df2-94ee-1ca2ddd998ac +``` + +With JSONata filter: + +```bash +epilot audit-logs getLogById -p logId=2843c005-c5b0-4df2-94ee-1ca2ddd998ac --jsonata 'log' +``` + +
+Sample Response + +```json +{ + "log": { + "id": "2843c005-c5b0-4df2-94ee-1ca2ddd998ac", + "org_id": 123456, + "service_name": "workflows", + "event_name": "deleteWorkflow", + "status_code": 200, + "timestamp": "2021-06-01T12:00:00Z", + "caller": { + "user_email": "max.mustermann@mail.com", + "user_id": 123456, + "trigger_type": "user" + }, + "http": { + "method": "GET", + "ip": null, + "headers": { + "Authorization": "Bearer token" + }, + "query": { + "limit": 50, + "page": 0 + }, + "pathParams": { + "eventId": "2843c005-c5b0-4df2-94ee-1ca2ddd998ac" + }, + "path": "/v1/logs", + "domainName": "audit-logs.sls.epilot.io" + }, + "detail": "{\"workflow_id\": \"123456\"}", + "activity": "Workflow with ID 123456 was deleted", + "source_url": "string" + } +} +``` + +
+ +--- diff --git a/packages/cli/docs/automation.md b/packages/cli/docs/automation.md new file mode 100644 index 00000000..b73d0728 --- /dev/null +++ b/packages/cli/docs/automation.md @@ -0,0 +1,1473 @@ +# Automation API + +- **Base URL:** `https://automation.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/automation](https://docs.epilot.io/api/automation) + +API Backend for epilot Automation Workflows feature + +## Quick Start + +```bash +# List available operations +epilot automation + +# Call an operation +epilot automation searchFlows +``` + +## Operations + +**flows** +- [`searchFlows`](#searchflows) — Search available automation flows +- [`createFlow`](#createflow) — Create new automation flow +- [`batchGetFlows`](#batchgetflows) — Get multiple automation flows by their IDs +- [`getFlow`](#getflow) — List available automation flows +- [`putFlow`](#putflow) — Update automation flow by id +- [`deleteFlow`](#deleteflow) — Update automation flow by id + +**executions** +- [`getExecutions`](#getexecutions) — List automation executions +- [`startExecution`](#startexecution) — Start new automation execution +- [`getExecution`](#getexecution) — Get automation execution +- [`cancelExecution`](#cancelexecution) — Cancel automation execution +- [`retriggerAction`](#retriggeraction) — Retry a specific automation execution action which failed / is stuck. +- [`resumeExecutionWithToken`](#resumeexecutionwithtoken) — Resume a paused automation execution using a unique resume token. +- [`cancelSchedule`](#cancelschedule) — Cancel a scheduled automation + +**bulk** +- [`bulkTriggerExecutions`](#bulktriggerexecutions) — Create a bulk job that triggers multiple automation executions +- [`getBulkJob`](#getbulkjob) — Get the status of a bulk job that triggers multiple automation executions +- [`patchBulkJob`](#patchbulkjob) — Approve / Cancel bulk job that triggers multiple automation executions + +### `searchFlows` + +Search available automation flows + +`GET /v1/automation/flows` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `schema` | query | string | No | Entity Schema | +| `size` | query | number | No | Pagination: max number of results to return | +| `from` | query | number | No | Pagination: starting for results | +| `trigger_source_id` | query | string | No | Trigger source identifier | +| `include_flows` | query | boolean | No | Include flow automations in the response | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation searchFlows +``` + +With JSONata filter: + +```bash +epilot automation searchFlows --jsonata 'results[0]' +``` + +--- + +### `createFlow` + +Create new automation flow + +`POST /v1/automation/flows` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation createFlow +``` + +Using stdin pipe: + +```bash +cat body.json | epilot automation createFlow +``` + +With JSONata filter: + +```bash +epilot automation createFlow --jsonata 'id' +``` + +--- + +### `batchGetFlows` + +Get multiple automation flows by their IDs + +`POST /v1/automation/flows:batchGet` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation batchGetFlows \ + -d '{"ids":["7791b04a-16d2-44a2-9af9-2d59c25c512f"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot automation batchGetFlows +``` + +With JSONata filter: + +```bash +epilot automation batchGetFlows --jsonata 'results[0]' +``` + +--- + +### `getFlow` + +List available automation flows + +`GET /v1/automation/flows/{flow_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `flow_id` | path | string | Yes | Automation Workflow ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation getFlow \ + -p flow_id=7791b04a-16d2-44a2-9af9-2d59c25c512f +``` + +Using positional args for path parameters: + +```bash +epilot automation getFlow 7791b04a-16d2-44a2-9af9-2d59c25c512f +``` + +With JSONata filter: + +```bash +epilot automation getFlow -p flow_id=7791b04a-16d2-44a2-9af9-2d59c25c512f --jsonata 'id' +``` + +--- + +### `putFlow` + +Update automation flow by id + +`PUT /v1/automation/flows/{flow_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `flow_id` | path | string | Yes | Automation Workflow ID | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation putFlow \ + -p flow_id=7791b04a-16d2-44a2-9af9-2d59c25c512f +``` + +Using positional args for path parameters: + +```bash +epilot automation putFlow 7791b04a-16d2-44a2-9af9-2d59c25c512f +``` + +Using stdin pipe: + +```bash +cat body.json | epilot automation putFlow -p flow_id=7791b04a-16d2-44a2-9af9-2d59c25c512f +``` + +With JSONata filter: + +```bash +epilot automation putFlow -p flow_id=7791b04a-16d2-44a2-9af9-2d59c25c512f --jsonata 'id' +``` + +--- + +### `deleteFlow` + +Update automation flow by id + +`DELETE /v1/automation/flows/{flow_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `flow_id` | path | string | Yes | Automation Workflow ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation deleteFlow \ + -p flow_id=7791b04a-16d2-44a2-9af9-2d59c25c512f +``` + +Using positional args for path parameters: + +```bash +epilot automation deleteFlow 7791b04a-16d2-44a2-9af9-2d59c25c512f +``` + +With JSONata filter: + +```bash +epilot automation deleteFlow -p flow_id=7791b04a-16d2-44a2-9af9-2d59c25c512f --jsonata '$' +``` + +--- + +### `getExecutions` + +List automation executions + +`GET /v1/automation/executions` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `entity_id` | query | string | No | | +| `size` | query | number | No | Pagination: max number of results to return | +| `from` | query | number | No | Pagination: starting for results | +| `include_flows` | query | boolean | No | Include flow automations in the response | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation getExecutions +``` + +With JSONata filter: + +```bash +epilot automation getExecutions --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "total": 0, + "results": [ + { + "id": "9baf184f-bc81-4128-bca3-d974c90a12c4", + "execution_status": "pending", + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "entity_snapshot": {}, + "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f", + "flow_name": "Handle contact form", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "conditions": [], + "schedules": [], + "actions": [], + "resume_token": "eyJraWQiOiJrZXkifQ==", + "trigger_context": {}, + "version": 2, + "trigger_event": {}, + "workflow_context": {} + } + ] +} +``` + +
+ +--- + +### `startExecution` + +Start new automation execution + +`POST /v1/automation/executions` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation startExecution +``` + +With request body: + +```bash +epilot automation startExecution \ + -d '{ + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f", + "workflow_context": { + "workflow_exec_id": "string", + "workflow_exec_task_id": "string", + "workflow_role": "trigger_workflow", + "_execution_chain": { + "parent_execution_id": "string", + "parent_task_id": "string", + "depth": 0 + } + }, + "flow_execution_id": "string", + "flow_automation_task_id": "string" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot automation startExecution +``` + +With JSONata filter: + +```bash +epilot automation startExecution --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "9baf184f-bc81-4128-bca3-d974c90a12c4", + "execution_status": "pending", + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "entity_snapshot": { + "_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "_title": "string", + "_org": "string", + "_schema": "string", + "_tags": ["string"], + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + }, + "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f", + "flow_name": "Handle contact form", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "conditions": [ + { + "id": "string", + "schedule_id": "string", + "evaluationResult": true, + "statements": [] + } + ], + "schedules": [ + { + "id": "string", + "scheduleApiId": "string", + "numberOfUnits": 0, + "timePeriod": "minutes", + "timeRelation": "after", + "source": {} + } + ], + "actions": [ + { + "id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "name": "string", + "type": "map-entity", + "config": {}, + "allow_failure": true, + "created_automatically": true, + "is_bulk_action": true, + "reason": {}, + "condition_id": "string", + "schedule_id": "string", + "execution_status": "pending", + "started_at": "string", + "updated_at": "string", + "outputs": {}, + "error_output": {}, + "retry_strategy": "RETRY_AND_RESUME" + }, + { + "id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "name": "string", + "type": "trigger-workflow", + "config": {}, + "allow_failure": true, + "created_automatically": true, + "is_bulk_action": true, + "reason": {}, + "condition_id": "string", + "schedule_id": "string", + "execution_status": "pending", + "started_at": "string", + "updated_at": "string", + "outputs": {}, + "error_output": {}, + "retry_strategy": "RETRY_AND_RESUME" + } + ], + "resume_token": "eyJraWQiOiJrZXkifQ==", + "trigger_context": { + "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" + }, + "version": 2, + "trigger_event": { + "type": "manual", + "org_id": "123", + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "caller": { + "EpilotAuth": {} + } + }, + "workflow_context": { + "workflow_exec_id": "string", + "workflow_exec_task_id": "string", + "workflow_role": "trigger_workflow", + "_execution_chain": { + "parent_execution_id": "string", + "parent_task_id": "string", + "depth": 0 + } + } +} +``` + +
+ +--- + +### `bulkTriggerExecutions` + +Create a bulk job that triggers multiple automation executions + +`POST /v1/automation/executions/bulk-jobs` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation bulkTriggerExecutions +``` + +With request body: + +```bash +epilot automation bulkTriggerExecutions \ + -d '{ + "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f", + "entities_refs": [ + { + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "entity_schema": "string" + } + ], + "trigger_context": { + "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot automation bulkTriggerExecutions +``` + +With JSONata filter: + +```bash +epilot automation bulkTriggerExecutions --jsonata '$' +``` + +--- + +### `getBulkJob` + +Get the status of a bulk job that triggers multiple automation executions + +`GET /v1/automation/executions/bulk-jobs/{job_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `job_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation getBulkJob \ + -p job_id=8c086140-f33e-4bb7-a993-50c0f2402c7b +``` + +Using positional args for path parameters: + +```bash +epilot automation getBulkJob 8c086140-f33e-4bb7-a993-50c0f2402c7b +``` + +With JSONata filter: + +```bash +epilot automation getBulkJob -p job_id=8c086140-f33e-4bb7-a993-50c0f2402c7b --jsonata 'job_id' +``` + +
+Sample Response + +```json +{ + "job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b", + "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f", + "status": "approval", + "created_by": "1234", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "approved_at": "1970-01-01T00:00:00.000Z", + "trigger_context": { + "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" + }, + "task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b", + "report_file_entity_id": "string", + "entity_query": { + "type": "refs", + "data": [ + { + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "entity_schema": "string" + } + ] + }, + "pagination_state": { + "page_size": 0, + "pages_processed": 0, + "total_processed": 0, + "stable_query_id": "string", + "search_after": ["string"], + "has_more": true + }, + "execution_summary": [ + { + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "entity_schema": "string", + "execution_id": "9baf184f-bc81-4128-bca3-d974c90a12c4", + "execution_status": "pending", + "timestamp": "2025-10-30T15:56:47.842Z", + "error": "string" + } + ] +} +``` + +
+ +--- + +### `patchBulkJob` + +Approve / Cancel bulk job that triggers multiple automation executions + +`PATCH /v1/automation/executions/bulk-jobs/{job_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `job_id` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation patchBulkJob \ + -p job_id=8c086140-f33e-4bb7-a993-50c0f2402c7b \ + -d '{"action":"APPROVE","task_token":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot automation patchBulkJob 8c086140-f33e-4bb7-a993-50c0f2402c7b +``` + +Using stdin pipe: + +```bash +cat body.json | epilot automation patchBulkJob -p job_id=8c086140-f33e-4bb7-a993-50c0f2402c7b +``` + +With JSONata filter: + +```bash +epilot automation patchBulkJob -p job_id=8c086140-f33e-4bb7-a993-50c0f2402c7b --jsonata 'job_id' +``` + +
+Sample Response + +```json +{ + "job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b", + "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f", + "status": "approval", + "created_by": "1234", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "approved_at": "1970-01-01T00:00:00.000Z", + "trigger_context": { + "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" + }, + "task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b", + "report_file_entity_id": "string", + "entity_query": { + "type": "refs", + "data": [ + { + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "entity_schema": "string" + } + ] + }, + "pagination_state": { + "page_size": 0, + "pages_processed": 0, + "total_processed": 0, + "stable_query_id": "string", + "search_after": ["string"], + "has_more": true + }, + "execution_summary": [ + { + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "entity_schema": "string", + "execution_id": "9baf184f-bc81-4128-bca3-d974c90a12c4", + "execution_status": "pending", + "timestamp": "2025-10-30T15:56:47.842Z", + "error": "string" + } + ] +} +``` + +
+ +--- + +### `getExecution` + +Get automation execution + +`GET /v1/automation/executions/{execution_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation getExecution \ + -p execution_id=9baf184f-bc81-4128-bca3-d974c90a12c4 +``` + +Using positional args for path parameters: + +```bash +epilot automation getExecution 9baf184f-bc81-4128-bca3-d974c90a12c4 +``` + +With JSONata filter: + +```bash +epilot automation getExecution -p execution_id=9baf184f-bc81-4128-bca3-d974c90a12c4 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "9baf184f-bc81-4128-bca3-d974c90a12c4", + "execution_status": "pending", + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "entity_snapshot": { + "_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "_title": "string", + "_org": "string", + "_schema": "string", + "_tags": ["string"], + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + }, + "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f", + "flow_name": "Handle contact form", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "conditions": [ + { + "id": "string", + "schedule_id": "string", + "evaluationResult": true, + "statements": [] + } + ], + "schedules": [ + { + "id": "string", + "scheduleApiId": "string", + "numberOfUnits": 0, + "timePeriod": "minutes", + "timeRelation": "after", + "source": {} + } + ], + "actions": [ + { + "id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "name": "string", + "type": "map-entity", + "config": {}, + "allow_failure": true, + "created_automatically": true, + "is_bulk_action": true, + "reason": {}, + "condition_id": "string", + "schedule_id": "string", + "execution_status": "pending", + "started_at": "string", + "updated_at": "string", + "outputs": {}, + "error_output": {}, + "retry_strategy": "RETRY_AND_RESUME" + }, + { + "id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "name": "string", + "type": "trigger-workflow", + "config": {}, + "allow_failure": true, + "created_automatically": true, + "is_bulk_action": true, + "reason": {}, + "condition_id": "string", + "schedule_id": "string", + "execution_status": "pending", + "started_at": "string", + "updated_at": "string", + "outputs": {}, + "error_output": {}, + "retry_strategy": "RETRY_AND_RESUME" + } + ], + "resume_token": "eyJraWQiOiJrZXkifQ==", + "trigger_context": { + "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" + }, + "version": 2, + "trigger_event": { + "type": "manual", + "org_id": "123", + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "caller": { + "EpilotAuth": {} + } + }, + "workflow_context": { + "workflow_exec_id": "string", + "workflow_exec_task_id": "string", + "workflow_role": "trigger_workflow", + "_execution_chain": { + "parent_execution_id": "string", + "parent_task_id": "string", + "depth": 0 + } + } +} +``` + +
+ +--- + +### `cancelExecution` + +Cancel automation execution + +`DELETE /v1/automation/executions/{execution_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation cancelExecution \ + -p execution_id=9baf184f-bc81-4128-bca3-d974c90a12c4 +``` + +Using positional args for path parameters: + +```bash +epilot automation cancelExecution 9baf184f-bc81-4128-bca3-d974c90a12c4 +``` + +With JSONata filter: + +```bash +epilot automation cancelExecution -p execution_id=9baf184f-bc81-4128-bca3-d974c90a12c4 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "9baf184f-bc81-4128-bca3-d974c90a12c4", + "execution_status": "pending", + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "entity_snapshot": { + "_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "_title": "string", + "_org": "string", + "_schema": "string", + "_tags": ["string"], + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + }, + "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f", + "flow_name": "Handle contact form", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "conditions": [ + { + "id": "string", + "schedule_id": "string", + "evaluationResult": true, + "statements": [] + } + ], + "schedules": [ + { + "id": "string", + "scheduleApiId": "string", + "numberOfUnits": 0, + "timePeriod": "minutes", + "timeRelation": "after", + "source": {} + } + ], + "actions": [ + { + "id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "name": "string", + "type": "map-entity", + "config": {}, + "allow_failure": true, + "created_automatically": true, + "is_bulk_action": true, + "reason": {}, + "condition_id": "string", + "schedule_id": "string", + "execution_status": "pending", + "started_at": "string", + "updated_at": "string", + "outputs": {}, + "error_output": {}, + "retry_strategy": "RETRY_AND_RESUME" + }, + { + "id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "name": "string", + "type": "trigger-workflow", + "config": {}, + "allow_failure": true, + "created_automatically": true, + "is_bulk_action": true, + "reason": {}, + "condition_id": "string", + "schedule_id": "string", + "execution_status": "pending", + "started_at": "string", + "updated_at": "string", + "outputs": {}, + "error_output": {}, + "retry_strategy": "RETRY_AND_RESUME" + } + ], + "resume_token": "eyJraWQiOiJrZXkifQ==", + "trigger_context": { + "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" + }, + "version": 2, + "trigger_event": { + "type": "manual", + "org_id": "123", + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "caller": { + "EpilotAuth": {} + } + }, + "workflow_context": { + "workflow_exec_id": "string", + "workflow_exec_task_id": "string", + "workflow_role": "trigger_workflow", + "_execution_chain": { + "parent_execution_id": "string", + "parent_task_id": "string", + "depth": 0 + } + } +} +``` + +
+ +--- + +### `retriggerAction` + +Retry a specific automation execution action which failed / is stuck. + +`POST /v1/automation/executions/{execution_id}/{action_id}/retrigger` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string | Yes | Execution Id | +| `action_id` | path | string | Yes | Id of Action to retry. | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation retriggerAction \ + -p execution_id=9baf184f-bc81-4128-bca3-d974c90a12c4 \ + -p action_id=9ec3711b-db63-449c-b894-54d5bb622a8f \ + -d '{"condition_id":"string","retry_strategy":"RETRY_AND_RESUME"}' +``` + +Using positional args for path parameters: + +```bash +epilot automation retriggerAction 9baf184f-bc81-4128-bca3-d974c90a12c4 9ec3711b-db63-449c-b894-54d5bb622a8f +``` + +Using stdin pipe: + +```bash +cat body.json | epilot automation retriggerAction -p execution_id=9baf184f-bc81-4128-bca3-d974c90a12c4 -p action_id=9ec3711b-db63-449c-b894-54d5bb622a8f +``` + +With JSONata filter: + +```bash +epilot automation retriggerAction -p execution_id=9baf184f-bc81-4128-bca3-d974c90a12c4 -p action_id=9ec3711b-db63-449c-b894-54d5bb622a8f --jsonata '$' +``` + +--- + +### `resumeExecutionWithToken` + +Resume a paused automation execution using a unique resume token. + +`POST /v1/automation/public/executions:resume` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation resumeExecutionWithToken \ + -d '{"resume_token":"eyJraWQiOiJrZXkifQ=="}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot automation resumeExecutionWithToken +``` + +With JSONata filter: + +```bash +epilot automation resumeExecutionWithToken --jsonata 'execution' +``` + +
+Sample Response + +```json +{ + "execution": { + "id": "9baf184f-bc81-4128-bca3-d974c90a12c4", + "execution_status": "pending", + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "entity_snapshot": { + "_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "_title": "string", + "_org": "string", + "_schema": "string", + "_tags": ["string"], + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + }, + "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f", + "flow_name": "Handle contact form", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "conditions": [ + {} + ], + "schedules": [ + {} + ], + "actions": [ + {}, + {} + ], + "resume_token": "eyJraWQiOiJrZXkifQ==", + "trigger_context": { + "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" + }, + "version": 2, + "trigger_event": { + "type": "manual", + "org_id": "123", + "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74", + "caller": {} + }, + "workflow_context": { + "workflow_exec_id": "string", + "workflow_exec_task_id": "string", + "workflow_role": "trigger_workflow", + "_execution_chain": {} + } + }, + "resumedAction": { + "id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f", + "name": "string", + "type": "map-entity", + "config": { + "mapping_config": {}, + "target_schema": "string", + "target_unique": ["string"], + "mapping_attributes": [], + "relation_attributes": [], + "linkback_relation_attribute": "mapped_entities", + "linkback_relation_tags": ["string"] + }, + "allow_failure": true, + "created_automatically": true, + "is_bulk_action": true, + "reason": { + "message": "There are no registered portal users for the given emails, hence skipping the action", + "payload": {} + }, + "condition_id": "string", + "schedule_id": "string", + "execution_status": "pending", + "started_at": "string", + "updated_at": "string", + "outputs": {}, + "error_output": { + "error_code": "MAPPING_ERROR", + "error_reason": "string", + "error_info": {} + }, + "retry_strategy": "RETRY_AND_RESUME" + } +} +``` + +
+ +--- + +### `cancelSchedule` + +Cancel a scheduled automation + +`DELETE /v1/automation/executions/{execution_id}/schedules/{schedule_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string | Yes | | +| `schedule_id` | path | string | Yes | ID of the schedule to cancel | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot automation cancelSchedule \ + -p execution_id=9baf184f-bc81-4128-bca3-d974c90a12c4 \ + -p schedule_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot automation cancelSchedule 9baf184f-bc81-4128-bca3-d974c90a12c4 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot automation cancelSchedule -p execution_id=9baf184f-bc81-4128-bca3-d974c90a12c4 -p schedule_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "scheduleApiId": "string", + "numberOfUnits": 0, + "timePeriod": "minutes", + "timeRelation": "after", + "source": { + "id": "string", + "origin": "trigger", + "schema": "string", + "attribute": "string" + } +} +``` + +
+ +--- diff --git a/packages/cli/docs/billing.md b/packages/cli/docs/billing.md new file mode 100644 index 00000000..f089242c --- /dev/null +++ b/packages/cli/docs/billing.md @@ -0,0 +1,933 @@ +# Billing API + +- **Base URL:** `https://billing.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/billing](https://docs.epilot.io/api/billing) + +API to manage billing data for epilot contracts and orders + +## Quick Start + +```bash +# List available operations +epilot billing + +# Call an operation +epilot billing getBillingEvents +``` + +## Operations + +**Billing Events** +- [`getBillingEvents`](#getbillingevents) — Get and filter billing events such as installments and reimbursements. +- [`createBillingEvent`](#createbillingevent) — Create a new billing event. +- [`getBillingEvent`](#getbillingevent) — Get a single billing event by ID. +- [`updateBillingEvent`](#updatebillingevent) — Update an existing billing event. +- [`deleteBillingEvent`](#deletebillingevent) — Delete an existing billing event. +- [`getBillingEventByExternalId`](#getbillingeventbyexternalid) — Get a single billing event by External ID. + +**Contracts** +- [`createContractEntity`](#createcontractentity) — Create a new contract entity. +- [`updateContractEntity`](#updatecontractentity) — Update an existing contract entity. +- [`deleteContractEntity`](#deletecontractentity) — Delete an existing contract entity. + +**Balance** +- [`getCustomerBalance`](#getcustomerbalance) — Get total balance across all contracts and orders of a customer entity. + +### `getBillingEvents` + +Get and filter billing events such as installments and reimbursements. + +`GET /v1/billing/events` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `from` | query | number | No | | +| `size` | query | number | No | | +| `entity_id` | query | string[] | No | Entity ID to filter billing events by | +| `event_type` | query | "installment" \| "reimbursement" | No | | +| `date_after` | query | string (date-time) | No | | +| `date_before` | query | string (date-time) | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot billing getBillingEvents +``` + +With JSONata filter: + +```bash +epilot billing getBillingEvents --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 0, + "results": [ + { + "billing_amount": 10050, + "billing_amount_decimal": "100.50", + "billing_currency": "EUR", + "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e", + "contract": { + "$relation": [ + { + "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + ] + }, + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "string", + "_org": "string", + "_schema": "contact", + "_tags": ["string"], + "_created_at": "string", + "_updated_at": "string", + "type": "installment", + "due_date": "1970-01-01T00:00:00.000Z", + "paid_date": "1970-01-01T00:00:00.000Z" + } + ] +} +``` + +
+ +--- + +### `createBillingEvent` + +Create a new billing event. + +`POST /v1/billing/events` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot billing createBillingEvent +``` + +With request body: + +```bash +epilot billing createBillingEvent \ + -d '{ + "billing_amount": 10050, + "billing_amount_decimal": "100.50", + "billing_currency": "EUR", + "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e", + "contract": { + "$relation": [ + { + "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + ] + }, + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "string", + "_org": "string", + "_schema": "contact", + "_tags": ["string"], + "_created_at": "string", + "_updated_at": "string", + "type": "installment", + "due_date": "1970-01-01T00:00:00.000Z", + "paid_date": "1970-01-01T00:00:00.000Z" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot billing createBillingEvent +``` + +With JSONata filter: + +```bash +epilot billing createBillingEvent --jsonata '$' +``` + +
+Sample Response + +```json +{ + "billing_amount": 10050, + "billing_amount_decimal": "100.50", + "billing_currency": "EUR", + "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e", + "contract": { + "$relation": [ + { + "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + ] + }, + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "string", + "_org": "string", + "_schema": "contact", + "_tags": ["string"], + "_created_at": "string", + "_updated_at": "string", + "type": "installment", + "due_date": "1970-01-01T00:00:00.000Z", + "paid_date": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `getBillingEvent` + +Get a single billing event by ID. + +`GET /v1/billing/events/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | ID of the billing event to get | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot billing getBillingEvent \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot billing getBillingEvent 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot billing getBillingEvent -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "billing_amount": 10050, + "billing_amount_decimal": "100.50", + "billing_currency": "EUR", + "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e", + "contract": { + "$relation": [ + { + "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + ] + }, + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "string", + "_org": "string", + "_schema": "contact", + "_tags": ["string"], + "_created_at": "string", + "_updated_at": "string", + "type": "installment", + "due_date": "1970-01-01T00:00:00.000Z", + "paid_date": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `updateBillingEvent` + +Update an existing billing event. + +`PATCH /v1/billing/events/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | ID of the billing event to update | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot billing updateBillingEvent \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot billing updateBillingEvent \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "billing_amount": 10050, + "billing_amount_decimal": "100.50", + "billing_currency": "EUR", + "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e", + "contract": { + "$relation": [ + { + "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + ] + }, + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "string", + "_org": "string", + "_schema": "contact", + "_tags": ["string"], + "_created_at": "string", + "_updated_at": "string", + "type": "installment", + "due_date": "1970-01-01T00:00:00.000Z", + "paid_date": "1970-01-01T00:00:00.000Z" +}' +``` + +Using positional args for path parameters: + +```bash +epilot billing updateBillingEvent 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot billing updateBillingEvent -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot billing updateBillingEvent -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "billing_amount": 10050, + "billing_amount_decimal": "100.50", + "billing_currency": "EUR", + "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e", + "contract": { + "$relation": [ + { + "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + ] + }, + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "string", + "_org": "string", + "_schema": "contact", + "_tags": ["string"], + "_created_at": "string", + "_updated_at": "string", + "type": "installment", + "due_date": "1970-01-01T00:00:00.000Z", + "paid_date": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `deleteBillingEvent` + +Delete an existing billing event. + +`DELETE /v1/billing/events/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | ID of the billing event to delete | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot billing deleteBillingEvent \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot billing deleteBillingEvent 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot billing deleteBillingEvent -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `getBillingEventByExternalId` + +Get a single billing event by External ID. + +`GET /v1/billing/external/{external_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `external_id` | path | string | Yes | ID of the billing event to get | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot billing getBillingEventByExternalId \ + -p external_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot billing getBillingEventByExternalId 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot billing getBillingEventByExternalId -p external_id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "billing_amount": 10050, + "billing_amount_decimal": "100.50", + "billing_currency": "EUR", + "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e", + "contract": { + "$relation": [ + { + "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + ] + }, + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "string", + "_org": "string", + "_schema": "contact", + "_tags": ["string"], + "_created_at": "string", + "_updated_at": "string", + "type": "installment", + "due_date": "1970-01-01T00:00:00.000Z", + "paid_date": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `createContractEntity` + +Create a new contract entity. + +`POST /v1/billing/contracts` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot billing createContractEntity +``` + +With request body: + +```bash +epilot billing createContractEntity \ + -d '{ + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "string", + "_org": "string", + "_schema": "contact", + "_tags": ["string"], + "_created_at": "string", + "_updated_at": "string", + "contract_name": "Grid Contract", + "contract_number": "12345", + "status": "approved", + "description": "This contract is for the supply of widgets.", + "account_number": "67890", + "branch": "power", + "billing_address": "123 Main St, Anytown", + "delivery_address": "456 Elm St, Anytown", + "additional_addresses": "789 Oak St, Anytown", + "termination_date": "2022-01-01", + "termination_reason": "Non-payment", + "billing_period": "monthly", + "billing_duration_amount": 30, + "renewal_duration_amount": 365, + "renewal_duration_unit": "years", + "notice_time_amount": 30, + "notice_time_unit": "months", + "start_date": "2021-01-01", + "billing_due_day": 2, + "installment_amount": 10050, + "balance": 8990, + "balance_currency": "EUR" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot billing createContractEntity +``` + +With JSONata filter: + +```bash +epilot billing createContractEntity --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "string", + "_org": "string", + "_schema": "contact", + "_tags": ["string"], + "_created_at": "string", + "_updated_at": "string", + "contract_name": "Grid Contract", + "contract_number": "12345", + "status": "approved", + "description": "This contract is for the supply of widgets.", + "account_number": "67890", + "branch": "power", + "billing_address": "123 Main St, Anytown", + "delivery_address": "456 Elm St, Anytown", + "additional_addresses": "789 Oak St, Anytown", + "termination_date": "2022-01-01", + "termination_reason": "Non-payment", + "billing_period": "monthly", + "billing_duration_amount": 30, + "renewal_duration_amount": 365, + "renewal_duration_unit": "years", + "notice_time_amount": 30, + "notice_time_unit": "months", + "start_date": "2021-01-01", + "billing_due_day": 2, + "installment_amount": 10050, + "balance": 8990, + "balance_currency": "EUR" +} +``` + +
+ +--- + +### `updateContractEntity` + +Update an existing contract entity. + +`PATCH /v1/billing/contracts/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | ID of the contract entity to update | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot billing updateContractEntity \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot billing updateContractEntity \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "string", + "_org": "string", + "_schema": "contact", + "_tags": ["string"], + "_created_at": "string", + "_updated_at": "string", + "contract_name": "Grid Contract", + "contract_number": "12345", + "status": "approved", + "description": "This contract is for the supply of widgets.", + "account_number": "67890", + "branch": "power", + "billing_address": "123 Main St, Anytown", + "delivery_address": "456 Elm St, Anytown", + "additional_addresses": "789 Oak St, Anytown", + "termination_date": "2022-01-01", + "termination_reason": "Non-payment", + "billing_period": "monthly", + "billing_duration_amount": 30, + "renewal_duration_amount": 365, + "renewal_duration_unit": "years", + "notice_time_amount": 30, + "notice_time_unit": "months", + "start_date": "2021-01-01", + "billing_due_day": 2, + "installment_amount": 10050, + "balance": 8990, + "balance_currency": "EUR" +}' +``` + +Using positional args for path parameters: + +```bash +epilot billing updateContractEntity 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot billing updateContractEntity -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot billing updateContractEntity -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "string", + "_org": "string", + "_schema": "contact", + "_tags": ["string"], + "_created_at": "string", + "_updated_at": "string", + "contract_name": "Grid Contract", + "contract_number": "12345", + "status": "approved", + "description": "This contract is for the supply of widgets.", + "account_number": "67890", + "branch": "power", + "billing_address": "123 Main St, Anytown", + "delivery_address": "456 Elm St, Anytown", + "additional_addresses": "789 Oak St, Anytown", + "termination_date": "2022-01-01", + "termination_reason": "Non-payment", + "billing_period": "monthly", + "billing_duration_amount": 30, + "renewal_duration_amount": 365, + "renewal_duration_unit": "years", + "notice_time_amount": 30, + "notice_time_unit": "months", + "start_date": "2021-01-01", + "billing_due_day": 2, + "installment_amount": 10050, + "balance": 8990, + "balance_currency": "EUR" +} +``` + +
+ +--- + +### `deleteContractEntity` + +Delete an existing contract entity. + +`DELETE /v1/billing/contracts/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | ID of the contract entity to delete | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot billing deleteContractEntity \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot billing deleteContractEntity 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot billing deleteContractEntity -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `getCustomerBalance` + +Get total balance across all contracts and orders of a customer entity. + +`GET /v1/billing/customers/{id}/balance` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Customer entity ID (contact or account) | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot billing getCustomerBalance \ + -p id=1e3f0d58-69d2-4dbb-9a43-3ee63d862e8e +``` + +Using positional args for path parameters: + +```bash +epilot billing getCustomerBalance 1e3f0d58-69d2-4dbb-9a43-3ee63d862e8e +``` + +With JSONata filter: + +```bash +epilot billing getCustomerBalance -p id=1e3f0d58-69d2-4dbb-9a43-3ee63d862e8e --jsonata 'balance' +``` + +
+Sample Response + +```json +{ + "balance": 8990, + "balance_decimal": "89.90", + "balance_currency": "EUR" +} +``` + +
+ +--- diff --git a/packages/cli/docs/blueprint-manifest.md b/packages/cli/docs/blueprint-manifest.md new file mode 100644 index 00000000..535d907f --- /dev/null +++ b/packages/cli/docs/blueprint-manifest.md @@ -0,0 +1,2468 @@ +# Blueprint Manifest API + +- **Base URL:** `https://blueprint-manifest.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/blueprint-manifest](https://docs.epilot.io/api/blueprint-manifest) + +Service to create and install Blueprint Manifest files + +## Quick Start + +```bash +# List available operations +epilot blueprint-manifest + +# Call an operation +epilot blueprint-manifest getJob -p job_id=4854bb2a-94f9-424d-a968-3fb17fb0bf89 +``` + +## Operations + +**Import** +- [`uploadManifest`](#uploadmanifest) — Create pre-signed S3 URL to upload a manifest file. + +**Blueprints** +- [`listBlueprints`](#listblueprints) — List Custom and Installed Blueprints +- [`createBlueprint`](#createblueprint) — Create a Blueprint +- [`listInstalledMarketplaceBlueprints`](#listinstalledmarketplaceblueprints) — List installed Marketplace Blueprints for the organization. +- [`preInstallBlueprint`](#preinstallblueprint) — Pre-install a Blueprint based on a blueprint file +- [`getBlueprintPreview`](#getblueprintpreview) — Get Blueprint Preview by ID +- [`installBlueprint`](#installblueprint) — Kick off a new blueprint installation job. Returns 202 Accepted with Location header pointing to the job resource +- [`getBlueprint`](#getblueprint) — Get Blueprint by ID +- [`updateBlueprint`](#updateblueprint) — Update a Blueprint +- [`deleteBlueprint`](#deleteblueprint) — Delete a Blueprint +- [`validateBlueprint`](#validateblueprint) — Start a blueprint validation job. Validates Terraform for the blueprint (all types). +- [`exportBlueprint`](#exportblueprint) — Kick off a new blueprint export job. Returns 202 Accepted with Location header pointing to the job resource. +- [`formatBlueprintDescription`](#formatblueprintdescription) — Format a blueprint description as markdown using AI. +- [`addBlueprintResource`](#addblueprintresource) — Add a resource to a Blueprint +- [`syncDependencies`](#syncdependencies) — Sync dependencies of all root resources in a Blueprint +- [`bulkAddBlueprintResources`](#bulkaddblueprintresources) — Bulk Add resources in a Blueprint +- [`bulkUpdateBlueprintResources`](#bulkupdateblueprintresources) — Bulk update resources in a Blueprint +- [`bulkDeleteBlueprintResources`](#bulkdeleteblueprintresources) — Bulk delete resources in a Blueprint +- [`updateBlueprintResource`](#updateblueprintresource) — Update a resource in a Blueprint +- [`deleteBlueprintResource`](#deleteblueprintresource) — Delete a resource from a Blueprint + +**Jobs** +- [`listBlueprintJobs`](#listblueprintjobs) — List all blueprint jobs +- [`getBlueprintJob`](#getblueprintjob) — Poll current state of a job. +- [`continueInstallationJob`](#continueinstallationjob) — Continue an installation job if it is waiting for user action. +- [`cancelBlueprintJob`](#cancelblueprintjob) — Cancel a blueprint job if it is still running. + +### `uploadManifest` + +Create pre-signed S3 URL to upload a manifest file. + +`POST /v1/blueprint-manifest:uploadManifest` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest uploadManifest \ + -d '{"filename":"example.manifest.zip"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot blueprint-manifest uploadManifest +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest uploadManifest --jsonata 's3ref' +``` + +
+Sample Response + +```json +{ + "s3ref": { + "bucket": "blueprint-manifest-prod-blueprintsv2bucket-sybpsryropzw", + "key": "templates/main.tf" + }, + "upload_url": "https://epilot-dev-blueprints.s3.eu-central-1.amazonaws.com/templates/document.pdf" +} +``` + +
+ +--- + +### `listBlueprints` + +List Custom and Installed Blueprints + +`GET /v2/blueprint-manifest/blueprints` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `archived` | query | boolean | No | Filter blueprints by archived status. If true, returns only archived blueprints. If false or not provided, returns only non-archived blueprints. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest listBlueprints +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest listBlueprints --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "total": 1, + "results": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "title": "string", + "slug": "string", + "description": { + "preinstall": "This is the content of the preinstall.md file which contains the blueprint description.\n", + "postinstall": "This is the content of the postinstall.md file\n" + }, + "version": "string", + "deployments": [ + { + "source_org_id": "string", + "source_blueprint_id": "string", + "destination_org_id": "string", + "destination_blueprint_id": "string", + "triggered_at": "1970-01-01T00:00:00.000Z" + } + ], + "is_verified": true, + "installation_status": "IN_PROGRESS", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "updated_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "installation_job_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "source_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "archived": false, + "docs_url": "string", + "recommended_apps": ["string"], + "required_features": { + "enabled": ["string"], + "disabled": ["string"] + }, + "zip_file_name": "string", + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ], + "source_type": "string" + } + ] +} +``` + +
+ +--- + +### `createBlueprint` + +Create a Blueprint + +`POST /v2/blueprint-manifest/blueprints` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest createBlueprint +``` + +With request body: + +```bash +epilot blueprint-manifest createBlueprint \ + -d '{ + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "title": "string", + "slug": "string", + "description": { + "preinstall": "This is the content of the preinstall.md file which contains the blueprint description.\n", + "postinstall": "This is the content of the postinstall.md file\n" + }, + "version": "string", + "deployments": [ + { + "source_org_id": "string", + "source_blueprint_id": "string", + "destination_org_id": "string", + "destination_blueprint_id": "string", + "triggered_at": "1970-01-01T00:00:00.000Z" + } + ], + "is_verified": true, + "installation_status": "IN_PROGRESS", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "updated_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "installation_job_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "source_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "archived": false, + "docs_url": "string", + "recommended_apps": ["string"], + "required_features": { + "enabled": ["string"], + "disabled": ["string"] + }, + "zip_file_name": "string", + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ], + "source_type": "string" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot blueprint-manifest createBlueprint +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest createBlueprint --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "title": "string", + "slug": "string", + "description": { + "preinstall": "This is the content of the preinstall.md file which contains the blueprint description.\n", + "postinstall": "This is the content of the postinstall.md file\n" + }, + "version": "string", + "deployments": [ + { + "source_org_id": "string", + "source_blueprint_id": "string", + "destination_org_id": "string", + "destination_blueprint_id": "string", + "triggered_at": "1970-01-01T00:00:00.000Z" + } + ], + "is_verified": true, + "installation_status": "IN_PROGRESS", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "updated_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "installation_job_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "source_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "archived": false, + "docs_url": "string", + "recommended_apps": ["string"], + "required_features": { + "enabled": ["string"], + "disabled": ["string"] + }, + "zip_file_name": "string", + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ], + "source_type": "string" +} +``` + +
+ +--- + +### `listInstalledMarketplaceBlueprints` + +List installed Marketplace Blueprints for the organization. + +`GET /v2/blueprint-manifest/blueprints:marketplace` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest listInstalledMarketplaceBlueprints +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest listInstalledMarketplaceBlueprints --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "total": 1, + "results": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "slug": "solar-b2b", + "version": "v1.0.0", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "has_update_available": true, + "latest_marketplace_version": "v2.0.0", + "installation_link": "string" + } + ] +} +``` + +
+ +--- + +### `preInstallBlueprint` + +Pre-install a Blueprint based on a blueprint file + +`POST /v2/blueprint-manifest/blueprints:pre-install` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest preInstallBlueprint \ + -d '{"blueprint_file":"string","source_blueprint_type":"marketplace","slug":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot blueprint-manifest preInstallBlueprint +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest preInstallBlueprint --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "org_id": "string", + "title": "string", + "description": { + "preinstall": "string" + }, + "version": "string", + "slug": "string", + "source_type": "marketplace", + "blueprint_file_s3_key": "string", + "is_verified": true, + "docs_url": "string", + "recommended_apps": ["string"], + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "is_updating": true, + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ] +} +``` + +
+ +--- + +### `getBlueprintPreview` + +Get Blueprint Preview by ID + +`GET /v2/blueprint-manifest/blueprints:preview/{preview_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `preview_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest getBlueprintPreview \ + -p preview_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest getBlueprintPreview 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest getBlueprintPreview -p preview_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "org_id": "string", + "title": "string", + "description": { + "preinstall": "string" + }, + "version": "string", + "slug": "string", + "source_type": "marketplace", + "blueprint_file_s3_key": "string", + "is_verified": true, + "docs_url": "string", + "recommended_apps": ["string"], + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "is_updating": true, + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ] +} +``` + +
+ +--- + +### `installBlueprint` + +Kick off a new blueprint installation job. Returns 202 Accepted with Location header pointing to the job resource + +`POST /v2/blueprint-manifest/blueprint:install` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest installBlueprint +``` + +With request body: + +```bash +epilot blueprint-manifest installBlueprint \ + -d '{ + "source_org_id": "string", + "source_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "source_blueprint_file": "string", + "destination_org_id": "string", + "destination_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "options": { + "resources_to_ignore": ["string"] + }, + "mode": "simple", + "source_blueprint_type": "marketplace", + "slug": "string" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot blueprint-manifest installBlueprint +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest installBlueprint --jsonata '$' +``` + +--- + +### `getBlueprint` + +Get Blueprint by ID + +`GET /v2/blueprint-manifest/blueprints/{blueprint_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `blueprint_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest getBlueprint \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest getBlueprint c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest getBlueprint -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "title": "string", + "slug": "string", + "description": { + "preinstall": "This is the content of the preinstall.md file which contains the blueprint description.\n", + "postinstall": "This is the content of the postinstall.md file\n" + }, + "version": "string", + "deployments": [ + { + "source_org_id": "string", + "source_blueprint_id": "string", + "destination_org_id": "string", + "destination_blueprint_id": "string", + "triggered_at": "1970-01-01T00:00:00.000Z" + } + ], + "is_verified": true, + "installation_status": "IN_PROGRESS", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "updated_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "installation_job_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "source_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "archived": false, + "docs_url": "string", + "recommended_apps": ["string"], + "required_features": { + "enabled": ["string"], + "disabled": ["string"] + }, + "zip_file_name": "string", + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ], + "source_type": "string" +} +``` + +
+ +--- + +### `updateBlueprint` + +Update a Blueprint + +`PUT /v2/blueprint-manifest/blueprints/{blueprint_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `blueprint_id` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest updateBlueprint \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With request body: + +```bash +epilot blueprint-manifest updateBlueprint \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 \ + -d '{ + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "title": "string", + "slug": "string", + "description": { + "preinstall": "This is the content of the preinstall.md file which contains the blueprint description.\n", + "postinstall": "This is the content of the postinstall.md file\n" + }, + "version": "string", + "deployments": [ + { + "source_org_id": "string", + "source_blueprint_id": "string", + "destination_org_id": "string", + "destination_blueprint_id": "string", + "triggered_at": "1970-01-01T00:00:00.000Z" + } + ], + "is_verified": true, + "installation_status": "IN_PROGRESS", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "updated_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "installation_job_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "source_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "archived": false, + "docs_url": "string", + "recommended_apps": ["string"], + "required_features": { + "enabled": ["string"], + "disabled": ["string"] + }, + "zip_file_name": "string", + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ], + "source_type": "string" +}' +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest updateBlueprint c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot blueprint-manifest updateBlueprint -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest updateBlueprint -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "title": "string", + "slug": "string", + "description": { + "preinstall": "This is the content of the preinstall.md file which contains the blueprint description.\n", + "postinstall": "This is the content of the postinstall.md file\n" + }, + "version": "string", + "deployments": [ + { + "source_org_id": "string", + "source_blueprint_id": "string", + "destination_org_id": "string", + "destination_blueprint_id": "string", + "triggered_at": "1970-01-01T00:00:00.000Z" + } + ], + "is_verified": true, + "installation_status": "IN_PROGRESS", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "updated_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "installation_job_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "source_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "archived": false, + "docs_url": "string", + "recommended_apps": ["string"], + "required_features": { + "enabled": ["string"], + "disabled": ["string"] + }, + "zip_file_name": "string", + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ], + "source_type": "string" +} +``` + +
+ +--- + +### `deleteBlueprint` + +Delete a Blueprint + +`DELETE /v2/blueprint-manifest/blueprints/{blueprint_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `blueprint_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest deleteBlueprint \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest deleteBlueprint c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest deleteBlueprint -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "title": "string", + "slug": "string", + "description": { + "preinstall": "This is the content of the preinstall.md file which contains the blueprint description.\n", + "postinstall": "This is the content of the postinstall.md file\n" + }, + "version": "string", + "deployments": [ + { + "source_org_id": "string", + "source_blueprint_id": "string", + "destination_org_id": "string", + "destination_blueprint_id": "string", + "triggered_at": "1970-01-01T00:00:00.000Z" + } + ], + "is_verified": true, + "installation_status": "IN_PROGRESS", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "updated_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "installation_job_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "source_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "archived": false, + "docs_url": "string", + "recommended_apps": ["string"], + "required_features": { + "enabled": ["string"], + "disabled": ["string"] + }, + "zip_file_name": "string", + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ], + "source_type": "string" +} +``` + +
+ +--- + +### `validateBlueprint` + +Start a blueprint validation job. Validates Terraform for the blueprint (all types). + +`POST /v2/blueprint-manifest/blueprints/{blueprint_id}/validate` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `blueprint_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest validateBlueprint \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest validateBlueprint c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest validateBlueprint -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata '$' +``` + +--- + +### `exportBlueprint` + +Kick off a new blueprint export job. Returns 202 Accepted with Location header pointing to the job resource. + +`POST /v2/blueprint-manifest/blueprints/{blueprint_id}:export` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `blueprint_id` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest exportBlueprint \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 \ + -d '{"destination_org_id":"string","destination_blueprint_id":"string","validate":true}' +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest exportBlueprint c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot blueprint-manifest exportBlueprint -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest exportBlueprint -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata '$' +``` + +--- + +### `formatBlueprintDescription` + +Format a blueprint description as markdown using AI. + +`POST /v2/blueprint-manifest/blueprints/{blueprint_id}:format-description` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `blueprint_id` | path | string | Yes | | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest formatBlueprintDescription \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 \ + -d '{"text":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest formatBlueprintDescription c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot blueprint-manifest formatBlueprintDescription -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest formatBlueprintDescription -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata 'markdown' +``` + +
+Sample Response + +```json +{ + "markdown": "string" +} +``` + +
+ +--- + +### `addBlueprintResource` + +Add a resource to a Blueprint + +`POST /v2/blueprint-manifest/blueprints/{blueprint_id}/resources` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `blueprint_id` | path | string | Yes | | +| `add_dependencies` | query | boolean | No | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest addBlueprintResource \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With request body: + +```bash +epilot blueprint-manifest addBlueprintResource \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 \ + -d '{ + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest addBlueprintResource c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot blueprint-manifest addBlueprintResource -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest addBlueprintResource -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata 'resources' +``` + +
+Sample Response + +```json +{ + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ] +} +``` + +
+ +--- + +### `syncDependencies` + +Sync dependencies of all root resources in a Blueprint + +`POST /v2/blueprint-manifest/blueprints/{blueprint_id}/resources:syncDependencies` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `blueprint_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest syncDependencies \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest syncDependencies c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest syncDependencies -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata '$' +``` + +--- + +### `bulkAddBlueprintResources` + +Bulk Add resources in a Blueprint + +`POST /v2/blueprint-manifest/blueprints/{blueprint_id}/resources/bulk` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `blueprint_id` | path | string | Yes | | +| `add_dependencies` | query | boolean | No | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest bulkAddBlueprintResources \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With request body: + +```bash +epilot blueprint-manifest bulkAddBlueprintResources \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 \ + -d '[ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } +]' +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest bulkAddBlueprintResources c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot blueprint-manifest bulkAddBlueprintResources -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest bulkAddBlueprintResources -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata 'resources' +``` + +
+Sample Response + +```json +{ + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ] +} +``` + +
+ +--- + +### `bulkUpdateBlueprintResources` + +Bulk update resources in a Blueprint + +`PUT /v2/blueprint-manifest/blueprints/{blueprint_id}/resources/bulk` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `blueprint_id` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest bulkUpdateBlueprintResources \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With request body: + +```bash +epilot blueprint-manifest bulkUpdateBlueprintResources \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 \ + -d '[ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } +]' +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest bulkUpdateBlueprintResources c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot blueprint-manifest bulkUpdateBlueprintResources -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest bulkUpdateBlueprintResources -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata 'resources' +``` + +
+Sample Response + +```json +{ + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ] +} +``` + +
+ +--- + +### `bulkDeleteBlueprintResources` + +Bulk delete resources in a Blueprint + +`DELETE /v2/blueprint-manifest/blueprints/{blueprint_id}/resources/bulk` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `blueprint_id` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest bulkDeleteBlueprintResources \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 \ + -d '["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"]' +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest bulkDeleteBlueprintResources c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot blueprint-manifest bulkDeleteBlueprintResources -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest bulkDeleteBlueprintResources -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata 'resources' +``` + +
+Sample Response + +```json +{ + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ] +} +``` + +
+ +--- + +### `updateBlueprintResource` + +Update a resource in a Blueprint + +`PUT /v2/blueprint-manifest/blueprints/{blueprint_id}/resources/{resource_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `blueprint_id` | path | string | Yes | | +| `resource_id` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest updateBlueprintResource \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 \ + -p resource_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With request body: + +```bash +epilot blueprint-manifest updateBlueprintResource \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 \ + -p resource_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 \ + -d '{ + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest updateBlueprintResource c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot blueprint-manifest updateBlueprintResource -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 -p resource_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest updateBlueprintResource -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 -p resource_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata 'resources' +``` + +
+Sample Response + +```json +{ + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ] +} +``` + +
+ +--- + +### `deleteBlueprintResource` + +Delete a resource from a Blueprint + +`DELETE /v2/blueprint-manifest/blueprints/{blueprint_id}/resources/{resource_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `blueprint_id` | path | string | Yes | | +| `resource_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest deleteBlueprintResource \ + -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 \ + -p resource_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest deleteBlueprintResource c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest deleteBlueprintResource -p blueprint_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 -p resource_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata 'resources' +``` + +
+Sample Response + +```json +{ + "resources": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "name": "string", + "type": "designbuilder", + "address": "string", + "is_root": true, + "is_ready": true, + "is_hidden": true, + "is_disabled": false, + "hard_dependencies": ["designbuilder"], + "parent_resource_ids": ["c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"], + "depends_on_addresses": ["string"], + "impact_on_install": ["create"], + "impact_on_install_reason": ["string"] + } + ] +} +``` + +
+ +--- + +### `listBlueprintJobs` + +List all blueprint jobs + +`GET /v2/blueprint-manifest/jobs` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest listBlueprintJobs +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest listBlueprintJobs --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "total": 1, + "results": [ + { + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "events": [ + { + "timestamp": "1970-01-01T00:00:00.000Z", + "message": "string", + "errors": [ + { + "error": "string", + "code": "dependency_extraction", + "data": { + "formattedResource": { + "id": "string", + "name": "string", + "type": "string" + }, + "resource": "string", + "resourceDependency": "string", + "resources": ["string"], + "addresses": ["string"], + "originalError": "string" + } + } + ], + "level": "info", + "data": { + "installed_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "export_job_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "resources": 0 + } + } + ], + "triggered_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "status": "IN_PROGRESS", + "download_file": { + "bucket": "blueprint-manifest-prod-blueprintsv2bucket-sybpsryropzw", + "key": "templates/main.tf" + } + } + ] +} +``` + +
+ +--- + +### `getBlueprintJob` + +Poll current state of a job. + +`GET /v2/blueprint-manifest/jobs/{job_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `job_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest getBlueprintJob \ + -p job_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest getBlueprintJob c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest getBlueprintJob -p job_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "events": [ + { + "timestamp": "1970-01-01T00:00:00.000Z", + "message": "string", + "errors": [ + { + "error": "string", + "code": "dependency_extraction", + "data": { + "formattedResource": { + "id": "string", + "name": "string", + "type": "string" + }, + "resource": "string", + "resourceDependency": "string", + "resources": ["string"], + "addresses": ["string"], + "originalError": "string" + } + } + ], + "level": "info", + "data": { + "installed_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "export_job_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "resources": 0 + } + } + ], + "triggered_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "status": "IN_PROGRESS", + "download_file": { + "bucket": "blueprint-manifest-prod-blueprintsv2bucket-sybpsryropzw", + "key": "templates/main.tf" + } +} +``` + +
+ +--- + +### `continueInstallationJob` + +Continue an installation job if it is waiting for user action. + +`POST /v2/blueprint-manifest/jobs/{job_id}:continue` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `job_id` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest continueInstallationJob \ + -p job_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 \ + -d '{"resources_to_ignore":["string"]}' +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest continueInstallationJob c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot blueprint-manifest continueInstallationJob -p job_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest continueInstallationJob -p job_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "events": [ + { + "timestamp": "1970-01-01T00:00:00.000Z", + "message": "string", + "errors": [ + { + "error": "string", + "code": "dependency_extraction", + "data": { + "formattedResource": { + "id": "string", + "name": "string", + "type": "string" + }, + "resource": "string", + "resourceDependency": "string", + "resources": ["string"], + "addresses": ["string"], + "originalError": "string" + } + } + ], + "level": "info", + "data": { + "installed_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "export_job_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "resources": 0 + } + } + ], + "triggered_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "source_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "source_blueprint_type": "custom", + "source_org_id": "string", + "source_blueprint_file": "string", + "destination_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "destination_org_id": "string", + "slug": "string", + "status": "IN_PROGRESS" +} +``` + +
+ +--- + +### `cancelBlueprintJob` + +Cancel a blueprint job if it is still running. + +`POST /v2/blueprint-manifest/jobs/{job_id}:cancel` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `job_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot blueprint-manifest cancelBlueprintJob \ + -p job_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +Using positional args for path parameters: + +```bash +epilot blueprint-manifest cancelBlueprintJob c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 +``` + +With JSONata filter: + +```bash +epilot blueprint-manifest cancelBlueprintJob -p job_id=c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "events": [ + { + "timestamp": "1970-01-01T00:00:00.000Z", + "message": "string", + "errors": [ + { + "error": "string", + "code": "dependency_extraction", + "data": { + "formattedResource": { + "id": "string", + "name": "string", + "type": "string" + }, + "resource": "string", + "resourceDependency": "string", + "resources": ["string"], + "addresses": ["string"], + "originalError": "string" + } + } + ], + "level": "info", + "data": { + "installed_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "export_job_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "resources": 0 + } + } + ], + "triggered_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "name": "manifest@epilot.cloud", + "org_id": "911690", + "user_id": "11001045", + "token_id": "api_5ZugdRXasLfWBypHi93Fk" + }, + "blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", + "status": "IN_PROGRESS", + "download_file": { + "bucket": "blueprint-manifest-prod-blueprintsv2bucket-sybpsryropzw", + "key": "templates/main.tf" + } +} +``` + +
+ +--- + +## Deprecated Operations + +- ~~`getJob`~~ GET `/v1/blueprint-manifest/jobs/{job_id}` +- ~~`createExport`~~ POST `/v1/blueprint-manifest/jobs:createExport` +- ~~`exportManifest`~~ POST `/v1/blueprint-manifest/jobs/{job_id}:exportManifest` +- ~~`createPlan`~~ POST `/v1/blueprint-manifest/jobs:createPlan` +- ~~`applyPlan`~~ POST `/v1/blueprint-manifest/jobs/{job_id}:applyPlan` +- ~~`listInstalledManifests`~~ GET `/v1/blueprint-manifest/manifests` +- ~~`getManifest`~~ GET `/v1/blueprint-manifest/manifests/{manifest_id}` +- ~~`updateManifest`~~ PUT `/v1/blueprint-manifest/manifests/{manifest_id}` +- ~~`deleteManifest`~~ DELETE `/v1/blueprint-manifest/manifests/{manifest_id}` diff --git a/packages/cli/docs/consent.md b/packages/cli/docs/consent.md new file mode 100644 index 00000000..3e4af763 --- /dev/null +++ b/packages/cli/docs/consent.md @@ -0,0 +1,245 @@ +# Consent API + +- **Base URL:** `https://consent.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/consent](https://docs.epilot.io/api/consent) + +Consent Management for epilot customer entities + +## Quick Start + +```bash +# List available operations +epilot consent + +# Call an operation +epilot consent publishConsentEvent +``` + +## Operations + +**consent** +- [`publishConsentEvent`](#publishconsentevent) — Publishes consent event on event bus, which appends to consent store +- [`listConsentEvents`](#listconsentevents) — List opt-ins and opt-outs by customer identifier +- [`handleOptInWithToken`](#handleoptinwithtoken) — Endpoint to handle opt-in links + +### `publishConsentEvent` + +Publishes consent event on event bus, which appends to consent store + +`POST /v1/consent/publish` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot consent publishConsentEvent +``` + +With request body: + +```bash +epilot consent publishConsentEvent \ + -d '{ + "type": "OPT_IN", + "topic": "EMAIL_MARKETING", + "source": "www.frontend.epilot.cloud", + "identifier": "exampleuser@epilot.cloud", + "meta": { + "double_opt_in": true, + "source_type": "journey", + "source_id": "0e4f2a26-14f0-4ada-9294-a7d7a0b9b214", + "ip_address": "1.1.1.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot consent publishConsentEvent +``` + +With JSONata filter: + +```bash +epilot consent publishConsentEvent --jsonata 'type' +``` + +
+Sample Response + +```json +{ + "type": "OPT_IN", + "created_at": "1970-01-01T00:00:00.000Z", + "topic": "EMAIL_MARKETING", + "source": "www.frontend.epilot.cloud", + "organization_id": "123", + "identifier": "exampleuser@epilot.cloud", + "meta": { + "double_opt_in": true, + "source_type": "journey", + "source_id": "0e4f2a26-14f0-4ada-9294-a7d7a0b9b214", + "ip_address": "1.1.1.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + } +} +``` + +
+ +--- + +### `listConsentEvents` + +List opt-ins and opt-outs by customer identifier + +`GET /v1/consent/{identifier}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `identifier` | path | string | Yes | | +| `topic` | query | string | No | | +| `limit` | query | number | No | | +| `from` | query | number | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot consent listConsentEvents \ + -p identifier=exampleuser@epilot.cloud +``` + +Using positional args for path parameters: + +```bash +epilot consent listConsentEvents exampleuser@epilot.cloud +``` + +With JSONata filter: + +```bash +epilot consent listConsentEvents -p identifier=exampleuser@epilot.cloud --jsonata 'events' +``` + +
+Sample Response + +```json +{ + "events": [ + { + "type": "OPT_IN", + "created_at": "1970-01-01T00:00:00.000Z", + "topic": "EMAIL_MARKETING", + "source": "www.frontend.epilot.cloud", + "organization_id": "123", + "identifier": "exampleuser@epilot.cloud", + "meta": { + "double_opt_in": true, + "source_type": "journey", + "source_id": "0e4f2a26-14f0-4ada-9294-a7d7a0b9b214", + "ip_address": "1.1.1.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + } + } + ], + "total": 1 +} +``` + +
+ +--- + +### `handleOptInWithToken` + +Endpoint to handle opt-in links + +`GET /v1/opt-in/{token}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `token` | path | string | Yes | | +| `lang` | query | string | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot consent handleOptInWithToken \ + -p token=example +``` + +Using positional args for path parameters: + +```bash +epilot consent handleOptInWithToken example +``` + +With JSONata filter: + +```bash +epilot consent handleOptInWithToken -p token=example --jsonata '$' +``` + +--- diff --git a/packages/cli/docs/customer-portal.md b/packages/cli/docs/customer-portal.md new file mode 100644 index 00000000..e38e90ce --- /dev/null +++ b/packages/cli/docs/customer-portal.md @@ -0,0 +1,12366 @@ +# Portal API + +- **Base URL:** `https://customer-portal-api.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/customer-portal](https://docs.epilot.io/api/customer-portal) + +Backend for epilot portals - End Customer Portal & Installer Portal + +## Quick Start + +```bash +# List available operations +epilot customer-portal + +# Call an operation +epilot customer-portal upsertPortal -p origin=example +``` + +## Operations + +**ECP Admin** +- [`upsertPortal`](#upsertportal) — Upserts the settings for a portal of an organization. +- [`getPortalConfig`](#getportalconfig) — Retrieves the portal configuration. +- [`deletePortal`](#deleteportal) — Deletes the portal. +- [`getPortalExtensions`](#getportalextensions) — Retrieves the installed portal extensions. +- [`getPortalExtensionsV3`](#getportalextensionsv3) — Retrieves the installed portal extensions. +- [`getExternalLinks`](#getexternallinks) — Retrieves the portal configuration external links. +- [`getExternalLinksV3`](#getexternallinksv3) — Retrieves the portal configuration external links. +- [`getOrgPortalConfig`](#getorgportalconfig) — Retrieves the portal configuration for the organization. +- [`getOrgPortalConfigV3`](#getorgportalconfigv3) — Retrieves the portal configuration for the organization. +- [`getAllPortalConfigs`](#getallportalconfigs) — Retrieves all portal configurations. +- [`getEmailTemplates`](#getemailtemplates) — Retrieves the email templates of a portal +- [`upsertEmailTemplates`](#upsertemailtemplates) — Upserts the email templates of a portal +- [`getEmailTemplatesByPortalId`](#getemailtemplatesbyportalid) — Retrieves the email templates of a portal by portal ID +- [`upsertEmailTemplatesByPortalId`](#upsertemailtemplatesbyportalid) — Upserts the email templates of a portal by portal ID +- [`getPortalWidgets`](#getportalwidgets) — Retrieves the widgets of a portal +- [`upsertPortalWidget`](#upsertportalwidget) — Upsert widget for a portal of an organization. +- [`replaceECPTemplateVariables`](#replaceecptemplatevariables) — Replaces the template variables of a portal +- [`extraPermissionAttributes`](#extrapermissionattributes) — Retrieves the extra permission attributes. +- [`validateCaaRecords`](#validatecaarecords) — Validates the CAA records of a portal +- [`validateCaaRecordsV3`](#validatecaarecordsv3) — Validates the CAA records of a portal +- [`getECPContact`](#getecpcontact) — Get the Contact by id +- [`getValidSecondaryAttributes`](#getvalidsecondaryattributes) — Get valid secondary attributes that are used while mapping a contact on registration +- [`resendConfirmationEmail`](#resendconfirmationemail) — Resend confirmation email +- [`fetchPortalUsersByRelatedEntity`](#fetchportalusersbyrelatedentity) — Get all users for a given entity +- [`getRecipientsToNotifyOnAutomation`](#getrecipientstonotifyonautomation) — Get recipients to notify on automation +- [`configureDistribution`](#configuredistribution) — Configure the distribution for the portal's custom domain +- [`configureDistributionV3`](#configuredistributionv3) — Configure the distribution for the portal's custom domain +- [`getEntityIdentifiers`](#getentityidentifiers) — Retrieve a list of entity identifiers used for entity search by portal users. +- [`savePortalFiles`](#saveportalfiles) — Add files to portal +- [`getRegistrationIdentifiers`](#getregistrationidentifiers) — Get valid attributes from entities that can be used as identifier to map contact to user on registration +- [`loginToPortalAsUser`](#logintoportalasuser) — Generate a token to log in to a portal impersonating a users. +- [`canTriggerPortalFlow`](#cantriggerportalflow) — Returns whether the user can trigger a portal flow +- [`updatePortalPage`](#updateportalpage) — Update a portal page by id +- [`deletePortalPage`](#deleteportalpage) — Delete a portal page by id +- [`createPortalPage`](#createportalpage) — Create a new portal page +- [`getDefaultPages`](#getdefaultpages) — Fetch all default portal pages +- [`createPortalPageBlock`](#createportalpageblock) — Create a new portal page block +- [`updatePortalPageBlock`](#updateportalpageblock) — Update a portal page block by id +- [`deletePortalPageBlock`](#deleteportalpageblock) — Delete a portal page block by id +- [`createPortalConfig`](#createportalconfig) — Creates a new portal configuration. +- [`getPortalConfigV3`](#getportalconfigv3) — Retrieves a specific portal configuration by ID. +- [`putPortalConfig`](#putportalconfig) — Updates a specific portal configuration by ID. +- [`deletePortalConfig`](#deleteportalconfig) — Deletes a specific portal configuration by ID. +- [`listAllPortalConfigs`](#listallportalconfigs) — Retrieves all portal configurations. +- [`swapPortalConfig`](#swapportalconfig) — Swaps the portal configuration of two portals. + +**Public** +- [`createUser`](#createuser) — Registers a portal user +- [`createUserV3`](#createuserv3) — Registers a portal user with portal id +- [`getPortalConfigByDomain`](#getportalconfigbydomain) — Retrieves the portal configuration by domain. +- [`getPublicPortalExtensionDetails`](#getpublicportalextensiondetails) — Get public extension details shown to end customers and configuring users. +- [`getPublicPortalExtensionDetailsV3`](#getpublicportalextensiondetailsv3) — Get public extension details shown to end customers and configuring users. +- [`getPublicPortalConfig`](#getpublicportalconfig) — Retrieves the public portal configuration. +- [`getPublicPortalConfigV3`](#getpublicportalconfigv3) — Retrieves the public portal configuration. +- [`getPublicPortalWidgets`](#getpublicportalwidgets) — Retrieves the public widgets of a portal +- [`getSchemasByDomain`](#getschemasbydomain) — Retrieves schemas by domain. Only schemas and attributes used on public pages are returned. +- [`getOrganizationSettingsByDomain`](#getorganizationsettingsbydomain) — Retrieves organization settings by domain. Only public organization settings are returned. +- [`checkContactExists`](#checkcontactexists) — True if contact with given identifiers exists. +- [`checkContactExistsV3`](#checkcontactexistsv3) — True if contact with given identifiers exists. +- [`confirmUser`](#confirmuser) — Confirm a portal user +- [`confirmUserWithUserId`](#confirmuserwithuserid) — Confirm a portal user +- [`userExists`](#userexists) — Checks whether a user exists in the portal +- [`userExistsV3`](#userexistsv3) — Checks whether a user exists in the portal +- [`ssoRedirect`](#ssoredirect) — Handles the redirect from the external SSO provider. Validates the authorization `code` and `state` received from the pr +- [`ssoCallback`](#ssocallback) — Handles the callback from the external SSO provider, validates the authorization `code` +- [`getPublicPages`](#getpublicpages) — Fetch all public portal pages +- [`getUserEntryPoint`](#getuserentrypoint) — Get the entry point for the user +- [`deRegisterMLoginUser`](#deregistermloginuser) — Deregisters a user from the M Login client +- [`notifyMLoginInterestChange`](#notifymlogininterestchange) — Notifies the interest change of a user in the M Login client + +**ECP** +- [`validateToken`](#validatetoken) — Validates Portal Token is valid. Pass the token via Authorization Header. +- [`revokeToken`](#revoketoken) — Revokes all of the access tokens for the given Refresh Token. +- [`getConsumption`](#getconsumption) — Get energy consumption data between a given time period. +- [`getCosts`](#getcosts) — Get energy cost data between a given time period. +- [`getPrices`](#getprices) — Get energy prices data between a given time period. +- [`getResolvedSeamlessLink`](#getresolvedseamlesslink) — Retrieves a resolved seamless portal link. +- [`getSchemas`](#getschemas) — Retrieves the schemas. Only schemas usable in the private part of the portal are returned. +- [`getContact`](#getcontact) — Retrieves the contact of the logged in user. +- [`updateContact`](#updatecontact) — Updates the contact details. +- [`getPortalUser`](#getportaluser) — Get the portal user details +- [`updatePortalUser`](#updateportaluser) — Update the portal user details +- [`deletePortalUser`](#deleteportaluser) — Delete the portal user +- [`updatePortalUserEmail`](#updateportaluseremail) — Update portal user email +- [`getAllOrders`](#getallorders) — Get all orders for the portal user +- [`postOrderAcceptance`](#postorderacceptance) — Accept/decline an offer by id +- [`getOrder`](#getorder) — Get an order by id +- [`updateOrder`](#updateorder) — Update an order by id +- [`getAllOpportunities`](#getallopportunities) — Get all opportunities of a portal user +- [`getSearchableAttributesForOpportunities`](#getsearchableattributesforopportunities) — Get all opportunity searchable attributes for a portal user +- [`getSearchResultsForOpportunities`](#getsearchresultsforopportunities) — Get all opportunity with the given serached attributes +- [`getOpportunity`](#getopportunity) — Get an opportunity by id +- [`updateOpportunity`](#updateopportunity) — Update an opportunity by id +- [`getAllRequests`](#getallrequests) — Get all opportunities & orders of a portal user +- [`getAllContracts`](#getallcontracts) — Get all contracts for a portal user +- [`getContract`](#getcontract) — Get a contract by id +- [`updateContract`](#updatecontract) — Update a contract by id +- [`addContractByIdentifiers`](#addcontractbyidentifiers) — Self-assign contract(s) by pre-configured identifiers. +- [`validateCadenceEntityEditRules`](#validatecadenceentityeditrules) — Validate if cadence rule is valid for an entity +- [`searchPaymentRelationsInEntities`](#searchpaymentrelationsinentities) — Search for entities that have the payment relation with the given payment id +- [`createCustomEntityActivity`](#createcustomentityactivity) — Create a custom activity that can be displayed in activity feed of an entity. +- [`saveEntityFile`](#saveentityfile) — Add files to an entity +- [`deleteEntityFile`](#deleteentityfile) — Delete files from an entity +- [`getFileById`](#getfilebyid) — Fetch a document with ID +- [`trackFileDownloaded`](#trackfiledownloaded) — Track that user has downloaded a file +- [`getBillingEvents`](#getbillingevents) — Fetch billing events for a portal user +- [`triggerEntityAccessEvent`](#triggerentityaccessevent) — Trigger entity access event for a portal user +- [`triggerEntityAccessEventV3`](#triggerentityaccesseventv3) — Trigger entity access event for a portal user +- [`getPortalUserEntity`](#getportaluserentity) — Get a single entity for a portal user +- [`searchPortalUserEntities`](#searchportaluserentities) — Search all entities of a portal user +- [`getAutomationContext`](#getautomationcontext) — Retrieves the automation context. +- [`updateWorkflowStepAsDone`](#updateworkflowstepasdone) — Update a workflow step as done +- [`getEntityWorkflows`](#getentityworkflows) — Get all workflows associated with an entity (requires access to the entity) +- [`uploadMeterReadingPhoto`](#uploadmeterreadingphoto) — Uploads a Meter Reading photo and - if enabled - gives back data extracted from the photo. +- [`createMeterReading`](#createmeterreading) — Inserts a new meter reading. +- [`getAllowedMeterReadingRange`](#getallowedmeterreadingrange) — Get allowed reading range for all counters of a meter from the configured +- [`getPortalPage`](#getportalpage) — Fetch a portal page by id +- [`getPortalPages`](#getportalpages) — Fetch all portal pages +- [`getPortalPageBlocks`](#getportalpageblocks) — Fetch all portal page blocks +- [`getPortalPageBlock`](#getportalpageblock) — Fetch a portal page block by id +- [`updateCampaignPortalBlockStatus`](#updatecampaignportalblockstatus) — Updates the status of a campaign portal block for multiple recipients. +- [`updateNotificationsStatus`](#updatenotificationsstatus) — Updates the statuses of multiple notifications at once. +- [`invitePartner`](#invitepartner) — Invites a partner to a portal +- [`listBusinessPartners`](#listbusinesspartners) — Lists all business partners linked to the businessaccount +- [`resendPartnerInvitation`](#resendpartnerinvitation) — Resends an invitation email to a partner +- [`revokePartner`](#revokepartner) — Revokes a partner from a portal +- [`disablePartner`](#disablepartner) — Disables a partner from a portal +- [`enablePartner`](#enablepartner) — Enables a partner from a portal + +**Activity** +- [`getEntityActivityFeed`](#getentityactivityfeed) — Get activity feed for an entity + +**Balance** +- [`getCustomerBalance`](#getcustomerbalance) — Get total balance across all contracts and orders of a customer entity. + +**Billing Accounts** +- [`getBillingAccount`](#getbillingaccount) — Get a billing account by id. + +**Login** +- [`ssoLogin`](#ssologin) — Initiate login using external SSO identity. +- [`ssoLoginV3`](#ssologinv3) — Initiate login using external SSO identity. + +### `upsertPortal` + +Upserts the settings for a portal of an organization. + +`POST /v2/portal/portal` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | Yes | Origin of the portal | +| `portal_id` | query | string | No | Portal ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal upsertPortal \ + -p origin=example +``` + +With request body: + +```bash +epilot customer-portal upsertPortal \ + -p origin=example \ + -d '{ + "entity_actions": [ + { + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "slug": "contact", + "action_Label": {} + } + ], + "extensions": [ + { + "id": "string", + "status": "installed", + "options": {} + } + ], + "extension_hooks": {}, + "default_user_to_notify": { + "onPendingUser": [ + {} + ] + }, + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-12345.ecp.epilot.cloud", + "domain_settings": { + "is_custom_domain_enabled": true, + "is_epilot_domain_enabled": true, + "is_redirection_enabled": true + }, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": { + "start_page": true, + "billing": true, + "change_due_date": true, + "new_design": true + }, + "accessToken": "string", + "advanced_mfa": { + "enabled": true + }, + "auth_settings": { + "passwordless_login": { + "enabled": true + }, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "auto_redirect_to_sso": true + }, + "cognito_details": { + "cognito_user_pool_client_id": "6bsd0jkgoie74k2i8mrhc1vest", + "cognito_user_pool_arn": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "cognito_user_pool_id": "eu-central-1_CUEQRNbUb", + "password_policy": { + "minimum_length": 8, + "maximum_length": 256, + "require_lowercase": true, + "require_uppercase": true, + "require_numbers": true, + "require_symbols": true + } + }, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": { + "contact": ["name", "address"], + "contract": ["installment_amount"] + }, + "email_templates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "images": { + "orderLeftTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "orderRightTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "welcomeBanner": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg" + }, + "entity_identifiers": { + "type": { + "isEnabled": true, + "attributes": ["contract_number"] + } + }, + "contract_identifiers": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + } + ], + "contract_selector_config": { + "show_inactive": true, + "title_path": "string" + }, + "registration_identifiers": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ], + "triggered_journeys": [ + { + "trigger_name": "FIRST_LOGIN", + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "entity_edit_rules": [ + { + "slug": "contact", + "attribute": "first_name", + "rule_type": "cadence", + "cadence_period_type": "days", + "cadence_period": 1, + "changes_allowed": 1, + "grace_period": 1, + "allowed_increment": "10%", + "allowed_decrement": "10%", + "number_of_days_before_restriction": 10 + } + ], + "allowed_file_extensions": { + "document": ["pdf"], + "image": ["jpg"], + "spreadsheet": ["xls"], + "presentation": ["ppt"], + "audioVideo": ["mp4"], + "email": ["eml"], + "archive": ["zip"], + "cad": ["cad"], + "calendar": ["ics"], + "other": ["txt"] + }, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "pages": {} +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal upsertPortal -p origin=example +``` + +With JSONata filter: + +```bash +epilot customer-portal upsertPortal -p origin=example --jsonata '$' +``` + +
+Sample Response + +```json +{ + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-12345.ecp.epilot.cloud", + "domain_settings": { + "is_custom_domain_enabled": true, + "is_epilot_domain_enabled": true, + "is_redirection_enabled": true + }, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": { + "start_page": true, + "billing": true, + "change_due_date": true, + "new_design": true + }, + "accessToken": "string", + "advanced_mfa": { + "enabled": true + }, + "auth_settings": { + "passwordless_login": { + "enabled": true + }, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "auto_redirect_to_sso": true + }, + "cognito_details": { + "cognito_user_pool_client_id": "6bsd0jkgoie74k2i8mrhc1vest", + "cognito_user_pool_arn": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "cognito_user_pool_id": "eu-central-1_CUEQRNbUb", + "password_policy": { + "minimum_length": 8, + "maximum_length": 256, + "require_lowercase": true, + "require_uppercase": true, + "require_numbers": true, + "require_symbols": true + } + }, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": { + "contact": ["name", "address"], + "contract": ["installment_amount"] + }, + "email_templates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "images": { + "orderLeftTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "orderRightTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "welcomeBanner": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg" + }, + "entity_identifiers": { + "type": { + "isEnabled": true, + "attributes": ["contract_number"] + } + }, + "contract_identifiers": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + } + ], + "contract_selector_config": { + "show_inactive": true, + "title_path": "string" + }, + "registration_identifiers": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ], + "triggered_journeys": [ + { + "trigger_name": "FIRST_LOGIN", + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "entity_edit_rules": [ + { + "slug": "contact", + "attribute": "first_name", + "rule_type": "cadence", + "cadence_period_type": "days", + "cadence_period": 1, + "changes_allowed": 1, + "grace_period": 1, + "allowed_increment": "10%", + "allowed_decrement": "10%", + "number_of_days_before_restriction": 10 + } + ], + "allowed_file_extensions": { + "document": ["pdf"], + "image": ["jpg"], + "spreadsheet": ["xls"], + "presentation": ["ppt"], + "audioVideo": ["mp4"], + "email": ["eml"], + "archive": ["zip"], + "cad": ["cad"], + "calendar": ["ics"], + "other": ["txt"] + }, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "pages": {}, + "id": 12345, + "organization_id": 12345, + "org_settings": { + "canary": { + "enabled": true + }, + "notracking": { + "enabled": true + } + }, + "feature_flags": {}, + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow" + } + ], + "identity_providers": [ + { + "slug": "office-365-login", + "display_name": "Office 365 Login", + "oidc_config": {}, + "mobile_oidc_config": {} + } + ] +} +``` + +
+ +--- + +### `createUser` + +Registers a portal user + +`POST /v2/portal/public/user` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | Yes | Origin of the portal | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal createUser \ + -p origin=example +``` + +With request body: + +```bash +epilot customer-portal createUser \ + -p origin=example \ + -d '{ + "email": "testemail921@yopmail.com", + "first_name": "John", + "last_name": "Doe", + "contactId": "5da0a718-c822-403d-9f5d-20d4584e0528", + "orgId": 728, + "password": "124n$aAJs*d41h4", + "contactIdentifiers": {}, + "registration_identifiers": { + "contact": { + "email": "john.doe@example.com" + }, + "contract": { + "contract_number": "123456" + } + }, + "account_id": "string" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal createUser -p origin=example +``` + +With JSONata filter: + +```bash +epilot customer-portal createUser -p origin=example --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "User created successfully" +} +``` + +
+ +--- + +### `createUserV3` + +Registers a portal user with portal id + +`POST /v3/portal/public/user` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `portal_id` | query | string | Yes | Origin of the portal | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal createUserV3 \ + -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c +``` + +With request body: + +```bash +epilot customer-portal createUserV3 \ + -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c \ + -d '{ + "email": "testemail921@yopmail.com", + "first_name": "John", + "last_name": "Doe", + "contactId": "5da0a718-c822-403d-9f5d-20d4584e0528", + "orgId": 728, + "password": "124n$aAJs*d41h4", + "contactIdentifiers": {}, + "registration_identifiers": { + "contact": { + "email": "john.doe@example.com" + }, + "contract": { + "contract_number": "123456" + } + }, + "account_id": "string" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal createUserV3 -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c +``` + +With JSONata filter: + +```bash +epilot customer-portal createUserV3 -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "User created successfully" +} +``` + +
+ +--- + +### `validateToken` + +Validates Portal Token is valid. Pass the token via Authorization Header. + +`POST /v2/portal/token/validate` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal validateToken +``` + +With JSONata filter: + +```bash +epilot customer-portal validateToken --jsonata '$' +``` + +--- + +### `revokeToken` + +Revokes all of the access tokens for the given Refresh Token. + +`POST /v2/portal/token/revoke` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal revokeToken +``` + +With request body: + +```bash +epilot customer-portal revokeToken \ + -d '{ + "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal revokeToken +``` + +With JSONata filter: + +```bash +epilot customer-portal revokeToken --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "Token revoked successfully" +} +``` + +
+ +--- + +### `getPortalConfigByDomain` + +Retrieves the portal configuration by domain. + +`GET /v2/portal/public/config` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `domain` | query | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPortalConfigByDomain \ + -p domain=example.com +``` + +With JSONata filter: + +```bash +epilot customer-portal getPortalConfigByDomain -p domain=example.com --jsonata '$' +``` + +
+Sample Response + +```json +{ + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-12345.ecp.epilot.cloud", + "domain_settings": { + "is_custom_domain_enabled": true, + "is_epilot_domain_enabled": true, + "is_redirection_enabled": true + }, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": { + "start_page": true, + "billing": true, + "change_due_date": true, + "new_design": true + }, + "accessToken": "string", + "advanced_mfa": { + "enabled": true + }, + "auth_settings": { + "passwordless_login": { + "enabled": true + }, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "auto_redirect_to_sso": true + }, + "cognito_details": { + "cognito_user_pool_client_id": "6bsd0jkgoie74k2i8mrhc1vest", + "cognito_user_pool_arn": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "cognito_user_pool_id": "eu-central-1_CUEQRNbUb", + "password_policy": { + "minimum_length": 8, + "maximum_length": 256, + "require_lowercase": true, + "require_uppercase": true, + "require_numbers": true, + "require_symbols": true + } + }, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": { + "contact": ["name", "address"], + "contract": ["installment_amount"] + }, + "email_templates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "images": { + "orderLeftTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "orderRightTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "welcomeBanner": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg" + }, + "entity_identifiers": { + "type": { + "isEnabled": true, + "attributes": ["contract_number"] + } + }, + "contract_identifiers": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + } + ], + "contract_selector_config": { + "show_inactive": true, + "title_path": "string" + }, + "registration_identifiers": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ], + "triggered_journeys": [ + { + "trigger_name": "FIRST_LOGIN", + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "entity_edit_rules": [ + { + "slug": "contact", + "attribute": "first_name", + "rule_type": "cadence", + "cadence_period_type": "days", + "cadence_period": 1, + "changes_allowed": 1, + "grace_period": 1, + "allowed_increment": "10%", + "allowed_decrement": "10%", + "number_of_days_before_restriction": 10 + } + ], + "allowed_file_extensions": { + "document": ["pdf"], + "image": ["jpg"], + "spreadsheet": ["xls"], + "presentation": ["ppt"], + "audioVideo": ["mp4"], + "email": ["eml"], + "archive": ["zip"], + "cad": ["cad"], + "calendar": ["ics"], + "other": ["txt"] + }, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "pages": {}, + "id": 12345, + "organization_id": 12345, + "org_settings": { + "canary": { + "enabled": true + }, + "notracking": { + "enabled": true + } + }, + "feature_flags": {}, + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow" + } + ], + "identity_providers": [ + { + "slug": "office-365-login", + "display_name": "Office 365 Login", + "oidc_config": {}, + "mobile_oidc_config": {} + } + ] +} +``` + +
+ +--- + +### `getPortalConfig` + +Retrieves the portal configuration. + +`GET /v2/portal/config` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | No | Origin of the portal | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPortalConfig +``` + +With JSONata filter: + +```bash +epilot customer-portal getPortalConfig --jsonata '$' +``` + +
+Sample Response + +```json +{ + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-12345.ecp.epilot.cloud", + "domain_settings": { + "is_custom_domain_enabled": true, + "is_epilot_domain_enabled": true, + "is_redirection_enabled": true + }, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": { + "start_page": true, + "billing": true, + "change_due_date": true, + "new_design": true + }, + "accessToken": "string", + "advanced_mfa": { + "enabled": true + }, + "auth_settings": { + "passwordless_login": { + "enabled": true + }, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "auto_redirect_to_sso": true + }, + "cognito_details": { + "cognito_user_pool_client_id": "6bsd0jkgoie74k2i8mrhc1vest", + "cognito_user_pool_arn": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "cognito_user_pool_id": "eu-central-1_CUEQRNbUb", + "password_policy": { + "minimum_length": 8, + "maximum_length": 256, + "require_lowercase": true, + "require_uppercase": true, + "require_numbers": true, + "require_symbols": true + } + }, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": { + "contact": ["name", "address"], + "contract": ["installment_amount"] + }, + "email_templates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "images": { + "orderLeftTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "orderRightTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "welcomeBanner": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg" + }, + "entity_identifiers": { + "type": { + "isEnabled": true, + "attributes": ["contract_number"] + } + }, + "contract_identifiers": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + } + ], + "contract_selector_config": { + "show_inactive": true, + "title_path": "string" + }, + "registration_identifiers": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ], + "triggered_journeys": [ + { + "trigger_name": "FIRST_LOGIN", + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "entity_edit_rules": [ + { + "slug": "contact", + "attribute": "first_name", + "rule_type": "cadence", + "cadence_period_type": "days", + "cadence_period": 1, + "changes_allowed": 1, + "grace_period": 1, + "allowed_increment": "10%", + "allowed_decrement": "10%", + "number_of_days_before_restriction": 10 + } + ], + "allowed_file_extensions": { + "document": ["pdf"], + "image": ["jpg"], + "spreadsheet": ["xls"], + "presentation": ["ppt"], + "audioVideo": ["mp4"], + "email": ["eml"], + "archive": ["zip"], + "cad": ["cad"], + "calendar": ["ics"], + "other": ["txt"] + }, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "pages": {}, + "id": 12345, + "organization_id": 12345, + "org_settings": { + "canary": { + "enabled": true + }, + "notracking": { + "enabled": true + } + }, + "feature_flags": {}, + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow" + } + ], + "identity_providers": [ + { + "slug": "office-365-login", + "display_name": "Office 365 Login", + "oidc_config": {}, + "mobile_oidc_config": {} + } + ] +} +``` + +
+ +--- + +### `deletePortal` + +Deletes the portal. + +`DELETE /v2/portal/config` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | Yes | Origin of the portal | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal deletePortal \ + -p origin=example +``` + +With JSONata filter: + +```bash +epilot customer-portal deletePortal -p origin=example --jsonata '$' +``` + +--- + +### `getPortalExtensions` + +Retrieves the installed portal extensions. + +`GET /v2/portal/extensions` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | No | Origin of the portal | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPortalExtensions +``` + +With JSONata filter: + +```bash +epilot customer-portal getPortalExtensions --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "string", + "app_id": "string", + "app_name": "string", + "name": { + "en": "string" + }, + "description": { + "en": "string" + }, + "version": "string", + "options": [ + {} + ], + "links": [ + {} + ], + "hooks": [ + {} + ] + } +] +``` + +
+ +--- + +### `getPublicPortalExtensionDetails` + +Get public extension details shown to end customers and configuring users. + +`GET /v2/portal/public/extensions` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `org_id` | query | string | Yes | | +| `origin` | query | string | Yes | Origin of the portal | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPublicPortalExtensionDetails \ + -p org_id=12324 \ + -p origin=example +``` + +With JSONata filter: + +```bash +epilot customer-portal getPublicPortalExtensionDetails -p org_id=12324 -p origin=example --jsonata 'consumptionDataRetrieval' +``` + +
+Sample Response + +```json +{ + "consumptionDataRetrieval": [ + { + "extension": { + "id": "string", + "name": { + "en": "string" + } + }, + "hook": { + "id": "string", + "name": { + "en": "string" + }, + "intervals": ["string"] + } + } + ], + "priceDataRetrieval": [ + { + "extension": { + "id": "string", + "name": { + "en": "string" + } + }, + "hook": { + "id": "string", + "name": { + "en": "string" + }, + "intervals": ["string"] + } + } + ], + "costDataRetrieval": [ + { + "extension": { + "id": "string", + "name": { + "en": "string" + } + }, + "hook": { + "id": "string", + "name": { + "en": "string" + }, + "intervals": ["string"] + } + } + ], + "contractIdentification": { + "extension": { + "id": "string", + "name": { + "en": "string" + } + }, + "hook": { + "explanation": { + "en": "This process will give you access to all Contracts kept" + } + } + }, + "meterReadingPlausibilityCheck": { + "extension": { + "id": "string", + "name": { + "en": "string" + } + }, + "hook": { + "plausibility_mode": "check" + } + } +} +``` + +
+ +--- + +### `getPortalExtensionsV3` + +Retrieves the installed portal extensions. + +`GET /v3/portal/extensions` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `portal_id` | query | string | Yes | Portal ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPortalExtensionsV3 \ + -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c +``` + +With JSONata filter: + +```bash +epilot customer-portal getPortalExtensionsV3 -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "string", + "app_id": "string", + "app_name": "string", + "name": { + "en": "string" + }, + "description": { + "en": "string" + }, + "version": "string", + "options": [ + {} + ], + "links": [ + {} + ], + "hooks": [ + {} + ] + } +] +``` + +
+ +--- + +### `getPublicPortalExtensionDetailsV3` + +Get public extension details shown to end customers and configuring users. + +`GET /v3/portal/public/extensions` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `org_id` | query | string | No | Organization ID (required if domain is not provided) | +| `portal_id` | query | string | No | Portal ID (required if domain is not provided) | +| `domain` | query | string | No | Portal domain for identification (alternative to org_id + portal_id) | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPublicPortalExtensionDetailsV3 +``` + +With JSONata filter: + +```bash +epilot customer-portal getPublicPortalExtensionDetailsV3 --jsonata 'consumptionDataRetrieval' +``` + +
+Sample Response + +```json +{ + "consumptionDataRetrieval": [ + { + "extension": { + "id": "string", + "name": { + "en": "string" + } + }, + "hook": { + "id": "string", + "name": { + "en": "string" + }, + "intervals": ["string"] + } + } + ], + "priceDataRetrieval": [ + { + "extension": { + "id": "string", + "name": { + "en": "string" + } + }, + "hook": { + "id": "string", + "name": { + "en": "string" + }, + "intervals": ["string"] + } + } + ], + "costDataRetrieval": [ + { + "extension": { + "id": "string", + "name": { + "en": "string" + } + }, + "hook": { + "id": "string", + "name": { + "en": "string" + }, + "intervals": ["string"] + } + } + ], + "contractIdentification": { + "extension": { + "id": "string", + "name": { + "en": "string" + } + }, + "hook": { + "explanation": { + "en": "This process will give you access to all Contracts kept" + } + } + }, + "meterReadingPlausibilityCheck": { + "extension": { + "id": "string", + "name": { + "en": "string" + } + }, + "hook": { + "plausibility_mode": "check" + } + } +} +``` + +
+ +--- + +### `getConsumption` + +Get energy consumption data between a given time period. + +`GET /v2/portal/consumption` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `app_id` | query | string | No | App ID for consumption data. | +| `extensionId` | query | string | Yes | Extension ID for consumption data. | +| `hookId` | query | string | Yes | Hook ID for consumption data. | +| `meter_id` | query | string | No | Meter ID for consumption data. Deprecated - use context_entities instead. | +| `from` | query | string (date-time) | Yes | Start date for consumption data (ISO 8601 format). | +| `to` | query | string (date-time) | Yes | End date for consumption data (ISO 8601 format). | +| `interval` | query | "PT15M" \| "PT1H" \| "P1D" \| "P1M" | Yes | Interval between consumption data points (e.g., PT15M for 15 minutes, PT1H for hourly). Not all intervals have to be supported. | +| `context_entities` | query | object[] | No | Additional entities to include in the context for variable interpolation in the hook. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getConsumption \ + -p extensionId=123e4567-e89b-12d3-a456-426614174000 \ + -p hookId=123e4567-e89b-12d3-a456-426614174000 \ + -p from=example \ + -p to=example \ + -p interval=example +``` + +With JSONata filter: + +```bash +epilot customer-portal getConsumption -p extensionId=123e4567-e89b-12d3-a456-426614174000 -p hookId=123e4567-e89b-12d3-a456-426614174000 -p from=example -p to=example -p interval=example --jsonata 'consumptions' +``` + +
+Sample Response + +```json +{ + "consumptions": [ + { + "timestamp": "1970-01-01T00:00:00.000Z", + "value": 0, + "type": "string" + } + ] +} +``` + +
+ +--- + +### `getCosts` + +Get energy cost data between a given time period. + +`GET /v2/portal/costs` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `app_id` | query | string | No | App ID for consumption data. | +| `extensionId` | query | string | Yes | Extension ID for cost data. | +| `hookId` | query | string | Yes | Hook ID for cost data. | +| `meter_id` | query | string | No | Meter ID for cost data. Deprecated - use context_entities instead. | +| `from` | query | string (date-time) | Yes | Start date for cost data (ISO 8601 format). | +| `to` | query | string (date-time) | Yes | End date for cost data (ISO 8601 format). | +| `interval` | query | "PT15M" \| "PT1H" \| "P1D" \| "P1M" | Yes | Interval between cost data points (e.g., PT15M for 15 minutes, PT1H for hourly). Not all intervals have to be supported. | +| `context_entities` | query | object[] | No | Additional entities to include in the context for variable interpolation in the hook. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getCosts \ + -p extensionId=123e4567-e89b-12d3-a456-426614174000 \ + -p hookId=123e4567-e89b-12d3-a456-426614174000 \ + -p from=example \ + -p to=example \ + -p interval=example +``` + +With JSONata filter: + +```bash +epilot customer-portal getCosts -p extensionId=123e4567-e89b-12d3-a456-426614174000 -p hookId=123e4567-e89b-12d3-a456-426614174000 -p from=example -p to=example -p interval=example --jsonata 'costs' +``` + +
+Sample Response + +```json +{ + "costs": [ + { + "timestamp": "1970-01-01T00:00:00.000Z", + "unit_amount": 1234, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "12.34", + "tax_behavior": "exclusive", + "tax_rate": 19 + } + ] +} +``` + +
+ +--- + +### `getPrices` + +Get energy prices data between a given time period. + +`GET /v2/portal/prices` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `app_id` | query | string | No | App ID for consumption data. | +| `extensionId` | query | string | Yes | Extension ID for price data. | +| `hookId` | query | string | Yes | Hook ID for price data. | +| `meter_id` | query | string | No | Meter ID for price data. Deprecated - use context_entities instead. | +| `from` | query | string (date-time) | Yes | Start date for price data (ISO 8601 format). | +| `to` | query | string (date-time) | Yes | End date for price data (ISO 8601 format). | +| `interval` | query | "PT15M" \| "PT1H" \| "P1D" \| "P1M" | Yes | Interval between price data points (e.g., PT15M for 15 minutes, PT1H for hourly). Not all intervals have to be supported. | +| `context_entities` | query | object[] | No | Additional entities to include in the context for variable interpolation in the hook. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPrices \ + -p extensionId=123e4567-e89b-12d3-a456-426614174000 \ + -p hookId=123e4567-e89b-12d3-a456-426614174000 \ + -p from=example \ + -p to=example \ + -p interval=example +``` + +With JSONata filter: + +```bash +epilot customer-portal getPrices -p extensionId=123e4567-e89b-12d3-a456-426614174000 -p hookId=123e4567-e89b-12d3-a456-426614174000 -p from=example -p to=example -p interval=example --jsonata 'prices' +``` + +
+Sample Response + +```json +{ + "prices": [ + { + "timestamp": "1970-01-01T00:00:00.000Z", + "unit_amount": 1234, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "12.34", + "components": { + "auction_price_amount": 1000, + "auction_price_amount_decimal": "10.00", + "taxes_levies_amount": 50, + "taxes_levies_amount_decimal": "0.50", + "source_fee_amount": 50, + "source_fee_amount_decimal": "0.50", + "grid_fee_amount": 100, + "grid_fee_amount_decimal": "1.00", + "margin_amount": 34, + "margin_amount_decimal": "0.34" + }, + "tax_behavior": "exclusive", + "tax_rate": 19 + } + ] +} +``` + +
+ +--- + +### `getExternalLinks` + +Retrieves the portal configuration external links. + +`GET /v2/portal/external-links` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | No | Origin of the portal | +| `contactId` | query | string (uuid) | No | Contact ID of the user | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getExternalLinks +``` + +With JSONata filter: + +```bash +epilot customer-portal getExternalLinks --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "string", + "label": {}, + "type": "link", + "link": "string", + "rules": [ + {} + ], + "attribute": "string", + "entity": "string", + "attribute_value": "string", + "icon": { + "name": "string", + "color": "string", + "size": 0 + }, + "extension_link_id": ["string"] + } +] +``` + +
+ +--- + +### `getExternalLinksV3` + +Retrieves the portal configuration external links. + +`GET /v3/portal/external-links` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `portal_id` | query | string | No | PortalId of the portal | +| `contactId` | query | string (uuid) | No | Contact ID of the user | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getExternalLinksV3 +``` + +With JSONata filter: + +```bash +epilot customer-portal getExternalLinksV3 --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "string", + "label": {}, + "type": "link", + "link": "string", + "rules": [ + {} + ], + "attribute": "string", + "entity": "string", + "attribute_value": "string", + "icon": { + "name": "string", + "color": "string", + "size": 0 + }, + "extension_link_id": ["string"] + } +] +``` + +
+ +--- + +### `getResolvedSeamlessLink` + +Retrieves a resolved seamless portal link. + +`GET /v2/portal/resolve:seamless-link` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `app_id` | query | string | No | ID of the App if the Portal Extension was installed from an App | +| `extension_id` | query | string | Yes | ID of the Portal Extension | +| `link_id` | query | string | Yes | ID of the Seamless Link | +| `context_entities` | query | object[] | No | If the request is in a context of certain entities (i.e. the user in in a context of a specific contract), links can be customized for that. Portal User and Contact entities are automatically part of | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getResolvedSeamlessLink \ + -p extension_id=123e4567-e89b-12d3-a456-426614174000 \ + -p link_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot customer-portal getResolvedSeamlessLink -p extension_id=123e4567-e89b-12d3-a456-426614174000 -p link_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'link' +``` + +
+Sample Response + +```json +{ + "link": "string" +} +``` + +
+ +--- + +### `getPublicPortalConfig` + +Retrieves the public portal configuration. + +`GET /v2/portal/public/portal/config` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `org_id` | query | string | Yes | | +| `origin` | query | string | Yes | Origin of the portal | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPublicPortalConfig \ + -p org_id=12324 \ + -p origin=example +``` + +With JSONata filter: + +```bash +epilot customer-portal getPublicPortalConfig -p org_id=12324 -p origin=example --jsonata '$' +``` + +
+Sample Response + +```json +{ + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-12345.ecp.epilot.cloud", + "domain_settings": { + "is_custom_domain_enabled": true, + "is_epilot_domain_enabled": true, + "is_redirection_enabled": true + }, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": { + "start_page": true, + "billing": true, + "change_due_date": true, + "new_design": true + }, + "accessToken": "string", + "advanced_mfa": { + "enabled": true + }, + "auth_settings": { + "passwordless_login": { + "enabled": true + }, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "auto_redirect_to_sso": true + }, + "cognito_details": { + "cognito_user_pool_client_id": "6bsd0jkgoie74k2i8mrhc1vest", + "cognito_user_pool_arn": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "cognito_user_pool_id": "eu-central-1_CUEQRNbUb", + "password_policy": { + "minimum_length": 8, + "maximum_length": 256, + "require_lowercase": true, + "require_uppercase": true, + "require_numbers": true, + "require_symbols": true + } + }, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": { + "contact": ["name", "address"], + "contract": ["installment_amount"] + }, + "email_templates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "images": { + "orderLeftTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "orderRightTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "welcomeBanner": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg" + }, + "entity_identifiers": { + "type": { + "isEnabled": true, + "attributes": ["contract_number"] + } + }, + "contract_identifiers": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + } + ], + "contract_selector_config": { + "show_inactive": true, + "title_path": "string" + }, + "registration_identifiers": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ], + "triggered_journeys": [ + { + "trigger_name": "FIRST_LOGIN", + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "entity_edit_rules": [ + { + "slug": "contact", + "attribute": "first_name", + "rule_type": "cadence", + "cadence_period_type": "days", + "cadence_period": 1, + "changes_allowed": 1, + "grace_period": 1, + "allowed_increment": "10%", + "allowed_decrement": "10%", + "number_of_days_before_restriction": 10 + } + ], + "allowed_file_extensions": { + "document": ["pdf"], + "image": ["jpg"], + "spreadsheet": ["xls"], + "presentation": ["ppt"], + "audioVideo": ["mp4"], + "email": ["eml"], + "archive": ["zip"], + "cad": ["cad"], + "calendar": ["ics"], + "other": ["txt"] + }, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "pages": {}, + "id": 12345, + "organization_id": 12345, + "org_settings": { + "canary": { + "enabled": true + }, + "notracking": { + "enabled": true + } + }, + "feature_flags": {}, + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow" + } + ], + "identity_providers": [ + { + "slug": "office-365-login", + "display_name": "Office 365 Login", + "oidc_config": {}, + "mobile_oidc_config": {} + } + ] +} +``` + +
+ +--- + +### `getOrgPortalConfig` + +Retrieves the portal configuration for the organization. + +`GET /v2/portal/org/portal/config` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | Yes | Origin of the portal | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getOrgPortalConfig \ + -p origin=example +``` + +With JSONata filter: + +```bash +epilot customer-portal getOrgPortalConfig -p origin=example --jsonata '$' +``` + +
+Sample Response + +```json +{ + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-12345.ecp.epilot.cloud", + "domain_settings": { + "is_custom_domain_enabled": true, + "is_epilot_domain_enabled": true, + "is_redirection_enabled": true + }, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": { + "start_page": true, + "billing": true, + "change_due_date": true, + "new_design": true + }, + "accessToken": "string", + "advanced_mfa": { + "enabled": true + }, + "auth_settings": { + "passwordless_login": { + "enabled": true + }, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "auto_redirect_to_sso": true + }, + "cognito_details": { + "cognito_user_pool_client_id": "6bsd0jkgoie74k2i8mrhc1vest", + "cognito_user_pool_arn": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "cognito_user_pool_id": "eu-central-1_CUEQRNbUb", + "password_policy": { + "minimum_length": 8, + "maximum_length": 256, + "require_lowercase": true, + "require_uppercase": true, + "require_numbers": true, + "require_symbols": true + } + }, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": { + "contact": ["name", "address"], + "contract": ["installment_amount"] + }, + "email_templates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "images": { + "orderLeftTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "orderRightTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "welcomeBanner": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg" + }, + "entity_identifiers": { + "type": { + "isEnabled": true, + "attributes": ["contract_number"] + } + }, + "contract_identifiers": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + } + ], + "contract_selector_config": { + "show_inactive": true, + "title_path": "string" + }, + "registration_identifiers": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ], + "triggered_journeys": [ + { + "trigger_name": "FIRST_LOGIN", + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "entity_edit_rules": [ + { + "slug": "contact", + "attribute": "first_name", + "rule_type": "cadence", + "cadence_period_type": "days", + "cadence_period": 1, + "changes_allowed": 1, + "grace_period": 1, + "allowed_increment": "10%", + "allowed_decrement": "10%", + "number_of_days_before_restriction": 10 + } + ], + "allowed_file_extensions": { + "document": ["pdf"], + "image": ["jpg"], + "spreadsheet": ["xls"], + "presentation": ["ppt"], + "audioVideo": ["mp4"], + "email": ["eml"], + "archive": ["zip"], + "cad": ["cad"], + "calendar": ["ics"], + "other": ["txt"] + }, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "pages": {}, + "id": 12345, + "organization_id": 12345, + "org_settings": { + "canary": { + "enabled": true + }, + "notracking": { + "enabled": true + } + }, + "feature_flags": {}, + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow" + } + ], + "identity_providers": [ + { + "slug": "office-365-login", + "display_name": "Office 365 Login", + "oidc_config": {}, + "mobile_oidc_config": {} + } + ], + "certificate_details": { + "status": "PENDING_VALIDATION", + "failed_reason": "CAA_ERROR" + } +} +``` + +
+ +--- + +### `getPublicPortalConfigV3` + +Retrieves the public portal configuration. + +`GET /v3/portal/public/portal/config` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `org_id` | query | string | Yes | | +| `portal_id` | query | string | Yes | PortalId of the portal | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPublicPortalConfigV3 \ + -p org_id=12324 \ + -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c +``` + +With JSONata filter: + +```bash +epilot customer-portal getPublicPortalConfigV3 -p org_id=12324 -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c --jsonata '$' +``` + +
+Sample Response + +```json +{ + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-12345.ecp.epilot.cloud", + "domain_settings": { + "is_custom_domain_enabled": true, + "is_epilot_domain_enabled": true, + "is_redirection_enabled": true + }, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": { + "start_page": true, + "billing": true, + "change_due_date": true, + "new_design": true + }, + "accessToken": "string", + "advanced_mfa": { + "enabled": true + }, + "auth_settings": { + "passwordless_login": { + "enabled": true + }, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "auto_redirect_to_sso": true + }, + "cognito_details": { + "cognito_user_pool_client_id": "6bsd0jkgoie74k2i8mrhc1vest", + "cognito_user_pool_arn": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "cognito_user_pool_id": "eu-central-1_CUEQRNbUb", + "password_policy": { + "minimum_length": 8, + "maximum_length": 256, + "require_lowercase": true, + "require_uppercase": true, + "require_numbers": true, + "require_symbols": true + } + }, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": { + "contact": ["name", "address"], + "contract": ["installment_amount"] + }, + "email_templates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "images": { + "orderLeftTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "orderRightTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "welcomeBanner": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg" + }, + "entity_identifiers": { + "type": { + "isEnabled": true, + "attributes": ["contract_number"] + } + }, + "contract_identifiers": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + } + ], + "contract_selector_config": { + "show_inactive": true, + "title_path": "string" + }, + "registration_identifiers": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ], + "triggered_journeys": [ + { + "trigger_name": "FIRST_LOGIN", + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "entity_edit_rules": [ + { + "slug": "contact", + "attribute": "first_name", + "rule_type": "cadence", + "cadence_period_type": "days", + "cadence_period": 1, + "changes_allowed": 1, + "grace_period": 1, + "allowed_increment": "10%", + "allowed_decrement": "10%", + "number_of_days_before_restriction": 10 + } + ], + "allowed_file_extensions": { + "document": ["pdf"], + "image": ["jpg"], + "spreadsheet": ["xls"], + "presentation": ["ppt"], + "audioVideo": ["mp4"], + "email": ["eml"], + "archive": ["zip"], + "cad": ["cad"], + "calendar": ["ics"], + "other": ["txt"] + }, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "pages": {}, + "id": 12345, + "organization_id": 12345, + "org_settings": { + "canary": { + "enabled": true + }, + "notracking": { + "enabled": true + } + }, + "feature_flags": {}, + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow" + } + ], + "identity_providers": [ + { + "slug": "office-365-login", + "display_name": "Office 365 Login", + "oidc_config": {}, + "mobile_oidc_config": {} + } + ] +} +``` + +
+ +--- + +### `getOrgPortalConfigV3` + +Retrieves the portal configuration for the organization. + +`GET /v3/portal/org/portal/config` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `portal_id` | query | string | Yes | PortalId of the portal | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getOrgPortalConfigV3 \ + -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c +``` + +With JSONata filter: + +```bash +epilot customer-portal getOrgPortalConfigV3 -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c --jsonata '$' +``` + +
+Sample Response + +```json +{ + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-12345.ecp.epilot.cloud", + "domain_settings": { + "is_custom_domain_enabled": true, + "is_epilot_domain_enabled": true, + "is_redirection_enabled": true + }, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": { + "start_page": true, + "billing": true, + "change_due_date": true, + "new_design": true + }, + "accessToken": "string", + "advanced_mfa": { + "enabled": true + }, + "auth_settings": { + "passwordless_login": { + "enabled": true + }, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "auto_redirect_to_sso": true + }, + "cognito_details": { + "cognito_user_pool_client_id": "6bsd0jkgoie74k2i8mrhc1vest", + "cognito_user_pool_arn": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "cognito_user_pool_id": "eu-central-1_CUEQRNbUb", + "password_policy": { + "minimum_length": 8, + "maximum_length": 256, + "require_lowercase": true, + "require_uppercase": true, + "require_numbers": true, + "require_symbols": true + } + }, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": { + "contact": ["name", "address"], + "contract": ["installment_amount"] + }, + "email_templates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "images": { + "orderLeftTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "orderRightTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "welcomeBanner": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg" + }, + "entity_identifiers": { + "type": { + "isEnabled": true, + "attributes": ["contract_number"] + } + }, + "contract_identifiers": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + } + ], + "contract_selector_config": { + "show_inactive": true, + "title_path": "string" + }, + "registration_identifiers": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ], + "triggered_journeys": [ + { + "trigger_name": "FIRST_LOGIN", + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "entity_edit_rules": [ + { + "slug": "contact", + "attribute": "first_name", + "rule_type": "cadence", + "cadence_period_type": "days", + "cadence_period": 1, + "changes_allowed": 1, + "grace_period": 1, + "allowed_increment": "10%", + "allowed_decrement": "10%", + "number_of_days_before_restriction": 10 + } + ], + "allowed_file_extensions": { + "document": ["pdf"], + "image": ["jpg"], + "spreadsheet": ["xls"], + "presentation": ["ppt"], + "audioVideo": ["mp4"], + "email": ["eml"], + "archive": ["zip"], + "cad": ["cad"], + "calendar": ["ics"], + "other": ["txt"] + }, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "pages": {}, + "id": 12345, + "organization_id": 12345, + "org_settings": { + "canary": { + "enabled": true + }, + "notracking": { + "enabled": true + } + }, + "feature_flags": {}, + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow" + } + ], + "identity_providers": [ + { + "slug": "office-365-login", + "display_name": "Office 365 Login", + "oidc_config": {}, + "mobile_oidc_config": {} + } + ], + "certificate_details": { + "status": "PENDING_VALIDATION", + "failed_reason": "CAA_ERROR" + } +} +``` + +
+ +--- + +### `getAllPortalConfigs` + +Retrieves all portal configurations. + +`GET /v2/portal/configs` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getAllPortalConfigs +``` + +With JSONata filter: + +```bash +epilot customer-portal getAllPortalConfigs --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-12345.ecp.epilot.cloud", + "domain_settings": {}, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": {}, + "accessToken": "string", + "advanced_mfa": {}, + "auth_settings": {}, + "cognito_details": {}, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": {}, + "email_templates": {}, + "images": {}, + "entity_identifiers": {}, + "contract_identifiers": [], + "contract_selector_config": {}, + "registration_identifiers": [], + "triggered_journeys": [], + "entity_edit_rules": [], + "allowed_file_extensions": {}, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "pages": {}, + "id": 12345, + "organization_id": 12345, + "org_settings": {}, + "feature_flags": {}, + "grants": [], + "identity_providers": [] + } + ] +} +``` + +
+ +--- + +### `getEmailTemplates` + +Retrieves the email templates of a portal + +`GET /v2/portal/email-templates` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | Yes | Origin of the portal | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getEmailTemplates \ + -p origin=example +``` + +With JSONata filter: + +```bash +epilot customer-portal getEmailTemplates -p origin=example --jsonata 'confirmAccount' +``` + +
+Sample Response + +```json +{ + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" +} +``` + +
+ +--- + +### `upsertEmailTemplates` + +Upserts the email templates of a portal + +`POST /v2/portal/email-templates` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | Yes | Origin of the portal | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal upsertEmailTemplates \ + -p origin=example +``` + +With request body: + +```bash +epilot customer-portal upsertEmailTemplates \ + -p origin=example \ + -d '{ + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal upsertEmailTemplates -p origin=example +``` + +With JSONata filter: + +```bash +epilot customer-portal upsertEmailTemplates -p origin=example --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "Email Templates upserted successfully", + "emailTemplates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + } +} +``` + +
+ +--- + +### `getEmailTemplatesByPortalId` + +Retrieves the email templates of a portal by portal ID + +`GET /v3/portal/email-templates/{portal_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `portal_id` | path | string | Yes | ID of the portal | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getEmailTemplatesByPortalId \ + -p portal_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getEmailTemplatesByPortalId 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot customer-portal getEmailTemplatesByPortalId -p portal_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'confirmAccount' +``` + +
+Sample Response + +```json +{ + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" +} +``` + +
+ +--- + +### `upsertEmailTemplatesByPortalId` + +Upserts the email templates of a portal by portal ID + +`POST /v3/portal/email-templates/{portal_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `portal_id` | path | string | Yes | ID of the portal | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal upsertEmailTemplatesByPortalId \ + -p portal_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot customer-portal upsertEmailTemplatesByPortalId \ + -p portal_id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" +}' +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal upsertEmailTemplatesByPortalId 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal upsertEmailTemplatesByPortalId -p portal_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot customer-portal upsertEmailTemplatesByPortalId -p portal_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "Email Templates upserted successfully", + "emailTemplates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + } +} +``` + +
+ +--- + +### `getPublicPortalWidgets` + +Retrieves the public widgets of a portal + +`GET /v2/portal/public-widgets` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `org_id` | query | string | Yes | | +| `origin` | query | string | Yes | Origin of the portal | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPublicPortalWidgets \ + -p org_id=123 \ + -p origin=example +``` + +With JSONata filter: + +```bash +epilot customer-portal getPublicPortalWidgets -p org_id=123 -p origin=example --jsonata 'widgets' +``` + +
+Sample Response + +```json +{ + "widgets": [ + { + "id": "string", + "type": "ACTION_WIDGET", + "listIndex": 0, + "headline": { + "en": "string", + "de": "string" + }, + "subHeadline": { + "en": "string", + "de": "string" + }, + "schema": "string" + }, + { + "id": "string", + "type": "ACTION_WIDGET", + "listIndex": 0, + "headline": { + "en": "string", + "de": "string" + }, + "subHeadline": { + "en": "string", + "de": "string" + }, + "content": "string" + } + ] +} +``` + +
+ +--- + +### `getPortalWidgets` + +Retrieves the widgets of a portal + +`GET /v2/portal/widgets` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | No | Origin of the portal | +| `contract_id` | query | string (uuid) | No | Contract context for widgets | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPortalWidgets +``` + +With JSONata filter: + +```bash +epilot customer-portal getPortalWidgets --jsonata 'widgets' +``` + +
+Sample Response + +```json +{ + "widgets": [ + { + "id": "string", + "type": "ACTION_WIDGET", + "listIndex": 0, + "headline": { + "en": "string", + "de": "string" + }, + "subHeadline": { + "en": "string", + "de": "string" + }, + "schema": "string" + }, + { + "id": "string", + "type": "ACTION_WIDGET", + "listIndex": 0, + "headline": { + "en": "string", + "de": "string" + }, + "subHeadline": { + "en": "string", + "de": "string" + }, + "content": "string" + } + ] +} +``` + +
+ +--- + +### `upsertPortalWidget` + +Upsert widget for a portal of an organization. + +`POST /v2/portal/widgets` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | Yes | Origin of the portal | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal upsertPortalWidget \ + -p origin=example +``` + +With request body: + +```bash +epilot customer-portal upsertPortalWidget \ + -p origin=example \ + -d '{ + "widgets": [ + { + "id": "string", + "type": "ACTION_WIDGET", + "listIndex": 0, + "headline": { + "en": "string", + "de": "string" + }, + "subHeadline": { + "en": "string", + "de": "string" + }, + "schema": "string" + }, + { + "id": "string", + "type": "ACTION_WIDGET", + "listIndex": 0, + "headline": { + "en": "string", + "de": "string" + }, + "subHeadline": { + "en": "string", + "de": "string" + }, + "content": "string" + } + ] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal upsertPortalWidget -p origin=example +``` + +With JSONata filter: + +```bash +epilot customer-portal upsertPortalWidget -p origin=example --jsonata 'widgets' +``` + +
+Sample Response + +```json +{ + "widgets": [ + { + "id": "string", + "type": "ACTION_WIDGET", + "listIndex": 0, + "headline": { + "en": "string", + "de": "string" + }, + "subHeadline": { + "en": "string", + "de": "string" + }, + "schema": "string" + }, + { + "id": "string", + "type": "ACTION_WIDGET", + "listIndex": 0, + "headline": { + "en": "string", + "de": "string" + }, + "subHeadline": { + "en": "string", + "de": "string" + }, + "content": "string" + } + ] +} +``` + +
+ +--- + +### `replaceECPTemplateVariables` + +Replaces the template variables of a portal + +`POST /v2/portal/replace-ecp-template-variables` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal replaceECPTemplateVariables \ + -d '{"template_id":"5da0a718-c822-403d-9f5d-20d4584e0528","entity_context":{}}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal replaceECPTemplateVariables +``` + +With JSONata filter: + +```bash +epilot customer-portal replaceECPTemplateVariables --jsonata 'customerPortal' +``` + +
+Sample Response + +```json +{ + "customerPortal": { + "invitationLink": "https://end-customer-portal.ecp.dev.epilot.io/register?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com", + "newDocumentLink": "https://end-customer-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b", + "entityLink": "https://end-customer-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b", + "userEmailsOnEntity": ["john@doe.com", "mary@doe.com"] + }, + "installerPortal": { + "invitationLink": "https://installer-portal.ecp.dev.epilot.io/register?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com", + "newDocumentLink": "https://installer-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b", + "entityLink": "https://installer-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b", + "userEmailsOnEntity": ["peter@doe.com", "jane@doe.com"] + }, + "portalUser": { + "invitationLink": "https://employee-portal.ecp.dev.epilot.io/register?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com", + "newDocumentLink": "https://employee-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b", + "entityLink": "https://employee-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b", + "userEmailsOnEntity": ["peter@doe.com", "jane@doe.com"] + } +} +``` + +
+ +--- + +### `getSchemas` + +Retrieves the schemas. Only schemas usable in the private part of the portal are returned. + +`GET /v2/portal/schemas` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getSchemas +``` + +With JSONata filter: + +```bash +epilot customer-portal getSchemas --jsonata 'schemas' +``` + +
+Sample Response + +```json +{ + "schemas": [ + { + "slug": "contact" + } + ] +} +``` + +
+ +--- + +### `getSchemasByDomain` + +Retrieves schemas by domain. Only schemas and attributes used on public pages are returned. + +`GET /v2/portal/public/schemas` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `domain` | query | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getSchemasByDomain \ + -p domain=ecp.dev.epilot.io +``` + +With JSONata filter: + +```bash +epilot customer-portal getSchemasByDomain -p domain=ecp.dev.epilot.io --jsonata 'schemas' +``` + +
+Sample Response + +```json +{ + "schemas": [ + { + "slug": "contact" + } + ] +} +``` + +
+ +--- + +### `getOrganizationSettingsByDomain` + +Retrieves organization settings by domain. Only public organization settings are returned. + +`GET /v2/portal/public/org/settings` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `domain` | query | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getOrganizationSettingsByDomain \ + -p domain=ecp.dev.epilot.io +``` + +With JSONata filter: + +```bash +epilot customer-portal getOrganizationSettingsByDomain -p domain=ecp.dev.epilot.io --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "automation_entity_mapping": { + "enabled": true + }, + "automation_preview": { + "enabled": true + }, + "central_inbox_preview_setting": { + "enabled": true + }, + "contracts_preview_setting": { + "enabled": true + }, + "disable_ivy": { + "enabled": true + }, + "double_opt_in": { + "enabled": true + }, + "ecommerce_catalog_preview": { + "enabled": true + }, + "ecommerce_opportunities_preview": { + "enabled": true + }, + "ecommerce_preview": { + "enabled": true + }, + "end_customer_portal": { + "enabled": true + }, + "installer_portal": { + "enabled": true + }, + "entity_schema_builder": { + "enabled": true + }, + "logic_editor_preview": { + "enabled": true + }, + "new_navigation": { + "enabled": true + }, + "partnering": { + "enabled": true + }, + "product-availability": { + "enabled": true + }, + "sso": { + "enabled": true + }, + "submission_preview": { + "enabled": true + }, + "user_roles_preview": { + "enabled": true + } + } +} +``` + +
+ +--- + +### `extraPermissionAttributes` + +Retrieves the extra permission attributes. + +`GET /v2/portal/extra-permission-attributes` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal extraPermissionAttributes +``` + +With JSONata filter: + +```bash +epilot customer-portal extraPermissionAttributes --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "contact": [ + { + "name": "string", + "label": "string", + "group": "string" + } + ], + "contract": [ + { + "name": "string", + "label": "string", + "group": "string" + } + ], + "order": [ + { + "name": "string", + "label": "string", + "group": "string" + } + ], + "opportunity": [ + { + "name": "string", + "label": "string", + "group": "string" + } + ], + "meter": [ + { + "name": "string", + "label": "string", + "group": "string" + } + ], + "meter_counter": [ + { + "name": "string", + "label": "string", + "group": "string" + } + ] + } +} +``` + +
+ +--- + +### `validateCaaRecords` + +Validates the CAA records of a portal + +`POST /v2/portal/validate/caa-records` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal validateCaaRecords \ + -p origin=example +``` + +With JSONata filter: + +```bash +epilot customer-portal validateCaaRecords -p origin=example --jsonata 'retry' +``` + +
+Sample Response + +```json +{ + "retry": true, + "message": "string", + "isDNSConfigured": true +} +``` + +
+ +--- + +### `validateCaaRecordsV3` + +Validates the CAA records of a portal + +`POST /v3/portal/validate/caa-records` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `portal_id` | query | string | Yes | PortalId of the portal | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal validateCaaRecordsV3 \ + -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c +``` + +With JSONata filter: + +```bash +epilot customer-portal validateCaaRecordsV3 -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c --jsonata 'retry' +``` + +
+Sample Response + +```json +{ + "retry": true, + "message": "string", + "isDNSConfigured": true +} +``` + +
+ +--- + +### `getContact` + +Retrieves the contact of the logged in user. + +`GET /v2/portal/contact` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getContact +``` + +With JSONata filter: + +```bash +epilot customer-portal getContact --jsonata 'entity._title' +``` + +
+Sample Response + +```json +{ + "entity": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "contact" + }, + "files": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "file" + } + ], + "relations": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "templates_output": { + "content_top_name": "Customer #123456", + "main_content_name": "Orange Flexible A2 (654321)", + "content_bottom_name": "Porscheplatz 1, 70435 Stuttgart, Germany", + "nested_content": { + "title": "Orange Flexible A2", + "subtitle": "654321" + } + }, + "_schema": "contact" + } + ], + "journey_actions": [ + { + "journey_id": "string", + "action_label": { + "en": "string", + "de": "string" + }, + "slug": "string", + "rules": [ + { + "entity": "string", + "attribute": "string", + "attribute_value": "string" + } + ] + } + ] +} +``` + +
+ +--- + +### `updateContact` + +Updates the contact details. + +`PATCH /v2/portal/contact` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal updateContact \ + -d '{}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal updateContact +``` + +With JSONata filter: + +```bash +epilot customer-portal updateContact --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "contact" + } +} +``` + +
+ +--- + +### `getECPContact` + +Get the Contact by id + +`GET /v2/portal/ecp/contact` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | query | string (uuid) | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getECPContact \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal getECPContact -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "contact" + } +} +``` + +
+ +--- + +### `checkContactExists` + +True if contact with given identifiers exists. + +`POST /v2/portal/public/contact/exists` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | Yes | Origin of the portal | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal checkContactExists \ + -p origin=example +``` + +With request body: + +```bash +epilot customer-portal checkContactExists \ + -p origin=example \ + -d '{ + "org_id": 728, + "registration_identifiers": { + "contact": { + "email": "john.doe@example.com" + }, + "contract": { + "contract_number": "123456" + } + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal checkContactExists -p origin=example +``` + +With JSONata filter: + +```bash +epilot customer-portal checkContactExists -p origin=example --jsonata 'exists' +``` + +
+Sample Response + +```json +{ + "exists": true, + "contactId": "5da0a718-c822-403d-9f5d-20d4584e0528" +} +``` + +
+ +--- + +### `checkContactExistsV3` + +True if contact with given identifiers exists. + +`POST /v3/portal/public/contact/exists` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `portal_id` | query | string | Yes | PortalId of the portal | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal checkContactExistsV3 \ + -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c +``` + +With request body: + +```bash +epilot customer-portal checkContactExistsV3 \ + -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c \ + -d '{ + "org_id": 728, + "registration_identifiers": { + "contact": { + "email": "john.doe@example.com" + }, + "contract": { + "contract_number": "123456" + } + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal checkContactExistsV3 -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c +``` + +With JSONata filter: + +```bash +epilot customer-portal checkContactExistsV3 -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c --jsonata 'exists' +``` + +
+Sample Response + +```json +{ + "exists": true, + "contactId": "5da0a718-c822-403d-9f5d-20d4584e0528" +} +``` + +
+ +--- + +### `getValidSecondaryAttributes` + +Get valid secondary attributes that are used while mapping a contact on registration + +`GET /v2/portal/contact/valid/secondary/attributes` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getValidSecondaryAttributes +``` + +With JSONata filter: + +```bash +epilot customer-portal getValidSecondaryAttributes --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "name": "first_name", + "type": "string" + } + ] +} +``` + +
+ +--- + +### `getPortalUser` + +Get the portal user details + +`GET /v2/portal/user` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPortalUser +``` + +With JSONata filter: + +```bash +epilot customer-portal getPortalUser --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "portal_user" + } +} +``` + +
+ +--- + +### `updatePortalUser` + +Update the portal user details + +`PATCH /v2/portal/user` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal updatePortalUser \ + -d '{}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal updatePortalUser +``` + +With JSONata filter: + +```bash +epilot customer-portal updatePortalUser --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "portal_user" + } +} +``` + +
+ +--- + +### `deletePortalUser` + +Delete the portal user + +`DELETE /v2/portal/user` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal deletePortalUser +``` + +With JSONata filter: + +```bash +epilot customer-portal deletePortalUser --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "message": "User Succesfully Deleted", + "data": "5da0a718-c822-403d-9f5d-20d4584e0528" +} +``` + +
+ +--- + +### `updatePortalUserEmail` + +Update portal user email + +`PUT /v2/portal/user/update/email` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal updatePortalUserEmail \ + -d '{"email":"john@doe.com","password":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal updatePortalUserEmail +``` + +With JSONata filter: + +```bash +epilot customer-portal updatePortalUserEmail --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "You will receive a confirmation mail soon on your updated email address." +} +``` + +
+ +--- + +### `resendConfirmationEmail` + +Resend confirmation email + +`POST /v2/portal/user/resend/confirmation-email/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | The ID of portal user id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal resendConfirmationEmail \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal resendConfirmationEmail 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal resendConfirmationEmail -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "Confirmation email sent successfully." +} +``` + +
+ +--- + +### `fetchPortalUsersByRelatedEntity` + +Get all users for a given entity + +`GET /v2/portal/users/by-related-entity` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `entity_id` | query | string (uuid) | Yes | | +| `slug` | query | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal fetchPortalUsersByRelatedEntity \ + -p entity_id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -p slug=contact +``` + +With JSONata filter: + +```bash +epilot customer-portal fetchPortalUsersByRelatedEntity -p entity_id=5da0a718-c822-403d-9f5d-20d4584e0528 -p slug=contact --jsonata 'portalUsers' +``` + +
+Sample Response + +```json +{ + "portalUsers": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "portal_user" + } + ] +} +``` + +
+ +--- + +### `confirmUser` + +Confirm a portal user + +`GET /v2/portal/user/confirm` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `confirmation_link_token` | query | string | Yes | | +| `use_redirect` | query | boolean | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal confirmUser \ + -p confirmation_link_token=example +``` + +With JSONata filter: + +```bash +epilot customer-portal confirmUser -p confirmation_link_token=example --jsonata 'confirmed' +``` + +
+Sample Response + +```json +{ + "confirmed": true, + "user_already_confirmed": true +} +``` + +
+ +--- + +### `confirmUserWithUserId` + +Confirm a portal user + +`GET /v2/portal/user/confirm/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | Yes | | +| `id` | path | string (uuid) | Yes | The ID of portal user id | +| `org_id` | query | string | Yes | Organization ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal confirmUserWithUserId \ + -p origin=example \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -p org_id=123 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal confirmUserWithUserId 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal confirmUserWithUserId -p origin=example -p id=5da0a718-c822-403d-9f5d-20d4584e0528 -p org_id=123 --jsonata '$' +``` + +--- + +### `userExists` + +Checks whether a user exists in the portal + +`GET /v2/portal/public/user/exists` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `email` | query | string | Yes | | +| `org_id` | query | string | Yes | | +| `origin` | query | string | No | Checkes if user exists in the given portal origin. If not provided, checks in all origins. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal userExists \ + -p email=user@example.com \ + -p org_id=123 +``` + +With JSONata filter: + +```bash +epilot customer-portal userExists -p email=user@example.com -p org_id=123 --jsonata 'exists' +``` + +
+Sample Response + +```json +{ + "exists": true +} +``` + +
+ +--- + +### `userExistsV3` + +Checks whether a user exists in the portal + +`GET /v3/portal/public/user/exists` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `email` | query | string | Yes | | +| `org_id` | query | string | Yes | | +| `portal_id` | query | string | No | Checkes if user exists in the given portal ID. If not provided, checks in all portals. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal userExistsV3 \ + -p email=user@example.com \ + -p org_id=123 +``` + +With JSONata filter: + +```bash +epilot customer-portal userExistsV3 -p email=user@example.com -p org_id=123 --jsonata 'exists' +``` + +
+Sample Response + +```json +{ + "exists": true +} +``` + +
+ +--- + +### `getRecipientsToNotifyOnAutomation` + +Get recipients to notify on automation + +`POST /v2/portal/recipients-to-notify` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getRecipientsToNotifyOnAutomation +``` + +With request body: + +```bash +epilot customer-portal getRecipientsToNotifyOnAutomation \ + -d '{ + "emails": ["john@doe.com"], + "template_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "context_id": "5da0a718-c822-403d-9f5d-20d4584e0528" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal getRecipientsToNotifyOnAutomation +``` + +With JSONata filter: + +```bash +epilot customer-portal getRecipientsToNotifyOnAutomation --jsonata 'recipients' +``` + +
+Sample Response + +```json +{ + "recipients": [ + { + "email": "john@doe.com", + "recipient_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "message": "string" +} +``` + +
+ +--- + +### `configureDistribution` + +Configure the distribution for the portal's custom domain + +`GET /v2/portal/configure-distribution` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal configureDistribution \ + -p origin=example +``` + +With JSONata filter: + +```bash +epilot customer-portal configureDistribution -p origin=example --jsonata 'domainName' +``` + +
+Sample Response + +```json +{ + "domainName": "dsj8op4ha01jha23.cloudfront.net" +} +``` + +
+ +--- + +### `configureDistributionV3` + +Configure the distribution for the portal's custom domain + +`GET /v3/portal/configure-distribution` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `portal_id` | query | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal configureDistributionV3 \ + -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c +``` + +With JSONata filter: + +```bash +epilot customer-portal configureDistributionV3 -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c --jsonata 'domainName' +``` + +
+Sample Response + +```json +{ + "domainName": "dsj8op4ha01jha23.cloudfront.net" +} +``` + +
+ +--- + +### `getAllOrders` + +Get all orders for the portal user + +`GET /v2/portal/order` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `from` | query | number | No | | +| `size` | query | number | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getAllOrders +``` + +With JSONata filter: + +```bash +epilot customer-portal getAllOrders --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "order", + "journey_actions": { + "journey_id": "string", + "action_label": { + "en": "string", + "de": "string" + }, + "slug": "string", + "rules": [ + { + "entity": "string", + "attribute": "string", + "attribute_value": "string" + } + ] + } + } + ] +} +``` + +
+ +--- + +### `postOrderAcceptance` + +Accept/decline an offer by id + +`POST /v2/portal/order/{id}/acceptance` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | The ID of order | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal postOrderAcceptance \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -d '{"decision":"accept"}' +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal postOrderAcceptance 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal postOrderAcceptance -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal postOrderAcceptance -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "order" + } +} +``` + +
+ +--- + +### `getOrder` + +Get an order by id + +`GET /v2/portal/order/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | The ID of order | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getOrder \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getOrder 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal getOrder -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'entity._title' +``` + +
+Sample Response + +```json +{ + "entity": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "order" + }, + "files": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "file" + } + ], + "relations": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "templates_output": {}, + "_schema": "contact" + } + ], + "products": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "product" + } + ], + "crossSellableProducts": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "product" + } + ], + "workflow": [ + { + "id": "8gja72h6kas6h", + "name": "Lead Qualification", + "trigger": "MANUAL", + "status": "STARTED", + "creationTime": "2021-04-27T12:01:13.000Z", + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:01:13.000Z", + "assignedTo": ["252", "29052"], + "flow": [] + } + ], + "journey_actions": [ + { + "journey_id": "string", + "action_label": {}, + "slug": "string", + "rules": [] + } + ] +} +``` + +
+ +--- + +### `updateOrder` + +Update an order by id + +`PATCH /v2/portal/order/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | The ID of order | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal updateOrder \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -d '{}' +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal updateOrder 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal updateOrder -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal updateOrder -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "order" + } +} +``` + +
+ +--- + +### `getAllOpportunities` + +Get all opportunities of a portal user + +`GET /v2/portal/opportunity` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `from` | query | number | No | | +| `size` | query | number | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getAllOpportunities +``` + +With JSONata filter: + +```bash +epilot customer-portal getAllOpportunities --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "opportunity", + "journey_actions": { + "journey_id": "string", + "action_label": { + "en": "string", + "de": "string" + }, + "slug": "string", + "rules": [ + { + "entity": "string", + "attribute": "string", + "attribute_value": "string" + } + ] + } + } + ] +} +``` + +
+ +--- + +### `getSearchableAttributesForOpportunities` + +Get all opportunity searchable attributes for a portal user + +`GET /v2/portal/opportunities/searchable-attributes` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `from` | query | number | No | | +| `size` | query | number | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getSearchableAttributesForOpportunities +``` + +With JSONata filter: + +```bash +epilot customer-portal getSearchableAttributesForOpportunities --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "opportunity" + } + ] +} +``` + +
+ +--- + +### `getSearchResultsForOpportunities` + +Get all opportunity with the given serached attributes + +`POST /v2/portal/opportunities/search` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `from` | query | number | No | | +| `size` | query | number | No | | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getSearchResultsForOpportunities \ + -d '{"addresses":["string"],"customers":["string"],"purposes":["5da0a718-c822-403d-9f5d-20d4584e0528"],"workflows":[{}]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal getSearchResultsForOpportunities +``` + +With JSONata filter: + +```bash +epilot customer-portal getSearchResultsForOpportunities --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "opportunity" + } + ] +} +``` + +
+ +--- + +### `getOpportunity` + +Get an opportunity by id + +`GET /v2/portal/opportunities/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | The ID of opportunity | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getOpportunity \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getOpportunity 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal getOpportunity -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'entity._title' +``` + +
+Sample Response + +```json +{ + "entity": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "opportunity" + }, + "orders": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "order" + } + ], + "files": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "file" + } + ], + "relations": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "templates_output": {}, + "_schema": "contact" + } + ], + "workflow": [ + { + "id": "8gja72h6kas6h", + "name": "Lead Qualification", + "trigger": "MANUAL", + "status": "STARTED", + "creationTime": "2021-04-27T12:01:13.000Z", + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:01:13.000Z", + "assignedTo": ["252", "29052"], + "flow": [] + } + ], + "journey_actions": [ + { + "journey_id": "string", + "action_label": {}, + "slug": "string", + "rules": [] + } + ] +} +``` + +
+ +--- + +### `updateOpportunity` + +Update an opportunity by id + +`PATCH /v2/portal/opportunities/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | The ID of opportunity | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal updateOpportunity \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -d '{}' +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal updateOpportunity 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal updateOpportunity -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal updateOpportunity -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "opportunity" + } +} +``` + +
+ +--- + +### `getAllRequests` + +Get all opportunities & orders of a portal user + +`GET /v2/portal/request` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `from` | query | number | No | | +| `size` | query | number | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getAllRequests +``` + +With JSONata filter: + +```bash +epilot customer-portal getAllRequests --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 1, + "results": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "opportunity" + } + ] +} +``` + +
+ +--- + +### `getAllContracts` + +Get all contracts for a portal user + +`GET /v2/portal/contract` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `from` | query | number | No | | +| `size` | query | number | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getAllContracts +``` + +With JSONata filter: + +```bash +epilot customer-portal getAllContracts --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "contract_name": "Grid Contract", + "contract_number": "12345", + "status": "approved", + "description": "This contract is for the supply of widgets.", + "account_number": "67890", + "branch": "power", + "billing_address": "123 Main St, Anytown", + "delivery_address": "456 Elm St, Anytown", + "additional_addresses": "789 Oak St, Anytown", + "termination_date": "2022-01-01", + "termination_reason": "Non-payment", + "billing_period": "monthly", + "billing_duration_amount": 30, + "renewal_duration_amount": 365, + "renewal_duration_unit": "years", + "notice_time_amount": 30, + "notice_time_unit": "months", + "start_date": "2021-01-01", + "billing_due_day": 2, + "installment_amount": 10050, + "balance": 8990, + "balance_currency": "EUR", + "journey_actions": { + "journey_id": "string", + "action_label": { + "en": "string", + "de": "string" + }, + "slug": "string", + "rules": [ + { + "entity": "string", + "attribute": "string", + "attribute_value": "string" + } + ] + } + } + ] +} +``` + +
+ +--- + +### `getContract` + +Get a contract by id + +`GET /v2/portal/contract/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | The ID of the contract | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getContract \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getContract 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal getContract -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'entity._title' +``` + +
+Sample Response + +```json +{ + "entity": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "contract_name": "Grid Contract", + "contract_number": "12345", + "status": "approved", + "description": "This contract is for the supply of widgets.", + "account_number": "67890", + "branch": "power", + "billing_address": "123 Main St, Anytown", + "delivery_address": "456 Elm St, Anytown", + "additional_addresses": "789 Oak St, Anytown", + "termination_date": "2022-01-01", + "termination_reason": "Non-payment", + "billing_period": "monthly", + "billing_duration_amount": 30, + "renewal_duration_amount": 365, + "renewal_duration_unit": "years", + "notice_time_amount": 30, + "notice_time_unit": "months", + "start_date": "2021-01-01", + "billing_due_day": 2, + "installment_amount": 10050, + "balance": 8990, + "balance_currency": "EUR" + }, + "orders": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "order" + } + ], + "meters": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "meter" + } + ], + "files": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "file" + } + ], + "relations": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "templates_output": {}, + "_schema": "contact" + } + ], + "workflow": [ + { + "id": "8gja72h6kas6h", + "name": "Lead Qualification", + "trigger": "MANUAL", + "status": "STARTED", + "creationTime": "2021-04-27T12:01:13.000Z", + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:01:13.000Z", + "assignedTo": ["252", "29052"], + "flow": [] + } + ], + "journey_actions": [ + { + "journey_id": "string", + "action_label": {}, + "slug": "string", + "rules": [] + } + ] +} +``` + +
+ +--- + +### `updateContract` + +Update a contract by id + +`PATCH /v2/portal/contract/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | The ID of the contract | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal updateContract \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -d '{}' +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal updateContract 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal updateContract -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal updateContract -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "contract_name": "Grid Contract", + "contract_number": "12345", + "status": "approved", + "description": "This contract is for the supply of widgets.", + "account_number": "67890", + "branch": "power", + "billing_address": "123 Main St, Anytown", + "delivery_address": "456 Elm St, Anytown", + "additional_addresses": "789 Oak St, Anytown", + "termination_date": "2022-01-01", + "termination_reason": "Non-payment", + "billing_period": "monthly", + "billing_duration_amount": 30, + "renewal_duration_amount": 365, + "renewal_duration_unit": "years", + "notice_time_amount": 30, + "notice_time_unit": "months", + "start_date": "2021-01-01", + "billing_due_day": 2, + "installment_amount": 10050, + "balance": 8990, + "balance_currency": "EUR" + } +} +``` + +
+ +--- + +### `addContractByIdentifiers` + +Self-assign contract(s) by pre-configured identifiers. + +`POST /v2/portal/contract/by-identifiers` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal addContractByIdentifiers \ + -d '{"contract":{"contract_number":"123456"},"meter":{"meter_number":"123456"}}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal addContractByIdentifiers +``` + +With JSONata filter: + +```bash +epilot customer-portal addContractByIdentifiers --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "templates_output": { + "content_top_name": "Customer #123456", + "main_content_name": "Orange Flexible A2 (654321)", + "content_bottom_name": "Porscheplatz 1, 70435 Stuttgart, Germany", + "nested_content": { + "title": "Orange Flexible A2", + "subtitle": "654321" + } + }, + "_schema": "contact" + } + ], + "hits": 0 +} +``` + +
+ +--- + +### `getEntityIdentifiers` + +Retrieve a list of entity identifiers used for entity search by portal users. + +`GET /v2/portal/entity/identifiers/{slug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | The slug of an entity | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getEntityIdentifiers \ + -p slug=contact +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getEntityIdentifiers contact +``` + +With JSONata filter: + +```bash +epilot customer-portal getEntityIdentifiers -p slug=contact --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "name": "contract_number", + "type": "string" + } + ] +} +``` + +
+ +--- + +### `getEntityActivityFeed` + +Get activity feed for an entity + +`GET /v2/portal/entity/{slug}/{id}/activity` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `after` | query | string (date-time) | No | Get activities after this timestamp | +| `before` | query | string (date-time) | No | get activities before this timestamp | +| `from` | query | number | No | start from page | +| `size` | query | number | No | max number of results to return | +| `type` | query | string | No | Filter by activity type | +| `include_relations` | query | boolean | No | Include activities from related entities | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getEntityActivityFeed \ + -p slug=contact \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getEntityActivityFeed contact 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal getEntityActivityFeed -p slug=contact -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "total": 1, + "results": [ + { + "_id": "01F130Q52Q6MWSNS8N2AVXV4JN", + "timestamp": "1970-01-01T00:00:00.000Z", + "type": "MyCustomActivity", + "title": "My custom activity", + "message": "{{caller}} did something with {{entity payload.entity.id}}.", + "payload": { + "entity": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "schema": "contact" + } + } + } + ] +} +``` + +
+ +--- + +### `validateCadenceEntityEditRules` + +Validate if cadence rule is valid for an entity + +`GET /v2/portal/{slug}/{id}:validateRule` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `attribute` | query | string | No | Get activities after this timestamp | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal validateCadenceEntityEditRules \ + -p slug=contact \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal validateCadenceEntityEditRules contact 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal validateCadenceEntityEditRules -p slug=contact -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'isBlockedByRules' +``` + +
+Sample Response + +```json +{ + "isBlockedByRules": false, + "failedRule": { + "slug": "contact", + "attribute": "string", + "rule_type": "string", + "cadence_period_type": "string", + "changes_allowed": 0, + "cadence_period": 0, + "allowed_decrement": "string", + "allowed_increment": "string", + "number_of_days_before_restriction": 0, + "grace_period": 0 + } +} +``` + +
+ +--- + +### `searchPaymentRelationsInEntities` + +Search for entities that have the payment relation with the given payment id + +`GET /v2/portal/entities-by-payment/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Entity id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal searchPaymentRelationsInEntities \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal searchPaymentRelationsInEntities 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal searchPaymentRelationsInEntities -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "templates_output": { + "content_top_name": "Customer #123456", + "main_content_name": "Orange Flexible A2 (654321)", + "content_bottom_name": "Porscheplatz 1, 70435 Stuttgart, Germany", + "nested_content": { + "title": "Orange Flexible A2", + "subtitle": "654321" + } + }, + "_schema": "contact" + } + ], + "hits": 50 +} +``` + +
+ +--- + +### `createCustomEntityActivity` + +Create a custom activity that can be displayed in activity feed of an entity. + +`PUT /v2/portal/entity/activity` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `entities` | query | string (uuid)[] | No | Comma-separated list of entities which the activity primarily concerns. Deprecated - ignored as the list of entities is automatically determined now. | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal createCustomEntityActivity \ + -d '{"type":"PortalUserResetPassword"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal createCustomEntityActivity +``` + +With JSONata filter: + +```bash +epilot customer-portal createCustomEntityActivity --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "01F130Q52Q6MWSNS8N2AVXV4JN", + "timestamp": "1970-01-01T00:00:00.000Z", + "type": "MyCustomActivity", + "title": "My custom activity", + "message": "{{caller}} did something with {{entity payload.entity.id}}.", + "payload": { + "entity": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "schema": "contact" + } + } +} +``` + +
+ +--- + +### `saveEntityFile` + +Add files to an entity + +`POST /v2/portal/entity/file` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal saveEntityFile +``` + +With request body: + +```bash +epilot customer-portal saveEntityFile \ + -d '{ + "entity_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "entity_type": "order", + "files": [ + { + "filename": "document.pdf", + "access_control": "private", + "s3ref": { + "bucket": 12345, + "key": 12345 + } + } + ] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal saveEntityFile +``` + +With JSONata filter: + +```bash +epilot customer-portal saveEntityFile --jsonata 'createdFiles' +``` + +
+Sample Response + +```json +{ + "createdFiles": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "file" + } + ] +} +``` + +
+ +--- + +### `deleteEntityFile` + +Delete files from an entity + +`DELETE /v2/portal/entity/file` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal deleteEntityFile +``` + +With request body: + +```bash +epilot customer-portal deleteEntityFile \ + -d '{ + "entity_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "entity_type": "order", + "file_entity_ids": ["5da0a718-c822-403d-9f5d-20d4584e0528"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal deleteEntityFile +``` + +With JSONata filter: + +```bash +epilot customer-portal deleteEntityFile --jsonata '$' +``` + +--- + +### `savePortalFiles` + +Add files to portal + +`POST /v2/portal/portal/files` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal savePortalFiles +``` + +With request body: + +```bash +epilot customer-portal savePortalFiles \ + -d '{ + "origin": "string", + "files": [ + { + "filename": 12345, + "file_type": "orderRightTeaser", + "_tags": 12345, + "s3ref": { + "bucket": 12345, + "key": 12345 + } + } + ] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal savePortalFiles +``` + +With JSONata filter: + +```bash +epilot customer-portal savePortalFiles --jsonata 'createdFiles' +``` + +
+Sample Response + +```json +{ + "createdFiles": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "file" + } + ] +} +``` + +
+ +--- + +### `getRegistrationIdentifiers` + +Get valid attributes from entities that can be used as identifier to map contact to user on registration + +`GET /v2/portal/registration/identifiers` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getRegistrationIdentifiers +``` + +With JSONata filter: + +```bash +epilot customer-portal getRegistrationIdentifiers --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "contact": [ + { + "label": "First name", + "name": "first_name", + "type": "string" + } + ], + "contract": [ + { + "label": "Contract number", + "name": "contract_number", + "type": "string" + } + ] + } +} +``` + +
+ +--- + +### `getFileById` + +Fetch a document with ID + +`GET /v2/portal/user/file/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | The Id of a file | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getFileById \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getFileById 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal getFileById -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'file' +``` + +
+Sample Response + +```json +{ + "file": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "file", + "filename": "document.pdf", + "access_control": "private", + "file_date": "2021-02-09T12:41:43.662Z", + "public_url": "https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf", + "type": "document", + "mime_type": "application/pdf", + "_relations": [ + { + "entity_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_schema": "contact", + "_title": "Opportunity ABC" + } + ], + "is_new": true + } +} +``` + +
+ +--- + +### `trackFileDownloaded` + +Track that user has downloaded a file + +`POST /v2/portal/user/file/{id}/downloaded` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | The Id of a file | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal trackFileDownloaded \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal trackFileDownloaded 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal trackFileDownloaded -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'file' +``` + +
+Sample Response + +```json +{ + "file": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "file", + "filename": "document.pdf", + "access_control": "private", + "file_date": "2021-02-09T12:41:43.662Z", + "public_url": "https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf", + "type": "document", + "mime_type": "application/pdf", + "_relations": [ + { + "entity_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_schema": "contact", + "_title": "Opportunity ABC" + } + ], + "is_new": true + } +} +``` + +
+ +--- + +### `getBillingEvents` + +Fetch billing events for a portal user + +`GET /v2/portal/billing/events` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `from` | query | number | No | | +| `size` | query | number | No | | +| `entity_id` | query | string (uuid)[] | No | Entity ID to filter billing events by | +| `event_type` | query | "installment" \| "reimbursement" | No | | +| `paid` | query | boolean | No | | +| `date_after` | query | string (date-time) | No | | +| `date_before` | query | string (date-time) | No | | +| `sort` | query | string | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getBillingEvents +``` + +With JSONata filter: + +```bash +epilot customer-portal getBillingEvents --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "billing_amount_decimal": "100.50", + "billing_amount": 10050, + "billing_currency": "EUR", + "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e", + "contract": { + "$relation": [ + { + "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + ] + }, + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "type": "installment", + "due_date": "1970-01-01", + "paid_date": "1970-01-01" + } + ], + "hits": 50 +} +``` + +
+ +--- + +### `getCustomerBalance` + +Get total balance across all contracts and orders of a customer entity. + +`GET /v2/portal/billing/customers/balance` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getCustomerBalance +``` + +With JSONata filter: + +```bash +epilot customer-portal getCustomerBalance --jsonata 'balance' +``` + +
+Sample Response + +```json +{ + "balance": 8990, + "balance_decimal": "89.90", + "balance_currency": "EUR" +} +``` + +
+ +--- + +### `getBillingAccount` + +Get a billing account by id. + +`GET /v2/portal/billing/accounts/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getBillingAccount \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getBillingAccount 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal getBillingAccount -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata 'entity._title' +``` + +
+Sample Response + +```json +{ + "entity": { + "billing_account_number": "string", + "balance": 0, + "balance_decimal": "string", + "balance_currency": "EUR", + "billing_contact": { + "$relation": [ + { + "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + ] + }, + "billing_address": { + "$relation_ref": [ + { + "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896", + "path": "address", + "_id": "f589786b-3024-43cd-9cb3-5a3c953f2896" + } + ] + }, + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z" + }, + "relations": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "templates_output": { + "content_top_name": "Customer #123456", + "main_content_name": "Orange Flexible A2 (654321)", + "content_bottom_name": "Porscheplatz 1, 70435 Stuttgart, Germany", + "nested_content": { + "title": "Orange Flexible A2", + "subtitle": "654321" + } + }, + "_schema": "contact" + } + ] +} +``` + +
+ +--- + +### `loginToPortalAsUser` + +Generate a token to log in to a portal impersonating a users. + +`POST /v2/portal/admin:login-as-user` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal loginToPortalAsUser \ + -d '{"email":"portal-customer@email.com","origin":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal loginToPortalAsUser +``` + +With JSONata filter: + +```bash +epilot customer-portal loginToPortalAsUser --jsonata 'login_as_token' +``` + +
+Sample Response + +```json +{ + "login_as_token": "string" +} +``` + +
+ +--- + +### `triggerEntityAccessEvent` + +Trigger entity access event for a portal user + +`POST /v2/portal/entity/{schema}/access` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `schema` | path | string | Yes | Entity schema | +| `entity_id` | query | string (uuid) | No | Entity ID | +| `origin` | query | string | Yes | Portal origin | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal triggerEntityAccessEvent \ + -p schema=contract \ + -p origin=example +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal triggerEntityAccessEvent contract +``` + +With JSONata filter: + +```bash +epilot customer-portal triggerEntityAccessEvent -p schema=contract -p origin=example --jsonata 'eventId' +``` + +
+Sample Response + +```json +{ + "eventId": "string" +} +``` + +
+ +--- + +### `triggerEntityAccessEventV3` + +Trigger entity access event for a portal user + +`POST /v3/portal/entity/{schema}/access` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `schema` | path | string | Yes | Entity schema | +| `entity_id` | query | string (uuid) | No | Entity ID | +| `portal_id` | query | string | Yes | Portal ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal triggerEntityAccessEventV3 \ + -p schema=contract \ + -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal triggerEntityAccessEventV3 contract +``` + +With JSONata filter: + +```bash +epilot customer-portal triggerEntityAccessEventV3 -p schema=contract -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c --jsonata 'eventId' +``` + +
+Sample Response + +```json +{ + "eventId": "string" +} +``` + +
+ +--- + +### `getPortalUserEntity` + +Get a single entity for a portal user + +`POST /v2/portal/entity:get` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPortalUserEntity +``` + +With request body: + +```bash +epilot customer-portal getPortalUserEntity \ + -d '{ + "slug": "contact", + "entity_id": "3ec28ab5-8598-41ef-9486-b57fca1d5e2a", + "hydrate": false, + "fields": ["_id", "_title"], + "templates": { + "content_top_name": "Customer #{{contract.customer_number}}", + "main_content_name": "{{contract.contract_name}} ({{contract.contract_number}})", + "content_bottom_name": "{{custom_contract_delivery_address}}", + "nested_content": { + "title": "{{contract.contract_name}}", + "subtitle": "{{contract.contract_number}}" + } + }, + "filters": [ + { + "term": { + "status.keyword": "active" + } + }, + { + "range": { + "_created_at": { + "gte": "2023-01-01" + } + } + } + ], + "filters_context": [ + { + "portal_user": true + }, + { + "contact": true + } + ], + "targets": ["3ec28ab5-8598-41ef-9486-b57fca1d5e2a"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal getPortalUserEntity +``` + +With JSONata filter: + +```bash +epilot customer-portal getPortalUserEntity --jsonata 'result' +``` + +
+Sample Response + +```json +{ + "result": { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "templates_output": { + "content_top_name": "Customer #123456", + "main_content_name": "Orange Flexible A2 (654321)", + "content_bottom_name": "Porscheplatz 1, 70435 Stuttgart, Germany", + "nested_content": { + "title": "Orange Flexible A2", + "subtitle": "654321" + } + }, + "_schema": "contact" + } +} +``` + +
+ +--- + +### `searchPortalUserEntities` + +Search all entities of a portal user + +`POST /v2/portal/entity:search` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal searchPortalUserEntities +``` + +With request body: + +```bash +epilot customer-portal searchPortalUserEntities \ + -d '{ + "slug": "contact", + "q": "contract", + "q_fields": ["_title", "customer._title", "customer.first_name", "customer.last_name"], + "group": "customer._title", + "group_title": "{{customer[Primary].first_name}} {{customer[Primary].last_name}}", + "group_size": 100, + "group_sort": "desc", + "group_after_key": {}, + "sort": "_created_at:desc", + "from": 0, + "size": 100, + "hydrate": false, + "fields": ["_id", "_title"], + "templates": { + "content_top_name": "Customer #{{contract.customer_number}}", + "main_content_name": "{{contract.contract_name}} ({{contract.contract_number}})", + "content_bottom_name": "{{custom_contract_delivery_address}}" + }, + "filters": [ + { + "term": { + "status.keyword": "active" + } + }, + { + "range": { + "_created_at": { + "gte": "2023-01-01" + } + } + } + ], + "filters_context": [ + { + "portal_user": true + }, + { + "contact": true + } + ], + "targets": ["3ec28ab5-8598-41ef-9486-b57fca1d5e2a"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal searchPortalUserEntities +``` + +With JSONata filter: + +```bash +epilot customer-portal searchPortalUserEntities --jsonata '$' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "templates_output": { + "content_top_name": "Customer #123456", + "main_content_name": "Orange Flexible A2 (654321)", + "content_bottom_name": "Porscheplatz 1, 70435 Stuttgart, Germany", + "nested_content": { + "title": "Orange Flexible A2", + "subtitle": "654321" + } + }, + "_schema": "contact" + } + ], + "pagination": { + "from": 0, + "size": 10, + "total": 50, + "has_more": true + }, + "hits": 10 +} +``` + +
+ +--- + +### `canTriggerPortalFlow` + +Returns whether the user can trigger a portal flow + +`POST /v2/portal/can-trigger-portal-flow` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | No | Origin of the portal | +| `portal_id` | query | string | Yes | | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal canTriggerPortalFlow \ + -p portal_id=123 +``` + +With request body: + +```bash +epilot customer-portal canTriggerPortalFlow \ + -p portal_id=123 \ + -d '{ + "activity_id": "01F130Q52Q6MWSNS8N2AVXV4JN", + "ecp_config": { + "file_config": { + "shared_with_end_customer": true, + "_tags": ["example", "mock"] + } + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal canTriggerPortalFlow -p portal_id=123 +``` + +With JSONata filter: + +```bash +epilot customer-portal canTriggerPortalFlow -p portal_id=123 --jsonata 'can_trigger' +``` + +
+Sample Response + +```json +{ + "can_trigger": true +} +``` + +
+ +--- + +### `getAutomationContext` + +Retrieves the automation context. + +`GET /v2/portal/automation-context` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `activity_id` | query | string (ulid) | Yes | Activity ID | +| `type` | query | "file" | Yes | Type of the context to retrieve | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getAutomationContext \ + -p activity_id=01F130Q52Q6MWSNS8N2AVXV4JN \ + -p type=example +``` + +With JSONata filter: + +```bash +epilot customer-portal getAutomationContext -p activity_id=01F130Q52Q6MWSNS8N2AVXV4JN -p type=example --jsonata '$' +``` + +
+Sample Response + +```json +{} +``` + +
+ +--- + +### `updateWorkflowStepAsDone` + +Update a workflow step as done + +`PUT /v2/portal/workflow/{workflow_id}/{step_id}:markDone` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `workflow_id` | path | string | Yes | | +| `step_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal updateWorkflowStepAsDone \ + -p workflow_id=0bjwcxc827t \ + -p step_id=q1d6vcbsqvn +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal updateWorkflowStepAsDone 0bjwcxc827t q1d6vcbsqvn +``` + +With JSONata filter: + +```bash +epilot customer-portal updateWorkflowStepAsDone -p workflow_id=0bjwcxc827t -p step_id=q1d6vcbsqvn --jsonata '$' +``` + +
+Sample Response + +```json +{ + "startedTime": "2024-01-12T13:29:55.942Z", + "requirements": [], + "created": "2023-10-20T17:41:10.256Z", + "executionType": "MANUAL", + "assignedToInProgress": "-", + "sectionId": "lzxsw2sblj7", + "type": "STEP", + "entityRefId": "q1d6vcbsqvn", + "assignedTo": ["10014532"], + "lastUpdated": "2024-01-13T05:18:43.838Z", + "ecp": {}, + "userIds": [], + "name": "Hinterlege den vereinbarten LIC Termin", + "id": "q1d6vcbsqvn", + "definitionId": "9UjHKq", + "status": "COMPLETED", + "manuallyCreated": false, + "enabled": true, + "completedTime": "2024-01-13T05:18:43.827Z" +} +``` + +
+ +--- + +### `getEntityWorkflows` + +Get all workflows associated with an entity (requires access to the entity) + +`GET /v2/portal/entity/{slug}/{id}/workflows` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | | +| `id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getEntityWorkflows \ + -p slug=contact \ + -p id=abc123 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getEntityWorkflows contact abc123 +``` + +With JSONata filter: + +```bash +epilot customer-portal getEntityWorkflows -p slug=contact -p id=abc123 --jsonata 'workflow_executions' +``` + +
+Sample Response + +```json +{ + "workflow_executions": [ + { + "id": "8gja72h6kas6h", + "name": "Lead Qualification", + "trigger": "MANUAL", + "status": "STARTED", + "creationTime": "2021-04-27T12:01:13.000Z", + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:01:13.000Z", + "assignedTo": ["252", "29052"], + "flow": [ + { + "id": "sectionId1", + "name": "Initial Information Gathering", + "steps": [ + { + "id": "sada5641f3a21", + "name": "Call client and confirm address and product", + "status": "ASSIGNED", + "assignedTo": ["11"] + }, + { + "id": "sada5641f3a22", + "name": "Check product availability", + "status": "UNASSIGNED" + } + ] + }, + { + "id": "firstLevelStepId1", + "name": "Print and send catalog", + "status": "SKIPPED", + "dueDate": "2023-01-15T20:00:00" + } + ] + } + ] +} +``` + +
+ +--- + +### `uploadMeterReadingPhoto` + +Uploads a Meter Reading photo and - if enabled - gives back data extracted from the photo. + +`POST /v2/portal/metering/reading/photo` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal uploadMeterReadingPhoto +``` + +With request body: + +```bash +epilot customer-portal uploadMeterReadingPhoto \ + -d '{ + "filename": "Reading 10.01.2025.jpg", + "mime_type": "image/jpeg", + "contents": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMTEhUTExMWFhUXGBgYGBgYGBgYGBgYGBgYFxgYFxgYHSggGBolHRgXITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGhAQGy0lHyUt", + "meter_id": "5da0a718-c822-403d-9f5d-20d4584e0528" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal uploadMeterReadingPhoto +``` + +With JSONata filter: + +```bash +epilot customer-portal uploadMeterReadingPhoto --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "filename": "Reading 10.01.2025.jpg", + "s3ref": { + "bucket": "meter-readings", + "key": "uuid/reading-10.01.2025.jpg" + }, + "reading": "000123.45", + "sector": "water", + "meter_numbers": ["00123456"] + } +} +``` + +
+ +--- + +### `createMeterReading` + +Inserts a new meter reading. + +`POST /v2/portal/metering/reading` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `override_plausibility` | query | boolean | No | Override plausibility check | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal createMeterReading +``` + +With request body: + +```bash +epilot customer-portal createMeterReading \ + -d '{ + "value": 240, + "read_by": "John Doe", + "reason": "Storing the feed-in record", + "meter_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "counter_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal createMeterReading +``` + +With JSONata filter: + +```bash +epilot customer-portal createMeterReading --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "value": 240, + "read_by": "John Doe", + "reason": "Storing the feed-in record", + "meter_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "counter_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + } + } +} +``` + +
+ +--- + +### `getAllowedMeterReadingRange` + +Get allowed reading range for all counters of a meter from the configured + +`GET /v2/portal/metering/reading/allowed-range/{meter_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `meter_id` | path | string | Yes | The ID of the meter. | +| `origin` | query | string | No | Origin of the portal | +| `timestamp` | query | string | No | If not provided, the system will default to now. | +| `context_entities` | query | object[] | No | Additional entities to include in the context for variable interpolation in the hook. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getAllowedMeterReadingRange \ + -p meter_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getAllowedMeterReadingRange 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot customer-portal getAllowedMeterReadingRange -p meter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "meter_counter_id": "string", + "min_value": 0, + "max_value": 0 + } + ] +} +``` + +
+ +--- + +### `ssoLogin` + +Initiate login using external SSO identity. + +`POST /v2/portal/public/sso/login` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `origin` | query | string | Yes | Origin of the Portal | +| `org_id` | query | string | Yes | epilot organization id | +| `contact_id` | query | string (uuid) | No | contact id in the epilot system | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal ssoLogin \ + -p origin=example \ + -p org_id=123 \ + -d '{"provider_slug":"office-365-login"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal ssoLogin -p origin=example -p org_id=123 +``` + +With JSONata filter: + +```bash +epilot customer-portal ssoLogin -p origin=example -p org_id=123 --jsonata 'email' +``` + +
+Sample Response + +```json +{ + "token": "string", + "email": "portal-customer@email.com" +} +``` + +
+ +--- + +### `ssoLoginV3` + +Initiate login using external SSO identity. + +`POST /v3/portal/public/sso/login` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `portal_id` | query | string | Yes | ID of the Portal | +| `org_id` | query | string | Yes | epilot organization id | +| `contact_id` | query | string (uuid) | No | contact id in the epilot system | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal ssoLoginV3 \ + -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c \ + -p org_id=123 \ + -d '{"provider_slug":"office-365-login"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal ssoLoginV3 -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c -p org_id=123 +``` + +With JSONata filter: + +```bash +epilot customer-portal ssoLoginV3 -p portal_id=453ad7bf-86d5-46c8-8252-bcc868df5e3c -p org_id=123 --jsonata 'email' +``` + +
+Sample Response + +```json +{ + "token": "string", + "email": "portal-customer@email.com" +} +``` + +
+ +--- + +### `ssoRedirect` + +Handles the redirect from the external SSO provider. Validates the authorization `code` and `state` received from the pr + +`POST /v2/portal/public/sso/redirect` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `web_uri` | query | string | Yes | The URI to redirect to after the SSO login | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal ssoRedirect \ + -p web_uri=https://customer-portal.com +``` + +With JSONata filter: + +```bash +epilot customer-portal ssoRedirect -p web_uri=https://customer-portal.com --jsonata '$' +``` + +--- + +### `ssoCallback` + +Handles the callback from the external SSO provider, validates the authorization `code` + +`POST /v2/portal/public/sso/callback` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `domain` | query | string | No | | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal ssoCallback +``` + +With request body: + +```bash +epilot customer-portal ssoCallback \ + -d '{ + "provider_slug": "office-365-login", + "token_endpoint": "https://www.facebook.com/v12.0/dialog/oauth", + "grant_type": "authorization_code", + "code": "123456", + "redirect_uri": "https://customer-portal.com/login", + "client_id": "123456", + "code_verifier": "123456" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal ssoCallback +``` + +With JSONata filter: + +```bash +epilot customer-portal ssoCallback --jsonata 'access_token' +``` + +
+Sample Response + +```json +{ + "access_token": "123456", + "token_type": "Bearer", + "expires_in": 3600, + "refresh_token": "123456", + "id_token": "123456", + "scope": "openid email" +} +``` + +
+ +--- + +### `getPortalPage` + +Fetch a portal page by id + +`GET /v2/portal/pages/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPortalPage \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getPortalPage 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal getPortalPage -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "slug": "dashboard", + "path": "/dashboard", + "schema": ["string"], + "visibility": {}, + "content": {}, + "design": {}, + "blocks": {}, + "order": 1, + "is_system": false, + "is_detail": false, + "detail_schema": "contact", + "is_public": true, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "is_entry_route": false, + "is_deleted": false, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b", + "last_modified_at": "2021-02-09T12:41:43.662Z" +} +``` + +
+ +--- + +### `updatePortalPage` + +Update a portal page by id + +`PUT /v2/portal/pages/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal updatePortalPage \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With request body: + +```bash +epilot customer-portal updatePortalPage \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -d '{ + "slug": "dashboard", + "path": "/dashboard", + "schema": ["string"], + "visibility": {}, + "content": {}, + "design": {}, + "blocks": {}, + "order": 1, + "is_system": false, + "is_detail": false, + "detail_schema": "contact", + "is_public": true, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "is_entry_route": false, + "is_deleted": false +}' +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal updatePortalPage 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal updatePortalPage -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal updatePortalPage -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "slug": "dashboard", + "path": "/dashboard", + "schema": ["string"], + "visibility": {}, + "content": {}, + "design": {}, + "blocks": {}, + "order": 1, + "is_system": false, + "is_detail": false, + "detail_schema": "contact", + "is_public": true, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "is_entry_route": false, + "is_deleted": false, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b", + "last_modified_at": "2021-02-09T12:41:43.662Z" +} +``` + +
+ +--- + +### `deletePortalPage` + +Delete a portal page by id + +`DELETE /v2/portal/pages/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal deletePortalPage \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal deletePortalPage 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal deletePortalPage -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata '$' +``` + +--- + +### `getPortalPages` + +Fetch all portal pages + +`GET /v2/portal/pages` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `domain` | query | string | Yes | | +| `fields` | query | string | No | The fields to include in the response | +| `filter` | query | string | No | The filter to apply to the response | +| `contract_id` | query | string (uuid) | No | Contract context for blocks. Use context_entities instead. | +| `context_entities` | query | object[] | No | If the request is in a context of certain entities (i.e. the user in in a context of a specific contract), pages can be customized for that. Portal User and Contact entities are automatically part of | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPortalPages \ + -p domain=customer-portal.epilot.io +``` + +With JSONata filter: + +```bash +epilot customer-portal getPortalPages -p domain=customer-portal.epilot.io --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "slug": "dashboard", + "path": "/dashboard", + "schema": ["string"], + "visibility": {}, + "content": {}, + "design": {}, + "blocks": {}, + "order": 1, + "is_system": false, + "is_detail": false, + "detail_schema": "contact", + "is_public": true, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "is_entry_route": false, + "is_deleted": false, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b", + "last_modified_at": "2021-02-09T12:41:43.662Z" + } +] +``` + +
+ +--- + +### `createPortalPage` + +Create a new portal page + +`POST /v2/portal/pages` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `domain` | query | string | Yes | | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal createPortalPage \ + -p domain=customer-portal.epilot.io +``` + +With request body: + +```bash +epilot customer-portal createPortalPage \ + -p domain=customer-portal.epilot.io \ + -d '{ + "slug": "dashboard", + "path": "/dashboard", + "schema": ["string"], + "visibility": {}, + "content": {}, + "design": {}, + "blocks": {}, + "order": 1, + "is_system": false, + "is_detail": false, + "detail_schema": "contact", + "is_public": true, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "is_entry_route": false, + "is_deleted": false +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal createPortalPage -p domain=customer-portal.epilot.io +``` + +With JSONata filter: + +```bash +epilot customer-portal createPortalPage -p domain=customer-portal.epilot.io --jsonata '$' +``` + +
+Sample Response + +```json +{ + "slug": "dashboard", + "path": "/dashboard", + "schema": ["string"], + "visibility": {}, + "content": {}, + "design": {}, + "blocks": {}, + "order": 1, + "is_system": false, + "is_detail": false, + "detail_schema": "contact", + "is_public": true, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "is_entry_route": false, + "is_deleted": false, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b", + "last_modified_at": "2021-02-09T12:41:43.662Z" +} +``` + +
+ +--- + +### `getPublicPages` + +Fetch all public portal pages + +`GET /v2/portal/public/pages` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `domain` | query | string | Yes | | +| `fields` | query | string | No | The fields to include in the response | +| `filter` | query | string | No | The filter to apply to the response | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPublicPages \ + -p domain=customer-portal.epilot.io +``` + +With JSONata filter: + +```bash +epilot customer-portal getPublicPages -p domain=customer-portal.epilot.io --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "slug": "dashboard", + "path": "/dashboard", + "schema": ["string"], + "visibility": {}, + "content": {}, + "design": {}, + "blocks": {}, + "order": 1, + "is_system": false, + "is_detail": false, + "detail_schema": "contact", + "is_public": true, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "is_entry_route": false, + "is_deleted": false, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b", + "last_modified_at": "2021-02-09T12:41:43.662Z" + } +] +``` + +
+ +--- + +### `getDefaultPages` + +Fetch all default portal pages + +`GET /v2/portal/pages/default` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getDefaultPages +``` + +With JSONata filter: + +```bash +epilot customer-portal getDefaultPages --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "slug": "dashboard", + "path": "/dashboard", + "schema": ["string"], + "visibility": {}, + "content": {}, + "design": {}, + "blocks": {}, + "order": 1, + "is_system": false, + "is_detail": false, + "detail_schema": "contact", + "is_public": true, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "is_entry_route": false, + "is_deleted": false, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b", + "last_modified_at": "2021-02-09T12:41:43.662Z" + } +] +``` + +
+ +--- + +### `getPortalPageBlocks` + +Fetch all portal page blocks + +`GET /v2/portal/pages/{id}/blocks` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPortalPageBlocks \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getPortalPageBlocks 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal getPortalPageBlocks -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "props": { + "visibility": {}, + "content": {}, + "design": {} + }, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "type": "tab", + "order": 1, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b" + } +] +``` + +
+ +--- + +### `createPortalPageBlock` + +Create a new portal page block + +`POST /v2/portal/pages/{id}/blocks` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal createPortalPageBlock \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With request body: + +```bash +epilot customer-portal createPortalPageBlock \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -d '{ + "props": { + "visibility": {}, + "content": {}, + "design": {} + }, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "type": "tab", + "order": 1 +}' +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal createPortalPageBlock 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal createPortalPageBlock -p id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal createPortalPageBlock -p id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "props": { + "visibility": {}, + "content": {}, + "design": {} + }, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "type": "tab", + "order": 1, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b" +} +``` + +
+ +--- + +### `getPortalPageBlock` + +Fetch a portal page block by id + +`GET /v2/portal/pages/{id}/blocks/{block_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | | +| `block_id` | path | string (uuid) | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPortalPageBlock \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -p block_id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getPortalPageBlock 5da0a718-c822-403d-9f5d-20d4584e0528 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal getPortalPageBlock -p id=5da0a718-c822-403d-9f5d-20d4584e0528 -p block_id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "props": { + "visibility": {}, + "content": {}, + "design": {} + }, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "type": "tab", + "order": 1, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b" +} +``` + +
+ +--- + +### `updatePortalPageBlock` + +Update a portal page block by id + +`PUT /v2/portal/pages/{id}/blocks/{block_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | | +| `block_id` | path | string (uuid) | Yes | | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal updatePortalPageBlock \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -p block_id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With request body: + +```bash +epilot customer-portal updatePortalPageBlock \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -p block_id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -d '{ + "props": { + "visibility": {}, + "content": {}, + "design": {} + }, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "type": "tab", + "order": 1 +}' +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal updatePortalPageBlock 5da0a718-c822-403d-9f5d-20d4584e0528 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal updatePortalPageBlock -p id=5da0a718-c822-403d-9f5d-20d4584e0528 -p block_id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal updatePortalPageBlock -p id=5da0a718-c822-403d-9f5d-20d4584e0528 -p block_id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "props": { + "visibility": {}, + "content": {}, + "design": {} + }, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "type": "tab", + "order": 1, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b" +} +``` + +
+ +--- + +### `deletePortalPageBlock` + +Delete a portal page block by id + +`DELETE /v2/portal/pages/{id}/blocks/{block_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | | +| `block_id` | path | string (uuid) | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal deletePortalPageBlock \ + -p id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -p block_id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal deletePortalPageBlock 5da0a718-c822-403d-9f5d-20d4584e0528 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal deletePortalPageBlock -p id=5da0a718-c822-403d-9f5d-20d4584e0528 -p block_id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata '$' +``` + +--- + +### `getUserEntryPoint` + +Get the entry point for the user + +`GET /v2/portal/public/user/entry-point` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `email` | query | string | Yes | | +| `domain` | query | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getUserEntryPoint \ + -p email=user@example.com \ + -p domain=customer-portal.epilot.io +``` + +With JSONata filter: + +```bash +epilot customer-portal getUserEntryPoint -p email=user@example.com -p domain=customer-portal.epilot.io --jsonata 'user_exists' +``` + +
+Sample Response + +```json +{ + "user_exists": true, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "is_soft_deleted": true +} +``` + +
+ +--- + +### `updateCampaignPortalBlockStatus` + +Updates the status of a campaign portal block for multiple recipients. + +`PUT /v2/portal/campaign/{campaign_id}/entity:status` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `campaign_id` | path | string | Yes | ID of the campaign | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal updateCampaignPortalBlockStatus \ + -p campaign_id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"status":"seen","entity_refs":[{"entity_id":"5da0a718-c822-403d-9f5d-20d4584e0528","entity_schema":"string"}]}' +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal updateCampaignPortalBlockStatus 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal updateCampaignPortalBlockStatus -p campaign_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot customer-portal updateCampaignPortalBlockStatus -p campaign_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'success' +``` + +
+Sample Response + +```json +{ + "success": true, + "updated": 2, + "failed": 0, + "total": 2 +} +``` + +
+ +--- + +### `updateNotificationsStatus` + +Updates the statuses of multiple notifications at once. + +`PUT /v2/portal/notifications/entity:status` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal updateNotificationsStatus \ + -d '{"notifications":[{"id":"string","status":"read"}]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal updateNotificationsStatus +``` + +With JSONata filter: + +```bash +epilot customer-portal updateNotificationsStatus --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "Notifications status updated successfully." +} +``` + +
+ +--- + +### `deRegisterMLoginUser` + +Deregisters a user from the M Login client + +`DELETE /v2/portal/public/m-login/deregister/{client_id}/{user_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `client_id` | path | string | Yes | Client ID | +| `user_id` | path | string | Yes | User ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal deRegisterMLoginUser \ + -p client_id=123e4567-e89b-12d3-a456-426614174000 \ + -p user_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal deRegisterMLoginUser 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot customer-portal deRegisterMLoginUser -p client_id=123e4567-e89b-12d3-a456-426614174000 -p user_id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `notifyMLoginInterestChange` + +Notifies the interest change of a user in the M Login client + +`POST /v2/portal/public/m-login/notify-interest-change/{client_id}/{user_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `client_id` | path | string | Yes | Client ID | +| `user_id` | path | string | Yes | User ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal notifyMLoginInterestChange \ + -p client_id=123e4567-e89b-12d3-a456-426614174000 \ + -p user_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot customer-portal notifyMLoginInterestChange \ + -p client_id=123e4567-e89b-12d3-a456-426614174000 \ + -p user_id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "resource_id": "string", + "user_id": "string", + "interest_tag": "string", + "action": "string", + "resource": { + "resource_id": "string", + "description": "string", + "contact": "string", + "kind": "string" + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal notifyMLoginInterestChange 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal notifyMLoginInterestChange -p client_id=123e4567-e89b-12d3-a456-426614174000 -p user_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot customer-portal notifyMLoginInterestChange -p client_id=123e4567-e89b-12d3-a456-426614174000 -p user_id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `createPortalConfig` + +Creates a new portal configuration. + +`POST /v3/portal/config` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal createPortalConfig +``` + +With request body: + +```bash +epilot customer-portal createPortalConfig \ + -d '{ + "entity_actions": [ + { + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "slug": "contact", + "action_Label": {} + } + ], + "extensions": [ + { + "id": "string", + "status": "installed", + "options": {} + } + ], + "extension_hooks": {}, + "default_user_to_notify": { + "onPendingUser": [ + {} + ] + }, + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-1.ecp.epilot.io", + "domain_settings": { + "is_custom_domain_enabled": true, + "is_epilot_domain_enabled": true, + "is_redirection_enabled": true + }, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": { + "start_page": true, + "billing": true, + "change_due_date": true, + "new_design": true + }, + "accessToken": "string", + "advanced_mfa": { + "enabled": true + }, + "auth_settings": { + "passwordless_login": { + "enabled": true + }, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "auto_redirect_to_sso": true + }, + "cognito_details": { + "cognito_user_pool_client_id": "6bsd0jkgoie74k2i8mrhc1vest", + "cognito_user_pool_arn": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "cognito_user_pool_id": "eu-central-1_CUEQRNbUb", + "password_policy": { + "minimum_length": 8, + "maximum_length": 256, + "require_lowercase": true, + "require_uppercase": true, + "require_numbers": true, + "require_symbols": true + } + }, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": { + "contact": ["name", "address"], + "contract": ["installment_amount"] + }, + "email_templates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "images": { + "orderLeftTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "orderRightTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "welcomeBanner": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg" + }, + "entity_identifiers": { + "type": { + "isEnabled": true, + "attributes": ["contract_number"] + } + }, + "contract_identifiers": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + } + ], + "contract_selector_config": { + "show_inactive": true, + "title_path": "string" + }, + "registration_identifiers": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ], + "triggered_journeys": [ + { + "trigger_name": "FIRST_LOGIN", + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "entity_edit_rules": [ + { + "slug": "contact", + "attribute": "first_name", + "rule_type": "cadence", + "cadence_period_type": "days", + "cadence_period": 1, + "changes_allowed": 1, + "grace_period": 1, + "allowed_increment": "10%", + "allowed_decrement": "10%", + "number_of_days_before_restriction": 10 + } + ], + "allowed_file_extensions": { + "document": ["pdf"], + "image": ["jpg"], + "spreadsheet": ["xls"], + "presentation": ["ppt"], + "audioVideo": ["mp4"], + "email": ["eml"], + "archive": ["zip"], + "cad": ["cad"], + "calendar": ["ics"], + "other": ["txt"] + }, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "pages": [ + { + "slug": "dashboard", + "path": "/dashboard", + "schema": ["string"], + "visibility": {}, + "content": {}, + "design": {}, + "blocks": {}, + "order": 1, + "is_system": false, + "is_detail": false, + "detail_schema": "contact", + "is_public": true, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "is_entry_route": false, + "is_deleted": false + } + ] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal createPortalConfig +``` + +With JSONata filter: + +```bash +epilot customer-portal createPortalConfig --jsonata '$' +``` + +
+Sample Response + +```json +{ + "entity_actions": [ + { + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "slug": "contact", + "action_Label": {} + } + ], + "extensions": [ + { + "id": "string", + "status": "installed", + "options": {} + } + ], + "extension_hooks": {}, + "default_user_to_notify": { + "onPendingUser": [ + {} + ] + }, + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-1.ecp.epilot.io", + "domain_settings": { + "is_custom_domain_enabled": true, + "is_epilot_domain_enabled": true, + "is_redirection_enabled": true + }, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": { + "start_page": true, + "billing": true, + "change_due_date": true, + "new_design": true + }, + "accessToken": "string", + "advanced_mfa": { + "enabled": true + }, + "auth_settings": { + "passwordless_login": { + "enabled": true + }, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "auto_redirect_to_sso": true + }, + "cognito_details": { + "cognito_user_pool_client_id": "6bsd0jkgoie74k2i8mrhc1vest", + "cognito_user_pool_arn": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "cognito_user_pool_id": "eu-central-1_CUEQRNbUb", + "password_policy": { + "minimum_length": 8, + "maximum_length": 256, + "require_lowercase": true, + "require_uppercase": true, + "require_numbers": true, + "require_symbols": true + } + }, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": { + "contact": ["name", "address"], + "contract": ["installment_amount"] + }, + "email_templates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "images": { + "orderLeftTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "orderRightTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "welcomeBanner": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg" + }, + "entity_identifiers": { + "type": { + "isEnabled": true, + "attributes": ["contract_number"] + } + }, + "contract_identifiers": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + } + ], + "contract_selector_config": { + "show_inactive": true, + "title_path": "string" + }, + "registration_identifiers": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ], + "triggered_journeys": [ + { + "trigger_name": "FIRST_LOGIN", + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "entity_edit_rules": [ + { + "slug": "contact", + "attribute": "first_name", + "rule_type": "cadence", + "cadence_period_type": "days", + "cadence_period": 1, + "changes_allowed": 1, + "grace_period": 1, + "allowed_increment": "10%", + "allowed_decrement": "10%", + "number_of_days_before_restriction": 10 + } + ], + "allowed_file_extensions": { + "document": ["pdf"], + "image": ["jpg"], + "spreadsheet": ["xls"], + "presentation": ["ppt"], + "audioVideo": ["mp4"], + "email": ["eml"], + "archive": ["zip"], + "cad": ["cad"], + "calendar": ["ics"], + "other": ["txt"] + }, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "organization_id": 12345, + "org_settings": { + "canary": { + "enabled": true + }, + "notracking": { + "enabled": true + } + }, + "feature_flags": {}, + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow" + } + ], + "identity_providers": [ + { + "slug": "office-365-login", + "display_name": "Office 365 Login", + "oidc_config": {}, + "mobile_oidc_config": {} + } + ], + "pages": [ + { + "slug": "dashboard", + "path": "/dashboard", + "schema": ["string"], + "visibility": {}, + "content": {}, + "design": {}, + "blocks": {}, + "order": 1, + "is_system": false, + "is_detail": false, + "detail_schema": "contact", + "is_public": true, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "is_entry_route": false, + "is_deleted": false, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b", + "last_modified_at": "2021-02-09T12:41:43.662Z" + } + ] +} +``` + +
+ +--- + +### `getPortalConfigV3` + +Retrieves a specific portal configuration by ID. + +`GET /v3/portal/config/{portal_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `portal_id` | path | string (uuid) | Yes | Portal ID (readonly UUID generated on portal creation) | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal getPortalConfigV3 \ + -p portal_id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal getPortalConfigV3 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal getPortalConfigV3 -p portal_id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "entity_actions": [ + { + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "slug": "contact", + "action_Label": {} + } + ], + "extensions": [ + { + "id": "string", + "status": "installed", + "options": {} + } + ], + "extension_hooks": {}, + "default_user_to_notify": { + "onPendingUser": [ + {} + ] + }, + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-1.ecp.epilot.io", + "domain_settings": { + "is_custom_domain_enabled": true, + "is_epilot_domain_enabled": true, + "is_redirection_enabled": true + }, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": { + "start_page": true, + "billing": true, + "change_due_date": true, + "new_design": true + }, + "accessToken": "string", + "advanced_mfa": { + "enabled": true + }, + "auth_settings": { + "passwordless_login": { + "enabled": true + }, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "auto_redirect_to_sso": true + }, + "cognito_details": { + "cognito_user_pool_client_id": "6bsd0jkgoie74k2i8mrhc1vest", + "cognito_user_pool_arn": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "cognito_user_pool_id": "eu-central-1_CUEQRNbUb", + "password_policy": { + "minimum_length": 8, + "maximum_length": 256, + "require_lowercase": true, + "require_uppercase": true, + "require_numbers": true, + "require_symbols": true + } + }, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": { + "contact": ["name", "address"], + "contract": ["installment_amount"] + }, + "email_templates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "images": { + "orderLeftTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "orderRightTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "welcomeBanner": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg" + }, + "entity_identifiers": { + "type": { + "isEnabled": true, + "attributes": ["contract_number"] + } + }, + "contract_identifiers": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + } + ], + "contract_selector_config": { + "show_inactive": true, + "title_path": "string" + }, + "registration_identifiers": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ], + "triggered_journeys": [ + { + "trigger_name": "FIRST_LOGIN", + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "entity_edit_rules": [ + { + "slug": "contact", + "attribute": "first_name", + "rule_type": "cadence", + "cadence_period_type": "days", + "cadence_period": 1, + "changes_allowed": 1, + "grace_period": 1, + "allowed_increment": "10%", + "allowed_decrement": "10%", + "number_of_days_before_restriction": 10 + } + ], + "allowed_file_extensions": { + "document": ["pdf"], + "image": ["jpg"], + "spreadsheet": ["xls"], + "presentation": ["ppt"], + "audioVideo": ["mp4"], + "email": ["eml"], + "archive": ["zip"], + "cad": ["cad"], + "calendar": ["ics"], + "other": ["txt"] + }, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "organization_id": 12345, + "org_settings": { + "canary": { + "enabled": true + }, + "notracking": { + "enabled": true + } + }, + "feature_flags": {}, + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow" + } + ], + "identity_providers": [ + { + "slug": "office-365-login", + "display_name": "Office 365 Login", + "oidc_config": {}, + "mobile_oidc_config": {} + } + ], + "pages": [ + { + "slug": "dashboard", + "path": "/dashboard", + "schema": ["string"], + "visibility": {}, + "content": {}, + "design": {}, + "blocks": {}, + "order": 1, + "is_system": false, + "is_detail": false, + "detail_schema": "contact", + "is_public": true, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "is_entry_route": false, + "is_deleted": false, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b", + "last_modified_at": "2021-02-09T12:41:43.662Z" + } + ] +} +``` + +
+ +--- + +### `putPortalConfig` + +Updates a specific portal configuration by ID. + +`PUT /v3/portal/config/{portal_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `portal_id` | path | string (uuid) | Yes | Portal ID (readonly UUID generated on portal creation) | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal putPortalConfig \ + -p portal_id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With request body: + +```bash +epilot customer-portal putPortalConfig \ + -p portal_id=5da0a718-c822-403d-9f5d-20d4584e0528 \ + -d '{ + "entity_actions": [ + { + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "slug": "contact", + "action_Label": {} + } + ], + "extensions": [ + { + "id": "string", + "status": "installed", + "options": {} + } + ], + "extension_hooks": {}, + "default_user_to_notify": { + "onPendingUser": [ + {} + ] + }, + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-1.ecp.epilot.io", + "domain_settings": { + "is_custom_domain_enabled": true, + "is_epilot_domain_enabled": true, + "is_redirection_enabled": true + }, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": { + "start_page": true, + "billing": true, + "change_due_date": true, + "new_design": true + }, + "accessToken": "string", + "advanced_mfa": { + "enabled": true + }, + "auth_settings": { + "passwordless_login": { + "enabled": true + }, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "auto_redirect_to_sso": true + }, + "cognito_details": { + "cognito_user_pool_client_id": "6bsd0jkgoie74k2i8mrhc1vest", + "cognito_user_pool_arn": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "cognito_user_pool_id": "eu-central-1_CUEQRNbUb", + "password_policy": { + "minimum_length": 8, + "maximum_length": 256, + "require_lowercase": true, + "require_uppercase": true, + "require_numbers": true, + "require_symbols": true + } + }, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": { + "contact": ["name", "address"], + "contract": ["installment_amount"] + }, + "email_templates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "images": { + "orderLeftTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "orderRightTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "welcomeBanner": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg" + }, + "entity_identifiers": { + "type": { + "isEnabled": true, + "attributes": ["contract_number"] + } + }, + "contract_identifiers": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + } + ], + "contract_selector_config": { + "show_inactive": true, + "title_path": "string" + }, + "registration_identifiers": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ], + "triggered_journeys": [ + { + "trigger_name": "FIRST_LOGIN", + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "entity_edit_rules": [ + { + "slug": "contact", + "attribute": "first_name", + "rule_type": "cadence", + "cadence_period_type": "days", + "cadence_period": 1, + "changes_allowed": 1, + "grace_period": 1, + "allowed_increment": "10%", + "allowed_decrement": "10%", + "number_of_days_before_restriction": 10 + } + ], + "allowed_file_extensions": { + "document": ["pdf"], + "image": ["jpg"], + "spreadsheet": ["xls"], + "presentation": ["ppt"], + "audioVideo": ["mp4"], + "email": ["eml"], + "archive": ["zip"], + "cad": ["cad"], + "calendar": ["ics"], + "other": ["txt"] + }, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "organization_id": 12345, + "org_settings": { + "canary": { + "enabled": true + }, + "notracking": { + "enabled": true + } + }, + "feature_flags": {}, + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow" + } + ], + "identity_providers": [ + { + "slug": "office-365-login", + "display_name": "Office 365 Login", + "oidc_config": {}, + "mobile_oidc_config": {} + } + ], + "pages": [ + { + "slug": "dashboard", + "path": "/dashboard", + "schema": ["string"], + "visibility": {}, + "content": {}, + "design": {}, + "blocks": {}, + "order": 1, + "is_system": false, + "is_detail": false, + "detail_schema": "contact", + "is_public": true, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "is_entry_route": false, + "is_deleted": false, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b", + "last_modified_at": "2021-02-09T12:41:43.662Z" + } + ] +}' +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal putPortalConfig 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal putPortalConfig -p portal_id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal putPortalConfig -p portal_id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "entity_actions": [ + { + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "slug": "contact", + "action_Label": {} + } + ], + "extensions": [ + { + "id": "string", + "status": "installed", + "options": {} + } + ], + "extension_hooks": {}, + "default_user_to_notify": { + "onPendingUser": [ + {} + ] + }, + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-1.ecp.epilot.io", + "domain_settings": { + "is_custom_domain_enabled": true, + "is_epilot_domain_enabled": true, + "is_redirection_enabled": true + }, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": { + "start_page": true, + "billing": true, + "change_due_date": true, + "new_design": true + }, + "accessToken": "string", + "advanced_mfa": { + "enabled": true + }, + "auth_settings": { + "passwordless_login": { + "enabled": true + }, + "entry_point": "PASSWORD", + "preferred_sso_providers": ["office-365-login"], + "auto_redirect_to_sso": true + }, + "cognito_details": { + "cognito_user_pool_client_id": "6bsd0jkgoie74k2i8mrhc1vest", + "cognito_user_pool_arn": "arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341", + "cognito_user_pool_id": "eu-central-1_CUEQRNbUb", + "password_policy": { + "minimum_length": 8, + "maximum_length": 256, + "require_lowercase": true, + "require_uppercase": true, + "require_numbers": true, + "require_symbols": true + } + }, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": { + "contact": ["name", "address"], + "contract": ["installment_amount"] + }, + "email_templates": { + "confirmAccount": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedAuth": "5da0a718-c822-403d-9f5d-20d4584e0528", + "advancedMFA": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignUp": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeySignInOneTimePassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "journeyLoginOTP": "5da0a718-c822-403d-9f5d-20d4584e0528", + "forgotPassword": "5da0a718-c822-403d-9f5d-20d4584e0528", + "invitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "partnerInvitation": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onNewQuote": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onMapAPendingUser": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onDocUpload": "5da0a718-c822-403d-9f5d-20d4584e0528", + "onWorkflowStepAssigned": "5da0a718-c822-403d-9f5d-20d4584e0528", + "confirmEmailUpdate": "5da0a718-c822-403d-9f5d-20d4584e0528", + "verifyCodeToSetPassword": "5da0a718-c822-403d-9f5d-20d4584e0528" + }, + "images": { + "orderLeftTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg", + "orderRightTeaser": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg", + "welcomeBanner": "https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg" + }, + "entity_identifiers": { + "type": { + "isEnabled": true, + "attributes": ["contract_number"] + } + }, + "contract_identifiers": [ + { + "name": "email", + "schema": "contact" + }, + { + "name": "last_name", + "schema": "contact" + } + ], + "contract_selector_config": { + "show_inactive": true, + "title_path": "string" + }, + "registration_identifiers": [ + { + "name": "last_name", + "schema": "contact" + }, + { + "name": "contract_number", + "schema": "contract" + } + ], + "triggered_journeys": [ + { + "trigger_name": "FIRST_LOGIN", + "journey_id": "5da0a718-c822-403d-9f5d-20d4584e0528" + } + ], + "entity_edit_rules": [ + { + "slug": "contact", + "attribute": "first_name", + "rule_type": "cadence", + "cadence_period_type": "days", + "cadence_period": 1, + "changes_allowed": 1, + "grace_period": 1, + "allowed_increment": "10%", + "allowed_decrement": "10%", + "number_of_days_before_restriction": 10 + } + ], + "allowed_file_extensions": { + "document": ["pdf"], + "image": ["jpg"], + "spreadsheet": ["xls"], + "presentation": ["ppt"], + "audioVideo": ["mp4"], + "email": ["eml"], + "archive": ["zip"], + "cad": ["cad"], + "calendar": ["ics"], + "other": ["txt"] + }, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "organization_id": 12345, + "org_settings": { + "canary": { + "enabled": true + }, + "notracking": { + "enabled": true + } + }, + "feature_flags": {}, + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow" + } + ], + "identity_providers": [ + { + "slug": "office-365-login", + "display_name": "Office 365 Login", + "oidc_config": {}, + "mobile_oidc_config": {} + } + ], + "pages": [ + { + "slug": "dashboard", + "path": "/dashboard", + "schema": ["string"], + "visibility": {}, + "content": {}, + "design": {}, + "blocks": {}, + "order": 1, + "is_system": false, + "is_detail": false, + "detail_schema": "contact", + "is_public": true, + "parentId": "c495fef9-eeca-4019-a989-8390dcd9825b", + "is_entry_route": false, + "is_deleted": false, + "id": "c495fef9-eeca-4019-a989-8390dcd9825b", + "last_modified_at": "2021-02-09T12:41:43.662Z" + } + ] +} +``` + +
+ +--- + +### `deletePortalConfig` + +Deletes a specific portal configuration by ID. + +`DELETE /v3/portal/config/{portal_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `portal_id` | path | string (uuid) | Yes | Portal ID (readonly UUID generated on portal creation) | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal deletePortalConfig \ + -p portal_id=5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal deletePortalConfig 5da0a718-c822-403d-9f5d-20d4584e0528 +``` + +With JSONata filter: + +```bash +epilot customer-portal deletePortalConfig -p portal_id=5da0a718-c822-403d-9f5d-20d4584e0528 --jsonata '$' +``` + +--- + +### `listAllPortalConfigs` + +Retrieves all portal configurations. + +`GET /v3/portal/configs` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal listAllPortalConfigs +``` + +With JSONata filter: + +```bash +epilot customer-portal listAllPortalConfigs --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "entity_actions": [], + "extensions": [], + "extension_hooks": {}, + "default_user_to_notify": {}, + "enabled": true, + "name": "Installer Portal", + "domain": "abc.com", + "is_epilot_domain": true, + "epilot_domain": "example-portal-1.ecp.epilot.io", + "domain_settings": {}, + "design_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "self_registration_setting": "ALLOW_WITH_CONTACT_CREATION", + "user_account_self_management": false, + "feature_settings": {}, + "accessToken": "string", + "advanced_mfa": {}, + "auth_settings": {}, + "cognito_details": {}, + "config": "string", + "contact_identifiers": ["email", "last_name"], + "approval_state_attributes": {}, + "email_templates": {}, + "images": {}, + "entity_identifiers": {}, + "contract_identifiers": [], + "contract_selector_config": {}, + "registration_identifiers": [], + "triggered_journeys": [], + "entity_edit_rules": [], + "allowed_file_extensions": {}, + "prevent_search_engine_indexing": true, + "meter_reading_grace_period": 0, + "inactive_contract_cutoff_years": 0, + "is_dummy": true, + "is_v3_item": true, + "portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "portal_sk_v3": "PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "origin": "string", + "organization_id": 12345, + "org_settings": {}, + "feature_flags": {}, + "grants": [], + "identity_providers": [], + "pages": [] + } + ] +} +``` + +
+ +--- + +### `swapPortalConfig` + +Swaps the portal configuration of two portals. + +`POST /v3/portal/config/swap` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal swapPortalConfig +``` + +With request body: + +```bash +epilot customer-portal swapPortalConfig \ + -d '{ + "source_portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "target_portal_id": "453ad7bf-86d5-46c8-8252-bcc868df5e3c", + "items_to_swap": ["all"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal swapPortalConfig +``` + +With JSONata filter: + +```bash +epilot customer-portal swapPortalConfig --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "Domain and users swapped successfully." +} +``` + +
+ +--- + +### `invitePartner` + +Invites a partner to a portal + +`POST /v3/portal/partner/invite` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal invitePartner \ + -d '{"email":"string","represents_contact_list":["5da0a718-c822-403d-9f5d-20d4584e0528"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot customer-portal invitePartner +``` + +With JSONata filter: + +```bash +epilot customer-portal invitePartner --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "User invited successfully" +} +``` + +
+ +--- + +### `listBusinessPartners` + +Lists all business partners linked to the businessaccount + +`GET /v3/portal/partner/list` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal listBusinessPartners +``` + +With JSONata filter: + +```bash +epilot customer-portal listBusinessPartners --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", + "has_portal_user": true, + "registration_status": "Registration Pending", + "email": "john.doe@example.com", + "_title": "John Doe", + "first_name": "John", + "last_name": "Doe", + "access_status": true + } + ] +} +``` + +
+ +--- + +### `resendPartnerInvitation` + +Resends an invitation email to a partner + +`POST /v3/portal/partner/{partner_id}/resend-invitation` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `partner_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal resendPartnerInvitation \ + -p partner_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal resendPartnerInvitation 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot customer-portal resendPartnerInvitation -p partner_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "Partner invitation resent successfully" +} +``` + +
+ +--- + +### `revokePartner` + +Revokes a partner from a portal + +`DELETE /v3/portal/partner/{partner_id}/revoke` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `partner_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal revokePartner \ + -p partner_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal revokePartner 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot customer-portal revokePartner -p partner_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "Partner revoked from portal successfully" +} +``` + +
+ +--- + +### `disablePartner` + +Disables a partner from a portal + +`POST /v3/portal/partner/{partner_id}/disable` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `partner_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal disablePartner \ + -p partner_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal disablePartner 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot customer-portal disablePartner -p partner_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "Partner disabled from portal successfully" +} +``` + +
+ +--- + +### `enablePartner` + +Enables a partner from a portal + +`POST /v3/portal/partner/{partner_id}/enable` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `partner_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot customer-portal enablePartner \ + -p partner_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot customer-portal enablePartner 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot customer-portal enablePartner -p partner_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "Partner enabled from portal successfully" +} +``` + +
+ +--- + +## Deprecated Operations + +- ~~`getResolvedExternalLink`~~ GET `/v2/portal/resolve:external-link/{id}` +- ~~`getResolvedExternalLinkV3`~~ GET `/v3/portal/resolve:external-link/{id}` +- ~~`getOrganizationSettings`~~ GET `/v2/portal/org/settings` +- ~~`getAllFiles`~~ GET `/v2/portal/user/files` +- ~~`getFilesCountByEntity`~~ GET `/v2/portal/user/files/count-by-entity` diff --git a/packages/cli/docs/dashboard.md b/packages/cli/docs/dashboard.md new file mode 100644 index 00000000..4c39b486 --- /dev/null +++ b/packages/cli/docs/dashboard.md @@ -0,0 +1,716 @@ +# Dashboard API + +- **Base URL:** `https://dashboard.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/dashboard](https://docs.epilot.io/api/dashboard) + +API to store the dashboard configuration for the epilot 360 dashboard + +## Quick Start + +```bash +# List available operations +epilot dashboard + +# Call an operation +epilot dashboard listDashboards +``` + +## Operations + +**Dashboards** +- [`listDashboards`](#listdashboards) — List dashboards available to the user +- [`createDashboard`](#createdashboard) — Create new dashboard +- [`getDashboard`](#getdashboard) — Get dashboard by ID +- [`putDashboard`](#putdashboard) — Update a dashboard by ID +- [`deleteDashboard`](#deletedashboard) — Delete a dashboard by ID + +**Visualisations** +- [`listAvailableVisualisations`](#listavailablevisualisations) — Returns list of available Visualisations to configure new dashboard tiles + +**Examples** +- [`listAvailableExamples`](#listavailableexamples) — Returns list of available exampless for visualisations to configure new dashboard tiles + +### `listDashboards` + +List dashboards available to the user + +`GET /v1/dashboard/dashboards` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot dashboard listDashboards +``` + +With JSONata filter: + +```bash +epilot dashboard listDashboards --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "title": "Employee Dashboard", + "tiles": [ + { + "id": "e4af1297-1fd6-440f-9846-f475f580d40f", + "coordinates": {}, + "visualisation": "timechart", + "visualisation_config": { + "query": { + "dataset": "entity_operations", + "measure": "count_operations", + "filters": [ + { + "operation": ["createEntity"] + }, + { + "entity_schema": ["opportunity"] + } + ], + "dimensions": [ + { + "time_with_granularity": "month" + }, + { + "entity_attribute": "source.title" + } + ] + }, + "options": { + "type": "line" + } + } + } + ] + } + ] +} +``` + +
+ +--- + +### `createDashboard` + +Create new dashboard + +`POST /v1/dashboard/dashboards` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot dashboard createDashboard +``` + +With request body: + +```bash +epilot dashboard createDashboard \ + -d '{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "title": "Employee Dashboard", + "tiles": [ + { + "id": "e4af1297-1fd6-440f-9846-f475f580d40f", + "coordinates": {}, + "visualisation": "timechart", + "visualisation_config": { + "query": { + "dataset": "entity_operations", + "measure": "count_operations", + "filters": [ + { + "operation": ["createEntity"] + }, + { + "entity_schema": ["opportunity"] + } + ], + "dimensions": [ + { + "time_with_granularity": "month" + }, + { + "entity_attribute": "source.title" + } + ] + }, + "options": { + "type": "line" + } + } + } + ] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot dashboard createDashboard +``` + +With JSONata filter: + +```bash +epilot dashboard createDashboard --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "title": "Employee Dashboard", + "tiles": [ + { + "id": "e4af1297-1fd6-440f-9846-f475f580d40f", + "coordinates": {}, + "visualisation": "timechart", + "visualisation_config": { + "query": { + "dataset": "entity_operations", + "measure": "count_operations", + "filters": [ + { + "operation": ["createEntity"] + }, + { + "entity_schema": ["opportunity"] + } + ], + "dimensions": [ + { + "time_with_granularity": "month" + }, + { + "entity_attribute": "source.title" + } + ] + }, + "options": { + "type": "line" + } + } + } + ] +} +``` + +
+ +--- + +### `getDashboard` + +Get dashboard by ID + +`GET /v1/dashboard/dashboards/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot dashboard getDashboard \ + -p id=3fa85f64-5717-4562-b3fc-2c963f66afa6 +``` + +Using positional args for path parameters: + +```bash +epilot dashboard getDashboard 3fa85f64-5717-4562-b3fc-2c963f66afa6 +``` + +With JSONata filter: + +```bash +epilot dashboard getDashboard -p id=3fa85f64-5717-4562-b3fc-2c963f66afa6 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "title": "Employee Dashboard", + "tiles": [ + { + "id": "e4af1297-1fd6-440f-9846-f475f580d40f", + "coordinates": {}, + "visualisation": "timechart", + "visualisation_config": { + "query": { + "dataset": "entity_operations", + "measure": "count_operations", + "filters": [ + { + "operation": ["createEntity"] + }, + { + "entity_schema": ["opportunity"] + } + ], + "dimensions": [ + { + "time_with_granularity": "month" + }, + { + "entity_attribute": "source.title" + } + ] + }, + "options": { + "type": "line" + } + } + } + ] +} +``` + +
+ +--- + +### `putDashboard` + +Update a dashboard by ID + +`PUT /v1/dashboard/dashboards/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot dashboard putDashboard \ + -p id=3fa85f64-5717-4562-b3fc-2c963f66afa6 +``` + +With request body: + +```bash +epilot dashboard putDashboard \ + -p id=3fa85f64-5717-4562-b3fc-2c963f66afa6 \ + -d '{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "title": "Employee Dashboard", + "tiles": [ + { + "id": "e4af1297-1fd6-440f-9846-f475f580d40f", + "coordinates": {}, + "visualisation": "timechart", + "visualisation_config": { + "query": { + "dataset": "entity_operations", + "measure": "count_operations", + "filters": [ + { + "operation": ["createEntity"] + }, + { + "entity_schema": ["opportunity"] + } + ], + "dimensions": [ + { + "time_with_granularity": "month" + }, + { + "entity_attribute": "source.title" + } + ] + }, + "options": { + "type": "line" + } + } + } + ] +}' +``` + +Using positional args for path parameters: + +```bash +epilot dashboard putDashboard 3fa85f64-5717-4562-b3fc-2c963f66afa6 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot dashboard putDashboard -p id=3fa85f64-5717-4562-b3fc-2c963f66afa6 +``` + +With JSONata filter: + +```bash +epilot dashboard putDashboard -p id=3fa85f64-5717-4562-b3fc-2c963f66afa6 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "title": "Employee Dashboard", + "tiles": [ + { + "id": "e4af1297-1fd6-440f-9846-f475f580d40f", + "coordinates": {}, + "visualisation": "timechart", + "visualisation_config": { + "query": { + "dataset": "entity_operations", + "measure": "count_operations", + "filters": [ + { + "operation": ["createEntity"] + }, + { + "entity_schema": ["opportunity"] + } + ], + "dimensions": [ + { + "time_with_granularity": "month" + }, + { + "entity_attribute": "source.title" + } + ] + }, + "options": { + "type": "line" + } + } + } + ] +} +``` + +
+ +--- + +### `deleteDashboard` + +Delete a dashboard by ID + +`DELETE /v1/dashboard/dashboards/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot dashboard deleteDashboard \ + -p id=3fa85f64-5717-4562-b3fc-2c963f66afa6 +``` + +Using positional args for path parameters: + +```bash +epilot dashboard deleteDashboard 3fa85f64-5717-4562-b3fc-2c963f66afa6 +``` + +With JSONata filter: + +```bash +epilot dashboard deleteDashboard -p id=3fa85f64-5717-4562-b3fc-2c963f66afa6 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "title": "Employee Dashboard", + "tiles": [ + { + "id": "e4af1297-1fd6-440f-9846-f475f580d40f", + "coordinates": {}, + "visualisation": "timechart", + "visualisation_config": { + "query": { + "dataset": "entity_operations", + "measure": "count_operations", + "filters": [ + { + "operation": ["createEntity"] + }, + { + "entity_schema": ["opportunity"] + } + ], + "dimensions": [ + { + "time_with_granularity": "month" + }, + { + "entity_attribute": "source.title" + } + ] + }, + "options": { + "type": "line" + } + } + } + ] +} +``` + +
+ +--- + +### `listAvailableVisualisations` + +Returns list of available Visualisations to configure new dashboard tiles + +`GET /v1/dashboard/visualisations` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot dashboard listAvailableVisualisations +``` + +With JSONata filter: + +```bash +epilot dashboard listAvailableVisualisations --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "visualisation": "timechart", + "title": "Time Series Visualisation", + "description": "Visualise your metrics with respect to time series", + "package_name": "@epilot360/highcharts" + }, + { + "visualisation": "kpi", + "title": "KPI Visualisation", + "description": "Visualise your key performance indicators", + "package_name": "@epilot360/kpi" + } + ] +} +``` + +
+ +--- + +### `listAvailableExamples` + +Returns list of available exampless for visualisations to configure new dashboard tiles + +`GET /v1/dashboard/examples` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot dashboard listAvailableExamples +``` + +With JSONata filter: + +```bash +epilot dashboard listAvailableExamples --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "e4af1297-1fd6-440f-9846-f475f580d40f", + "title": "Number of opportunities created by journeys every month", + "visualisation": "timechart", + "query": { + "dataset": "entity_operations", + "measure": "count_operations", + "dimensions": [ + { + "time_with_granularity": "year-month" + } + ], + "filters": [ + { + "entity_schema": "opportunity" + } + ] + } + } + ] +} +``` + +
+ +--- diff --git a/packages/cli/docs/data-management.md b/packages/cli/docs/data-management.md new file mode 100644 index 00000000..890b5f10 --- /dev/null +++ b/packages/cli/docs/data-management.md @@ -0,0 +1,939 @@ +# Data Management API + +- **Base URL:** `https://data-management.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/data-management](https://docs.epilot.io/api/data-management) + +## Quick Start + +```bash +# List available operations +epilot data-management + +# Call an operation +epilot data-management queryEntities -p entity_schema=example +``` + +## Operations + +**Data Management** +- [`queryEntities`](#queryentities) — Executes a query against the specified entity schema using the saved view definition, optionally combined with additiona +- [`createJob`](#createjob) — POST /data-management/v1/{entity_schema}/jobs +- [`updateJob`](#updatejob) — PATCH /data-management/v1/{entity_schema}/jobs/{job_id} +- [`getJob`](#getjob) — Returns details of a single job run. +- [`getJobReportUrl`](#getjobreporturl) — Returns a short-lived, pre-signed URL to download the report file for the given job. +- [`getConfig`](#getconfig) — Returns a data management config by its id. +- [`createJobForConfig`](#createjobforconfig) — Creates a job run for the given config and triggers asynchronous execution. Returns a job id which can be used to poll j +- [`upsertConfig`](#upsertconfig) — Creates or updates a config for the given entity schema. The config is later used by a scheduled background process to p +- [`listConfigs`](#listconfigs) — Returns a paginated list of configs +- [`listJobs`](#listjobs) — Returns a paginated list of jobs + +### `queryEntities` + +Executes a query against the specified entity schema using the saved view definition, optionally combined with additiona + +`POST /data-management/v1/{entity_schema}/query` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `entity_schema` | path | string | Yes | Target entity schema to query (for example: "contact", "opportunity", "order"). + | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot data-management queryEntities \ + -p entity_schema=example +``` + +With request body: + +```bash +epilot data-management queryEntities \ + -p entity_schema=example \ + -d '{ + "saved_view_id": "string", + "include_deleted": "true", + "filters": [ + { + "type": "entity_workflows_only_in_closed_or_cancelled_status", + "related_entity_schemas": ["string"], + "lookback_period_days": 0 + } + ], + "from": 0, + "size": 0, + "hydrate": true, + "fields": ["string"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot data-management queryEntities example +``` + +Using stdin pipe: + +```bash +cat body.json | epilot data-management queryEntities -p entity_schema=example +``` + +With JSONata filter: + +```bash +epilot data-management queryEntities -p entity_schema=example --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 0, + "results": [ + {} + ] +} +``` + +
+ +--- + +### `createJob` + +`POST /data-management/v1/{entity_schema}/jobs` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `entity_schema` | path | string | Yes | | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot data-management createJob \ + -p entity_schema=example +``` + +With request body: + +```bash +epilot data-management createJob \ + -p entity_schema=example \ + -d '{ + "type": "deletion", + "config_id": "string", + "scheduled_for": "1970-01-01", + "status": "in_progress", + "started_at": "1970-01-01T00:00:00.000Z" +}' +``` + +Using positional args for path parameters: + +```bash +epilot data-management createJob example +``` + +Using stdin pipe: + +```bash +cat body.json | epilot data-management createJob -p entity_schema=example +``` + +With JSONata filter: + +```bash +epilot data-management createJob -p entity_schema=example --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "type": "deletion", + "config_id": "string", + "entity_schema": "string", + "scheduled_for": "1970-01-01", + "status": "in_progress", + "details": {}, + "started_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z", + "error": "string", + "report": { + "bucket": "string", + "key": "string", + "format": "csv" + }, + "created_at": "1970-01-01T00:00:00.000Z", + "last_updated_at": "1970-01-01T00:00:00.000Z", + "trigger": "schedule", + "triggered_by": "string" +} +``` + +
+ +--- + +### `updateJob` + +`PATCH /data-management/v1/{entity_schema}/jobs/{job_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `entity_schema` | path | string | Yes | | +| `job_id` | path | string | Yes | | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot data-management updateJob \ + -p entity_schema=example \ + -p job_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot data-management updateJob \ + -p entity_schema=example \ + -p job_id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "status": "in_progress", + "details": {}, + "completed_at": "1970-01-01T00:00:00.000Z", + "error": "string", + "report": { + "bucket": "string", + "key": "string", + "format": "csv" + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot data-management updateJob example 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot data-management updateJob -p entity_schema=example -p job_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot data-management updateJob -p entity_schema=example -p job_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "type": "deletion", + "config_id": "string", + "entity_schema": "string", + "scheduled_for": "1970-01-01", + "status": "in_progress", + "details": {}, + "started_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z", + "error": "string", + "report": { + "bucket": "string", + "key": "string", + "format": "csv" + }, + "created_at": "1970-01-01T00:00:00.000Z", + "last_updated_at": "1970-01-01T00:00:00.000Z", + "trigger": "schedule", + "triggered_by": "string" +} +``` + +
+ +--- + +### `getJob` + +Returns details of a single job run. + +`GET /data-management/v1/jobs/{job_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `job_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot data-management getJob \ + -p job_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot data-management getJob 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot data-management getJob -p job_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "type": "deletion", + "config_id": "string", + "entity_schema": "string", + "scheduled_for": "1970-01-01", + "status": "in_progress", + "details": {}, + "started_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z", + "error": "string", + "report": { + "bucket": "string", + "key": "string", + "format": "csv" + }, + "created_at": "1970-01-01T00:00:00.000Z", + "last_updated_at": "1970-01-01T00:00:00.000Z", + "trigger": "schedule", + "triggered_by": "string" +} +``` + +
+ +--- + +### `getJobReportUrl` + +Returns a short-lived, pre-signed URL to download the report file for the given job. + +`GET /data-management/v1/jobs/{job_id}/report-url` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `job_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot data-management getJobReportUrl \ + -p job_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot data-management getJobReportUrl 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot data-management getJobReportUrl -p job_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'url' +``` + +
+Sample Response + +```json +{ + "url": "string", + "expires_in": 0 +} +``` + +
+ +--- + +### `getConfig` + +Returns a data management config by its id. + +`GET /data-management/v1/configs/{config_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `config_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot data-management getConfig \ + -p config_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot data-management getConfig 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot data-management getConfig -p config_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "type": "deletion", + "entity_schema": "string", + "query": { + "saved_view_id": "string", + "include_deleted": "true", + "filters": [ + { + "type": "entity_workflows_only_in_closed_or_cancelled_status", + "related_entity_schemas": ["string"], + "lookback_period_days": 0 + } + ] + }, + "schedule": { + "frequency": "interval", + "interval_days": 1, + "start_date": "1970-01-01", + "end_date": "1970-01-01" + }, + "enabled": true, + "created_at": "1970-01-01T00:00:00.000Z", + "last_updated_at": "1970-01-01T00:00:00.000Z", + "next_run_at": "1970-01-01", + "relations_for_deletion": ["contact"], + "last_run_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `createJobForConfig` + +Creates a job run for the given config and triggers asynchronous execution. Returns a job id which can be used to poll j + +`POST /data-management/v1/configs/{config_id}/jobs` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `config_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot data-management createJobForConfig \ + -p config_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot data-management createJobForConfig 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot data-management createJobForConfig -p config_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "type": "deletion", + "config_id": "string", + "entity_schema": "string", + "scheduled_for": "1970-01-01", + "status": "in_progress", + "details": {}, + "started_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z", + "error": "string", + "report": { + "bucket": "string", + "key": "string", + "format": "csv" + }, + "created_at": "1970-01-01T00:00:00.000Z", + "last_updated_at": "1970-01-01T00:00:00.000Z", + "trigger": "schedule", + "triggered_by": "string" +} +``` + +
+ +--- + +### `upsertConfig` + +Creates or updates a config for the given entity schema. The config is later used by a scheduled background process to p + +`POST /data-management/v1/{entity_schema}/configs` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `entity_schema` | path | string | Yes | Target entity schema for the config + | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot data-management upsertConfig \ + -p entity_schema=example +``` + +With request body: + +```bash +epilot data-management upsertConfig \ + -p entity_schema=example \ + -d '{ + "type": "deletion", + "query": { + "saved_view_id": "string", + "include_deleted": "true", + "filters": [ + { + "type": "entity_workflows_only_in_closed_or_cancelled_status", + "related_entity_schemas": ["string"], + "lookback_period_days": 0 + } + ] + }, + "schedule": { + "frequency": "interval", + "interval_days": 1, + "start_date": "1970-01-01", + "end_date": "1970-01-01" + }, + "relations_for_deletion": ["contact"], + "enabled": true +}' +``` + +Using positional args for path parameters: + +```bash +epilot data-management upsertConfig example +``` + +Using stdin pipe: + +```bash +cat body.json | epilot data-management upsertConfig -p entity_schema=example +``` + +With JSONata filter: + +```bash +epilot data-management upsertConfig -p entity_schema=example --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "type": "deletion", + "entity_schema": "string", + "query": { + "saved_view_id": "string", + "include_deleted": "true", + "filters": [ + { + "type": "entity_workflows_only_in_closed_or_cancelled_status", + "related_entity_schemas": ["string"], + "lookback_period_days": 0 + } + ] + }, + "schedule": { + "frequency": "interval", + "interval_days": 1, + "start_date": "1970-01-01", + "end_date": "1970-01-01" + }, + "enabled": true, + "created_at": "1970-01-01T00:00:00.000Z", + "last_updated_at": "1970-01-01T00:00:00.000Z", + "next_run_at": "1970-01-01", + "relations_for_deletion": ["contact"], + "last_run_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `listConfigs` + +Returns a paginated list of configs + +`GET /data-management/v1/configs` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `limit` | query | number | No | | +| `cursor` | query | string | No | | +| `entity_schema` | query | string | No | Optional entity schema to filter configs. | +| `type` | query | "deletion" | No | Optional config type to filter configs. | +| `next_run_at` | query | string (date) | No | Optional next run date (YYYY-MM-DD) to filter configs. | +| `enabled` | query | boolean | No | Optional enabled status to filter configs. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot data-management listConfigs +``` + +With JSONata filter: + +```bash +epilot data-management listConfigs --jsonata 'configs' +``` + +
+Sample Response + +```json +{ + "configs": [ + { + "id": "string", + "type": "deletion", + "entity_schema": "string", + "query": { + "saved_view_id": "string", + "include_deleted": "true", + "filters": [ + { + "type": "entity_workflows_only_in_closed_or_cancelled_status", + "related_entity_schemas": ["string"], + "lookback_period_days": 0 + } + ] + }, + "schedule": { + "frequency": "interval", + "interval_days": 1, + "start_date": "1970-01-01", + "end_date": "1970-01-01" + }, + "enabled": true, + "created_at": "1970-01-01T00:00:00.000Z", + "last_updated_at": "1970-01-01T00:00:00.000Z", + "next_run_at": "1970-01-01", + "relations_for_deletion": ["contact"], + "last_run_at": "1970-01-01T00:00:00.000Z" + } + ], + "cursor": "string" +} +``` + +
+ +--- + +### `listJobs` + +Returns a paginated list of jobs + +`GET /data-management/v1/jobs` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `limit` | query | number | No | | +| `cursor` | query | string | No | | +| `entity_schema` | query | string | No | Optional entity schema to filter jobs. | +| `type` | query | "deletion" | No | Optional job type to filter jobs. | +| `status` | query | "in_progress" \| "success" \| "failed" | No | Optional job status to filter jobs. | +| `config_id` | query | string | No | Optional config id to filter jobs. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot data-management listJobs +``` + +With JSONata filter: + +```bash +epilot data-management listJobs --jsonata 'jobs' +``` + +
+Sample Response + +```json +{ + "jobs": [ + { + "id": "string", + "type": "deletion", + "config_id": "string", + "entity_schema": "string", + "scheduled_for": "1970-01-01", + "status": "in_progress", + "details": {}, + "started_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z", + "error": "string", + "report": { + "bucket": "string", + "key": "string", + "format": "csv" + }, + "created_at": "1970-01-01T00:00:00.000Z", + "last_updated_at": "1970-01-01T00:00:00.000Z", + "trigger": "schedule", + "triggered_by": "string" + } + ], + "cursor": "string" +} +``` + +
+ +--- diff --git a/packages/cli/docs/deduplication.md b/packages/cli/docs/deduplication.md new file mode 100644 index 00000000..68de8312 --- /dev/null +++ b/packages/cli/docs/deduplication.md @@ -0,0 +1,95 @@ +# Deduplication API + +- **Base URL:** `https://deduplication.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/deduplication](https://docs.epilot.io/api/deduplication) + +Backend for Epilot Deduplication feature + +## Quick Start + +```bash +# List available operations +epilot deduplication + +# Call an operation +epilot deduplication deduplicate +``` + +## Operations + +- [`deduplicate`](#deduplicate) — Deduplicates Entities + +### `deduplicate` + +Deduplicates Entities + +`POST /v1/deduplicate` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot deduplication deduplicate \ + -d '[{"toKeep":"string","toDelete":["string"]}]' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot deduplication deduplicate +``` + +With JSONata filter: + +```bash +epilot deduplication deduplicate --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "_id": "string", + "_org": "string", + "_schema": "string", + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z", + "_created_by": "string", + "created_by": "string", + "_tags": ["string"], + "_acl": {}, + "_owners": [ + { + "org_id": "string", + "user_id": "string" + } + ], + "type": "string" + } +] +``` + +
+ +--- diff --git a/packages/cli/docs/design.md b/packages/cli/docs/design.md new file mode 100644 index 00000000..7e1e27aa --- /dev/null +++ b/packages/cli/docs/design.md @@ -0,0 +1,936 @@ +# Design Builder API v2 + +- **Base URL:** `https://design-builder-api.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/design](https://docs.epilot.io/api/design) + +## Quick Start + +```bash +# List available operations +epilot design + +# Call an operation +epilot design getAllDesigns +``` + +## Operations + +**design-builder** +- [`getAllDesigns`](#getalldesigns) — Scan all designs linked to a organization, based in orgId attribute from JWT auth token +- [`addDesign`](#adddesign) — Create a brand new design linked to a organization, based in orgId attribute from JWT auth token +- [`getDesign`](#getdesign) — Search for a especific design owned by user organization +- [`updateDesign`](#updatedesign) — Update a especific design owned by user organization +- [`deleteDesign`](#deletedesign) — Search and delete for a especific design owned by user organization +- [`getThemeFromDesign`](#getthemefromdesign) — Search for a especific design owned by user organization and parse them to a new or old theme +- [`getFiles`](#getfiles) — List all files for the user organization bucket +- [`uploadFile`](#uploadfile) — Upload a new file for the user organization bucket +- [`getConsumerDesign`](#getconsumerdesign) — Search for a especific design owned by user organization +- [`addConsumer`](#addconsumer) — Add a consumer that uses a specific design +- [`removeConsumer`](#removeconsumer) — Remove a consumer that uses a specific design + +### `getAllDesigns` + +Scan all designs linked to a organization, based in orgId attribute from JWT auth token + +`GET /v1/designs` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot design getAllDesigns +``` + +With JSONata filter: + +```bash +epilot design getAllDesigns --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "designs": [ + {} + ] + } +] +``` + +
+ +--- + +### `addDesign` + +Create a brand new design linked to a organization, based in orgId attribute from JWT auth token + +`POST /v1/designs` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot design addDesign +``` + +With request body: + +```bash +epilot design addDesign \ + -d '{ + "design": { + "brand_id": "string", + "brand_name": "string", + "user": { + "emailaddress": "string", + "fullname": "string", + "name": "string", + "userid": "string" + }, + "style_name": "string", + "style": { + "logo": { + "main": { + "name": "string", + "display_name": "string", + "file_type": "LOGO", + "s3_object_key": "string", + "url": "string" + } + }, + "palette": { + "primary": "string", + "secondary": "string", + "error": "string", + "background": "string", + "paper": "string", + "navbar": "string", + "portal_login_background": "string" + }, + "typography": { + "font": { + "font_id": "string", + "font_name": "string", + "font_family": "string", + "font_weight_regular": "string", + "font_weight_medium": "string", + "font_weight_bold": "string", + "urls": [ + { + "type": "WOFF2", + "url": "string" + } + ] + }, + "primary": "string", + "secondary": "string" + }, + "shape": { + "border_radius": 0 + }, + "consumer": { + "widgets": [ + { + "id": "string", + "name": "string" + } + ], + "customer_portals": [ + { + "id": "string", + "name": "string" + } + ] + } + }, + "is_default": true, + "custom_theme": "string", + "use_custom_theme": true, + "design_tokens": { + "coupon": "string", + "cashback": "string", + "custom_css": "string" + } + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot design addDesign +``` + +With JSONata filter: + +```bash +epilot design addDesign --jsonata 'design' +``` + +
+Sample Response + +```json +{ + "design": { + "id": "string", + "created_at": "2021-01-30T08:30:00Z", + "created_by": "string", + "edited": true, + "last_modified_at": "string", + "brand_id": "string", + "brand_name": "string", + "user": { + "emailaddress": "string", + "fullname": "string", + "name": "string", + "userid": "string" + }, + "style_name": "string", + "style": { + "logo": {}, + "palette": {}, + "typography": {}, + "shape": {}, + "consumer": {} + }, + "is_default": true, + "custom_theme": "string", + "use_custom_theme": true, + "design_tokens": { + "coupon": "string", + "cashback": "string", + "custom_css": "string" + } + } +} +``` + +
+ +--- + +### `getDesign` + +Search for a especific design owned by user organization + +`GET /v1/designs/{designId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `designId` | path | string | Yes | Id of the design | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot design getDesign \ + -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a +``` + +Using positional args for path parameters: + +```bash +epilot design getDesign 4a062990-a6a3-11eb-9828-4f3da7d4935a +``` + +With JSONata filter: + +```bash +epilot design getDesign -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a --jsonata 'design' +``` + +
+Sample Response + +```json +{ + "design": { + "id": "string", + "created_at": "2021-01-30T08:30:00Z", + "created_by": "string", + "edited": true, + "last_modified_at": "string", + "brand_id": "string", + "brand_name": "string", + "user": { + "emailaddress": "string", + "fullname": "string", + "name": "string", + "userid": "string" + }, + "style_name": "string", + "style": { + "logo": {}, + "palette": {}, + "typography": {}, + "shape": {}, + "consumer": {} + }, + "is_default": true, + "custom_theme": "string", + "use_custom_theme": true, + "design_tokens": { + "coupon": "string", + "cashback": "string", + "custom_css": "string" + } + } +} +``` + +
+ +--- + +### `updateDesign` + +Update a especific design owned by user organization + +`PUT /v1/designs/{designId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `designId` | path | string | Yes | Id of the design | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot design updateDesign \ + -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a +``` + +With request body: + +```bash +epilot design updateDesign \ + -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a \ + -d '{ + "design": { + "brand_id": "string", + "brand_name": "string", + "user": { + "emailaddress": "string", + "fullname": "string", + "name": "string", + "userid": "string" + }, + "style_name": "string", + "style": { + "logo": { + "main": { + "name": "string", + "display_name": "string", + "file_type": "LOGO", + "s3_object_key": "string", + "url": "string" + } + }, + "palette": { + "primary": "string", + "secondary": "string", + "error": "string", + "background": "string", + "paper": "string", + "navbar": "string", + "portal_login_background": "string" + }, + "typography": { + "font": { + "font_id": "string", + "font_name": "string", + "font_family": "string", + "font_weight_regular": "string", + "font_weight_medium": "string", + "font_weight_bold": "string", + "urls": [ + { + "type": "WOFF2", + "url": "string" + } + ] + }, + "primary": "string", + "secondary": "string" + }, + "shape": { + "border_radius": 0 + }, + "consumer": { + "widgets": [ + { + "id": "string", + "name": "string" + } + ], + "customer_portals": [ + { + "id": "string", + "name": "string" + } + ] + } + }, + "is_default": true, + "custom_theme": "string", + "use_custom_theme": true, + "design_tokens": { + "coupon": "string", + "cashback": "string", + "custom_css": "string" + } + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot design updateDesign 4a062990-a6a3-11eb-9828-4f3da7d4935a +``` + +Using stdin pipe: + +```bash +cat body.json | epilot design updateDesign -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a +``` + +With JSONata filter: + +```bash +epilot design updateDesign -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a --jsonata '$' +``` + +--- + +### `deleteDesign` + +Search and delete for a especific design owned by user organization + +`DELETE /v1/designs/{designId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `designId` | path | string | Yes | Id of the design | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot design deleteDesign \ + -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a +``` + +Using positional args for path parameters: + +```bash +epilot design deleteDesign 4a062990-a6a3-11eb-9828-4f3da7d4935a +``` + +With JSONata filter: + +```bash +epilot design deleteDesign -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a --jsonata '$' +``` + +--- + +### `getThemeFromDesign` + +Search for a especific design owned by user organization and parse them to a new or old theme + +`GET /v1/designs/{designId}/parse` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `designId` | path | string | Yes | Id of the design | +| `orgId` | query | string | No | Organization id of the user | +| `theme` | query | "NEW" \| "OLD" | Yes | Type of theme to be parsed and returned | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot design getThemeFromDesign \ + -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a \ + -p theme=NEW +``` + +Using positional args for path parameters: + +```bash +epilot design getThemeFromDesign 4a062990-a6a3-11eb-9828-4f3da7d4935a +``` + +With JSONata filter: + +```bash +epilot design getThemeFromDesign -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a -p theme=NEW --jsonata '$' +``` + +
+Sample Response + +```json +{} +``` + +
+ +--- + +### `getFiles` + +List all files for the user organization bucket + +`GET /v1/designs/files` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `type` | query | "LOGO" \| "FONT" | No | Type of files to be returned | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot design getFiles +``` + +With JSONata filter: + +```bash +epilot design getFiles --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "name": "string", + "display_name": "string", + "file_type": "LOGO", + "s3_object_key": "string", + "url": "string" + } +] +``` + +
+ +--- + +### `uploadFile` + +Upload a new file for the user organization bucket + +`POST /v1/designs/files` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot design uploadFile +``` + +With JSONata filter: + +```bash +epilot design uploadFile --jsonata '$' +``` + +
+Sample Response + +```json +{ + "name": "string", + "display_name": "string", + "file_type": "LOGO", + "s3_object_key": "string", + "url": "string" +} +``` + +
+ +--- + +### `getConsumerDesign` + +Search for a especific design owned by user organization + +`GET /v1/designs/consumer/{application}/{consumerId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `consumerId` | path | string | Yes | Id of the design | +| `application` | path | string | Yes | Type of application that uses the design | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot design getConsumerDesign \ + -p consumerId=4a062990-a6a3-11eb-9828-4f3da7d4935a \ + -p application=journey +``` + +Using positional args for path parameters: + +```bash +epilot design getConsumerDesign 4a062990-a6a3-11eb-9828-4f3da7d4935a journey +``` + +With JSONata filter: + +```bash +epilot design getConsumerDesign -p consumerId=4a062990-a6a3-11eb-9828-4f3da7d4935a -p application=journey --jsonata 'design' +``` + +
+Sample Response + +```json +{ + "design": { + "id": "string", + "created_at": "2021-01-30T08:30:00Z", + "created_by": "string", + "edited": true, + "last_modified_at": "string", + "brand_id": "string", + "brand_name": "string", + "user": { + "emailaddress": "string", + "fullname": "string", + "name": "string", + "userid": "string" + }, + "style_name": "string", + "style": { + "logo": {}, + "palette": {}, + "typography": {}, + "shape": {}, + "consumer": {} + }, + "is_default": true, + "custom_theme": "string", + "use_custom_theme": true, + "design_tokens": { + "coupon": "string", + "cashback": "string", + "custom_css": "string" + } + } +} +``` + +
+ +--- + +### `addConsumer` + +Add a consumer that uses a specific design + +`PUT /v1/designs/addConsumer/{application}/{designId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `designId` | path | string | Yes | Id of the design | +| `application` | path | string | Yes | Type of application that uses the design | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot design addConsumer \ + -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a \ + -p application=journey \ + -d '{"consumer_id":"string","consumer_name":"string","should_delete":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot design addConsumer 4a062990-a6a3-11eb-9828-4f3da7d4935a journey +``` + +Using stdin pipe: + +```bash +cat body.json | epilot design addConsumer -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a -p application=journey +``` + +With JSONata filter: + +```bash +epilot design addConsumer -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a -p application=journey --jsonata '$' +``` + +--- + +### `removeConsumer` + +Remove a consumer that uses a specific design + +`PUT /v1/designs/removeConsumer/{application}/{designId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `designId` | path | string | Yes | Id of the design | +| `application` | path | string | Yes | Type of application that uses the design | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot design removeConsumer \ + -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a \ + -p application=journey \ + -d '{"consumer_id":"string","consumer_name":"string","should_delete":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot design removeConsumer 4a062990-a6a3-11eb-9828-4f3da7d4935a journey +``` + +Using stdin pipe: + +```bash +cat body.json | epilot design removeConsumer -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a -p application=journey +``` + +With JSONata filter: + +```bash +epilot design removeConsumer -p designId=4a062990-a6a3-11eb-9828-4f3da7d4935a -p application=journey --jsonata '$' +``` + +--- + +## Deprecated Operations + +- ~~`getLimit`~~ GET `/v1/designs/limit` +- ~~`getBrands`~~ GET `/v1/brands` diff --git a/packages/cli/docs/document.md b/packages/cli/docs/document.md new file mode 100644 index 00000000..f0c73291 --- /dev/null +++ b/packages/cli/docs/document.md @@ -0,0 +1,352 @@ +# Document API + +- **Base URL:** `https://document.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/document](https://docs.epilot.io/api/document) + +A document generation API that allows you to generate documents from templates with variables. + +## Quick Start + +```bash +# List available operations +epilot document + +# Call an operation +epilot document getTemplateMeta +``` + +## Operations + +**Documents** +- [`getTemplateMeta`](#gettemplatemeta) — Get metadata for a document template +- [`generateDocumentV2`](#generatedocumentv2) — Generates documents from templates with variables. +- [`convertDocument`](#convertdocument) — Converts a document to a different format. + +### `getTemplateMeta` + +Get metadata for a document template + +`POST /v2/documents:meta` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot document getTemplateMeta \ + -d '{"template_document":{"s3ref":{"bucket":"document-api-prod","key":"uploads/my-template.pdf"}}}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot document getTemplateMeta +``` + +With JSONata filter: + +```bash +epilot document getTemplateMeta --jsonata 'page_margins' +``` + +
+Sample Response + +```json +{ + "page_margins": { + "top": 2.54, + "bottom": 2.54, + "left": 2.54, + "right": 2.54, + "header": 2.54, + "footer": 2.54 + }, + "variables": ["order.billing_contact.0.salutation", "order.billing_contact.0.title", "order_table", "stayHardStatic", "opportunity[attribute_name]", "opportunity[\"attribute_name\"]", "opportunity.[attribute_name]", "attribute_name", "opportunities.0.attribute_name", "opportunities[0].attribute_name", "contact.opportunities[0].attribute_name", "opportunities[Primary].attribute_name"] +} +``` + +
+ +--- + +### `generateDocumentV2` + +Generates documents from templates with variables. + +`POST /v2/documents:generate` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `job_id` | query | string | No | Job ID for tracking the status of document generation action | +| `mode` | query | "partial_generation" \| "full_generation" | No | Type of mode used for document generation flow: +- partial_generation will have a intermediate step for users to validate and replace the variable values before generating the final document. +- full_ge | +| `preview_mode` | query | "open" \| "download" | No | Type of mode used for document generation preview: +- open - preview_url provides a link to open the file in a browser +- download - preview_url provides a link to download the file + | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot document generateDocumentV2 +``` + +With request body: + +```bash +epilot document generateDocumentV2 \ + -d '{ + "template_document": { + "filename": "my-template-{{order.order_number}}.docx", + "s3ref": { + "bucket": "document-api-prod", + "key": "uploads/my-template.pdf" + } + }, + "context_entity_id": "bcd0aab9-b544-42b0-8bfb-6d449d02eacc", + "user_id": 100321, + "language": "de", + "variable_payload": { + "additionalProperties": "string" + }, + "context_data": { + "additionalProperties": "string" + }, + "template_settings": { + "custom_margins": { + "top": 2.54, + "bottom": 2.54 + }, + "suggested_margins": { + "top": 2.54, + "bottom": 2.54 + }, + "display_margin_guidelines": true, + "enable_data_table_margin_autofix": false, + "template_with_datatable": false, + "enabled_template_settings_persistence": false, + "misconfigured_margins": false, + "file_entity_id": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p" + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot document generateDocumentV2 +``` + +With JSONata filter: + +```bash +epilot document generateDocumentV2 --jsonata 'job_id' +``` + +
+Sample Response + +```json +{ + "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "job_status": "STARTED", + "message": "string", + "ics_output": { + "output_document": { + "s3ref": { + "bucket": "document-api-preview-prod", + "key": "preview/my-appointment.ics" + } + } + }, + "pdf_output": { + "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf", + "output_document": { + "s3ref": { + "bucket": "document-api-preview-prod", + "key": "preview/my-template.pdf" + } + } + }, + "docx_output": { + "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx", + "output_document": { + "s3ref": { + "bucket": "document-api-preview-prod", + "key": "preview/my-template.docx" + } + } + }, + "xlsx_output": { + "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.xlsx", + "output_document": { + "s3ref": { + "bucket": "document-api-preview-prod", + "key": "preview/my-template.xlsx" + } + } + }, + "error_output": { + "error_message": "string", + "error_code": "PARSE_ERROR", + "error_details": [ + { + "explanation": "string", + "context": { + "invalid_variables": [ + { + "variable": "string", + "error": "string" + } + ] + } + } + ] + }, + "variable_payload": { + "additionalProperties": "string" + }, + "template_settings": { + "custom_margins": { + "top": 2.54, + "bottom": 2.54 + }, + "suggested_margins": { + "top": 2.54, + "bottom": 2.54 + }, + "display_margin_guidelines": true, + "enable_data_table_margin_autofix": false, + "template_with_datatable": false, + "enabled_template_settings_persistence": false, + "misconfigured_margins": false, + "file_entity_id": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p" + } +} +``` + +
+ +--- + +### `convertDocument` + +Converts a document to a different format. + +`POST /v2/documents:convert` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot document convertDocument +``` + +With request body: + +```bash +epilot document convertDocument \ + -d '{ + "language": "de", + "input_document": { + "s3ref": { + "bucket": "document-api-prod", + "key": "uploads/my-template.pdf" + } + }, + "output_format": "pdf", + "output_filename": "converted.pdf" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot document convertDocument +``` + +With JSONata filter: + +```bash +epilot document convertDocument --jsonata 'output_document' +``` + +
+Sample Response + +```json +{ + "output_document": { + "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/converted.pdf", + "s3ref": { + "bucket": "document-api-prod", + "key": "uploads/my-template.pdf" + } + } +} +``` + +
+ +--- diff --git a/packages/cli/docs/email-settings.md b/packages/cli/docs/email-settings.md new file mode 100644 index 00000000..ab9e377f --- /dev/null +++ b/packages/cli/docs/email-settings.md @@ -0,0 +1,2207 @@ +# Messaging Settings API + +- **Base URL:** `https://email-settings.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/email-settings](https://docs.epilot.io/api/email-settings) + +The Messaging Settings API provides comprehensive management of email configurations for epilot organizations. + +## Quick Start + +```bash +# List available operations +epilot email-settings + +# Call an operation +epilot email-settings provisionEpilotEmailAddress +``` + +## Operations + +**Email addresses** +- [`provisionEpilotEmailAddress`](#provisionepilotemailaddress) — Provisions or reactivates an epilot-managed email address for the organization. +- [`setEmailAddressPrimary`](#setemailaddressprimary) — Sets the specified email address as the primary address for the organization. +- [`getEmailAddress`](#getemailaddress) — Retrieves the details of a specific email address by its ID. +- [`updateEmailAddress`](#updateemailaddress) — Updates the configuration of an existing email address. +- [`deleteEmailAddress`](#deleteemailaddress) — Permanently deletes an email address from the organization. +- [`listEmailAddresses`](#listemailaddresses) — Retrieves all email addresses configured for the organization. +- [`addEmailAddress`](#addemailaddress) — Adds a new email address to the organization. + +**Shared inboxes** +- [`getSharedInbox`](#getsharedinbox) — Retrieves the details of a specific shared inbox by its ID. +- [`updateSharedInbox`](#updatesharedinbox) — Updates the configuration of an existing shared inbox. +- [`deleteSharedInbox`](#deletesharedinbox) — Deletes a shared inbox and reroutes all associated emails to a successor inbox. +- [`listSharedInboxes`](#listsharedinboxes) — Retrieves all shared inboxes configured for the organization. +- [`addSharedInbox`](#addsharedinbox) — Creates a new shared inbox for the organization. + +**Inbox buckets** +- [`listInboxBuckets`](#listinboxbuckets) — Retrieves all inbox buckets for the organization. + +**O365 Outlook Connection** +- [`connectOutlook`](#connectoutlook) — Returns Microsoft authorization URL for Outlook OAuth. +- [`getOutlookConnectionStatus`](#getoutlookconnectionstatus) — Returns all Microsoft 365 / Outlook connections for the organization. +- [`disconnectOutlook`](#disconnectoutlook) — Removes the Microsoft 365 / Outlook connection for a specific tenant. +- [`connectOutlookMailbox`](#connectoutlookmailbox) — Connects an Outlook mailbox: +- [`disconnectOutlookMailbox`](#disconnectoutlookmailbox) — Disconnects a single Outlook mailbox by email address. +- [`startMailboxSync`](#startmailboxsync) — Triggers an Outlook mailbox sync for the specified email address. +- [`getMailboxSyncStatus`](#getmailboxsyncstatus) — Returns the current or latest sync status for the specified mailbox. +- [`retryMailboxSync`](#retrymailboxsync) — Retries failed messages from a previous sync execution. +- [`getConnectedOutlookEmails`](#getconnectedoutlookemails) — Returns all Outlook email addresses connected to the organization. +- [`outlookOAuthCallback`](#outlookoauthcallback) — Exchanges authorization code for tokens and stores them. + +**Settings** +- [`getSettings`](#getsettings) — Retrieves settings of a specific type for the organization. +- [`addSetting`](#addsetting) — Creates a new setting of the specified type. +- [`deleteSetting`](#deletesetting) — Deletes a setting by its ID and type. +- [`updateSetting`](#updatesetting) — Updates an existing setting identified by its ID. + +**Domains** +- [`addDomain`](#adddomain) — Adds a custom email domain to the organization. +- [`deleteDomain`](#deletedomain) — Removes a custom email domain from the organization. +- [`verifyNameServers`](#verifynameservers) — Verifies that the domain's name server (NS) records are correctly configured. +- [`verifyDomain`](#verifydomain) — Verifies ownership and configuration of a custom email domain. + +### `provisionEpilotEmailAddress` + +Provisions or reactivates an epilot-managed email address for the organization. + +`PUT /v2/email-settings/email-addresses/epilot:provision` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings provisionEpilotEmailAddress \ + -d '{"address":"mycompany@epilot.cloud"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings provisionEpilotEmailAddress +``` + +With JSONata filter: + +```bash +epilot email-settings provisionEpilotEmailAddress --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456", + "address": "sales@yourcompany.com", + "name": "Sales Team", + "user_ids": ["user-123", "user-456"], + "group_ids": ["group-789"], + "default_signature_id": "sig-abc", + "shared_inbox_id": "inbox-xyz", + "is_active": true, + "is_primary": false, + "is_epilot_email_address": false +} +``` + +
+ +--- + +### `setEmailAddressPrimary` + +Sets the specified email address as the primary address for the organization. + +`POST /v2/email-settings/email-addresses/primary` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings setEmailAddressPrimary \ + -d '{"address":"sales@yourcompany.com"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings setEmailAddressPrimary +``` + +With JSONata filter: + +```bash +epilot email-settings setEmailAddressPrimary --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456", + "address": "sales@yourcompany.com", + "name": "Sales Team", + "user_ids": ["user-123", "user-456"], + "group_ids": ["group-789"], + "default_signature_id": "sig-abc", + "shared_inbox_id": "inbox-xyz", + "is_active": true, + "is_primary": false, + "is_epilot_email_address": false +} +``` + +
+ +--- + +### `getEmailAddress` + +Retrieves the details of a specific email address by its ID. + +`GET /v2/email-settings/email-addresses/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Unique identifier of the email address. This can be either the UUID assigned +when the email address was created, or the email address string itself. + | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings getEmailAddress \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot email-settings getEmailAddress 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot email-settings getEmailAddress -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456", + "address": "sales@yourcompany.com", + "name": "Sales Team", + "user_ids": ["user-123", "user-456"], + "group_ids": ["group-789"], + "default_signature_id": "sig-abc", + "shared_inbox_id": "inbox-xyz", + "is_active": true, + "is_primary": false, + "is_epilot_email_address": false +} +``` + +
+ +--- + +### `updateEmailAddress` + +Updates the configuration of an existing email address. + +`PUT /v2/email-settings/email-addresses/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Unique identifier of the email address. This can be either the UUID assigned +when the email address was created, or the email address string itself. + | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings updateEmailAddress \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot email-settings updateEmailAddress \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "name": "Sales Team", + "user_ids": ["user-123", "user-456"], + "group_ids": ["group-789"], + "default_signature_id": "sig-abc", + "shared_inbox_id": "inbox-xyz", + "is_active": true +}' +``` + +Using positional args for path parameters: + +```bash +epilot email-settings updateEmailAddress 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings updateEmailAddress -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot email-settings updateEmailAddress -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456", + "address": "sales@yourcompany.com", + "name": "Sales Team", + "user_ids": ["user-123", "user-456"], + "group_ids": ["group-789"], + "default_signature_id": "sig-abc", + "shared_inbox_id": "inbox-xyz", + "is_active": true, + "is_primary": false, + "is_epilot_email_address": false +} +``` + +
+ +--- + +### `deleteEmailAddress` + +Permanently deletes an email address from the organization. + +`DELETE /v2/email-settings/email-addresses/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Unique identifier of the email address. This can be either the UUID assigned +when the email address was created, or the email address string itself. + | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings deleteEmailAddress \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot email-settings deleteEmailAddress 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot email-settings deleteEmailAddress -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `listEmailAddresses` + +Retrieves all email addresses configured for the organization. + +`GET /v2/email-settings/email-addresses` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings listEmailAddresses +``` + +With JSONata filter: + +```bash +epilot email-settings listEmailAddresses --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456", + "address": "sales@yourcompany.com", + "name": "Sales Team", + "user_ids": ["user-123", "user-456"], + "group_ids": ["group-789"], + "default_signature_id": "sig-abc", + "shared_inbox_id": "inbox-xyz", + "is_active": true, + "is_primary": false, + "is_epilot_email_address": false + } +] +``` + +
+ +--- + +### `addEmailAddress` + +Adds a new email address to the organization. + +`POST /v2/email-settings/email-addresses` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings addEmailAddress +``` + +With request body: + +```bash +epilot email-settings addEmailAddress \ + -d '{ + "address": "support@yourcompany.com", + "name": "Customer Support", + "user_ids": ["user-123"], + "group_ids": ["group-456"], + "default_signature_id": "sig-789", + "shared_inbox_id": "inbox-abc" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings addEmailAddress +``` + +With JSONata filter: + +```bash +epilot email-settings addEmailAddress --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456", + "address": "sales@yourcompany.com", + "name": "Sales Team", + "user_ids": ["user-123", "user-456"], + "group_ids": ["group-789"], + "default_signature_id": "sig-abc", + "shared_inbox_id": "inbox-xyz", + "is_active": true, + "is_primary": false, + "is_epilot_email_address": false +} +``` + +
+ +--- + +### `getSharedInbox` + +Retrieves the details of a specific shared inbox by its ID. + +`GET /v2/email-settings/shared-inboxes/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Unique identifier (UUID) of the shared inbox. +Use `default` to reference the organization's default inbox. + | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings getSharedInbox \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot email-settings getSharedInbox 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot email-settings getSharedInbox -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456", + "name": "Customer Support", + "color": "#4CAF50", + "assignees": ["user-123", "user-456"], + "description": "Incoming customer support requests", + "bucket_id": "bucket-xyz" +} +``` + +
+ +--- + +### `updateSharedInbox` + +Updates the configuration of an existing shared inbox. + +`PUT /v2/email-settings/shared-inboxes/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Unique identifier (UUID) of the shared inbox. +Use `default` to reference the organization's default inbox. + | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings updateSharedInbox \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot email-settings updateSharedInbox \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "color": "#4CAF50", + "name": "Customer Support", + "assignees": ["user-123", "user-456"], + "description": "Incoming customer support requests" +}' +``` + +Using positional args for path parameters: + +```bash +epilot email-settings updateSharedInbox 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings updateSharedInbox -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot email-settings updateSharedInbox -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456", + "name": "Customer Support", + "color": "#4CAF50", + "assignees": ["user-123", "user-456"], + "description": "Incoming customer support requests", + "bucket_id": "bucket-xyz" +} +``` + +
+ +--- + +### `deleteSharedInbox` + +Deletes a shared inbox and reroutes all associated emails to a successor inbox. + +`DELETE /v2/email-settings/shared-inboxes/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Unique identifier (UUID) of the shared inbox. +Use `default` to reference the organization's default inbox. + | +| `successorInboxId` | query | string | No | ID of the inbox that will receive emails from the deleted inbox. +If not provided, the default inbox (`default`) will be used as the successor. + | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings deleteSharedInbox \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot email-settings deleteSharedInbox 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot email-settings deleteSharedInbox -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `listSharedInboxes` + +Retrieves all shared inboxes configured for the organization. + +`GET /v2/email-settings/shared-inboxes` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings listSharedInboxes +``` + +With JSONata filter: + +```bash +epilot email-settings listSharedInboxes --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456", + "name": "Customer Support", + "color": "#4CAF50", + "assignees": ["user-123", "user-456"], + "description": "Incoming customer support requests", + "bucket_id": "bucket-xyz" + } +] +``` + +
+ +--- + +### `addSharedInbox` + +Creates a new shared inbox for the organization. + +`POST /v2/email-settings/shared-inboxes` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings addSharedInbox +``` + +With request body: + +```bash +epilot email-settings addSharedInbox \ + -d '{ + "id": "support-inbox", + "color": "#2196F3", + "name": "Sales Inquiries", + "assignees": ["user-123", "user-456"], + "description": "Inbound sales and pricing requests" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings addSharedInbox +``` + +With JSONata filter: + +```bash +epilot email-settings addSharedInbox --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456", + "name": "Customer Support", + "color": "#4CAF50", + "assignees": ["user-123", "user-456"], + "description": "Incoming customer support requests", + "bucket_id": "bucket-xyz" +} +``` + +
+ +--- + +### `listInboxBuckets` + +Retrieves all inbox buckets for the organization. + +`GET /v2/email-settings/inbox-buckets` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings listInboxBuckets +``` + +With JSONata filter: + +```bash +epilot email-settings listInboxBuckets --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "bucket-abc", + "inbox_id": "inbox-xyz" + } +] +``` + +
+ +--- + +### `connectOutlook` + +Returns Microsoft authorization URL for Outlook OAuth. + +`GET /v2/outlook/connect` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings connectOutlook +``` + +With JSONata filter: + +```bash +epilot email-settings connectOutlook --jsonata 'authorization_url' +``` + +
+Sample Response + +```json +{ + "authorization_url": "string" +} +``` + +
+ +--- + +### `getOutlookConnectionStatus` + +Returns all Microsoft 365 / Outlook connections for the organization. + +`GET /v2/outlook/connection/status` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings getOutlookConnectionStatus +``` + +With JSONata filter: + +```bash +epilot email-settings getOutlookConnectionStatus --jsonata 'connections' +``` + +
+Sample Response + +```json +{ + "connections": [ + { + "status": "connected", + "action": "connect", + "connected_by_display_name": "string", + "connected_by_email": "user@example.com", + "connected_by_user_id": "string", + "connected_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "tenant_id": "string", + "scopes": ["string"], + "expires_at": "1970-01-01T00:00:00.000Z", + "is_token_valid": true + } + ], + "has_connections": true +} +``` + +
+ +--- + +### `disconnectOutlook` + +Removes the Microsoft 365 / Outlook connection for a specific tenant. + +`POST /v2/outlook/connection/disconnect` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings disconnectOutlook \ + -d '{"tenant_id":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings disconnectOutlook +``` + +With JSONata filter: + +```bash +epilot email-settings disconnectOutlook --jsonata 'success' +``` + +
+Sample Response + +```json +{ + "success": true, + "tenant_id": "string", + "affected_shared_inboxes": ["string"] +} +``` + +
+ +--- + +### `connectOutlookMailbox` + +Connects an Outlook mailbox: + +`POST /v2/outlook/mailbox/connect` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings connectOutlookMailbox \ + -d '{"email":"user@example.com","shared_inbox_id":"default","mailboxSyncTimeframe":"5m"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings connectOutlookMailbox +``` + +With JSONata filter: + +```bash +epilot email-settings connectOutlookMailbox --jsonata 'email_address' +``` + +
+Sample Response + +```json +{ + "email_address": { + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456", + "address": "sales@yourcompany.com", + "name": "Sales Team", + "user_ids": ["user-123", "user-456"], + "group_ids": ["group-789"], + "default_signature_id": "sig-abc", + "shared_inbox_id": "inbox-xyz", + "is_active": true, + "is_primary": false, + "is_epilot_email_address": false + }, + "outlook_email": "user@example.com", + "tenant_id": "string", + "provider": "outlook" +} +``` + +
+ +--- + +### `disconnectOutlookMailbox` + +Disconnects a single Outlook mailbox by email address. + +`POST /v2/outlook/mailbox/{email}/disconnect` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `email` | path | string (email) | Yes | Email address of the Outlook mailbox to disconnect | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings disconnectOutlookMailbox \ + -p email=user@example.com +``` + +Using positional args for path parameters: + +```bash +epilot email-settings disconnectOutlookMailbox user@example.com +``` + +With JSONata filter: + +```bash +epilot email-settings disconnectOutlookMailbox -p email=user@example.com --jsonata 'email' +``` + +
+Sample Response + +```json +{ + "success": true, + "email": "user@example.com" +} +``` + +
+ +--- + +### `startMailboxSync` + +Triggers an Outlook mailbox sync for the specified email address. + +`POST /v2/outlook/mailbox/{email}/sync` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `email` | path | string (email) | Yes | Email address of the Outlook mailbox to sync | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings startMailboxSync \ + -p email=user@example.com \ + -d '{"timeframe":"5m"}' +``` + +Using positional args for path parameters: + +```bash +epilot email-settings startMailboxSync user@example.com +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings startMailboxSync -p email=user@example.com +``` + +With JSONata filter: + +```bash +epilot email-settings startMailboxSync -p email=user@example.com --jsonata '$' +``` + +--- + +### `getMailboxSyncStatus` + +Returns the current or latest sync status for the specified mailbox. + +`GET /v2/outlook/mailbox/{email}/sync/status` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `email` | path | string (email) | Yes | Email address of the Outlook mailbox | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings getMailboxSyncStatus \ + -p email=user@example.com +``` + +Using positional args for path parameters: + +```bash +epilot email-settings getMailboxSyncStatus user@example.com +``` + +With JSONata filter: + +```bash +epilot email-settings getMailboxSyncStatus -p email=user@example.com --jsonata 'execution_id' +``` + +
+Sample Response + +```json +{ + "execution_id": "string", + "status": "RUNNING", + "timeframe": "5m", + "started_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z", + "inbox": { + "status": "PENDING", + "total_messages": 0, + "processed_messages": 0, + "failed_messages": 0 + }, + "sent_items": { + "status": "PENDING", + "total_messages": 0, + "processed_messages": 0, + "failed_messages": 0 + } +} +``` + +
+ +--- + +### `retryMailboxSync` + +Retries failed messages from a previous sync execution. + +`POST /v2/outlook/mailbox/{email}/sync/retry` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `email` | path | string (email) | Yes | Email address of the Outlook mailbox | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings retryMailboxSync \ + -p email=user@example.com \ + -d '{"sync_id":"string","scope":"all_failed","message_ids":["string"]}' +``` + +Using positional args for path parameters: + +```bash +epilot email-settings retryMailboxSync user@example.com +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings retryMailboxSync -p email=user@example.com +``` + +With JSONata filter: + +```bash +epilot email-settings retryMailboxSync -p email=user@example.com --jsonata '$' +``` + +--- + +### `getConnectedOutlookEmails` + +Returns all Outlook email addresses connected to the organization. + +`GET /v2/outlook/mailbox/mappings` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings getConnectedOutlookEmails +``` + +With JSONata filter: + +```bash +epilot email-settings getConnectedOutlookEmails --jsonata 'outlook_emails' +``` + +
+Sample Response + +```json +{ + "outlook_emails": [ + { + "outlook_email": "user@example.com", + "tenant_id": "string", + "provider": "outlook", + "connected_at": "1970-01-01T00:00:00.000Z", + "connected_by_user_id": "string" + } + ], + "count": 0 +} +``` + +
+ +--- + +### `outlookOAuthCallback` + +Exchanges authorization code for tokens and stores them. + +`GET /v2/outlook/oauth/callback` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `code` | query | string | No | | +| `state` | query | string | Yes | | +| `session_state` | query | string | No | | +| `error` | query | string | No | | +| `error_description` | query | string | No | | +| `error_subcode` | query | string | No | | +| `client_info` | query | string | No | | +| `error_uri` | query | string | No | | +| `admin_consent` | query | string | No | | +| `tenant` | query | string | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings outlookOAuthCallback \ + -p state=example +``` + +With JSONata filter: + +```bash +epilot email-settings outlookOAuthCallback -p state=example --jsonata 'connected' +``` + +
+Sample Response + +```json +{ + "connected": true, + "expires_at": "1970-01-01T00:00:00.000Z", + "scope": "string" +} +``` + +
+ +--- + +### `getSettings` + +Retrieves settings of a specific type for the organization. + +`GET /v1/email-settings` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `type` | query | "signature" \| "email_domain" \| "email_address" \| "whitelist_email_address" \| "restrict_duplicates_within" | Yes | The type of settings to retrieve. Determines which category of +email settings will be returned. + | +| `id` | query | string | No | Optional ID to retrieve a specific setting. If omitted, all settings +of the specified type are returned. + | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings getSettings \ + -p type=signature +``` + +With JSONata filter: + +```bash +epilot email-settings getSettings -p type=signature --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "name": "Default Signature", + "org_id": "org-123", + "type": "signature", + "value": "Best regards, The Team", + "html": "

Best regards,
The Team

", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456" + } +] +``` + +
+ +--- + +### `addSetting` + +Creates a new setting of the specified type. + +`POST /v1/email-settings` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings addSetting +``` + +With request body: + +```bash +epilot email-settings addSetting \ + -d '{ + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "name": "Default Signature", + "org_id": "org-123", + "type": "signature", + "value": "Best regards, The Team", + "html": "

Best regards,
The Team

", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings addSetting +``` + +With JSONata filter: + +```bash +epilot email-settings addSetting --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "name": "Default Signature", + "org_id": "org-123", + "type": "signature", + "value": "Best regards, The Team", + "html": "

Best regards,
The Team

", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456" + } +] +``` + +
+ +--- + +### `deleteSetting` + +Deletes a setting by its ID and type. + +`DELETE /v1/email-settings` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings deleteSetting \ + -d '{"type":"signature","id":"a10bd0ff-4391-4cfc-88ee-b19d718a9bf7"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings deleteSetting +``` + +With JSONata filter: + +```bash +epilot email-settings deleteSetting --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "name": "Default Signature", + "org_id": "org-123", + "type": "signature", + "value": "Best regards, The Team", + "html": "

Best regards,
The Team

", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456" +} +``` + +
+ +--- + +### `updateSetting` + +Updates an existing setting identified by its ID. + +`POST /v1/email-settings/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The unique identifier of the setting to update | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings updateSetting \ + -p id=a10bd0ff-4391-4cfc-88ee-b19d718a9bf7 +``` + +With request body: + +```bash +epilot email-settings updateSetting \ + -p id=a10bd0ff-4391-4cfc-88ee-b19d718a9bf7 \ + -d '{ + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "name": "Default Signature", + "org_id": "org-123", + "type": "signature", + "value": "Best regards, The Team", + "html": "

Best regards,
The Team

", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456" +}' +``` + +Using positional args for path parameters: + +```bash +epilot email-settings updateSetting a10bd0ff-4391-4cfc-88ee-b19d718a9bf7 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings updateSetting -p id=a10bd0ff-4391-4cfc-88ee-b19d718a9bf7 +``` + +With JSONata filter: + +```bash +epilot email-settings updateSetting -p id=a10bd0ff-4391-4cfc-88ee-b19d718a9bf7 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "name": "Default Signature", + "org_id": "org-123", + "type": "signature", + "value": "Best regards, The Team", + "html": "

Best regards,
The Team

", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456" +} +``` + +
+ +--- + +### `addDomain` + +Adds a custom email domain to the organization. + +`POST /v1/email-settings/domain` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings addDomain \ + -d '{"domain":"mail.yourcompany.com"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings addDomain +``` + +With JSONata filter: + +```bash +epilot email-settings addDomain --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "name": "Default Signature", + "org_id": "org-123", + "type": "signature", + "value": "Best regards, The Team", + "html": "

Best regards,
The Team

", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456" + } +] +``` + +
+ +--- + +### `deleteDomain` + +Removes a custom email domain from the organization. + +`DELETE /v1/email-settings/domain` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings deleteDomain \ + -d '{"domain":"mail.yourcompany.com"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings deleteDomain +``` + +With JSONata filter: + +```bash +epilot email-settings deleteDomain --jsonata '$' +``` + +--- + +### `verifyNameServers` + +Verifies that the domain's name server (NS) records are correctly configured. + +`POST /v1/email-settings/domain/name-servers:verify` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings verifyNameServers \ + -d '{"domain":"mail.yourcompany.com"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings verifyNameServers +``` + +With JSONata filter: + +```bash +epilot email-settings verifyNameServers --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "name": "Default Signature", + "org_id": "org-123", + "type": "signature", + "value": "Best regards, The Team", + "html": "

Best regards,
The Team

", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456" + } +] +``` + +
+ +--- + +### `verifyDomain` + +Verifies ownership and configuration of a custom email domain. + +`POST /v1/email-settings/domain:verify` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-settings verifyDomain \ + -d '{"domain":"mail.yourcompany.com"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-settings verifyDomain +``` + +With JSONata filter: + +```bash +epilot email-settings verifyDomain --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7", + "name": "Default Signature", + "org_id": "org-123", + "type": "signature", + "value": "Best regards, The Team", + "html": "

Best regards,
The Team

", + "created_at": "2024-01-15T10:30:00Z", + "updated_at": "2024-01-20T14:45:00Z", + "created_by": "user-123", + "updated_by": "user-456" + } +] +``` + +
+ +--- diff --git a/packages/cli/docs/email-template.md b/packages/cli/docs/email-template.md new file mode 100644 index 00000000..1c49becc --- /dev/null +++ b/packages/cli/docs/email-template.md @@ -0,0 +1,842 @@ +# Email template API + +- **Base URL:** `https://email-template.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/email-template](https://docs.epilot.io/api/email-template) + +Email template API service + +## Quick Start + +```bash +# List available operations +epilot email-template + +# Call an operation +epilot email-template saveTemplate +``` + +## Operations + +**Email templates** +- [`saveTemplate`](#savetemplate) — Create or update a template. If `id` is provided, it will update the template. +- [`getTemplateDetail`](#gettemplatedetail) — Get email template by ID +- [`updateTemplateDetail`](#updatetemplatedetail) — Update email template by ID +- [`bulkSendMessage`](#bulksendmessage) — Send emails to multiple recipients using a template +- [`revertToOriginalTemplate`](#reverttooriginaltemplate) — Revert to the original system generated email template + +**Variables** +- [`replaceVariablesAsync`](#replacevariablesasync) — This endpoint allows to initiate an asynchronous process in replacing the template details & generating the documents. + +### `saveTemplate` + +Create or update a template. If `id` is provided, it will update the template. + +`POST /v1/email-template/templates` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-template saveTemplate +``` + +With request body: + +```bash +epilot email-template saveTemplate \ + -d '{ + "_id": "cd7809ba-a111-4dd9-8d15-18eb4de0faed", + "_tags": ["template"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "_purpose": ["a0ec23ac-12f8-4d89-9a63-91cba3787f2a", "310cd388-2f15-4b5b-8f98-ca14c1e03304"], + "name": "Order confirmation", + "brand_id": 0, + "from": { + "name": "epilot", + "email": "no-reply@epilot.cloud" + }, + "to": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "cc": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "bcc": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "subject": "We have received your order!", + "body": "Hi Ms Ny Huynh,
Thank you for your order. We will contact you shortly", + "attachments": [ + { + "cid": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f", + "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf", + "size": 451349, + "content_type": "application/pdf", + "url": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf", + "bucket": "893487340562-message-attachment", + "object_key": "attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf", + "inline": false, + "send_as_link": false, + "type": "Document template", + "copy_to_message": true + } + ], + "file": { + "$relation": [ + {} + ] + }, + "system_template": false, + "created_by": 1234, + "updated_by": 1234 +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-template saveTemplate +``` + +With JSONata filter: + +```bash +epilot email-template saveTemplate --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "string", + "_org": "206801", + "_schema": "message", + "_tags": ["automatic email template"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-10T09:14:31.990Z", + "_purpose": ["a0ec23ac-12f8-4d89-9a63-91cba3787f2a", "310cd388-2f15-4b5b-8f98-ca14c1e03304"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "name": "Order confirmation", + "brand_id": 0, + "from": { + "name": "epilot", + "email": "no-reply@epilot.cloud" + }, + "to": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "cc": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "bcc": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "subject": "We have received your order!", + "body": "Hi Ms Ny Huynh,
Thank you for your order. We will contact you shortly", + "attachments": [ + { + "cid": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f", + "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf", + "size": 451349, + "content_type": "application/pdf", + "url": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf", + "bucket": "893487340562-message-attachment", + "object_key": "attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf", + "inline": false, + "send_as_link": false, + "type": "Document template", + "copy_to_message": true + } + ], + "file": { + "$relation": [ + {} + ] + }, + "created_by": 1234, + "updated_by": 1234, + "system_template": false +} +``` + +
+ +--- + +### `getTemplateDetail` + +Get email template by ID + +`GET /v1/email-template/templates/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Template entity ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-template getTemplateDetail \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot email-template getTemplateDetail 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot email-template getTemplateDetail -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'entity._title' +``` + +
+Sample Response + +```json +{ + "entity": { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "string", + "_org": "206801", + "_schema": "message", + "_tags": ["automatic email template"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-10T09:14:31.990Z", + "_purpose": ["a0ec23ac-12f8-4d89-9a63-91cba3787f2a", "310cd388-2f15-4b5b-8f98-ca14c1e03304"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "name": "Order confirmation", + "brand_id": 0, + "from": { + "name": "epilot", + "email": "no-reply@epilot.cloud" + }, + "to": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "cc": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "bcc": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "subject": "We have received your order!", + "body": "Hi Ms Ny Huynh,
Thank you for your order. We will contact you shortly", + "attachments": [ + { + "cid": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f", + "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf", + "size": 451349, + "content_type": "application/pdf", + "url": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf", + "bucket": "893487340562-message-attachment", + "object_key": "attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf", + "inline": false, + "send_as_link": false, + "type": "Document template", + "copy_to_message": true + } + ], + "file": { + "$relation": [ + {} + ] + }, + "created_by": 1234, + "updated_by": 1234, + "system_template": false + }, + "relations": [ + {} + ] +} +``` + +
+ +--- + +### `updateTemplateDetail` + +Update email template by ID + +`PUT /v1/email-template/templates/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Template entity ID | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-template updateTemplateDetail \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot email-template updateTemplateDetail \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "_id": "cd7809ba-a111-4dd9-8d15-18eb4de0faed", + "_tags": ["template"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "_purpose": ["a0ec23ac-12f8-4d89-9a63-91cba3787f2a", "310cd388-2f15-4b5b-8f98-ca14c1e03304"], + "name": "Order confirmation", + "brand_id": 0, + "from": { + "name": "epilot", + "email": "no-reply@epilot.cloud" + }, + "to": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "cc": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "bcc": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "subject": "We have received your order!", + "body": "Hi Ms Ny Huynh,
Thank you for your order. We will contact you shortly", + "attachments": [ + { + "cid": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f", + "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf", + "size": 451349, + "content_type": "application/pdf", + "url": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf", + "bucket": "893487340562-message-attachment", + "object_key": "attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf", + "inline": false, + "send_as_link": false, + "type": "Document template", + "copy_to_message": true + } + ], + "file": { + "$relation": [ + {} + ] + }, + "system_template": false, + "created_by": 1234, + "updated_by": 1234 +}' +``` + +Using positional args for path parameters: + +```bash +epilot email-template updateTemplateDetail 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-template updateTemplateDetail -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot email-template updateTemplateDetail -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "string", + "_org": "206801", + "_schema": "message", + "_tags": ["automatic email template"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-10T09:14:31.990Z", + "_purpose": ["a0ec23ac-12f8-4d89-9a63-91cba3787f2a", "310cd388-2f15-4b5b-8f98-ca14c1e03304"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "name": "Order confirmation", + "brand_id": 0, + "from": { + "name": "epilot", + "email": "no-reply@epilot.cloud" + }, + "to": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "cc": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "bcc": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "subject": "We have received your order!", + "body": "Hi Ms Ny Huynh,
Thank you for your order. We will contact you shortly", + "attachments": [ + { + "cid": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f", + "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf", + "size": 451349, + "content_type": "application/pdf", + "url": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf", + "bucket": "893487340562-message-attachment", + "object_key": "attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf", + "inline": false, + "send_as_link": false, + "type": "Document template", + "copy_to_message": true + } + ], + "file": { + "$relation": [ + {} + ] + }, + "created_by": 1234, + "updated_by": 1234, + "system_template": false +} +``` + +
+ +--- + +### `replaceVariablesAsync` + +This endpoint allows to initiate an asynchronous process in replacing the template details & generating the documents. + +`POST /v1/email-template/templates:replaceAsync` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `job_id` | query | string | No | Job ID for tracking the status of document generation action | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-template replaceVariablesAsync +``` + +With request body: + +```bash +epilot email-template replaceVariablesAsync \ + -d '{ + "email_template_id": "511ceb90-f738-47aa-8b1e-915ace0ae13c", + "variable_parameters": { + "template_type": "email", + "language": "en", + "main_entity_id": "63753437-c9e2-4e83-82bb-b1c666514561", + "user_id": "123452", + "custom_variables": [ + { + "variable": "{{abc.xyz}}", + "value": "ReplacedValue" + } + ] + }, + "must_include_unsubscribe_link": false, + "skip_document_generation": false +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-template replaceVariablesAsync +``` + +With JSONata filter: + +```bash +epilot email-template replaceVariablesAsync --jsonata 'job_id' +``` + +
+Sample Response + +```json +{ + "job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b", + "status": "STARTED", + "message": "string", + "doc_progress_count": { + "total": 10, + "completed": 5 + }, + "result": { + "entity": { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "string", + "_org": "206801", + "_schema": "message", + "_tags": ["automatic email template"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-10T09:14:31.990Z", + "_purpose": ["a0ec23ac-12f8-4d89-9a63-91cba3787f2a", "310cd388-2f15-4b5b-8f98-ca14c1e03304"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "name": "Order confirmation", + "brand_id": 0, + "from": { + "name": "epilot", + "email": "no-reply@epilot.cloud" + }, + "to": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "cc": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "bcc": [ + { + "name": "Ny Huynh", + "email": "ny.huynh@axonactive.com" + } + ], + "subject": "We have received your order!", + "body": "Hi Ms Ny Huynh,
Thank you for your order. We will contact you shortly", + "attachments": [ + { + "cid": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f", + "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf", + "size": 451349, + "content_type": "application/pdf", + "url": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf", + "bucket": "893487340562-message-attachment", + "object_key": "attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf", + "inline": false, + "send_as_link": false, + "type": "Document template", + "copy_to_message": true + } + ], + "file": { + "$relation": [ + {} + ] + }, + "created_by": 1234, + "updated_by": 1234, + "system_template": false + }, + "relations": [ + {} + ] + } +} +``` + +
+ +--- + +### `bulkSendMessage` + +Send emails to multiple recipients using a template + +`POST /v1/email-template/templates:bulkSendMessage` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-template bulkSendMessage +``` + +With request body: + +```bash +epilot email-template bulkSendMessage \ + -d '{ + "skip_creating_entities": true, + "email_template_id": "511ceb90-f738-47aa-8b1e-915ace0ae13c", + "must_include_unsubscribe_link": true, + "recipient_query": "_schema:contact AND consent_email_marketing:active", + "custom_variables": [ + { + "variable": "{{abc.xyz}}", + "value": "ReplacedValue" + } + ] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-template bulkSendMessage +``` + +With JSONata filter: + +```bash +epilot email-template bulkSendMessage --jsonata 'org_id' +``` + +
+Sample Response + +```json +{ + "org_id": "206801", + "job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b", + "skip_creating_entities": true, + "status": "PROCESSING", + "request": { + "skip_creating_entities": true, + "email_template_id": "511ceb90-f738-47aa-8b1e-915ace0ae13c", + "must_include_unsubscribe_link": true, + "recipient_ids": ["3fa85f64-5717-4562-b3fc-2c963f66afa6", "3fa85f64-5717-4562-b3fc-2c963f66afa7", "3fa85f64-5717-4562-b3fc-2c963f66afa8"], + "custom_variables": [ + { + "variable": "{{abc.xyz}}", + "value": "ReplacedValue" + } + ] + }, + "created_by": "1234", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "approved_at": "1970-01-01T00:00:00.000Z", + "approve_action": "APPROVE_WITH_CONSENT", + "task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b", + "total_queued": 100, + "queued": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "email_to": ["recipient@example.com"], + "email_with_consent": ["recipient@example.com"] + } + ], + "sent": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "message_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "email_to": ["recipient@example.com"] + } + ], + "failed": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "error": "string", + "email_to": ["recipient@example.com"] + } + ] +} +``` + +
+ +--- + +### `revertToOriginalTemplate` + +Revert to the original system generated email template + +`POST /v1/email-template/templates:revert` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot email-template revertToOriginalTemplate \ + -d '{"email_template_id":"511ceb90-f738-47aa-8b1e-915ace0ae13c"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot email-template revertToOriginalTemplate +``` + +With JSONata filter: + +```bash +epilot email-template revertToOriginalTemplate --jsonata '$' +``` + +--- + +## Deprecated Operations + +- ~~`replaceVariables`~~ POST `/v1/email-template/templates:replace` diff --git a/packages/cli/docs/entity-mapping.md b/packages/cli/docs/entity-mapping.md new file mode 100644 index 00000000..67f4bd07 --- /dev/null +++ b/packages/cli/docs/entity-mapping.md @@ -0,0 +1,1377 @@ +# Entity Mapping API + +- **Base URL:** `https://entity-mapping.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/entity-mapping](https://docs.epilot.io/api/entity-mapping) + +API Backend for mapping source entity into target entities + +## Quick Start + +```bash +# List available operations +epilot entity-mapping + +# Call an operation +epilot entity-mapping storeConfig +``` + +## Operations + +**mappings** +- [`storeConfig`](#storeconfig) — Store new MappingConfig +- [`getConfig`](#getconfig) — Get latest version of a mapping config by id +- [`deleteConfig`](#deleteconfig) — Delete entity mapping config +- [`getAllVersions`](#getallversions) — Get all version of MappingConfig +- [`storeNewVersion`](#storenewversion) — Store new version of MappingConfig +- [`getConfigVersion`](#getconfigversion) — Get specific version of a mapping config by id & version +- [`executeMapping`](#executemapping) — Execute entity mapping based on a config +- [`searchConfigs`](#searchconfigs) — Search mapping configs +- [`queryMappingHistory`](#querymappinghistory) — Get the Mapping History +- [`executeRelations`](#executerelations) — Execute relation mapping between source entity and target entities +- [`getMappingConfig`](#getmappingconfig) — Get latest version of a mapping config by id V2 +- [`putMappingConfig`](#putmappingconfig) — Stores new version of entity mapping config + +### `storeConfig` + +Store new MappingConfig + +`POST /v1/mappings` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `with_id` | query | string | No | Whether ids are part of the body or not | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity-mapping storeConfig +``` + +With request body: + +```bash +epilot entity-mapping storeConfig \ + -d '{ + "id": "string", + "source": { + "type": "journey", + "config": { + "journey_id": "string" + } + }, + "targets": [ + { + "id": "string", + "name": "string", + "allow_failure": true, + "target_schema": "string", + "target_unique": ["string"], + "loop_config": {}, + "conditionMode": "oneOf", + "conditions": [], + "mapping_attributes": [], + "relation_attributes": [], + "linkback_relation_attribute": "mapped_entities", + "linkback_relation_tags": ["string"] + } + ], + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "last_updated_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "org_id": "66", + "version": 2 +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity-mapping storeConfig +``` + +With JSONata filter: + +```bash +epilot entity-mapping storeConfig --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "source": { + "type": "journey", + "config": { + "journey_id": "string" + } + }, + "targets": [ + { + "id": "string", + "name": "string", + "allow_failure": true, + "target_schema": "string", + "target_unique": ["string"], + "loop_config": {}, + "conditionMode": "oneOf", + "conditions": [], + "mapping_attributes": [], + "relation_attributes": [], + "linkback_relation_attribute": "mapped_entities", + "linkback_relation_tags": ["string"] + } + ], + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "last_updated_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "org_id": "66", + "version": 2 +} +``` + +
+ +--- + +### `getConfig` + +Get latest version of a mapping config by id + +`GET /v1/mappings/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Mapping Config Id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity-mapping getConfig \ + -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +Using positional args for path parameters: + +```bash +epilot entity-mapping getConfig 70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +With JSONata filter: + +```bash +epilot entity-mapping getConfig -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "source": { + "type": "journey", + "config": { + "journey_id": "string" + } + }, + "targets": [ + { + "id": "string", + "name": "string", + "allow_failure": true, + "target_schema": "string", + "target_unique": ["string"], + "loop_config": {}, + "conditionMode": "oneOf", + "conditions": [], + "mapping_attributes": [], + "relation_attributes": [], + "linkback_relation_attribute": "mapped_entities", + "linkback_relation_tags": ["string"] + } + ], + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "last_updated_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "org_id": "66", + "version": 2 +} +``` + +
+ +--- + +### `deleteConfig` + +Delete entity mapping config + +`DELETE /v1/mappings/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Mapping Config Id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity-mapping deleteConfig \ + -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +Using positional args for path parameters: + +```bash +epilot entity-mapping deleteConfig 70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +With JSONata filter: + +```bash +epilot entity-mapping deleteConfig -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "source": { + "type": "journey", + "config": { + "journey_id": "string" + } + }, + "targets": [ + { + "id": "string", + "name": "string", + "allow_failure": true, + "target_schema": "string", + "target_unique": ["string"], + "loop_config": {}, + "conditionMode": "oneOf", + "conditions": [], + "mapping_attributes": [], + "relation_attributes": [], + "linkback_relation_attribute": "mapped_entities", + "linkback_relation_tags": ["string"] + } + ], + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "last_updated_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "org_id": "66", + "version": 2 +} +``` + +
+ +--- + +### `getAllVersions` + +Get all version of MappingConfig + +`GET /v1/mappings/{id}/versions` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Mapping Config Id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity-mapping getAllVersions \ + -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +Using positional args for path parameters: + +```bash +epilot entity-mapping getAllVersions 70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +With JSONata filter: + +```bash +epilot entity-mapping getAllVersions -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 --jsonata 'configs' +``` + +
+Sample Response + +```json +{ + "configs": [ + { + "id": "string", + "source": {}, + "targets": [], + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": {}, + "last_updated_by": {}, + "org_id": "66", + "version": 2 + } + ] +} +``` + +
+ +--- + +### `storeNewVersion` + +Store new version of MappingConfig + +`POST /v1/mappings/{id}/versions` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Mapping Config Id | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity-mapping storeNewVersion \ + -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +With request body: + +```bash +epilot entity-mapping storeNewVersion \ + -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 \ + -d '{ + "id": "string", + "source": { + "type": "journey", + "config": { + "journey_id": "string" + } + }, + "targets": [ + { + "id": "string", + "name": "string", + "allow_failure": true, + "target_schema": "string", + "target_unique": ["string"], + "loop_config": {}, + "conditionMode": "oneOf", + "conditions": [], + "mapping_attributes": [], + "relation_attributes": [], + "linkback_relation_attribute": "mapped_entities", + "linkback_relation_tags": ["string"] + } + ], + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "last_updated_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "org_id": "66", + "version": 2 +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity-mapping storeNewVersion 70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity-mapping storeNewVersion -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +With JSONata filter: + +```bash +epilot entity-mapping storeNewVersion -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "source": { + "type": "journey", + "config": { + "journey_id": "string" + } + }, + "targets": [ + { + "id": "string", + "name": "string", + "allow_failure": true, + "target_schema": "string", + "target_unique": ["string"], + "loop_config": {}, + "conditionMode": "oneOf", + "conditions": [], + "mapping_attributes": [], + "relation_attributes": [], + "linkback_relation_attribute": "mapped_entities", + "linkback_relation_tags": ["string"] + } + ], + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "last_updated_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "org_id": "66", + "version": 2 +} +``` + +
+ +--- + +### `getConfigVersion` + +Get specific version of a mapping config by id & version + +`GET /v1/mappings/{id}/versions/{version}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Mapping Config Id | +| `version` | path | number | Yes | Version to be loaded | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity-mapping getConfigVersion \ + -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 \ + -p version=3 +``` + +Using positional args for path parameters: + +```bash +epilot entity-mapping getConfigVersion 70542580-2b38-4bfc-af8d-bb90102f9f47 3 +``` + +With JSONata filter: + +```bash +epilot entity-mapping getConfigVersion -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 -p version=3 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "source": { + "type": "journey", + "config": { + "journey_id": "string" + } + }, + "targets": [ + { + "id": "string", + "name": "string", + "allow_failure": true, + "target_schema": "string", + "target_unique": ["string"], + "loop_config": {}, + "conditionMode": "oneOf", + "conditions": [], + "mapping_attributes": [], + "relation_attributes": [], + "linkback_relation_attribute": "mapped_entities", + "linkback_relation_tags": ["string"] + } + ], + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "last_updated_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "org_id": "66", + "version": 2 +} +``` + +
+ +--- + +### `executeMapping` + +Execute entity mapping based on a config + +`POST /v1/mappings:execute` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `preview_mode` | query | boolean | No | True, if you want to preview the entities which will result | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity-mapping executeMapping +``` + +With request body: + +```bash +epilot entity-mapping executeMapping \ + -d '{ + "source_ref": { + "entity_id": "string", + "entity_schema": "submission" + }, + "targets": [ + { + "id": "string", + "name": "string", + "allow_failure": true, + "target_schema": "string", + "target_unique": ["string"], + "loop_config": { + "source_path": "string", + "length": "the length of the array" + }, + "conditionMode": "oneOf", + "conditions": [ + { + "_exists": { + "source": "string", + "value": "string" + }, + "_equals": { + "source": "string", + "value": "string" + }, + "_not_exists": { + "source": "string", + "value": "string" + }, + "_any_of": { + "source": "string", + "value": "string" + } + } + ], + "mapping_attributes": [ + { + "target": "_tags", + "operation": { + "_append": ["new", "tags"], + "_uniq": true + } + }, + { + "mode": "copy_if_exists", + "target": "string", + "value": {} + } + ], + "relation_attributes": [ + { + "target": "string", + "target_tags": ["string"], + "target_tags_include_source": false, + "override_with_source_filter": false, + "source_filter": { + "limit": 0, + "schema": "string", + "attribute": "string", + "relation_tag": "string", + "tag": "string", + "self": false + }, + "related_to": {}, + "mode": "append", + "origin": "system_recommendation" + } + ], + "linkback_relation_attribute": "mapped_entities", + "linkback_relation_tags": ["string"] + } + ] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity-mapping executeMapping +``` + +With JSONata filter: + +```bash +epilot entity-mapping executeMapping --jsonata 'mapped_entities' +``` + +
+Sample Response + +```json +{ + "mapped_entities": [ + { + "_id": "string", + "_schema": "string", + "_title": "string", + "_org": "string", + "_tags": ["string"], + "_created_at": "string", + "_updated_at": "string", + "required": {} + } + ], + "failures": [ + { + "target": {}, + "error": {} + } + ], + "warnings": [ + { + "explanation": "string", + "context": "string", + "id": "string" + } + ] +} +``` + +
+ +--- + +### `searchConfigs` + +Search mapping configs + +`POST /v1/mappings:search` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity-mapping searchConfigs \ + -d '{"source":{"type":"journey","config":{"journey_id":"string"}}}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity-mapping searchConfigs +``` + +With JSONata filter: + +```bash +epilot entity-mapping searchConfigs --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "source": { + "type": "journey", + "config": { + "journey_id": "string" + } + }, + "targets": [ + { + "id": "string", + "name": "string", + "allow_failure": true, + "target_schema": "string", + "target_unique": ["string"], + "loop_config": {}, + "conditionMode": "oneOf", + "conditions": [], + "mapping_attributes": [], + "relation_attributes": [], + "linkback_relation_attribute": "mapped_entities", + "linkback_relation_tags": ["string"] + } + ], + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "last_updated_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "org_id": "66", + "version": 2 +} +``` + +
+ +--- + +### `queryMappingHistory` + +Get the Mapping History + +`GET /v1/mappings/history` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `from` | query | string (datetime) | No | filter the history from this date on | +| `to` | query | string (datetime) | No | filter the history to this date on | +| `targetEntityId` | query | string (uuid) | No | | +| `sourceEntityId` | query | string (uuid) | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity-mapping queryMappingHistory +``` + +With JSONata filter: + +```bash +epilot entity-mapping queryMappingHistory --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{} +``` + +
+ +--- + +### `executeRelations` + +Execute relation mapping between source entity and target entities + +`POST /v1/relations:execute` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity-mapping executeRelations +``` + +With request body: + +```bash +epilot entity-mapping executeRelations \ + -d '{ + "source_ref": { + "entity_id": "string", + "entity_schema": "submission" + }, + "target": { + "main_entity_ref": { + "entity_id": "string", + "entity_schema": "submission" + }, + "relation_attributes": [ + { + "target": "string", + "target_tags": ["string"], + "target_tags_include_source": false, + "override_with_source_filter": false, + "source_filter": { + "limit": 0, + "schema": "string", + "attribute": "string", + "relation_tag": "string", + "tag": "string", + "self": false + }, + "related_to": {}, + "mode": "append", + "origin": "system_recommendation" + } + ], + "linkback": { + "attribute": "mapped_entities", + "relation_tags": ["string"] + } + }, + "additional_relations": [ + { + "entity_id": "string", + "attribute": "string" + } + ] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity-mapping executeRelations +``` + +With JSONata filter: + +```bash +epilot entity-mapping executeRelations --jsonata 'relations' +``` + +
+Sample Response + +```json +{ + "relations": [ + { + "source_entity_id": "string", + "target_entity_id": "string", + "relation_attr": "string", + "tags": ["string"] + } + ] +} +``` + +
+ +--- + +### `getMappingConfig` + +Get latest version of a mapping config by id V2 + +`GET /v2/mappings/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Mapping Config Id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity-mapping getMappingConfig \ + -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +Using positional args for path parameters: + +```bash +epilot entity-mapping getMappingConfig 70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +With JSONata filter: + +```bash +epilot entity-mapping getMappingConfig -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "source": { + "type": "journey", + "config": { + "journey_id": "string" + } + }, + "targets": [ + { + "id": "string", + "name": "string", + "allow_failure": true, + "target_schema": "string", + "target_unique": ["string"], + "loop_config": {}, + "conditionMode": "oneOf", + "conditions": [], + "mapping_attributes": [], + "relation_attributes": [], + "linkback_relation_attribute": "mapped_entities", + "linkback_relation_tags": ["string"] + } + ], + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "last_updated_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "org_id": "66", + "version": 2 +} +``` + +
+ +--- + +### `putMappingConfig` + +Stores new version of entity mapping config + +`PUT /v2/mappings/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Mapping Config Id | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity-mapping putMappingConfig \ + -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +With request body: + +```bash +epilot entity-mapping putMappingConfig \ + -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 \ + -d '{ + "id": "string", + "source": { + "type": "journey", + "config": { + "journey_id": "string" + } + }, + "targets": [ + { + "id": "string", + "name": "string", + "allow_failure": true, + "target_schema": "string", + "target_unique": ["string"], + "loop_config": {}, + "conditionMode": "oneOf", + "conditions": [], + "mapping_attributes": [], + "relation_attributes": [], + "linkback_relation_attribute": "mapped_entities", + "linkback_relation_tags": ["string"] + } + ], + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "last_updated_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "org_id": "66", + "version": 2 +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity-mapping putMappingConfig 70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity-mapping putMappingConfig -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 +``` + +With JSONata filter: + +```bash +epilot entity-mapping putMappingConfig -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "source": { + "type": "journey", + "config": { + "journey_id": "string" + } + }, + "targets": [ + { + "id": "string", + "name": "string", + "allow_failure": true, + "target_schema": "string", + "target_unique": ["string"], + "loop_config": {}, + "conditionMode": "oneOf", + "conditions": [], + "mapping_attributes": [], + "relation_attributes": [], + "linkback_relation_attribute": "mapped_entities", + "linkback_relation_tags": ["string"] + } + ], + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "last_updated_by": { + "type": "user", + "org_id": "string", + "user_id": "string" + }, + "org_id": "66", + "version": 2 +} +``` + +
+ +--- diff --git a/packages/cli/docs/entity.md b/packages/cli/docs/entity.md new file mode 100644 index 00000000..1b4f8d38 --- /dev/null +++ b/packages/cli/docs/entity.md @@ -0,0 +1,8477 @@ +# Entity API + +- **Base URL:** `https://entity.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/entity](https://docs.epilot.io/api/entity) + +Flexible data layer for epilot Entities. + +## Quick Start + +```bash +# List available operations +epilot entity + +# Call an operation +epilot entity listSchemas +``` + +## Operations + +**Schemas** +- [`listSchemas`](#listschemas) — Get the latest versions of all schemas +- [`getSchema`](#getschema) — By default gets the latest version of the Schema and to get the specific version of schema pass the id. +- [`putSchema`](#putschema) — Create or update a schema with a new version +- [`deleteSchema`](#deleteschema) — Delete a schema, or a specific version of a schema +- [`getJsonSchema`](#getjsonschema) — Get formal JSON schema definition draft 2020-12 for the given epilot schema +- [`getSchemaExample`](#getschemaexample) — Get a full example entity for the given schema +- [`getSchemaVersions`](#getschemaversions) — Get all versions of this schema ordered by the latest versions including drafts. +- [`listAvailableCapabilities`](#listavailablecapabilities) — List available capabilities for schema +- [`listSchemaBlueprints`](#listschemablueprints) — List canonical versions of all available schemas +- [`listTaxonomyClassificationsForSchema`](#listtaxonomyclassificationsforschema) — List taxonomy classifications for a given schema +- [`createSchemaAttribute`](#createschemaattribute) — Create a schema attribute +- [`getSchemaAttribute`](#getschemaattribute) — Get a schema attribute from given attribute ID +- [`putSchemaAttribute`](#putschemaattribute) — Updates an attribute in the schema +- [`deleteSchemaAttribute`](#deleteschemaattribute) — Deletes an attribute from a schema +- [`createSchemaCapability`](#createschemacapability) — Create a schema capability +- [`getSchemaCapability`](#getschemacapability) — Get a schema capability from given capability ID +- [`putSchemaCapability`](#putschemacapability) — Adds or updates an capability in the schema +- [`deleteSchemaCapability`](#deleteschemacapability) — Deletes a Capability from a schema +- [`createSchemaGroup`](#createschemagroup) — Create a schema group +- [`getSchemaGroup`](#getschemagroup) — Get a schema group from given group composite ID +- [`putSchemaGroup`](#putschemagroup) — Adds or updates an capability in the schema +- [`deleteSchemaGroup`](#deleteschemagroup) — Deletes a Capability from a schema +- [`createSchemaGroupHeadline`](#createschemagroupheadline) — Create a headline in a schema group +- [`getSchemaGroupHeadline`](#getschemagroupheadline) — Get a group headline from schema from given headline composite ID +- [`putSchemaGroupHeadline`](#putschemagroupheadline) — Adds or updates a group headline in the schema +- [`deleteSchemaGroupHeadline`](#deleteschemagroupheadline) — Deletes a group headline from a schema + +**Entities** +- [`searchEntities`](#searchentities) — Search for entities. Supports ordering and pagination. [Lucene query syntax](https://www.elastic.co/guide/en/elasticsear +- [`listEntities`](#listentities) — List entities that meet the specified conditions. +- [`queryEntityGraph`](#queryentitygraph) — Traverse an entity relationship graph starting from a seed entity. +- [`createEntity`](#createentity) — Creates a new entity using a key. +- [`validateEntity`](#validateentity) — Validates an entity against the schema. +- [`validateEntityV2`](#validateentityv2) — Validates an entity against the schema. +- [`upsertEntity`](#upsertentity) — Create or update an entity using `unique_key` +- [`getEntityV2`](#getentityv2) — Gets Entity by id. +- [`restoreEntity`](#restoreentity) — Restores an entity by id +- [`reindexEntity`](#reindexentity) — Triggers a reindex for the Entity for search. +- [`getEntity`](#getentity) — Gets Entity and relations by id. +- [`updateEntity`](#updateentity) — Updates an Entity +- [`patchEntity`](#patchentity) — Partially updates an entity with the passed in entity data. +- [`deleteEntity`](#deleteentity) — Deletes an Entity +- [`autocomplete`](#autocomplete) — Autocomplete entity attributes +- [`wipeAllEntities`](#wipeallentities) — Creates a request to queue the deletion of all entities in the system. This is a destructive operation and should only b + +**Activity** +- [`createActivity`](#createactivity) — Create an activity that can be displayed in activity feeds. +- [`getActivity`](#getactivity) — Get activity by id +- [`attachActivity`](#attachactivity) — Attach existing activity to entity activity feeds +- [`getEntityActivityFeed`](#getentityactivityfeed) — Get activity feed for an entity + +**Relations** +- [`getRelations`](#getrelations) — Returns 1st level direct relations for an entity. +- [`addRelations`](#addrelations) — Relates one or more entities to parent entity by adding items to a relation attribute +- [`removeRelations`](#removerelations) — Disassociate one or more entities to parent entity by removing items to a relation attribute +- [`getRelationsV2`](#getrelationsv2) — Returns 1st level direct relations for an entity with pagination. +- [`getRelationsV3`](#getrelationsv3) — Returns 1st level direct relations for an entity with pagination. +- [`getRelatedEntitiesCount`](#getrelatedentitiescount) — Returns the amount of unique related entities for an entity - includes direct and reverse relations. +- [`updateRelation`](#updaterelation) — Updates an existing relation between two entities. +- [`deleteRelation`](#deleterelation) — Removes relation between two entities + +**Import-Export** +- [`exportEntities`](#exportentities) — Export entity data in a CSV-format. The export will export data as close as possible to what is visible on Entity UI tab +- [`importEntities`](#importentities) — This endpoint enables the import of entities into the platform. + +**Saved Views** +- [`listSavedViews`](#listsavedviews) — Get the Saved Views based on the schema +- [`createSavedView`](#createsavedview) — Creates a new saved view +- [`getSavedView`](#getsavedview) — Gets Saved View configuration by id. +- [`updateSavedView`](#updatesavedview) — Updates a saved view +- [`patchSavedView`](#patchsavedview) — Partially updates a saved view with the provided payload. If an updated_at is passed and the server contains a newer ver +- [`deleteSavedView`](#deletesavedview) — Deletes a saved view +- [`listFavoriteViewsForUser`](#listfavoriteviewsforuser) — Get the Favorite Saved Views for user based on the schema + +**Taxonomy** +- [`listTaxonomies`](#listtaxonomies) — List taxonomies in an organization +- [`createTaxonomy`](#createtaxonomy) — Create a new taxonomy +- [`getTaxonomy`](#gettaxonomy) — Get taxonomy by slug +- [`updateTaxonomy`](#updatetaxonomy) — Update a taxonomy +- [`deleteTaxonomy`](#deletetaxonomy) — Delete a taxonomy +- [`updateClassificationsForTaxonomy`](#updateclassificationsfortaxonomy) — Update the classifications for a taxonomy +- [`createTaxonomyClassification`](#createtaxonomyclassification) — Create a new classification for a taxonomy +- [`getTaxonomyClassification`](#gettaxonomyclassification) — Get a classification for a taxonomy by slug +- [`updateTaxonomyClassification`](#updatetaxonomyclassification) — Update a classification for a taxonomy +- [`deleteTaxonomyClassification`](#deletetaxonomyclassification) — Delete a classification for a taxonomy +- [`taxonomyAutocomplete`](#taxonomyautocomplete) — Taxonomies autocomplete +- [`taxonomiesClassificationsSearch`](#taxonomiesclassificationssearch) — List taxonomy classifications in an organization based on taxonomy slug +- [`getTaxonomyBulkActionJobs`](#gettaxonomybulkactionjobs) — Gets bulk actions jobs by job status: +- [`getTaxonomyBulkActionJobById`](#gettaxonomybulkactionjobbyid) — Gets a bulk action job by job id +- [`cancelBulkAction`](#cancelbulkaction) — Cancels a running bulk action job. The job status will be updated to CANCELLED +- [`bulkMoveClassifications`](#bulkmoveclassifications) — Moves classifications from one taxonomy to another, through a bulk async operation which +- [`bulkMergeClassifications`](#bulkmergeclassifications) — Merges classifications from one taxonomy into one individual classification, through a bulk async operation which +- [`bulkDeleteClassifications`](#bulkdeleteclassifications) — Permanently deletes taxonomy classifications. The classifications are deleted through a bulk + +### `listSchemas` + +Get the latest versions of all schemas + +`GET /v1/entity/schemas` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `unpublished` | query | boolean | No | Return unpublished draft schemas | +| `exclude` | query | string[] | No | List of schema slugs to exclude from the results. Accepts a comma-separated list of slugs to exclude from the results. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity listSchemas +``` + +With JSONata filter: + +```bash +epilot entity listSchemas --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "string", + "updated_at": "string", + "comment": "string", + "source": {}, + "slug": "contact", + "version": 1, + "blueprint": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "feature_flag": "FF_MY_FEATURE_FLAG", + "enable_setting": ["360_features"], + "name": "Contact", + "plural": "Contacts", + "description": "Example description", + "docs_url": "https://docs.epilot.io/docs/pricing/entities", + "category": "customer_relations", + "published": false, + "draft": false, + "icon": "person", + "title_template": "{{first_name}} {{last_name}}", + "ui_config": {}, + "capabilities": [], + "group_settings": [], + "layout_settings": {}, + "dialog_config": {}, + "attributes": [], + "_purpose": ["string"], + "explicit_search_mappings": {}, + "group_headlines": [] + } + ] +} +``` + +
+ +--- + +### `getSchema` + +By default gets the latest version of the Schema and to get the specific version of schema pass the id. + +`GET /v1/entity/schemas/{slug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | query | string (uuid) | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getSchema \ + -p slug=contact +``` + +Using positional args for path parameters: + +```bash +epilot entity getSchema contact +``` + +With JSONata filter: + +```bash +epilot entity getSchema -p slug=contact --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "string", + "updated_at": "string", + "comment": "string", + "source": { + "id": "string", + "type": "string" + }, + "slug": "contact", + "version": 1, + "blueprint": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "feature_flag": "FF_MY_FEATURE_FLAG", + "enable_setting": ["360_features"], + "name": "Contact", + "plural": "Contacts", + "description": "Example description", + "docs_url": "https://docs.epilot.io/docs/pricing/entities", + "category": "customer_relations", + "published": false, + "draft": false, + "icon": "person", + "title_template": "{{first_name}} {{last_name}}", + "ui_config": { + "table_view": { + "view_type": "default", + "row_actions": ["string"], + "bulk_actions": ["string"], + "navbar_actions": [], + "enable_thumbnails": false + }, + "create_view": { + "view_type": "default", + "search_params": {} + }, + "edit_view": { + "view_type": "default", + "search_params": {}, + "summary_attributes": ["email"] + }, + "single_view": { + "view_type": "default", + "search_params": {}, + "summary_attributes": ["email"] + }, + "list_item": { + "summary_attributes": [], + "quick_actions": [], + "ui_config": {} + }, + "sharing": { + "show_sharing_button": true + } + }, + "capabilities": [ + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "customer_messaging", + "title": "Messaging", + "attributes": [], + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "app_id": "123e4567-e89b-12d3-a456-426614174000", + "ui_config": {}, + "ui_hooks": [], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [] + } + ], + "group_settings": [ + { + "id": "e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "label": "Contact Details", + "expanded": true, + "order": 1 + }, + { + "id": "e9a1ae28-27ba-4fa0-a79c-e279cc5c4a6e", + "label": "Address Details", + "expanded": false, + "order": 2, + "info_tooltip_title": {} + } + ], + "layout_settings": { + "grid_gap": "string", + "grid_template_columns": "string" + }, + "dialog_config": {}, + "attributes": [ + { + "name": "email", + "type": "email", + "label": "Email", + "required": true + }, + { + "name": "first_name", + "type": "string", + "label": "First Name" + } + ], + "_purpose": ["string"], + "explicit_search_mappings": { + "image": { + "type": "keyword", + "index": false + } + }, + "group_headlines": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "label": "string", + "layout": "string", + "group": "string", + "order": 0, + "type": "headline", + "enable_divider": false, + "divider": "top_divider", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ] +} +``` + +
+ +--- + +### `putSchema` + +Create or update a schema with a new version + +`PUT /v1/entity/schemas/{slug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `draft` | query | boolean | No | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity putSchema \ + -p slug=contact +``` + +With request body: + +```bash +epilot entity putSchema \ + -p slug=contact \ + -d '{ + "slug": "contact", + "version": 1, + "blueprint": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "feature_flag": "FF_MY_FEATURE_FLAG", + "enable_setting": ["360_features"], + "name": "Contact", + "plural": "Contacts", + "description": "Example description", + "docs_url": "https://docs.epilot.io/docs/pricing/entities", + "category": "customer_relations", + "published": false, + "draft": false, + "icon": "person", + "title_template": "{{first_name}} {{last_name}}", + "ui_config": { + "table_view": { + "view_type": "default", + "row_actions": ["string"], + "bulk_actions": ["string"], + "navbar_actions": [], + "enable_thumbnails": false + }, + "create_view": { + "view_type": "default", + "search_params": {} + }, + "edit_view": { + "view_type": "default", + "search_params": {}, + "summary_attributes": ["email"] + }, + "single_view": { + "view_type": "default", + "search_params": {}, + "summary_attributes": ["email"] + }, + "list_item": { + "summary_attributes": [], + "quick_actions": [], + "ui_config": {} + }, + "sharing": { + "show_sharing_button": true + } + }, + "capabilities": [ + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "customer_messaging", + "title": "Messaging", + "attributes": [], + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "app_id": "123e4567-e89b-12d3-a456-426614174000", + "ui_config": {}, + "ui_hooks": [], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [] + } + ], + "group_settings": [ + { + "id": "e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "label": "Contact Details", + "expanded": true, + "order": 1 + }, + { + "id": "e9a1ae28-27ba-4fa0-a79c-e279cc5c4a6e", + "label": "Address Details", + "expanded": false, + "order": 2, + "info_tooltip_title": {} + } + ], + "layout_settings": { + "grid_gap": "string", + "grid_template_columns": "string" + }, + "dialog_config": {}, + "attributes": [ + { + "name": "email", + "type": "email", + "label": "Email", + "required": true + }, + { + "name": "first_name", + "type": "string", + "label": "First Name" + } + ], + "_purpose": ["string"], + "explicit_search_mappings": { + "image": { + "type": "keyword", + "index": false + } + }, + "group_headlines": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "label": "string", + "layout": "string", + "group": "string", + "order": 0, + "type": "headline", + "enable_divider": false, + "divider": "top_divider", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ] +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity putSchema contact +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity putSchema -p slug=contact +``` + +With JSONata filter: + +```bash +epilot entity putSchema -p slug=contact --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "string", + "updated_at": "string", + "comment": "string", + "source": { + "id": "string", + "type": "string" + }, + "slug": "contact", + "version": 1, + "blueprint": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "feature_flag": "FF_MY_FEATURE_FLAG", + "enable_setting": ["360_features"], + "name": "Contact", + "plural": "Contacts", + "description": "Example description", + "docs_url": "https://docs.epilot.io/docs/pricing/entities", + "category": "customer_relations", + "published": false, + "draft": false, + "icon": "person", + "title_template": "{{first_name}} {{last_name}}", + "ui_config": { + "table_view": { + "view_type": "default", + "row_actions": ["string"], + "bulk_actions": ["string"], + "navbar_actions": [], + "enable_thumbnails": false + }, + "create_view": { + "view_type": "default", + "search_params": {} + }, + "edit_view": { + "view_type": "default", + "search_params": {}, + "summary_attributes": ["email"] + }, + "single_view": { + "view_type": "default", + "search_params": {}, + "summary_attributes": ["email"] + }, + "list_item": { + "summary_attributes": [], + "quick_actions": [], + "ui_config": {} + }, + "sharing": { + "show_sharing_button": true + } + }, + "capabilities": [ + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "customer_messaging", + "title": "Messaging", + "attributes": [], + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "app_id": "123e4567-e89b-12d3-a456-426614174000", + "ui_config": {}, + "ui_hooks": [], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [] + } + ], + "group_settings": [ + { + "id": "e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "label": "Contact Details", + "expanded": true, + "order": 1 + }, + { + "id": "e9a1ae28-27ba-4fa0-a79c-e279cc5c4a6e", + "label": "Address Details", + "expanded": false, + "order": 2, + "info_tooltip_title": {} + } + ], + "layout_settings": { + "grid_gap": "string", + "grid_template_columns": "string" + }, + "dialog_config": {}, + "attributes": [ + { + "name": "email", + "type": "email", + "label": "Email", + "required": true + }, + { + "name": "first_name", + "type": "string", + "label": "First Name" + } + ], + "_purpose": ["string"], + "explicit_search_mappings": { + "image": { + "type": "keyword", + "index": false + } + }, + "group_headlines": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "label": "string", + "layout": "string", + "group": "string", + "order": 0, + "type": "headline", + "enable_divider": false, + "divider": "top_divider", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ] +} +``` + +
+ +--- + +### `deleteSchema` + +Delete a schema, or a specific version of a schema + +`DELETE /v1/entity/schemas/{slug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity deleteSchema \ + -p slug=contact +``` + +Using positional args for path parameters: + +```bash +epilot entity deleteSchema contact +``` + +With JSONata filter: + +```bash +epilot entity deleteSchema -p slug=contact --jsonata '$' +``` + +--- + +### `getJsonSchema` + +Get formal JSON schema definition draft 2020-12 for the given epilot schema + +`GET /v1/entity/schemas/{slug}/json/schema` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `dereference` | query | boolean | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getJsonSchema \ + -p slug=contact +``` + +Using positional args for path parameters: + +```bash +epilot entity getJsonSchema contact +``` + +With JSONata filter: + +```bash +epilot entity getJsonSchema -p slug=contact --jsonata '$' +``` + +
+Sample Response + +```json +{ + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "_id": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true + }, + "_owners": { + "type": "array", + "readOnly": true, + "items": {} + }, + "_schema": { + "readOnly": true, + "type": "string" + }, + "_title": { + "readOnly": true, + "type": "string" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": {} + }, + "_manifest": { + "type": "array", + "description": "Manifest ID used to create/update the entity", + "items": {} + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "_acl": { + "readOnly": true, + "type": "object", + "description": "Access control list (ACL) for an entity. Defines sharing access to external orgs or users.", + "additionalProperties": true, + "properties": {} + }, + "title": { + "type": "string", + "nullable": true, + "enum": ["Dr.", "Prof.", "Prof. Dr.", null] + }, + "salutation": { + "type": "string", + "nullable": true, + "enum": ["Mr.", "Ms. / Mrs.", "Company", "Contact Person", "Company/Contact Person", "Spouse", "Family", "Ownership", "Assembly", "Other", null] + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "customer_number": { + "type": "string", + "nullable": true + }, + "birthdate": { + "type": "string", + "format": "date", + "nullable": true + }, + "account": { + "type": "object", + "nullable": true, + "properties": {}, + "additionalProperties": true + }, + "address": { + "type": "array", + "nullable": true, + "description": "Addresses as a list of object, the element with index 0 is treated as the primary one.\n", + "items": {} + }, + "email": { + "type": "array", + "nullable": true, + "description": "Email addresses as a list of object, the element with index 0 is treated as the primary one.\n", + "items": {} + }, + "phone": { + "type": "array", + "description": "Phone numbers as a list of object, the element with index 0 is treated as the primary one.\n", + "items": {} + } + }, + "required": ["first_name", "last_name", "_id", "_org", "_owners", "_schema", "_title", "_tags", "_created_at", "_updated_at", "_acl"] +} +``` + +
+ +--- + +### `getSchemaExample` + +Get a full example entity for the given schema + +`GET /v1/entity/schemas/{slug}/json/example` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getSchemaExample \ + -p slug=contact +``` + +Using positional args for path parameters: + +```bash +epilot entity getSchemaExample contact +``` + +With JSONata filter: + +```bash +epilot entity getSchemaExample -p slug=contact --jsonata '$' +``` + +
+Sample Response + +```json +{} +``` + +
+ +--- + +### `getSchemaVersions` + +Get all versions of this schema ordered by the latest versions including drafts. + +`GET /v1/entity/schemas/{slug}/versions` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `versions_from` | query | number | No | | +| `versions_size` | query | number | No | | +| `drafts_from` | query | number | No | | +| `drafts_size` | query | number | No | | +| `fields` | query | string[] | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getSchemaVersions \ + -p slug=contact +``` + +Using positional args for path parameters: + +```bash +epilot entity getSchemaVersions contact +``` + +With JSONata filter: + +```bash +epilot entity getSchemaVersions -p slug=contact --jsonata 'versions' +``` + +
+Sample Response + +```json +{ + "versions": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "string", + "updated_at": "string", + "comment": "string", + "source": {}, + "slug": "contact", + "version": 1, + "blueprint": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "feature_flag": "FF_MY_FEATURE_FLAG", + "enable_setting": ["360_features"], + "name": "Contact", + "plural": "Contacts", + "description": "Example description", + "docs_url": "https://docs.epilot.io/docs/pricing/entities", + "category": "customer_relations", + "published": false, + "draft": false, + "icon": "person", + "title_template": "{{first_name}} {{last_name}}", + "ui_config": {}, + "capabilities": [], + "group_settings": [], + "layout_settings": {}, + "dialog_config": {}, + "attributes": [], + "_purpose": ["string"], + "explicit_search_mappings": {}, + "group_headlines": [] + } + ], + "drafts": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "string", + "updated_at": "string", + "comment": "string", + "source": {}, + "slug": "contact", + "version": 1, + "blueprint": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "feature_flag": "FF_MY_FEATURE_FLAG", + "enable_setting": ["360_features"], + "name": "Contact", + "plural": "Contacts", + "description": "Example description", + "docs_url": "https://docs.epilot.io/docs/pricing/entities", + "category": "customer_relations", + "published": false, + "draft": false, + "icon": "person", + "title_template": "{{first_name}} {{last_name}}", + "ui_config": {}, + "capabilities": [], + "group_settings": [], + "layout_settings": {}, + "dialog_config": {}, + "attributes": [], + "_purpose": ["string"], + "explicit_search_mappings": {}, + "group_headlines": [] + } + ], + "versions_more": true, + "drafts_more": true +} +``` + +
+ +--- + +### `listAvailableCapabilities` + +List available capabilities for schema + +`GET /v1/entity/schemas/{slug}/capabilities/available` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity listAvailableCapabilities \ + -p slug=contact +``` + +Using positional args for path parameters: + +```bash +epilot entity listAvailableCapabilities contact +``` + +With JSONata filter: + +```bash +epilot entity listAvailableCapabilities -p slug=contact --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "customer_messaging", + "title": "Messaging", + "attributes": [], + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "app_id": "123e4567-e89b-12d3-a456-426614174000", + "ui_config": {}, + "ui_hooks": [], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [] + } + ] +} +``` + +
+ +--- + +### `listSchemaBlueprints` + +List canonical versions of all available schemas + +`GET /v1/entity/schemas/blueprints` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity listSchemaBlueprints +``` + +With JSONata filter: + +```bash +epilot entity listSchemaBlueprints --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "string", + "updated_at": "string", + "comment": "string", + "source": {}, + "slug": "contact", + "version": 1, + "blueprint": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "feature_flag": "FF_MY_FEATURE_FLAG", + "enable_setting": ["360_features"], + "name": "Contact", + "plural": "Contacts", + "description": "Example description", + "docs_url": "https://docs.epilot.io/docs/pricing/entities", + "category": "customer_relations", + "published": false, + "draft": false, + "icon": "person", + "title_template": "{{first_name}} {{last_name}}", + "ui_config": {}, + "capabilities": [], + "group_settings": [], + "layout_settings": {}, + "dialog_config": {}, + "attributes": [], + "_purpose": ["string"], + "explicit_search_mappings": {}, + "group_headlines": [] + } + ] +} +``` + +
+ +--- + +### `searchEntities` + +Search for entities. Supports ordering and pagination. [Lucene query syntax](https://www.elastic.co/guide/en/elasticsear + +`POST /v1/entity:search` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity searchEntities +``` + +With request body: + +```bash +epilot entity searchEntities \ + -d '{ + "q": "_schema:contact AND status:active", + "include_scores": false, + "sort": "string", + "from": 0, + "size": 10, + "hydrate": false, + "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"], + "aggs": { + "contact-count-per-tag": { + "terms": { + "field": "_tags.keyword" + } + } + }, + "include_deleted": "false", + "highlight": {}, + "stable_for": 0, + "stable_query_id": "string", + "search_after": ["string"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity searchEntities +``` + +With JSONata filter: + +```bash +epilot entity searchEntities --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 1, + "results": [ + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ], + "aggregations": { + "contact-count-per-tag": { + "doc_count_error_upper_bound": 0, + "sum_other_doc_count": 23, + "buckets": [ + { + "key": "automation", + "doc_count": 108 + }, + { + "key": "primary", + "doc_count": 66 + } + ] + } + }, + "stable_query_id": "string", + "sort_end": [1747905443332, "0.000023312468"] +} +``` + +
+ +--- + +### `listEntities` + +List entities that meet the specified conditions. + +`POST /v1/entity:list` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity listEntities +``` + +With request body: + +```bash +epilot entity listEntities \ + -d '{ + "query": { + "query_string": { + "query": "status:active", + "fields": ["_title", "_tags", "status"], + "default_operator": "OR", + "lenient": true + } + }, + "filter": [ + { + "term": { + "_schema": "contact" + } + }, + { + "terms": { + "status": ["active"] + } + } + ], + "allow_targeting_all_schemas": false, + "sort": "string", + "from": 0, + "size": 10, + "hydrate": false, + "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"], + "aggs": { + "contact-count-per-tag": { + "terms": { + "field": "_tags.keyword" + } + } + }, + "include_deleted": "false", + "include_scores": false, + "highlight": {}, + "stable_for": 0, + "stable_query_id": "string", + "search_after": ["string"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity listEntities +``` + +With JSONata filter: + +```bash +epilot entity listEntities --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 1, + "results": [ + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ], + "aggregations": { + "contact-count-per-tag": { + "doc_count_error_upper_bound": 0, + "sum_other_doc_count": 23, + "buckets": [ + { + "key": "automation", + "doc_count": 108 + }, + { + "key": "primary", + "doc_count": 66 + } + ] + } + }, + "stable_query_id": "string", + "sort_end": [1747905443332, "0.000023312468"] +} +``` + +
+ +--- + +### `queryEntityGraph` + +Traverse an entity relationship graph starting from a seed entity. + +`POST /v1/entity:graph` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity queryEntityGraph +``` + +With request body: + +```bash +epilot entity queryEntityGraph \ + -d '{ + "seed": { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "node_id": "contact" + }, + "graph": { + "nodes": [ + { + "id": "portal_user", + "schema": "portal_user", + "cardinality": "one" + }, + { + "id": "contact", + "schema": "contact", + "cardinality": "one" + } + ], + "edges": [ + { + "from": "portal_user", + "to": "contact" + }, + { + "from": "contact", + "to": "billing_accounts" + } + ] + }, + "hydrate": false +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity queryEntityGraph +``` + +With JSONata filter: + +```bash +epilot entity queryEntityGraph --jsonata 'nodes' +``` + +
+Sample Response + +```json +{ + "nodes": { + "portal_user": ["550e8400-e29b-41d4-a716-446655440001"], + "contact": ["550e8400-e29b-41d4-a716-446655440002"], + "billing_accounts": ["550e8400-e29b-41d4-a716-446655440003", "550e8400-e29b-41d4-a716-446655440004"] + }, + "entityNodes": { + "portal_user": { + "_id": "550e8400-e29b-41d4-a716-446655440001", + "_schema": "portal_user" + }, + "contact": { + "_id": "550e8400-e29b-41d4-a716-446655440002", + "_schema": "contact" + }, + "billing_accounts": [ + { + "_id": "550e8400-e29b-41d4-a716-446655440003", + "_schema": "billing_account" + }, + { + "_id": "550e8400-e29b-41d4-a716-446655440004", + "_schema": "billing_account" + } + ] + }, + "edges": [ + { + "from": "portal_user", + "to": "contact" + }, + { + "from": "contact", + "to": "billing_accounts" + } + ] +} +``` + +
+ +--- + +### `createEntity` + +Creates a new entity using a key. + +`POST /v1/entity/{slug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `activity_id` | query | string (ulid) \| "" \| null | No | Activity to include in event feed | +| `fill_activity` | query | boolean | No | Update the diff and entity for the custom activity included in the query. +Pending state on activity is automatically ended when activity is filled. + | +| `async` | query | boolean | No | Don't wait for updated entity to become available in Search API. Useful for large migrations | +| `validate` | query | boolean | No | When true, enables entity validation against the entity schema. | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity createEntity \ + -p slug=contact +``` + +With request body: + +```bash +epilot entity createEntity \ + -p slug=contact \ + -d '{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity createEntity contact +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity createEntity -p slug=contact +``` + +With JSONata filter: + +```bash +epilot entity createEntity -p slug=contact --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `validateEntity` + +Validates an entity against the schema. + +`POST /v1/entity/{slug}:validate` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | unknown | Yes | Entity Type | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity validateEntity \ + -p slug=price +``` + +With request body: + +```bash +epilot entity validateEntity \ + -p slug=price \ + -d '{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity validateEntity price +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity validateEntity -p slug=price +``` + +With JSONata filter: + +```bash +epilot entity validateEntity -p slug=price --jsonata 'status' +``` + +
+Sample Response + +```json +{ + "status": "success", + "errors": [ + { + "code": "custom", + "params": { + "type": "missing_field" + }, + "path": ["first_name"], + "message": "Invalid input" + } + ] +} +``` + +
+ +--- + +### `validateEntityV2` + +Validates an entity against the schema. + +`POST /v2/entity/{slug}:validate` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | unknown | Yes | Entity Type | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity validateEntityV2 \ + -p slug=price +``` + +With request body: + +```bash +epilot entity validateEntityV2 \ + -p slug=price \ + -d '{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity validateEntityV2 price +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity validateEntityV2 -p slug=price +``` + +With JSONata filter: + +```bash +epilot entity validateEntityV2 -p slug=price --jsonata 'status' +``` + +
+Sample Response + +```json +{ + "status": "success", + "errors": [ + { + "keyword": "string", + "instance_path": "string", + "schema_path": "string", + "params": {}, + "property_name": "string", + "message": "string", + "schema": {}, + "parent_schema": {}, + "data": {} + } + ] +} +``` + +
+ +--- + +### `upsertEntity` + +Create or update an entity using `unique_key` + +`PATCH /v1/entity/{slug}:upsert` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `activity_id` | query | string (ulid) \| "" \| null | No | Activity to include in event feed | +| `fill_activity` | query | boolean | No | Update the diff and entity for the custom activity included in the query. +Pending state on activity is automatically ended when activity is filled. + | +| `dry_run` | query | boolean | No | Dry Run mode = return results but does not perform the operation. | +| `async` | query | boolean | No | Don't wait for updated entity to become available in Search API. Useful for large migrations | +| `validate` | query | boolean | No | When true, enables entity validation against the entity schema. | +| `strict` | query | boolean | No | Strict mode = return 409 if more than one entity is matched | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity upsertEntity \ + -p slug=contact +``` + +With request body: + +```bash +epilot entity upsertEntity \ + -p slug=contact \ + -d '{ + "unique_key": ["_id"], + "entity": { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity upsertEntity contact +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity upsertEntity -p slug=contact +``` + +With JSONata filter: + +```bash +epilot entity upsertEntity -p slug=contact --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `getEntityV2` + +Gets Entity by id. + +`GET /v2/entity/{slug}/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Entity id | +| `slug` | path | string | Yes | Entity Type | +| `hydrate` | query | boolean | No | When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place. | +| `fields` | query | string[] | No | List of entity fields to include in results | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getEntityV2 \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -p slug=contact +``` + +Using positional args for path parameters: + +```bash +epilot entity getEntityV2 123e4567-e89b-12d3-a456-426614174000 contact +``` + +With JSONata filter: + +```bash +epilot entity getEntityV2 -p id=123e4567-e89b-12d3-a456-426614174000 -p slug=contact --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `restoreEntity` + +Restores an entity by id + +`PATCH /v1/entity/{slug}/{id}:restore` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Entity id | +| `slug` | path | string | Yes | Entity Type | +| `activity_id` | query | string (ulid) \| "" \| null | No | Activity to include in event feed | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity restoreEntity \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -p slug=contact \ + -d '{}' +``` + +Using positional args for path parameters: + +```bash +epilot entity restoreEntity 123e4567-e89b-12d3-a456-426614174000 contact +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity restoreEntity -p id=123e4567-e89b-12d3-a456-426614174000 -p slug=contact +``` + +With JSONata filter: + +```bash +epilot entity restoreEntity -p id=123e4567-e89b-12d3-a456-426614174000 -p slug=contact --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `reindexEntity` + +Triggers a reindex for the Entity for search. + +`POST /v1/entity/{slug}/{id}:reindex` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Entity id | +| `slug` | path | string | Yes | Entity Type | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity reindexEntity \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -p slug=contact \ + -d '{}' +``` + +Using positional args for path parameters: + +```bash +epilot entity reindexEntity 123e4567-e89b-12d3-a456-426614174000 contact +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity reindexEntity -p id=123e4567-e89b-12d3-a456-426614174000 -p slug=contact +``` + +With JSONata filter: + +```bash +epilot entity reindexEntity -p id=123e4567-e89b-12d3-a456-426614174000 -p slug=contact --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `getEntity` + +Gets Entity and relations by id. + +`GET /v1/entity/{slug}/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Entity id | +| `slug` | path | string | Yes | Entity Type | +| `hydrate` | query | boolean | No | When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getEntity \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -p slug=contact +``` + +Using positional args for path parameters: + +```bash +epilot entity getEntity 123e4567-e89b-12d3-a456-426614174000 contact +``` + +With JSONata filter: + +```bash +epilot entity getEntity -p id=123e4567-e89b-12d3-a456-426614174000 -p slug=contact --jsonata 'entity._title' +``` + +
+Sample Response + +```json +{ + "entity": { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + }, + "relations": [ + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ] +} +``` + +
+ +--- + +### `updateEntity` + +Updates an Entity + +`PUT /v1/entity/{slug}/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `activity_id` | query | string (ulid) \| "" \| null | No | Activity to include in event feed | +| `fill_activity` | query | boolean | No | Update the diff and entity for the custom activity included in the query. +Pending state on activity is automatically ended when activity is filled. + | +| `async` | query | boolean | No | Don't wait for updated entity to become available in Search API. Useful for large migrations | +| `validate` | query | boolean | No | When true, enables entity validation against the entity schema. | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity updateEntity \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot entity updateEntity \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity updateEntity contact 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity updateEntity -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity updateEntity -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `patchEntity` + +Partially updates an entity with the passed in entity data. + +`PATCH /v1/entity/{slug}/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `activity_id` | query | string (ulid) \| "" \| null | No | Activity to include in event feed | +| `fill_activity` | query | boolean | No | Update the diff and entity for the custom activity included in the query. +Pending state on activity is automatically ended when activity is filled. + | +| `dry_run` | query | boolean | No | Dry Run mode = return results but does not perform the operation. | +| `async` | query | boolean | No | Don't wait for updated entity to become available in Search API. Useful for large migrations | +| `validate` | query | boolean | No | When true, enables entity validation against the entity schema. | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity patchEntity \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot entity patchEntity \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity patchEntity contact 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity patchEntity -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity patchEntity -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `deleteEntity` + +Deletes an Entity + +`DELETE /v1/entity/{slug}/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `activity_id` | query | string (ulid) \| "" \| null | No | Activity to include in event feed | +| `purge` | query | boolean | No | Permanently deletes the entity when set to `true` | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity deleteEntity \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot entity deleteEntity contact 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity deleteEntity -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `autocomplete` + +Autocomplete entity attributes + +`GET /v1/entity:autocomplete` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `input` | query | string | No | Input to autocomplete | +| `attribute` | query | string | Yes | Autocomplete attribute | +| `slug` | query | string | No | Limit results to entity schema | +| `size` | query | number | No | Maximum number of results to return | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity autocomplete \ + -p attribute=_tags +``` + +With JSONata filter: + +```bash +epilot entity autocomplete -p attribute=_tags --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 1, + "results": ["value"] +} +``` + +
+ +--- + +### `wipeAllEntities` + +Creates a request to queue the deletion of all entities in the system. This is a destructive operation and should only b + +`POST /v1/entity:wipeAllEntities` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity wipeAllEntities \ + -d '{"schemas":["contact"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity wipeAllEntities +``` + +With JSONata filter: + +```bash +epilot entity wipeAllEntities --jsonata '$' +``` + +--- + +### `createActivity` + +Create an activity that can be displayed in activity feeds. + +`POST /v1/entity/activity` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `entities` | query | string (uuid)[] | No | Comma-separated list of entities which the activity primarily concerns | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity createActivity +``` + +With request body: + +```bash +epilot entity createActivity \ + -d '{ + "type": "string", + "title": "My custom activity", + "message": "{{caller}} did something with {{entity payload.entity.id}}.", + "payload": { + "entity": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "schema": "contact" + } + }, + "pending": false +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity createActivity +``` + +With JSONata filter: + +```bash +epilot entity createActivity --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "01F130Q52Q6MWSNS8N2AVXV4JN", + "timestamp": "1970-01-01T00:00:00.000Z", + "type": "string", + "title": "My custom activity", + "message": "{{caller}} did something with {{entity payload.entity.id}}.", + "payload": { + "entity": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "schema": "contact" + } + }, + "pending": false, + "caller": { + "EpilotAuth": { + "token": { + "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce", + "cognito:groups": ["Administrator"], + "cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role", + "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D", + "custom:ivy_org_id": "739224", + "cognito:username": "n.ahmad@epilot.cloud", + "custom:ivy_user_id": "10006129", + "cognito:roles": ["arn:aws:iam::912468240823:role/base-administrator-role"], + "aud": "6e0jbdnger7nmoktaaflarue1l", + "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75", + "token_use": "id", + "auth_time": 1614333023, + "exp": 1614336623, + "iat": 1614333023, + "email": "n.ahmad@epilot.cloud" + } + } + } +} +``` + +
+ +--- + +### `getActivity` + +Get activity by id + +`GET /v1/entity/activity/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (ulid) | Yes | Activity Id | +| `operations_size` | query | number | No | Maximum number of operations to include in response (default: 10) + | +| `operations_from` | query | number | No | Pagination offset for operations + | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getActivity \ + -p id=01F130Q52Q6MWSNS8N2AVXV4JN +``` + +Using positional args for path parameters: + +```bash +epilot entity getActivity 01F130Q52Q6MWSNS8N2AVXV4JN +``` + +With JSONata filter: + +```bash +epilot entity getActivity -p id=01F130Q52Q6MWSNS8N2AVXV4JN --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "01F130Q52Q6MWSNS8N2AVXV4JN", + "timestamp": "1970-01-01T00:00:00.000Z", + "type": "string", + "title": "My custom activity", + "message": "{{caller}} did something with {{entity payload.entity.id}}.", + "payload": { + "entity": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "schema": "contact" + } + }, + "pending": false, + "caller": { + "EpilotAuth": { + "token": {} + } + }, + "operations_total": 1, + "operations": [ + { + "entity": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "org": "123", + "activity_id": "01F130Q52Q6MWSNS8N2AVXV4JN", + "activity_type": "string", + "operation": "createEntity", + "params": {}, + "payload": {}, + "diff": {} + } + ] +} +``` + +
+ +--- + +### `attachActivity` + +Attach existing activity to entity activity feeds + +`POST /v1/entity/activity/{id}:attach` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (ulid) | Yes | Activity Id | +| `entities` | query | string (uuid)[] | No | Comma-separated list of entities which the activity primarily concerns | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity attachActivity \ + -p id=01F130Q52Q6MWSNS8N2AVXV4JN +``` + +Using positional args for path parameters: + +```bash +epilot entity attachActivity 01F130Q52Q6MWSNS8N2AVXV4JN +``` + +With JSONata filter: + +```bash +epilot entity attachActivity -p id=01F130Q52Q6MWSNS8N2AVXV4JN --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "01F130Q52Q6MWSNS8N2AVXV4JN", + "timestamp": "1970-01-01T00:00:00.000Z", + "type": "string", + "title": "My custom activity", + "message": "{{caller}} did something with {{entity payload.entity.id}}.", + "payload": { + "entity": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "schema": "contact" + } + }, + "pending": false, + "caller": { + "EpilotAuth": { + "token": { + "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce", + "cognito:groups": ["Administrator"], + "cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role", + "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D", + "custom:ivy_org_id": "739224", + "cognito:username": "n.ahmad@epilot.cloud", + "custom:ivy_user_id": "10006129", + "cognito:roles": ["arn:aws:iam::912468240823:role/base-administrator-role"], + "aud": "6e0jbdnger7nmoktaaflarue1l", + "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75", + "token_use": "id", + "auth_time": 1614333023, + "exp": 1614336623, + "iat": 1614333023, + "email": "n.ahmad@epilot.cloud" + } + } + } +} +``` + +
+ +--- + +### `getEntityActivityFeed` + +Get activity feed for an entity + +`GET /v1/entity/{slug}/{id}/activity` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `after` | query | string (date-time) | No | Get activities strictly after this timestamp. Cannot be used with 'before', 'start_date', 'end_date', or 'preset_range'. | +| `before` | query | string (date-time) | No | Get activities strictly before this timestamp. Cannot be used with 'after', 'start_date', 'end_date', or 'preset_range'. | +| `start_date` | query | string (date-time) | No | The inclusive start timestamp for a date range filter. Requires 'end_date' to also be provided. Cannot be used with 'before', 'after', or 'preset_range'. | +| `end_date` | query | string (date-time) | No | The inclusive end timestamp for a date range filter. Requires 'start_date' to also be provided. Cannot be used with 'before', 'after', or 'preset_range'. | +| `preset_range` | query | "today" \| "this_week" \| "last_week" | No | Get activities within a predefined date range (e.g., 'today', 'last_week'). Cannot be used with 'before', 'after', 'start_date', or 'end_date'. | +| `from` | query | number | No | Starting page number | +| `size` | query | number | No | max number of results to return | +| `type` | query | string[] | No | Filter by activity type(s) | +| `include_relations` | query | boolean | No | Include activities from related entities | +| `exclude_activity_groups` | query | string | No | Exclude all activity types that are part of an activity group from results | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getEntityActivityFeed \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot entity getEntityActivityFeed contact 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity getEntityActivityFeed -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "total": 1, + "results": [ + { + "_id": "01F130Q52Q6MWSNS8N2AVXV4JN", + "timestamp": "1970-01-01T00:00:00.000Z", + "type": "string", + "title": "My custom activity", + "message": "{{caller}} did something with {{entity payload.entity.id}}.", + "payload": {}, + "pending": false, + "caller": {}, + "operations_total": 1, + "operations": [] + } + ] +} +``` + +
+ +--- + +### `getRelations` + +Returns 1st level direct relations for an entity. + +`GET /v1/entity/{slug}/{id}/relations` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `hydrate` | query | boolean | No | When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place. | +| `include_reverse` | query | boolean | No | When true, includes reverse relations in response (other entities pointing to this entity) | +| `from` | query | number | No | Starting page number | +| `size` | query | number | No | Number of results to return per page | +| `include_schemas` | query | string[] | No | Filter results to only include schemas | +| `exclude_schemas` | query | string[] | No | Filter results to exclude schemas | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getRelations \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot entity getRelations contact 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity getRelations -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "org_id": "string", + "_schema": "contact", + "attribute": "string", + "_tags": ["string"], + "reverse": true + }, + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } +] +``` + +
+ +--- + +### `addRelations` + +Relates one or more entities to parent entity by adding items to a relation attribute + +`POST /v1/entity/{slug}/{id}/relations` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `async` | query | boolean | No | Don't wait for updated entity to become available in Search API. Useful for large migrations | +| `activity_id` | query | string (ulid) \| "" \| null | No | Activity to include in event feed | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity addRelations \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot entity addRelations \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '[ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "org_id": "string", + "_schema": "contact", + "attribute": "string", + "_tags": ["string"], + "reverse": true + } +]' +``` + +Using positional args for path parameters: + +```bash +epilot entity addRelations contact 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity addRelations -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity addRelations -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'entity_id' +``` + +
+Sample Response + +```json +{ + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "org_id": "string", + "_schema": "contact", + "attribute": "string", + "_tags": ["string"], + "reverse": true +} +``` + +
+ +--- + +### `removeRelations` + +Disassociate one or more entities to parent entity by removing items to a relation attribute + +`DELETE /v1/entity/{slug}/{id}/relations` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `async` | query | boolean | No | Don't wait for updated entity to become available in Search API. Useful for large migrations | +| `activity_id` | query | string (ulid) \| "" \| null | No | Activity to include in event feed | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity removeRelations \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot entity removeRelations \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '[ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "org_id": "string", + "_schema": "contact", + "attribute": "string", + "_tags": ["string"], + "reverse": true + } +]' +``` + +Using positional args for path parameters: + +```bash +epilot entity removeRelations contact 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity removeRelations -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity removeRelations -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `getRelationsV2` + +Returns 1st level direct relations for an entity with pagination. + +`GET /v2/entity/{slug}/{id}/relations` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `hydrate` | query | boolean | No | When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place. | +| `query` | query | string | No | Input to filter search results | +| `include_reverse` | query | boolean | No | When true, includes reverse relations in response (other entities pointing to this entity) | +| `from` | query | number | No | Starting page number | +| `size` | query | number | No | Number of results to return per page | +| `fields` | query | string[] | No | List of entity fields to include in results | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getRelationsV2 \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot entity getRelationsV2 contact 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity getRelationsV2 -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'hits[0]' +``` + +
+Sample Response + +```json +{ + "hits": 1, + "relations": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "org_id": "string", + "_schema": "contact", + "attribute": "string", + "_tags": ["string"], + "reverse": true + }, + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ] +} +``` + +
+ +--- + +### `getRelationsV3` + +Returns 1st level direct relations for an entity with pagination. + +`GET /v3/entity/{slug}/{id}/relations` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `hydrate` | query | boolean | No | When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place. | +| `include_reverse` | query | boolean | No | When true, includes reverse relations in response (other entities pointing to this entity) +*It gets overriden by mode query parameter.* + | +| `from` | query | number | No | Starting page number | +| `size` | query | number | No | Number of results to return per page | +| `include_schemas` | query | string[] | No | Filter results to only include schemas | +| `exclude_schemas` | query | string[] | No | Filter results to exclude schemas | +| `mode` | query | "direct" \| "reverse" \| "both" | No | Options to determine how relations will be included in the result. +*It overrides the include_reverse query param.* +Explanation of possible options: +- direct: include relations to which the searched en | +| `fields` | query | string[] | No | List of entity fields to include in results | +| `include_deleted` | query | "true" \| "false" \| "only" | No | Whether to include relations to/from deleted entities +- `true`: include relations to/from deleted entities +- `false`: exclude relations to/from deleted entities (default) +- `only`: include only relati | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getRelationsV3 \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot entity getRelationsV3 contact 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity getRelationsV3 -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'hits[0]' +``` + +
+Sample Response + +```json +{ + "hits": 1, + "relations": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "org_id": "string", + "_schema": "contact", + "attribute": "string", + "_tags": ["string"], + "reverse": true + }, + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "contact", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_acl": { + "view": ["org:456", "org:789"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ] +} +``` + +
+ +--- + +### `getRelatedEntitiesCount` + +Returns the amount of unique related entities for an entity - includes direct and reverse relations. + +`GET /v2/entity/{slug}/{id}/relations/count` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `exclude_schemas` | query | string[] | No | Filter results to exclude schemas | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getRelatedEntitiesCount \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot entity getRelatedEntitiesCount contact 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity getRelatedEntitiesCount -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'hits[0]' +``` + +
+Sample Response + +```json +{ + "hits": 1 +} +``` + +
+ +--- + +### `updateRelation` + +Updates an existing relation between two entities. + +`PUT /v1/entity/{slug}/{id}/relations/{attribute}/{entity_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `attribute` | path | string | Yes | The attribute that express meaning | +| `entity_id` | path | string | Yes | The attribute that express meaning | +| `async` | query | boolean | No | Don't wait for updated entity to become available in Search API. Useful for large migrations | +| `activity_id` | query | string (ulid) \| "" \| null | No | Activity to include in event feed | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity updateRelation \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -p attribute=example \ + -p entity_id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"_tags":["string"]}' +``` + +Using positional args for path parameters: + +```bash +epilot entity updateRelation contact 123e4567-e89b-12d3-a456-426614174000 example 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity updateRelation -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 -p attribute=example -p entity_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity updateRelation -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 -p attribute=example -p entity_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'entity_id' +``` + +
+Sample Response + +```json +{ + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "org_id": "string", + "_schema": "contact", + "attribute": "string", + "_tags": ["string"], + "reverse": true +} +``` + +
+ +--- + +### `deleteRelation` + +Removes relation between two entities + +`DELETE /v1/entity/{slug}/{id}/relations/{attribute}/{entity_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `id` | path | string (uuid) | Yes | Entity id | +| `attribute` | path | string | Yes | The attribute that express meaning | +| `entity_id` | path | string | Yes | The attribute that express meaning | +| `async` | query | boolean | No | Don't wait for updated entity to become available in Search API. Useful for large migrations | +| `activity_id` | query | string (ulid) \| "" \| null | No | Activity to include in event feed | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity deleteRelation \ + -p slug=contact \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -p attribute=example \ + -p entity_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot entity deleteRelation contact 123e4567-e89b-12d3-a456-426614174000 example 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity deleteRelation -p slug=contact -p id=123e4567-e89b-12d3-a456-426614174000 -p attribute=example -p entity_id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `exportEntities` + +Export entity data in a CSV-format. The export will export data as close as possible to what is visible on Entity UI tab + +`POST /v1/entity:export` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `job_id` | query | string | No | Export Job Id to get the result | +| `is_template` | query | boolean | No | Pass 'true' to generate import template | +| `language` | query | string | No | Export headers translation language | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity exportEntities +``` + +With request body: + +```bash +epilot entity exportEntities \ + -d '{ + "q": "_schema:contact AND status:active", + "include_scores": false, + "sort": "string", + "from": 0, + "size": 10, + "hydrate": false, + "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"], + "aggs": { + "contact-count-per-tag": { + "terms": { + "field": "_tags.keyword" + } + } + }, + "include_deleted": "false", + "highlight": {}, + "stable_for": 0, + "stable_query_id": "string", + "search_after": ["string"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity exportEntities +``` + +With JSONata filter: + +```bash +epilot entity exportEntities --jsonata '$' +``` + +--- + +### `importEntities` + +This endpoint enables the import of entities into the platform. + +`POST /v1/entity:import` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `job_id` | query | string | No | The ID of the import job. This ID is used to track the progress and fetch the result of the import operation. | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity importEntities \ + -d '{"S3Reference":{"bucket":"my-bucket","key":"imports/my-import.json"},"schema":"contact"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity importEntities +``` + +With JSONata filter: + +```bash +epilot entity importEntities --jsonata '$' +``` + +--- + +### `listSavedViews` + +Get the Saved Views based on the schema + +`GET /v1/entity/views` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | query | string | No | Return views belonging to this schema | +| `sort` | query | string | No | The sort key to use if present | +| `from` | query | number | No | | +| `size` | query | number | No | Number of saved views to return | +| `fields` | query | string[] | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity listSavedViews +``` + +With JSONata filter: + +```bash +epilot entity listSavedViews --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 1, + "results": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "string", + "updated_at": "string", + "slug": ["contact"], + "name": "View listing German", + "org": "66", + "shared": true, + "isFavoritedBy": ["11701"], + "created_by": { + "user_id": "10598" + }, + "ui_config": { + "filters": { + "customer_name": "suresh test", + "_tags": "360" + }, + "table_layout": { + "opportunity": { + "page": 1, + "sort": "_created_at:desc", + "pageSize": 25, + "columnSettings": [] + } + } + }, + "shared_with": ["112233"] + } + ] +} +``` + +
+ +--- + +### `createSavedView` + +Creates a new saved view + +`POST /v1/entity/view` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity createSavedView +``` + +With request body: + +```bash +epilot entity createSavedView \ + -d '{ + "slug": ["contact"], + "name": "View listing German", + "org": "66", + "shared": true, + "isFavoritedBy": ["11701"], + "created_by": { + "user_id": "10598" + }, + "ui_config": { + "filters": { + "customer_name": "suresh test", + "_tags": "360" + }, + "table_layout": { + "opportunity": { + "page": 1, + "sort": "_created_at:desc", + "pageSize": 25, + "columnSettings": [] + } + } + }, + "shared_with": ["112233"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity createSavedView +``` + +With JSONata filter: + +```bash +epilot entity createSavedView --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "string", + "updated_at": "string", + "slug": ["contact"], + "name": "View listing German", + "org": "66", + "shared": true, + "isFavoritedBy": ["11701"], + "created_by": { + "user_id": "10598" + }, + "ui_config": { + "filters": { + "customer_name": "suresh test", + "_tags": "360" + }, + "table_layout": { + "opportunity": { + "page": 1, + "sort": "_created_at:desc", + "pageSize": 25, + "columnSettings": [] + } + } + }, + "shared_with": ["112233"] +} +``` + +
+ +--- + +### `getSavedView` + +Gets Saved View configuration by id. + +`GET /v1/entity/view/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | View id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getSavedView \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot entity getSavedView 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity getSavedView -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "string", + "updated_at": "string", + "slug": ["contact"], + "name": "View listing German", + "org": "66", + "shared": true, + "isFavoritedBy": ["11701"], + "created_by": { + "user_id": "10598" + }, + "ui_config": { + "filters": { + "customer_name": "suresh test", + "_tags": "360" + }, + "table_layout": { + "opportunity": { + "page": 1, + "sort": "_created_at:desc", + "pageSize": 25, + "columnSettings": [] + } + } + }, + "shared_with": ["112233"] +} +``` + +
+ +--- + +### `updateSavedView` + +Updates a saved view + +`PUT /v1/entity/view/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | View id | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity updateSavedView \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot entity updateSavedView \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "string", + "updated_at": "string", + "slug": ["contact"], + "name": "View listing German", + "org": "66", + "shared": true, + "isFavoritedBy": ["11701"], + "created_by": { + "user_id": "10598" + }, + "ui_config": { + "filters": { + "customer_name": "suresh test", + "_tags": "360" + }, + "table_layout": { + "opportunity": { + "page": 1, + "sort": "_created_at:desc", + "pageSize": 25, + "columnSettings": [] + } + } + }, + "shared_with": ["112233"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity updateSavedView 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity updateSavedView -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity updateSavedView -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "string", + "updated_at": "string", + "slug": ["contact"], + "name": "View listing German", + "org": "66", + "shared": true, + "isFavoritedBy": ["11701"], + "created_by": { + "user_id": "10598" + }, + "ui_config": { + "filters": { + "customer_name": "suresh test", + "_tags": "360" + }, + "table_layout": { + "opportunity": { + "page": 1, + "sort": "_created_at:desc", + "pageSize": 25, + "columnSettings": [] + } + } + }, + "shared_with": ["112233"] +} +``` + +
+ +--- + +### `patchSavedView` + +Partially updates a saved view with the provided payload. If an updated_at is passed and the server contains a newer ver + +`PATCH /v1/entity/view/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | View id | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity patchSavedView \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot entity patchSavedView \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "slug": ["contact"], + "name": "View listing German", + "org": "66", + "shared": true, + "isFavoritedBy": ["11701"], + "created_by": { + "user_id": "10598" + }, + "ui_config": { + "filters": { + "customer_name": "suresh test", + "_tags": "360" + }, + "table_layout": { + "opportunity": { + "page": 1, + "sort": "_created_at:desc", + "pageSize": 25, + "columnSettings": [] + } + } + }, + "shared_with": ["112233"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity patchSavedView 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity patchSavedView -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity patchSavedView -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "string", + "updated_at": "string", + "slug": ["contact"], + "name": "View listing German", + "org": "66", + "shared": true, + "isFavoritedBy": ["11701"], + "created_by": { + "user_id": "10598" + }, + "ui_config": { + "filters": { + "customer_name": "suresh test", + "_tags": "360" + }, + "table_layout": { + "opportunity": { + "page": 1, + "sort": "_created_at:desc", + "pageSize": 25, + "columnSettings": [] + } + } + }, + "shared_with": ["112233"] +} +``` + +
+ +--- + +### `deleteSavedView` + +Deletes a saved view + +`DELETE /v1/entity/view/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | View id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity deleteSavedView \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot entity deleteSavedView 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity deleteSavedView -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `listFavoriteViewsForUser` + +Get the Favorite Saved Views for user based on the schema + +`GET /v1/entity/views/favorites` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity listFavoriteViewsForUser +``` + +With JSONata filter: + +```bash +epilot entity listFavoriteViewsForUser --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "string", + "updated_at": "string", + "slug": ["contact"], + "name": "View listing German", + "org": "66", + "shared": true, + "isFavoritedBy": ["11701"], + "created_by": { + "user_id": "10598" + }, + "ui_config": { + "filters": { + "customer_name": "suresh test", + "_tags": "360" + }, + "table_layout": { + "opportunity": { + "page": 1, + "sort": "_created_at:desc", + "pageSize": 25, + "columnSettings": [] + } + } + }, + "shared_with": ["112233"] + } + ] +} +``` + +
+ +--- + +### `listTaxonomies` + +List taxonomies in an organization + +`GET /v1/entity/taxonomies` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `include_disabled` | query | boolean | No | Include disabled taxonomies | +| `type` | query | "entity" \| "relation" | No | Type of taxonomy to include | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity listTaxonomies +``` + +With JSONata filter: + +```bash +epilot entity listTaxonomies --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "slug": "purpose", + "name": "Purpose", + "plural": "Purposes", + "kind": "system", + "type": "entity", + "icon": "purpose", + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "deleted_at": "1970-01-01T00:00:00.000Z", + "created_by": "10598", + "enabled": true, + "order": 10, + "enabled_locations": ["account", "string"] + } + ] +} +``` + +
+ +--- + +### `createTaxonomy` + +Create a new taxonomy + +`POST /v1/entity/taxonomies` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity createTaxonomy +``` + +With request body: + +```bash +epilot entity createTaxonomy \ + -d '{ + "slug": "purpose", + "name": "Purpose", + "plural": "Purposes", + "kind": "system", + "type": "entity", + "icon": "purpose", + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "deleted_at": "1970-01-01T00:00:00.000Z", + "created_by": "10598", + "enabled": true, + "order": 10, + "enabled_locations": ["account", "string"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity createTaxonomy +``` + +With JSONata filter: + +```bash +epilot entity createTaxonomy --jsonata 'slug' +``` + +
+Sample Response + +```json +{ + "slug": "purpose", + "name": "Purpose", + "plural": "Purposes", + "kind": "system", + "type": "entity", + "icon": "purpose", + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "deleted_at": "1970-01-01T00:00:00.000Z", + "created_by": "10598", + "enabled": true, + "order": 10, + "enabled_locations": ["account", "string"] +} +``` + +
+ +--- + +### `getTaxonomy` + +Get taxonomy by slug + +`GET /v1/entity/taxonomies/{taxonomySlug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `taxonomySlug` | path | string | Yes | Taxonomy slug | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getTaxonomy \ + -p taxonomySlug=example +``` + +Using positional args for path parameters: + +```bash +epilot entity getTaxonomy example +``` + +With JSONata filter: + +```bash +epilot entity getTaxonomy -p taxonomySlug=example --jsonata 'slug' +``` + +
+Sample Response + +```json +{ + "slug": "purpose", + "name": "Purpose", + "plural": "Purposes", + "kind": "system", + "type": "entity", + "icon": "purpose", + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "deleted_at": "1970-01-01T00:00:00.000Z", + "created_by": "10598", + "enabled": true, + "order": 10, + "enabled_locations": ["account", "string"] +} +``` + +
+ +--- + +### `updateTaxonomy` + +Update a taxonomy + +`PUT /v1/entity/taxonomies/{taxonomySlug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `taxonomySlug` | path | string | Yes | Taxonomy slug | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity updateTaxonomy \ + -p taxonomySlug=example +``` + +With request body: + +```bash +epilot entity updateTaxonomy \ + -p taxonomySlug=example \ + -d '{ + "slug": "purpose", + "name": "Purpose", + "plural": "Purposes", + "kind": "system", + "type": "entity", + "icon": "purpose", + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "deleted_at": "1970-01-01T00:00:00.000Z", + "created_by": "10598", + "enabled": true, + "order": 10, + "enabled_locations": ["account", "string"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity updateTaxonomy example +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity updateTaxonomy -p taxonomySlug=example +``` + +With JSONata filter: + +```bash +epilot entity updateTaxonomy -p taxonomySlug=example --jsonata 'slug' +``` + +
+Sample Response + +```json +{ + "slug": "purpose", + "name": "Purpose", + "plural": "Purposes", + "kind": "system", + "type": "entity", + "icon": "purpose", + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "deleted_at": "1970-01-01T00:00:00.000Z", + "created_by": "10598", + "enabled": true, + "order": 10, + "enabled_locations": ["account", "string"] +} +``` + +
+ +--- + +### `deleteTaxonomy` + +Delete a taxonomy + +`DELETE /v1/entity/taxonomies/{taxonomySlug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `taxonomySlug` | path | string | Yes | Taxonomy slug | +| `permanent` | query | boolean | No | ⚠️ NOT IMPLEMENTED - If true, the taxonomy will be permanently deleted | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity deleteTaxonomy \ + -p taxonomySlug=example +``` + +Using positional args for path parameters: + +```bash +epilot entity deleteTaxonomy example +``` + +With JSONata filter: + +```bash +epilot entity deleteTaxonomy -p taxonomySlug=example --jsonata '$' +``` + +--- + +### `updateClassificationsForTaxonomy` + +Update the classifications for a taxonomy + +`POST /v1/entity/taxonomies/{taxonomySlug}/classifications` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `taxonomySlug` | path | string | Yes | Taxonomy slug | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity updateClassificationsForTaxonomy \ + -p taxonomySlug=example +``` + +With request body: + +```bash +epilot entity updateClassificationsForTaxonomy \ + -p taxonomySlug=example \ + -d '{ + "create": [ + { + "id": "taxonomy-slug:classification-slug", + "slug": "wallbox-pv", + "name": "Wallbox PV", + "parents": ["taxonomy-slug:classification-slug"], + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "archived": false, + "starred": false, + "enabled_locations": ["account", "string"], + "enabled_purposes": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ], + "update": [ + { + "id": "taxonomy-slug:classification-slug", + "slug": "wallbox-pv", + "name": "Wallbox PV", + "parents": ["taxonomy-slug:classification-slug"], + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "archived": false, + "starred": false, + "enabled_locations": ["account", "string"], + "enabled_purposes": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ], + "delete": ["taxonomy-slug:classification-slug", "taxonomy-slug:classification-slug"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity updateClassificationsForTaxonomy example +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity updateClassificationsForTaxonomy -p taxonomySlug=example +``` + +With JSONata filter: + +```bash +epilot entity updateClassificationsForTaxonomy -p taxonomySlug=example --jsonata 'created' +``` + +
+Sample Response + +```json +{ + "created": [ + { + "id": "taxonomy-slug:classification-slug", + "slug": "wallbox-pv", + "name": "Wallbox PV", + "parents": ["taxonomy-slug:classification-slug"], + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "archived": false, + "starred": false, + "enabled_locations": ["account", "string"], + "enabled_purposes": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ], + "updated": [ + { + "id": "taxonomy-slug:classification-slug", + "slug": "wallbox-pv", + "name": "Wallbox PV", + "parents": ["taxonomy-slug:classification-slug"], + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "archived": false, + "starred": false, + "enabled_locations": ["account", "string"], + "enabled_purposes": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ], + "deleted": {} +} +``` + +
+ +--- + +### `createTaxonomyClassification` + +Create a new classification for a taxonomy + +`POST /v2/entity/taxonomies/classifications` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity createTaxonomyClassification +``` + +With request body: + +```bash +epilot entity createTaxonomyClassification \ + -d '{ + "id": "taxonomy-slug:classification-slug", + "slug": "wallbox-pv", + "name": "Wallbox PV", + "parents": ["taxonomy-slug:classification-slug"], + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "archived": false, + "starred": false, + "enabled_locations": ["account", "string"], + "enabled_purposes": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity createTaxonomyClassification +``` + +With JSONata filter: + +```bash +epilot entity createTaxonomyClassification --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "taxonomy-slug:classification-slug", + "slug": "wallbox-pv", + "name": "Wallbox PV", + "parents": ["taxonomy-slug:classification-slug"], + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "archived": false, + "starred": false, + "enabled_locations": ["account", "string"], + "enabled_purposes": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `getTaxonomyClassification` + +Get a classification for a taxonomy by slug + +`GET /v2/entity/taxonomies/classifications/{classificationSlug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `classificationSlug` | path | string | Yes | Taxonomy Classification slug | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getTaxonomyClassification \ + -p classificationSlug=purpose: +``` + +Using positional args for path parameters: + +```bash +epilot entity getTaxonomyClassification purpose: +``` + +With JSONata filter: + +```bash +epilot entity getTaxonomyClassification -p classificationSlug=purpose: --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "taxonomy-slug:classification-slug", + "slug": "wallbox-pv", + "name": "Wallbox PV", + "parents": ["taxonomy-slug:classification-slug"], + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "archived": false, + "starred": false, + "enabled_locations": ["account", "string"], + "enabled_purposes": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `updateTaxonomyClassification` + +Update a classification for a taxonomy + +`PUT /v2/entity/taxonomies/classifications/{classificationSlug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `classificationSlug` | path | string | Yes | Taxonomy Classification slug | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity updateTaxonomyClassification \ + -p classificationSlug=purpose: +``` + +With request body: + +```bash +epilot entity updateTaxonomyClassification \ + -p classificationSlug=purpose: \ + -d '{ + "id": "taxonomy-slug:classification-slug", + "slug": "wallbox-pv", + "name": "Wallbox PV", + "parents": ["taxonomy-slug:classification-slug"], + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "archived": false, + "starred": false, + "enabled_locations": ["account", "string"], + "enabled_purposes": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity updateTaxonomyClassification purpose: +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity updateTaxonomyClassification -p classificationSlug=purpose: +``` + +With JSONata filter: + +```bash +epilot entity updateTaxonomyClassification -p classificationSlug=purpose: --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "taxonomy-slug:classification-slug", + "slug": "wallbox-pv", + "name": "Wallbox PV", + "parents": ["taxonomy-slug:classification-slug"], + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "archived": false, + "starred": false, + "enabled_locations": ["account", "string"], + "enabled_purposes": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `deleteTaxonomyClassification` + +Delete a classification for a taxonomy + +`DELETE /v2/entity/taxonomies/classifications/{classificationSlug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `classificationSlug` | path | string | Yes | Taxonomy Classification slug | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity deleteTaxonomyClassification \ + -p classificationSlug=purpose: +``` + +Using positional args for path parameters: + +```bash +epilot entity deleteTaxonomyClassification purpose: +``` + +With JSONata filter: + +```bash +epilot entity deleteTaxonomyClassification -p classificationSlug=purpose: --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "taxonomy-slug:classification-slug", + "slug": "wallbox-pv", + "name": "Wallbox PV", + "parents": ["taxonomy-slug:classification-slug"], + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "archived": false, + "starred": false, + "enabled_locations": ["account", "string"], + "enabled_purposes": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `taxonomyAutocomplete` + +Taxonomies autocomplete + +`GET /v1/entity/taxonomies/{taxonomySlug}:autocomplete` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `taxonomySlug` | path | string | Yes | Taxonomy slug | +| `query` | query | string | No | Input to autocomplete | +| `size` | query | number | No | Minimum number of results to return | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity taxonomyAutocomplete \ + -p taxonomySlug=example +``` + +Using positional args for path parameters: + +```bash +epilot entity taxonomyAutocomplete example +``` + +With JSONata filter: + +```bash +epilot entity taxonomyAutocomplete -p taxonomySlug=example --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "taxonomy-slug:classification-slug", + "slug": "wallbox-pv", + "name": "Wallbox PV", + "parents": ["taxonomy-slug:classification-slug"], + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "archived": false, + "starred": false, + "enabled_locations": ["account", "string"], + "enabled_purposes": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ] +} +``` + +
+ +--- + +### `taxonomiesClassificationsSearch` + +List taxonomy classifications in an organization based on taxonomy slug + +`POST /v1/entity/taxonomies/classifications:search` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `taxonomySlug` | query | string \| string[] | No | The taxonomy slug(s) to search within. When provided with multiple taxonomy slugs, the search will be performed across all the provided taxonomies. + | +| `query` | query | string | No | The label names to search for (lowercase insensitive) | +| `archived` | query | boolean | No | Filter by archived status. Deprecated. Use `include_archived` instead. | +| `include_archived` | query | "true" \| "false" \| "only" | No | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity taxonomiesClassificationsSearch \ + -d '{"classificationIds":["taxonomy-slug:classification-slug",{"pattern":"taxonomy-slug:*"}]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity taxonomiesClassificationsSearch +``` + +With JSONata filter: + +```bash +epilot entity taxonomiesClassificationsSearch --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "taxonomy-slug:classification-slug", + "slug": "wallbox-pv", + "name": "Wallbox PV", + "parents": ["taxonomy-slug:classification-slug"], + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "archived": false, + "starred": false, + "enabled_locations": ["account", "string"], + "enabled_purposes": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ], + "hits": 10 +} +``` + +
+ +--- + +### `listTaxonomyClassificationsForSchema` + +List taxonomy classifications for a given schema + +`GET /v1/entity/schemas/{slug}/taxonomy/{taxonomySlug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | Entity Type | +| `taxonomySlug` | path | string | Yes | Taxonomy slug | +| `query` | query | string | No | | +| `size` | query | number | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity listTaxonomyClassificationsForSchema \ + -p slug=contact \ + -p taxonomySlug=example +``` + +Using positional args for path parameters: + +```bash +epilot entity listTaxonomyClassificationsForSchema contact example +``` + +With JSONata filter: + +```bash +epilot entity listTaxonomyClassificationsForSchema -p slug=contact -p taxonomySlug=example --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "taxonomy-slug:classification-slug", + "slug": "wallbox-pv", + "name": "Wallbox PV", + "parents": ["taxonomy-slug:classification-slug"], + "color": "#FF5733", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "archived": false, + "starred": false, + "enabled_locations": ["account", "string"], + "enabled_purposes": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + } + ] +} +``` + +
+ +--- + +### `getTaxonomyBulkActionJobs` + +Gets bulk actions jobs by job status: + +`GET /v1/entity/taxonomies/bulk-jobs` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `status` | query | string[] | No | The status of the jobs to return | +| `size` | query | number | No | | +| `created_after` | query | string (date-time) | No | | +| `sort_pending_first` | query | boolean | No | | +| `scope` | query | "me" \| "all" | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getTaxonomyBulkActionJobs +``` + +With JSONata filter: + +```bash +epilot entity getTaxonomyBulkActionJobs --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "job_id": "123e4567-e89b-12d3-a456-426614174000", + "status": "PENDING", + "action_type": "MOVE_CLASSIFICATIONS", + "created_by": "10598", + "created_at": "2024-01-01T00:00:00.000Z", + "updated_at": "2024-01-01T00:00:00.000Z", + "org": "66" + } +] +``` + +
+ +--- + +### `getTaxonomyBulkActionJobById` + +Gets a bulk action job by job id + +`GET /v1/entity/taxonomies/bulk-jobs/{job_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `job_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getTaxonomyBulkActionJobById \ + -p job_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot entity getTaxonomyBulkActionJobById 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity getTaxonomyBulkActionJobById -p job_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'job_id' +``` + +
+Sample Response + +```json +{ + "job_id": "123e4567-e89b-12d3-a456-426614174000", + "status": "PENDING", + "action_type": "MOVE_CLASSIFICATIONS", + "created_by": "10598", + "created_at": "2024-01-01T00:00:00.000Z", + "updated_at": "2024-01-01T00:00:00.000Z", + "org": "66" +} +``` + +
+ +--- + +### `cancelBulkAction` + +Cancels a running bulk action job. The job status will be updated to CANCELLED + +`POST /v1/entity/taxonomies/bulk-jobs/{job_id}/cancel` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `job_id` | path | string | Yes | Job ID of the bulk operation to cancel | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity cancelBulkAction \ + -p job_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot entity cancelBulkAction 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot entity cancelBulkAction -p job_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'job_id' +``` + +
+Sample Response + +```json +{ + "job_id": "123e4567-e89b-12d3-a456-426614174000", + "status": "PENDING", + "action_type": "MOVE_CLASSIFICATIONS", + "created_by": "10598", + "created_at": "2024-01-01T00:00:00.000Z", + "updated_at": "2024-01-01T00:00:00.000Z", + "org": "66" +} +``` + +
+ +--- + +### `bulkMoveClassifications` + +Moves classifications from one taxonomy to another, through a bulk async operation which + +`POST /v1/entity/taxonomies/classifications:move` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity bulkMoveClassifications \ + -d '{"job_id":"string","target_taxonomy":"purpose","classification_ids":["taxonomy-slug:classification-slug"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity bulkMoveClassifications +``` + +With JSONata filter: + +```bash +epilot entity bulkMoveClassifications --jsonata 'job_id' +``` + +
+Sample Response + +```json +{ + "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "status": "PENDING" +} +``` + +
+ +--- + +### `bulkMergeClassifications` + +Merges classifications from one taxonomy into one individual classification, through a bulk async operation which + +`POST /v1/entity/taxonomies/classifications:merge` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity bulkMergeClassifications \ + -d '{"job_id":"string","target_classification":"purpose","classification_ids":["taxonomy-slug:classification-slug"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity bulkMergeClassifications +``` + +With JSONata filter: + +```bash +epilot entity bulkMergeClassifications --jsonata 'job_id' +``` + +
+Sample Response + +```json +{ + "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "status": "PENDING" +} +``` + +
+ +--- + +### `bulkDeleteClassifications` + +Permanently deletes taxonomy classifications. The classifications are deleted through a bulk + +`POST /v1/entity/taxonomies/classifications:delete` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity bulkDeleteClassifications \ + -d '{"job_id":"string","classification_ids":["taxonomy-slug:classification-slug"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity bulkDeleteClassifications +``` + +With JSONata filter: + +```bash +epilot entity bulkDeleteClassifications --jsonata 'job_id' +``` + +
+Sample Response + +```json +{ + "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "status": "PENDING" +} +``` + +
+ +--- + +### `createSchemaAttribute` + +Create a schema attribute + +`POST /v1/entity/schemas/attributes` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity createSchemaAttribute +``` + +With request body: + +```bash +epilot entity createSchemaAttribute \ + -d '{ + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": { + "disablePast": true + }, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": { + "hint_text": "string", + "hint_text_key": "string", + "hint_custom_component": "string", + "hint_tooltip_placement": "top" + }, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "string", + "multiline": true, + "rich_text": true, + "rows": 3 +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity createSchemaAttribute +``` + +With JSONata filter: + +```bash +epilot entity createSchemaAttribute --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": { + "disablePast": true + }, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": { + "hint_text": "string", + "hint_text_key": "string", + "hint_custom_component": "string", + "hint_tooltip_placement": "top" + }, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "string", + "multiline": true, + "rich_text": true, + "rows": 3 +} +``` + +
+ +--- + +### `getSchemaAttribute` + +Get a schema attribute from given attribute ID + +`GET /v1/entity/schemas/attributes/{composite_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `composite_id` | path | string | Yes | Schema Slug and the Attribute ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getSchemaAttribute \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +Using positional args for path parameters: + +```bash +epilot entity getSchemaAttribute contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With JSONata filter: + +```bash +epilot entity getSchemaAttribute -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": { + "disablePast": true + }, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": { + "hint_text": "string", + "hint_text_key": "string", + "hint_custom_component": "string", + "hint_tooltip_placement": "top" + }, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "string", + "multiline": true, + "rich_text": true, + "rows": 3 +} +``` + +
+ +--- + +### `putSchemaAttribute` + +Updates an attribute in the schema + +`PUT /v1/entity/schemas/attributes/{composite_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `composite_id` | path | string | Yes | Schema Slug and the Attribute ID | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity putSchemaAttribute \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With request body: + +```bash +epilot entity putSchemaAttribute \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d \ + -d '{ + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": { + "disablePast": true + }, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": { + "hint_text": "string", + "hint_text_key": "string", + "hint_custom_component": "string", + "hint_tooltip_placement": "top" + }, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "string", + "multiline": true, + "rich_text": true, + "rows": 3 +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity putSchemaAttribute contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity putSchemaAttribute -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With JSONata filter: + +```bash +epilot entity putSchemaAttribute -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": { + "disablePast": true + }, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": { + "hint_text": "string", + "hint_text_key": "string", + "hint_custom_component": "string", + "hint_tooltip_placement": "top" + }, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "string", + "multiline": true, + "rich_text": true, + "rows": 3 +} +``` + +
+ +--- + +### `deleteSchemaAttribute` + +Deletes an attribute from a schema + +`DELETE /v1/entity/schemas/attributes/{composite_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `composite_id` | path | string | Yes | Schema Slug and the Attribute ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity deleteSchemaAttribute \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +Using positional args for path parameters: + +```bash +epilot entity deleteSchemaAttribute contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With JSONata filter: + +```bash +epilot entity deleteSchemaAttribute -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": { + "disablePast": true + }, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": { + "hint_text": "string", + "hint_text_key": "string", + "hint_custom_component": "string", + "hint_tooltip_placement": "top" + }, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "string", + "multiline": true, + "rich_text": true, + "rows": 3 +} +``` + +
+ +--- + +### `createSchemaCapability` + +Create a schema capability + +`POST /v1/entity/schemas/capabilities` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity createSchemaCapability +``` + +With request body: + +```bash +epilot entity createSchemaCapability \ + -d '{ + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "customer_messaging", + "title": "Messaging", + "attributes": [ + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": {}, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": {}, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "string", + "multiline": true, + "rich_text": true, + "rows": 3 + }, + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": {}, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": {}, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "link" + } + ], + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "app_id": "123e4567-e89b-12d3-a456-426614174000", + "ui_config": { + "is_filterable": true + }, + "ui_hooks": [ + { + "hook": "EntityDetailsV2:Tab", + "render_condition": "_is_composite_price = \"false\"", + "order": 10, + "title": "Notes", + "group_expanded": true, + "import": "@epilot360/notes", + "component": "PricingItems", + "route": "notes", + "icon": "email", + "disabled": true, + "header": true, + "requiredPermission": {} + } + ], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "composite_id": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d", + "schema": "contact" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity createSchemaCapability +``` + +With JSONata filter: + +```bash +epilot entity createSchemaCapability --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "customer_messaging", + "title": "Messaging", + "attributes": [ + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": {}, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": {}, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "string", + "multiline": true, + "rich_text": true, + "rows": 3 + }, + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": {}, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": {}, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "link" + } + ], + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "app_id": "123e4567-e89b-12d3-a456-426614174000", + "ui_config": { + "is_filterable": true + }, + "ui_hooks": [ + { + "hook": "EntityDetailsV2:Tab", + "render_condition": "_is_composite_price = \"false\"", + "order": 10, + "title": "Notes", + "group_expanded": true, + "import": "@epilot360/notes", + "component": "PricingItems", + "route": "notes", + "icon": "email", + "disabled": true, + "header": true, + "requiredPermission": {} + } + ], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "composite_id": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d", + "schema": "contact" +} +``` + +
+ +--- + +### `getSchemaCapability` + +Get a schema capability from given capability ID + +`GET /v1/entity/schemas/capabilities/{composite_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `composite_id` | path | string | Yes | Schema Slug and the Attribute ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getSchemaCapability \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +Using positional args for path parameters: + +```bash +epilot entity getSchemaCapability contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With JSONata filter: + +```bash +epilot entity getSchemaCapability -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "customer_messaging", + "title": "Messaging", + "attributes": [ + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": {}, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": {}, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "string", + "multiline": true, + "rich_text": true, + "rows": 3 + }, + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": {}, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": {}, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "link" + } + ], + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "app_id": "123e4567-e89b-12d3-a456-426614174000", + "ui_config": { + "is_filterable": true + }, + "ui_hooks": [ + { + "hook": "EntityDetailsV2:Tab", + "render_condition": "_is_composite_price = \"false\"", + "order": 10, + "title": "Notes", + "group_expanded": true, + "import": "@epilot360/notes", + "component": "PricingItems", + "route": "notes", + "icon": "email", + "disabled": true, + "header": true, + "requiredPermission": {} + } + ], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "composite_id": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d", + "schema": "contact" +} +``` + +
+ +--- + +### `putSchemaCapability` + +Adds or updates an capability in the schema + +`PUT /v1/entity/schemas/capabilities/{composite_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `composite_id` | path | string | Yes | Schema Slug and the Attribute ID | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity putSchemaCapability \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With request body: + +```bash +epilot entity putSchemaCapability \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d \ + -d '{ + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "customer_messaging", + "title": "Messaging", + "attributes": [ + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": {}, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": {}, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "string", + "multiline": true, + "rich_text": true, + "rows": 3 + }, + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": {}, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": {}, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "link" + } + ], + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "app_id": "123e4567-e89b-12d3-a456-426614174000", + "ui_config": { + "is_filterable": true + }, + "ui_hooks": [ + { + "hook": "EntityDetailsV2:Tab", + "render_condition": "_is_composite_price = \"false\"", + "order": 10, + "title": "Notes", + "group_expanded": true, + "import": "@epilot360/notes", + "component": "PricingItems", + "route": "notes", + "icon": "email", + "disabled": true, + "header": true, + "requiredPermission": {} + } + ], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "composite_id": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d", + "schema": "contact" +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity putSchemaCapability contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity putSchemaCapability -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With JSONata filter: + +```bash +epilot entity putSchemaCapability -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "customer_messaging", + "title": "Messaging", + "attributes": [ + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": {}, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": {}, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "string", + "multiline": true, + "rich_text": true, + "rows": 3 + }, + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": {}, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": {}, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "link" + } + ], + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "app_id": "123e4567-e89b-12d3-a456-426614174000", + "ui_config": { + "is_filterable": true + }, + "ui_hooks": [ + { + "hook": "EntityDetailsV2:Tab", + "render_condition": "_is_composite_price = \"false\"", + "order": 10, + "title": "Notes", + "group_expanded": true, + "import": "@epilot360/notes", + "component": "PricingItems", + "route": "notes", + "icon": "email", + "disabled": true, + "header": true, + "requiredPermission": {} + } + ], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "composite_id": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d", + "schema": "contact" +} +``` + +
+ +--- + +### `deleteSchemaCapability` + +Deletes a Capability from a schema + +`DELETE /v1/entity/schemas/capabilities/{composite_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `composite_id` | path | string | Yes | Schema Slug and the Attribute ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity deleteSchemaCapability \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +Using positional args for path parameters: + +```bash +epilot entity deleteSchemaCapability contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With JSONata filter: + +```bash +epilot entity deleteSchemaCapability -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "customer_messaging", + "title": "Messaging", + "attributes": [ + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": {}, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": {}, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "string", + "multiline": true, + "rich_text": true, + "rows": 3 + }, + { + "id": "d5839b94-ba20-4225-a78e-76951d352bd6", + "name": "string", + "label": "string", + "placeholder": "string", + "hidden": false, + "show_in_table": true, + "sortable": true, + "required": false, + "readonly": false, + "deprecated": false, + "default_value": {}, + "group": "string", + "order": 0, + "layout": "full_width", + "hide_label": true, + "icon": "string", + "render_condition": "string", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "constraints": {}, + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [], + "value_formatter": "string", + "preview_value_formatter": "string", + "entity_builder_disable_edit": false, + "protected": true, + "info_helpers": {}, + "explicit_searchable": false, + "exclude_from_search": false, + "repeatable": true, + "has_primary": true, + "type": "link" + } + ], + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "app_id": "123e4567-e89b-12d3-a456-426614174000", + "ui_config": { + "is_filterable": true + }, + "ui_hooks": [ + { + "hook": "EntityDetailsV2:Tab", + "render_condition": "_is_composite_price = \"false\"", + "order": 10, + "title": "Notes", + "group_expanded": true, + "import": "@epilot360/notes", + "component": "PricingItems", + "route": "notes", + "icon": "email", + "disabled": true, + "header": true, + "requiredPermission": {} + } + ], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "composite_id": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d", + "schema": "contact" +} +``` + +
+ +--- + +### `createSchemaGroup` + +Create a schema group + +`POST /v1/entity/schemas/group` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity createSchemaGroup +``` + +With request body: + +```bash +epilot entity createSchemaGroup \ + -d '{ + "label": "Contact Details", + "id": "e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "order": 0, + "expanded": false, + "render_condition": "_is_composite_price = \"false\"", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "info_tooltip_title": { + "key": "string", + "default": "string" + }, + "composite_id": "contact:e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "schema": "contact" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity createSchemaGroup +``` + +With JSONata filter: + +```bash +epilot entity createSchemaGroup --jsonata '$' +``` + +
+Sample Response + +```json +{ + "label": "Contact Details", + "id": "e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "order": 0, + "expanded": false, + "render_condition": "_is_composite_price = \"false\"", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "info_tooltip_title": { + "key": "string", + "default": "string" + }, + "composite_id": "contact:e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "schema": "contact" +} +``` + +
+ +--- + +### `getSchemaGroup` + +Get a schema group from given group composite ID + +`GET /v1/entity/schemas/group/{composite_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `composite_id` | path | string | Yes | Schema Slug and the Group ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getSchemaGroup \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +Using positional args for path parameters: + +```bash +epilot entity getSchemaGroup contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With JSONata filter: + +```bash +epilot entity getSchemaGroup -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d --jsonata '$' +``` + +
+Sample Response + +```json +{ + "label": "Contact Details", + "id": "e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "order": 0, + "expanded": false, + "render_condition": "_is_composite_price = \"false\"", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "info_tooltip_title": { + "key": "string", + "default": "string" + }, + "composite_id": "contact:e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "schema": "contact" +} +``` + +
+ +--- + +### `putSchemaGroup` + +Adds or updates an capability in the schema + +`PUT /v1/entity/schemas/group/{composite_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `composite_id` | path | string | Yes | Schema Slug and the Group ID | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity putSchemaGroup \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With request body: + +```bash +epilot entity putSchemaGroup \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d \ + -d '{ + "label": "Contact Details", + "id": "e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "order": 0, + "expanded": false, + "render_condition": "_is_composite_price = \"false\"", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "info_tooltip_title": { + "key": "string", + "default": "string" + }, + "composite_id": "contact:e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "schema": "contact" +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity putSchemaGroup contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity putSchemaGroup -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With JSONata filter: + +```bash +epilot entity putSchemaGroup -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d --jsonata '$' +``` + +
+Sample Response + +```json +{ + "label": "Contact Details", + "id": "e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "order": 0, + "expanded": false, + "render_condition": "_is_composite_price = \"false\"", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "info_tooltip_title": { + "key": "string", + "default": "string" + }, + "composite_id": "contact:e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "schema": "contact" +} +``` + +
+ +--- + +### `deleteSchemaGroup` + +Deletes a Capability from a schema + +`DELETE /v1/entity/schemas/group/{composite_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `composite_id` | path | string | Yes | Schema Slug and the Group ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity deleteSchemaGroup \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +Using positional args for path parameters: + +```bash +epilot entity deleteSchemaGroup contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With JSONata filter: + +```bash +epilot entity deleteSchemaGroup -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d --jsonata '$' +``` + +
+Sample Response + +```json +{ + "label": "Contact Details", + "id": "e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "order": 0, + "expanded": false, + "render_condition": "_is_composite_price = \"false\"", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "feature_flag": "FF_MY_FEATURE_FLAG", + "settings_flag": [ + { + "name": "string", + "enabled": true + } + ], + "info_tooltip_title": { + "key": "string", + "default": "string" + }, + "composite_id": "contact:e18a532b-ae79-4d86-a6a5-e5dbfb579d14", + "schema": "contact" +} +``` + +
+ +--- + +### `createSchemaGroupHeadline` + +Create a headline in a schema group + +`POST /v1/entity/schemas/headline` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity createSchemaGroupHeadline +``` + +With request body: + +```bash +epilot entity createSchemaGroupHeadline \ + -d '{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "label": "string", + "layout": "string", + "group": "string", + "order": 0, + "type": "headline", + "enable_divider": false, + "divider": "top_divider", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "composite_id": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d", + "schema": "contact" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity createSchemaGroupHeadline +``` + +With JSONata filter: + +```bash +epilot entity createSchemaGroupHeadline --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "label": "string", + "layout": "string", + "group": "string", + "order": 0, + "type": "headline", + "enable_divider": false, + "divider": "top_divider", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "composite_id": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d", + "schema": "contact" +} +``` + +
+ +--- + +### `getSchemaGroupHeadline` + +Get a group headline from schema from given headline composite ID + +`GET /v1/entity/schemas/headline/{composite_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `composite_id` | path | string | Yes | Schema Slug and the Schema Group ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity getSchemaGroupHeadline \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +Using positional args for path parameters: + +```bash +epilot entity getSchemaGroupHeadline contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With JSONata filter: + +```bash +epilot entity getSchemaGroupHeadline -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "label": "string", + "layout": "string", + "group": "string", + "order": 0, + "type": "headline", + "enable_divider": false, + "divider": "top_divider", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "composite_id": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d", + "schema": "contact" +} +``` + +
+ +--- + +### `putSchemaGroupHeadline` + +Adds or updates a group headline in the schema + +`PUT /v1/entity/schemas/headline/{composite_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `composite_id` | path | string | Yes | Schema Slug and the Schema Group ID | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity putSchemaGroupHeadline \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With request body: + +```bash +epilot entity putSchemaGroupHeadline \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d \ + -d '{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "label": "string", + "layout": "string", + "group": "string", + "order": 0, + "type": "headline", + "enable_divider": false, + "divider": "top_divider", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "composite_id": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d", + "schema": "contact" +}' +``` + +Using positional args for path parameters: + +```bash +epilot entity putSchemaGroupHeadline contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +Using stdin pipe: + +```bash +cat body.json | epilot entity putSchemaGroupHeadline -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With JSONata filter: + +```bash +epilot entity putSchemaGroupHeadline -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "label": "string", + "layout": "string", + "group": "string", + "order": 0, + "type": "headline", + "enable_divider": false, + "divider": "top_divider", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "composite_id": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d", + "schema": "contact" +} +``` + +
+ +--- + +### `deleteSchemaGroupHeadline` + +Deletes a group headline from a schema + +`DELETE /v1/entity/schemas/headline/{composite_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `composite_id` | path | string | Yes | Schema Slug and the Schema Group ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot entity deleteSchemaGroupHeadline \ + -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +Using positional args for path parameters: + +```bash +epilot entity deleteSchemaGroupHeadline contact:97644baa-083f-4e49-9188-fcff2ecaad7d +``` + +With JSONata filter: + +```bash +epilot entity deleteSchemaGroupHeadline -p composite_id=contact:97644baa-083f-4e49-9188-fcff2ecaad7d --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "label": "string", + "layout": "string", + "group": "string", + "order": 0, + "type": "headline", + "enable_divider": false, + "divider": "top_divider", + "_purpose": ["taxonomy-slug:classification-slug"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "composite_id": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d", + "schema": "contact" +} +``` + +
+ +--- diff --git a/packages/cli/docs/environments.md b/packages/cli/docs/environments.md new file mode 100644 index 00000000..0b42a72e --- /dev/null +++ b/packages/cli/docs/environments.md @@ -0,0 +1,340 @@ +# Environments API + +- **Base URL:** `https://environments.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/environments](https://docs.epilot.io/api/environments) + +API for managing organization environment variables and secrets + +## Quick Start + +```bash +# List available operations +epilot environments + +# Call an operation +epilot environments listEnvironmentVariables +``` + +## Operations + +**environments** +- [`listEnvironmentVariables`](#listenvironmentvariables) — List all environment variables for the organization. Returns metadata only, no secret values. +- [`createEnvironmentVariable`](#createenvironmentvariable) — Create a new environment variable or secret for the organization. +- [`getEnvironmentVariable`](#getenvironmentvariable) — Get an environment variable by key. Returns value only for String type, omitted for SecretString. +- [`updateEnvironmentVariable`](#updateenvironmentvariable) — Create or update an environment variable. Acts as an upsert — creates the variable if it does not exist. +- [`deleteEnvironmentVariable`](#deleteenvironmentvariable) — Delete an environment variable by key. + +### `listEnvironmentVariables` + +List all environment variables for the organization. Returns metadata only, no secret values. + +`GET /v1/environments` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot environments listEnvironmentVariables +``` + +With JSONata filter: + +```bash +epilot environments listEnvironmentVariables --jsonata 'items[0]' +``` + +
+Sample Response + +```json +{ + "items": [ + { + "key": "string", + "type": "String", + "description": "string", + "value": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z" + } + ] +} +``` + +
+ +--- + +### `createEnvironmentVariable` + +Create a new environment variable or secret for the organization. + +`POST /v1/environments` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot environments createEnvironmentVariable \ + -d '{"key":"string","type":"String","description":"string","value":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot environments createEnvironmentVariable +``` + +With JSONata filter: + +```bash +epilot environments createEnvironmentVariable --jsonata 'key' +``` + +
+Sample Response + +```json +{ + "key": "string", + "type": "String", + "description": "string", + "value": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `getEnvironmentVariable` + +Get an environment variable by key. Returns value only for String type, omitted for SecretString. + +`GET /v1/environments/{key}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `key` | path | string | Yes | Environment variable key | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot environments getEnvironmentVariable \ + -p key=example +``` + +Using positional args for path parameters: + +```bash +epilot environments getEnvironmentVariable example +``` + +With JSONata filter: + +```bash +epilot environments getEnvironmentVariable -p key=example --jsonata 'key' +``` + +
+Sample Response + +```json +{ + "key": "string", + "type": "String", + "description": "string", + "value": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `updateEnvironmentVariable` + +Create or update an environment variable. Acts as an upsert — creates the variable if it does not exist. + +`PUT /v1/environments/{key}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `key` | path | string | Yes | Environment variable key | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot environments updateEnvironmentVariable \ + -p key=example \ + -d '{"type":"String","value":"string","description":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot environments updateEnvironmentVariable example +``` + +Using stdin pipe: + +```bash +cat body.json | epilot environments updateEnvironmentVariable -p key=example +``` + +With JSONata filter: + +```bash +epilot environments updateEnvironmentVariable -p key=example --jsonata 'key' +``` + +
+Sample Response + +```json +{ + "key": "string", + "type": "String", + "description": "string", + "value": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `deleteEnvironmentVariable` + +Delete an environment variable by key. + +`DELETE /v1/environments/{key}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `key` | path | string | Yes | Environment variable key | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot environments deleteEnvironmentVariable \ + -p key=example +``` + +Using positional args for path parameters: + +```bash +epilot environments deleteEnvironmentVariable example +``` + +With JSONata filter: + +```bash +epilot environments deleteEnvironmentVariable -p key=example --jsonata '$' +``` + +--- diff --git a/packages/cli/docs/erp-integration.md b/packages/cli/docs/erp-integration.md new file mode 100644 index 00000000..9e24e712 --- /dev/null +++ b/packages/cli/docs/erp-integration.md @@ -0,0 +1,2859 @@ +# ERP Integration API + +- **Base URL:** `https://erp-integration-api.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/erp-integration](https://docs.epilot.io/api/erp-integration) + +API for integrating with ERP systems, handling tracking acknowledgments, triggering ERP processes, and processing ERP updates. + +## Quick Start + +```bash +# List available operations +epilot erp-integration + +# Call an operation +epilot erp-integration acknowledgeTracking +``` + +## Operations + +**erp** +- [`acknowledgeTracking`](#acknowledgetracking) — Acknowledges an ERP tracking record by removing it from the tracking table, requires public authentication +- [`triggerErp`](#triggererp) — Triggers the ERP integration process +- [`processErpUpdatesEventsV3`](#processerpupdateseventsv3) — Handles updates from ERP systems using integration_id directly. +- [`simulateMappingV2`](#simulatemappingv2) — Test v2.0 mapping configuration by transforming a payload using the provided mapping rules without persisting data. +- [`simulateMapping`](#simulatemapping) — Test mapping configuration by transforming a payload using the provided mapping rules without persisting data. + +**integrations** +- [`listIntegrations`](#listintegrations) — Retrieve all integrations for the authenticated organization +- [`createIntegration`](#createintegration) — Create a new integration configuration +- [`getIntegration`](#getintegration) — Retrieve a specific integration by its ID +- [`updateIntegration`](#updateintegration) — Update an existing integration configuration +- [`deleteIntegration`](#deleteintegration) — Delete an integration and all its use cases +- [`queryEvents`](#queryevents) — Query events for a specific integration +- [`replayEvents`](#replayevents) — Replay one or more events for a specific integration. Events will be re-processed with their original payloads but with +- [`listUseCases`](#listusecases) — Retrieve all use cases for a specific integration +- [`createUseCase`](#createusecase) — Create a new use case for an integration +- [`getUseCase`](#getusecase) — Retrieve a specific use case by its ID +- [`updateUseCase`](#updateusecase) — Update an existing use case configuration +- [`deleteUseCase`](#deleteusecase) — Delete a use case from an integration +- [`listUseCaseHistory`](#listusecasehistory) — Retrieve historical versions of a use case's configuration. +- [`listIntegrationsV2`](#listintegrationsv2) — Retrieve all integrations with embedded use cases for the authenticated organization +- [`createIntegrationV2`](#createintegrationv2) — Create a new integration with embedded use cases. +- [`getIntegrationV2`](#getintegrationv2) — Retrieve a specific integration with all its embedded use cases +- [`updateIntegrationV2`](#updateintegrationv2) — Update an existing integration with embedded use cases. +- [`deleteIntegrationV2`](#deleteintegrationv2) — Delete an integration and all its use cases +- [`setIntegrationAppMapping`](#setintegrationappmapping) — Creates or updates a mapping from an app/component to an integration. +- [`deleteIntegrationAppMapping`](#deleteintegrationappmapping) — Removes a mapping from an app/component to an integration. +- [`getOutboundStatus`](#getoutboundstatus) — Get the status of all outbound use cases for a specific integration. + +**monitoring** +- [`queryInboundMonitoringEvents`](#queryinboundmonitoringevents) — Query inbound monitoring events for a specific integration. +- [`getMonitoringStats`](#getmonitoringstats) — Get aggregated statistics for both inbound and outbound monitoring events for a specific integration. +- [`getMonitoringTimeSeries`](#getmonitoringtimeseries) — Get time-series aggregated event counts for monitoring charts. +- [`queryAccessLogs`](#queryaccesslogs) — Query API access logs for a specific integration's organization. +- [`queryOutboundMonitoringEvents`](#queryoutboundmonitoringevents) — Query outbound monitoring events for a specific integration. + +### `acknowledgeTracking` + +Acknowledges an ERP tracking record by removing it from the tracking table, requires public authentication + +`POST /v1/erp/tracking/acknowledgement` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration acknowledgeTracking \ + -d '{"ack_id":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration acknowledgeTracking +``` + +With JSONata filter: + +```bash +epilot erp-integration acknowledgeTracking --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "string" +} +``` + +
+ +--- + +### `triggerErp` + +Triggers the ERP integration process + +`POST /v1/erp/trigger` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration triggerErp +``` + +With request body: + +```bash +epilot erp-integration triggerErp \ + -d '{ + "execution_id": "string", + "org_id": "string", + "webhook_id": "string", + "flow_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "action_id": "string", + "flow_action_id": "string", + "flow_name": "string", + "activity_id": "string", + "entity_id": "string" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration triggerErp +``` + +With JSONata filter: + +```bash +epilot erp-integration triggerErp --jsonata 'status_code' +``` + +
+Sample Response + +```json +{ + "status_code": "string", + "message": "string", + "body": {}, + "code": "string", + "status": "succeeded", + "start_date": "string", + "end_date": "string", + "event_id": "string" +} +``` + +
+ +--- + +### `processErpUpdatesEventsV3` + +Handles updates from ERP systems using integration_id directly. + +`POST /v3/erp/updates/events` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration processErpUpdatesEventsV3 \ + -d '{"integration_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","correlation_id":"string","events":[{},{}]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration processErpUpdatesEventsV3 +``` + +With JSONata filter: + +```bash +epilot erp-integration processErpUpdatesEventsV3 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "event_id": "string", + "status": "success", + "message": "string" + } + ] +} +``` + +
+ +--- + +### `simulateMappingV2` + +Test v2.0 mapping configuration by transforming a payload using the provided mapping rules without persisting data. + +`POST /v2/erp/updates/mapping_simulation` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration simulateMappingV2 +``` + +With request body: + +```bash +epilot erp-integration simulateMappingV2 \ + -d '{ + "event_configuration": { + "entities": [ + {} + ], + "meter_readings": [ + {} + ] + }, + "format": "json", + "payload": "string" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration simulateMappingV2 +``` + +With JSONata filter: + +```bash +epilot erp-integration simulateMappingV2 --jsonata 'entity_updates' +``` + +
+Sample Response + +```json +{ + "entity_updates": [ + { + "entity_slug": "string", + "unique_identifiers": {}, + "attributes": {} + } + ], + "meter_readings_updates": [ + { + "meter": { + "$entity_unique_ids": {} + }, + "meter_counter": { + "$entity_unique_ids": {} + }, + "attributes": {} + } + ], + "warnings": [ + { + "entity_schema": "string", + "field": "string", + "message": "string" + } + ] +} +``` + +
+ +--- + +### `simulateMapping` + +Test mapping configuration by transforming a payload using the provided mapping rules without persisting data. + +`POST /v1/erp/updates/mapping_simulation` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration simulateMapping +``` + +With request body: + +```bash +epilot erp-integration simulateMapping \ + -d '{ + "mapping_configuration": { + "version": "1.0", + "mapping": { + "objects": {} + } + }, + "object_type": "string", + "format": "json", + "payload": "string" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration simulateMapping +``` + +With JSONata filter: + +```bash +epilot erp-integration simulateMapping --jsonata 'entity_updates' +``` + +
+Sample Response + +```json +{ + "entity_updates": [ + { + "entity_slug": "string", + "unique_identifiers": {}, + "attributes": {} + } + ], + "meter_readings_updates": [ + { + "meter": { + "$entity_unique_ids": {} + }, + "meter_counter": { + "$entity_unique_ids": {} + }, + "attributes": {} + } + ], + "warnings": [ + { + "entity_schema": "string", + "field": "string", + "message": "string" + } + ] +} +``` + +
+ +--- + +### `listIntegrations` + +Retrieve all integrations for the authenticated organization + +`GET /v1/integrations` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration listIntegrations +``` + +With JSONata filter: + +```bash +epilot erp-integration listIntegrations --jsonata 'integrations' +``` + +
+Sample Response + +```json +{ + "integrations": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "orgId": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "name": "string", + "description": "string", + "access_token_ids": ["string"], + "app_ids": ["string"], + "environment_config": [ + { + "key": "string", + "label": "string", + "type": "String", + "description": "string", + "required": false, + "order": 0 + } + ], + "settings": { + "autoRefresh": { + "enabled": false, + "freshnessThresholdMinutes": 1 + } + } + } + ] +} +``` + +
+ +--- + +### `createIntegration` + +Create a new integration configuration + +`POST /v1/integrations` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration createIntegration +``` + +With request body: + +```bash +epilot erp-integration createIntegration \ + -d '{ + "name": "string", + "description": "string", + "access_token_ids": ["string"], + "app_ids": ["string"], + "environment_config": [ + { + "key": "string", + "label": "string", + "type": "String", + "description": "string", + "required": false, + "order": 0 + } + ], + "settings": { + "autoRefresh": { + "enabled": false, + "freshnessThresholdMinutes": 1 + } + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration createIntegration +``` + +With JSONata filter: + +```bash +epilot erp-integration createIntegration --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "orgId": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "name": "string", + "description": "string", + "access_token_ids": ["string"], + "app_ids": ["string"], + "environment_config": [ + { + "key": "string", + "label": "string", + "type": "String", + "description": "string", + "required": false, + "order": 0 + } + ], + "settings": { + "autoRefresh": { + "enabled": false, + "freshnessThresholdMinutes": 1 + } + } +} +``` + +
+ +--- + +### `getIntegration` + +Retrieve a specific integration by its ID + +`GET /v1/integrations/{integrationId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration getIntegration \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration getIntegration 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration getIntegration -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "orgId": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "name": "string", + "description": "string", + "access_token_ids": ["string"], + "app_ids": ["string"], + "environment_config": [ + { + "key": "string", + "label": "string", + "type": "String", + "description": "string", + "required": false, + "order": 0 + } + ], + "settings": { + "autoRefresh": { + "enabled": false, + "freshnessThresholdMinutes": 1 + } + } +} +``` + +
+ +--- + +### `updateIntegration` + +Update an existing integration configuration + +`PUT /v1/integrations/{integrationId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration updateIntegration \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{}' +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration updateIntegration 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration updateIntegration -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration updateIntegration -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "orgId": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "name": "string", + "description": "string", + "access_token_ids": ["string"], + "app_ids": ["string"], + "environment_config": [ + { + "key": "string", + "label": "string", + "type": "String", + "description": "string", + "required": false, + "order": 0 + } + ], + "settings": { + "autoRefresh": { + "enabled": false, + "freshnessThresholdMinutes": 1 + } + } +} +``` + +
+ +--- + +### `deleteIntegration` + +Delete an integration and all its use cases + +`DELETE /v1/integrations/{integrationId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration deleteIntegration \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration deleteIntegration 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration deleteIntegration -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "string" +} +``` + +
+ +--- + +### `queryEvents` + +Query events for a specific integration + +`POST /v1/integrations/{integrationId}/events` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration queryEvents \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot erp-integration queryEvents \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "event_id": "string", + "event_type": "CREATE", + "correlation_id": "string", + "object_type": "string", + "event_name": "string", + "limit": 25, + "cursor": { + "event_time": "2025-10-31T12:34:56Z", + "event_id": "evt_1234567890abcdef" + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration queryEvents 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration queryEvents -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration queryEvents -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "event_type": "CREATE", + "object_type": "string", + "timestamp": "1970-01-01T00:00:00.000Z", + "format": "json", + "payload": "string", + "deduplication_id": "evt-2025-05-01-12345-create-bp" + } + ], + "next_cursor": { + "event_time": "2025-10-31T12:34:56Z", + "event_id": "evt_1234567890abcdef" + }, + "has_more": true +} +``` + +
+ +--- + +### `replayEvents` + +Replay one or more events for a specific integration. Events will be re-processed with their original payloads but with + +`POST /v1/integrations/{integrationId}/events/replay` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration replayEvents \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"event_ids":["string"]}' +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration replayEvents 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration replayEvents -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration replayEvents -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'event_ids' +``` + +
+Sample Response + +```json +{ + "event_ids": ["string"] +} +``` + +
+ +--- + +### `listUseCases` + +Retrieve all use cases for a specific integration + +`GET /v1/integrations/{integrationId}/use-cases` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration listUseCases \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration listUseCases 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration listUseCases -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'use_cases' +``` + +
+Sample Response + +```json +{ + "use_cases": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "integrationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "slug": "string", + "type": "inbound", + "enabled": true, + "change_description": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "configuration": {} + } + ] +} +``` + +
+ +--- + +### `createUseCase` + +Create a new use case for an integration + +`POST /v1/integrations/{integrationId}/use-cases` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration createUseCase \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot erp-integration createUseCase \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "name": "string", + "slug": "string", + "enabled": true, + "type": "inbound", + "configuration": { + "entities": [ + {} + ], + "meter_readings": [ + {} + ] + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration createUseCase 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration createUseCase -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration createUseCase -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "integrationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "slug": "string", + "type": "inbound", + "enabled": true, + "change_description": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "configuration": { + "entities": [ + {} + ], + "meter_readings": [ + {} + ] + } +} +``` + +
+ +--- + +### `getUseCase` + +Retrieve a specific use case by its ID + +`GET /v1/integrations/{integrationId}/use-cases/{useCaseId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | +| `useCaseId` | path | string (uuid) | Yes | The use case ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration getUseCase \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -p useCaseId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration getUseCase 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration getUseCase -p integrationId=123e4567-e89b-12d3-a456-426614174000 -p useCaseId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "integrationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "slug": "string", + "type": "inbound", + "enabled": true, + "change_description": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "configuration": { + "entities": [ + {} + ], + "meter_readings": [ + {} + ] + } +} +``` + +
+ +--- + +### `updateUseCase` + +Update an existing use case configuration + +`PUT /v1/integrations/{integrationId}/use-cases/{useCaseId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | +| `useCaseId` | path | string (uuid) | Yes | The use case ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration updateUseCase \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -p useCaseId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot erp-integration updateUseCase \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -p useCaseId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "name": "string", + "slug": "string", + "enabled": true, + "change_description": "string", + "type": "inbound", + "configuration": { + "entities": [ + {} + ], + "meter_readings": [ + {} + ] + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration updateUseCase 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration updateUseCase -p integrationId=123e4567-e89b-12d3-a456-426614174000 -p useCaseId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration updateUseCase -p integrationId=123e4567-e89b-12d3-a456-426614174000 -p useCaseId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "integrationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "slug": "string", + "type": "inbound", + "enabled": true, + "change_description": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "configuration": { + "entities": [ + {} + ], + "meter_readings": [ + {} + ] + } +} +``` + +
+ +--- + +### `deleteUseCase` + +Delete a use case from an integration + +`DELETE /v1/integrations/{integrationId}/use-cases/{useCaseId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | +| `useCaseId` | path | string (uuid) | Yes | The use case ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration deleteUseCase \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -p useCaseId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration deleteUseCase 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration deleteUseCase -p integrationId=123e4567-e89b-12d3-a456-426614174000 -p useCaseId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "string" +} +``` + +
+ +--- + +### `listUseCaseHistory` + +Retrieve historical versions of a use case's configuration. + +`GET /v1/integrations/{integrationId}/use-cases/{useCaseId}/history` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | +| `useCaseId` | path | string (uuid) | Yes | The use case ID | +| `cursor` | query | string | No | Opaque pagination cursor. Pass the 'next_cursor' value from a previous +response to fetch the next page of results. + | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration listUseCaseHistory \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -p useCaseId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration listUseCaseHistory 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration listUseCaseHistory -p integrationId=123e4567-e89b-12d3-a456-426614174000 -p useCaseId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'history' +``` + +
+Sample Response + +```json +{ + "history": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "useCaseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "integrationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "slug": "string", + "enabled": true, + "change_description": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "history_created_at": "1970-01-01T00:00:00.000Z", + "type": "inbound", + "configuration": {} + } + ], + "next_cursor": "string" +} +``` + +
+ +--- + +### `listIntegrationsV2` + +Retrieve all integrations with embedded use cases for the authenticated organization + +`GET /v2/integrations` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration listIntegrationsV2 +``` + +With JSONata filter: + +```bash +epilot erp-integration listIntegrationsV2 --jsonata 'integrations' +``` + +
+Sample Response + +```json +{ + "integrations": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "orgId": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "name": "string", + "description": "string", + "access_token_ids": ["string"], + "app_ids": ["string"], + "environment_config": [], + "settings": {}, + "use_cases": [] + } + ] +} +``` + +
+ +--- + +### `createIntegrationV2` + +Create a new integration with embedded use cases. + +`POST /v2/integrations` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration createIntegrationV2 +``` + +With request body: + +```bash +epilot erp-integration createIntegrationV2 \ + -d '{ + "name": "string", + "description": "string", + "access_token_ids": ["string"], + "app_ids": ["string"], + "environment_config": [ + { + "key": "string", + "label": "string", + "type": "String", + "description": "string", + "required": false, + "order": 0 + } + ], + "settings": { + "autoRefresh": { + "enabled": false, + "freshnessThresholdMinutes": 1 + } + }, + "use_cases": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "slug": "string", + "enabled": true, + "change_description": "string", + "type": "inbound", + "configuration": {} + } + ] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration createIntegrationV2 +``` + +With JSONata filter: + +```bash +epilot erp-integration createIntegrationV2 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "orgId": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "name": "string", + "description": "string", + "access_token_ids": ["string"], + "app_ids": ["string"], + "environment_config": [ + { + "key": "string", + "label": "string", + "type": "String", + "description": "string", + "required": false, + "order": 0 + } + ], + "settings": { + "autoRefresh": { + "enabled": false, + "freshnessThresholdMinutes": 1 + } + }, + "use_cases": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "integrationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "slug": "string", + "type": "inbound", + "enabled": true, + "change_description": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "configuration": {} + } + ] +} +``` + +
+ +--- + +### `getIntegrationV2` + +Retrieve a specific integration with all its embedded use cases + +`GET /v2/integrations/{integrationId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration getIntegrationV2 \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration getIntegrationV2 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration getIntegrationV2 -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "orgId": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "name": "string", + "description": "string", + "access_token_ids": ["string"], + "app_ids": ["string"], + "environment_config": [ + { + "key": "string", + "label": "string", + "type": "String", + "description": "string", + "required": false, + "order": 0 + } + ], + "settings": { + "autoRefresh": { + "enabled": false, + "freshnessThresholdMinutes": 1 + } + }, + "use_cases": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "integrationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "slug": "string", + "type": "inbound", + "enabled": true, + "change_description": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "configuration": {} + } + ] +} +``` + +
+ +--- + +### `updateIntegrationV2` + +Update an existing integration with embedded use cases. + +`PUT /v2/integrations/{integrationId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID (client-provided) | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration updateIntegrationV2 \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot erp-integration updateIntegrationV2 \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "name": "string", + "description": "string", + "access_token_ids": ["string"], + "app_ids": ["string"], + "environment_config": [ + { + "key": "string", + "label": "string", + "type": "String", + "description": "string", + "required": false, + "order": 0 + } + ], + "settings": { + "autoRefresh": { + "enabled": false, + "freshnessThresholdMinutes": 1 + } + }, + "use_cases": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "slug": "string", + "enabled": true, + "change_description": "string", + "type": "inbound", + "configuration": {} + } + ] +}' +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration updateIntegrationV2 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration updateIntegrationV2 -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration updateIntegrationV2 -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "orgId": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "name": "string", + "description": "string", + "access_token_ids": ["string"], + "app_ids": ["string"], + "environment_config": [ + { + "key": "string", + "label": "string", + "type": "String", + "description": "string", + "required": false, + "order": 0 + } + ], + "settings": { + "autoRefresh": { + "enabled": false, + "freshnessThresholdMinutes": 1 + } + }, + "use_cases": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "integrationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "slug": "string", + "type": "inbound", + "enabled": true, + "change_description": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "configuration": {} + } + ] +} +``` + +
+ +--- + +### `deleteIntegrationV2` + +Delete an integration and all its use cases + +`DELETE /v2/integrations/{integrationId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration deleteIntegrationV2 \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration deleteIntegrationV2 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration deleteIntegrationV2 -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "string" +} +``` + +
+ +--- + +### `setIntegrationAppMapping` + +Creates or updates a mapping from an app/component to an integration. + +`PUT /v1/integrations/{integrationId}/app-mapping` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID to map to | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration setIntegrationAppMapping \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot erp-integration setIntegrationAppMapping \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "app_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "component_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "overwrite": false +}' +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration setIntegrationAppMapping 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration setIntegrationAppMapping -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration setIntegrationAppMapping -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'integration_id' +``` + +
+Sample Response + +```json +{ + "integration_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" +} +``` + +
+ +--- + +### `deleteIntegrationAppMapping` + +Removes a mapping from an app/component to an integration. + +`DELETE /v1/integrations/{integrationId}/app-mapping` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID (used for authorization, must match the mapping) | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration deleteIntegrationAppMapping \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"app_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","component_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}' +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration deleteIntegrationAppMapping 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration deleteIntegrationAppMapping -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration deleteIntegrationAppMapping -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "string" +} +``` + +
+ +--- + +### `queryInboundMonitoringEvents` + +Query inbound monitoring events for a specific integration. + +`POST /v1/integrations/{integrationId}/monitoring/inbound-events` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration queryInboundMonitoringEvents \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot erp-integration queryInboundMonitoringEvents \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "use_case_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "event_type": "CREATE", + "sync_type": "entity", + "status": "success", + "error_category": "validation", + "correlation_id": "string", + "object_type": "string", + "event_name": "string", + "event_id": "string", + "from_date": "2025-01-01T00:00:00Z", + "to_date": "2025-01-31T23:59:59Z", + "limit": 50, + "cursor": { + "completed_at": "1970-01-01T00:00:00.000Z", + "event_id": "string" + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration queryInboundMonitoringEvents 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration queryInboundMonitoringEvents -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration queryInboundMonitoringEvents -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "org_id": "string", + "event_id": "string", + "correlation_id": "string", + "integration_id": "string", + "use_case_id": "string", + "event_type": "CREATE", + "object_type": "string", + "sync_type": "entity", + "status": "success", + "error_code": "string", + "error_message": "string", + "error_category": "validation", + "processing_duration_ms": 0, + "received_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z" + } + ], + "next_cursor": { + "completed_at": "1970-01-01T00:00:00.000Z", + "event_id": "string" + }, + "has_more": true +} +``` + +
+ +--- + +### `getMonitoringStats` + +Get aggregated statistics for both inbound and outbound monitoring events for a specific integration. + +`POST /v1/integrations/{integrationId}/monitoring/stats` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration getMonitoringStats \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot erp-integration getMonitoringStats \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "from_date": "2025-01-01T00:00:00Z", + "to_date": "2025-01-31T23:59:59Z", + "inbound_group_by": ["use_case_id", "status"], + "outbound_group_by": ["event_name", "status"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration getMonitoringStats 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration getMonitoringStats -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration getMonitoringStats -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'inbound' +``` + +
+Sample Response + +```json +{ + "inbound": { + "total_events": 0, + "total_correlations": 0, + "success_count": 0, + "error_count": 0, + "skipped_count": 0, + "warning_count": 0, + "success_rate": 0, + "last_error_at": "1970-01-01T00:00:00.000Z", + "breakdown": [ + {} + ] + }, + "outbound": { + "total_events": 0, + "success_count": 0, + "error_count": 0, + "pending_count": 0, + "success_rate": 0, + "last_error_at": "1970-01-01T00:00:00.000Z", + "breakdown": [ + {} + ] + } +} +``` + +
+ +--- + +### `getMonitoringTimeSeries` + +Get time-series aggregated event counts for monitoring charts. + +`POST /v1/integrations/{integrationId}/monitoring/timeseries` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration getMonitoringTimeSeries \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"from_date":"2025-01-01T00:00:00Z","to_date":"2025-01-31T23:59:59Z","interval":"1h","direction":"both"}' +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration getMonitoringTimeSeries 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration getMonitoringTimeSeries -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration getMonitoringTimeSeries -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'interval' +``` + +
+Sample Response + +```json +{ + "interval": "5m", + "from_date": "1970-01-01T00:00:00.000Z", + "to_date": "1970-01-01T00:00:00.000Z", + "buckets": [ + { + "timestamp": "1970-01-01T00:00:00.000Z", + "inbound": { + "success_count": 0, + "error_count": 0, + "warning_count": 0, + "skipped_count": 0, + "total_count": 0 + }, + "outbound": { + "success_count": 0, + "error_count": 0, + "pending_count": 0, + "total_count": 0 + } + } + ] +} +``` + +
+ +--- + +### `getOutboundStatus` + +Get the status of all outbound use cases for a specific integration. + +`GET /v1/integrations/{integrationId}/outbound-status` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration getOutboundStatus \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration getOutboundStatus 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration getOutboundStatus -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'useCases' +``` + +
+Sample Response + +```json +{ + "useCases": [ + { + "useCaseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "useCaseEnabled": true, + "eventCatalogEvent": "contract.created", + "eventEnabled": true, + "webhooks": [ + { + "webhookId": "string", + "webhookName": "string", + "enabled": true + } + ], + "status": "ok", + "conflicts": [ + { + "type": "event_disabled", + "webhookId": "string", + "message": "string" + } + ] + } + ] +} +``` + +
+ +--- + +### `queryAccessLogs` + +Query API access logs for a specific integration's organization. + +`POST /v1/integrations/{integrationId}/monitoring/access-logs` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID (used for tenant authorization) | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration queryAccessLogs \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot erp-integration queryAccessLogs \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "token_id": "api_5ZugdRXasLfWBypHi93Fk", + "service": "entity", + "method": "GET", + "path": "/v1/entity", + "status": 200, + "from_date": "2025-01-01T00:00:00Z", + "to_date": "2025-01-31T23:59:59Z", + "limit": 50, + "cursor": { + "timestamp": "1970-01-01T00:00:00.000Z", + "request_id": "string" + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration queryAccessLogs 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration queryAccessLogs -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration queryAccessLogs -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "timestamp": "1970-01-01T00:00:00.000Z", + "environment": "string", + "service": "string", + "request_id": "string", + "method": "string", + "path": "string", + "status": 0, + "response_latency_ms": 0, + "response_length": 0, + "token_id": "string", + "org_id": "string", + "origin": "string", + "source_ip": "string" + } + ], + "next_cursor": { + "timestamp": "1970-01-01T00:00:00.000Z", + "request_id": "string" + }, + "has_more": true +} +``` + +
+ +--- + +### `queryOutboundMonitoringEvents` + +Query outbound monitoring events for a specific integration. + +`POST /v1/integrations/{integrationId}/monitoring/outbound-events` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | string (uuid) | Yes | The integration ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot erp-integration queryOutboundMonitoringEvents \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot erp-integration queryOutboundMonitoringEvents \ + -p integrationId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "event_name": "automation_flow_target", + "status": "succeeded", + "webhook_config_id": "string", + "from_date": "2025-01-01T00:00:00Z", + "to_date": "2025-01-31T23:59:59Z", + "limit": 50, + "cursor": { + "created_at": "1970-01-01T00:00:00.000Z", + "event_id": "string" + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot erp-integration queryOutboundMonitoringEvents 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot erp-integration queryOutboundMonitoringEvents -p integrationId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot erp-integration queryOutboundMonitoringEvents -p integrationId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "org_id": "string", + "event_id": "string", + "event_name": "string", + "status": "succeeded", + "url": "string", + "http_method": "string", + "http_response": {}, + "webhook_config_id": "string", + "metadata": {}, + "execution_context": {}, + "payload": {}, + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z" + } + ], + "next_cursor": { + "created_at": "1970-01-01T00:00:00.000Z", + "event_id": "string" + }, + "has_more": true +} +``` + +
+ +--- + +## Deprecated Operations + +- ~~`processErpUpdatesEvents`~~ POST `/v1/erp/updates/events` +- ~~`processErpUpdatesEventsV2`~~ POST `/v2/erp/updates/events` diff --git a/packages/cli/docs/event-catalog.md b/packages/cli/docs/event-catalog.md new file mode 100644 index 00000000..bf3d16cf --- /dev/null +++ b/packages/cli/docs/event-catalog.md @@ -0,0 +1,771 @@ +# Event Catalog API + +- **Base URL:** `https://event-catalog.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/event-catalog](https://docs.epilot.io/api/event-catalog) + +Manages the catalog of business events available in epilot + +## Quick Start + +```bash +# List available operations +epilot event-catalog + +# Call an operation +epilot event-catalog listEvents +``` + +## Operations + +**Event Catalog** +- [`listEvents`](#listevents) — Retrieve list of available business events +- [`getEvent`](#getevent) — Retrieve the configuration of a specific business event +- [`patchEvent`](#patchevent) — Update the configuration of a specific business event for the organization +- [`getEventJSONSchema`](#geteventjsonschema) — Retrieve the JSON Schema of a specific business event +- [`getEventExample`](#geteventexample) — Generate a sample event payload based on the event's JSON Schema +- [`searchEventHistory`](#searcheventhistory) — Paginated history of events +- [`triggerEvent`](#triggerevent) — Explicitly trigger an event by providing input field values and an optional entity seed + +### `listEvents` + +Retrieve list of available business events + +`GET /v1/events` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot event-catalog listEvents +``` + +With JSONata filter: + +```bash +epilot event-catalog listEvents --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "event_name": "AddMeterReading", + "event_title": "Add Meter Reading", + "event_description": "Triggered when a new meter reading is added", + "event_version": "1.0.0", + "event_status": "active", + "event_tags": ["builtin", "metering", "erp"], + "schema_fields": {}, + "entity_graph": { + "nodes": [ + { + "id": "contact", + "schema": "contact", + "cardinality": "one", + "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"] + } + ], + "edges": [ + { + "from": "contact", + "to": "billing_account" + } + ] + }, + "entity_operation": { + "operation": ["createEntity", "updateEntity"], + "schema": ["contact", "contract", "order"], + "attribute": ["email", "phone", "status"], + "purpose": ["Kündigung", "Umzug/Auszug"] + }, + "enabled": true, + "auto_trigger": true, + "automation_trigger": true + } + ] +} +``` + +
+ +--- + +### `getEvent` + +Retrieve the configuration of a specific business event + +`GET /v1/events/{event_name}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `event_name` | path | string | Yes | Unique human readable name of the event | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot event-catalog getEvent \ + -p event_name=example +``` + +Using positional args for path parameters: + +```bash +epilot event-catalog getEvent example +``` + +With JSONata filter: + +```bash +epilot event-catalog getEvent -p event_name=example --jsonata '$' +``` + +
+Sample Response + +```json +{ + "event_name": "AddMeterReading", + "event_title": "Add Meter Reading", + "event_description": "Triggered when a new meter reading is added", + "event_version": "1.0.0", + "event_status": "active", + "event_tags": ["builtin", "metering", "erp"], + "schema_fields": {}, + "entity_graph": { + "nodes": [ + { + "id": "contact", + "schema": "contact", + "cardinality": "one", + "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"] + } + ], + "edges": [ + { + "from": "contact", + "to": "billing_account" + } + ] + }, + "entity_operation": { + "operation": ["createEntity", "updateEntity"], + "schema": ["contact", "contract", "order"], + "attribute": ["email", "phone", "status"], + "purpose": ["Kündigung", "Umzug/Auszug"] + }, + "enabled": true, + "auto_trigger": true, + "automation_trigger": true +} +``` + +
+ +--- + +### `patchEvent` + +Update the configuration of a specific business event for the organization + +`PATCH /v1/events/{event_name}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `event_name` | path | string | Yes | Unique human readable name of the event | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot event-catalog patchEvent \ + -p event_name=example +``` + +With request body: + +```bash +epilot event-catalog patchEvent \ + -p event_name=example \ + -d '{ + "event_name": "AddMeterReading", + "event_title": "Add Meter Reading", + "event_description": "Triggered when a new meter reading is added", + "event_version": "1.0.0", + "event_status": "active", + "event_tags": ["builtin", "metering", "erp"], + "schema_fields": {}, + "entity_graph": { + "nodes": [ + { + "id": "contact", + "schema": "contact", + "cardinality": "one", + "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"] + } + ], + "edges": [ + { + "from": "contact", + "to": "billing_account" + } + ] + }, + "entity_operation": { + "operation": ["createEntity", "updateEntity"], + "schema": ["contact", "contract", "order"], + "attribute": ["email", "phone", "status"], + "purpose": ["Kündigung", "Umzug/Auszug"] + }, + "enabled": true, + "auto_trigger": true, + "automation_trigger": true +}' +``` + +Using positional args for path parameters: + +```bash +epilot event-catalog patchEvent example +``` + +Using stdin pipe: + +```bash +cat body.json | epilot event-catalog patchEvent -p event_name=example +``` + +With JSONata filter: + +```bash +epilot event-catalog patchEvent -p event_name=example --jsonata '$' +``` + +
+Sample Response + +```json +{ + "event_name": "AddMeterReading", + "event_title": "Add Meter Reading", + "event_description": "Triggered when a new meter reading is added", + "event_version": "1.0.0", + "event_status": "active", + "event_tags": ["builtin", "metering", "erp"], + "schema_fields": {}, + "entity_graph": { + "nodes": [ + { + "id": "contact", + "schema": "contact", + "cardinality": "one", + "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"] + } + ], + "edges": [ + { + "from": "contact", + "to": "billing_account" + } + ] + }, + "entity_operation": { + "operation": ["createEntity", "updateEntity"], + "schema": ["contact", "contract", "order"], + "attribute": ["email", "phone", "status"], + "purpose": ["Kündigung", "Umzug/Auszug"] + }, + "enabled": true, + "auto_trigger": true, + "automation_trigger": true +} +``` + +
+ +--- + +### `getEventJSONSchema` + +Retrieve the JSON Schema of a specific business event + +`GET /v1/events/{event_name}/json_schema` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `event_name` | path | string | Yes | Unique human readable name of the event | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot event-catalog getEventJSONSchema \ + -p event_name=example +``` + +Using positional args for path parameters: + +```bash +epilot event-catalog getEventJSONSchema example +``` + +With JSONata filter: + +```bash +epilot event-catalog getEventJSONSchema -p event_name=example --jsonata '$' +``` + +
+Sample Response + +```json +{ + "type": "object", + "properties": { + "_org_id": { + "type": "string", + "description": "epilot tenant/organization ID" + }, + "_event_time": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when event occurred" + }, + "_event_id": { + "type": "string", + "description": "Unique event identifier (ULID)" + }, + "_event_name": { + "type": "string", + "description": "Event name from catalog" + }, + "_event_version": { + "type": "string", + "description": "Event version (semver)" + }, + "_event_source": { + "type": "string", + "description": "Source that triggered the event" + }, + "reading_value": { + "type": "number", + "description": "The meter reading value" + }, + "reading_date": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when reading was taken" + }, + "read_by": { + "type": "string", + "description": "Name or identifier of who submitted the reading" + }, + "reason": { + "type": "string", + "enum": ["regular", "move-in", "move-out", "supplier-change", "correction", "final"], + "description": "Reason for the meter reading" + }, + "direction": { + "type": "string", + "enum": ["feed-in", "feed-out"], + "description": "Direction of energy flow" + }, + "source": { + "type": "string", + "enum": ["portal", "360", "api", "automation"], + "description": "Source system where reading was submitted" + }, + "meter_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the meter" + }, + "counter_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the meter counter" + }, + "meter_number": { + "type": "string", + "description": "Human-readable meter number" + }, + "obis_number": { + "type": "string", + "description": "OBIS code of the counter" + }, + "unit": { + "type": "string", + "description": "Unit of measurement (e.g., kWh, m3)" + }, + "customer_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the customer" + }, + "contract_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the contract" + }, + "user_id": { + "type": "string", + "description": "ID of the user who submitted the reading" + }, + "user_email": { + "type": "string", + "format": "email", + "description": "Email of the user who submitted the reading" + } + }, + "required": ["_org_id", "_event_time", "_event_id", "_event_name", "_event_version", "_event_source", "reading_value", "reading_date", "read_by", "reason", "direction", "source", "meter_id", "counter_id", "meter_number", "obis_number", "unit", "customer_id", "contract_id"] +} +``` + +
+ +--- + +### `getEventExample` + +Generate a sample event payload based on the event's JSON Schema + +`GET /v1/events/{event_name}/example` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `event_name` | path | string | Yes | Unique human readable name of the event | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot event-catalog getEventExample \ + -p event_name=example +``` + +Using positional args for path parameters: + +```bash +epilot event-catalog getEventExample example +``` + +With JSONata filter: + +```bash +epilot event-catalog getEventExample -p event_name=example --jsonata '$' +``` + +
+Sample Response + +```json +{} +``` + +
+ +--- + +### `searchEventHistory` + +Paginated history of events + +`POST /v1/events/{event_name}:history` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `event_name` | path | string | Yes | Unique human readable name of the event | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot event-catalog searchEventHistory \ + -p event_name=example +``` + +With request body: + +```bash +epilot event-catalog searchEventHistory \ + -p event_name=example \ + -d '{ + "limit": 10, + "cursor": { + "event_time": "2025-10-31 12:34:56", + "event_id": "evt_1234567890abcdef" + }, + "timestamp": { + "from": "2025-10-01T00:00:00Z", + "to": "2025-10-31T23:59:59Z" + }, + "event_id": "evt_1234567890abcdef" +}' +``` + +Using positional args for path parameters: + +```bash +epilot event-catalog searchEventHistory example +``` + +Using stdin pipe: + +```bash +cat body.json | epilot event-catalog searchEventHistory -p event_name=example +``` + +With JSONata filter: + +```bash +epilot event-catalog searchEventHistory -p event_name=example --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "_org_id": "org_123456", + "_event_time": "2024-01-01T12:00:00Z", + "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F", + "_event_name": "MeterReading", + "_event_version": "1.0.0", + "_event_source": "api", + "_trigger_source_type": "api", + "_trigger_source": "user_123456", + "reading_value": 123.45, + "reading_date": "2024-01-01T11:59:00Z", + "read_by": "John Doe", + "reason": "regular", + "direction": "feed-out", + "source": "portal", + "meter_id": "550e8400-e29b-41d4-a716-446655440000", + "counter_id": "660e8400-e29b-41d4-a716-446655440000", + "meter_number": "MT123456789", + "obis_number": "1-0:1.8.0", + "unit": "kWh", + "customer_id": "770e8400-e29b-41d4-a716-446655440000", + "contract_id": "880e8400-e29b-41d4-a716-446655440000" + } + ], + "next_cursor": { + "event_time": "2025-10-31T12:34:56Z", + "event_id": "evt_1234567890abcdef" + } +} +``` + +
+ +--- + +### `triggerEvent` + +Explicitly trigger an event by providing input field values and an optional entity seed + +`POST /v1/events/{event_name}:trigger` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `event_name` | path | string | Yes | Unique human readable name of the event | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot event-catalog triggerEvent \ + -p event_name=example +``` + +With request body: + +```bash +epilot event-catalog triggerEvent \ + -p event_name=example \ + -d '{ + "seed": { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "node_id": "string" + }, + "fields": {}, + "skip_hydration": ["string"], + "_trigger_source_type": "string", + "_trigger_source": "string" +}' +``` + +Using positional args for path parameters: + +```bash +epilot event-catalog triggerEvent example +``` + +Using stdin pipe: + +```bash +cat body.json | epilot event-catalog triggerEvent -p event_name=example +``` + +With JSONata filter: + +```bash +epilot event-catalog triggerEvent -p event_name=example --jsonata 'success' +``` + +
+Sample Response + +```json +{ + "success": true, + "event_id": "string", + "event_bridge_event_id": "string" +} +``` + +
+ +--- diff --git a/packages/cli/docs/file.md b/packages/cli/docs/file.md new file mode 100644 index 00000000..209a9bb3 --- /dev/null +++ b/packages/cli/docs/file.md @@ -0,0 +1,1770 @@ +# File API + +- **Base URL:** `https://file.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/file](https://docs.epilot.io/api/file) + +The File API enables you to upload, store, manage, and share files within the epilot platform. + +## Quick Start + +```bash +# List available operations +epilot file + +# Call an operation +epilot file uploadFileV2 +``` + +## Operations + +**File** +- [`uploadFileV2`](#uploadfilev2) — Create pre-signed S3 URL to upload a file to keep temporarily (one week). +- [`saveFileV2`](#savefilev2) — Saves a permanent file entity. Updates an existing file entity when `_id` is passed. +- [`getFile`](#getfile) — Get a file entity by id +- [`deleteFile`](#deletefile) — Delete a file entity by id +- [`downloadFile`](#downloadfile) — Generate a pre-signed download URL for a file. +- [`downloadS3File`](#downloads3file) — Generate a pre-signed download URL for a file using its S3 reference. +- [`downloadFiles`](#downloadfiles) — Bulk generate pre-signed download URLs for multiple files in a single request. +- [`verifyCustomDownloadUrl`](#verifycustomdownloadurl) — Verify that a custom download URL is valid and has not expired. +- [`uploadFilePublic`](#uploadfilepublic) — Create a pre-signed S3 URL for uploading a file without authentication. + +**Preview** +- [`previewFile`](#previewfile) — Generate a thumbnail preview for a file entity. +- [`previewS3FileGet`](#previews3fileget) — Get a thumbnail preview from an S3 reference using query parameters. +- [`previewS3File`](#previews3file) — Generate a thumbnail preview from an S3 reference. +- [`previewPublicFile`](#previewpublicfile) — Generate a thumbnail preview for a public file entity. + +**Session** +- [`getSession`](#getsession) — Start a browser session by converting a Bearer token into a server-side cookie. +- [`deleteSession`](#deletesession) — End a browser session by deleting the token cookie. + +**Public Links** +- [`listPublicLinksForFile`](#listpubliclinksforfile) — **Not yet implemented.** +- [`generatePublicLink`](#generatepubliclink) — Generate a public link to share a private file externally. +- [`accessPublicLink`](#accesspubliclink) — Access a file via its public link. +- [`revokePublicLink`](#revokepubliclink) — **Not yet implemented.** + +**File Collections** +- [`getUserSchemaFileCollections`](#getuserschemafilecollections) — Get all file collections for the current user within a specific schema. +- [`createUserSchemaFileCollection`](#createuserschemafilecollection) — Create a new file collection for the current user within a specific schema. +- [`updateUserSchemaFileCollection`](#updateuserschemafilecollection) — Update an existing file collection. +- [`deleteUserSchemaFileCollection`](#deleteuserschemafilecollection) — Delete a file collection. +- [`getFilesInCollection`](#getfilesincollection) — Get all files within a specific collection for an entity. +- [`getGlobalFileCollections`](#getglobalfilecollections) — Get all global file collections for a specific schema. + +### `uploadFileV2` + +Create pre-signed S3 URL to upload a file to keep temporarily (one week). + +`POST /v2/files/upload` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `file_entity_id` | query | string \| string (uuid) | No | Use this parameter when uploading a file directly to an existing file entity. + +Note: still requires calling saveFileV2 to save the file permanently. + | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file uploadFileV2 \ + -d '{"filename":"document.pdf","mime_type":"application/pdf","index_tag":"2f6a377c8e78","metadata":{"color":"blue"}}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot file uploadFileV2 +``` + +With JSONata filter: + +```bash +epilot file uploadFileV2 --jsonata 's3ref' +``` + +
+Sample Response + +```json +{ + "s3ref": { + "bucket": "epilot-prod-user-content", + "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + }, + "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123", + "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" +} +``` + +
+ +--- + +### `saveFileV2` + +Saves a permanent file entity. Updates an existing file entity when `_id` is passed. + +`POST /v2/files` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `activity_id` | query | string (ulid) | No | Activity to include in event feed | +| `fill_activity` | query | boolean | No | Update the diff and entity for the custom activity included in the query. +Pending state on activity is automatically ended when activity is filled. + | +| `strict` | query | boolean | No | When passed true, the response will contain only fields that match the schema, with non-matching fields included in `__additional` | +| `async` | query | boolean | No | Don't wait for updated entity to become available in Search API. Useful for large migrations | +| `delete_temp_file` | query | boolean | No | Delete the temp file from S3 after copying it permanently | +| `version_only` | query | boolean | No | When true, only adds a new file version and updates the entity's +s3ref to point to the new version, without overwriting the entity's +existing top-level metadata. The entity's filename, type, and other | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file saveFileV2 +``` + +With request body: + +```bash +epilot file saveFileV2 \ + -d '{ + "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8", + "file_entity_id": "string", + "relations": [ + { + "entity_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8", + "_schema": "contact", + "_tags": ["string"] + } + ], + "_tags": ["tag1", "tag2"], + "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "filename": "document.pdf", + "type": "document", + "mime_type": "application/pdf", + "size_bytes": 1234, + "readable_size": "1.2 MB", + "access_control": "private", + "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf", + "custom_download_url": "https://some-api-url.com/download?file_id=123", + "s3ref": {} +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot file saveFileV2 +``` + +With JSONata filter: + +```bash +epilot file saveFileV2 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_title": "document.pdf", + "_schema": "file", + "_org": "123", + "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8", + "_tags": ["tag1", "tag2"], + "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "filename": "document.pdf", + "type": "document", + "mime_type": "application/pdf", + "size_bytes": 1234, + "readable_size": "1.2 MB", + "access_control": "private", + "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf", + "custom_download_url": "https://some-api-url.com/download?file_id=123", + "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf", + "s3ref": {}, + "versions": [ + { + "s3ref": {}, + "filename": "document.pdf", + "size_bytes": 1234, + "readable_size": "1.2 MB", + "mime_type": "image/jpeg" + } + ], + "_updated_at": "1970-01-01T00:00:00.000Z", + "_created_at": "1970-01-01T00:00:00.000Z", + "_acl": { + "view": ["org:456"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "__additional": {} +} +``` + +
+ +--- + +### `getFile` + +Get a file entity by id + +`GET /v2/files/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string \| string (uuid) | Yes | | +| `source_url` | query | boolean | No | | +| `strict` | query | boolean | No | When passed true, the response will contain only fields that match the schema, with non-matching fields included in `__additional` | +| `async` | query | boolean | No | Don't wait for updated entity to become available in Search API. Useful for large migrations | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file getFile \ + -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 +``` + +Using positional args for path parameters: + +```bash +epilot file getFile ef7d985c-2385-44f4-9c71-ae06a52264f8 +``` + +With JSONata filter: + +```bash +epilot file getFile -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_title": "document.pdf", + "_schema": "file", + "_org": "123", + "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8", + "_tags": ["tag1", "tag2"], + "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "filename": "document.pdf", + "type": "document", + "mime_type": "application/pdf", + "size_bytes": 1234, + "readable_size": "1.2 MB", + "access_control": "private", + "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf", + "custom_download_url": "https://some-api-url.com/download?file_id=123", + "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf", + "s3ref": {}, + "versions": [ + { + "s3ref": {}, + "filename": "document.pdf", + "size_bytes": 1234, + "readable_size": "1.2 MB", + "mime_type": "image/jpeg" + } + ], + "_updated_at": "1970-01-01T00:00:00.000Z", + "_created_at": "1970-01-01T00:00:00.000Z", + "_acl": { + "view": ["org:456"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "__additional": {} +} +``` + +
+ +--- + +### `deleteFile` + +Delete a file entity by id + +`DELETE /v2/files/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string \| string (uuid) | Yes | | +| `purge` | query | boolean | No | | +| `activity_id` | query | string (ulid) | No | Activity to include in event feed | +| `strict` | query | boolean | No | When passed true, the response will contain only fields that match the schema, with non-matching fields included in `__additional` | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file deleteFile \ + -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 +``` + +Using positional args for path parameters: + +```bash +epilot file deleteFile ef7d985c-2385-44f4-9c71-ae06a52264f8 +``` + +With JSONata filter: + +```bash +epilot file deleteFile -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_title": "document.pdf", + "_schema": "file", + "_org": "123", + "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8", + "_tags": ["tag1", "tag2"], + "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "filename": "document.pdf", + "type": "document", + "mime_type": "application/pdf", + "size_bytes": 1234, + "readable_size": "1.2 MB", + "access_control": "private", + "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf", + "custom_download_url": "https://some-api-url.com/download?file_id=123", + "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf", + "s3ref": {}, + "versions": [ + { + "s3ref": {}, + "filename": "document.pdf", + "size_bytes": 1234, + "readable_size": "1.2 MB", + "mime_type": "image/jpeg" + } + ], + "_updated_at": "1970-01-01T00:00:00.000Z", + "_created_at": "1970-01-01T00:00:00.000Z", + "_acl": { + "view": ["org:456"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "__additional": {} +} +``` + +
+ +--- + +### `downloadFile` + +Generate a pre-signed download URL for a file. + +`GET /v1/files/{id}/download` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string \| string (uuid) | Yes | The UUID of the file entity | +| `version` | query | number | No | Index of the file version to download (0 = latest) | +| `attachment` | query | boolean | No | Controls the Content-Disposition header. Set to `true` to trigger browser download dialog, `false` to display inline. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file downloadFile \ + -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 +``` + +Using positional args for path parameters: + +```bash +epilot file downloadFile ef7d985c-2385-44f4-9c71-ae06a52264f8 +``` + +With JSONata filter: + +```bash +epilot file downloadFile -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 --jsonata 'download_url' +``` + +
+Sample Response + +```json +{ + "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123" +} +``` + +
+ +--- + +### `downloadS3File` + +Generate a pre-signed download URL for a file using its S3 reference. + +`POST /v1/files:downloadS3` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `s3_key` | query | string | Yes | The S3 object key | +| `s3_bucket` | query | string | Yes | The S3 bucket name | +| `attachment` | query | boolean | No | Controls the Content-Disposition header. Set to `true` to trigger browser download dialog, `false` to display inline. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file downloadS3File \ + -p s3_key=123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf \ + -p s3_bucket=epilot-prod-user-content +``` + +With JSONata filter: + +```bash +epilot file downloadS3File -p s3_key=123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf -p s3_bucket=epilot-prod-user-content --jsonata 'download_url' +``` + +
+Sample Response + +```json +{ + "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123" +} +``` + +
+ +--- + +### `downloadFiles` + +Bulk generate pre-signed download URLs for multiple files in a single request. + +`POST /v1/files:downloadFiles` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file downloadFiles \ + -d '[{"id":"ef7d985c-2385-44f4-9c71-ae06a52264f8","version":0}]' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot file downloadFiles +``` + +With JSONata filter: + +```bash +epilot file downloadFiles --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123", + "file_entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + } +] +``` + +
+ +--- + +### `previewFile` + +Generate a thumbnail preview for a file entity. + +`GET /v1/files/{id}/preview` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string \| string (uuid) | Yes | The UUID of the file entity | +| `version` | query | number | No | Index of the file version to preview (0 = latest) | +| `w` | query | number | No | Desired width in pixels (maintains aspect ratio if only width is specified) | +| `h` | query | number | No | Desired height in pixels (maintains aspect ratio if only height is specified) | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file previewFile \ + -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 +``` + +Using positional args for path parameters: + +```bash +epilot file previewFile ef7d985c-2385-44f4-9c71-ae06a52264f8 +``` + +With JSONata filter: + +```bash +epilot file previewFile -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 --jsonata '$' +``` + +--- + +### `previewS3FileGet` + +Get a thumbnail preview from an S3 reference using query parameters. + +`GET /v1/files:previewS3` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `key` | query | string | Yes | The S3 object key | +| `bucket` | query | string | Yes | The S3 bucket name | +| `w` | query | number | No | Desired width in pixels | +| `h` | query | number | No | Desired height in pixels | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file previewS3FileGet \ + -p key=123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/image.png \ + -p bucket=epilot-prod-user-content +``` + +With JSONata filter: + +```bash +epilot file previewS3FileGet -p key=123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/image.png -p bucket=epilot-prod-user-content --jsonata '$' +``` + +--- + +### `previewS3File` + +Generate a thumbnail preview from an S3 reference. + +`POST /v1/files:previewS3` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `w` | query | number | No | Desired width in pixels | +| `h` | query | number | No | Desired height in pixels | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file previewS3File \ + -d '{}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot file previewS3File +``` + +With JSONata filter: + +```bash +epilot file previewS3File --jsonata '$' +``` + +--- + +### `previewPublicFile` + +Generate a thumbnail preview for a public file entity. + +`GET /v1/files/public/{id}/preview` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string \| string (uuid) | Yes | The UUID of the public file entity | +| `version` | query | number | No | Index of the file version to preview (0 = latest) | +| `w` | query | number | No | Desired width in pixels | +| `h` | query | number | No | Desired height in pixels | +| `org_id` | query | string | No | Organization ID that owns the file | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file previewPublicFile \ + -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 +``` + +Using positional args for path parameters: + +```bash +epilot file previewPublicFile ef7d985c-2385-44f4-9c71-ae06a52264f8 +``` + +With JSONata filter: + +```bash +epilot file previewPublicFile -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 --jsonata '$' +``` + +--- + +### `getSession` + +Start a browser session by converting a Bearer token into a server-side cookie. + +`GET /v1/files/session` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file getSession +``` + +With JSONata filter: + +```bash +epilot file getSession --jsonata '$' +``` + +--- + +### `deleteSession` + +End a browser session by deleting the token cookie. + +`DELETE /v1/files/session` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file deleteSession +``` + +With JSONata filter: + +```bash +epilot file deleteSession --jsonata '$' +``` + +--- + +### `listPublicLinksForFile` + +**Not yet implemented.** + +`GET /v1/files/{id}/public/links` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The UUID of the file entity | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file listPublicLinksForFile \ + -p id=13d22918-36bd-4227-9ad4-2cb978788c8d +``` + +Using positional args for path parameters: + +```bash +epilot file listPublicLinksForFile 13d22918-36bd-4227-9ad4-2cb978788c8d +``` + +With JSONata filter: + +```bash +epilot file listPublicLinksForFile -p id=13d22918-36bd-4227-9ad4-2cb978788c8d --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "3ef5c6d9-818d-45e6-8efb-b1de59079a1c", + "link": "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c", + "last_accessed_at": "string" + } + ] +} +``` + +
+ +--- + +### `generatePublicLink` + +Generate a public link to share a private file externally. + +`POST /v1/files/{id}/public/links` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string \| string (uuid) | Yes | The UUID of the file entity to share | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file generatePublicLink \ + -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 +``` + +Using positional args for path parameters: + +```bash +epilot file generatePublicLink ef7d985c-2385-44f4-9c71-ae06a52264f8 +``` + +With JSONata filter: + +```bash +epilot file generatePublicLink -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 --jsonata '$' +``` + +
+Sample Response + +```json +"string" +``` + +
+ +--- + +### `accessPublicLink` + +Access a file via its public link. + +`GET /v1/files/public/links/{id}/{filename}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The UUID of the public link (not the file entity ID) | +| `filename` | path | string | Yes | The filename (for user-friendly URLs) | +| `hash` | query | string | No | Optional cache-busting hash to force re-download | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file accessPublicLink \ + -p id=13d22918-36bd-4227-9ad4-2cb978788c8d \ + -p filename=invoice-2023-12.pdf +``` + +Using positional args for path parameters: + +```bash +epilot file accessPublicLink 13d22918-36bd-4227-9ad4-2cb978788c8d invoice-2023-12.pdf +``` + +With JSONata filter: + +```bash +epilot file accessPublicLink -p id=13d22918-36bd-4227-9ad4-2cb978788c8d -p filename=invoice-2023-12.pdf --jsonata '$' +``` + +--- + +### `revokePublicLink` + +**Not yet implemented.** + +`DELETE /v1/files/public/links/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The UUID of the public link to revoke | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file revokePublicLink \ + -p id=13d22918-36bd-4227-9ad4-2cb978788c8d +``` + +Using positional args for path parameters: + +```bash +epilot file revokePublicLink 13d22918-36bd-4227-9ad4-2cb978788c8d +``` + +With JSONata filter: + +```bash +epilot file revokePublicLink -p id=13d22918-36bd-4227-9ad4-2cb978788c8d --jsonata '$' +``` + +--- + +### `verifyCustomDownloadUrl` + +Verify that a custom download URL is valid and has not expired. + +`POST /v1/files/download:verify` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file verifyCustomDownloadUrl \ + -d '{"custom_download_url":"https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot file verifyCustomDownloadUrl +``` + +With JSONata filter: + +```bash +epilot file verifyCustomDownloadUrl --jsonata 'valid' +``` + +
+Sample Response + +```json +{ + "valid": true +} +``` + +
+ +--- + +### `uploadFilePublic` + +Create a pre-signed S3 URL for uploading a file without authentication. + +`POST /v1/files/public/upload` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file uploadFilePublic \ + -d '{"filename":"document.pdf","mime_type":"application/pdf","index_tag":"2f6a377c8e78","metadata":{"color":"blue"}}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot file uploadFilePublic +``` + +With JSONata filter: + +```bash +epilot file uploadFilePublic --jsonata 's3ref' +``` + +
+Sample Response + +```json +{ + "s3ref": { + "bucket": "epilot-prod-user-content", + "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + }, + "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123", + "error": "File entity not found" +} +``` + +
+ +--- + +### `getUserSchemaFileCollections` + +Get all file collections for the current user within a specific schema. + +`GET /v1/{slug}/collections` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | The entity schema slug (e.g., order, opportunity, contact) | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file getUserSchemaFileCollections \ + -p slug=opportunity +``` + +Using positional args for path parameters: + +```bash +epilot file getUserSchemaFileCollections opportunity +``` + +With JSONata filter: + +```bash +epilot file getUserSchemaFileCollections -p slug=opportunity --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents", + "name": "Documents", + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"], + "starred": false, + "order": 0, + "enabled_locations": ["string"], + "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"], + "created_at": "2024-01-01T12:00:00Z", + "updated_at": "2024-01-02T12:00:00Z" + } +] +``` + +
+ +--- + +### `createUserSchemaFileCollection` + +Create a new file collection for the current user within a specific schema. + +`POST /v1/{slug}/collections` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | The entity schema slug (e.g., order, opportunity, contact) | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file createUserSchemaFileCollection \ + -p slug=opportunity \ + -d '{"name":"string","parents":["string"],"starred":false,"enabled_locations":["string"],"enabled_purposes":["string"]}' +``` + +Using positional args for path parameters: + +```bash +epilot file createUserSchemaFileCollection opportunity +``` + +Using stdin pipe: + +```bash +cat body.json | epilot file createUserSchemaFileCollection -p slug=opportunity +``` + +With JSONata filter: + +```bash +epilot file createUserSchemaFileCollection -p slug=opportunity --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents", + "name": "Documents", + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"], + "starred": false, + "order": 0, + "enabled_locations": ["string"], + "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"], + "created_at": "2024-01-01T12:00:00Z", + "updated_at": "2024-01-02T12:00:00Z" +} +``` + +
+ +--- + +### `updateUserSchemaFileCollection` + +Update an existing file collection. + +`PUT /v1/{slug}/collections/{collectionSlug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | The entity schema slug (e.g., order, opportunity) | +| `collectionSlug` | path | string | Yes | The collection slug identifier | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file updateUserSchemaFileCollection \ + -p slug=opportunity \ + -p collectionSlug=documents \ + -d '{"name":"string","parents":["string"],"starred":false,"enabled_locations":["string"],"enabled_purposes":["string"]}' +``` + +Using positional args for path parameters: + +```bash +epilot file updateUserSchemaFileCollection opportunity documents +``` + +Using stdin pipe: + +```bash +cat body.json | epilot file updateUserSchemaFileCollection -p slug=opportunity -p collectionSlug=documents +``` + +With JSONata filter: + +```bash +epilot file updateUserSchemaFileCollection -p slug=opportunity -p collectionSlug=documents --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents", + "name": "Documents", + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"], + "starred": false, + "order": 0, + "enabled_locations": ["string"], + "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"], + "created_at": "2024-01-01T12:00:00Z", + "updated_at": "2024-01-02T12:00:00Z" +} +``` + +
+ +--- + +### `deleteUserSchemaFileCollection` + +Delete a file collection. + +`DELETE /v1/{slug}/collections/{collectionSlug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `slug` | path | string | Yes | The entity schema slug (e.g., order, opportunity) | +| `collectionSlug` | path | string | Yes | The collection slug identifier | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file deleteUserSchemaFileCollection \ + -p slug=opportunity \ + -p collectionSlug=documents +``` + +Using positional args for path parameters: + +```bash +epilot file deleteUserSchemaFileCollection opportunity documents +``` + +With JSONata filter: + +```bash +epilot file deleteUserSchemaFileCollection -p slug=opportunity -p collectionSlug=documents --jsonata '$' +``` + +--- + +### `getFilesInCollection` + +Get all files within a specific collection for an entity. + +`GET /v1/entity/{id}/collections/{collectionSlug}/files` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Entity id | +| `collectionSlug` | path | string | Yes | The collection slug identifier | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file getFilesInCollection \ + -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 \ + -p collectionSlug=documents +``` + +Using positional args for path parameters: + +```bash +epilot file getFilesInCollection ef7d985c-2385-44f4-9c71-ae06a52264f8 documents +``` + +With JSONata filter: + +```bash +epilot file getFilesInCollection -p id=ef7d985c-2385-44f4-9c71-ae06a52264f8 -p collectionSlug=documents --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "_title": "document.pdf", + "_schema": "file", + "_org": "123", + "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8", + "_tags": ["tag1", "tag2"], + "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "filename": "document.pdf", + "type": "document", + "mime_type": "application/pdf", + "size_bytes": 1234, + "readable_size": "1.2 MB", + "access_control": "private", + "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf", + "custom_download_url": "https://some-api-url.com/download?file_id=123", + "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf", + "s3ref": {}, + "versions": [ + { + "s3ref": {}, + "filename": "document.pdf", + "size_bytes": 1234, + "readable_size": "1.2 MB", + "mime_type": "image/jpeg" + } + ], + "_updated_at": "1970-01-01T00:00:00.000Z", + "_created_at": "1970-01-01T00:00:00.000Z", + "_acl": { + "view": ["org:456"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "__additional": {} + } +] +``` + +
+ +--- + +### `getGlobalFileCollections` + +Get all global file collections for a specific schema. + +`GET /v1/collections/{schemaSlug}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `schemaSlug` | path | string | Yes | The entity schema slug (e.g., order, opportunity, contact) | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot file getGlobalFileCollections \ + -p schemaSlug=order +``` + +Using positional args for path parameters: + +```bash +epilot file getGlobalFileCollections order +``` + +With JSONata filter: + +```bash +epilot file getGlobalFileCollections -p schemaSlug=order --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents", + "name": "Documents", + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"], + "starred": false, + "order": 0, + "enabled_locations": ["string"], + "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"], + "created_at": "2024-01-01T12:00:00Z", + "updated_at": "2024-01-02T12:00:00Z" + } +] +``` + +
+ +--- + +## Deprecated Operations + +- ~~`uploadFile`~~ POST `/v1/files/upload` +- ~~`saveFile`~~ POST `/v1/files` diff --git a/packages/cli/docs/iban.md b/packages/cli/docs/iban.md new file mode 100644 index 00000000..ad0e21a8 --- /dev/null +++ b/packages/cli/docs/iban.md @@ -0,0 +1,68 @@ +# Iban API + +- **Base URL:** `https://iban-api.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/iban](https://docs.epilot.io/api/iban) + +API Backend for epilot Iban feature. + +## Quick Start + +```bash +# List available operations +epilot iban + +# Call an operation +epilot iban validateIban +``` + +## Operations + +**Ibans** +- [`validateIban`](#validateiban) — Validate an Iban + +### `validateIban` + +Validate an Iban + +`POST /v1/public/iban:validate` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot iban validateIban \ + -d '{"iban":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot iban validateIban +``` + +With JSONata filter: + +```bash +epilot iban validateIban --jsonata '$' +``` + +--- diff --git a/packages/cli/docs/index.md b/packages/cli/docs/index.md new file mode 100644 index 00000000..a8ebd24f --- /dev/null +++ b/packages/cli/docs/index.md @@ -0,0 +1,100 @@ +# epilot CLI — API Reference + +All 46 epilot APIs available via the CLI. + +## Setup + +```bash +npx epilot auth login +``` + +## APIs + +| API | Command | Operations | Docs | +| --- | ------- | ---------- | ---- | +| Access Token API | `epilot access-token` | 7 | [access-token.md](./access-token.md) | +| Address API | `epilot address` | 3 | [address.md](./address.md) | +| Address Suggestions API | `epilot address-suggestions` | 4 | [address-suggestions.md](./address-suggestions.md) | +| AI Agents API - OpenAPI 3.0 | `epilot ai-agents` | 12 | [ai-agents.md](./ai-agents.md) | +| App API | `epilot app` | 30 | [app.md](./app.md) | +| Audit Log | `epilot audit-logs` | 2 | [audit-logs.md](./audit-logs.md) | +| Automation API | `epilot automation` | 16 | [automation.md](./automation.md) | +| Billing API | `epilot billing` | 10 | [billing.md](./billing.md) | +| Blueprint Manifest API | `epilot blueprint-manifest` | 33 | [blueprint-manifest.md](./blueprint-manifest.md) | +| Consent API | `epilot consent` | 3 | [consent.md](./consent.md) | +| Portal API | `epilot customer-portal` | 134 | [customer-portal.md](./customer-portal.md) | +| Dashboard API | `epilot dashboard` | 7 | [dashboard.md](./dashboard.md) | +| Data Management API | `epilot data-management` | 10 | [data-management.md](./data-management.md) | +| Deduplication API | `epilot deduplication` | 1 | [deduplication.md](./deduplication.md) | +| Design Builder API v2 | `epilot design` | 13 | [design.md](./design.md) | +| Document API | `epilot document` | 3 | [document.md](./document.md) | +| Messaging Settings API | `epilot email-settings` | 31 | [email-settings.md](./email-settings.md) | +| Email template API | `epilot email-template` | 7 | [email-template.md](./email-template.md) | +| Entity API | `epilot entity` | 81 | [entity.md](./entity.md) | +| Entity Mapping API | `epilot entity-mapping` | 12 | [entity-mapping.md](./entity-mapping.md) | +| Environments API | `epilot environments` | 5 | [environments.md](./environments.md) | +| ERP Integration API | `epilot erp-integration` | 33 | [erp-integration.md](./erp-integration.md) | +| Event Catalog API | `epilot event-catalog` | 7 | [event-catalog.md](./event-catalog.md) | +| File API | `epilot file` | 27 | [file.md](./file.md) | +| Iban API | `epilot iban` | 1 | [iban.md](./iban.md) | +| Journey API | `epilot journey` | 16 | [journey.md](./journey.md) | +| Kanban API | `epilot kanban` | 10 | [kanban.md](./kanban.md) | +| Message API | `epilot message` | 46 | [message.md](./message.md) | +| Metering API | `epilot metering` | 16 | [metering.md](./metering.md) | +| Notes API | `epilot notes` | 12 | [notes.md](./notes.md) | +| Notification API | `epilot notification` | 14 | [notification.md](./notification.md) | +| Organization API | `epilot organization` | 6 | [organization.md](./organization.md) | +| Partner API | `epilot partner-directory` | 16 | [partner-directory.md](./partner-directory.md) | +| Permissions API | `epilot permissions` | 13 | [permissions.md](./permissions.md) | +| Pricing API | `epilot pricing` | 22 | [pricing.md](./pricing.md) | +| Pricing Tier API | `epilot pricing-tier` | 1 | [pricing-tier.md](./pricing-tier.md) | +| Purpose API | `epilot purpose` | 6 | [purpose.md](./purpose.md) | +| Sandbox API | `epilot sandbox` | 7 | [sandbox.md](./sandbox.md) | +| Submission API | `epilot submission` | 2 | [submission.md](./submission.md) | +| Targeting API | `epilot targeting` | 11 | [targeting.md](./targeting.md) | +| Template Variables API | `epilot template-variables` | 12 | [template-variables.md](./template-variables.md) | +| User API | `epilot user` | 34 | [user.md](./user.md) | +| Validation Rules API | `epilot validation-rules` | 7 | [validation-rules.md](./validation-rules.md) | +| Webhooks | `epilot webhooks` | 14 | [webhooks.md](./webhooks.md) | +| Workflows Executions | `epilot workflow` | 23 | [workflow.md](./workflow.md) | +| Workflows Definitions | `epilot workflow-definition` | 24 | [workflow-definition.md](./workflow-definition.md) | + +## Global Flags + +| Flag | Alias | Description | +| ---- | ----- | ----------- | +| `--token ` | `-t` | Bearer token | +| `--profile ` | | Use a named profile (or `EPILOT_PROFILE` env) | +| `--server ` | `-s` | Override server base URL | +| `--json` | | Output raw JSON (no colors) | +| `--verbose` | `-v` | Show full request details | +| `--include` | `-i` | Include response headers | +| `--jsonata ` | | Transform response with JSONata | +| `--guided` | | Prompt for all parameters interactively | +| `--no-interactive` | | Disable interactive prompts | +| `--definition ` | | Override OpenAPI spec | + +## Per-Operation Flags + +| Flag | Alias | Description | +| ---- | ----- | ----------- | +| `-p key=value` | `--param` | Set a parameter (repeatable) | +| `-d ''` | `--data` | Request body JSON | +| `-H 'Key: Value'` | `--header` | Custom header (repeatable) | + +## Profiles + +```bash +# Create profiles for different environments +epilot profile create dev --server https://entity.dev.sls.epilot.io --token +epilot profile create staging --server https://entity.staging.sls.epilot.io --token + +# Switch between profiles +epilot profile use dev + +# Or use per-command +epilot entity listSchemas --profile staging + +# Or via env var +EPILOT_PROFILE=dev epilot entity listSchemas +``` diff --git a/packages/cli/docs/journey.md b/packages/cli/docs/journey.md new file mode 100644 index 00000000..ed72d6c2 --- /dev/null +++ b/packages/cli/docs/journey.md @@ -0,0 +1,2057 @@ +# Journey API + +- **Base URL:** `https://journey-config.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/journey](https://docs.epilot.io/api/journey) + +API to configure journeys + +## Quick Start + +```bash +# List available operations +epilot journey + +# Call an operation +epilot journey getJourneysByOrgId -p id=123 +``` + +## Operations + +**Journeys** +- [`getJourneysByOrgId`](#getjourneysbyorgid) — Get all journeys by organization id +- [`getJourney`](#getjourney) — Get journey by id. Private journeys requires valid private token to be passed +- [`removeJourney`](#removejourney) — Remove journey by id +- [`getJourneyProducts`](#getjourneyproducts) — Get products available in the journey by id. requires public journey token to be passed. +- [`createJourney`](#createjourney) — Create a Journey +- [`updateJourney`](#updatejourney) — Update a Journey +- [`patchUpdateJourney`](#patchupdatejourney) — Update a Journey (partially / patch). Support for nested properties updates (e.g. "property[0].name"). +- [`searchJourneys`](#searchjourneys) — Search Journeys +- [`generateDocument`](#generatedocument) — Builds document generated from a template with journey values." +- [`getSettingsForJourney`](#getsettingsforjourney) — Get settings related to the journey using journey ID. +- [`getButtonOptions`](#getbuttonoptions) — Get button options from a csv file. + +**Journeys V2** +- [`createJourneyV2`](#createjourneyv2) — Create a Journey +- [`updateJourneyV2`](#updatejourneyv2) — Update a Journey +- [`patchUpdateJourneyV2`](#patchupdatejourneyv2) — Update a Journey (partially / patch). Support for nested properties updates (e.g. "property[0].name"). +- [`getJourneyV2`](#getjourneyv2) — Get journey by id +- [`removeJourneyV2`](#removejourneyv2) — Remove journey by id + +### `getJourneysByOrgId` + +Get all journeys by organization id + +`GET /v1/journey/organization/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Organization ID | +| `hydrate` | query | string | No | Hydrate | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey getJourneysByOrgId \ + -p id=123 +``` + +Using positional args for path parameters: + +```bash +epilot journey getJourneysByOrgId 123 +``` + +With JSONata filter: + +```bash +epilot journey getJourneysByOrgId -p id=123 --jsonata '$' +``` + +
+Sample Response + +```json +{} +``` + +
+ +--- + +### `getJourney` + +Get journey by id. Private journeys requires valid private token to be passed + +`GET /v1/journey/configuration/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Journey ID | +| `source` | query | string | No | What source ID. Journey or Entity ID | +| `orgId` | query | string | No | Organization ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey getJourney \ + -p id=509cdffe-424f-457a-95c2-9708c304ce77 +``` + +Using positional args for path parameters: + +```bash +epilot journey getJourney 509cdffe-424f-457a-95c2-9708c304ce77 +``` + +With JSONata filter: + +```bash +epilot journey getJourney -p id=509cdffe-424f-457a-95c2-9708c304ce77 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "journeyId": "string", + "organizationId": "string", + "brandId": "string", + "name": "string", + "steps": [ + { + "showStepName": true, + "title": "string", + "subTitle": "string", + "showStepSubtitle": true, + "showStepper": true, + "showStepperLabels": true, + "hideNextButton": true, + "name": "string", + "stepId": "string", + "schema": {}, + "uischema": {}, + "maxWidth": "small" + } + ], + "design": { + "logoUrl": "string", + "theme": {}, + "designTokens": {} + }, + "rules": [ + { + "type": "inject", + "sourceType": "journey", + "source": "string", + "target": "string" + } + ], + "logics": [ + { + "autoGeneratedId": "string", + "conditions": ["string"], + "actions": ["string"] + } + ], + "logicsV4": {}, + "contextSchema": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string", + "paramKey": "string", + "isRequired": true, + "shouldLoadEntity": true + } + ], + "journey_type": "Sales template (Premium)", + "settings": { + "embedOptions": { + "mode": "full-screen", + "lang": "de", + "width": "string", + "topBar": true, + "scrollToTop": true, + "button": {} + }, + "safeModeAutomation": true, + "canary": true, + "designId": "string", + "templateId": "string", + "entityId": "string", + "mappingsAutomationId": "string", + "targetedCustomer": "string", + "description": "string", + "organizationSettings": {}, + "publicToken": "string", + "runtimeEntities": ["ORDER"], + "filePurposes": ["string"], + "entityTags": ["string"], + "addressSuggestionsFileUrl": "string", + "addressSuggestionsFileId": "string", + "useNewDesign": true, + "useAustrianLabels": true, + "enableDarkMode": true, + "accessMode": "PUBLIC", + "isPublished": true, + "status": "string", + "isActive": true, + "savingProgress": { + "savingMode": "auto", + "supportedVersion": 0 + }, + "thirdPartyCookies": true + }, + "validationRules": { + "block1": "rule123", + "block2": { + "field1": "rule456", + "field2": "rule789" + } + }, + "createdBy": "string", + "updatedBy": "string", + "__lastModifiedAt": "string", + "createdAt": "string", + "lastModifiedAt": "string", + "deletedAt": "string", + "version": 0, + "revisions": 0, + "featureFlags": {} +} +``` + +
+ +--- + +### `removeJourney` + +Remove journey by id + +`DELETE /v1/journey/configuration/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Journey ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey removeJourney \ + -p id=509cdffe-424f-457a-95c2-9708c304ce77 +``` + +Using positional args for path parameters: + +```bash +epilot journey removeJourney 509cdffe-424f-457a-95c2-9708c304ce77 +``` + +With JSONata filter: + +```bash +epilot journey removeJourney -p id=509cdffe-424f-457a-95c2-9708c304ce77 --jsonata '$' +``` + +--- + +### `getJourneyProducts` + +Get products available in the journey by id. requires public journey token to be passed. + +`GET /v1/journey/products/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Journey ID | +| `source` | query | string | No | What source ID. Journey or Entity ID | +| `postal_code` | query | string | No | Zip Code for availibility | +| `city` | query | string | No | city for availibility | +| `street` | query | string | No | street name for availibility | +| `street_number` | query | string | No | street number for availibility | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey getJourneyProducts \ + -p id=509cdffe-424f-457a-95c2-9708c304ce77 +``` + +Using positional args for path parameters: + +```bash +epilot journey getJourneyProducts 509cdffe-424f-457a-95c2-9708c304ce77 +``` + +With JSONata filter: + +```bash +epilot journey getJourneyProducts -p id=509cdffe-424f-457a-95c2-9708c304ce77 --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "type": "string", + "_schema": "string", + "_title": "string", + "name": "string", + "_id": "string", + "_org": "string", + "code": "string", + "description": "string", + "feature": [], + "product_images": [], + "legal_footnote": "string", + "product_downloads": [], + "price": {} + } +] +``` + +
+ +--- + +### `createJourney` + +Create a Journey + +`POST /v1/journey/configuration` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `skipAutomation` | query | string (Yn) | No | skip creating an Automation (it takes Yn format "true, yes, 1, y") | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey createJourney +``` + +With request body: + +```bash +epilot journey createJourney \ + -d '{ + "journeyId": "string", + "organizationId": "string", + "brandId": "string", + "name": "string", + "steps": [ + { + "showStepName": true, + "title": "string", + "subTitle": "string", + "showStepSubtitle": true, + "showStepper": true, + "showStepperLabels": true, + "hideNextButton": true, + "name": "string", + "stepId": "string", + "schema": {}, + "uischema": {}, + "maxWidth": "small" + } + ], + "design": { + "logoUrl": "string", + "theme": {}, + "designTokens": {} + }, + "rules": [ + { + "type": "inject", + "sourceType": "journey", + "source": "string", + "target": "string" + } + ], + "logics": [ + { + "autoGeneratedId": "string", + "conditions": ["string"], + "actions": ["string"] + } + ], + "logicsV4": {}, + "contextSchema": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string", + "paramKey": "string", + "isRequired": true, + "shouldLoadEntity": true + } + ], + "journey_type": "Sales template (Premium)", + "settings": { + "embedOptions": { + "mode": "full-screen", + "lang": "de", + "width": "string", + "topBar": true, + "scrollToTop": true, + "button": {} + }, + "safeModeAutomation": true, + "canary": true, + "designId": "string", + "templateId": "string", + "entityId": "string", + "mappingsAutomationId": "string", + "targetedCustomer": "string", + "description": "string", + "organizationSettings": {}, + "publicToken": "string", + "runtimeEntities": ["ORDER"], + "filePurposes": ["string"], + "entityTags": ["string"], + "addressSuggestionsFileUrl": "string", + "addressSuggestionsFileId": "string", + "useNewDesign": true, + "useAustrianLabels": true, + "enableDarkMode": true, + "accessMode": "PUBLIC", + "isPublished": true, + "status": "string", + "isActive": true, + "savingProgress": { + "savingMode": "auto", + "supportedVersion": 0 + }, + "thirdPartyCookies": true + }, + "validationRules": { + "block1": "rule123", + "block2": { + "field1": "rule456", + "field2": "rule789" + } + }, + "createdBy": "string", + "updatedBy": "string", + "__lastModifiedAt": "string" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot journey createJourney +``` + +With JSONata filter: + +```bash +epilot journey createJourney --jsonata '$' +``` + +
+Sample Response + +```json +{ + "journeyId": "string", + "organizationId": "string", + "brandId": "string", + "name": "string", + "steps": [ + { + "showStepName": true, + "title": "string", + "subTitle": "string", + "showStepSubtitle": true, + "showStepper": true, + "showStepperLabels": true, + "hideNextButton": true, + "name": "string", + "stepId": "string", + "schema": {}, + "uischema": {}, + "maxWidth": "small" + } + ], + "design": { + "logoUrl": "string", + "theme": {}, + "designTokens": {} + }, + "rules": [ + { + "type": "inject", + "sourceType": "journey", + "source": "string", + "target": "string" + } + ], + "logics": [ + { + "autoGeneratedId": "string", + "conditions": ["string"], + "actions": ["string"] + } + ], + "logicsV4": {}, + "contextSchema": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string", + "paramKey": "string", + "isRequired": true, + "shouldLoadEntity": true + } + ], + "journey_type": "Sales template (Premium)", + "settings": { + "embedOptions": { + "mode": "full-screen", + "lang": "de", + "width": "string", + "topBar": true, + "scrollToTop": true, + "button": {} + }, + "safeModeAutomation": true, + "canary": true, + "designId": "string", + "templateId": "string", + "entityId": "string", + "mappingsAutomationId": "string", + "targetedCustomer": "string", + "description": "string", + "organizationSettings": {}, + "publicToken": "string", + "runtimeEntities": ["ORDER"], + "filePurposes": ["string"], + "entityTags": ["string"], + "addressSuggestionsFileUrl": "string", + "addressSuggestionsFileId": "string", + "useNewDesign": true, + "useAustrianLabels": true, + "enableDarkMode": true, + "accessMode": "PUBLIC", + "isPublished": true, + "status": "string", + "isActive": true, + "savingProgress": { + "savingMode": "auto", + "supportedVersion": 0 + }, + "thirdPartyCookies": true + }, + "validationRules": { + "block1": "rule123", + "block2": { + "field1": "rule456", + "field2": "rule789" + } + }, + "createdBy": "string", + "updatedBy": "string", + "__lastModifiedAt": "string", + "createdAt": "string", + "lastModifiedAt": "string", + "deletedAt": "string", + "version": 0, + "revisions": 0, + "featureFlags": {} +} +``` + +
+ +--- + +### `updateJourney` + +Update a Journey + +`PUT /v1/journey/configuration` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey updateJourney +``` + +With request body: + +```bash +epilot journey updateJourney \ + -d '{ + "journeyId": "string", + "organizationId": "string", + "brandId": "string", + "name": "string", + "steps": [ + { + "showStepName": true, + "title": "string", + "subTitle": "string", + "showStepSubtitle": true, + "showStepper": true, + "showStepperLabels": true, + "hideNextButton": true, + "name": "string", + "stepId": "string", + "schema": {}, + "uischema": {}, + "maxWidth": "small" + } + ], + "design": { + "logoUrl": "string", + "theme": {}, + "designTokens": {} + }, + "rules": [ + { + "type": "inject", + "sourceType": "journey", + "source": "string", + "target": "string" + } + ], + "logics": [ + { + "autoGeneratedId": "string", + "conditions": ["string"], + "actions": ["string"] + } + ], + "logicsV4": {}, + "contextSchema": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string", + "paramKey": "string", + "isRequired": true, + "shouldLoadEntity": true + } + ], + "journey_type": "Sales template (Premium)", + "settings": { + "embedOptions": { + "mode": "full-screen", + "lang": "de", + "width": "string", + "topBar": true, + "scrollToTop": true, + "button": {} + }, + "safeModeAutomation": true, + "canary": true, + "designId": "string", + "templateId": "string", + "entityId": "string", + "mappingsAutomationId": "string", + "targetedCustomer": "string", + "description": "string", + "organizationSettings": {}, + "publicToken": "string", + "runtimeEntities": ["ORDER"], + "filePurposes": ["string"], + "entityTags": ["string"], + "addressSuggestionsFileUrl": "string", + "addressSuggestionsFileId": "string", + "useNewDesign": true, + "useAustrianLabels": true, + "enableDarkMode": true, + "accessMode": "PUBLIC", + "isPublished": true, + "status": "string", + "isActive": true, + "savingProgress": { + "savingMode": "auto", + "supportedVersion": 0 + }, + "thirdPartyCookies": true + }, + "validationRules": { + "block1": "rule123", + "block2": { + "field1": "rule456", + "field2": "rule789" + } + }, + "createdBy": "string", + "updatedBy": "string", + "__lastModifiedAt": "string" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot journey updateJourney +``` + +With JSONata filter: + +```bash +epilot journey updateJourney --jsonata '$' +``` + +--- + +### `patchUpdateJourney` + +Update a Journey (partially / patch). Support for nested properties updates (e.g. "property[0].name"). + +`PATCH /v1/journey/configuration` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey patchUpdateJourney \ + -d '{"journeyId":"509cdffe-424f-457a-95c2-9708c304ce77","__lastModifiedAt":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot journey patchUpdateJourney +``` + +With JSONata filter: + +```bash +epilot journey patchUpdateJourney --jsonata 'createdJourney' +``` + +
+Sample Response + +```json +{ + "createdJourney": { + "journeyId": "string", + "organizationId": "string", + "brandId": "string", + "name": "string", + "steps": [ + {} + ], + "design": { + "logoUrl": "string", + "theme": {}, + "designTokens": {} + }, + "rules": [ + {} + ], + "logics": [ + {} + ], + "logicsV4": {}, + "contextSchema": [ + {} + ], + "journey_type": "Sales template (Premium)", + "settings": { + "embedOptions": {}, + "safeModeAutomation": true, + "canary": true, + "designId": "string", + "templateId": "string", + "entityId": "string", + "mappingsAutomationId": "string", + "targetedCustomer": "string", + "description": "string", + "organizationSettings": {}, + "publicToken": "string", + "runtimeEntities": ["ORDER"], + "filePurposes": ["string"], + "entityTags": ["string"], + "addressSuggestionsFileUrl": "string", + "addressSuggestionsFileId": "string", + "useNewDesign": true, + "useAustrianLabels": true, + "enableDarkMode": true, + "accessMode": "PUBLIC", + "isPublished": true, + "status": "string", + "isActive": true, + "savingProgress": {}, + "thirdPartyCookies": true + }, + "validationRules": { + "block1": "rule123", + "block2": {} + }, + "createdBy": "string", + "updatedBy": "string", + "__lastModifiedAt": "string", + "createdAt": "string", + "lastModifiedAt": "string", + "deletedAt": "string", + "version": 0, + "revisions": 0, + "featureFlags": {} + } +} +``` + +
+ +--- + +### `searchJourneys` + +Search Journeys + +`POST /v1/journey/configuration/search` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey searchJourneys \ + -d '{"q":"_tags:*Flex*","from":0,"size":25,"sort":"_created_at:desc"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot journey searchJourneys +``` + +With JSONata filter: + +```bash +epilot journey searchJourneys --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 1, + "results": [ + { + "_id": "e0f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8", + "_schema": "journey", + "_title": "Journey Entity Title", + "_org": "739224", + "_created_at": "2020-01-01T00:00:00.000Z", + "_updated_at": "2020-01-01T00:00:00.000Z", + "_tags": ["Flex"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "journey_name": "Journey Name", + "journey_id": "de7df470-253e-11ed-9174-116b8a718c0a", + "journey_type": "Sales template", + "design": "Design EPILOT", + "created_by": [ + { + "id": "12345" + } + ], + "journey_version": "Flex" + } + ] +} +``` + +
+ +--- + +### `generateDocument` + +Builds document generated from a template with journey values." + +`POST /v1/journey/document:generate` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey generateDocument \ + -d '{"file_id":"1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p","context_data":{"additionalProperties":"string"},"language":"de"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot journey generateDocument +``` + +With JSONata filter: + +```bash +epilot journey generateDocument --jsonata 'job_id' +``` + +
+Sample Response + +```json +{ + "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "job_status": "STARTED", + "message": "string", + "pdf_output": { + "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf", + "output_document": { + "s3ref": { + "bucket": "document-api-preview-prod", + "key": "preview/my-template.pdf" + } + } + }, + "docx_output": { + "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx", + "output_document": { + "s3ref": { + "bucket": "document-api-preview-prod", + "key": "preview/my-template.docx" + } + } + }, + "variable_payload": { + "additionalProperties": "string" + }, + "template_settings": { + "custom_margins": { + "top": 2.54, + "bottom": 2.54 + }, + "suggested_margins": { + "top": 2.54, + "bottom": 2.54 + }, + "display_margin_guidelines": true, + "enable_data_table_margin_autofix": false, + "template_with_datatable": false, + "enabled_template_settings_persistence": false, + "misconfigured_margins": false, + "file_entity_id": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p" + } +} +``` + +
+ +--- + +### `createJourneyV2` + +Create a Journey + +`POST /v2/journey/configuration` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `skipAutomation` | query | string (Yn) | No | skip creating an Automation (it takes Yn format "true, yes, 1, y") | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey createJourneyV2 +``` + +With request body: + +```bash +epilot journey createJourneyV2 \ + -d '{ + "journeyId": "string", + "brandId": "string", + "name": "string", + "steps": [ + { + "showStepName": true, + "title": "string", + "subTitle": "string", + "showStepSubtitle": true, + "showStepper": true, + "showStepperLabels": true, + "hideNextButton": true, + "name": "string", + "stepId": "string", + "schema": {}, + "uischema": {}, + "maxWidth": "small" + } + ], + "design": { + "logoUrl": "string", + "theme": {}, + "designTokens": {} + }, + "rules": [ + { + "type": "inject", + "sourceType": "journey", + "source": "string", + "target": "string" + } + ], + "logics": [ + { + "autoGeneratedId": "string", + "conditions": ["string"], + "actions": ["string"] + } + ], + "logicsV4": {}, + "contextSchema": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string", + "paramKey": "string", + "isRequired": true, + "shouldLoadEntity": true + } + ], + "journey_type": "Sales template (Premium)", + "settings": { + "embedOptions": { + "mode": "full-screen", + "lang": "de", + "width": "string", + "topBar": true, + "scrollToTop": true, + "button": {} + }, + "safeModeAutomation": true, + "designId": "string", + "entityId": "string", + "mappingsAutomationId": "string", + "templateId": "string", + "targetedCustomer": "string", + "description": "string", + "publicToken": "string", + "runtimeEntities": ["ORDER"], + "filePurposes": ["string"], + "entityTags": ["string"], + "addressSuggestionsFileUrl": "string", + "addressSuggestionsFileId": "string", + "useNewDesign": true, + "thirdPartyCookies": true, + "accessMode": "PUBLIC", + "enableDarkMode": true + }, + "validationRules": { + "block1": "rule123", + "block2": { + "field1": "rule456", + "field2": "rule789" + } + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot journey createJourneyV2 +``` + +With JSONata filter: + +```bash +epilot journey createJourneyV2 --jsonata 'journeyId' +``` + +
+Sample Response + +```json +{ + "journeyId": "string", + "brandId": "string", + "name": "string", + "steps": [ + { + "showStepName": true, + "title": "string", + "subTitle": "string", + "showStepSubtitle": true, + "showStepper": true, + "showStepperLabels": true, + "hideNextButton": true, + "name": "string", + "stepId": "string", + "schema": {}, + "uischema": {}, + "maxWidth": "small" + } + ], + "design": { + "logoUrl": "string", + "theme": {}, + "designTokens": {} + }, + "rules": [ + { + "type": "inject", + "sourceType": "journey", + "source": "string", + "target": "string" + } + ], + "logics": [ + { + "autoGeneratedId": "string", + "conditions": ["string"], + "actions": ["string"] + } + ], + "logicsV4": {}, + "contextSchema": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string", + "paramKey": "string", + "isRequired": true, + "shouldLoadEntity": true + } + ], + "journey_type": "Sales template (Premium)", + "settings": { + "embedOptions": { + "mode": "full-screen", + "lang": "de", + "width": "string", + "topBar": true, + "scrollToTop": true, + "button": {} + }, + "safeModeAutomation": true, + "designId": "string", + "entityId": "string", + "mappingsAutomationId": "string", + "templateId": "string", + "targetedCustomer": "string", + "description": "string", + "publicToken": "string", + "runtimeEntities": ["ORDER"], + "filePurposes": ["string"], + "entityTags": ["string"], + "addressSuggestionsFileUrl": "string", + "addressSuggestionsFileId": "string", + "useNewDesign": true, + "thirdPartyCookies": true, + "accessMode": "PUBLIC", + "enableDarkMode": true + }, + "validationRules": { + "block1": "rule123", + "block2": { + "field1": "rule456", + "field2": "rule789" + } + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `updateJourneyV2` + +Update a Journey + +`PUT /v2/journey/configuration` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey updateJourneyV2 +``` + +With request body: + +```bash +epilot journey updateJourneyV2 \ + -d '{ + "journeyId": "string", + "brandId": "string", + "name": "string", + "steps": [ + { + "showStepName": true, + "title": "string", + "subTitle": "string", + "showStepSubtitle": true, + "showStepper": true, + "showStepperLabels": true, + "hideNextButton": true, + "name": "string", + "stepId": "string", + "schema": {}, + "uischema": {}, + "maxWidth": "small" + } + ], + "design": { + "logoUrl": "string", + "theme": {}, + "designTokens": {} + }, + "rules": [ + { + "type": "inject", + "sourceType": "journey", + "source": "string", + "target": "string" + } + ], + "logics": [ + { + "autoGeneratedId": "string", + "conditions": ["string"], + "actions": ["string"] + } + ], + "logicsV4": {}, + "contextSchema": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string", + "paramKey": "string", + "isRequired": true, + "shouldLoadEntity": true + } + ], + "journey_type": "Sales template (Premium)", + "settings": { + "embedOptions": { + "mode": "full-screen", + "lang": "de", + "width": "string", + "topBar": true, + "scrollToTop": true, + "button": {} + }, + "safeModeAutomation": true, + "designId": "string", + "entityId": "string", + "mappingsAutomationId": "string", + "templateId": "string", + "targetedCustomer": "string", + "description": "string", + "publicToken": "string", + "runtimeEntities": ["ORDER"], + "filePurposes": ["string"], + "entityTags": ["string"], + "addressSuggestionsFileUrl": "string", + "addressSuggestionsFileId": "string", + "useNewDesign": true, + "thirdPartyCookies": true, + "accessMode": "PUBLIC", + "enableDarkMode": true + }, + "validationRules": { + "block1": "rule123", + "block2": { + "field1": "rule456", + "field2": "rule789" + } + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot journey updateJourneyV2 +``` + +With JSONata filter: + +```bash +epilot journey updateJourneyV2 --jsonata 'journeyId' +``` + +
+Sample Response + +```json +{ + "journeyId": "string", + "brandId": "string", + "name": "string", + "steps": [ + { + "showStepName": true, + "title": "string", + "subTitle": "string", + "showStepSubtitle": true, + "showStepper": true, + "showStepperLabels": true, + "hideNextButton": true, + "name": "string", + "stepId": "string", + "schema": {}, + "uischema": {}, + "maxWidth": "small" + } + ], + "design": { + "logoUrl": "string", + "theme": {}, + "designTokens": {} + }, + "rules": [ + { + "type": "inject", + "sourceType": "journey", + "source": "string", + "target": "string" + } + ], + "logics": [ + { + "autoGeneratedId": "string", + "conditions": ["string"], + "actions": ["string"] + } + ], + "logicsV4": {}, + "contextSchema": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string", + "paramKey": "string", + "isRequired": true, + "shouldLoadEntity": true + } + ], + "journey_type": "Sales template (Premium)", + "settings": { + "embedOptions": { + "mode": "full-screen", + "lang": "de", + "width": "string", + "topBar": true, + "scrollToTop": true, + "button": {} + }, + "safeModeAutomation": true, + "designId": "string", + "entityId": "string", + "mappingsAutomationId": "string", + "templateId": "string", + "targetedCustomer": "string", + "description": "string", + "publicToken": "string", + "runtimeEntities": ["ORDER"], + "filePurposes": ["string"], + "entityTags": ["string"], + "addressSuggestionsFileUrl": "string", + "addressSuggestionsFileId": "string", + "useNewDesign": true, + "thirdPartyCookies": true, + "accessMode": "PUBLIC", + "enableDarkMode": true + }, + "validationRules": { + "block1": "rule123", + "block2": { + "field1": "rule456", + "field2": "rule789" + } + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `patchUpdateJourneyV2` + +Update a Journey (partially / patch). Support for nested properties updates (e.g. "property[0].name"). + +`PATCH /v2/journey/configuration` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey patchUpdateJourneyV2 \ + -d '{"journeyId":"509cdffe-424f-457a-95c2-9708c304ce77","__lastModifiedAt":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot journey patchUpdateJourneyV2 +``` + +With JSONata filter: + +```bash +epilot journey patchUpdateJourneyV2 --jsonata 'journeyId' +``` + +
+Sample Response + +```json +{ + "journeyId": "string", + "brandId": "string", + "name": "string", + "steps": [ + { + "showStepName": true, + "title": "string", + "subTitle": "string", + "showStepSubtitle": true, + "showStepper": true, + "showStepperLabels": true, + "hideNextButton": true, + "name": "string", + "stepId": "string", + "schema": {}, + "uischema": {}, + "maxWidth": "small" + } + ], + "design": { + "logoUrl": "string", + "theme": {}, + "designTokens": {} + }, + "rules": [ + { + "type": "inject", + "sourceType": "journey", + "source": "string", + "target": "string" + } + ], + "logics": [ + { + "autoGeneratedId": "string", + "conditions": ["string"], + "actions": ["string"] + } + ], + "logicsV4": {}, + "contextSchema": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string", + "paramKey": "string", + "isRequired": true, + "shouldLoadEntity": true + } + ], + "journey_type": "Sales template (Premium)", + "settings": { + "embedOptions": { + "mode": "full-screen", + "lang": "de", + "width": "string", + "topBar": true, + "scrollToTop": true, + "button": {} + }, + "safeModeAutomation": true, + "designId": "string", + "entityId": "string", + "mappingsAutomationId": "string", + "templateId": "string", + "targetedCustomer": "string", + "description": "string", + "publicToken": "string", + "runtimeEntities": ["ORDER"], + "filePurposes": ["string"], + "entityTags": ["string"], + "addressSuggestionsFileUrl": "string", + "addressSuggestionsFileId": "string", + "useNewDesign": true, + "thirdPartyCookies": true, + "accessMode": "PUBLIC", + "enableDarkMode": true + }, + "validationRules": { + "block1": "rule123", + "block2": { + "field1": "rule456", + "field2": "rule789" + } + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `getJourneyV2` + +Get journey by id + +`GET /v2/journey/configuration/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Journey ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey getJourneyV2 \ + -p id=509cdffe-424f-457a-95c2-9708c304ce77 +``` + +Using positional args for path parameters: + +```bash +epilot journey getJourneyV2 509cdffe-424f-457a-95c2-9708c304ce77 +``` + +With JSONata filter: + +```bash +epilot journey getJourneyV2 -p id=509cdffe-424f-457a-95c2-9708c304ce77 --jsonata 'journeyId' +``` + +
+Sample Response + +```json +{ + "journeyId": "string", + "brandId": "string", + "name": "string", + "steps": [ + { + "showStepName": true, + "title": "string", + "subTitle": "string", + "showStepSubtitle": true, + "showStepper": true, + "showStepperLabels": true, + "hideNextButton": true, + "name": "string", + "stepId": "string", + "schema": {}, + "uischema": {}, + "maxWidth": "small" + } + ], + "design": { + "logoUrl": "string", + "theme": {}, + "designTokens": {} + }, + "rules": [ + { + "type": "inject", + "sourceType": "journey", + "source": "string", + "target": "string" + } + ], + "logics": [ + { + "autoGeneratedId": "string", + "conditions": ["string"], + "actions": ["string"] + } + ], + "logicsV4": {}, + "contextSchema": [ + { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string", + "paramKey": "string", + "isRequired": true, + "shouldLoadEntity": true + } + ], + "journey_type": "Sales template (Premium)", + "settings": { + "embedOptions": { + "mode": "full-screen", + "lang": "de", + "width": "string", + "topBar": true, + "scrollToTop": true, + "button": {} + }, + "safeModeAutomation": true, + "designId": "string", + "entityId": "string", + "mappingsAutomationId": "string", + "templateId": "string", + "targetedCustomer": "string", + "description": "string", + "publicToken": "string", + "runtimeEntities": ["ORDER"], + "filePurposes": ["string"], + "entityTags": ["string"], + "addressSuggestionsFileUrl": "string", + "addressSuggestionsFileId": "string", + "useNewDesign": true, + "thirdPartyCookies": true, + "accessMode": "PUBLIC", + "enableDarkMode": true + }, + "validationRules": { + "block1": "rule123", + "block2": { + "field1": "rule456", + "field2": "rule789" + } + }, + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +} +``` + +
+ +--- + +### `removeJourneyV2` + +Remove journey by id + +`DELETE /v2/journey/configuration/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Journey ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey removeJourneyV2 \ + -p id=509cdffe-424f-457a-95c2-9708c304ce77 +``` + +Using positional args for path parameters: + +```bash +epilot journey removeJourneyV2 509cdffe-424f-457a-95c2-9708c304ce77 +``` + +With JSONata filter: + +```bash +epilot journey removeJourneyV2 -p id=509cdffe-424f-457a-95c2-9708c304ce77 --jsonata '$' +``` + +--- + +### `getSettingsForJourney` + +Get settings related to the journey using journey ID. + +`GET /v1/journey/{id}/settings` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Journey ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey getSettingsForJourney \ + -p id=509cdffe-424f-457a-95c2-9708c304ce77 +``` + +Using positional args for path parameters: + +```bash +epilot journey getSettingsForJourney 509cdffe-424f-457a-95c2-9708c304ce77 +``` + +With JSONata filter: + +```bash +epilot journey getSettingsForJourney -p id=509cdffe-424f-457a-95c2-9708c304ce77 --jsonata 'organizationId' +``` + +
+Sample Response + +```json +{ + "organizationId": "739224", + "canary": true, + "thirdPartyCookies": true +} +``` + +
+ +--- + +### `getButtonOptions` + +Get button options from a csv file. + +`GET /v1/journey/button-options` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `fileId` | query | string | Yes | file id to get button options from | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot journey getButtonOptions \ + -p fileId=535ef74a-dd66-4d01-94a9-725016e70d1c +``` + +With JSONata filter: + +```bash +epilot journey getButtonOptions -p fileId=535ef74a-dd66-4d01-94a9-725016e70d1c --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "value": "Button Hidden Value", + "label": "Button Label" + } +] +``` + +
+ +--- diff --git a/packages/cli/docs/kanban.md b/packages/cli/docs/kanban.md new file mode 100644 index 00000000..30b02a5c --- /dev/null +++ b/packages/cli/docs/kanban.md @@ -0,0 +1,1002 @@ +# Kanban API + +- **Base URL:** `https://kanban.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/kanban](https://docs.epilot.io/api/kanban) + +## Quick Start + +```bash +# List available operations +epilot kanban + +# Call an operation +epilot kanban createKanbanBoard +``` + +## Operations + +**Kanban** +- [`createKanbanBoard`](#createkanbanboard) — Create a Kanban board +- [`getKanbanBoards`](#getkanbanboards) — Get all Kanban boards +- [`getKanbanBoard`](#getkanbanboard) — Get a Kanban board by ID. Use "default" as the boardId to get the organization's default board. +- [`updateKanbanBoard`](#updatekanbanboard) — Update a Kanban board +- [`patchKanbanBoard`](#patchkanbanboard) — Patch a Kanban board +- [`deleteKanbanBoard`](#deletekanbanboard) — Delete a Kanban board +- [`setDefaultKanbanBoard`](#setdefaultkanbanboard) — Set a board as the default board for the organization +- [`clearDefaultKanbanBoard`](#cleardefaultkanbanboard) — Remove the default board setting for the organization + +**Query** +- [`flowsAutocomplete`](#flowsautocomplete) — Autocomplete flows data +- [`executeFlowsQuery`](#executeflowsquery) — Query Flows Data for Kanban View. + +### `createKanbanBoard` + +Create a Kanban board + +`POST /v1/kanban/board` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot kanban createKanbanBoard +``` + +With request body: + +```bash +epilot kanban createKanbanBoard \ + -d '{ + "id": "string", + "title": "Board 1", + "description": "Board description", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": "string", + "org_id": "string", + "updated_by": "string", + "shared_with": ["string"], + "shared_with_org": true, + "owners": ["string"], + "config": { + "dataset": "workflow_tasks_overview", + "swimlanes": [ + { + "id": "string", + "title": "Swimlane 1", + "position": 1, + "filter": { + "items": [ + { + "key": "assignee", + "operator": "EQUALS", + "value": "100020", + "data_type": "string" + } + ], + "combination": "OR" + }, + "title_chip_variant": "success" + } + ], + "card_config": { + "fields": ["assignee"] + }, + "board_filter": { + "items": [ + { + "key": "assignee", + "operator": "EQUALS", + "value": "100020", + "data_type": "string" + } + ], + "combination": "OR" + }, + "sorting": { + "field": "created_at", + "direction": "asc" + }, + "search_query": "task 1" + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot kanban createKanbanBoard +``` + +With JSONata filter: + +```bash +epilot kanban createKanbanBoard --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "title": "Board 1", + "description": "Board description", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": "string", + "org_id": "string", + "updated_by": "string", + "shared_with": ["string"], + "shared_with_org": true, + "owners": ["string"], + "config": { + "dataset": "workflow_tasks_overview", + "swimlanes": [ + { + "id": "string", + "title": "Swimlane 1", + "position": 1, + "filter": { + "items": [ + { + "key": "assignee", + "operator": "EQUALS", + "value": "100020", + "data_type": "string" + } + ], + "combination": "OR" + }, + "title_chip_variant": "success" + } + ], + "card_config": { + "fields": ["assignee"] + }, + "board_filter": { + "items": [ + { + "key": "assignee", + "operator": "EQUALS", + "value": "100020", + "data_type": "string" + } + ], + "combination": "OR" + }, + "sorting": { + "field": "created_at", + "direction": "asc" + }, + "search_query": "task 1" + } +} +``` + +
+ +--- + +### `getKanbanBoards` + +Get all Kanban boards + +`GET /v1/kanban/boards` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `filter` | query | "owned" \| "shared" | No | Filter boards by ownership type. If not provided, returns all accessible boards. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot kanban getKanbanBoards +``` + +With JSONata filter: + +```bash +epilot kanban getKanbanBoards --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "string", + "title": "Board 1", + "description": "Board description", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": "string", + "org_id": "string", + "updated_by": "string", + "shared_with": ["string"], + "shared_with_org": true, + "owners": ["string"] + } +] +``` + +
+ +--- + +### `getKanbanBoard` + +Get a Kanban board by ID. Use "default" as the boardId to get the organization's default board. + +`GET /v1/kanban/board/{boardId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `boardId` | path | string | Yes | The board ID, or "default" to get the organization's default board. + | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot kanban getKanbanBoard \ + -p boardId=board-123 +``` + +Using positional args for path parameters: + +```bash +epilot kanban getKanbanBoard board-123 +``` + +With JSONata filter: + +```bash +epilot kanban getKanbanBoard -p boardId=board-123 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "title": "Board 1", + "description": "Board description", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": "string", + "org_id": "string", + "updated_by": "string", + "shared_with": ["string"], + "shared_with_org": true, + "owners": ["string"], + "config": { + "dataset": "workflow_tasks_overview", + "swimlanes": [ + { + "id": "string", + "title": "Swimlane 1", + "position": 1, + "filter": { + "items": [ + { + "key": "assignee", + "operator": "EQUALS", + "value": "100020", + "data_type": "string" + } + ], + "combination": "OR" + }, + "title_chip_variant": "success" + } + ], + "card_config": { + "fields": ["assignee"] + }, + "board_filter": { + "items": [ + { + "key": "assignee", + "operator": "EQUALS", + "value": "100020", + "data_type": "string" + } + ], + "combination": "OR" + }, + "sorting": { + "field": "created_at", + "direction": "asc" + }, + "search_query": "task 1" + } +} +``` + +
+ +--- + +### `updateKanbanBoard` + +Update a Kanban board + +`PUT /v1/kanban/board/{boardId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `boardId` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot kanban updateKanbanBoard \ + -p boardId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot kanban updateKanbanBoard \ + -p boardId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "id": "string", + "title": "Board 1", + "description": "Board description", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": "string", + "org_id": "string", + "updated_by": "string", + "shared_with": ["string"], + "shared_with_org": true, + "owners": ["string"], + "config": { + "dataset": "workflow_tasks_overview", + "swimlanes": [ + { + "id": "string", + "title": "Swimlane 1", + "position": 1, + "filter": { + "items": [ + { + "key": "assignee", + "operator": "EQUALS", + "value": "100020", + "data_type": "string" + } + ], + "combination": "OR" + }, + "title_chip_variant": "success" + } + ], + "card_config": { + "fields": ["assignee"] + }, + "board_filter": { + "items": [ + { + "key": "assignee", + "operator": "EQUALS", + "value": "100020", + "data_type": "string" + } + ], + "combination": "OR" + }, + "sorting": { + "field": "created_at", + "direction": "asc" + }, + "search_query": "task 1" + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot kanban updateKanbanBoard 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot kanban updateKanbanBoard -p boardId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot kanban updateKanbanBoard -p boardId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "title": "Board 1", + "description": "Board description", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": "string", + "org_id": "string", + "updated_by": "string", + "shared_with": ["string"], + "shared_with_org": true, + "owners": ["string"], + "config": { + "dataset": "workflow_tasks_overview", + "swimlanes": [ + { + "id": "string", + "title": "Swimlane 1", + "position": 1, + "filter": { + "items": [ + { + "key": "assignee", + "operator": "EQUALS", + "value": "100020", + "data_type": "string" + } + ], + "combination": "OR" + }, + "title_chip_variant": "success" + } + ], + "card_config": { + "fields": ["assignee"] + }, + "board_filter": { + "items": [ + { + "key": "assignee", + "operator": "EQUALS", + "value": "100020", + "data_type": "string" + } + ], + "combination": "OR" + }, + "sorting": { + "field": "created_at", + "direction": "asc" + }, + "search_query": "task 1" + } +} +``` + +
+ +--- + +### `patchKanbanBoard` + +Patch a Kanban board + +`PATCH /v1/kanban/board/{boardId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `boardId` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot kanban patchKanbanBoard \ + -p boardId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot kanban patchKanbanBoard \ + -p boardId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "title": "Board 1", + "description": "Board description", + "shared_with": ["string"], + "shared_with_org": true, + "owners": ["string"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot kanban patchKanbanBoard 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot kanban patchKanbanBoard -p boardId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot kanban patchKanbanBoard -p boardId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "title": "Board 1", + "description": "Board description", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "created_by": "string", + "org_id": "string", + "updated_by": "string", + "shared_with": ["string"], + "shared_with_org": true, + "owners": ["string"], + "config": { + "dataset": "workflow_tasks_overview", + "swimlanes": [ + { + "id": "string", + "title": "Swimlane 1", + "position": 1, + "filter": { + "items": [ + { + "key": "assignee", + "operator": "EQUALS", + "value": "100020", + "data_type": "string" + } + ], + "combination": "OR" + }, + "title_chip_variant": "success" + } + ], + "card_config": { + "fields": ["assignee"] + }, + "board_filter": { + "items": [ + { + "key": "assignee", + "operator": "EQUALS", + "value": "100020", + "data_type": "string" + } + ], + "combination": "OR" + }, + "sorting": { + "field": "created_at", + "direction": "asc" + }, + "search_query": "task 1" + } +} +``` + +
+ +--- + +### `deleteKanbanBoard` + +Delete a Kanban board + +`DELETE /v1/kanban/board/{boardId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `boardId` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot kanban deleteKanbanBoard \ + -p boardId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot kanban deleteKanbanBoard 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot kanban deleteKanbanBoard -p boardId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `setDefaultKanbanBoard` + +Set a board as the default board for the organization + +`PUT /v1/kanban/org/default-board` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `boardId` | query | string | Yes | The ID of the board to set as default | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot kanban setDefaultKanbanBoard \ + -p boardId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot kanban setDefaultKanbanBoard -p boardId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "string", + "default_board_id": "string" +} +``` + +
+ +--- + +### `clearDefaultKanbanBoard` + +Remove the default board setting for the organization + +`DELETE /v1/kanban/org/default-board` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot kanban clearDefaultKanbanBoard +``` + +With JSONata filter: + +```bash +epilot kanban clearDefaultKanbanBoard --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "string", + "default_board_id": "string" +} +``` + +
+ +--- + +### `flowsAutocomplete` + +Autocomplete flows data + +`GET /v1/kanban/query/flows:autocomplete` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `input` | query | string | No | Input to autocomplete | +| `attribute` | query | string | Yes | Autocomplete attribute | +| `size` | query | number | No | Maximum number of results to return | +| `from` | query | number | No | Starting offset for pagination | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot kanban flowsAutocomplete \ + -p attribute=name +``` + +With JSONata filter: + +```bash +epilot kanban flowsAutocomplete -p attribute=name --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": ["value"], + "hits": 42 +} +``` + +
+ +--- + +### `executeFlowsQuery` + +Query Flows Data for Kanban View. + +`POST /v1/kanban/query/flows:execute` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot kanban executeFlowsQuery +``` + +With request body: + +```bash +epilot kanban executeFlowsQuery \ + -d '{ + "filters": { + "items": [ + { + "key": "assignee", + "operator": "EQUALS", + "value": "100020", + "data_type": "string" + } + ], + "combination": "OR" + }, + "sorting": { + "field": "created_at", + "direction": "asc" + }, + "from": 0, + "size": 10 +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot kanban executeFlowsQuery +``` + +With JSONata filter: + +```bash +epilot kanban executeFlowsQuery --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + {} + ], + "hits": 0, + "page_number": 0, + "page_size": 0, + "total_pages": 0 +} +``` + +
+ +--- diff --git a/packages/cli/docs/message.md b/packages/cli/docs/message.md new file mode 100644 index 00000000..1bdd5d6e --- /dev/null +++ b/packages/cli/docs/message.md @@ -0,0 +1,3157 @@ +# Message API + +- **Base URL:** `https://message.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/message](https://docs.epilot.io/api/message) + +Send and receive email messages via your epilot organization + +## Quick Start + +```bash +# List available operations +epilot message + +# Call an operation +epilot message sendMessage +``` + +## Operations + +**Messages** +- [`sendMessage`](#sendmessage) — Send an email message +- [`updateMessage`](#updatemessage) — Update message metadata +- [`getMessage`](#getmessage) — Get an email message by id +- [`deleteMessage`](#deletemessage) — Immediately and permanently delete a message. This operation cannot be undone. +- [`getMessageEml`](#getmessageeml) — Download a message as an EML file. +- [`searchMessages`](#searchmessages) — Search Messages +- [`trashMessage`](#trashmessage) — Move a message to the trash +- [`untrashMessage`](#untrashmessage) — Restore a trashed message +- [`markReadMessage`](#markreadmessage) — Mark message as read +- [`markReadMessageV2`](#markreadmessagev2) — Mark message as read within a scope +- [`markUnreadMessage`](#markunreadmessage) — Mark message as unread +- [`getUnread`](#getunread) — Get all unread messages by actor +- [`markUnreadMessageV2`](#markunreadmessagev2) — Mark message as unread within a scope +- [`getMessageV2`](#getmessagev2) — - Fetches message by ID + +**Threads** +- [`searchThreads`](#searchthreads) — Search for threads of email messages. +- [`searchThreadsV2`](#searchthreadsv2) — Search for threads of email messages. +- [`searchIds`](#searchids) — Return all thread id's that match a criteria +- [`updateThread`](#updatethread) — Modify thread metadata +- [`deleteThread`](#deletethread) — Immediately and permanently delete a thread. This operation cannot be undone. +- [`moveThread`](#movethread) — Move thread to a different Inbox +- [`markThreadAsDone`](#markthreadasdone) — Mark thread as done +- [`markThreadAsOpen`](#markthreadasopen) — Mark thread as open +- [`getThreadTimeline`](#getthreadtimeline) — Get thread timeline +- [`trashThread`](#trashthread) — Move a thread to trash +- [`untrashThread`](#untrashthread) — Restore a trashed thread +- [`threadBulkActionsRead`](#threadbulkactionsread) — Perform a bulk action of marking an array of thread ids as read +- [`threadBulkActionsUnread`](#threadbulkactionsunread) — Perform a bulk action of marking an array of thread ids as unread +- [`threadBulkActionsFavorite`](#threadbulkactionsfavorite) — Perform a bulk action of marking an array of thread ids favorite +- [`threadBulkActionsUnfavorite`](#threadbulkactionsunfavorite) — Perform a bulk action of marking an array of thread ids unfavorited +- [`threadBulkActionsTrash`](#threadbulkactionstrash) — Perform a bulk action of trashing an array of threads +- [`threadBulkActionsUntrash`](#threadbulkactionsuntrash) — Perform a bulk action of untrashing an array of threads +- [`threadBulkActionsDelete`](#threadbulkactionsdelete) — Performs a bulk permanent delete for all threads +- [`threadBulkActionsDone`](#threadbulkactionsdone) — Perform a bulk action of marking an array of threads as done +- [`threadBulkActionsOpen`](#threadbulkactionsopen) — Perform a bulk action of marking an array of threads as open +- [`markReadThread`](#markreadthread) — Mark thread as read +- [`markReadThreadV2`](#markreadthreadv2) — Mark thread as read within a scope +- [`markUnreadThread`](#markunreadthread) — Mark thread as unread +- [`markUnreadThreadV2`](#markunreadthreadv2) — Mark thread as unread within a scope +- [`assignThread`](#assignthread) — Assign thread to entities +- [`unassignThread`](#unassignthread) — Unassign thread from entities +- [`assignUsers`](#assignusers) — Assign users to thread for receiving notifications. +- [`assignUsersV2`](#assignusersv2) — Assign users to thread. +- [`pinThread`](#pinthread) — Pin a single thread +- [`unpinThread`](#unpinthread) — Unpin a single thread + +**Drafts** +- [`createDraft`](#createdraft) — Create a new draft +- [`sendDraft`](#senddraft) — Send the existing draft to the recipients + +### `sendMessage` + +Send an email message + +`POST /v1/message/messages` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `do_not_create_entities` | query | boolean | No | When true, this flag lets the caller to send only the message and by-pass creating the thread & message entities. | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message sendMessage \ + -d '{}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message sendMessage +``` + +With JSONata filter: + +```bash +epilot message sendMessage --jsonata 'complete_thread' +``` + +
+Sample Response + +```json +{} +``` + +
+ +--- + +### `updateMessage` + +Update message metadata + +`PUT /v1/message/messages` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message updateMessage +``` + +With JSONata filter: + +```bash +epilot message updateMessage --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "string", + "_org": "206801", + "_schema": "message", + "_tags": ["pricing", "INBOX"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-10T09:14:31.990Z", + "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>", + "sender": "206801", + "subject": "Request for solar panel price", + "html": "
We at ABC GmbH would like to request a price quote for the solar panel.
", + "text": "We at ABC GmbH would like to request a price quote for the solar panel.", + "from": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "reply_to": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "to": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "cc": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "bcc": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "file": { + "$relation": [ + { + "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f", + "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf", + "is_message_attachment": true, + "may_be_signature_attachment": true, + "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068", + "inline": false, + "send_as_link": false + } + ] + }, + "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> ", + "in_reply_to": "", + "user_read_message": ["206801", "200109"], + "org_read_message": ["789372", "210291"], + "send_status": ["SEND"], + "type": "SENT", + "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3" +} +``` + +
+ +--- + +### `getMessage` + +Get an email message by id + +`GET /v1/message/messages/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Message ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message getMessage \ + -p id=4d74976d-fb64-47fd-85e2-65eea140f5eb +``` + +Using positional args for path parameters: + +```bash +epilot message getMessage 4d74976d-fb64-47fd-85e2-65eea140f5eb +``` + +With JSONata filter: + +```bash +epilot message getMessage -p id=4d74976d-fb64-47fd-85e2-65eea140f5eb --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "string", + "_org": "206801", + "_schema": "message", + "_tags": ["pricing", "INBOX"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-10T09:14:31.990Z", + "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>", + "sender": "206801", + "subject": "Request for solar panel price", + "html": "
We at ABC GmbH would like to request a price quote for the solar panel.
", + "text": "We at ABC GmbH would like to request a price quote for the solar panel.", + "from": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "reply_to": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "to": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "cc": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "bcc": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "file": { + "$relation": [ + { + "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f", + "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf", + "is_message_attachment": true, + "may_be_signature_attachment": true, + "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068", + "inline": false, + "send_as_link": false + } + ] + }, + "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> ", + "in_reply_to": "", + "user_read_message": ["206801", "200109"], + "org_read_message": ["789372", "210291"], + "send_status": ["SEND"], + "type": "SENT", + "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3" +} +``` + +
+ +--- + +### `deleteMessage` + +Immediately and permanently delete a message. This operation cannot be undone. + +`DELETE /v1/message/messages/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Message ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message deleteMessage \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message deleteMessage 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message deleteMessage -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `getMessageEml` + +Download a message as an EML file. + +`GET /v1/message/messages/{id}/eml` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Message entity ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message getMessageEml \ + -p id=4d74976d-fb64-47fd-85e2-65eea140f5eb +``` + +Using positional args for path parameters: + +```bash +epilot message getMessageEml 4d74976d-fb64-47fd-85e2-65eea140f5eb +``` + +With JSONata filter: + +```bash +epilot message getMessageEml -p id=4d74976d-fb64-47fd-85e2-65eea140f5eb --jsonata '$' +``` + +--- + +### `searchMessages` + +Search Messages + +`POST /v1/message/messages:search` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message searchMessages +``` + +With request body: + +```bash +epilot message searchMessages \ + -d '{ + "inbox_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3", + "q": "subject:\"Request for solar panel price\" AND _tags:INBOX", + "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"], + "from": 0, + "size": 10, + "hydrate": false, + "include_scores": false, + "sort": "string", + "highlight": {} +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message searchMessages +``` + +With JSONata filter: + +```bash +epilot message searchMessages --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 14, + "results": [ + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "string", + "_org": "206801", + "_schema": "message", + "_tags": ["pricing", "INBOX"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-10T09:14:31.990Z", + "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>", + "sender": "206801", + "subject": "Request for solar panel price", + "html": "
We at ABC GmbH would like to request a price quote for the solar panel.
", + "text": "We at ABC GmbH would like to request a price quote for the solar panel.", + "from": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "reply_to": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "to": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "cc": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "bcc": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "file": { + "$relation": [ + { + "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f", + "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf", + "is_message_attachment": true, + "may_be_signature_attachment": true, + "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068", + "inline": false, + "send_as_link": false + } + ] + }, + "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> ", + "in_reply_to": "", + "user_read_message": ["206801", "200109"], + "org_read_message": ["789372", "210291"], + "send_status": ["SEND"], + "type": "SENT", + "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3" + } + ] +} +``` + +
+ +--- + +### `trashMessage` + +Move a message to the trash + +`POST /v1/message/messages/{id}/trash` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Message ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message trashMessage \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message trashMessage 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message trashMessage -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `untrashMessage` + +Restore a trashed message + +`POST /v1/message/messages/{id}/untrash` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Message ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message untrashMessage \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message untrashMessage 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message untrashMessage -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `markReadMessage` + +Mark message as read + +`POST /v1/message/messages/{id}/read` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Message ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message markReadMessage \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message markReadMessage 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message markReadMessage -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `markReadMessageV2` + +Mark message as read within a scope + +`POST /v2/message/messages/{id}/read` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Message ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message markReadMessageV2 \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"scopes":["organization","user"]}' +``` + +Using positional args for path parameters: + +```bash +epilot message markReadMessageV2 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message markReadMessageV2 -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message markReadMessageV2 -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `markUnreadMessage` + +Mark message as unread + +`POST /v1/message/messages/{id}/unread` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Message ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message markUnreadMessage \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message markUnreadMessage 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message markUnreadMessage -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `getUnread` + +Get all unread messages by actor + +`GET /v1/message/messages/unread/{actor}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `actor` | path | "organization" \| "user" | Yes | Actor performing call, can be user or organization | +| `email_filter` | query | string[] \| string | No | emails to filter by | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message getUnread \ + -p actor=example +``` + +Using positional args for path parameters: + +```bash +epilot message getUnread example +``` + +With JSONata filter: + +```bash +epilot message getUnread -p actor=example --jsonata 'count' +``` + +
+Sample Response + +```json +{ + "count": 14, + "unread": 0, + "drafts": 12, + "unassigned": 1 +} +``` + +
+ +--- + +### `markUnreadMessageV2` + +Mark message as unread within a scope + +`POST /v2/message/messages/{id}/unread` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Message ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message markUnreadMessageV2 \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"scopes":["organization","user"]}' +``` + +Using positional args for path parameters: + +```bash +epilot message markUnreadMessageV2 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message markUnreadMessageV2 -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message markUnreadMessageV2 -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `searchThreads` + +Search for threads of email messages. + +`POST /v1/message/threads:search` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message searchThreads \ + -d '{"q":"subject:\"Request for solar panel price\" AND _tags:INBOX","from":0,"size":10,"hydrate":false}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message searchThreads +``` + +With JSONata filter: + +```bash +epilot message searchThreads --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 14, + "results": [ + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "string", + "_org": "206801", + "_schema": "message", + "_tags": ["pricing", "INBOX"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-10T09:14:31.990Z", + "topic": "CUSTOMER_MESSAGE", + "assigned_to": ["206801", "200109"], + "org_read_message": ["789372", "210291"], + "done": false, + "latest_message": {}, + "latest_trash_message": {}, + "latest_message_at": "2024-02-10T09:14:31.990Z" + } + ] +} +``` + +
+ +--- + +### `searchThreadsV2` + +Search for threads of email messages. + +`POST /v2/message/threads:search` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message searchThreadsV2 +``` + +With request body: + +```bash +epilot message searchThreadsV2 \ + -d '{ + "inbox_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3", + "q": "subject:\"Request for solar panel price\" AND _tags:INBOX", + "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"], + "from": 0, + "size": 10, + "hydrate": false, + "include_scores": false, + "sort": "string", + "highlight": {} +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message searchThreadsV2 +``` + +With JSONata filter: + +```bash +epilot message searchThreadsV2 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 14, + "results": [ + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "string", + "_org": "206801", + "_schema": "message", + "_tags": ["pricing", "INBOX"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-10T09:14:31.990Z", + "topic": "CUSTOMER_MESSAGE", + "assigned_to": ["206801", "200109"], + "org_read_message": ["789372", "210291"], + "done": false, + "latest_message": {}, + "latest_trash_message": {}, + "latest_message_at": "2024-02-10T09:14:31.990Z" + } + ] +} +``` + +
+ +--- + +### `searchIds` + +Return all thread id's that match a criteria + +`POST /v1/message/threads:searchIds` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message searchIds \ + -d '{"q":"subject:\"Request for solar panel price\" AND _tags:INBOX"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message searchIds +``` + +With JSONata filter: + +```bash +epilot message searchIds --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 14, + "results": ["string"] +} +``` + +
+ +--- + +### `updateThread` + +Modify thread metadata + +`PUT /v1/message/threads` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message updateThread +``` + +With JSONata filter: + +```bash +epilot message updateThread --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "string", + "_org": "206801", + "_schema": "message", + "_tags": ["pricing", "INBOX"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-10T09:14:31.990Z", + "topic": "CUSTOMER_MESSAGE", + "assigned_to": ["206801", "200109"], + "org_read_message": ["789372", "210291"], + "done": false, + "latest_message": { + "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>", + "sender": "206801", + "subject": "Request for solar panel price", + "html": "
We at ABC GmbH would like to request a price quote for the solar panel.
", + "text": "We at ABC GmbH would like to request a price quote for the solar panel.", + "from": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "reply_to": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "to": [ + {} + ], + "cc": [ + {} + ], + "bcc": [ + {} + ], + "file": { + "$relation": [] + }, + "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> ", + "in_reply_to": "", + "user_read_message": ["206801", "200109"], + "org_read_message": ["789372", "210291"], + "send_status": ["SEND"], + "type": "SENT", + "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3" + }, + "latest_trash_message": { + "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>", + "sender": "206801", + "subject": "Request for solar panel price", + "html": "
We at ABC GmbH would like to request a price quote for the solar panel.
", + "text": "We at ABC GmbH would like to request a price quote for the solar panel.", + "from": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "reply_to": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "to": [ + {} + ], + "cc": [ + {} + ], + "bcc": [ + {} + ], + "file": { + "$relation": [] + }, + "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> ", + "in_reply_to": "", + "user_read_message": ["206801", "200109"], + "org_read_message": ["789372", "210291"], + "send_status": ["SEND"], + "type": "SENT", + "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3" + }, + "latest_message_at": "2024-02-10T09:14:31.990Z" +} +``` + +
+ +--- + +### `deleteThread` + +Immediately and permanently delete a thread. This operation cannot be undone. + +`DELETE /v1/message/threads/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message deleteThread \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message deleteThread 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message deleteThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `moveThread` + +Move thread to a different Inbox + +`POST /v1/message/threads/{id}:move` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message moveThread \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"inbox_id":"3f34ce73-089c-4d45-a5ee-c161234e41c3"}' +``` + +Using positional args for path parameters: + +```bash +epilot message moveThread 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message moveThread -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message moveThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `markThreadAsDone` + +Mark thread as done + +`POST /v1/message/threads/{id}:markAsDone` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message markThreadAsDone \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message markThreadAsDone 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message markThreadAsDone -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `markThreadAsOpen` + +Mark thread as open + +`POST /v1/message/threads/{id}:markAsOpen` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message markThreadAsOpen \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message markThreadAsOpen 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message markThreadAsOpen -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `getThreadTimeline` + +Get thread timeline + +`GET /v1/message/threads/{id}/timeline` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message getThreadTimeline \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message getThreadTimeline 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message getThreadTimeline -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'events' +``` + +
+Sample Response + +```json +{ + "events": [ + { + "data": { + "type": "THREAD_DONE", + "user_id": "123", + "organization_id": "456" + }, + "timestamp": "2024-01-01T00:00:00.000Z" + } + ] +} +``` + +
+ +--- + +### `trashThread` + +Move a thread to trash + +`POST /v1/message/threads/{id}/trash` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message trashThread \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message trashThread 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message trashThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `untrashThread` + +Restore a trashed thread + +`POST /v1/message/threads/{id}/untrash` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message untrashThread \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message untrashThread 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message untrashThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `threadBulkActionsRead` + +Perform a bulk action of marking an array of thread ids as read + +`POST /v1/message/threads/bulk:read` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message threadBulkActionsRead \ + -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"],"scopes":["organization","user"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message threadBulkActionsRead +``` + +With JSONata filter: + +```bash +epilot message threadBulkActionsRead --jsonata '$' +``` + +--- + +### `threadBulkActionsUnread` + +Perform a bulk action of marking an array of thread ids as unread + +`POST /v1/message/threads/bulk:unread` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message threadBulkActionsUnread \ + -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"],"scopes":["organization","user"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message threadBulkActionsUnread +``` + +With JSONata filter: + +```bash +epilot message threadBulkActionsUnread --jsonata '$' +``` + +--- + +### `threadBulkActionsFavorite` + +Perform a bulk action of marking an array of thread ids favorite + +`POST /v1/message/threads/bulk:favorite` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message threadBulkActionsFavorite \ + -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message threadBulkActionsFavorite +``` + +With JSONata filter: + +```bash +epilot message threadBulkActionsFavorite --jsonata '$' +``` + +--- + +### `threadBulkActionsUnfavorite` + +Perform a bulk action of marking an array of thread ids unfavorited + +`POST /v1/message/threads/bulk:unfavorite` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message threadBulkActionsUnfavorite \ + -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message threadBulkActionsUnfavorite +``` + +With JSONata filter: + +```bash +epilot message threadBulkActionsUnfavorite --jsonata '$' +``` + +--- + +### `threadBulkActionsTrash` + +Perform a bulk action of trashing an array of threads + +`POST /v1/message/threads/bulk:trash` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message threadBulkActionsTrash \ + -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message threadBulkActionsTrash +``` + +With JSONata filter: + +```bash +epilot message threadBulkActionsTrash --jsonata '$' +``` + +--- + +### `threadBulkActionsUntrash` + +Perform a bulk action of untrashing an array of threads + +`POST /v1/message/threads/bulk:untrash` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message threadBulkActionsUntrash \ + -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message threadBulkActionsUntrash +``` + +With JSONata filter: + +```bash +epilot message threadBulkActionsUntrash --jsonata '$' +``` + +--- + +### `threadBulkActionsDelete` + +Performs a bulk permanent delete for all threads + +`POST /v1/message/threads/bulk:delete` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message threadBulkActionsDelete \ + -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message threadBulkActionsDelete +``` + +With JSONata filter: + +```bash +epilot message threadBulkActionsDelete --jsonata '$' +``` + +--- + +### `threadBulkActionsDone` + +Perform a bulk action of marking an array of threads as done + +`POST /v1/message/threads/bulk:done` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message threadBulkActionsDone \ + -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message threadBulkActionsDone +``` + +With JSONata filter: + +```bash +epilot message threadBulkActionsDone --jsonata '$' +``` + +--- + +### `threadBulkActionsOpen` + +Perform a bulk action of marking an array of threads as open + +`POST /v1/message/threads/bulk:open` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message threadBulkActionsOpen \ + -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message threadBulkActionsOpen +``` + +With JSONata filter: + +```bash +epilot message threadBulkActionsOpen --jsonata '$' +``` + +--- + +### `markReadThread` + +Mark thread as read + +`POST /v1/message/threads/{id}/read` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message markReadThread \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message markReadThread 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message markReadThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `markReadThreadV2` + +Mark thread as read within a scope + +`POST /v2/message/threads/{id}/read` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message markReadThreadV2 \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"scopes":["organization","user"]}' +``` + +Using positional args for path parameters: + +```bash +epilot message markReadThreadV2 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message markReadThreadV2 -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message markReadThreadV2 -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `markUnreadThread` + +Mark thread as unread + +`POST /v1/message/threads/{id}/unread` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message markUnreadThread \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message markUnreadThread 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message markUnreadThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `markUnreadThreadV2` + +Mark thread as unread within a scope + +`POST /v2/message/threads/{id}/unread` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message markUnreadThreadV2 \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"scopes":["organization","user"]}' +``` + +Using positional args for path parameters: + +```bash +epilot message markUnreadThreadV2 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message markUnreadThreadV2 -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message markUnreadThreadV2 -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `assignThread` + +Assign thread to entities + +`POST /v1/message/threads/{id}/assign` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message assignThread \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '[{"slug":"contact","entity_id":"3f34ce73-089c-4d45-a5ee-c161234e41c3","org_id":"206801","is_main_entity":true}]' +``` + +Using positional args for path parameters: + +```bash +epilot message assignThread 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message assignThread -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message assignThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `unassignThread` + +Unassign thread from entities + +`POST /v1/message/threads/{id}/unassign` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message unassignThread \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '[{"slug":"contact","entity_id":"3f34ce73-089c-4d45-a5ee-c161234e41c3"}]' +``` + +Using positional args for path parameters: + +```bash +epilot message unassignThread 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message unassignThread -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message unassignThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `assignUsers` + +Assign users to thread for receiving notifications. + +`POST /v1/message/threads/{id}/assign:users` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message assignUsers \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"assigned_to":["206801"]}' +``` + +Using positional args for path parameters: + +```bash +epilot message assignUsers 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message assignUsers -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message assignUsers -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `assignUsersV2` + +Assign users to thread. + +`POST /v2/message/threads/{id}/assign:users` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message assignUsersV2 \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"add":["206801"],"remove":["206801"]}' +``` + +Using positional args for path parameters: + +```bash +epilot message assignUsersV2 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message assignUsersV2 -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message assignUsersV2 -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `pinThread` + +Pin a single thread + +`POST /v1/message/threads/{id}:pin` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message pinThread \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message pinThread 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message pinThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `unpinThread` + +Unpin a single thread + +`DELETE /v1/message/threads/{id}:pin` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Thread ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message unpinThread \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot message unpinThread 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot message unpinThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `createDraft` + +Create a new draft + +`POST /v1/message/drafts` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message createDraft \ + -d '{}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot message createDraft +``` + +With JSONata filter: + +```bash +epilot message createDraft --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "string", + "_org": "206801", + "_schema": "message", + "_tags": ["pricing", "INBOX"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-10T09:14:31.990Z", + "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>", + "sender": "206801", + "subject": "Request for solar panel price", + "html": "
We at ABC GmbH would like to request a price quote for the solar panel.
", + "text": "We at ABC GmbH would like to request a price quote for the solar panel.", + "from": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "reply_to": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "to": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "cc": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "bcc": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "file": { + "$relation": [ + { + "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f", + "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf", + "is_message_attachment": true, + "may_be_signature_attachment": true, + "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068", + "inline": false, + "send_as_link": false + } + ] + }, + "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> ", + "in_reply_to": "", + "user_read_message": ["206801", "200109"], + "org_read_message": ["789372", "210291"], + "send_status": ["SEND"], + "type": "SENT", + "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3" +} +``` + +
+ +--- + +### `sendDraft` + +Send the existing draft to the recipients + +`POST /v1/message/drafts:send` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message sendDraft +``` + +With JSONata filter: + +```bash +epilot message sendDraft --jsonata '$' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "string", + "_org": "206801", + "_schema": "message", + "_tags": ["pricing", "INBOX"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-10T09:14:31.990Z", + "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>", + "sender": "206801", + "subject": "Request for solar panel price", + "html": "
We at ABC GmbH would like to request a price quote for the solar panel.
", + "text": "We at ABC GmbH would like to request a price quote for the solar panel.", + "from": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "reply_to": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "to": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "cc": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "bcc": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "file": { + "$relation": [ + { + "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f", + "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf", + "is_message_attachment": true, + "may_be_signature_attachment": true, + "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068", + "inline": false, + "send_as_link": false + } + ] + }, + "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> ", + "in_reply_to": "", + "user_read_message": ["206801", "200109"], + "org_read_message": ["789372", "210291"], + "send_status": ["SEND"], + "type": "SENT", + "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3" +} +``` + +
+ +--- + +### `getMessageV2` + +- Fetches message by ID + +`GET /v2/message/messages/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Message ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot message getMessageV2 \ + -p id=4d74976d-fb64-47fd-85e2-65eea140f5eb +``` + +Using positional args for path parameters: + +```bash +epilot message getMessageV2 4d74976d-fb64-47fd-85e2-65eea140f5eb +``` + +With JSONata filter: + +```bash +epilot message getMessageV2 -p id=4d74976d-fb64-47fd-85e2-65eea140f5eb --jsonata '$' +``` + +
+Sample Response + +```json +{ + "html_omitted": false, + "html_download_url": "https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "string", + "_org": "206801", + "_schema": "message", + "_tags": ["pricing", "INBOX"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-10T09:14:31.990Z", + "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>", + "sender": "206801", + "subject": "Request for solar panel price", + "html": "
We at ABC GmbH would like to request a price quote for the solar panel.
", + "text": "We at ABC GmbH would like to request a price quote for the solar panel.", + "from": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "reply_to": { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + }, + "to": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "cc": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "bcc": [ + { + "name": "epilot", + "address": "messaging@epilot.cloud", + "email_type": "INTERNAL", + "send_status": "SEND", + "send_error": {} + } + ], + "file": { + "$relation": [ + { + "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f", + "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf", + "is_message_attachment": true, + "may_be_signature_attachment": true, + "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068", + "inline": false, + "send_as_link": false + } + ] + }, + "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> ", + "in_reply_to": "", + "user_read_message": ["206801", "200109"], + "org_read_message": ["789372", "210291"], + "send_status": ["SEND"], + "type": "SENT", + "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3" +} +``` + +
+ +--- diff --git a/packages/cli/docs/metering.md b/packages/cli/docs/metering.md new file mode 100644 index 00000000..61a56bf0 --- /dev/null +++ b/packages/cli/docs/metering.md @@ -0,0 +1,1657 @@ +# Metering API + +- **Base URL:** `https://metering.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/metering](https://docs.epilot.io/api/metering) + +## Quick Start + +```bash +# List available operations +epilot metering + +# Call an operation +epilot metering getCustomerMeters +``` + +## Operations + +**ECP** +- [`getCustomerMeters`](#getcustomermeters) — Retrieves all meters related to a customer. +- [`getMetersByContractId`](#getmetersbycontractid) — Retrieves all meters related to a contract. +- [`getMeter`](#getmeter) — Retrieves the details of a meter. +- [`updateMeter`](#updatemeter) — Updates the details of a meter. +- [`getMeterCounters`](#getmetercounters) — Retrieves all counters for a given meter. +- [`getCounterDetails`](#getcounterdetails) — Retrieves the details of a meter counter. +- [`createPortalMeterReadings`](#createportalmeterreadings) — Inserts multiple meter readings at once for a given meter. Limited to 2 readings per request. + +**ECP Admin** +- [`createMeterReading`](#createmeterreading) — Inserts a new meter reading. +- [`createMeterReadings`](#createmeterreadings) — Inserts multiple meter readings at once. Limited to 100 readings per request. +- [`batchWriteMeterReadings`](#batchwritemeterreadings) — Upserts/Deletes multiple meter readings at once. Limited to 100 readings per request. +- [`createMeterReadingFromSubmission`](#createmeterreadingfromsubmission) — Creates a reading from a journey submission. +- [`getAllowedReadingForMeter`](#getallowedreadingformeter) — Get allowed reading for the given meter +- [`createReadingWithMeter`](#createreadingwithmeter) — Creates a reading along with a meter. +- [`getReadingsByInterval`](#getreadingsbyinterval) — Retrieves all readings specified in an interval. +- [`updateMeterReading`](#updatemeterreading) — Updates a meter reading. +- [`deleteMeterReading`](#deletemeterreading) — Deletes a meter reading. + +### `getCustomerMeters` + +Retrieves all meters related to a customer. + +`GET /v1/metering/meter` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering getCustomerMeters +``` + +With JSONata filter: + +```bash +epilot metering getCustomerMeters --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "meter", + "ma_lo_id": "A09-123", + "status": "active", + "meter_type": "three-phase-meter", + "tariff_type": "Peak load tariff", + "meter_number": "J-1093-1AK", + "sector": "power", + "location": [ + { + "country": "Germany", + "city": "Koln", + "postal_code": 81475, + "street": "Melatengürtel", + "street_number": 71, + "additional_info": "5. Etage", + "_tags": ["billing", "delivery"] + } + ], + "used_for": "Domestic Usage", + "manufacturer": "Energy One", + "calibration_date": "2022-10-10T00:00:00.000Z", + "contract": { + "$relation": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_slug": "contact" + } + ] + }, + "customer": { + "$relation": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_slug": "contact" + } + ] + }, + "journey_actions": { + "journey_id": "string", + "action_label": { + "en": "string", + "de": "string" + }, + "slug": "string", + "rules": [ + { + "entity": "string", + "attribute": "string", + "attribute_value": "string" + } + ] + }, + "last_reading": "2022-10-10T00:00:00.000Z", + "current_consumption": 100.5 + } + ] +} +``` + +
+ +--- + +### `getMetersByContractId` + +Retrieves all meters related to a contract. + +`GET /v1/metering/contract/meters/{contract_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `contract_id` | path | string (uuid) | Yes | The ID of the Contract. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering getMetersByContractId \ + -p contract_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot metering getMetersByContractId 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot metering getMetersByContractId -p contract_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "meter", + "ma_lo_id": "A09-123", + "status": "active", + "meter_type": "three-phase-meter", + "tariff_type": "Peak load tariff", + "meter_number": "J-1093-1AK", + "sector": "power", + "location": [ + { + "country": "Germany", + "city": "Koln", + "postal_code": 81475, + "street": "Melatengürtel", + "street_number": 71, + "additional_info": "5. Etage", + "_tags": ["billing", "delivery"] + } + ], + "used_for": "Domestic Usage", + "manufacturer": "Energy One", + "calibration_date": "2022-10-10T00:00:00.000Z", + "contract": { + "$relation": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_slug": "contact" + } + ] + }, + "customer": { + "$relation": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_slug": "contact" + } + ] + } + } + ] +} +``` + +
+ +--- + +### `getMeter` + +Retrieves the details of a meter. + +`GET /v1/metering/meter/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | The ID of the meter. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering getMeter \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot metering getMeter 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot metering getMeter -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "entity": { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "meter", + "ma_lo_id": "A09-123", + "status": "active", + "meter_type": "three-phase-meter", + "tariff_type": "Peak load tariff", + "meter_number": "J-1093-1AK", + "sector": "power", + "location": [ + { + "country": "Germany", + "city": "Koln", + "postal_code": 81475, + "street": "Melatengürtel", + "street_number": 71, + "additional_info": "5. Etage", + "_tags": ["billing", "delivery"] + } + ], + "used_for": "Domestic Usage", + "manufacturer": "Energy One", + "calibration_date": "2022-10-10T00:00:00.000Z", + "contract": { + "$relation": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_slug": "contact" + } + ] + }, + "customer": { + "$relation": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_slug": "contact" + } + ] + } + }, + "journey_actions": { + "journey_id": "string", + "action_label": { + "en": "string", + "de": "string" + }, + "slug": "string", + "rules": [ + { + "entity": "string", + "attribute": "string", + "attribute_value": "string" + } + ] + }, + "relations": [ + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z" + } + ] + } +} +``` + +
+ +--- + +### `updateMeter` + +Updates the details of a meter. + +`PATCH /v1/metering/meter/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | The ID of the meter. | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering updateMeter \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{}' +``` + +Using positional args for path parameters: + +```bash +epilot metering updateMeter 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot metering updateMeter -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot metering updateMeter -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "meter", + "ma_lo_id": "A09-123", + "status": "active", + "meter_type": "three-phase-meter", + "tariff_type": "Peak load tariff", + "meter_number": "J-1093-1AK", + "sector": "power", + "location": [ + { + "country": "Germany", + "city": "Koln", + "postal_code": 81475, + "street": "Melatengürtel", + "street_number": 71, + "additional_info": "5. Etage", + "_tags": ["billing", "delivery"] + } + ], + "used_for": "Domestic Usage", + "manufacturer": "Energy One", + "calibration_date": "2022-10-10T00:00:00.000Z", + "contract": { + "$relation": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_slug": "contact" + } + ] + }, + "customer": { + "$relation": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_slug": "contact" + } + ] + } + } +} +``` + +
+ +--- + +### `getMeterCounters` + +Retrieves all counters for a given meter. + +`GET /v1/metering/counter` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `meter_id` | query | string (uuid) | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering getMeterCounters \ + -p meter_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot metering getMeterCounters -p meter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "meter_counter", + "obis_number": "A-34", + "direction": "feed-in", + "transformer_ratio": 70, + "unit": "string", + "forecast_reading_value": 270, + "forecast_as_of": "2022-12-10T00:00:00.000Z", + "current_consumption": 240, + "last_reading": "2022-10-10T00:00:00.000Z", + "conversion_factor": 3, + "tariff_type": "ht" + } + ] +} +``` + +
+ +--- + +### `getCounterDetails` + +Retrieves the details of a meter counter. + +`GET /v1/metering/counter/{counter_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `counter_id` | path | string | Yes | The ID of the counter. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering getCounterDetails \ + -p counter_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot metering getCounterDetails 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot metering getCounterDetails -p counter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_title": "Example Entity", + "_org": "123", + "_tags": ["example", "mock"], + "_created_at": "2021-02-09T12:41:43.662Z", + "_updated_at": "2021-02-09T12:41:43.662Z", + "_schema": "meter_counter", + "obis_number": "A-34", + "direction": "feed-in", + "transformer_ratio": 70, + "unit": "string", + "forecast_reading_value": 270, + "forecast_as_of": "2022-12-10T00:00:00.000Z", + "current_consumption": 240, + "last_reading": "2022-10-10T00:00:00.000Z", + "conversion_factor": 3, + "tariff_type": "ht" + } +} +``` + +
+ +--- + +### `createMeterReading` + +Inserts a new meter reading. + +`POST /v1/metering/reading` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering createMeterReading +``` + +With request body: + +```bash +epilot metering createMeterReading \ + -d '{ + "value": 240, + "read_by": "John Doe", + "reason": "", + "meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + }, + "note": "string", + "unit": "string" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot metering createMeterReading +``` + +With JSONata filter: + +```bash +epilot metering createMeterReading --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "value": 240, + "read_by": "John Doe", + "reason": "", + "meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + }, + "note": "string", + "unit": "string" + } +} +``` + +
+ +--- + +### `createMeterReadings` + +Inserts multiple meter readings at once. Limited to 100 readings per request. + +`POST /v1/metering/readings` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `async` | query | boolean | No | Don't wait for the reading to become available in GetReadings API. Useful for large migrations | +| `activity_id` | query | string (ulid) | No | Activity to include in event feed | +| `skip_validation` | query | boolean | No | When set to true, all validations will be skipped and the system will allow the reading to be created. +If set to false or not provided, the system performs the following validations: + Validation Rule | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering createMeterReadings +``` + +With request body: + +```bash +epilot metering createMeterReadings \ + -d '{ + "readings": [ + { + "value": 240, + "read_by": "John Doe", + "reason": "", + "meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + }, + "note": "string", + "unit": "string" + } + ] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot metering createMeterReadings +``` + +With JSONata filter: + +```bash +epilot metering createMeterReadings --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "value": 240, + "read_by": "John Doe", + "reason": "", + "meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + }, + "note": "string", + "unit": "string" + } + ] +} +``` + +
+ +--- + +### `createPortalMeterReadings` + +Inserts multiple meter readings at once for a given meter. Limited to 2 readings per request. + +`POST /v1/metering/readings/{meter_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `meter_id` | path | string | Yes | The ID of the meter. | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering createPortalMeterReadings \ + -p meter_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot metering createPortalMeterReadings \ + -p meter_id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "readings": [ + { + "value": 240, + "read_by": "John Doe", + "reason": "", + "meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + }, + "note": "string", + "unit": "string" + } + ] +}' +``` + +Using positional args for path parameters: + +```bash +epilot metering createPortalMeterReadings 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot metering createPortalMeterReadings -p meter_id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot metering createPortalMeterReadings -p meter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "value": 240, + "read_by": "John Doe", + "reason": "", + "meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + }, + "note": "string", + "unit": "string" + } + ] +} +``` + +
+ +--- + +### `batchWriteMeterReadings` + +Upserts/Deletes multiple meter readings at once. Limited to 100 readings per request. + +`POST /v2/metering/readings` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `async` | query | boolean | No | Don't wait for the reading to become available in GetReadings API. Useful for large migrations | +| `skip_validation` | query | boolean | No | When set to true, all validations will be skipped and the system will allow the reading to be created. +If set to false or not provided, the system performs the following validations: + Validation Rule | +| `activity_id` | query | string (ulid) | No | Activity to include in event feed | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering batchWriteMeterReadings +``` + +With request body: + +```bash +epilot metering batchWriteMeterReadings \ + -d '{ + "identifiers": ["string"], + "readings": [ + { + "value": 240, + "read_by": "John Doe", + "reason": "", + "meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + }, + "note": "string", + "unit": "string", + "operation": "create" + } + ] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot metering batchWriteMeterReadings +``` + +With JSONata filter: + +```bash +epilot metering batchWriteMeterReadings --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "value": 240, + "read_by": "John Doe", + "reason": "", + "meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + }, + "note": "string", + "unit": "string" + } + ] +} +``` + +
+ +--- + +### `createMeterReadingFromSubmission` + +Creates a reading from a journey submission. + +`POST /v1/metering/reading/submission` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering createMeterReadingFromSubmission +``` + +With request body: + +```bash +epilot metering createMeterReadingFromSubmission \ + -d '{ + "org_id": "123", + "entity": { + "_org": "123", + "meterReadings": [ + { + "meterId": "string", + "readings": [ + { + "counterId": "string", + "direction": "feed-in", + "unit": "string", + "value": 240 + } + ], + "readingValue": 240, + "readingDate": "2022-10-10T10:10:00.000Z", + "readBy": "John Doe", + "reason": "", + "maloId": "A09-123", + "obisNumber": "A-34", + "readingUnit": "string", + "meterType": "one_tariff", + "feedInValue": 240, + "feedOutValue": 240, + "htValue": 240, + "ntValue": 240 + } + ] + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot metering createMeterReadingFromSubmission +``` + +With JSONata filter: + +```bash +epilot metering createMeterReadingFromSubmission --jsonata 'message' +``` + +
+Sample Response + +```json +{ + "message": "Successfully Processed" +} +``` + +
+ +--- + +### `getAllowedReadingForMeter` + +Get allowed reading for the given meter + +`GET /v1/metering/allowed/reading/{meter_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `meter_id` | path | string | Yes | The ID of the meter. | +| `timestamp` | query | string | No | If not provided, the system will default to now. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering getAllowedReadingForMeter \ + -p meter_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot metering getAllowedReadingForMeter 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot metering getAllowedReadingForMeter -p meter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "counter_id": "string", + "min_value": 0, + "max_value": 0 + } + ] +} +``` + +
+ +--- + +### `createReadingWithMeter` + +Creates a reading along with a meter. + +`POST /v1/metering/reading/with-meter` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering createReadingWithMeter +``` + +With request body: + +```bash +epilot metering createReadingWithMeter \ + -d '{ + "ma_lo_id": "A09-123", + "meter_id": "string", + "obis_number": "A-34", + "unit": "string", + "direction": "feed-in", + "tariff_type": "ht", + "value": 240, + "read_by": "John Doe", + "reason": "", + "timestamp": "2022-10-10T10:10:00.000Z", + "source": "ECP" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot metering createReadingWithMeter +``` + +With JSONata filter: + +```bash +epilot metering createReadingWithMeter --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "value": 240, + "read_by": "John Doe", + "reason": "", + "meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + }, + "note": "string", + "unit": "string" + } +} +``` + +
+ +--- + +### `getReadingsByInterval` + +Retrieves all readings specified in an interval. + +`GET /v1/metering/reading/{meter_id}/{counter_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `meter_id` | path | string | Yes | The ID of the meter. | +| `counter_id` | path | string | Yes | The ID of the counter. | +| `start_date` | query | string | No | If not provided, the system will default to 2000-01-01. | +| `end_date` | query | string | No | If not provided, the system will default to today's date. | +| `direction` | query | "feed-in" \| "feed-out" | No | | +| `size` | query | number | No | Returns the first n results after the specified offset (from). +If this value is provided as -1, then it returns all results at once. + | +| `from` | query | number | No | | +| `type` | query | "cumulative" \| "relative" | Yes | Since meter readings are cumulative, users may need to request actual consumptions, which are the difference between consecutive measurements. +If this value is provided as "cumulative", then actual re | +| `sort` | query | "asc" \| "desc" | No | If this value is provided as "asc", then the results will be sorted by the timestamp field in ascending order. +If this value is provided as "desc", then the results will be sorted by the timestamp fie | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering getReadingsByInterval \ + -p meter_id=123e4567-e89b-12d3-a456-426614174000 \ + -p counter_id=123e4567-e89b-12d3-a456-426614174000 \ + -p type=example +``` + +Using positional args for path parameters: + +```bash +epilot metering getReadingsByInterval 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot metering getReadingsByInterval -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p type=example --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "value": 240, + "read_by": "John Doe", + "reason": "", + "meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + }, + "note": "string", + "unit": "string" + } + ], + "hits": 120, + "firstRecordCreatedAt": "2022-10-01T20:00:00.000Z" +} +``` + +
+ +--- + +### `updateMeterReading` + +Updates a meter reading. + +`PUT /v1/metering/reading/{meter_id}/{counter_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `meter_id` | path | string | Yes | The ID of the meter entity. | +| `counter_id` | path | string | Yes | The ID of the counter entity. | +| `timestamp` | query | string | Yes | The timestamp when the reading was created. | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering updateMeterReading \ + -p meter_id=123e4567-e89b-12d3-a456-426614174000 \ + -p counter_id=123e4567-e89b-12d3-a456-426614174000 \ + -p timestamp=2022-10-01T20:00:00.000Z +``` + +With request body: + +```bash +epilot metering updateMeterReading \ + -p meter_id=123e4567-e89b-12d3-a456-426614174000 \ + -p counter_id=123e4567-e89b-12d3-a456-426614174000 \ + -p timestamp=2022-10-01T20:00:00.000Z \ + -d '{ + "value": 240, + "read_by": "John Doe", + "reason": "string", + "meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot metering updateMeterReading 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot metering updateMeterReading -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p timestamp=2022-10-01T20:00:00.000Z +``` + +With JSONata filter: + +```bash +epilot metering updateMeterReading -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p timestamp=2022-10-01T20:00:00.000Z --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "value": 240, + "read_by": "John Doe", + "reason": "", + "meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "direction": "feed-in", + "timestamp": "2022-10-10T00:00:00.000Z", + "source": "ECP", + "status": "valid", + "external_id": "string", + "remark": "Customer reported unusual consumption", + "metadata": { + "registration_id": "1234567890", + "business_unit": "ABC" + }, + "note": "string", + "unit": "string" + } +} +``` + +
+ +--- + +### `deleteMeterReading` + +Deletes a meter reading. + +`DELETE /v1/metering/reading/{meter_id}/{counter_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `meter_id` | path | string | Yes | The ID of the meter entity. | +| `counter_id` | path | string | Yes | The ID of the counter entity. | +| `timestamp` | query | string | Yes | The timestamp when the reading was created. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot metering deleteMeterReading \ + -p meter_id=123e4567-e89b-12d3-a456-426614174000 \ + -p counter_id=123e4567-e89b-12d3-a456-426614174000 \ + -p timestamp=2022-10-01T20:00:00.000Z +``` + +Using positional args for path parameters: + +```bash +epilot metering deleteMeterReading 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot metering deleteMeterReading -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p timestamp=2022-10-01T20:00:00.000Z --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": { + "meterId": "string", + "counterId": "string", + "timestamp": "2022-10-01T20:00:00.000Z" + } +} +``` + +
+ +--- diff --git a/packages/cli/docs/notes.md b/packages/cli/docs/notes.md new file mode 100644 index 00000000..545a3767 --- /dev/null +++ b/packages/cli/docs/notes.md @@ -0,0 +1,748 @@ +# Notes API + +- **Base URL:** `https://notes.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/notes](https://docs.epilot.io/api/notes) + +Facade API Backend for Epilot Notes feature + +## Quick Start + +```bash +# List available operations +epilot notes + +# Call an operation +epilot notes createNote +``` + +## Operations + +**Notes** +- [`createNote`](#createnote) — Creates a new Note entry +- [`getNote`](#getnote) — Retrieves a single Note entry based on it's Entity ID +- [`updateNote`](#updatenote) — Updates an existing Note entry +- [`patchNote`](#patchnote) — Updates an existing Note entry +- [`deleteNote`](#deletenote) — Deletes a single Note entry based on it's Entity ID +- [`searchNotesByContext`](#searchnotesbycontext) — Search for a paginated list of Notes based on one or more contexts +- [`getNoteContexts`](#getnotecontexts) — Gets all the Entity and non-Entity records the Note is contextually attached to + +**Pinning** +- [`pinNote`](#pinnote) — Pins a single Note entry based on it's Entity ID + +**Reactions** +- [`addNoteReaction`](#addnotereaction) — Adds an emoji reaction to a note +- [`removeNoteReaction`](#removenotereaction) — Removes an emoji reaction from a note +- [`toggleNoteReactions`](#togglenotereactions) — Toggles multiple emoji reactions on a note. If a user has already reacted with an emoji, it removes the reaction. If a u + +### `createNote` + +Creates a new Note entry + +`POST /v1/note` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notes createNote +``` + +With request body: + +```bash +epilot notes createNote \ + -d '{ + "_tags": ["string"], + "type": "string", + "entity_id": "string", + "parent_id": "string", + "contexts": [ + { + "type": "workflow_execution", + "id": "string" + } + ], + "additional_contexts": [ + { + "type": "workflow_execution", + "id": "string" + } + ], + "content": "string", + "attachments": ["string"], + "read_by": ["string"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot notes createNote +``` + +With JSONata filter: + +```bash +epilot notes createNote --jsonata 'context_entities' +``` + +--- + +### `getNote` + +Retrieves a single Note entry based on it's Entity ID + +`GET /v1/note/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Entity ID of the Note entry to retrieve | +| `hydrate` | query | boolean | No | Whether to hydrate the Note's relation attributes | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notes getNote \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot notes getNote 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot notes getNote -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'context_entities' +``` + +--- + +### `updateNote` + +Updates an existing Note entry + +`PUT /v1/note/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Entity ID of the Note entry to update | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notes updateNote \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot notes updateNote \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "_id": "string", + "_org": "string", + "_schema": "string", + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z", + "_created_by": "string", + "_tags": ["string"], + "_acl": {}, + "_owners": [ + { + "org_id": "string", + "user_id": "string" + } + ], + "type": "string", + "context_entities": { + "$relation": [ + { + "entity_id": "string" + } + ] + }, + "parent": { + "$relation": [ + { + "entity_id": "string" + } + ] + }, + "attachments": { + "$relation": [ + { + "entity_id": "string" + } + ] + }, + "content": "string", + "contexts": [ + { + "type": "workflow_execution", + "id": "string" + } + ], + "pinned_at": "1970-01-01T00:00:00.000Z", + "created_by": { + "type": "user", + "user_id": "string", + "display_name": "string", + "org_id": "string", + "email": "string", + "phone": "string" + }, + "read_by": ["string"], + "reactions": {} +}' +``` + +Using positional args for path parameters: + +```bash +epilot notes updateNote 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot notes updateNote -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot notes updateNote -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'context_entities' +``` + +--- + +### `patchNote` + +Updates an existing Note entry + +`PATCH /v1/note/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Entity ID of the Note entry to update | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notes patchNote \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot notes patchNote 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot notes patchNote -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot notes patchNote -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'context_entities' +``` + +--- + +### `deleteNote` + +Deletes a single Note entry based on it's Entity ID + +`DELETE /v1/note/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Entity ID of the Note entry to delete | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notes deleteNote \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot notes deleteNote 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot notes deleteNote -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `searchNotesByContext` + +Search for a paginated list of Notes based on one or more contexts + +`POST /v1/notes:search` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notes searchNotesByContext \ + -d '{"contexts":[{"type":"workflow_execution","id":"string"}],"from":0,"size":10}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot notes searchNotesByContext +``` + +With JSONata filter: + +```bash +epilot notes searchNotesByContext --jsonata 'results[0]' +``` + +--- + +### `pinNote` + +Pins a single Note entry based on it's Entity ID + +`POST /v1/note/{id}/pin` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Entity ID of the Note entry to pin | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notes pinNote \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot notes pinNote 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot notes pinNote -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `getNoteContexts` + +Gets all the Entity and non-Entity records the Note is contextually attached to + +`GET /v1/note/{id}/context` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Entity ID of the Note entry to get contexts for | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notes getNoteContexts \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot notes getNoteContexts 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot notes getNoteContexts -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "type": "workflow_execution", + "context": { + "_id": "string", + "_org": "string", + "_schema": "string", + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z", + "_created_by": "string", + "_tags": ["string"], + "_acl": {}, + "_owners": [ + { + "org_id": "string", + "user_id": "string" + } + ], + "type": "string" + } + } +] +``` + +
+ +--- + +### `addNoteReaction` + +Adds an emoji reaction to a note + +`POST /v1/note/{id}/reaction` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Entity ID of the Note entry to add reaction to | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notes addNoteReaction \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"emoji":"thumbs-up"}' +``` + +Using positional args for path parameters: + +```bash +epilot notes addNoteReaction 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot notes addNoteReaction -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot notes addNoteReaction -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'context_entities' +``` + +--- + +### `removeNoteReaction` + +Removes an emoji reaction from a note + +`DELETE /v1/note/{id}/reaction/{emoji_shortcode}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Entity ID of the Note entry to remove reaction from | +| `emoji_shortcode` | path | string | Yes | The emoji to remove from the note | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notes removeNoteReaction \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -p emoji_shortcode=example +``` + +Using positional args for path parameters: + +```bash +epilot notes removeNoteReaction 123e4567-e89b-12d3-a456-426614174000 example +``` + +With JSONata filter: + +```bash +epilot notes removeNoteReaction -p id=123e4567-e89b-12d3-a456-426614174000 -p emoji_shortcode=example --jsonata 'context_entities' +``` + +--- + +### `toggleNoteReactions` + +Toggles multiple emoji reactions on a note. If a user has already reacted with an emoji, it removes the reaction. If a u + +`POST /v1/note/{id}/reactions/toggle` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Entity ID of the Note entry to toggle reactions on | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notes toggleNoteReactions \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"emojis":["thumbs-up","heart"]}' +``` + +Using positional args for path parameters: + +```bash +epilot notes toggleNoteReactions 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot notes toggleNoteReactions -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot notes toggleNoteReactions -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'context_entities' +``` + +--- + +## Deprecated Operations + +- ~~`getNotesByContext`~~ GET `/v1/notes/{entity_id}` diff --git a/packages/cli/docs/notification.md b/packages/cli/docs/notification.md new file mode 100644 index 00000000..25e2de8c --- /dev/null +++ b/packages/cli/docs/notification.md @@ -0,0 +1,1343 @@ +# Notification API + +- **Base URL:** `https://notification.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/notification](https://docs.epilot.io/api/notification) + +Notification API for epilot 360 + +## Quick Start + +```bash +# List available operations +epilot notification + +# Call an operation +epilot notification getNotificationsV2 +``` + +## Operations + +**Notification** +- [`getNotificationsV2`](#getnotificationsv2) — Get notifications items. These items may eventually contain entities within their payload, which can be hydrated by the +- [`getNotifications`](#getnotifications) — Get notifications +- [`createNotification`](#createnotification) — Create a message that can be displayed in the notification panel. +- [`getNotification`](#getnotification) — Get the details of a single notification. +- [`markAllAsRead`](#markallasread) — Mark all as read +- [`markAsRead`](#markasread) — Mark as read +- [`getTotalUnread`](#gettotalunread) — Get total unread + +**Template** +- [`listNotificationTemplates`](#listnotificationtemplates) — List notification templates with optional filtering and pagination +- [`createNotificationTemplate`](#createnotificationtemplate) — Create a new notification template +- [`getNotificationTemplate`](#getnotificationtemplate) — Get a single notification template by ID +- [`updateNotificationTemplate`](#updatenotificationtemplate) — Update a notification template (full replacement) +- [`patchNotificationTemplate`](#patchnotificationtemplate) — Partially update a notification template +- [`deleteNotificationTemplate`](#deletenotificationtemplate) — Delete a notification template permanently +- [`sendPreview`](#sendpreview) — Send a preview notification (both email and in-app) to the requesting user. + +### `getNotificationsV2` + +Get notifications items. These items may eventually contain entities within their payload, which can be hydrated by the + +`GET /v2/notification/notifications` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `cursor` | query | string | No | Base64 encoded cursor to be used for pagination | +| `after_id` | query | number | No | | +| `limit` | query | number | No | The numbers of items to return | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification getNotificationsV2 +``` + +With JSONata filter: + +```bash +epilot notification getNotificationsV2 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "cursor": "eyJjcmVhd", + "total": 1, + "total_unread": 1, + "results": [ + { + "id": 123456789, + "notification_id": 123456789, + "timestamp": "1970-01-01T00:00:00.000Z", + "read_state": false, + "type": "workflow", + "redirect_url": "https://epilot.cloud", + "organization_id": "206801", + "title": { + "en": "My custom notification", + "de": "Meine benutzerdefinierte Aktivität" + }, + "message": { + "en": "{{caller}} did something with {{contact.entity.id}} {{branch.name}}.", + "de": "{{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}." + }, + "payload": { + "entity": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "schema": "contact" + } + }, + "caller": { + "EpilotAuth": { + "token": { + "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce", + "cognito:groups": ["Administrator"], + "cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role", + "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D", + "custom:ivy_org_id": "739224", + "cognito:username": "n.ahmad@epilot.cloud", + "custom:ivy_user_id": "10006129", + "cognito:roles": ["arn:aws:iam::912468240823:role/base-administrator-role"], + "aud": "6e0jbdnger7nmoktaaflarue1l", + "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75", + "token_use": "id", + "auth_time": 1614333023, + "exp": 1614336623, + "iat": 1614333023, + "email": "n.ahmad@epilot.cloud" + } + } + }, + "operations": [ + { + "entity": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "operation": "updateEntity", + "params": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "slug": "contact" + }, + "payload": { + "_schema": "contact", + "_org": "123", + "status": "Inactive" + } + } + ], + "force_notify_users": { + "12345": { + "email": false, + "in_app": false + } + } + } + ] +} +``` + +
+ +--- + +### `getNotifications` + +Get notifications + +`GET /v1/notification/notifications` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `after_id` | query | number | No | | +| `limit` | query | number | No | The numbers of items to return | +| `no_hydrate` | query | boolean | No | When true, the payload will not be hydrated with the entity data. This is useful when the client does not need the entity data and wants to save on API calls (performance gain). When false, the payloa | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification getNotifications +``` + +With JSONata filter: + +```bash +epilot notification getNotifications --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "total": 1, + "total_unread": 1, + "results": [ + { + "id": 123456789, + "notification_id": 123456789, + "timestamp": "1970-01-01T00:00:00.000Z", + "read_state": false, + "type": "workflow", + "redirect_url": "https://epilot.cloud", + "organization_id": "206801", + "title": { + "en": "My custom notification", + "de": "Meine benutzerdefinierte Aktivität" + }, + "message": { + "en": "{{caller}} did something with {{contact.entity.id}} {{branch.name}}.", + "de": "{{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}." + }, + "payload": { + "entity": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "schema": "contact" + } + }, + "caller": { + "EpilotAuth": { + "token": { + "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce", + "cognito:groups": ["Administrator"], + "cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role", + "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D", + "custom:ivy_org_id": "739224", + "cognito:username": "n.ahmad@epilot.cloud", + "custom:ivy_user_id": "10006129", + "cognito:roles": ["arn:aws:iam::912468240823:role/base-administrator-role"], + "aud": "6e0jbdnger7nmoktaaflarue1l", + "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75", + "token_use": "id", + "auth_time": 1614333023, + "exp": 1614336623, + "iat": 1614333023, + "email": "n.ahmad@epilot.cloud" + } + } + }, + "operations": [ + { + "entity": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "operation": "updateEntity", + "params": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "slug": "contact" + }, + "payload": { + "_schema": "contact", + "_org": "123", + "status": "Inactive" + } + } + ], + "force_notify_users": { + "12345": { + "email": false, + "in_app": false + } + } + } + ] +} +``` + +
+ +--- + +### `createNotification` + +Create a message that can be displayed in the notification panel. + +`POST /v1/notification/notifications` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification createNotification +``` + +With request body: + +```bash +epilot notification createNotification \ + -d '{ + "notification_id": 0, + "timestamp": "1970-01-01T00:00:00.000Z", + "type": "workflow", + "redirect_url": "https://epilot.cloud", + "organization_id": "206801", + "title": { + "en": "My custom notification", + "de": "Meine benutzerdefinierte Aktivität" + }, + "message": { + "en": "{{caller}} did something with {{contact.entity.id}} {{branch.name}}.", + "de": "{{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}." + }, + "payload": { + "entity": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "schema": "contact" + } + }, + "caller": { + "EpilotAuth": { + "token": { + "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce", + "cognito:groups": ["Administrator"], + "cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role", + "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D", + "custom:ivy_org_id": "739224", + "cognito:username": "n.ahmad@epilot.cloud", + "custom:ivy_user_id": "10006129", + "cognito:roles": ["arn:aws:iam::912468240823:role/base-administrator-role"], + "aud": "6e0jbdnger7nmoktaaflarue1l", + "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75", + "token_use": "id", + "auth_time": 1614333023, + "exp": 1614336623, + "iat": 1614333023, + "email": "n.ahmad@epilot.cloud" + } + } + }, + "operations": [ + { + "entity": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "operation": "updateEntity", + "params": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "slug": "contact" + }, + "payload": { + "_schema": "contact", + "_org": "123", + "status": "Inactive" + } + } + ], + "force_notify_users": { + "12345": { + "email": false, + "in_app": false + } + }, + "read_state": false, + "visibility_user_ids": ["1", "2", "3", "4", "5"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot notification createNotification +``` + +With JSONata filter: + +```bash +epilot notification createNotification --jsonata '$' +``` + +--- + +### `getNotification` + +Get the details of a single notification. + +`GET /v1/notification/notifications/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | number | Yes | Notification Id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification getNotification \ + -p id=1 +``` + +Using positional args for path parameters: + +```bash +epilot notification getNotification 1 +``` + +With JSONata filter: + +```bash +epilot notification getNotification -p id=1 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": 123456789, + "notification_id": 123456789, + "timestamp": "1970-01-01T00:00:00.000Z", + "read_state": false, + "type": "workflow", + "redirect_url": "https://epilot.cloud", + "organization_id": "206801", + "title": { + "en": "My custom notification", + "de": "Meine benutzerdefinierte Aktivität" + }, + "message": { + "en": "{{caller}} did something with {{contact.entity.id}} {{branch.name}}.", + "de": "{{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}." + }, + "payload": { + "entity": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "schema": "contact" + } + }, + "caller": { + "EpilotAuth": { + "token": { + "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce", + "cognito:groups": ["Administrator"], + "cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role", + "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D", + "custom:ivy_org_id": "739224", + "cognito:username": "n.ahmad@epilot.cloud", + "custom:ivy_user_id": "10006129", + "cognito:roles": ["arn:aws:iam::912468240823:role/base-administrator-role"], + "aud": "6e0jbdnger7nmoktaaflarue1l", + "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75", + "token_use": "id", + "auth_time": 1614333023, + "exp": 1614336623, + "iat": 1614333023, + "email": "n.ahmad@epilot.cloud" + } + } + }, + "operations": [ + { + "entity": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "operation": "updateEntity", + "params": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "slug": "contact" + }, + "payload": { + "_schema": "contact", + "_org": "123", + "status": "Inactive" + } + } + ], + "force_notify_users": { + "12345": { + "email": false, + "in_app": false + } + } +} +``` + +
+ +--- + +### `markAllAsRead` + +Mark all as read + +`PUT /v1/notification/notifications/mark` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification markAllAsRead +``` + +With JSONata filter: + +```bash +epilot notification markAllAsRead --jsonata '$' +``` + +--- + +### `markAsRead` + +Mark as read + +`PUT /v1/notification/notifications/{id}/mark` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | number | Yes | Numeric ID of the notification to mark as read | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification markAsRead \ + -p id=1 +``` + +Using positional args for path parameters: + +```bash +epilot notification markAsRead 1 +``` + +With JSONata filter: + +```bash +epilot notification markAsRead -p id=1 --jsonata '$' +``` + +--- + +### `getTotalUnread` + +Get total unread + +`GET /v1/notification/unreads` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification getTotalUnread +``` + +With JSONata filter: + +```bash +epilot notification getTotalUnread --jsonata '$' +``` + +--- + +### `listNotificationTemplates` + +List notification templates with optional filtering and pagination + +`GET /v1/notification/templates` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `q` | query | string | No | Lucene query string for filtering | +| `from` | query | number | No | Pagination offset (0-based) | +| `size` | query | number | No | Results per page | +| `sort` | query | string | No | Sort fields (prefix with - for descending) | +| `fields` | query | string | No | Comma-separated fields to include | +| `hydrate` | query | boolean | No | Resolve nested relations | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification listNotificationTemplates +``` + +With JSONata filter: + +```bash +epilot notification listNotificationTemplates --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_schema": "string", + "_title": "string", + "_org": "string", + "_tags": ["string"], + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z", + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "_owners": [ + { + "org_id": "string", + "user_id": "string" + } + ], + "_acl": { + "view": ["string"], + "edit": ["string"], + "delete": ["string"] + }, + "name": "string", + "type": "string", + "notification_title": "string", + "message": "string", + "action_label": "string", + "action_url": "string", + "style": "string", + "system_template": true, + "created_by": "string", + "updated_by": "string" + } + ], + "hits": 0 +} +``` + +
+ +--- + +### `createNotificationTemplate` + +Create a new notification template + +`POST /v1/notification/templates` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification createNotificationTemplate +``` + +With request body: + +```bash +epilot notification createNotificationTemplate \ + -d '{ + "name": "string", + "type": "string", + "notification_title": "string", + "message": "string", + "action_label": "string", + "action_url": "string", + "style": "string", + "_title": "string", + "_tags": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot notification createNotificationTemplate +``` + +With JSONata filter: + +```bash +epilot notification createNotificationTemplate --jsonata '_id' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_schema": "string", + "_title": "string", + "_org": "string", + "_tags": ["string"], + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z", + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "_owners": [ + { + "org_id": "string", + "user_id": "string" + } + ], + "_acl": { + "view": ["string"], + "edit": ["string"], + "delete": ["string"] + }, + "name": "string", + "type": "string", + "notification_title": "string", + "message": "string", + "action_label": "string", + "action_url": "string", + "style": "string", + "system_template": true, + "created_by": "string", + "updated_by": "string" +} +``` + +
+ +--- + +### `getNotificationTemplate` + +Get a single notification template by ID + +`GET /v1/notification/templates/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Template ID (UUID) | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification getNotificationTemplate \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot notification getNotificationTemplate 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot notification getNotificationTemplate -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '_id' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_schema": "string", + "_title": "string", + "_org": "string", + "_tags": ["string"], + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z", + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "_owners": [ + { + "org_id": "string", + "user_id": "string" + } + ], + "_acl": { + "view": ["string"], + "edit": ["string"], + "delete": ["string"] + }, + "name": "string", + "type": "string", + "notification_title": "string", + "message": "string", + "action_label": "string", + "action_url": "string", + "style": "string", + "system_template": true, + "created_by": "string", + "updated_by": "string" +} +``` + +
+ +--- + +### `updateNotificationTemplate` + +Update a notification template (full replacement) + +`PUT /v1/notification/templates/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Template ID (UUID) | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification updateNotificationTemplate \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot notification updateNotificationTemplate \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "name": "string", + "notification_title": "string", + "message": "string", + "action_label": "string", + "action_url": "string", + "style": "string", + "_title": "string", + "_tags": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot notification updateNotificationTemplate 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot notification updateNotificationTemplate -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot notification updateNotificationTemplate -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '_id' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_schema": "string", + "_title": "string", + "_org": "string", + "_tags": ["string"], + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z", + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "_owners": [ + { + "org_id": "string", + "user_id": "string" + } + ], + "_acl": { + "view": ["string"], + "edit": ["string"], + "delete": ["string"] + }, + "name": "string", + "type": "string", + "notification_title": "string", + "message": "string", + "action_label": "string", + "action_url": "string", + "style": "string", + "system_template": true, + "created_by": "string", + "updated_by": "string" +} +``` + +
+ +--- + +### `patchNotificationTemplate` + +Partially update a notification template + +`PATCH /v1/notification/templates/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Template ID (UUID) | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification patchNotificationTemplate \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot notification patchNotificationTemplate \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "name": "string", + "notification_title": "string", + "message": "string", + "action_label": "string", + "action_url": "string", + "style": "string", + "_title": "string", + "_tags": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot notification patchNotificationTemplate 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot notification patchNotificationTemplate -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot notification patchNotificationTemplate -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '_id' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_schema": "string", + "_title": "string", + "_org": "string", + "_tags": ["string"], + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z", + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "_owners": [ + { + "org_id": "string", + "user_id": "string" + } + ], + "_acl": { + "view": ["string"], + "edit": ["string"], + "delete": ["string"] + }, + "name": "string", + "type": "string", + "notification_title": "string", + "message": "string", + "action_label": "string", + "action_url": "string", + "style": "string", + "system_template": true, + "created_by": "string", + "updated_by": "string" +} +``` + +
+ +--- + +### `deleteNotificationTemplate` + +Delete a notification template permanently + +`DELETE /v1/notification/templates/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string (uuid) | Yes | Template ID (UUID) | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification deleteNotificationTemplate \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot notification deleteNotificationTemplate 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot notification deleteNotificationTemplate -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '_id' +``` + +
+Sample Response + +```json +{ + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_schema": "string", + "_title": "string", + "_org": "string", + "_tags": ["string"], + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z", + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"], + "_owners": [ + { + "org_id": "string", + "user_id": "string" + } + ], + "_acl": { + "view": ["string"], + "edit": ["string"], + "delete": ["string"] + }, + "name": "string", + "type": "string", + "notification_title": "string", + "message": "string", + "action_label": "string", + "action_url": "string", + "style": "string", + "system_template": true, + "created_by": "string", + "updated_by": "string" +} +``` + +
+ +--- + +### `sendPreview` + +Send a preview notification (both email and in-app) to the requesting user. + +`POST /v1/notification/templates/send-preview` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot notification sendPreview +``` + +With request body: + +```bash +epilot notification sendPreview \ + -d '{ + "template": { + "name": "string", + "notification_title": "string", + "message": "string", + "action_label": "string", + "action_url": "string", + "style": "string", + "_title": "string", + "_tags": ["string"], + "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] + }, + "context_ids": {} +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot notification sendPreview +``` + +With JSONata filter: + +```bash +epilot notification sendPreview --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "success": true, + "data": {} + } +] +``` + +
+ +--- diff --git a/packages/cli/docs/organization.md b/packages/cli/docs/organization.md new file mode 100644 index 00000000..4c361f4e --- /dev/null +++ b/packages/cli/docs/organization.md @@ -0,0 +1,501 @@ +# Organization API + +- **Base URL:** `https://organization-v2.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/organization](https://docs.epilot.io/api/organization) + +Manage epilot tenant organizations + +## Quick Start + +```bash +# List available operations +epilot organization + +# Call an operation +epilot organization getCurrentOrganization +``` + +## Operations + +**Organization** +- [`getCurrentOrganization`](#getcurrentorganization) — Get caller's current organization +- [`getOrganization`](#getorganization) — Get an organization +- [`updateOrganization`](#updateorganization) — Updates an organization + +**Organization Settings** +- [`getSettings`](#getsettings) — Get full organization settings object +- [`putSettingsValue`](#putsettingsvalue) — Updates an organization setting +- [`deleteSettingsValue`](#deletesettingsvalue) — Updates an organization nsetting + +### `getCurrentOrganization` + +Get caller's current organization + +`GET /v2/organization/current` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot organization getCurrentOrganization +``` + +With JSONata filter: + +```bash +epilot organization getCurrentOrganization --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "739224", + "name": "Epilot", + "email": "someone@epilot.cloud", + "phone": "+49123123123", + "website": "https://epilot.cloud", + "address": { + "country": "string", + "city": "string", + "postal_code": "string", + "street": "string", + "street_number": "string" + }, + "organization_use": "Production", + "parent_production_org_id": "string", + "created_date": "1970-01-01T00:00:00.000Z", + "logo_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "logo_thumbnail_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "signature": "

Thanks

", + "is_unlicensed_org": false, + "style": {}, + "type": "Vendor", + "symbol": "EPI", + "pricing_tier": "professional", + "free_user_limit": 50 +} +``` + +
+ +--- + +### `getOrganization` + +Get an organization + +`GET /v2/organization/{org_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `org_id` | path | string | Yes | The Id of the organization. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot organization getOrganization \ + -p org_id=739224 +``` + +Using positional args for path parameters: + +```bash +epilot organization getOrganization 739224 +``` + +With JSONata filter: + +```bash +epilot organization getOrganization -p org_id=739224 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "739224", + "name": "Epilot", + "email": "someone@epilot.cloud", + "phone": "+49123123123", + "website": "https://epilot.cloud", + "address": { + "country": "string", + "city": "string", + "postal_code": "string", + "street": "string", + "street_number": "string" + }, + "organization_use": "Production", + "parent_production_org_id": "string", + "created_date": "1970-01-01T00:00:00.000Z", + "logo_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "logo_thumbnail_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "signature": "

Thanks

", + "is_unlicensed_org": false, + "style": {}, + "type": "Vendor", + "symbol": "EPI", + "pricing_tier": "professional", + "free_user_limit": 50 +} +``` + +
+ +--- + +### `updateOrganization` + +Updates an organization + +`PATCH /v2/organization/{org_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `org_id` | path | string | Yes | The Id of the organization. | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot organization updateOrganization \ + -p org_id=739224 +``` + +With request body: + +```bash +epilot organization updateOrganization \ + -p org_id=739224 \ + -d '{ + "id": "739224", + "name": "Epilot", + "email": "someone@epilot.cloud", + "phone": "+49123123123", + "website": "https://epilot.cloud", + "address": { + "country": "string", + "city": "string", + "postal_code": "string", + "street": "string", + "street_number": "string" + }, + "organization_use": "Production", + "parent_production_org_id": "string", + "created_date": "1970-01-01T00:00:00.000Z", + "logo_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "logo_thumbnail_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "signature": "

Thanks

", + "is_unlicensed_org": false, + "style": {}, + "type": "Vendor", + "symbol": "EPI", + "pricing_tier": "professional", + "free_user_limit": 50 +}' +``` + +Using positional args for path parameters: + +```bash +epilot organization updateOrganization 739224 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot organization updateOrganization -p org_id=739224 +``` + +With JSONata filter: + +```bash +epilot organization updateOrganization -p org_id=739224 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "739224", + "name": "Epilot", + "email": "someone@epilot.cloud", + "phone": "+49123123123", + "website": "https://epilot.cloud", + "address": { + "country": "string", + "city": "string", + "postal_code": "string", + "street": "string", + "street_number": "string" + }, + "organization_use": "Production", + "parent_production_org_id": "string", + "created_date": "1970-01-01T00:00:00.000Z", + "logo_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "logo_thumbnail_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "signature": "

Thanks

", + "is_unlicensed_org": false, + "style": {}, + "type": "Vendor", + "symbol": "EPI", + "pricing_tier": "professional", + "free_user_limit": 50 +} +``` + +
+ +--- + +### `getSettings` + +Get full organization settings object + +`GET /v2/organization/{org_id}/settings` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `org_id` | path | string | Yes | The Id of the organization. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot organization getSettings \ + -p org_id=739224 +``` + +Using positional args for path parameters: + +```bash +epilot organization getSettings 739224 +``` + +With JSONata filter: + +```bash +epilot organization getSettings -p org_id=739224 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "double_opt_in": { + "enabled": true + } +} +``` + +
+ +--- + +### `putSettingsValue` + +Updates an organization setting + +`PUT /v2/organization/{org_id}/settings/{key}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `org_id` | path | string | Yes | The Id of the organization. | +| `key` | path | string | Yes | Organization setting key | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot organization putSettingsValue \ + -p org_id=739224 \ + -p key=example \ + -d '{"enabled":true}' +``` + +Using positional args for path parameters: + +```bash +epilot organization putSettingsValue 739224 example +``` + +Using stdin pipe: + +```bash +cat body.json | epilot organization putSettingsValue -p org_id=739224 -p key=example +``` + +With JSONata filter: + +```bash +epilot organization putSettingsValue -p org_id=739224 -p key=example --jsonata '$' +``` + +
+Sample Response + +```json +{ + "enabled": true +} +``` + +
+ +--- + +### `deleteSettingsValue` + +Updates an organization nsetting + +`DELETE /v2/organization/{org_id}/settings/{key}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `org_id` | path | string | Yes | The Id of the organization. | +| `key` | path | string | Yes | Organization setting key | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot organization deleteSettingsValue \ + -p org_id=739224 \ + -p key=example +``` + +Using positional args for path parameters: + +```bash +epilot organization deleteSettingsValue 739224 example +``` + +With JSONata filter: + +```bash +epilot organization deleteSettingsValue -p org_id=739224 -p key=example --jsonata '$' +``` + +--- diff --git a/packages/cli/docs/partner-directory.md b/packages/cli/docs/partner-directory.md new file mode 100644 index 00000000..c639505d --- /dev/null +++ b/packages/cli/docs/partner-directory.md @@ -0,0 +1,1282 @@ +# Partner API + +- **Base URL:** `https://partner-directory-api.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/partner-directory](https://docs.epilot.io/api/partner-directory) + +Management of Partners in epilot + +## Quick Start + +```bash +# List available operations +epilot partner-directory + +# Call an operation +epilot partner-directory approvePartner -p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc +``` + +## Operations + +**partners** +- [`approvePartner`](#approvepartner) — Approve partner request +- [`rejectPartner`](#rejectpartner) — Reject partner request +- [`searchAssignable`](#searchassignable) — Search for assignable users/organizations from this organization and Partners +- [`batchGetAssignable`](#batchgetassignable) — Search for assignable users from this organization by its ids +- [`getPartnerByToken`](#getpartnerbytoken) — Get partner by token +- [`activatePartner`](#activatepartner) — Activate partner using an invite token +- [`searchGeolocationForText`](#searchgeolocationfortext) — Converts a given string, in the format of an address, to geo-location latitude and longitude +- [`invitePartnerV2`](#invitepartnerv2) — Invite a partner into collaboration. It will send an email to partner and ask to join into collaboration + +**partner_users** +- [`getPartnerUsers`](#getpartnerusers) — Get all users for a partner organization with their roles +- [`createPartnerUser`](#createpartneruser) — Create a new user in a partner organization +- [`deletePartnerUser`](#deletepartneruser) — Delete a user from a partner organization +- [`getPartnerRoles`](#getpartnerroles) — Get all roles for a partner organization +- [`createPartnerRole`](#createpartnerrole) — Create a role for a partner organization +- [`updatePartnerRole`](#updatepartnerrole) — Update a role for a partner organization +- [`assignPartnerUserRoles`](#assignpartneruserroles) — Assign roles to a user in a partner organization +- [`unassignPartnerUserRoles`](#unassignpartneruserroles) — Unassign roles from a user in a partner organization + +### `approvePartner` + +Approve partner request + +`POST /v1/partners/{id}/approve` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Id of partner | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory approvePartner \ + -p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc +``` + +Using positional args for path parameters: + +```bash +epilot partner-directory approvePartner e45a6dc2-3795-43a3-ae0f-6b6760f310fc +``` + +With JSONata filter: + +```bash +epilot partner-directory approvePartner -p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc", + "organization_id": "123", + "created_at": "2022-02-08T04:44:32.246Z", + "description": "Description", + "company_name": "Company name", + "invitation_token": "string", + "invitation_email": "user@example.com", + "email": "user@example.com", + "owner_email": "user@example.com", + "signed_up_email": "user@example.com", + "partner_org_id": 123456, + "status": "Pending" +} +``` + +
+ +--- + +### `rejectPartner` + +Reject partner request + +`POST /v1/partners/{id}/reject` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Id of partner | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory rejectPartner \ + -p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc +``` + +Using positional args for path parameters: + +```bash +epilot partner-directory rejectPartner e45a6dc2-3795-43a3-ae0f-6b6760f310fc +``` + +With JSONata filter: + +```bash +epilot partner-directory rejectPartner -p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc", + "organization_id": "123", + "created_at": "2022-02-08T04:44:32.246Z", + "description": "Description", + "company_name": "Company name", + "invitation_token": "string", + "invitation_email": "user@example.com", + "email": "user@example.com", + "owner_email": "user@example.com", + "signed_up_email": "user@example.com", + "partner_org_id": 123456, + "status": "Pending" +} +``` + +
+ +--- + +### `searchAssignable` + +Search for assignable users/organizations from this organization and Partners + +`POST /v1/partners/assignables:search` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory searchAssignable +``` + +With request body: + +```bash +epilot partner-directory searchAssignable \ + -d '{ + "q": "", + "from": 0, + "size": 25, + "org_ids": ["123"], + "portalUsersEntityIdScope": "", + "types": ["user", "partner_user", "partner_organization", "ecp", "group"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot partner-directory searchAssignable +``` + +With JSONata filter: + +```bash +epilot partner-directory searchAssignable --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 25, + "results": [ + { + "type": "user", + "display_name": "Example User", + "image_uri": { + "original": "https://epilot-staging-user-content.s3.eu-central-1.amazonaws.com/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png", + "thumbnail_32": "https://file.sls.epilot.io/v1/files/public/preview?w=32&h=32&key=/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png" + }, + "org_id": "123", + "created_at": "2022-02-08T04:44:32.246Z", + "activated_at": "2022-02-08T04:44:32.246Z", + "status": "Active", + "user_id": "456", + "email": "example@example.com" + } + ] +} +``` + +
+ +--- + +### `batchGetAssignable` + +Search for assignable users from this organization by its ids + +`POST /v1/partners/assignables:batchGet` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory batchGetAssignable \ + -d '[{"user_id":"string","org_id":"string","group_id":"string"}]' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot partner-directory batchGetAssignable +``` + +With JSONata filter: + +```bash +epilot partner-directory batchGetAssignable --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 25, + "results": [ + { + "type": "user", + "display_name": "Example User", + "image_uri": { + "original": "https://epilot-staging-user-content.s3.eu-central-1.amazonaws.com/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png", + "thumbnail_32": "https://file.sls.epilot.io/v1/files/public/preview?w=32&h=32&key=/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png" + }, + "org_id": "123", + "created_at": "2022-02-08T04:44:32.246Z", + "activated_at": "2022-02-08T04:44:32.246Z", + "status": "Active", + "user_id": "456", + "email": "example@example.com" + } + ] +} +``` + +
+ +--- + +### `getPartnerByToken` + +Get partner by token + +`GET /v1/partner-directory/public/getPartnerByToken` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `token` | query | string | Yes | Invite Token | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory getPartnerByToken \ + -p token=example +``` + +With JSONata filter: + +```bash +epilot partner-directory getPartnerByToken -p token=example --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc", + "organization_id": "123", + "created_at": "2022-02-08T04:44:32.246Z", + "description": "Description", + "company_name": "Company name", + "invitation_token": "string", + "invitation_email": "user@example.com", + "email": "user@example.com", + "owner_email": "user@example.com", + "signed_up_email": "user@example.com", + "partner_org_id": 123456, + "status": "Pending" +} +``` + +
+ +--- + +### `activatePartner` + +Activate partner using an invite token + +`POST /v1/partner-directory/public/activate` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `token` | query | string | Yes | Invite Token | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory activatePartner \ + -p token=example \ + -d '{"company_name":"Company name","signed_up_email":"user@example.com","organization_id":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot partner-directory activatePartner -p token=example +``` + +With JSONata filter: + +```bash +epilot partner-directory activatePartner -p token=example --jsonata '$' +``` + +--- + +### `searchGeolocationForText` + +Converts a given string, in the format of an address, to geo-location latitude and longitude + +`POST /v1/geolocation/text:search` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory searchGeolocationForText \ + -d '{"address":"Auweg 1, 93055 Regensburg, DE"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot partner-directory searchGeolocationForText +``` + +With JSONata filter: + +```bash +epilot partner-directory searchGeolocationForText --jsonata 'lat' +``` + +
+Sample Response + +```json +{ + "lat": 49.013, + "lng": 12.101, + "addressLabel": "string", + "relevance": 0 +} +``` + +
+ +--- + +### `invitePartnerV2` + +Invite a partner into collaboration. It will send an email to partner and ask to join into collaboration + +`POST /v2/partners/{id}/invite` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Id of partner | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory invitePartnerV2 \ + -p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc \ + -d '{"language":"en"}' +``` + +Using positional args for path parameters: + +```bash +epilot partner-directory invitePartnerV2 e45a6dc2-3795-43a3-ae0f-6b6760f310fc +``` + +Using stdin pipe: + +```bash +cat body.json | epilot partner-directory invitePartnerV2 -p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc +``` + +With JSONata filter: + +```bash +epilot partner-directory invitePartnerV2 -p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc", + "organization_id": "123", + "created_at": "2022-02-08T04:44:32.246Z", + "description": "Description", + "company_name": "Company name", + "invitation_token": "string", + "invitation_email": "user@example.com", + "email": "user@example.com", + "owner_email": "user@example.com", + "signed_up_email": "user@example.com", + "partner_org_id": 123456, + "status": "Pending" +} +``` + +
+ +--- + +### `getPartnerUsers` + +Get all users for a partner organization with their roles + +`GET /v2/partners/{orgId}/users` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `orgId` | path | string | Yes | The organization ID of the partner | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory getPartnerUsers \ + -p orgId=123 +``` + +Using positional args for path parameters: + +```bash +epilot partner-directory getPartnerUsers 123 +``` + +With JSONata filter: + +```bash +epilot partner-directory getPartnerUsers -p orgId=123 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "456", + "name": "John Doe", + "email": "user@example.com", + "status": "Active", + "image": { + "original": "https://example.com/path", + "thumbnail_32": "https://example.com/path" + }, + "roles": [ + { + "id": "role-123", + "slug": "admin", + "name": "Administrator" + } + ] + } + ] +} +``` + +
+ +--- + +### `createPartnerUser` + +Create a new user in a partner organization + +`POST /v2/partners/{orgId}/users` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `orgId` | path | string | Yes | The Partner organization ID where the user should be created | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory createPartnerUser \ + -p orgId=123 \ + -d '{"email":"user@example.com","language":"en","roles":["role-123","role-456"]}' +``` + +Using positional args for path parameters: + +```bash +epilot partner-directory createPartnerUser 123 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot partner-directory createPartnerUser -p orgId=123 +``` + +With JSONata filter: + +```bash +epilot partner-directory createPartnerUser -p orgId=123 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "456", + "email": "user@example.com", + "display_name": "John Doe", + "status": "Active" +} +``` + +
+ +--- + +### `deletePartnerUser` + +Delete a user from a partner organization + +`DELETE /v2/partners/{orgId}/users/{userId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `orgId` | path | string | Yes | The organization ID of the partner | +| `userId` | path | string | Yes | The user ID to delete | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory deletePartnerUser \ + -p orgId=123 \ + -p userId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot partner-directory deletePartnerUser 123 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot partner-directory deletePartnerUser -p orgId=123 -p userId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{} +``` + +
+ +--- + +### `getPartnerRoles` + +Get all roles for a partner organization + +`GET /v2/partners/{orgId}/roles` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `orgId` | path | string | Yes | The organization ID of the partner | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory getPartnerRoles \ + -p orgId=123 +``` + +Using positional args for path parameters: + +```bash +epilot partner-directory getPartnerRoles 123 +``` + +With JSONata filter: + +```bash +epilot partner-directory getPartnerRoles -p orgId=123 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "role-123", + "slug": "admin", + "name": "Administrator", + "type": "share_role" + } + ] +} +``` + +
+ +--- + +### `createPartnerRole` + +Create a role for a partner organization + +`POST /v2/partners/{orgId}/roles` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `orgId` | path | string | Yes | The organization ID of the partner | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory createPartnerRole \ + -p orgId=123 +``` + +With request body: + +```bash +epilot partner-directory createPartnerRole \ + -p orgId=123 \ + -d '{ + "name": "Partner Admin", + "slug": "partner_admin", + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow", + "conditions": [ + { + "attribute": "workflows.primary.task_name", + "operation": "equals", + "values": ["Qualification"] + } + ], + "dependencies": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow", + "conditions": [ + { + "attribute": "workflows.primary.task_name", + "operation": "equals", + "values": ["Qualification"] + } + ] + } + ] + } + ] +}' +``` + +Using positional args for path parameters: + +```bash +epilot partner-directory createPartnerRole 123 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot partner-directory createPartnerRole -p orgId=123 +``` + +With JSONata filter: + +```bash +epilot partner-directory createPartnerRole -p orgId=123 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "role-123", + "slug": "admin", + "name": "Administrator", + "type": "share_role" +} +``` + +
+ +--- + +### `updatePartnerRole` + +Update a role for a partner organization + +`PUT /v2/partners/{orgId}/roles/{roleId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `orgId` | path | string | Yes | The organization ID of the partner | +| `roleId` | path | string | Yes | The role ID to update | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory updatePartnerRole \ + -p orgId=123 \ + -p roleId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot partner-directory updatePartnerRole \ + -p orgId=123 \ + -p roleId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow", + "conditions": [ + { + "attribute": "workflows.primary.task_name", + "operation": "equals", + "values": ["Qualification"] + } + ], + "dependencies": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow", + "conditions": [ + { + "attribute": "workflows.primary.task_name", + "operation": "equals", + "values": ["Qualification"] + } + ] + } + ] + } + ], + "id": "123:owner", + "name": "Owner", + "slug": "owner" +}' +``` + +Using positional args for path parameters: + +```bash +epilot partner-directory updatePartnerRole 123 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot partner-directory updatePartnerRole -p orgId=123 -p roleId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot partner-directory updatePartnerRole -p orgId=123 -p roleId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "role-123", + "slug": "admin", + "name": "Administrator", + "type": "share_role" +} +``` + +
+ +--- + +### `assignPartnerUserRoles` + +Assign roles to a user in a partner organization + +`POST /v2/partners/{orgId}/users/{userId}/roles` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `orgId` | path | string | Yes | The organization ID of the partner | +| `userId` | path | string | Yes | The user ID | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory assignPartnerUserRoles \ + -p orgId=123 \ + -p userId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"roleIds":["role-123","role-456"]}' +``` + +Using positional args for path parameters: + +```bash +epilot partner-directory assignPartnerUserRoles 123 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot partner-directory assignPartnerUserRoles -p orgId=123 -p userId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot partner-directory assignPartnerUserRoles -p orgId=123 -p userId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "roleId": "string", + "success": true, + "data": {}, + "error": {} + } + ] +} +``` + +
+ +--- + +### `unassignPartnerUserRoles` + +Unassign roles from a user in a partner organization + +`DELETE /v2/partners/{orgId}/users/{userId}/roles` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `orgId` | path | string | Yes | The organization ID of the partner | +| `userId` | path | string | Yes | The user ID | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot partner-directory unassignPartnerUserRoles \ + -p orgId=123 \ + -p userId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"roleIds":["role-123","role-456"]}' +``` + +Using positional args for path parameters: + +```bash +epilot partner-directory unassignPartnerUserRoles 123 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot partner-directory unassignPartnerUserRoles -p orgId=123 -p userId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot partner-directory unassignPartnerUserRoles -p orgId=123 -p userId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "roleId": "string", + "success": true, + "data": {}, + "error": {} + } + ] +} +``` + +
+ +--- diff --git a/packages/cli/docs/permissions.md b/packages/cli/docs/permissions.md new file mode 100644 index 00000000..c4436f90 --- /dev/null +++ b/packages/cli/docs/permissions.md @@ -0,0 +1,990 @@ +# Permissions API + +- **Base URL:** `https://permissions.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/permissions](https://docs.epilot.io/api/permissions) + +Flexible Role-based Access Control for epilot + +## Quick Start + +```bash +# List available operations +epilot permissions + +# Call an operation +epilot permissions listCurrentRoles +``` + +## Operations + +**Roles** +- [`listCurrentRoles`](#listcurrentroles) — Returns roles and grants assigned to current user +- [`listAllRoles`](#listallroles) — Returns list of all roles in organization +- [`createRole`](#createrole) — Create role +- [`searchRoles`](#searchroles) — Search Roles +- [`getRole`](#getrole) — Get role by id +- [`putRole`](#putrole) — Create or update role +- [`deleteRole`](#deleterole) — Delete role by id +- [`refreshPermissions`](#refreshpermissions) — Makes sure the user has a role in the organization + +**Assignments** +- [`getAssignedRolesForUser`](#getassignedrolesforuser) — Get list of assigned roles by user id +- [`assignRoles`](#assignroles) — Assign / unassign roles to users. +- [`addAssignment`](#addassignment) — Assign a user to a role. +- [`removeAssignment`](#removeassignment) — Remove role assignment from user +- [`listAllAssignments`](#listallassignments) — Returns list of all assignments in organization + +### `listCurrentRoles` + +Returns roles and grants assigned to current user + +`GET /v1/permissions/me` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot permissions listCurrentRoles +``` + +With JSONata filter: + +```bash +epilot permissions listCurrentRoles --jsonata 'roles' +``` + +
+Sample Response + +```json +{ + "roles": [ + { + "id": "123:owner", + "name": "Owner", + "slug": "owner", + "type": "user_role", + "expires_at": "2028-07-21T17:32:28Z", + "organization_id": "123", + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow", + "conditions": [ + { + "attribute": "workflows.primary.task_name", + "operation": "equals", + "values": ["Qualification"] + } + ] + } + ], + "parent_role": "123:owner" + } + ] +} +``` + +
+ +--- + +### `listAllRoles` + +Returns list of all roles in organization + +`GET /v1/permissions/roles` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot permissions listAllRoles +``` + +With JSONata filter: + +```bash +epilot permissions listAllRoles --jsonata 'roles' +``` + +
+Sample Response + +```json +{ + "roles": [ + { + "id": "123:owner", + "name": "Owner", + "slug": "owner", + "type": "user_role", + "expires_at": "2028-07-21T17:32:28Z", + "organization_id": "123", + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow", + "conditions": [ + { + "attribute": "workflows.primary.task_name", + "operation": "equals", + "values": ["Qualification"] + } + ] + } + ], + "parent_role": "123:owner" + } + ] +} +``` + +
+ +--- + +### `createRole` + +Create role + +`POST /v1/permissions/roles` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot permissions createRole \ + -d '{}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot permissions createRole +``` + +With JSONata filter: + +```bash +epilot permissions createRole --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "123:owner", + "name": "Owner", + "slug": "owner", + "type": "user_role", + "expires_at": "2028-07-21T17:32:28Z", + "organization_id": "123", + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow", + "conditions": [ + { + "attribute": "workflows.primary.task_name", + "operation": "equals", + "values": ["Qualification"] + } + ] + } + ], + "parent_role": "123:owner" +} +``` + +
+ +--- + +### `searchRoles` + +Search Roles + +`POST /v1/permissions/roles:search` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot permissions searchRoles +``` + +With request body: + +```bash +epilot permissions searchRoles \ + -d '{ + "role_ids": ["123:manager", "456:owner"], + "org_ids": ["123", "456"], + "slugs": ["manager", "owner"], + "query": "Administrator", + "limit": 1, + "offset": 1 +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot permissions searchRoles +``` + +With JSONata filter: + +```bash +epilot permissions searchRoles --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 0, + "results": [ + { + "id": "123:owner", + "name": "Owner", + "slug": "owner", + "type": "user_role", + "expires_at": "2028-07-21T17:32:28Z", + "organization_id": "123", + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow", + "conditions": [ + { + "attribute": "workflows.primary.task_name", + "operation": "equals", + "values": ["Qualification"] + } + ] + } + ], + "parent_role": "123:owner" + } + ] +} +``` + +
+ +--- + +### `getRole` + +Get role by id + +`GET /v1/permissions/roles/{roleId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `roleId` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot permissions getRole \ + -p roleId=123:owner +``` + +Using positional args for path parameters: + +```bash +epilot permissions getRole 123:owner +``` + +With JSONata filter: + +```bash +epilot permissions getRole -p roleId=123:owner --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "123:owner", + "name": "Owner", + "slug": "owner", + "type": "user_role", + "expires_at": "2028-07-21T17:32:28Z", + "organization_id": "123", + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow", + "conditions": [ + { + "attribute": "workflows.primary.task_name", + "operation": "equals", + "values": ["Qualification"] + } + ] + } + ], + "parent_role": "123:owner" +} +``` + +
+ +--- + +### `putRole` + +Create or update role + +`PUT /v1/permissions/roles/{roleId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `roleId` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot permissions putRole \ + -p roleId=123:owner +``` + +With request body: + +```bash +epilot permissions putRole \ + -p roleId=123:owner \ + -d '{ + "id": "123:owner", + "name": "Owner", + "slug": "owner", + "type": "user_role", + "expires_at": "2028-07-21T17:32:28Z", + "organization_id": "123", + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow", + "conditions": [ + { + "attribute": "workflows.primary.task_name", + "operation": "equals", + "values": ["Qualification"] + } + ] + } + ], + "parent_role": "123:owner" +}' +``` + +Using positional args for path parameters: + +```bash +epilot permissions putRole 123:owner +``` + +Using stdin pipe: + +```bash +cat body.json | epilot permissions putRole -p roleId=123:owner +``` + +With JSONata filter: + +```bash +epilot permissions putRole -p roleId=123:owner --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "123:owner", + "name": "Owner", + "slug": "owner", + "type": "user_role", + "expires_at": "2028-07-21T17:32:28Z", + "organization_id": "123", + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow", + "conditions": [ + { + "attribute": "workflows.primary.task_name", + "operation": "equals", + "values": ["Qualification"] + } + ] + } + ], + "parent_role": "123:owner" +} +``` + +
+ +--- + +### `deleteRole` + +Delete role by id + +`DELETE /v1/permissions/roles/{roleId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `roleId` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot permissions deleteRole \ + -p roleId=123:owner +``` + +Using positional args for path parameters: + +```bash +epilot permissions deleteRole 123:owner +``` + +With JSONata filter: + +```bash +epilot permissions deleteRole -p roleId=123:owner --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "123:owner", + "name": "Owner", + "slug": "owner", + "type": "user_role", + "expires_at": "2028-07-21T17:32:28Z", + "organization_id": "123", + "grants": [ + { + "action": "entity-read", + "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947", + "effect": "allow", + "conditions": [ + { + "attribute": "workflows.primary.task_name", + "operation": "equals", + "values": ["Qualification"] + } + ] + } + ], + "parent_role": "123:owner" +} +``` + +
+ +--- + +### `refreshPermissions` + +Makes sure the user has a role in the organization + +`GET /v1/permissions/refresh` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot permissions refreshPermissions +``` + +With JSONata filter: + +```bash +epilot permissions refreshPermissions --jsonata '$' +``` + +--- + +### `getAssignedRolesForUser` + +Get list of assigned roles by user id + +`GET /v1/permissions/assignments/{userId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `userId` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot permissions getAssignedRolesForUser \ + -p userId=1 +``` + +Using positional args for path parameters: + +```bash +epilot permissions getAssignedRolesForUser 1 +``` + +With JSONata filter: + +```bash +epilot permissions getAssignedRolesForUser -p userId=1 --jsonata '$' +``` + +
+Sample Response + +```json +["123:owner"] +``` + +
+ +--- + +### `assignRoles` + +Assign / unassign roles to users. + +`PUT /v1/permissions/assignments/{userId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `userId` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot permissions assignRoles \ + -p userId=1 \ + -d '["123:owner"]' +``` + +Using positional args for path parameters: + +```bash +epilot permissions assignRoles 1 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot permissions assignRoles -p userId=1 +``` + +With JSONata filter: + +```bash +epilot permissions assignRoles -p userId=1 --jsonata '$' +``` + +
+Sample Response + +```json +["123:owner"] +``` + +
+ +--- + +### `addAssignment` + +Assign a user to a role. + +`POST /v1/permissions/assignments/{userId}/{roleId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `userId` | path | string | Yes | | +| `roleId` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot permissions addAssignment \ + -p userId=1 \ + -p roleId=123:owner +``` + +Using positional args for path parameters: + +```bash +epilot permissions addAssignment 1 123:owner +``` + +With JSONata filter: + +```bash +epilot permissions addAssignment -p userId=1 -p roleId=123:owner --jsonata 'user_id' +``` + +
+Sample Response + +```json +{ + "user_id": "1", + "roles": ["123:owner"] +} +``` + +
+ +--- + +### `removeAssignment` + +Remove role assignment from user + +`DELETE /v1/permissions/assignments/{userId}/{roleId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `userId` | path | string | Yes | | +| `roleId` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot permissions removeAssignment \ + -p userId=1 \ + -p roleId=123:owner +``` + +Using positional args for path parameters: + +```bash +epilot permissions removeAssignment 1 123:owner +``` + +With JSONata filter: + +```bash +epilot permissions removeAssignment -p userId=1 -p roleId=123:owner --jsonata 'user_id' +``` + +
+Sample Response + +```json +{ + "user_id": "1", + "roles": ["123:owner"] +} +``` + +
+ +--- + +### `listAllAssignments` + +Returns list of all assignments in organization + +`GET /v1/permissions/assignments` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot permissions listAllAssignments +``` + +With JSONata filter: + +```bash +epilot permissions listAllAssignments --jsonata 'assignments' +``` + +
+Sample Response + +```json +{ + "assignments": [ + { + "user_id": "1", + "roles": ["123:owner"] + } + ] +} +``` + +
+ +--- diff --git a/packages/cli/docs/pricing-tier.md b/packages/cli/docs/pricing-tier.md new file mode 100644 index 00000000..6a759676 --- /dev/null +++ b/packages/cli/docs/pricing-tier.md @@ -0,0 +1,78 @@ +# Pricing Tier API + +- **API Docs:** [https://docs.epilot.io/api/pricing-tier](https://docs.epilot.io/api/pricing-tier) + +Pricing Tier API + +## Quick Start + +```bash +# List available operations +epilot pricing-tier + +# Call an operation +epilot pricing-tier getCurrentPricingTier +``` + +## Operations + +**Pricing Tier** +- [`getCurrentPricingTier`](#getcurrentpricingtier) — Get current pricing tier of logged in user + +### `getCurrentPricingTier` + +Get current pricing tier of logged in user + +`GET /v2/pricing-tiers/me` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing-tier getCurrentPricingTier +``` + +With JSONata filter: + +```bash +epilot pricing-tier getCurrentPricingTier --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": 22, + "created_date": "string", + "updated_date": "string", + "organization_id": "string", + "name": "string", + "settings": {}, + "override_settings": {}, + "created_by": "string", + "updated_by": "string", + "is_pure_360": true +} +``` + +
+ +--- diff --git a/packages/cli/docs/pricing.md b/packages/cli/docs/pricing.md new file mode 100644 index 00000000..30c85f7e --- /dev/null +++ b/packages/cli/docs/pricing.md @@ -0,0 +1,2466 @@ +# Pricing API + +- **Base URL:** `https://pricing-api.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/pricing](https://docs.epilot.io/api/pricing) + +The `pricing-api` hub sets the foundations for the following Pricing APIs: + +## Quick Start + +```bash +# List available operations +epilot pricing + +# Call an operation +epilot pricing $calculatePricingDetails +``` + +## Operations + +**Order API** +- [`$calculatePricingDetails`](#$calculatepricingdetails) — Computes a set of pricing details that can be persisted on an entity with the pricing capability enabled, e.g: Orders or +- [`createOrder`](#createorder) — Create an order +- [`putOrder`](#putorder) — Update an existing Order + +**Cart API** +- [`$checkoutCart`](#$checkoutcart) — Checkouts a cart and executes the specified checkout `mode` process. + +**Catalog API** +- [`$searchCatalog`](#$searchcatalog) — Provides a querying functionalities over products and prices of the Catalog for a given organization. +- [`$privateSearchCatalog`](#$privatesearchcatalog) — Provides a querying functionalities over products and prices of the Catalog for a given organization. + +**Promo Codes API** +- [`$validatePromoCodes`](#$validatepromocodes) — Validate a list of promo codes against a list of coupons + +**Availability API** +- [`$availabilityCheck`](#$availabilitycheck) — The availability check endpoint +- [`$validateAvailabilityFile`](#$validateavailabilityfile) — Validates an availability file, it returns an array of errors if the file is invalid + +**Spot Market API** +- [`$historicMarketPrices`](#$historicmarketprices) — Get a series of historic energy prices for a given time period, market and bidding zone. +- [`$averageMarketPrice`](#$averagemarketprice) — Get the average energy prices for a given time period, market and bidding zone. + +**External Integrations API** +- [`$searchExternalProducts`](#$searchexternalproducts) — Returns the list of available products with computed prices based on a given context and for a given org integration. +- [`$searchExternalProductRecommendations`](#$searchexternalproductrecommendations) — Returns the list of available product recommendations with computed prices based on a given context and for a given org +- [`$searchProviders`](#$searchproviders) — Returns the list of providers available based on a given location +- [`$searchStreets`](#$searchstreets) — Returns the list of streets available for a given postal code and city +- [`$computePrice`](#$computeprice) — Returns the price for a given product type based on location and consumption +- [`$getCredentials`](#$getcredentials) — Gets the credentials for a given integration / organization +- [`$saveCredentials`](#$savecredentials) — Saves the credentials for a given integration / organization +- [`$deleteCredentials`](#$deletecredentials) — Delete the credentials for a given integration / organization + +**External Catalog API** +- [`$getExternalCatalogProducts`](#$getexternalcatalogproducts) — Returns the list of available external catalog products with computed prices based on a given context +- [`$getExternalCatalogProductRecommendations`](#$getexternalcatalogproductrecommendations) — Returns the list of available external catalog products recommendations based on a given context + +**Product Recommendations API** +- [`$productRecommendations`](#$productrecommendations) — Get a list of product recommendations based on the search parameters. + +### `$calculatePricingDetails` + +Computes a set of pricing details that can be persisted on an entity with the pricing capability enabled, e.g: Orders or + +`POST /v1/pricing:compute` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $calculatePricingDetails \ + -d '{}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $calculatePricingDetails +``` + +With JSONata filter: + +```bash +epilot pricing $calculatePricingDetails --jsonata '$' +``` + +
+Sample Response + +```json +{ + "items": [ + { + "amount_subtotal": 10000, + "amount_total": 10600, + "currency": "EUR", + "description": "Annual internet service", + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "taxes": [], + "unit_amount": 10000, + "unit_amount_net": 10000, + "pricing_model": "per_unit", + "_price": {}, + "_product": {} + }, + { + "amount_subtotal": 10000, + "amount_total": 10600, + "currency": "EUR", + "description": "Annual internet service", + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "taxes": [], + "unit_amount": 10000, + "unit_amount_net": 10000, + "pricing_model": "per_unit", + "_price": {}, + "_product": {} + } + ], + "amount_subtotal": 0, + "amount_total": 0, + "unit_amount_gross": 0, + "unit_amount_net": 0, + "amount_tax": 0, + "total_details": { + "amount_shipping": 0, + "amount_tax": 0, + "breakdown": { + "taxes": [], + "recurrences": [], + "cashbacks": [], + "recurrencesByTax": [] + } + }, + "currency": "EUR", + "redeemed_promos": [ + { + "code": "string", + "coupons": [] + } + ] +} +``` + +
+ +--- + +### `createOrder` + +Create an order + +`POST /v1/order` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing createOrder +``` + +With request body: + +```bash +epilot pricing createOrder \ + -d '{ + "status": "draft", + "line_items": [ + { + "external_fees_mappings": [], + "external_fees_metadata": {}, + "external_price_metadata": {}, + "_immutable_pricing_details": {}, + "coupon_ids": ["string"], + "taxes": [], + "recurrences": [], + "_coupons": [], + "metadata": [], + "quantity": 0, + "product_id": "string", + "price_id": "string", + "description": "string", + "product_description": "string", + "product_name": "string", + "price_mappings": [], + "is_tax_inclusive": true, + "_product": {}, + "type": "one_time", + "billing_period": "weekly", + "unit_amount": 0, + "unit_amount_gross": 0, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "string", + "is_composite_price": false, + "pricing_model": "per_unit", + "_price": {} + }, + { + "external_fees_mappings": [], + "external_fees_metadata": {}, + "external_price_metadata": {}, + "_immutable_pricing_details": {}, + "coupon_ids": ["string"], + "taxes": [], + "recurrences": [], + "_coupons": [], + "metadata": [], + "quantity": 0, + "product_id": "string", + "price_id": "string", + "description": "string", + "product_description": "string", + "product_name": "string", + "price_mappings": [], + "is_tax_inclusive": true, + "_product": {}, + "is_composite_price": true, + "item_components": [], + "selected_price_component_ids": ["string"], + "price_component_coupon_ids": {}, + "_price": {} + } + ], + "source_type": "journey", + "currency": "EUR", + "contact": "string", + "billing_first_name": "string", + "billing_last_name": "string", + "billing_company_name": "string", + "billing_vat": "string", + "billing_email": "string", + "billing_phone": "string", + "billing_address": [ + { + "_tags": ["billing"], + "street": "string", + "street_number": "string", + "postal_code": "string", + "city": "string", + "country": "string", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string" + } + ], + "delivery_address": [ + { + "_tags": ["billing"], + "street": "string", + "street_number": "string", + "postal_code": "string", + "city": "string", + "country": "string", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string" + } + ], + "payment_method": [ + { + "type": "string", + "details": {} + } + ], + "redeemed_promos": [ + { + "code": "string", + "coupons": [] + } + ], + "_tags": ["string"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing createOrder +``` + +With JSONata filter: + +```bash +epilot pricing createOrder --jsonata 'order_number' +``` + +
+Sample Response + +```json +{ + "order_number": "OR 2022/742701", + "status": "quote", + "source": { + "title": "manual", + "href": null + }, + "source_type": "manual", + "_schema": "order", + "_title": "OR 2022/742701", + "expires_at": "2022-06-30T16:17:00.000Z", + "line_items": [ + { + "price_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7", + "product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5", + "pricing_model": "per_unit", + "is_composite_price": false, + "taxes": [], + "_price": {}, + "_product": {}, + "quantity": 16, + "currency": "EUR", + "description": "Solar Panel Module", + "unit_amount": 100000, + "unit_amount_net": 84034, + "amount_subtotal": 1344538, + "amount_total": 1600000 + }, + { + "price_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741", + "product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5", + "pricing_model": "per_unit", + "is_composite_price": false, + "taxes": [], + "_price": {}, + "_product": {}, + "quantity": 4, + "currency": "EUR", + "description": "Battery Module 500amps", + "unit_amount": 50000, + "unit_amount_net": 42017, + "amount_subtotal": 168067, + "amount_total": 200000 + } + ], + "amount_subtotal": 1532191, + "amount_total": 1821955, + "total_details": { + "amount_tax": 289764, + "breakdown": { + "taxes": [], + "recurrences": [] + } + }, + "currency": "EUR", + "payment_method": [ + { + "type": "IBAN", + "details": {} + } + ], + "billing_contact": { + "$relation": [ + {} + ] + }, + "billing_first_name": "Joao", + "billing_last_name": "Pinho", + "billing_email": "j.pinho@epilot.cloud", + "billing_company_name": "epilot cloud", + "billing_address": [ + { + "_tags": [], + "street": "Im Media Park", + "street_number": "8a", + "postal_code": "52000", + "city": "Cologne", + "country": "DE", + "additional_info": "" + } + ], + "delivery_address": [], + "dates": [ + { + "_tags": ["Instalation Date"], + "dates": "", + "value": "2022-06-30T16:29:00.000Z" + } + ], + "_id": "4c7c9562-f8f0-4af0-a3a6-6aebc5571a6e", + "_org": "728", + "_created_at": "2022-06-03T16:29:46.303Z", + "_updated_at": "2022-06-03T16:29:46.303Z" +} +``` + +
+ +--- + +### `putOrder` + +Update an existing Order + +`PUT /v1/order/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Order entity ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing putOrder \ + -p id=9d4602d3-03be-4d85-86b2-f3c6555fc606 +``` + +With request body: + +```bash +epilot pricing putOrder \ + -p id=9d4602d3-03be-4d85-86b2-f3c6555fc606 \ + -d '{ + "status": "draft", + "line_items": [ + { + "external_fees_mappings": [], + "external_fees_metadata": {}, + "external_price_metadata": {}, + "_immutable_pricing_details": {}, + "coupon_ids": ["string"], + "taxes": [], + "recurrences": [], + "_coupons": [], + "metadata": [], + "quantity": 0, + "product_id": "string", + "price_id": "string", + "description": "string", + "product_description": "string", + "product_name": "string", + "price_mappings": [], + "is_tax_inclusive": true, + "_product": {}, + "type": "one_time", + "billing_period": "weekly", + "unit_amount": 0, + "unit_amount_gross": 0, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "string", + "is_composite_price": false, + "pricing_model": "per_unit", + "_price": {} + }, + { + "external_fees_mappings": [], + "external_fees_metadata": {}, + "external_price_metadata": {}, + "_immutable_pricing_details": {}, + "coupon_ids": ["string"], + "taxes": [], + "recurrences": [], + "_coupons": [], + "metadata": [], + "quantity": 0, + "product_id": "string", + "price_id": "string", + "description": "string", + "product_description": "string", + "product_name": "string", + "price_mappings": [], + "is_tax_inclusive": true, + "_product": {}, + "is_composite_price": true, + "item_components": [], + "selected_price_component_ids": ["string"], + "price_component_coupon_ids": {}, + "_price": {} + } + ], + "source_type": "journey", + "currency": "EUR", + "contact": "string", + "billing_first_name": "string", + "billing_last_name": "string", + "billing_company_name": "string", + "billing_vat": "string", + "billing_email": "string", + "billing_phone": "string", + "billing_address": [ + { + "_tags": ["billing"], + "street": "string", + "street_number": "string", + "postal_code": "string", + "city": "string", + "country": "string", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string" + } + ], + "delivery_address": [ + { + "_tags": ["billing"], + "street": "string", + "street_number": "string", + "postal_code": "string", + "city": "string", + "country": "string", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string" + } + ], + "payment_method": [ + { + "type": "string", + "details": {} + } + ], + "redeemed_promos": [ + { + "code": "string", + "coupons": [] + } + ], + "_tags": ["string"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot pricing putOrder 9d4602d3-03be-4d85-86b2-f3c6555fc606 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing putOrder -p id=9d4602d3-03be-4d85-86b2-f3c6555fc606 +``` + +With JSONata filter: + +```bash +epilot pricing putOrder -p id=9d4602d3-03be-4d85-86b2-f3c6555fc606 --jsonata 'order_number' +``` + +
+Sample Response + +```json +{ + "order_number": "OR 2022/742701", + "status": "quote", + "source": { + "title": "manual", + "href": null + }, + "source_type": "manual", + "_schema": "order", + "_title": "OR 2022/742701", + "expires_at": "2022-06-30T16:17:00.000Z", + "line_items": [ + { + "price_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7", + "product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5", + "pricing_model": "per_unit", + "is_composite_price": false, + "taxes": [], + "_price": {}, + "_product": {}, + "quantity": 16, + "currency": "EUR", + "description": "Solar Panel Module", + "unit_amount": 100000, + "unit_amount_net": 84034, + "amount_subtotal": 1344538, + "amount_total": 1600000 + }, + { + "price_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741", + "product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5", + "pricing_model": "per_unit", + "is_composite_price": false, + "taxes": [], + "_price": {}, + "_product": {}, + "quantity": 4, + "currency": "EUR", + "description": "Battery Module 500amps", + "unit_amount": 50000, + "unit_amount_net": 42017, + "amount_subtotal": 168067, + "amount_total": 200000 + } + ], + "amount_subtotal": 1532191, + "amount_total": 1821955, + "total_details": { + "amount_tax": 289764, + "breakdown": { + "taxes": [], + "recurrences": [] + } + }, + "currency": "EUR", + "payment_method": [ + { + "type": "IBAN", + "details": {} + } + ], + "billing_contact": { + "$relation": [ + {} + ] + }, + "billing_first_name": "Joao", + "billing_last_name": "Pinho", + "billing_email": "j.pinho@epilot.cloud", + "billing_company_name": "epilot cloud", + "billing_address": [ + { + "_tags": [], + "street": "Im Media Park", + "street_number": "8a", + "postal_code": "52000", + "city": "Cologne", + "country": "DE", + "additional_info": "" + } + ], + "delivery_address": [], + "dates": [ + { + "_tags": ["Instalation Date"], + "dates": "", + "value": "2022-06-30T16:29:00.000Z" + } + ], + "_id": "4c7c9562-f8f0-4af0-a3a6-6aebc5571a6e", + "_org": "728", + "_created_at": "2022-06-03T16:29:46.303Z", + "_updated_at": "2022-06-03T16:29:46.303Z" +} +``` + +
+ +--- + +### `$checkoutCart` + +Checkouts a cart and executes the specified checkout `mode` process. + +`POST /v1/public/cart:checkout` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `X-Ivy-Org-ID` | header | string | Yes | The target Organization Id represented by the caller | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $checkoutCart \ + -p X-Ivy-Org-ID=example +``` + +With request body: + +```bash +epilot pricing $checkoutCart \ + -p X-Ivy-Org-ID=example \ + -d '{ + "cart": "string", + "redeemed_promos": [ + { + "code": "string", + "coupons": [ + { + "_id": "123e4567-e89b-12d3-a456-426614174000", + "_schema": "coupon", + "_org": "org_12345", + "_created_at": "2024-01-15T10:00:00.000Z", + "_updated_at": "2024-01-20T12:00:00.000Z", + "_title": "Sample Coupon", + "name": "Sample Coupon", + "type": "fixed", + "fixed_value": 555, + "fixed_value_currency": "USD", + "fixed_value_decimal": "5.55", + "active": true, + "category": "cashback", + "prices": { + "$relation": [ + { + "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst", + "_tags": ["discount", "special"], + "_schema": "price" + } + ] + } + } + ] + } + ], + "mode": "create_order" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $checkoutCart -p X-Ivy-Org-ID=example +``` + +With JSONata filter: + +```bash +epilot pricing $checkoutCart -p X-Ivy-Org-ID=example --jsonata 'order' +``` + +
+Sample Response + +```json +{ + "order": { + "order_number": "OR 2022/742701", + "status": "quote", + "source": { + "title": "manual", + "href": null + }, + "source_type": "manual", + "_schema": "order", + "_title": "OR 2022/742701", + "expires_at": "2022-06-30T16:17:00.000Z", + "line_items": [ + {}, + {} + ], + "amount_subtotal": 1532191, + "amount_total": 1821955, + "total_details": { + "amount_tax": 289764, + "breakdown": {} + }, + "currency": "EUR", + "payment_method": [ + {} + ], + "billing_contact": { + "$relation": [] + }, + "billing_first_name": "Joao", + "billing_last_name": "Pinho", + "billing_email": "j.pinho@epilot.cloud", + "billing_company_name": "epilot cloud", + "billing_address": [ + {} + ], + "delivery_address": [], + "dates": [ + {} + ], + "_id": "4c7c9562-f8f0-4af0-a3a6-6aebc5571a6e", + "_org": "728", + "_created_at": "2022-06-03T16:29:46.303Z", + "_updated_at": "2022-06-03T16:29:46.303Z" + } +} +``` + +
+ +--- + +### `$searchCatalog` + +Provides a querying functionalities over products and prices of the Catalog for a given organization. + +`POST /v1/public/catalog` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `X-Ivy-Org-ID` | header | string | No | The target Organization Id represented by the caller | +| `Authorization` | header | string | No | The token identifying the client making the request | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $searchCatalog \ + -d '{"q":"_id:1233432 OR _id:123432454 OR _id:23445433","sort":"description ASC","from":0,"size":200}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $searchCatalog +``` + +With JSONata filter: + +```bash +epilot pricing $searchCatalog --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 2, + "results": [ + { + "schema": "product", + "description": "product a" + }, + { + "schema": "price", + "unit_amount_decimal": "124.342343434" + } + ] +} +``` + +
+ +--- + +### `$privateSearchCatalog` + +Provides a querying functionalities over products and prices of the Catalog for a given organization. + +`POST /v1/catalog` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $privateSearchCatalog \ + -d '{"q":"_id:1233432 OR _id:123432454 OR _id:23445433","sort":"description ASC","from":0,"size":200}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $privateSearchCatalog +``` + +With JSONata filter: + +```bash +epilot pricing $privateSearchCatalog --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 2, + "results": [ + { + "schema": "product", + "description": "product a" + }, + { + "schema": "price", + "unit_amount_decimal": "124.342343434" + } + ] +} +``` + +
+ +--- + +### `$validatePromoCodes` + +Validate a list of promo codes against a list of coupons + +`POST /v1/public/validate-promo-codes` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `X-Ivy-Org-ID` | header | string | Yes | The target Organization Id represented by the caller | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $validatePromoCodes \ + -p X-Ivy-Org-ID=example \ + -d '{}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $validatePromoCodes -p X-Ivy-Org-ID=example +``` + +With JSONata filter: + +```bash +epilot pricing $validatePromoCodes -p X-Ivy-Org-ID=example --jsonata 'matched_coupons' +``` + +
+Sample Response + +```json +{ + "matched_coupons": [ + { + "_id": "123e4567-e89b-12d3-a456-426614174000", + "_schema": "coupon", + "_org": "org_12345", + "_created_at": "2024-01-15T10:00:00.000Z", + "_updated_at": "2024-01-20T12:00:00.000Z", + "_title": "Sample Coupon", + "name": "Sample Coupon", + "type": "fixed", + "fixed_value": 555, + "fixed_value_currency": "USD", + "fixed_value_decimal": "5.55", + "active": true, + "category": "cashback", + "prices": { + "$relation": [ + { + "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst", + "_tags": ["discount", "special"], + "_schema": "price" + } + ] + } + } + ] +} +``` + +
+ +--- + +### `$availabilityCheck` + +The availability check endpoint + +`POST /v1/public/availability:check` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `X-Ivy-Org-ID` | header | string | Yes | The target Organization Id represented by the caller | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $availabilityCheck \ + -p X-Ivy-Org-ID=example +``` + +With request body: + +```bash +epilot pricing $availabilityCheck \ + -p X-Ivy-Org-ID=example \ + -d '{ + "products": ["string"], + "filters": { + "location": { + "street": "string", + "street_number": "string", + "postal_code": "string", + "city": "string", + "country": "string" + }, + "available_date": "2017-07-21" + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $availabilityCheck -p X-Ivy-Org-ID=example +``` + +With JSONata filter: + +```bash +epilot pricing $availabilityCheck -p X-Ivy-Org-ID=example --jsonata 'available_products' +``` + +
+Sample Response + +```json +{ + "available_products": [], + "check_results": [ + { + "product_id": "my-product-id-123-1", + "matching_hits": 0 + }, + { + "product_id": "my-product-id-123-2", + "matching_hits": 0 + } + ] +} +``` + +
+ +--- + +### `$validateAvailabilityFile` + +Validates an availability file, it returns an array of errors if the file is invalid + +`GET /v1/validate-availability/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Product ID that the Availability File is attached to | +| `X-Epilot-Org-ID` | header | string | Yes | The target Organization Id represented by the caller | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $validateAvailabilityFile \ + -p id=72c803b2-2e5d-4bd6-bffc-fad998bbbe36 \ + -p X-Epilot-Org-ID=739224 +``` + +Using positional args for path parameters: + +```bash +epilot pricing $validateAvailabilityFile 72c803b2-2e5d-4bd6-bffc-fad998bbbe36 +``` + +With JSONata filter: + +```bash +epilot pricing $validateAvailabilityFile -p id=72c803b2-2e5d-4bd6-bffc-fad998bbbe36 -p X-Epilot-Org-ID=739224 --jsonata 'status' +``` + +
+Sample Response + +```json +{ + "status": "success", + "rules_parsed_count": 10, + "errors": [] +} +``` + +
+ +--- + +### `$historicMarketPrices` + +Get a series of historic energy prices for a given time period, market and bidding zone. + +`GET /v1/public/historicMarketPrices` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `market` | query | "day_ahead" | Yes | Market to use. For now, only day ahead prices are supported. | +| `bidding_zone` | query | "AT" \| "DE-LU" | Yes | Bidding zone to use. For now, only AT and DE-LU are supported. | +| `frequency` | query | "PT15M" \| "PT1H" \| "P1D" \| "P1M" | Yes | Frequency of the price data points in ISO 8601 format. | +| `from` | query | string | Yes | Start of price data in ISO 8601 format. +If only a date is provided (YYYY-MM-DD) the timzone of the bidding zone is used. + | +| `to` | query | string | Yes | End of price data in ISO 8601 format. +If only a date is provided (YYYY-MM-DD) the timzone of the bidding zone is used. + | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $historicMarketPrices \ + -p market=example \ + -p bidding_zone=example \ + -p frequency=example \ + -p from=example \ + -p to=example +``` + +With JSONata filter: + +```bash +epilot pricing $historicMarketPrices -p market=example -p bidding_zone=example -p frequency=example -p from=example -p to=example --jsonata 'market' +``` + +
+Sample Response + +```json +{ + "market": "day_ahead", + "bidding_zone": "AT", + "prices": [ + { + "unit_amount": 12.3, + "unit_amount_decimal": "0.123", + "unit_amount_currency": "EUR", + "timestamp": "1970-01-01T00:00:00.000Z" + } + ] +} +``` + +
+ +--- + +### `$averageMarketPrice` + +Get the average energy prices for a given time period, market and bidding zone. + +`GET /v1/public/averageMarketPrice` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `market` | query | "day_ahead" | Yes | Market to use. For now, only day ahead prices are supported. | +| `bidding_zone` | query | "AT" \| "DE-LU" | Yes | Bidding zone to use. For now, only AT and DE-LU are supported. | +| `from` | query | string | Yes | Start of price data in ISO 8601 format. +If only a date is provided (YYYY-MM-DD) the timzone of the bidding zone is used. + | +| `to` | query | string | Yes | End of price data in ISO 8601 format. +If only a date is provided (YYYY-MM-DD) the timzone of the bidding zone is used. + | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $averageMarketPrice \ + -p market=example \ + -p bidding_zone=example \ + -p from=example \ + -p to=example +``` + +With JSONata filter: + +```bash +epilot pricing $averageMarketPrice -p market=example -p bidding_zone=example -p from=example -p to=example --jsonata 'market' +``` + +
+Sample Response + +```json +{ + "market": "day_ahead", + "bidding_zone": "AT", + "price": { + "unit_amount": 12.3, + "unit_amount_decimal": "0.123", + "unit_amount_currency": "EUR", + "timestamp": "2025-01-01T00:00:00Z/2025-01-31T23:59:59Z" + }, + "_meta": { + "signature": "string", + "timestamp": 0 + } +} +``` + +
+ +--- + +### `$searchExternalProducts` + +Returns the list of available products with computed prices based on a given context and for a given org integration. + +`POST /v1/public/integration/{integrationId}/products` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | "getag" \| "external-catalog" | Yes | The integration identifier | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $searchExternalProducts \ + -p integrationId=external-catalog +``` + +With request body: + +```bash +epilot pricing $searchExternalProducts \ + -p integrationId=external-catalog \ + -d '{ + "context": { + "journey_id": "8d0a2235-97ce-42d0-88a3-e374634ca44e", + "entity_id": "8d0a2235-97ce-42d0-88a3-e374634ca44e", + "journey_name": "journey name", + "journey_tags": ["string"], + "journey_url_params": {}, + "current_step_name": "step name", + "current_block_name": "block name", + "steps_data": [ + { + "step_name": "string", + "step_index": 0, + "blocks": { + "Adresse": { + "countryCode": "DE", + "city": "Koblenz", + "zipCode": "56068", + "streetName": "Am Alten Hospital", + "houseNumber": "123" + } + } + } + ] + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot pricing $searchExternalProducts external-catalog +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $searchExternalProducts -p integrationId=external-catalog +``` + +With JSONata filter: + +```bash +epilot pricing $searchExternalProducts -p integrationId=external-catalog --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 0, + "results": [ + { + "pricing_details": {}, + "_meta": {} + } + ] +} +``` + +
+ +--- + +### `$searchExternalProductRecommendations` + +Returns the list of available product recommendations with computed prices based on a given context and for a given org + +`POST /v1/public/integration/{integrationId}/product-recommendations` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | "getag" \| "external-catalog" | Yes | The integration identifier | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $searchExternalProductRecommendations \ + -p integrationId=external-catalog +``` + +With request body: + +```bash +epilot pricing $searchExternalProductRecommendations \ + -p integrationId=external-catalog \ + -d '{ + "context": { + "journey_id": "8d0a2235-97ce-42d0-88a3-e374634ca44e", + "entity_id": "8d0a2235-97ce-42d0-88a3-e374634ca44e", + "journey_name": "journey name", + "journey_tags": ["string"], + "journey_url_params": {}, + "current_step_name": "step name", + "current_block_name": "block name", + "steps_data": [ + { + "step_name": "string", + "step_index": 0, + "blocks": { + "Adresse": { + "countryCode": "DE", + "city": "Koblenz", + "zipCode": "56068", + "streetName": "Am Alten Hospital", + "houseNumber": "123" + } + } + } + ] + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot pricing $searchExternalProductRecommendations external-catalog +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $searchExternalProductRecommendations -p integrationId=external-catalog +``` + +With JSONata filter: + +```bash +epilot pricing $searchExternalProductRecommendations -p integrationId=external-catalog --jsonata 'source' +``` + +
+Sample Response + +```json +{ + "source": { + "pricing_details": { + "items": [], + "amount_subtotal": 0, + "amount_total": 0, + "unit_amount_gross": 0, + "unit_amount_net": 0, + "amount_tax": 0, + "total_details": {}, + "currency": "EUR", + "redeemed_promos": [] + }, + "_meta": { + "signature": "string", + "timestamp": 0 + } + }, + "offers": [ + { + "pricing_details": {}, + "_meta": {} + } + ] +} +``` + +
+ +--- + +### `$searchProviders` + +Returns the list of providers available based on a given location + +`POST /v1/public/integration/{integrationId}/providers:search` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `X-Epilot-Org-ID` | header | string | Yes | The target Organization Id represented by the caller | +| `integrationId` | path | "getag" \| "external-catalog" | Yes | The integration identifier | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $searchProviders \ + -p X-Epilot-Org-ID=739224 \ + -p integrationId=getag \ + -d '{"type":"power","postal_code":"string","city":"string","street":"string","street_number":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot pricing $searchProviders getag +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $searchProviders -p X-Epilot-Org-ID=739224 -p integrationId=getag +``` + +With JSONata filter: + +```bash +epilot pricing $searchProviders -p X-Epilot-Org-ID=739224 -p integrationId=getag --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "name": "string", + "code": "string" + } +] +``` + +
+ +--- + +### `$searchStreets` + +Returns the list of streets available for a given postal code and city + +`POST /v1/public/integration/{integrationId}/streets:search` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `X-Epilot-Org-ID` | header | string | Yes | The target Organization Id represented by the caller | +| `integrationId` | path | "getag" \| "external-catalog" | Yes | The integration identifier | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $searchStreets \ + -p X-Epilot-Org-ID=739224 \ + -p integrationId=getag \ + -d '{"postal_code":"string","city":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot pricing $searchStreets getag +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $searchStreets -p X-Epilot-Org-ID=739224 -p integrationId=getag +``` + +With JSONata filter: + +```bash +epilot pricing $searchStreets -p X-Epilot-Org-ID=739224 -p integrationId=getag --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "street": "string" + } +] +``` + +
+ +--- + +### `$computePrice` + +Returns the price for a given product type based on location and consumption + +`POST /v1/public/integration/{integrationId}/compute-price` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `X-Epilot-Org-ID` | header | string | Yes | The target Organization Id represented by the caller | +| `integrationId` | path | "getag" \| "external-catalog" | Yes | The integration identifier | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $computePrice \ + -p X-Epilot-Org-ID=739224 \ + -p integrationId=getag +``` + +With request body: + +```bash +epilot pricing $computePrice \ + -p X-Epilot-Org-ID=739224 \ + -p integrationId=getag \ + -d '{ + "postal_code": "string", + "consumption_type": "household", + "consumption": 0, + "consumption_HT": 0, + "consumption_NT": 0, + "association_id": "string", + "billing_period": "monthly", + "reference_date": "1970-01-01", + "type": "power", + "meter_type": "classic" +}' +``` + +Using positional args for path parameters: + +```bash +epilot pricing $computePrice getag +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $computePrice -p X-Epilot-Org-ID=739224 -p integrationId=getag +``` + +With JSONata filter: + +```bash +epilot pricing $computePrice -p X-Epilot-Org-ID=739224 -p integrationId=getag --jsonata 'amount_total' +``` + +
+Sample Response + +```json +{ + "amount_total": 0, + "amount_total_decimal": "string", + "amount_static": 0, + "amount_static_decimal": {}, + "amount_variable_ht": 0, + "amount_variable_decimal_ht": "string", + "unit_amount_variable_ht": 0, + "unit_amount_variable_decimal_ht": "string", + "amount_variable_nt": 0, + "amount_variable_decimal_nt": "string", + "unit_amount_variable_nt": 0, + "unit_amount_variable_decimal_nt": "string", + "currency": "EUR", + "billing_period": "weekly", + "breakdown": { + "static": {}, + "variable": {}, + "variable_ht": {}, + "variable_nt": {} + }, + "_meta": { + "signature": "string", + "timestamp": 0 + } +} +``` + +
+ +--- + +### `$getCredentials` + +Gets the credentials for a given integration / organization + +`GET /v1/integration/{integrationId}/credentials` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | "getag" \| "external-catalog" | Yes | The integration identifier | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $getCredentials \ + -p integrationId=getag +``` + +Using positional args for path parameters: + +```bash +epilot pricing $getCredentials getag +``` + +With JSONata filter: + +```bash +epilot pricing $getCredentials -p integrationId=getag --jsonata '$' +``` + +
+Sample Response + +```json +{} +``` + +
+ +--- + +### `$saveCredentials` + +Saves the credentials for a given integration / organization + +`PUT /v1/integration/{integrationId}/credentials:save` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | "getag" \| "external-catalog" | Yes | The integration identifier | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $saveCredentials \ + -p integrationId=getag \ + -d '{}' +``` + +Using positional args for path parameters: + +```bash +epilot pricing $saveCredentials getag +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $saveCredentials -p integrationId=getag +``` + +With JSONata filter: + +```bash +epilot pricing $saveCredentials -p integrationId=getag --jsonata '$' +``` + +--- + +### `$deleteCredentials` + +Delete the credentials for a given integration / organization + +`DELETE /v1/integration/{integrationId}/credentials:delete` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `integrationId` | path | "getag" \| "external-catalog" | Yes | The integration identifier | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $deleteCredentials \ + -p integrationId=getag +``` + +Using positional args for path parameters: + +```bash +epilot pricing $deleteCredentials getag +``` + +With JSONata filter: + +```bash +epilot pricing $deleteCredentials -p integrationId=getag --jsonata '$' +``` + +--- + +### `$getExternalCatalogProducts` + +Returns the list of available external catalog products with computed prices based on a given context + +`POST /v1/public/external-catalog/products` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $getExternalCatalogProducts +``` + +With request body: + +```bash +epilot pricing $getExternalCatalogProducts \ + -d '{ + "config": { + "appId": "1234567890", + "componentId": "1234567890", + "hookId": "1234567890" + }, + "origin": "journey", + "context": { + "journey_id": "8d0a2235-97ce-42d0-88a3-e374634ca44e", + "entity_id": "9e1b3346-a8df-53e1-99b4-f485745db55f", + "journey_name": "Product Selection Journey", + "journey_tags": ["electricity", "residential"], + "journey_url_params": { + "utm_source": "google", + "utm_campaign": "spring2024" + }, + "current_step_name": "Product Selection", + "current_block_name": "Energy Products", + "steps_data": [ + { + "step_name": "Address Information", + "step_index": 0, + "blocks": { + "Adresse": { + "countryCode": "DE", + "city": "Koblenz", + "zipCode": "56068", + "streetName": "Am Alten Hospital", + "houseNumber": "123" + } + } + } + ] + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $getExternalCatalogProducts +``` + +With JSONata filter: + +```bash +epilot pricing $getExternalCatalogProducts --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 0, + "results": [ + { + "pricing_details": {}, + "_meta": {} + } + ] +} +``` + +
+ +--- + +### `$getExternalCatalogProductRecommendations` + +Returns the list of available external catalog products recommendations based on a given context + +`POST /v1/public/external-catalog/product-recommendations` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $getExternalCatalogProductRecommendations +``` + +With request body: + +```bash +epilot pricing $getExternalCatalogProductRecommendations \ + -d '{ + "config": { + "appId": "1234567890", + "componentId": "1234567890", + "hookId": "1234567890" + }, + "origin": "journey", + "context": { + "journey_id": "8d0a2235-97ce-42d0-88a3-e374634ca44e", + "entity_id": "9e1b3346-a8df-53e1-99b4-f485745db55f", + "journey_name": "Product Selection Journey", + "journey_tags": ["electricity", "residential"], + "journey_url_params": { + "utm_source": "google", + "utm_campaign": "spring2024" + }, + "current_step_name": "Product Selection", + "current_block_name": "Energy Products", + "steps_data": [ + { + "step_name": "Address Information", + "step_index": 0, + "blocks": { + "Adresse": { + "countryCode": "DE", + "city": "Koblenz", + "zipCode": "56068", + "streetName": "Am Alten Hospital", + "houseNumber": "123" + } + } + } + ] + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $getExternalCatalogProductRecommendations +``` + +With JSONata filter: + +```bash +epilot pricing $getExternalCatalogProductRecommendations --jsonata 'source' +``` + +
+Sample Response + +```json +{ + "source": { + "pricing_details": { + "items": [], + "amount_subtotal": 0, + "amount_total": 0, + "unit_amount_gross": 0, + "unit_amount_net": 0, + "amount_tax": 0, + "total_details": {}, + "currency": "EUR", + "redeemed_promos": [] + }, + "_meta": { + "signature": "string", + "timestamp": 0 + } + }, + "offers": [ + { + "pricing_details": {}, + "_meta": {} + } + ] +} +``` + +
+ +--- + +### `$productRecommendations` + +Get a list of product recommendations based on the search parameters. + +`POST /v1/public/product-recommendations` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `X-Ivy-Org-ID` | header | string | No | The target Organization Id represented by the caller | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot pricing $productRecommendations +``` + +With request body: + +```bash +epilot pricing $productRecommendations \ + -d '{ + "product_recommendation_ids": ["string"], + "catalog_item": { + "product_id": "string", + "price_id": "string" + }, + "contract_id": "string", + "filters": { + "location": { + "street": "string", + "street_number": "string", + "postal_code": "string", + "city": "string", + "country": "string" + }, + "available_date": "2017-07-21" + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot pricing $productRecommendations +``` + +With JSONata filter: + +```bash +epilot pricing $productRecommendations --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 0, + "results": [ + { + "_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6", + "_title": "Cool box", + "_org": "728", + "_schema": "order", + "_created_at": "2022-06-03T16:04:10.000Z", + "_updated_at": "2022-06-03T16:04:10.000Z", + "amount_subtotal": 10000, + "amount_total": 10600, + "currency": "EUR", + "description": "Annual internet service", + "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", + "taxes": [ + { + "amount": 600, + "tax": { + "active": true, + "description": "Without Behaviour", + "rate": 6, + "region": "DE", + "type": "VAT", + "_created_at": "2022-02-07T14:49:08.831Z", + "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4", + "_org": "739224", + "_schema": "tax", + "_title": "Tax Without Behaviour", + "_updated_at": "2022-02-07T14:49:08.831Z" + } + } + ], + "unit_amount": 10000, + "unit_amount_net": 10000, + "pricing_model": "per_unit", + "_price": { + "_id": "7e24ff5d-d580-4136-a32f-19191eed039a", + "unit_amount": 10000, + "unit_amount_currency": "EUR", + "unit_amount_decimal": "100.00", + "sales_tax": "standard", + "is_tax_inclusive": false, + "price_display_in_journeys": "show_price", + "type": "one_time", + "billing_period": "weekly", + "billing_duration_unit": "months", + "notice_time_unit": "months", + "termination_time_unit": "months", + "renewal_duration_unit": "months", + "_schema": "price", + "_title": "Solar Panel Module", + "description": "Solar Panel Module", + "active": true, + "tax": { + "$relation": [ + { + "entity_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc" + } + ] + }, + "_org": "728", + "_created_at": "2022-06-03T16:04:10.369Z", + "_updated_at": "2022-06-03T16:04:10.369Z", + "pricing_model": "per_unit" + }, + "_product": { + "name": "Cool box", + "type": "product", + "_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6", + "_title": "Cool box" + } + } + ] +} +``` + +
+ +--- diff --git a/packages/cli/docs/purpose.md b/packages/cli/docs/purpose.md new file mode 100644 index 00000000..646bc6ed --- /dev/null +++ b/packages/cli/docs/purpose.md @@ -0,0 +1,420 @@ +# Purpose API + +- **Base URL:** `https://purpose.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/purpose](https://docs.epilot.io/api/purpose) + +Purpose API - enables the management of purposes for the epilot platform. + +## Quick Start + +```bash +# List available operations +epilot purpose + +# Call an operation +epilot purpose createPurpose +``` + +## Operations + +**Purpose** +- [`createPurpose`](#createpurpose) — Create a new purpose +- [`searchPurposes`](#searchpurposes) — Search purposes using fuzzy matching. +- [`batchGetPurposes`](#batchgetpurposes) — Fetch multiple purposes by their known IDs in a single request. +- [`getPurpose`](#getpurpose) — Get a single purpose by ID +- [`updatePurpose`](#updatepurpose) — Update an existing purpose +- [`deletePurpose`](#deletepurpose) — Permanently delete a purpose + +### `createPurpose` + +Create a new purpose + +`POST /v1/purpose` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot purpose createPurpose \ + -d '{"name":"Electricity Contract"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot purpose createPurpose +``` + +With JSONata filter: + +```bash +epilot purpose createPurpose --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "123e4567-e89b-12d3-a456-426614174000", + "name": "Electricity Contract", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `searchPurposes` + +Search purposes using fuzzy matching. + +`GET /v1/purpose:search` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `query` | query | string | No | Search query string | +| `size` | query | number | No | Maximum number of results to return | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot purpose searchPurposes +``` + +With JSONata filter: + +```bash +epilot purpose searchPurposes --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "123e4567-e89b-12d3-a456-426614174000", + "name": "Electricity Contract", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z" + } + ] +} +``` + +
+ +--- + +### `batchGetPurposes` + +Fetch multiple purposes by their known IDs in a single request. + +`POST /v1/purpose:batchGet` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot purpose batchGetPurposes \ + -d '{"purposeIds":["123e4567-e89b-12d3-a456-426614174000"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot purpose batchGetPurposes +``` + +With JSONata filter: + +```bash +epilot purpose batchGetPurposes --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "123e4567-e89b-12d3-a456-426614174000", + "name": "Electricity Contract", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z" + } + ], + "hits": 0 +} +``` + +
+ +--- + +### `getPurpose` + +Get a single purpose by ID + +`GET /v1/purpose/{purposeId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `purposeId` | path | string | Yes | Purpose ID (UUID) | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot purpose getPurpose \ + -p purposeId=1fdc8f66-0e2b-4e20-a347-9cbdbf6a7217 +``` + +Using positional args for path parameters: + +```bash +epilot purpose getPurpose 1fdc8f66-0e2b-4e20-a347-9cbdbf6a7217 +``` + +With JSONata filter: + +```bash +epilot purpose getPurpose -p purposeId=1fdc8f66-0e2b-4e20-a347-9cbdbf6a7217 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "123e4567-e89b-12d3-a456-426614174000", + "name": "Electricity Contract", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `updatePurpose` + +Update an existing purpose + +`PUT /v1/purpose/{purposeId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `purposeId` | path | string | Yes | Purpose ID (UUID) | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot purpose updatePurpose \ + -p purposeId=1fdc8f66-0e2b-4e20-a347-9cbdbf6a7217 \ + -d '{"name":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot purpose updatePurpose 1fdc8f66-0e2b-4e20-a347-9cbdbf6a7217 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot purpose updatePurpose -p purposeId=1fdc8f66-0e2b-4e20-a347-9cbdbf6a7217 +``` + +With JSONata filter: + +```bash +epilot purpose updatePurpose -p purposeId=1fdc8f66-0e2b-4e20-a347-9cbdbf6a7217 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "123e4567-e89b-12d3-a456-426614174000", + "name": "Electricity Contract", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `deletePurpose` + +Permanently delete a purpose + +`DELETE /v1/purpose/{purposeId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `purposeId` | path | string | Yes | Purpose ID (UUID) | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot purpose deletePurpose \ + -p purposeId=1fdc8f66-0e2b-4e20-a347-9cbdbf6a7217 +``` + +Using positional args for path parameters: + +```bash +epilot purpose deletePurpose 1fdc8f66-0e2b-4e20-a347-9cbdbf6a7217 +``` + +With JSONata filter: + +```bash +epilot purpose deletePurpose -p purposeId=1fdc8f66-0e2b-4e20-a347-9cbdbf6a7217 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "123e4567-e89b-12d3-a456-426614174000", + "name": "Electricity Contract", + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- diff --git a/packages/cli/docs/sandbox.md b/packages/cli/docs/sandbox.md new file mode 100644 index 00000000..ce5b5020 --- /dev/null +++ b/packages/cli/docs/sandbox.md @@ -0,0 +1,498 @@ +# Sandbox API + +- **Base URL:** `https://sandbox.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/sandbox](https://docs.epilot.io/api/sandbox) + +API to set up pipeline connections between epilot orgs to sync and promote configurations (from sandbox to production and vice-versa) + +## Quick Start + +```bash +# List available operations +epilot sandbox + +# Call an operation +epilot sandbox listPipelines +``` + +## Operations + +**Pipelines** +- [`listPipelines`](#listpipelines) — List pipelines the current organization is part of +- [`createPipeline`](#createpipeline) — Create a new pipeline by passing an api token from another organization. +- [`getPipeline`](#getpipeline) — Get pipeline by ID +- [`deletePipeline`](#deletepipeline) — Delete a pipeline by ID +- [`generatePipelineToken`](#generatepipelinetoken) — Generate a temporary pipeline access token to access the other org from the pipeline + +**Sandbox Requests** +- [`requestSandbox`](#requestsandbox) — Request a sandbox account for a user +- [`listSandboxRequests`](#listsandboxrequests) — List sandbox requests from users + +### `listPipelines` + +List pipelines the current organization is part of + +`GET /v1/sandbox/pipelines` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot sandbox listPipelines +``` + +With JSONata filter: + +```bash +epilot sandbox listPipelines --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "pipeline_role": "sandbox", + "pipeline_id": "12345::54321", + "sandbox_org_id": "12345", + "sandbox_org_name": "Sandbox", + "production_org_id": "54321", + "production_org_name": "Production", + "created_at": "1970-01-01T00:00:00.000Z" + } + ], + "total": 1 +} +``` + +
+ +--- + +### `createPipeline` + +Create a new pipeline by passing an api token from another organization. + +`POST /v1/sandbox/pipelines` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot sandbox createPipeline \ + -d '{"pipeline_role":"sandbox","api_token":"eyJhbGciOiJIUzI1NiIs..."}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot sandbox createPipeline +``` + +With JSONata filter: + +```bash +epilot sandbox createPipeline --jsonata '$' +``` + +
+Sample Response + +```json +{ + "pipeline_role": "sandbox", + "pipeline_id": "12345::54321", + "sandbox_org_id": "12345", + "sandbox_org_name": "Sandbox", + "production_org_id": "54321", + "production_org_name": "Production", + "created_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `getPipeline` + +Get pipeline by ID + +`GET /v1/sandbox/pipelines/{pipeline_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `pipeline_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot sandbox getPipeline \ + -p pipeline_id=12345::54321 +``` + +Using positional args for path parameters: + +```bash +epilot sandbox getPipeline 12345::54321 +``` + +With JSONata filter: + +```bash +epilot sandbox getPipeline -p pipeline_id=12345::54321 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "pipeline_role": "sandbox", + "pipeline_id": "12345::54321", + "sandbox_org_id": "12345", + "sandbox_org_name": "Sandbox", + "production_org_id": "54321", + "production_org_name": "Production", + "created_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `deletePipeline` + +Delete a pipeline by ID + +`DELETE /v1/sandbox/pipelines/{pipeline_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `pipeline_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot sandbox deletePipeline \ + -p pipeline_id=12345::54321 +``` + +Using positional args for path parameters: + +```bash +epilot sandbox deletePipeline 12345::54321 +``` + +With JSONata filter: + +```bash +epilot sandbox deletePipeline -p pipeline_id=12345::54321 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "pipeline_role": "sandbox", + "pipeline_id": "12345::54321", + "sandbox_org_id": "12345", + "sandbox_org_name": "Sandbox", + "production_org_id": "54321", + "production_org_name": "Production", + "created_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `generatePipelineToken` + +Generate a temporary pipeline access token to access the other org from the pipeline + +`GET /v1/sandbox/pipelines/{pipeline_id}/token` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `pipeline_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot sandbox generatePipelineToken \ + -p pipeline_id=12345::54321 +``` + +Using positional args for path parameters: + +```bash +epilot sandbox generatePipelineToken 12345::54321 +``` + +With JSONata filter: + +```bash +epilot sandbox generatePipelineToken -p pipeline_id=12345::54321 --jsonata 'pipeline_token' +``` + +
+Sample Response + +```json +{ + "pipeline_token": "eyJhbGciOiJIUzI1NiIs..." +} +``` + +
+ +--- + +### `requestSandbox` + +Request a sandbox account for a user + +`POST /v1/sandbox:request` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot sandbox requestSandbox +``` + +With request body: + +```bash +epilot sandbox requestSandbox \ + -d '{ + "id": 12345, + "fullname": "John Doe", + "company_name": "Company Name", + "position": "Software Engineer", + "email": "user@example.com", + "sandbox_usecase": "Build a payment integration", + "status": "pending", + "connected_to_existing_epilot_customer": true, + "requested_at": "2022-01-01T00:00:00Z", + "sandbox_request_category": "APP_DEVELOPER_ACCOUNT" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot sandbox requestSandbox +``` + +With JSONata filter: + +```bash +epilot sandbox requestSandbox --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": 12345, + "fullname": "John Doe", + "company_name": "Company Name", + "position": "Software Engineer", + "email": "user@example.com", + "sandbox_usecase": "Build a payment integration", + "status": "pending", + "connected_to_existing_epilot_customer": true, + "requested_at": "2022-01-01T00:00:00Z", + "sandbox_request_category": "APP_DEVELOPER_ACCOUNT" +} +``` + +
+ +--- + +### `listSandboxRequests` + +List sandbox requests from users + +`GET /v1/sandbox/requests` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot sandbox listSandboxRequests +``` + +With JSONata filter: + +```bash +epilot sandbox listSandboxRequests --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": 12345, + "fullname": "John Doe", + "company_name": "Company Name", + "position": "Software Engineer", + "email": "user@example.com", + "sandbox_usecase": "Build a payment integration", + "status": "pending", + "connected_to_existing_epilot_customer": true, + "requested_at": "2022-01-01T00:00:00Z", + "sandbox_request_category": "APP_DEVELOPER_ACCOUNT" + } + ], + "total": 1 +} +``` + +
+ +--- diff --git a/packages/cli/docs/submission.md b/packages/cli/docs/submission.md new file mode 100644 index 00000000..bdfa736b --- /dev/null +++ b/packages/cli/docs/submission.md @@ -0,0 +1,173 @@ +# Submission API + +- **Base URL:** `https://submission.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/submission](https://docs.epilot.io/api/submission) + +Use this API to handle submissions entities from external sources e.g. journeys and frontends + +## Quick Start + +```bash +# List available operations +epilot submission + +# Call an operation +epilot submission createSubmission +``` + +## Operations + +**Submissions** +- [`createSubmission`](#createsubmission) — Creates a submission from a public facing Journey +- [`getNonce`](#getnonce) — Returns { exists: boolean } along some meta data + +### `createSubmission` + +Creates a submission from a public facing Journey + +`POST /v1/submission/submissions` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot submission createSubmission +``` + +With request body: + +```bash +epilot submission createSubmission \ + -d '{ + "organization_id": "123", + "journey_submit_id": "123", + "source_type": "journey", + "source_id": "ce99875f-fba9-4fe2-a8f9-afaf52059051", + "opt_ins": [ + { + "topic": "EMAIL_MARKETING", + "identifier": "example@email.com", + "meta": {} + } + ], + "entities": [ + { + "_schema": "submission", + "description": "Submission created via API", + "contact_first_name": "First", + "contact_last_name": "Last", + "contact_email": "example@submission.com", + "request": "I would like to know more about electric vehicles", + "files": [ + { + "s3ref": { + "bucket": "epilot-user-content", + "key": "temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf" + }, + "filename": "document.pdf" + } + ] + } + ], + "_ivy_opportunity_ids": ["string"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot submission createSubmission +``` + +With JSONata filter: + +```bash +epilot submission createSubmission --jsonata '$' +``` + +--- + +### `getNonce` + +Returns { exists: boolean } along some meta data + +`GET /v1/submission/nonce/{nonce_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `nonce_id` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot submission getNonce \ + -p nonce_id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot submission getNonce 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot submission getNonce -p nonce_id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "nonce": "string", + "submission_id": "string", + "organization_id": "string", + "ttl": 0, + "exists": true +} +``` + +
+ +--- diff --git a/packages/cli/docs/targeting.md b/packages/cli/docs/targeting.md new file mode 100644 index 00000000..db042616 --- /dev/null +++ b/packages/cli/docs/targeting.md @@ -0,0 +1,966 @@ +# Targeting API + +- **Base URL:** `https://targeting.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/targeting](https://docs.epilot.io/api/targeting) + +API for Targeting + +## Quick Start + +```bash +# List available operations +epilot targeting + +# Call an operation +epilot targeting changeCampaignStatus -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +## Operations + +**Campaign** +- [`changeCampaignStatus`](#changecampaignstatus) — Change the status of a campaign to a desired status. +- [`getCampaignJobStatus`](#getcampaignjobstatus) — Get the status of a campaign's automation job +- [`getCampaignPortals`](#getcampaignportals) — Get the list of portals and its widgets where the campaign is used. +- [`matchCampaigns`](#matchcampaigns) — Match campaigns based on target entities. + +**Campaign Delivery** +- [`retriggerCampaignAutomations`](#retriggercampaignautomations) — Retrigger automation executions for specific campaign recipients that have failed. + +**Target** +- [`matchTargets`](#matchtargets) — Find targets from the provided list that include the provide entities. +- [`getTargetQueries`](#gettargetqueries) — Transform target filters into Lucene queries for the provided target IDs. + +**Campaign Recipient** +- [`createRecipient`](#createrecipient) — Creates a new recipient associated with a campaign. +- [`updateRecipient`](#updaterecipient) — Updates a recipient's attributes. +- [`updateRecipientPortalStatus`](#updaterecipientportalstatus) — Updates the portal status for a specific campaign recipient. +- [`getRecipients`](#getrecipients) — Get a paginated list of recipients for a campaign. + +### `changeCampaignStatus` + +Change the status of a campaign to a desired status. + +`POST /v1/campaign/{campaign_id}/status` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `campaign_id` | path | string (uuid) | Yes | The campaign ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot targeting changeCampaignStatus \ + -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +Using positional args for path parameters: + +```bash +epilot targeting changeCampaignStatus b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +With JSONata filter: + +```bash +epilot targeting changeCampaignStatus -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'campaign' +``` + +
+Sample Response + +```json +{ + "campaign": { + "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84", + "_org": "string", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "string", + "_title": "string", + "_tags": ["string"], + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z", + "_acl": { + "view": ["org:456"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "name": "string", + "goal": "string", + "status": "draft", + "start_date": "1970-01-01", + "end_date": "1970-01-01", + "flow_id": "string", + "job_id": "string", + "target": { + "$relation": [ + { + "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84", + "_tags": ["string"] + } + ] + } + } +} +``` + +
+ +--- + +### `getCampaignJobStatus` + +Get the status of a campaign's automation job + +`GET /v1/campaign/{campaign_id}/job` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `campaign_id` | path | string (uuid) | Yes | The campaign ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot targeting getCampaignJobStatus \ + -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +Using positional args for path parameters: + +```bash +epilot targeting getCampaignJobStatus b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +With JSONata filter: + +```bash +epilot targeting getCampaignJobStatus -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'status' +``` + +
+Sample Response + +```json +{ + "status": "queued", + "execution_summary": [ + { + "execution_id": "string", + "execution_status": "string" + } + ] +} +``` + +
+ +--- + +### `getCampaignPortals` + +Get the list of portals and its widgets where the campaign is used. + +`GET /v1/campaign/{campaign_id}/portals` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `campaign_id` | path | string (uuid) | Yes | The campaign ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot targeting getCampaignPortals \ + -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +Using positional args for path parameters: + +```bash +epilot targeting getCampaignPortals b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +With JSONata filter: + +```bash +epilot targeting getCampaignPortals -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "portal": { + "origin": "string", + "domain": "string", + "name": "string" + }, + "widgets": [ + { + "id": "string", + "headline": { + "en": "string", + "de": "string" + } + } + ] + } +] +``` + +
+ +--- + +### `retriggerCampaignAutomations` + +Retrigger automation executions for specific campaign recipients that have failed. + +`POST /v1/campaign/{campaign_id}/automations:retrigger` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `campaign_id` | path | string (uuid) | Yes | The campaign ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot targeting retriggerCampaignAutomations \ + -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \ + -d '{"recipient_ids":["3fa85f64-5717-4562-b3fc-2c963f66afa6"]}' +``` + +Using positional args for path parameters: + +```bash +epilot targeting retriggerCampaignAutomations b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot targeting retriggerCampaignAutomations -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +With JSONata filter: + +```bash +epilot targeting retriggerCampaignAutomations -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "message": "string", + "results": [ + { + "recipient_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "result": "success", + "execution_id": "string", + "error": "string" + } + ] +} +``` + +
+ +--- + +### `matchCampaigns` + +Match campaigns based on target entities. + +`POST /v1/campaign:match` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot targeting matchCampaigns +``` + +With request body: + +```bash +epilot targeting matchCampaigns \ + -d '{ + "entity_refs": [ + { + "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84", + "entity_schema": "string" + } + ], + "campaign_ids": ["b8c01433-5556-4e2b-aad4-6f5348d1df84"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot targeting matchCampaigns +``` + +With JSONata filter: + +```bash +epilot targeting matchCampaigns --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 0, + "results": [ + { + "campaign": { + "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84", + "_org": "string", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "string", + "_title": "string", + "_tags": ["string"], + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z", + "_acl": { + "view": ["org:456"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "name": "string", + "goal": "string", + "status": "draft", + "start_date": "1970-01-01", + "end_date": "1970-01-01", + "flow_id": "string", + "job_id": "string", + "target": { + "$relation": [ + { + "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84", + "_tags": ["string"] + } + ] + } + } + } + ] +} +``` + +
+ +--- + +### `matchTargets` + +Find targets from the provided list that include the provide entities. + +`POST /v1/target:match` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot targeting matchTargets +``` + +With request body: + +```bash +epilot targeting matchTargets \ + -d '{ + "entity_refs": [ + { + "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84", + "entity_schema": "string" + } + ], + "target_ids": ["b8c01433-5556-4e2b-aad4-6f5348d1df84"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot targeting matchTargets +``` + +With JSONata filter: + +```bash +epilot targeting matchTargets --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 0, + "results": [ + { + "target": { + "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84", + "_org": "string", + "_owners": [ + { + "org_id": "123", + "user_id": "123" + } + ], + "_schema": "string", + "_title": "string", + "_tags": ["string"], + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z", + "_acl": { + "view": ["org:456"], + "edit": ["org:456"], + "delete": ["org:456"] + }, + "name": "string", + "description": "string", + "entity_schema": "string", + "entity_filters": {} + } + } + ] +} +``` + +
+ +--- + +### `getTargetQueries` + +Transform target filters into Lucene queries for the provided target IDs. + +`POST /v1/target/queries` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot targeting getTargetQueries \ + -d '{"target_ids":["b8c01433-5556-4e2b-aad4-6f5348d1df84"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot targeting getTargetQueries +``` + +With JSONata filter: + +```bash +epilot targeting getTargetQueries --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "target_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84", + "query": "string", + "error": "string" + } + ] +} +``` + +
+ +--- + +### `createRecipient` + +Creates a new recipient associated with a campaign. + +`POST /v1/campaign/{campaign_id}/recipient` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `campaign_id` | path | string (uuid) | Yes | The campaign ID | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot targeting createRecipient \ + -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +With request body: + +```bash +epilot targeting createRecipient \ + -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \ + -d '{ + "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84", + "entity_schema": "string", + "automation_status": "pending", + "automation_execution_id": "string" +}' +``` + +Using positional args for path parameters: + +```bash +epilot targeting createRecipient b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot targeting createRecipient -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +With JSONata filter: + +```bash +epilot targeting createRecipient -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'entity_id' +``` + +
+Sample Response + +```json +{ + "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84", + "entity_schema": "string", + "title": "string", + "automation_status": "pending", + "automation_execution_id": "string", + "portal_status": "sent", + "portal_status_updated_at": "1970-01-01T00:00:00.000Z", + "portal_state": {}, + "updated_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `updateRecipient` + +Updates a recipient's attributes. + +`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `campaign_id` | path | string (uuid) | Yes | The campaign ID | +| `recipient_id` | path | string (uuid) | Yes | The entity ID of the recipient | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot targeting updateRecipient \ + -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \ + -p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \ + -d '{"automation_status":"pending","automation_execution_id":"string","portal_status":"sent","portal_state":{}}' +``` + +Using positional args for path parameters: + +```bash +epilot targeting updateRecipient b8c01433-5556-4e2b-aad4-6f5348d1df84 b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot targeting updateRecipient -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 -p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +With JSONata filter: + +```bash +epilot targeting updateRecipient -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 -p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'entity_id' +``` + +
+Sample Response + +```json +{ + "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84", + "entity_schema": "string", + "title": "string", + "automation_status": "pending", + "automation_execution_id": "string", + "portal_status": "sent", + "portal_status_updated_at": "1970-01-01T00:00:00.000Z", + "portal_state": {}, + "updated_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `updateRecipientPortalStatus` + +Updates the portal status for a specific campaign recipient. + +`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}/portal:status` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `campaign_id` | path | string (uuid) | Yes | The campaign ID | +| `recipient_id` | path | string (uuid) | Yes | The entity ID of the recipient | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot targeting updateRecipientPortalStatus \ + -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \ + -p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \ + -d '{"status":"sent"}' +``` + +Using positional args for path parameters: + +```bash +epilot targeting updateRecipientPortalStatus b8c01433-5556-4e2b-aad4-6f5348d1df84 b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot targeting updateRecipientPortalStatus -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 -p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +With JSONata filter: + +```bash +epilot targeting updateRecipientPortalStatus -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 -p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'entity_id' +``` + +
+Sample Response + +```json +{ + "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84", + "entity_schema": "string", + "title": "string", + "automation_status": "pending", + "automation_execution_id": "string", + "portal_status": "sent", + "portal_status_updated_at": "1970-01-01T00:00:00.000Z", + "portal_state": {}, + "updated_at": "1970-01-01T00:00:00.000Z" +} +``` + +
+ +--- + +### `getRecipients` + +Get a paginated list of recipients for a campaign. + +`GET /v1/campaign/{campaign_id}/recipients` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `campaign_id` | path | string (uuid) | Yes | The campaign ID | +| `limit` | query | number | No | Number of items to return | +| `next` | query | string | No | Cursor for pagination | +| `q` | query | string | No | Search by recipient title | +| `automation_status` | query | "pending" \| "in_progress" \| "success" \| "failed" \| "cancelled" | No | Filter by automation status | +| `portal_status` | query | "sent" \| "seen" \| "dismissed" \| "clicked" | No | Filter by portal status | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot targeting getRecipients \ + -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +Using positional args for path parameters: + +```bash +epilot targeting getRecipients b8c01433-5556-4e2b-aad4-6f5348d1df84 +``` + +With JSONata filter: + +```bash +epilot targeting getRecipients -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84", + "entity_schema": "string", + "title": "string", + "automation_status": "pending", + "automation_execution_id": "string", + "portal_status": "sent", + "portal_status_updated_at": "1970-01-01T00:00:00.000Z", + "portal_state": {}, + "updated_at": "1970-01-01T00:00:00.000Z" + } + ], + "next": "string", + "total": 0 +} +``` + +
+ +--- diff --git a/packages/cli/docs/template-variables.md b/packages/cli/docs/template-variables.md new file mode 100644 index 00000000..725d538e --- /dev/null +++ b/packages/cli/docs/template-variables.md @@ -0,0 +1,1196 @@ +# Template Variables API + +- **Base URL:** `https://template-variables-api.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/template-variables](https://docs.epilot.io/api/template-variables) + +This API provides dynamic template processing and variable management, seamless Handlebars template compilation, custom variable operations, and context-aware content generation across email, document templates and snippets. + +## Quick Start + +```bash +# List available operations +epilot template-variables + +# Call an operation +epilot template-variables getCategories +``` + +## Operations + +**Templates** +- [`getCategories`](#getcategories) — Get all template variable categories +- [`searchVariables`](#searchvariables) — Search variables +- [`getVariableContext`](#getvariablecontext) — Get full variable context +- [`replaceTemplates`](#replacetemplates) — Replace variables in handlebars templates +- [`replaceTemplatesV2`](#replacetemplatesv2) — Replace variables in handlebars templates with raw value preservation + +**Custom Variables** +- [`getCustomVariables`](#getcustomvariables) — Get all custom variables of organization +- [`createCustomVariable`](#createcustomvariable) — Create custom variable +- [`searchCustomVariables`](#searchcustomvariables) — Search custom variables +- [`getCustomVariable`](#getcustomvariable) — Get custom variable +- [`updateCustomVariable`](#updatecustomvariable) — Update custom variable +- [`deleteCustomVariable`](#deletecustomvariable) — Immediately and permanently deletes a custom variable +- [`getBluePrintTableConfig`](#getblueprinttableconfig) — Get default table config + +### `getCategories` + +Get all template variable categories + +`GET /v1/template-variables/categories` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `lang` | query | string | No | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot template-variables getCategories +``` + +With JSONata filter: + +```bash +epilot template-variables getCategories --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "category": "contact", + "description": "Contact" + } +] +``` + +
+ +--- + +### `searchVariables` + +Search variables + +`POST /v1/template-variables:search` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot template-variables searchVariables \ + -d '{"template_type":"email","query":"logo","from":0,"size":25,"lang":"de","entity_schemas":["contact"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot template-variables searchVariables +``` + +With JSONata filter: + +```bash +epilot template-variables searchVariables --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "type": "simple", + "qrdata": "string", + "group": "string", + "insert": "string", + "description": "string" + } +] +``` + +
+ +--- + +### `getVariableContext` + +Get full variable context + +`POST /v1/template-variables:context` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot template-variables getVariableContext +``` + +With request body: + +```bash +epilot template-variables getVariableContext \ + -d '{ + "parameters": { + "template_type": "email", + "language": "de", + "main_entity_id": "63753437-c9e2-4e83-82bb-b1c666514561", + "brand_id": 123451, + "user_id": "50001", + "user_org_id": "729224", + "custom_variables": [ + { + "variable": "{{craftsmen.invitation_link}}", + "value": "https://partner.epilot.cloud/activate-account?user_name=htny.pct%2Btet%40gmail.com&confirmation_code=EdXPRW19" + } + ], + "context_data": {}, + "template_name": "string", + "template_tags": ["string"], + "variables_version": "2" + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot template-variables getVariableContext +``` + +With JSONata filter: + +```bash +epilot template-variables getVariableContext --jsonata 'unsubscribe_url' +``` + +
+Sample Response + +```json +{ + "unsubscribe_url": "https://consent.sls.epilot.io/v1/unsubscribe?token=abc123", + "main": { + "_id": "03be777b-3cf8-4bff-bb0c-253fd1128479", + "_title": "Example Customer", + "customer_number": 123, + "first_name": "Example", + "last_name": "Customer", + "title": "Prof.", + "salutation": "Ms. / Mrs.", + "birthdate": "2018-03-03", + "email": [ + {}, + {} + ], + "phone": [ + {}, + {} + ], + "address": [ + {}, + {} + ], + "account": [ + {} + ] + }, + "contact": { + "_id": "03be777b-3cf8-4bff-bb0c-253fd1128479", + "_title": "Example Customer", + "customer_number": 123, + "first_name": "Example", + "last_name": "Customer", + "title": "Prof.", + "salutation": "Ms. / Mrs.", + "birthdate": "2018-03-03", + "email": [ + {}, + {} + ], + "phone": [ + {}, + {} + ], + "address": [ + {}, + {} + ], + "account": [ + {} + ] + }, + "brand": { + "id": 123453, + "name": "Brand name", + "signature": "Signature" + } +} +``` + +
+ +--- + +### `replaceTemplates` + +Replace variables in handlebars templates + +`POST /v1/template-variables:replace` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot template-variables replaceTemplates +``` + +With request body: + +```bash +epilot template-variables replaceTemplates \ + -d '{ + "inputs": ["Hello, {{contact.first_name}}!\n\n{{{brand.signature}}}\n"], + "parameters": { + "template_type": "email", + "language": "de", + "main_entity_id": "63753437-c9e2-4e83-82bb-b1c666514561", + "brand_id": 123451, + "user_id": "50001", + "user_org_id": "729224", + "custom_variables": [ + { + "variable": "{{craftsmen.invitation_link}}", + "value": "https://partner.epilot.cloud/activate-account?user_name=htny.pct%2Btet%40gmail.com&confirmation_code=EdXPRW19" + } + ], + "context_data": {}, + "template_name": "string", + "template_tags": ["string"], + "variables_version": "2" + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot template-variables replaceTemplates +``` + +With JSONata filter: + +```bash +epilot template-variables replaceTemplates --jsonata 'outputs' +``` + +
+Sample Response + +```json +{ + "outputs": ["[Brand Name GmbH] Order confirmation\nHello Customer Name\n\nBrand Name GmbH\n\"Brand\nimprint\n"] +} +``` + +
+ +--- + +### `replaceTemplatesV2` + +Replace variables in handlebars templates with raw value preservation + +`POST /v2/template:replace` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot template-variables replaceTemplatesV2 +``` + +With request body: + +```bash +epilot template-variables replaceTemplatesV2 \ + -d '{ + "inputs": ["Hello, {{contact.first_name}}!\n"], + "parameters": { + "template_type": "email", + "language": "de", + "main_entity_id": "63753437-c9e2-4e83-82bb-b1c666514561", + "brand_id": 123451, + "user_id": "50001", + "user_org_id": "729224", + "custom_variables": [ + { + "variable": "{{craftsmen.invitation_link}}", + "value": "https://partner.epilot.cloud/activate-account?user_name=htny.pct%2Btet%40gmail.com&confirmation_code=EdXPRW19" + } + ], + "context_data": {}, + "template_name": "string", + "template_tags": ["string"], + "variables_version": "2" + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot template-variables replaceTemplatesV2 +``` + +With JSONata filter: + +```bash +epilot template-variables replaceTemplatesV2 --jsonata 'outputs' +``` + +
+Sample Response + +```json +{ + "outputs": { + "Hello {{first_name}}": "Hello John", + "{{first_name}}": "John", + "{{product_images[*].public_url}}": ["http://myimage.server.com/img1.png", "http://myimage.server.com/img2.png"] + } +} +``` + +
+ +--- + +### `getCustomVariables` + +Get all custom variables of organization + +`GET /v1/custom-variables` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot template-variables getCustomVariables +``` + +With JSONata filter: + +```bash +epilot template-variables getCustomVariables --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "rbse777b-3cf8-4bff-bb0c-253fd1123250", + "type": "order_table", + "name": "My Custom table", + "key": "my_custom_table", + "_tags": ["string"], + "helper_params": ["param1", "param2"], + "helper_logic": "return param1 * param2;", + "config": { + "header": null, + "style": {}, + "columns": [], + "body": {}, + "footer": {} + }, + "template": "\n \n \n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n \n {{/if}}\n {{/each}}\n \n \n \n \n {{#each order.products as |product|}}\n {{#if @last}}\n \n {{else}}\n \n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n \n \n {{/if}}\n {{#if (eq column.id 'quantity')}}\n \n \n {{/if}}\n {{#if (eq column.id 'tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n \n \n {{/if}}\n {{#if (eq column.id 'net_total')}}\n \n \n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n \n \n {{/if}}\n {{/if}}\n {{/each}}\n \n {{/each}}\n \n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n \n \n {{#if @root.table_config.footer.payment_type.enable}}\n \n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n \n {{/if}}\n {{/if}}\n \n \n {{/each}}\n {{/if}}\n \n \n
{{column._label}}
\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n
\n {{product.price.description}}\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n
\n {{product.description}}\n {{/if}}\n
{{product.price.quantity}}\n \n {{product.price.tax_rate}}\n \n {{product.price.unit_amount_net}}\n \n {{product.price.amount_subtotal}}\n \n {{product.price.amount_tax}}\n \n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n
\n {{product.price.billing_period}}\n {{/if}}\n {{/if}}\n
{{item.billing_period}}{{item.amount_subtotal}}{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n
\n {{item.full_amount_tax}}\n {{/if}}\n
\n", + "created_at": "2022-04-19T12:41:43.662Z", + "created_by": "100042", + "updated_at": "2022-04-20T12:41:43.662Z", + "updated_by": "100042" + } +] +``` + +
+ +--- + +### `createCustomVariable` + +Create custom variable + +`POST /v1/custom-variables` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot template-variables createCustomVariable +``` + +With request body: + +```bash +epilot template-variables createCustomVariable \ + -d '{ + "id": "rbse777b-3cf8-4bff-bb0c-253fd1123250", + "type": "order_table", + "name": "My Custom table", + "key": "my_custom_table", + "_tags": ["string"], + "helper_params": ["param1", "param2"], + "helper_logic": "return param1 * param2;", + "config": { + "header": null, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "16px", + "font-family": "", + "padding-bottom": "4px", + "font-weight": "bold", + "border": "none !important", + "text-align": "left" + }, + "columns": [ + {}, + {} + ], + "body": { + "product_name": {}, + "price_description": {}, + "product_description": {}, + "quantity": {}, + "tax": {}, + "unit_amount": {}, + "net_total": {}, + "gross_total": {} + }, + "footer": { + "payment_type": {}, + "net_total": {}, + "amount_tax": {}, + "gross_total": {} + } + }, + "template": "\n \n \n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n \n {{/if}}\n {{/each}}\n \n \n \n \n {{#each order.products as |product|}}\n {{#if @last}}\n \n {{else}}\n \n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n \n \n {{/if}}\n {{#if (eq column.id 'quantity')}}\n \n \n {{/if}}\n {{#if (eq column.id 'tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n \n \n {{/if}}\n {{#if (eq column.id 'net_total')}}\n \n \n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n \n \n {{/if}}\n {{/if}}\n {{/each}}\n \n {{/each}}\n \n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n \n \n {{#if @root.table_config.footer.payment_type.enable}}\n \n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n \n {{/if}}\n {{/if}}\n \n \n {{/each}}\n {{/if}}\n \n \n
{{column._label}}
\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n
\n {{product.price.description}}\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n
\n {{product.description}}\n {{/if}}\n
{{product.price.quantity}}\n \n {{product.price.tax_rate}}\n \n {{product.price.unit_amount_net}}\n \n {{product.price.amount_subtotal}}\n \n {{product.price.amount_tax}}\n \n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n
\n {{product.price.billing_period}}\n {{/if}}\n {{/if}}\n
{{item.billing_period}}{{item.amount_subtotal}}{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n
\n {{item.full_amount_tax}}\n {{/if}}\n
\n", + "created_at": "2022-04-19T12:41:43.662Z", + "created_by": "100042", + "updated_at": "2022-04-20T12:41:43.662Z", + "updated_by": "100042" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot template-variables createCustomVariable +``` + +With JSONata filter: + +```bash +epilot template-variables createCustomVariable --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "rbse777b-3cf8-4bff-bb0c-253fd1123250", + "type": "order_table", + "name": "My Custom table", + "key": "my_custom_table", + "_tags": ["string"], + "helper_params": ["param1", "param2"], + "helper_logic": "return param1 * param2;", + "config": { + "header": null, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "16px", + "font-family": "", + "padding-bottom": "4px", + "font-weight": "bold", + "border": "none !important", + "text-align": "left" + }, + "columns": [ + {}, + {} + ], + "body": { + "product_name": {}, + "price_description": {}, + "product_description": {}, + "quantity": {}, + "tax": {}, + "unit_amount": {}, + "net_total": {}, + "gross_total": {} + }, + "footer": { + "payment_type": {}, + "net_total": {}, + "amount_tax": {}, + "gross_total": {} + } + }, + "template": "\n \n \n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n \n {{/if}}\n {{/each}}\n \n \n \n \n {{#each order.products as |product|}}\n {{#if @last}}\n \n {{else}}\n \n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n \n \n {{/if}}\n {{#if (eq column.id 'quantity')}}\n \n \n {{/if}}\n {{#if (eq column.id 'tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n \n \n {{/if}}\n {{#if (eq column.id 'net_total')}}\n \n \n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n \n \n {{/if}}\n {{/if}}\n {{/each}}\n \n {{/each}}\n \n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n \n \n {{#if @root.table_config.footer.payment_type.enable}}\n \n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n \n {{/if}}\n {{/if}}\n \n \n {{/each}}\n {{/if}}\n \n \n
{{column._label}}
\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n
\n {{product.price.description}}\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n
\n {{product.description}}\n {{/if}}\n
{{product.price.quantity}}\n \n {{product.price.tax_rate}}\n \n {{product.price.unit_amount_net}}\n \n {{product.price.amount_subtotal}}\n \n {{product.price.amount_tax}}\n \n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n
\n {{product.price.billing_period}}\n {{/if}}\n {{/if}}\n
{{item.billing_period}}{{item.amount_subtotal}}{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n
\n {{item.full_amount_tax}}\n {{/if}}\n
\n", + "created_at": "2022-04-19T12:41:43.662Z", + "created_by": "100042", + "updated_at": "2022-04-20T12:41:43.662Z", + "updated_by": "100042" +} +``` + +
+ +--- + +### `searchCustomVariables` + +Search custom variables + +`POST /v1/custom-variables:search` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot template-variables searchCustomVariables +``` + +With request body: + +```bash +epilot template-variables searchCustomVariables \ + -d '{ + "type": "order_table", + "tags": ["string"], + "query": "logo", + "from": 0, + "size": 25, + "sort_by": "created_at, name, key", + "fields": ["string"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot template-variables searchCustomVariables +``` + +With JSONata filter: + +```bash +epilot template-variables searchCustomVariables --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "rbse777b-3cf8-4bff-bb0c-253fd1123250", + "type": "order_table", + "name": "My Custom table", + "key": "my_custom_table", + "_tags": ["string"], + "helper_params": ["param1", "param2"], + "helper_logic": "return param1 * param2;", + "config": {}, + "template": "\n \n \n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n \n {{/if}}\n {{/each}}\n \n \n \n \n {{#each order.products as |product|}}\n {{#if @last}}\n \n {{else}}\n \n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n \n \n {{/if}}\n {{#if (eq column.id 'quantity')}}\n \n \n {{/if}}\n {{#if (eq column.id 'tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n \n \n {{/if}}\n {{#if (eq column.id 'net_total')}}\n \n \n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n \n \n {{/if}}\n {{/if}}\n {{/each}}\n \n {{/each}}\n \n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n \n \n {{#if @root.table_config.footer.payment_type.enable}}\n \n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n \n {{/if}}\n {{/if}}\n \n \n {{/each}}\n {{/if}}\n \n \n
{{column._label}}
\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n
\n {{product.price.description}}\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n
\n {{product.description}}\n {{/if}}\n
{{product.price.quantity}}\n \n {{product.price.tax_rate}}\n \n {{product.price.unit_amount_net}}\n \n {{product.price.amount_subtotal}}\n \n {{product.price.amount_tax}}\n \n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n
\n {{product.price.billing_period}}\n {{/if}}\n {{/if}}\n
{{item.billing_period}}{{item.amount_subtotal}}{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n
\n {{item.full_amount_tax}}\n {{/if}}\n
\n", + "created_at": "2022-04-19T12:41:43.662Z", + "created_by": "100042", + "updated_at": "2022-04-20T12:41:43.662Z", + "updated_by": "100042" + } + ], + "hits": 100 +} +``` + +
+ +--- + +### `getCustomVariable` + +Get custom variable + +`GET /v1/custom-variables/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Custom vairable ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot template-variables getCustomVariable \ + -p id=rbse777b-3cf8-4bff-bb0c-253fd1123250 +``` + +Using positional args for path parameters: + +```bash +epilot template-variables getCustomVariable rbse777b-3cf8-4bff-bb0c-253fd1123250 +``` + +With JSONata filter: + +```bash +epilot template-variables getCustomVariable -p id=rbse777b-3cf8-4bff-bb0c-253fd1123250 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "rbse777b-3cf8-4bff-bb0c-253fd1123250", + "type": "order_table", + "name": "My Custom table", + "key": "my_custom_table", + "_tags": ["string"], + "helper_params": ["param1", "param2"], + "helper_logic": "return param1 * param2;", + "config": { + "header": null, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "16px", + "font-family": "", + "padding-bottom": "4px", + "font-weight": "bold", + "border": "none !important", + "text-align": "left" + }, + "columns": [ + {}, + {} + ], + "body": { + "product_name": {}, + "price_description": {}, + "product_description": {}, + "quantity": {}, + "tax": {}, + "unit_amount": {}, + "net_total": {}, + "gross_total": {} + }, + "footer": { + "payment_type": {}, + "net_total": {}, + "amount_tax": {}, + "gross_total": {} + } + }, + "template": "\n \n \n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n \n {{/if}}\n {{/each}}\n \n \n \n \n {{#each order.products as |product|}}\n {{#if @last}}\n \n {{else}}\n \n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n \n \n {{/if}}\n {{#if (eq column.id 'quantity')}}\n \n \n {{/if}}\n {{#if (eq column.id 'tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n \n \n {{/if}}\n {{#if (eq column.id 'net_total')}}\n \n \n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n \n \n {{/if}}\n {{/if}}\n {{/each}}\n \n {{/each}}\n \n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n \n \n {{#if @root.table_config.footer.payment_type.enable}}\n \n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n \n {{/if}}\n {{/if}}\n \n \n {{/each}}\n {{/if}}\n \n \n
{{column._label}}
\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n
\n {{product.price.description}}\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n
\n {{product.description}}\n {{/if}}\n
{{product.price.quantity}}\n \n {{product.price.tax_rate}}\n \n {{product.price.unit_amount_net}}\n \n {{product.price.amount_subtotal}}\n \n {{product.price.amount_tax}}\n \n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n
\n {{product.price.billing_period}}\n {{/if}}\n {{/if}}\n
{{item.billing_period}}{{item.amount_subtotal}}{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n
\n {{item.full_amount_tax}}\n {{/if}}\n
\n", + "created_at": "2022-04-19T12:41:43.662Z", + "created_by": "100042", + "updated_at": "2022-04-20T12:41:43.662Z", + "updated_by": "100042" +} +``` + +
+ +--- + +### `updateCustomVariable` + +Update custom variable + +`PUT /v1/custom-variables/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Custom variable ID | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot template-variables updateCustomVariable \ + -p id=rbse777b-3cf8-4bff-bb0c-253fd1123250 +``` + +With request body: + +```bash +epilot template-variables updateCustomVariable \ + -p id=rbse777b-3cf8-4bff-bb0c-253fd1123250 \ + -d '{ + "id": "rbse777b-3cf8-4bff-bb0c-253fd1123250", + "type": "order_table", + "name": "My Custom table", + "key": "my_custom_table", + "_tags": ["string"], + "helper_params": ["param1", "param2"], + "helper_logic": "return param1 * param2;", + "config": { + "header": null, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "16px", + "font-family": "", + "padding-bottom": "4px", + "font-weight": "bold", + "border": "none !important", + "text-align": "left" + }, + "columns": [ + {}, + {} + ], + "body": { + "product_name": {}, + "price_description": {}, + "product_description": {}, + "quantity": {}, + "tax": {}, + "unit_amount": {}, + "net_total": {}, + "gross_total": {} + }, + "footer": { + "payment_type": {}, + "net_total": {}, + "amount_tax": {}, + "gross_total": {} + } + }, + "template": "\n \n \n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n \n {{/if}}\n {{/each}}\n \n \n \n \n {{#each order.products as |product|}}\n {{#if @last}}\n \n {{else}}\n \n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n \n \n {{/if}}\n {{#if (eq column.id 'quantity')}}\n \n \n {{/if}}\n {{#if (eq column.id 'tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n \n \n {{/if}}\n {{#if (eq column.id 'net_total')}}\n \n \n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n \n \n {{/if}}\n {{/if}}\n {{/each}}\n \n {{/each}}\n \n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n \n \n {{#if @root.table_config.footer.payment_type.enable}}\n \n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n \n {{/if}}\n {{/if}}\n \n \n {{/each}}\n {{/if}}\n \n \n
{{column._label}}
\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n
\n {{product.price.description}}\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n
\n {{product.description}}\n {{/if}}\n
{{product.price.quantity}}\n \n {{product.price.tax_rate}}\n \n {{product.price.unit_amount_net}}\n \n {{product.price.amount_subtotal}}\n \n {{product.price.amount_tax}}\n \n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n
\n {{product.price.billing_period}}\n {{/if}}\n {{/if}}\n
{{item.billing_period}}{{item.amount_subtotal}}{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n
\n {{item.full_amount_tax}}\n {{/if}}\n
\n", + "created_at": "2022-04-19T12:41:43.662Z", + "created_by": "100042", + "updated_at": "2022-04-20T12:41:43.662Z", + "updated_by": "100042" +}' +``` + +Using positional args for path parameters: + +```bash +epilot template-variables updateCustomVariable rbse777b-3cf8-4bff-bb0c-253fd1123250 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot template-variables updateCustomVariable -p id=rbse777b-3cf8-4bff-bb0c-253fd1123250 +``` + +With JSONata filter: + +```bash +epilot template-variables updateCustomVariable -p id=rbse777b-3cf8-4bff-bb0c-253fd1123250 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "rbse777b-3cf8-4bff-bb0c-253fd1123250", + "type": "order_table", + "name": "My Custom table", + "key": "my_custom_table", + "_tags": ["string"], + "helper_params": ["param1", "param2"], + "helper_logic": "return param1 * param2;", + "config": { + "header": null, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "16px", + "font-family": "", + "padding-bottom": "4px", + "font-weight": "bold", + "border": "none !important", + "text-align": "left" + }, + "columns": [ + {}, + {} + ], + "body": { + "product_name": {}, + "price_description": {}, + "product_description": {}, + "quantity": {}, + "tax": {}, + "unit_amount": {}, + "net_total": {}, + "gross_total": {} + }, + "footer": { + "payment_type": {}, + "net_total": {}, + "amount_tax": {}, + "gross_total": {} + } + }, + "template": "\n \n \n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n \n {{/if}}\n {{/each}}\n \n \n \n \n {{#each order.products as |product|}}\n {{#if @last}}\n \n {{else}}\n \n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n \n \n {{/if}}\n {{#if (eq column.id 'quantity')}}\n \n \n {{/if}}\n {{#if (eq column.id 'tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n \n \n {{/if}}\n {{#if (eq column.id 'net_total')}}\n \n \n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n \n \n {{/if}}\n {{/if}}\n {{/each}}\n \n {{/each}}\n \n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n \n \n {{#if @root.table_config.footer.payment_type.enable}}\n \n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n \n {{/if}}\n {{/if}}\n \n \n {{/each}}\n {{/if}}\n \n \n
{{column._label}}
\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n
\n {{product.price.description}}\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n
\n {{product.description}}\n {{/if}}\n
{{product.price.quantity}}\n \n {{product.price.tax_rate}}\n \n {{product.price.unit_amount_net}}\n \n {{product.price.amount_subtotal}}\n \n {{product.price.amount_tax}}\n \n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n
\n {{product.price.billing_period}}\n {{/if}}\n {{/if}}\n
{{item.billing_period}}{{item.amount_subtotal}}{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n
\n {{item.full_amount_tax}}\n {{/if}}\n
\n", + "created_at": "2022-04-19T12:41:43.662Z", + "created_by": "100042", + "updated_at": "2022-04-20T12:41:43.662Z", + "updated_by": "100042" +} +``` + +
+ +--- + +### `deleteCustomVariable` + +Immediately and permanently deletes a custom variable + +`DELETE /v1/custom-variables/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Custom vairable ID | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot template-variables deleteCustomVariable \ + -p id=rbse777b-3cf8-4bff-bb0c-253fd1123250 +``` + +Using positional args for path parameters: + +```bash +epilot template-variables deleteCustomVariable rbse777b-3cf8-4bff-bb0c-253fd1123250 +``` + +With JSONata filter: + +```bash +epilot template-variables deleteCustomVariable -p id=rbse777b-3cf8-4bff-bb0c-253fd1123250 --jsonata '$' +``` + +--- + +### `getBluePrintTableConfig` + +Get default table config + +`GET /v1/custom-variables/order-table-blueprint` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot template-variables getBluePrintTableConfig +``` + +With JSONata filter: + +```bash +epilot template-variables getBluePrintTableConfig --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "rbse777b-3cf8-4bff-bb0c-253fd1123250", + "type": "order_table", + "name": "My Custom table", + "key": "my_custom_table", + "_tags": ["string"], + "helper_params": ["param1", "param2"], + "helper_logic": "return param1 * param2;", + "config": { + "header": null, + "style": { + "color": "#222", + "background": "#fff", + "font-size": "16px", + "font-family": "", + "padding-bottom": "4px", + "font-weight": "bold", + "border": "none !important", + "text-align": "left" + }, + "columns": [ + {}, + {} + ], + "body": { + "product_name": {}, + "price_description": {}, + "product_description": {}, + "quantity": {}, + "tax": {}, + "unit_amount": {}, + "net_total": {}, + "gross_total": {} + }, + "footer": { + "payment_type": {}, + "net_total": {}, + "amount_tax": {}, + "gross_total": {} + } + }, + "template": "\n \n \n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n \n {{/if}}\n {{/each}}\n \n \n \n \n {{#each order.products as |product|}}\n {{#if @last}}\n \n {{else}}\n \n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n \n \n {{/if}}\n {{#if (eq column.id 'quantity')}}\n \n \n {{/if}}\n {{#if (eq column.id 'tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n \n \n {{/if}}\n {{#if (eq column.id 'net_total')}}\n \n \n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n \n \n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n \n \n {{/if}}\n {{/if}}\n {{/each}}\n \n {{/each}}\n \n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n \n \n {{#if @root.table_config.footer.payment_type.enable}}\n \n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n \n {{/if}}\n {{/if}}\n \n \n {{/each}}\n {{/if}}\n \n \n
{{column._label}}
\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n
\n {{product.price.description}}\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n
\n {{product.description}}\n {{/if}}\n
{{product.price.quantity}}\n \n {{product.price.tax_rate}}\n \n {{product.price.unit_amount_net}}\n \n {{product.price.amount_subtotal}}\n \n {{product.price.amount_tax}}\n \n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n
\n {{product.price.billing_period}}\n {{/if}}\n {{/if}}\n
{{item.billing_period}}{{item.amount_subtotal}}{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n
\n {{item.full_amount_tax}}\n {{/if}}\n
\n", + "created_at": "2022-04-19T12:41:43.662Z", + "created_by": "100042", + "updated_at": "2022-04-20T12:41:43.662Z", + "updated_by": "100042" +} +``` + +
+ +--- diff --git a/packages/cli/docs/user.md b/packages/cli/docs/user.md new file mode 100644 index 00000000..24f1b480 --- /dev/null +++ b/packages/cli/docs/user.md @@ -0,0 +1,3109 @@ +# User API + +- **Base URL:** `https://user.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/user](https://docs.epilot.io/api/user) + +Manage users in epilot organization(s) + +## Quick Start + +```bash +# List available operations +epilot user + +# Call an operation +epilot user signUpUser +``` + +## Operations + +**User V2** +- [`signUpUser`](#signupuser) — POST /v2/users/public/signup +- [`getMeV2`](#getmev2) — Get currently logged in user +- [`listUsersV2`](#listusersv2) — Get the list of organization users +- [`getUserV2`](#getuserv2) — Get user details by user id +- [`updateUserV2`](#updateuserv2) — Update user details +- [`deleteUserV2`](#deleteuserv2) — Delete user by user id +- [`inviteUser`](#inviteuser) — Creates a new user in the caller's organization and sends an invite email to activate the user +- [`resendUserInvitation`](#resenduserinvitation) — Resend user invitation email +- [`getGroupsForUser`](#getgroupsforuser) — Get groups of a user +- [`verifyEmailWithToken`](#verifyemailwithtoken) — Update new email using an verification token +- [`checkInviteToken`](#checkinvitetoken) — Check an invite token +- [`activateUser`](#activateuser) — Activate user using an invite token +- [`rejectInvite`](#rejectinvite) — Reject an invite +- [`getUserLoginParametersV2`](#getuserloginparametersv2) — Get user organization login parameters by username +- [`beginPasskeyAuthentication`](#beginpasskeyauthentication) — Begin passkey authentication flow. Returns WebAuthn options and a signed challenge token. +- [`beginDiscoverablePasskeyAuthentication`](#begindiscoverablepasskeyauthentication) — Begin discoverable passkey authentication flow (no email required). Returns WebAuthn options with empty allowCredentials +- [`resolveDiscoverableCredential`](#resolvediscoverablecredential) — Resolve user identity from a discoverable passkey assertion. Returns the user's email and login parameters. +- [`beginPasskeyRegistration`](#beginpasskeyregistration) — Begin passkey registration flow for the authenticated user. +- [`completePasskeyRegistration`](#completepasskeyregistration) — Complete passkey registration by verifying the attestation response. +- [`listPasskeys`](#listpasskeys) — List all passkeys registered for the authenticated user. +- [`deletePasskey`](#deletepasskey) — Delete a passkey by credential ID. +- [`switchOrganization`](#switchorganization) — Switch to another organization the user is part of + +**Group** +- [`getGroups`](#getgroups) — Lists groups in organizations you have access to +- [`createGroup`](#creategroup) — Create a new group +- [`getGroup`](#getgroup) — Get group by id +- [`updateGroup`](#updategroup) — Update group by id +- [`deleteGroup`](#deletegroup) — Delete group by id +- [`advanceUserAssignment`](#advanceuserassignment) — Advance user assignment to next user in line + +**Navigation** +- [`createNavigation`](#createnavigation) — Create a new navigation configuration. Navigations are immutable and globally accessible across organizations. +- [`getNavigation`](#getnavigation) — Get a navigation configuration by ID + +**User V1** +- [`getMe`](#getme) — Get currently logged in user +- [`listUsers`](#listusers) — Lists users in organizations you have access to +- [`getUser`](#getuser) — Get user by id +- [`getUserLoginParameters`](#getuserloginparameters) — Get user organization login parameters by username + +### `signUpUser` + +`POST /v2/users/public/signup` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `token` | query | string | No | Partner invitation token | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user signUpUser +``` + +With request body: + +```bash +epilot user signUpUser \ + -d '{ + "organization_detail": { + "type": "Vendor", + "name": "Epilot", + "pricing_tier": "professional", + "email": "string", + "phone": "string", + "website": "string", + "is_privacy_policy_checked": false, + "is_terms_and_conditions_checked": false + }, + "user_detail": { + "full_name": "Example user", + "email": "user@example.com", + "password": "AKjhdakjsdh@!34" + }, + "language": "en" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user signUpUser +``` + +With JSONata filter: + +```bash +epilot user signUpUser --jsonata 'user' +``` + +
+Sample Response + +```json +{ + "user": { + "id": "string", + "organization_id": "string", + "email": "user@example.com", + "display_name": "Example user", + "name": "Example user", + "preferred_language": "de", + "signature": "

Thanks

", + "custom_navigation": "5gbe4nkp6jsfq", + "roles": ["Owner"], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] + }, + "organization": { + "id": "string", + "type": "Vendor", + "name": "Epilot", + "signature": "

Thanks

", + "symbol": "EPI", + "pricing_tier": "professional", + "email": "someone@epilot.cloud", + "phone": 49123123123, + "website": "https://epilot.cloud", + "address": { + "country": "string", + "city": "string", + "postal_code": "string", + "street": "string", + "street_number": "string" + }, + "logo_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "logo_thumbnail_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png", + "is_unlicensed_org": false, + "cognito_details": { + "cognito_region": "eu-central-1", + "cognito_user_pool_id": "eu-central-sample", + "cognito_user_pool_client_id": "asbkh213ehkquwhdi", + "cognito_user_pool_arn": "arn:aws:cognito-idp:eu-central-1:123456789012:userpool/eu-central-sample" + } + } +} +``` + +
+ +--- + +### `getMeV2` + +Get currently logged in user + +`GET /v2/users/me` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user getMeV2 +``` + +With JSONata filter: + +```bash +epilot user getMeV2 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": { + "feature_name": true + }, + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "favorites": { + "entity_views": { + "opportunity": "891a5409850abf8b92bd2cb7bdd2844d32ce6bec", + "order": "628aee91-7c2f-4047-ab0d-433582a19c49" + }, + "dashboard": "751ff121-9ac2-4511-a2e6-851f11287380" + }, + "email_notification_setting": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] +} +``` + +
+ +--- + +### `listUsersV2` + +Get the list of organization users + +`GET /v2/users` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `query` | query | string | No | Query text to filter by | +| `limit` | query | number | No | Limit the results size | +| `offset` | query | number | No | Specify the offset | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user listUsersV2 +``` + +With JSONata filter: + +```bash +epilot user listUsersV2 --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": { + "feature_name": true + }, + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "favorites": { + "entity_views": { + "opportunity": "891a5409850abf8b92bd2cb7bdd2844d32ce6bec", + "order": "628aee91-7c2f-4047-ab0d-433582a19c49" + }, + "dashboard": "751ff121-9ac2-4511-a2e6-851f11287380" + }, + "email_notification_setting": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] + } + ] +} +``` + +
+ +--- + +### `getUserV2` + +Get user details by user id + +`GET /v2/users/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Id of user | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user getUserV2 \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot user getUserV2 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot user getUserV2 -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": { + "feature_name": true + }, + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "favorites": { + "entity_views": { + "opportunity": "891a5409850abf8b92bd2cb7bdd2844d32ce6bec", + "order": "628aee91-7c2f-4047-ab0d-433582a19c49" + }, + "dashboard": "751ff121-9ac2-4511-a2e6-851f11287380" + }, + "email_notification_setting": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] +} +``` + +
+ +--- + +### `updateUserV2` + +Update user details + +`PATCH /v2/users/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Id of user | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user updateUserV2 \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot user updateUserV2 \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": { + "feature_name": true + }, + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "favorites": { + "entity_views": { + "opportunity": "891a5409850abf8b92bd2cb7bdd2844d32ce6bec", + "order": "628aee91-7c2f-4047-ab0d-433582a19c49" + }, + "dashboard": "751ff121-9ac2-4511-a2e6-851f11287380" + }, + "email_notification_setting": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] +}' +``` + +Using positional args for path parameters: + +```bash +epilot user updateUserV2 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user updateUserV2 -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot user updateUserV2 -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": { + "feature_name": true + }, + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "favorites": { + "entity_views": { + "opportunity": "891a5409850abf8b92bd2cb7bdd2844d32ce6bec", + "order": "628aee91-7c2f-4047-ab0d-433582a19c49" + }, + "dashboard": "751ff121-9ac2-4511-a2e6-851f11287380" + }, + "email_notification_setting": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] +} +``` + +
+ +--- + +### `deleteUserV2` + +Delete user by user id + +`DELETE /v2/users/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Id of user | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user deleteUserV2 \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot user deleteUserV2 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot user deleteUserV2 -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "organization_id": "string", + "email": "user@example.com", + "display_name": "Example user", + "name": "Example user", + "preferred_language": "de", + "signature": "

Thanks

", + "custom_navigation": "5gbe4nkp6jsfq", + "roles": ["Owner"], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] +} +``` + +
+ +--- + +### `inviteUser` + +Creates a new user in the caller's organization and sends an invite email to activate the user + +`POST /v2/users/invite` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user inviteUser \ + -d '{"email":"test@example.com","language":"en","roles":["123:owner"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user inviteUser +``` + +With JSONata filter: + +```bash +epilot user inviteUser --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": { + "feature_name": true + }, + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "favorites": { + "entity_views": { + "opportunity": "891a5409850abf8b92bd2cb7bdd2844d32ce6bec", + "order": "628aee91-7c2f-4047-ab0d-433582a19c49" + }, + "dashboard": "751ff121-9ac2-4511-a2e6-851f11287380" + }, + "email_notification_setting": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] +} +``` + +
+ +--- + +### `resendUserInvitation` + +Resend user invitation email + +`POST /v2/users/invite:resendEmail` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user resendUserInvitation \ + -d '{"email":"test@example.com","language":"en"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user resendUserInvitation +``` + +With JSONata filter: + +```bash +epilot user resendUserInvitation --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": { + "feature_name": true + }, + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "favorites": { + "entity_views": { + "opportunity": "891a5409850abf8b92bd2cb7bdd2844d32ce6bec", + "order": "628aee91-7c2f-4047-ab0d-433582a19c49" + }, + "dashboard": "751ff121-9ac2-4511-a2e6-851f11287380" + }, + "email_notification_setting": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] +} +``` + +
+ +--- + +### `getGroupsForUser` + +Get groups of a user + +`GET /v2/users/{id}/groups` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The Id of user | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user getGroupsForUser \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot user getGroupsForUser 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot user getGroupsForUser -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "string", + "org_id": "string", + "name": "Finance", + "created_at": "2024-02-08T04:44:32.246Z", + "updated_at": "2024-02-08T04:44:32.246Z", + "created_by": "123", + "crt_assignee": { + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": {}, + "image_uri": {}, + "favorites": {}, + "email_notification_setting": {}, + "properties": [], + "crt_index": 3 + }, + "users": [ + {} + ] + } +] +``` + +
+ +--- + +### `getGroups` + +Lists groups in organizations you have access to + +`GET /v1/groups` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `query` | query | string | No | Query name to filter by | +| `limit` | query | number | No | Limit the results size | +| `offset` | query | number | No | Specify the offset | +| `hydrate` | query | boolean | No | Pass it true when you want to hydrate the group with full user details | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user getGroups +``` + +With JSONata filter: + +```bash +epilot user getGroups --jsonata 'hits[0]' +``` + +
+Sample Response + +```json +{ + "hits": 1, + "groups": [ + { + "id": "string", + "org_id": "string", + "name": "Finance", + "created_at": "2024-02-08T04:44:32.246Z", + "updated_at": "2024-02-08T04:44:32.246Z", + "created_by": "123", + "crt_assignee": {}, + "users": [] + } + ] +} +``` + +
+ +--- + +### `createGroup` + +Create a new group + +`POST /v1/groups` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user createGroup \ + -d '{"name":"Finance","user_ids":["123","456"]}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user createGroup +``` + +With JSONata filter: + +```bash +epilot user createGroup --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "org_id": "string", + "name": "Finance", + "created_at": "2024-02-08T04:44:32.246Z", + "updated_at": "2024-02-08T04:44:32.246Z", + "created_by": "123", + "crt_assignee": { + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": { + "feature_name": true + }, + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "favorites": { + "entity_views": {}, + "dashboard": "751ff121-9ac2-4511-a2e6-851f11287380" + }, + "email_notification_setting": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + }, + "properties": [ + {} + ], + "crt_index": 3 + }, + "users": [ + { + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": {}, + "image_uri": {}, + "favorites": {}, + "email_notification_setting": {}, + "properties": [] + } + ] +} +``` + +
+ +--- + +### `getGroup` + +Get group by id + +`GET /v1/groups/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Group id | +| `hydrate` | query | boolean | No | Pass it true when you want to hydrate the group with full user details | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user getGroup \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot user getGroup 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot user getGroup -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "org_id": "string", + "name": "Finance", + "created_at": "2024-02-08T04:44:32.246Z", + "updated_at": "2024-02-08T04:44:32.246Z", + "created_by": "123", + "crt_assignee": { + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": { + "feature_name": true + }, + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "favorites": { + "entity_views": {}, + "dashboard": "751ff121-9ac2-4511-a2e6-851f11287380" + }, + "email_notification_setting": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + }, + "properties": [ + {} + ], + "crt_index": 3 + }, + "users": [ + { + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": {}, + "image_uri": {}, + "favorites": {}, + "email_notification_setting": {}, + "properties": [] + } + ] +} +``` + +
+ +--- + +### `updateGroup` + +Update group by id + +`PATCH /v1/groups/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Group id | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user updateGroup \ + -p id=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"name":"Finance","user_ids":["123","456"]}' +``` + +Using positional args for path parameters: + +```bash +epilot user updateGroup 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user updateGroup -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot user updateGroup -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "org_id": "string", + "name": "Finance", + "created_at": "2024-02-08T04:44:32.246Z", + "updated_at": "2024-02-08T04:44:32.246Z", + "created_by": "123", + "crt_assignee": { + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": { + "feature_name": true + }, + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "favorites": { + "entity_views": {}, + "dashboard": "751ff121-9ac2-4511-a2e6-851f11287380" + }, + "email_notification_setting": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + }, + "properties": [ + {} + ], + "crt_index": 3 + }, + "users": [ + { + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": {}, + "image_uri": {}, + "favorites": {}, + "email_notification_setting": {}, + "properties": [] + } + ] +} +``` + +
+ +--- + +### `deleteGroup` + +Delete group by id + +`DELETE /v1/groups/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Group id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user deleteGroup \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot user deleteGroup 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot user deleteGroup -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `advanceUserAssignment` + +Advance user assignment to next user in line + +`POST /v1/groups/{id}/user:next` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | Group id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user advanceUserAssignment \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot user advanceUserAssignment 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot user advanceUserAssignment -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "org_id": "string", + "name": "Finance", + "created_at": "2024-02-08T04:44:32.246Z", + "updated_at": "2024-02-08T04:44:32.246Z", + "created_by": "123", + "crt_assignee": { + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": { + "feature_name": true + }, + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "favorites": { + "entity_views": {}, + "dashboard": "751ff121-9ac2-4511-a2e6-851f11287380" + }, + "email_notification_setting": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + }, + "properties": [ + {} + ], + "crt_index": 3 + }, + "users": [ + { + "id": "string", + "organization_id": "string", + "created_at": "1970-01-01T00:00:00.000Z", + "activated_at": "1970-01-01T00:00:00.000Z", + "display_name": "Example User", + "status": "Active", + "email": "user@example.com", + "draft_email": "user@example.com", + "department": "Sales", + "phone": 1234567890, + "secondary_phone": 1234567890, + "mfa_enabled": false, + "phone_verified": true, + "token": "string", + "signature": "

Thanks

", + "is_signature_enabled": true, + "preferred_language": "de", + "custom_start_page": "/app/dashboard", + "custom_navigation": "5gbe4nkp6jsfq", + "override_release_channel": "canary", + "feature_preferences": {}, + "image_uri": {}, + "favorites": {}, + "email_notification_setting": {}, + "properties": [] + } + ] +} +``` + +
+ +--- + +### `createNavigation` + +Create a new navigation configuration. Navigations are immutable and globally accessible across organizations. + +`POST /v2/user/navigations` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user createNavigation +``` + +With request body: + +```bash +epilot user createNavigation \ + -d '{ + "name": "Sales Team Navigation", + "configuration": { + "customer_relations": [ + { + "key": "dashboard" + }, + { + "key": "contact" + } + ], + "configurations": [ + { + "name": "Product Catalog", + "subItems": [ + { + "key": "product" + }, + { + "key": "price" + } + ] + }, + { + "key": "journey" + } + ] + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user createNavigation +``` + +With JSONata filter: + +```bash +epilot user createNavigation --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "5gbe4nkp6jsfq", + "name": "Sales Team Navigation", + "configuration": { + "customer_relations": [ + { + "key": "dashboard" + }, + { + "key": "contact" + } + ], + "configurations": [ + { + "name": "Product Catalog", + "subItems": [ + { + "key": "product" + }, + { + "key": "price" + } + ] + }, + { + "key": "journey" + } + ] + } +} +``` + +
+ +--- + +### `getNavigation` + +Get a navigation configuration by ID + +`GET /v2/user/navigations/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | The UUID of the navigation | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user getNavigation \ + -p id=5gbe4nkp6jsfq +``` + +Using positional args for path parameters: + +```bash +epilot user getNavigation 5gbe4nkp6jsfq +``` + +With JSONata filter: + +```bash +epilot user getNavigation -p id=5gbe4nkp6jsfq --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "5gbe4nkp6jsfq", + "name": "Sales Team Navigation", + "configuration": { + "customer_relations": [ + { + "key": "dashboard" + }, + { + "key": "contact" + } + ], + "configurations": [ + { + "name": "Product Catalog", + "subItems": [ + { + "key": "product" + }, + { + "key": "price" + } + ] + }, + { + "key": "journey" + } + ] + } +} +``` + +
+ +--- + +### `verifyEmailWithToken` + +Update new email using an verification token + +`POST /v2/users/public/verifyEmail` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `token` | query | string | Yes | Verification Token | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user verifyEmailWithToken \ + -p token=example \ + -d '{"password":"AKjhdakjsdh@!34"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user verifyEmailWithToken -p token=example +``` + +With JSONata filter: + +```bash +epilot user verifyEmailWithToken -p token=example --jsonata '$' +``` + +--- + +### `checkInviteToken` + +Check an invite token + +`GET /v2/users/public/checkToken` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `token` | query | string | Yes | Invite Token | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user checkInviteToken \ + -p token=example +``` + +With JSONata filter: + +```bash +epilot user checkInviteToken -p token=example --jsonata 'invitation_org_id' +``` + +
+Sample Response + +```json +{ + "invitation_org_id": "string", + "invitation_org_name": "string", + "invitation_org_logo_url": "string", + "invitation_org_logo_thumbnail_url": "string", + "invitee_user_id": "string", + "invitee_primary_org_id": "string" +} +``` + +
+ +--- + +### `activateUser` + +Activate user using an invite token + +`POST /v2/users/public/activate` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `token` | query | string | Yes | Invite Token | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user activateUser \ + -p token=example \ + -d '{"display_name":"Example User","password":"AKjhdakjsdh@!34"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user activateUser -p token=example +``` + +With JSONata filter: + +```bash +epilot user activateUser -p token=example --jsonata '$' +``` + +--- + +### `rejectInvite` + +Reject an invite + +`DELETE /v2/users/public/reject` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `token` | query | string | Yes | Invite Token | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user rejectInvite \ + -p token=example +``` + +With JSONata filter: + +```bash +epilot user rejectInvite -p token=example --jsonata 'success' +``` + +
+Sample Response + +```json +{ + "success": true +} +``` + +
+ +--- + +### `getUserLoginParametersV2` + +Get user organization login parameters by username + +`GET /v2/users/public/username/{username}:getLoginParameters` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `username` | path | string | Yes | Username | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user getUserLoginParametersV2 \ + -p username=example +``` + +Using positional args for path parameters: + +```bash +epilot user getUserLoginParametersV2 example +``` + +With JSONata filter: + +```bash +epilot user getUserLoginParametersV2 -p username=example --jsonata 'login_parameters' +``` + +
+Sample Response + +```json +{ + "login_parameters": [ + { + "organization_id": "123", + "organization_name": "epilot GmbH", + "organization_type": "Vendor", + "organization_use": "Production", + "cognito_region": "eu-central-1", + "cognito_user_pool_id": "eu-central-sample", + "cognito_user_pool_client_id": "asbkh213ehkquwhdi", + "cognito_oauth_domain": "epilot-org-123", + "cognito_oauth_scopes": ["openid"], + "oauth_response_type": "code", + "passkey_enabled": true + } + ] +} +``` + +
+ +--- + +### `beginPasskeyAuthentication` + +Begin passkey authentication flow. Returns WebAuthn options and a signed challenge token. + +`POST /v2/users/public/passkeys:authenticateBegin` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user beginPasskeyAuthentication \ + -d '{"email":"user@example.com"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user beginPasskeyAuthentication +``` + +With JSONata filter: + +```bash +epilot user beginPasskeyAuthentication --jsonata 'options' +``` + +
+Sample Response + +```json +{ + "options": {}, + "challenge_token": "string" +} +``` + +
+ +--- + +### `beginDiscoverablePasskeyAuthentication` + +Begin discoverable passkey authentication flow (no email required). Returns WebAuthn options with empty allowCredentials + +`POST /v2/users/public/passkeys:authenticateBeginDiscoverable` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user beginDiscoverablePasskeyAuthentication +``` + +With JSONata filter: + +```bash +epilot user beginDiscoverablePasskeyAuthentication --jsonata 'options' +``` + +
+Sample Response + +```json +{ + "options": {}, + "challenge_token": "string" +} +``` + +
+ +--- + +### `resolveDiscoverableCredential` + +Resolve user identity from a discoverable passkey assertion. Returns the user's email and login parameters. + +`POST /v2/users/public/passkeys:resolveCredential` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user resolveDiscoverableCredential \ + -d '{"challenge_token":"string","assertion_response":{}}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user resolveDiscoverableCredential +``` + +With JSONata filter: + +```bash +epilot user resolveDiscoverableCredential --jsonata 'email' +``` + +
+Sample Response + +```json +{ + "email": "user@example.com", + "organization_id": "string", + "user_id": "string", + "login_parameters": [ + { + "organization_id": "123", + "organization_name": "epilot GmbH", + "organization_type": "Vendor", + "organization_use": "Production", + "cognito_region": "eu-central-1", + "cognito_user_pool_id": "eu-central-sample", + "cognito_user_pool_client_id": "asbkh213ehkquwhdi", + "cognito_oauth_domain": "epilot-org-123", + "cognito_oauth_scopes": ["openid"], + "oauth_response_type": "code", + "passkey_enabled": true + } + ] +} +``` + +
+ +--- + +### `beginPasskeyRegistration` + +Begin passkey registration flow for the authenticated user. + +`POST /v2/users/me/passkeys:registerBegin` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user beginPasskeyRegistration \ + -d '{"friendly_name":"My Laptop"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user beginPasskeyRegistration +``` + +With JSONata filter: + +```bash +epilot user beginPasskeyRegistration --jsonata 'options' +``` + +
+Sample Response + +```json +{ + "options": {}, + "challenge_token": "string" +} +``` + +
+ +--- + +### `completePasskeyRegistration` + +Complete passkey registration by verifying the attestation response. + +`POST /v2/users/me/passkeys:registerComplete` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user completePasskeyRegistration \ + -d '{"challenge_token":"string","registration_response":{},"friendly_name":"My Laptop"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user completePasskeyRegistration +``` + +With JSONata filter: + +```bash +epilot user completePasskeyRegistration --jsonata 'credential_id' +``` + +
+Sample Response + +```json +{ + "credential_id": "string", + "friendly_name": "My Laptop", + "created_at": "1970-01-01T00:00:00.000Z", + "transports": ["string"], + "aaguid": "string" +} +``` + +
+ +--- + +### `listPasskeys` + +List all passkeys registered for the authenticated user. + +`GET /v2/users/me/passkeys` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user listPasskeys +``` + +With JSONata filter: + +```bash +epilot user listPasskeys --jsonata 'passkeys' +``` + +
+Sample Response + +```json +{ + "passkeys": [ + { + "credential_id": "string", + "friendly_name": "My Laptop", + "created_at": "1970-01-01T00:00:00.000Z", + "transports": ["string"], + "aaguid": "string" + } + ] +} +``` + +
+ +--- + +### `deletePasskey` + +Delete a passkey by credential ID. + +`DELETE /v2/users/me/passkeys/{credentialId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `credentialId` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user deletePasskey \ + -p credentialId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot user deletePasskey 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot user deletePasskey -p credentialId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `switchOrganization` + +Switch to another organization the user is part of + +`POST /v2/users/switchOrganization` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user switchOrganization \ + -d '{"org_id":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot user switchOrganization +``` + +With JSONata filter: + +```bash +epilot user switchOrganization --jsonata 'login_token' +``` + +
+Sample Response + +```json +{ + "login_token": "string" +} +``` + +
+ +--- + +### `getMe` + +Get currently logged in user + +`GET /v1/users/me` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user getMe +``` + +With JSONata filter: + +```bash +epilot user getMe --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "organization_id": "string", + "email": "user@example.com", + "display_name": "Example user", + "name": "Example user", + "preferred_language": "de", + "signature": "

Thanks

", + "custom_navigation": "5gbe4nkp6jsfq", + "roles": ["Owner"], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] +} +``` + +
+ +--- + +### `listUsers` + +Lists users in organizations you have access to + +`GET /v1/users` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `org_ids` | query | string[] | No | Comma-separated list of organization ids to filter by | +| `query` | query | string | No | Query text to filter by | +| `limit` | query | number | No | Limit the results size | +| `offset` | query | number | No | Specify the offset | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user listUsers +``` + +With JSONata filter: + +```bash +epilot user listUsers --jsonata 'users' +``` + +
+Sample Response + +```json +{ + "users": [ + { + "id": "string", + "organization_id": "string", + "email": "user@example.com", + "display_name": "Example user", + "name": "Example user", + "preferred_language": "de", + "signature": "

Thanks

", + "custom_navigation": "5gbe4nkp6jsfq", + "roles": ["Owner"], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] + } + ] +} +``` + +
+ +--- + +### `getUser` + +Get user by id + +`GET /v1/users/{id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `id` | path | string | Yes | User id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user getUser \ + -p id=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot user getUser 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot user getUser -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "organization_id": "string", + "email": "user@example.com", + "display_name": "Example user", + "name": "Example user", + "preferred_language": "de", + "signature": "

Thanks

", + "custom_navigation": "5gbe4nkp6jsfq", + "roles": ["Owner"], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] +} +``` + +
+ +--- + +### `getUserLoginParameters` + +Get user organization login parameters by username + +`GET /v1/users/username/{username}:getLoginParameters` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `username` | path | string | Yes | Username | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot user getUserLoginParameters \ + -p username=example +``` + +Using positional args for path parameters: + +```bash +epilot user getUserLoginParameters example +``` + +With JSONata filter: + +```bash +epilot user getUserLoginParameters -p username=example --jsonata 'login_parameters' +``` + +
+Sample Response + +```json +{ + "login_parameters": [ + { + "organization_id": "123", + "organization_name": "epilot GmbH", + "organization_type": "Vendor", + "organization_use": "Production", + "cognito_region": "eu-central-1", + "cognito_user_pool_id": "eu-central-sample", + "cognito_user_pool_client_id": "asbkh213ehkquwhdi", + "cognito_oauth_domain": "epilot-org-123", + "cognito_oauth_scopes": ["openid"], + "oauth_response_type": "code", + "passkey_enabled": true + } + ] +} +``` + +
+ +--- diff --git a/packages/cli/docs/validation-rules.md b/packages/cli/docs/validation-rules.md new file mode 100644 index 00000000..16754c78 --- /dev/null +++ b/packages/cli/docs/validation-rules.md @@ -0,0 +1,801 @@ +# Validation Rules API + +- **Base URL:** `https://validation-rules.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/validation-rules](https://docs.epilot.io/api/validation-rules) + +## Quick Start + +```bash +# List available operations +epilot validation-rules + +# Call an operation +epilot validation-rules getValidationRules +``` + +## Operations + +**Validation Rules** +- [`getValidationRules`](#getvalidationrules) — Gets all validation rules by organization Id +- [`createValidationRule`](#createvalidationrule) — Creates a new validation rule +- [`getValidationRuleById`](#getvalidationrulebyid) — Retrieves a specific validation rule by its ID +- [`updateValidationRule`](#updatevalidationrule) — Updates an existing validation rule partially by ID +- [`deleteValidationRule`](#deletevalidationrule) — Deletes a validation rule by ID +- [`addUsedByReference`](#addusedbyreference) — Adds a single reference to the usedBy array of a validation rule +- [`removeUsedByReference`](#removeusedbyreference) — Removes a specific reference from the usedBy array of a validation rule + +### `getValidationRules` + +Gets all validation rules by organization Id + +`GET /v1/validation-rules` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot validation-rules getValidationRules +``` + +With JSONata filter: + +```bash +epilot validation-rules getValidationRules --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "title": "string", + "placeholder": "string", + "used_by": [ + { + "type": "journey", + "schema_slug": "string", + "source_id": "string" + } + ], + "rule": { + "type": "regex", + "conditions": { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + }, + { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + } + ] + } + ] + } + }, + "_schema_version": "string", + "_id": "string", + "_organization_id": "string", + "created_at": "string", + "updated_at": "string", + "created_by": "string", + "updated_by": "string" + } + ] +} +``` + +
+ +--- + +### `createValidationRule` + +Creates a new validation rule + +`POST /v1/validation-rules` + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot validation-rules createValidationRule +``` + +With request body: + +```bash +epilot validation-rules createValidationRule \ + -d '{ + "title": "string", + "placeholder": "string", + "used_by": [ + { + "type": "journey", + "schema_slug": "string", + "source_id": "string" + } + ], + "rule": { + "type": "regex", + "conditions": { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + }, + { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + } + ] + } + ] + } + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot validation-rules createValidationRule +``` + +With JSONata filter: + +```bash +epilot validation-rules createValidationRule --jsonata '$' +``` + +
+Sample Response + +```json +{ + "title": "string", + "placeholder": "string", + "used_by": [ + { + "type": "journey", + "schema_slug": "string", + "source_id": "string" + } + ], + "rule": { + "type": "regex", + "conditions": { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + }, + { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + } + ] + } + ] + } + }, + "_schema_version": "string", + "_id": "string", + "_organization_id": "string", + "created_at": "string", + "updated_at": "string", + "created_by": "string", + "updated_by": "string" +} +``` + +
+ +--- + +### `getValidationRuleById` + +Retrieves a specific validation rule by its ID + +`GET /v1/validation-rules/{ruleId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `ruleId` | path | string | Yes | The unique identifier of the validation rule to retrieve. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot validation-rules getValidationRuleById \ + -p ruleId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot validation-rules getValidationRuleById 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot validation-rules getValidationRuleById -p ruleId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "title": "string", + "placeholder": "string", + "used_by": [ + { + "type": "journey", + "schema_slug": "string", + "source_id": "string" + } + ], + "rule": { + "type": "regex", + "conditions": { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + }, + { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + } + ] + } + ] + } + }, + "_schema_version": "string", + "_id": "string", + "_organization_id": "string", + "created_at": "string", + "updated_at": "string", + "created_by": "string", + "updated_by": "string" +} +``` + +
+ +--- + +### `updateValidationRule` + +Updates an existing validation rule partially by ID + +`PATCH /v1/validation-rules/{ruleId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `ruleId` | path | string | Yes | The unique identifier of the validation rule to update. | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot validation-rules updateValidationRule \ + -p ruleId=123e4567-e89b-12d3-a456-426614174000 +``` + +With request body: + +```bash +epilot validation-rules updateValidationRule \ + -p ruleId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{ + "title": "string", + "placeholder": "string", + "used_by": [ + { + "type": "journey", + "schema_slug": "string", + "source_id": "string" + } + ], + "rule": { + "type": "regex", + "conditions": { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + }, + { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + } + ] + } + ] + } + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot validation-rules updateValidationRule 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot validation-rules updateValidationRule -p ruleId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot validation-rules updateValidationRule -p ruleId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "title": "string", + "placeholder": "string", + "used_by": [ + { + "type": "journey", + "schema_slug": "string", + "source_id": "string" + } + ], + "rule": { + "type": "regex", + "conditions": { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + }, + { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + } + ] + } + ] + } + }, + "_schema_version": "string", + "_id": "string", + "_organization_id": "string", + "created_at": "string", + "updated_at": "string", + "created_by": "string", + "updated_by": "string" +} +``` + +
+ +--- + +### `deleteValidationRule` + +Deletes a validation rule by ID + +`DELETE /v1/validation-rules/{ruleId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `ruleId` | path | string | Yes | The unique identifier of the validation rule to delete. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot validation-rules deleteValidationRule \ + -p ruleId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot validation-rules deleteValidationRule 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot validation-rules deleteValidationRule -p ruleId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `addUsedByReference` + +Adds a single reference to the usedBy array of a validation rule + +`POST /v1/validation-rules/{ruleId}/used-by` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `ruleId` | path | string | Yes | The unique identifier of the validation rule to update. | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot validation-rules addUsedByReference \ + -p ruleId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"type":"journey","schema_slug":"string","source_id":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot validation-rules addUsedByReference 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot validation-rules addUsedByReference -p ruleId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot validation-rules addUsedByReference -p ruleId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "title": "string", + "placeholder": "string", + "used_by": [ + { + "type": "journey", + "schema_slug": "string", + "source_id": "string" + } + ], + "rule": { + "type": "regex", + "conditions": { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + }, + { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + } + ] + } + ] + } + }, + "_schema_version": "string", + "_id": "string", + "_organization_id": "string", + "created_at": "string", + "updated_at": "string", + "created_by": "string", + "updated_by": "string" +} +``` + +
+ +--- + +### `removeUsedByReference` + +Removes a specific reference from the usedBy array of a validation rule + +`DELETE /v1/validation-rules/{ruleId}/used-by` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `ruleId` | path | string | Yes | The unique identifier of the validation rule to update. | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot validation-rules removeUsedByReference \ + -p ruleId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"type":"journey","schema_slug":"string","source_id":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot validation-rules removeUsedByReference 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot validation-rules removeUsedByReference -p ruleId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot validation-rules removeUsedByReference -p ruleId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "title": "string", + "placeholder": "string", + "used_by": [ + { + "type": "journey", + "schema_slug": "string", + "source_id": "string" + } + ], + "rule": { + "type": "regex", + "conditions": { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + }, + { + "all": [ + { + "fact": "inputValue", + "operator": "regexMatch", + "value": "string", + "params": { + "errorMessage": "string" + } + } + ] + } + ] + } + }, + "_schema_version": "string", + "_id": "string", + "_organization_id": "string", + "created_at": "string", + "updated_at": "string", + "created_by": "string", + "updated_by": "string" +} +``` + +
+ +--- diff --git a/packages/cli/docs/webhooks.md b/packages/cli/docs/webhooks.md new file mode 100644 index 00000000..4625ee61 --- /dev/null +++ b/packages/cli/docs/webhooks.md @@ -0,0 +1,1066 @@ +# Webhooks + +- **Base URL:** `https://webhooks.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/webhooks](https://docs.epilot.io/api/webhooks) + +Service for configuring webhooks on different events + +## Quick Start + +```bash +# List available operations +epilot webhooks + +# Call an operation +epilot webhooks getPublicKey -p orgId=123e4567-e89b-12d3-a456-426614174000 +``` + +## Operations + +**webhooks** +- [`getPublicKey`](#getpublickey) — Returns the platform-level Ed25519 public key used to verify +- [`getConfiguredEvents`](#getconfiguredevents) — Retrieve events that can trigger webhooks +- [`getConfigs`](#getconfigs) — Search Webhook Client Configs +- [`createConfig`](#createconfig) — Create Webhook Client Config +- [`getConfig`](#getconfig) — Get webhook config by id +- [`updateConfig`](#updateconfig) — Update Webhook Client Config +- [`deleteConfig`](#deleteconfig) — Delete Webhook Client Config +- [`triggerWebhook`](#triggerwebhook) — Trigger a webhook +- [`batchReplayEvents`](#batchreplayevents) — Replay a batch of webhook events +- [`getEventById`](#geteventbyid) — Get a webhook event by its id +- [`replayEvent`](#replayevent) — Replay a webhook event +- [`getWebhookExample`](#getwebhookexample) — Generate an example payload for a webhook configuration based on trigger type + +**Events** +- [`getWebhookEventsV2`](#getwebhookeventsv2) — List webhook events and filter them by status, timestamp, etc. + +### `getPublicKey` + +Returns the platform-level Ed25519 public key used to verify + +`GET /v1/webhooks/.well-known/public-key` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `orgId` | query | string | Yes | Organization ID to retrieve the public key for. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot webhooks getPublicKey \ + -p orgId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot webhooks getPublicKey -p orgId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'public_key' +``` + +
+Sample Response + +```json +{ + "public_key": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA...\n-----END PUBLIC KEY-----\n", + "algorithm": "ed25519", + "issuer": "epilot" +} +``` + +
+ +--- + +### `getConfiguredEvents` + +Retrieve events that can trigger webhooks + +`GET /v1/webhooks/configured-events` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot webhooks getConfiguredEvents +``` + +With JSONata filter: + +```bash +epilot webhooks getConfiguredEvents --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "eventName": "customer_request_created", + "eventLabel": "Customer Request Created" + } +] +``` + +
+ +--- + +### `getConfigs` + +Search Webhook Client Configs + +`GET /v1/webhooks/configs` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `eventName` | query | string | No | Filter configurations by event Name | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot webhooks getConfigs +``` + +With JSONata filter: + +```bash +epilot webhooks getConfigs --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "eventName": "CustomerRequest_Created", + "url": "https://my-partner-service.api.com", + "httpMethod": "POST", + "enabled": true, + "auth": { + "authType": "BASIC", + "basicAuthConfig": { + "username": "secretUsername", + "password": "secret7825@!" + } + }, + "filter": { + "keyToFilter": "customer_request.productId", + "supportedValues": ["2324245", "5253642"] + } + } +] +``` + +
+ +--- + +### `createConfig` + +Create Webhook Client Config + +`POST /v1/webhooks/configs` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot webhooks createConfig +``` + +With request body: + +```bash +epilot webhooks createConfig \ + -d '{ + "eventName": "CustomerRequest_Created", + "url": "https://my-partner-service.api.com", + "httpMethod": "POST", + "enabled": true, + "auth": { + "authType": "BASIC", + "basicAuthConfig": { + "username": "secretUsername", + "password": "secret7825@!" + } + }, + "filter": { + "keyToFilter": "customer_request.productId", + "supportedValues": ["2324245", "5253642"] + } +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot webhooks createConfig +``` + +With JSONata filter: + +```bash +epilot webhooks createConfig --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "eventName": "CustomerRequest_Created", + "url": "https://my-partner-service.api.com", + "httpMethod": "POST", + "enabled": true, + "auth": { + "authType": "BASIC", + "basicAuthConfig": { + "username": "secretUsername", + "password": "secret7825@!" + } + }, + "filter": { + "keyToFilter": "customer_request.productId", + "supportedValues": ["2324245", "5253642"] + } +} +``` + +
+ +--- + +### `getConfig` + +Get webhook config by id + +`GET /v1/webhooks/configs/{configId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `configId` | path | string | Yes | Short uuid to identify the webhook configuration. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot webhooks getConfig \ + -p configId=7hj28aasgag2gha2 +``` + +Using positional args for path parameters: + +```bash +epilot webhooks getConfig 7hj28aasgag2gha2 +``` + +With JSONata filter: + +```bash +epilot webhooks getConfig -p configId=7hj28aasgag2gha2 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "eventName": "CustomerRequest_Created", + "url": "https://my-partner-service.api.com", + "httpMethod": "POST", + "enabled": true, + "auth": { + "authType": "BASIC", + "basicAuthConfig": { + "username": "secretUsername", + "password": "secret7825@!" + } + }, + "filter": { + "keyToFilter": "customer_request.productId", + "supportedValues": ["2324245", "5253642"] + } +} +``` + +
+ +--- + +### `updateConfig` + +Update Webhook Client Config + +`PUT /v1/webhooks/configs/{configId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `configId` | path | string | Yes | Short uuid (length 6) to identify the webhook configuration. | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot webhooks updateConfig \ + -p configId=7hj28a +``` + +With request body: + +```bash +epilot webhooks updateConfig \ + -p configId=7hj28a \ + -d '{ + "eventName": "CustomerRequest_Created", + "url": "https://my-partner-service.api.com", + "httpMethod": "POST", + "enabled": true, + "auth": { + "authType": "BASIC", + "basicAuthConfig": { + "username": "secretUsername", + "password": "secret7825@!" + } + }, + "filter": { + "keyToFilter": "customer_request.productId", + "supportedValues": ["2324245", "5253642"] + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot webhooks updateConfig 7hj28a +``` + +Using stdin pipe: + +```bash +cat body.json | epilot webhooks updateConfig -p configId=7hj28a +``` + +With JSONata filter: + +```bash +epilot webhooks updateConfig -p configId=7hj28a --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "eventName": "CustomerRequest_Created", + "url": "https://my-partner-service.api.com", + "httpMethod": "POST", + "enabled": true, + "auth": { + "authType": "BASIC", + "basicAuthConfig": { + "username": "secretUsername", + "password": "secret7825@!" + } + }, + "filter": { + "keyToFilter": "customer_request.productId", + "supportedValues": ["2324245", "5253642"] + } +} +``` + +
+ +--- + +### `deleteConfig` + +Delete Webhook Client Config + +`DELETE /v1/webhooks/configs/{configId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `configId` | path | string | Yes | Id of the config to de deleted. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot webhooks deleteConfig \ + -p configId=CustomerRequest +``` + +Using positional args for path parameters: + +```bash +epilot webhooks deleteConfig CustomerRequest +``` + +With JSONata filter: + +```bash +epilot webhooks deleteConfig -p configId=CustomerRequest --jsonata '$' +``` + +--- + +### `triggerWebhook` + +Trigger a webhook + +`POST /v1/webhooks/configs/{configId}/trigger` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `sync` | query | boolean | No | If set to true, the webhook will be triggered synchronously. Otherwise, it will be triggered asynchronously. | +| `configId` | path | string | Yes | Short uuid to identify the webhook configuration. | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot webhooks triggerWebhook \ + -p configId=7hj28aasgag2gha2 +``` + +With request body: + +```bash +epilot webhooks triggerWebhook \ + -p configId=7hj28aasgag2gha2 \ + -d '{ + "metadata": { + "action": "Manual triggered by user with id 123456", + "origin": "string", + "creation_timestamp": "string", + "webhook_id": "string", + "webhook_name": "string", + "automation_name": "string", + "organization_id": "string", + "user_id": "string", + "correlation_id": "string", + "execution_id": "string", + "action_id": "string" + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot webhooks triggerWebhook 7hj28aasgag2gha2 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot webhooks triggerWebhook -p configId=7hj28aasgag2gha2 +``` + +With JSONata filter: + +```bash +epilot webhooks triggerWebhook -p configId=7hj28aasgag2gha2 --jsonata 'status_code' +``` + +
+Sample Response + +```json +{ + "status_code": "string", + "message": "string", + "body": {}, + "code": "string", + "status": "succeeded", + "start_date": "string", + "end_date": "string", + "event_id": "string" +} +``` + +
+ +--- + +### `batchReplayEvents` + +Replay a batch of webhook events + +`POST /v1/webhooks/configs/{configId}/events/replay-batch` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `configId` | path | string | Yes | Short uuid to identify the webhook configuration. | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot webhooks batchReplayEvents \ + -p configId=7hj28aasgag2gha2 \ + -d '{"eventIds":["2f1b7cf8-ff55-4359-966f-e56f39a52c94","48c984bf-466b-470b-b743-d07cea168243"]}' +``` + +Using positional args for path parameters: + +```bash +epilot webhooks batchReplayEvents 7hj28aasgag2gha2 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot webhooks batchReplayEvents -p configId=7hj28aasgag2gha2 +``` + +With JSONata filter: + +```bash +epilot webhooks batchReplayEvents -p configId=7hj28aasgag2gha2 --jsonata '$' +``` + +--- + +### `getEventById` + +Get a webhook event by its id + +`GET /v1/webhooks/configs/{configId}/events/{eventId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `configId` | path | string | Yes | Short uuid to identify the webhook configuration. | +| `eventId` | path | string | Yes | Event id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot webhooks getEventById \ + -p configId=7hj28aasgag2gha2 \ + -p eventId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot webhooks getEventById 7hj28aasgag2gha2 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot webhooks getEventById -p configId=7hj28aasgag2gha2 -p eventId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'event_id' +``` + +
+Sample Response + +```json +{ + "event_id": "string", + "org_id": "string", + "webhook_config_id": "string", + "url": "string", + "created_at": "2021-04-27T12:01:13.000Z", + "event_name": "string", + "http_response": { + "status_code": 0, + "message": "string", + "body": {}, + "code": "string" + }, + "metadata": { + "action": "Manual triggered by user with id 123456", + "origin": "string", + "creation_timestamp": "string", + "webhook_id": "string", + "webhook_name": "string", + "automation_name": "string", + "organization_id": "string", + "user_id": "string", + "correlation_id": "string", + "execution_id": "string", + "action_id": "string" + }, + "status": "succeeded", + "http_method": "GET", + "payload": "string" +} +``` + +
+ +--- + +### `replayEvent` + +Replay a webhook event + +`POST /v1/webhooks/configs/{configId}/events/{eventId}/replay` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `configId` | path | string | Yes | Short uuid to identify the webhook configuration. | +| `eventId` | path | string | Yes | Event id | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot webhooks replayEvent \ + -p configId=7hj28aasgag2gha2 \ + -p eventId=123e4567-e89b-12d3-a456-426614174000 +``` + +Using positional args for path parameters: + +```bash +epilot webhooks replayEvent 7hj28aasgag2gha2 123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot webhooks replayEvent -p configId=7hj28aasgag2gha2 -p eventId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `getWebhookExample` + +Generate an example payload for a webhook configuration based on trigger type + +`POST /v1/webhooks/configs/{configId}/example` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `configId` | path | string | Yes | Short uuid to identify the webhook configuration. | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot webhooks getWebhookExample \ + -p configId=7hj28aasgag2gha2 \ + -d '{"automation_id":"automation_123"}' +``` + +Using positional args for path parameters: + +```bash +epilot webhooks getWebhookExample 7hj28aasgag2gha2 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot webhooks getWebhookExample -p configId=7hj28aasgag2gha2 +``` + +With JSONata filter: + +```bash +epilot webhooks getWebhookExample -p configId=7hj28aasgag2gha2 --jsonata 'entity._title' +``` + +
+Sample Response + +```json +{ + "metadata": { + "action": "Manual triggered by user with id 123456", + "origin": "string", + "creation_timestamp": "string", + "webhook_id": "string", + "webhook_name": "string", + "automation_name": "string", + "organization_id": "string", + "user_id": "string", + "correlation_id": "string", + "execution_id": "string", + "action_id": "string" + }, + "entity": {}, + "relations": [ + {} + ] +} +``` + +
+ +--- + +### `getWebhookEventsV2` + +List webhook events and filter them by status, timestamp, etc. + +`POST /v2/webhooks/configs/{configId}/events` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `configId` | path | string | Yes | Short uuid to identify the webhook configuration. | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot webhooks getWebhookEventsV2 \ + -p configId=7hj28aasgag2gha2 +``` + +With request body: + +```bash +epilot webhooks getWebhookEventsV2 \ + -p configId=7hj28aasgag2gha2 \ + -d '{ + "limit": 25, + "cursor": { + "created_at": "2025-10-31T12:34:56Z", + "event_id": "evt_1234567890abcdef" + }, + "timestamp": { + "from": "2025-10-01T00:00:00Z", + "to": "2025-10-31T23:59:59Z" + }, + "event_id": "evt_1234567890abcdef", + "status": "succeeded" +}' +``` + +Using positional args for path parameters: + +```bash +epilot webhooks getWebhookEventsV2 7hj28aasgag2gha2 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot webhooks getWebhookEventsV2 -p configId=7hj28aasgag2gha2 +``` + +With JSONata filter: + +```bash +epilot webhooks getWebhookEventsV2 -p configId=7hj28aasgag2gha2 --jsonata 'data' +``` + +
+Sample Response + +```json +{ + "data": [ + { + "event_id": "string", + "org_id": "string", + "webhook_config_id": "string", + "url": "string", + "created_at": "2021-04-27T12:01:13.000Z", + "event_name": "string", + "http_response": { + "status_code": 0, + "message": "string", + "body": {}, + "code": "string" + }, + "metadata": { + "action": "Manual triggered by user with id 123456", + "origin": "string", + "creation_timestamp": "string", + "webhook_id": "string", + "webhook_name": "string", + "automation_name": "string", + "organization_id": "string", + "user_id": "string", + "correlation_id": "string", + "execution_id": "string", + "action_id": "string" + }, + "status": "succeeded", + "http_method": "GET", + "payload": "string" + } + ], + "next_cursor": { + "created_at": "2025-10-31T12:34:56Z", + "event_id": "evt_1234567890abcdef" + }, + "has_more": true +} +``` + +
+ +--- + +## Deprecated Operations + +- ~~`getWehookEvents`~~ GET `/v1/webhooks/configs/{configId}/events` diff --git a/packages/cli/docs/workflow-definition.md b/packages/cli/docs/workflow-definition.md new file mode 100644 index 00000000..ba3f3428 --- /dev/null +++ b/packages/cli/docs/workflow-definition.md @@ -0,0 +1,2784 @@ +# Workflows Definitions + +- **Base URL:** `https://workflows-definition.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/workflow-definition](https://docs.epilot.io/api/workflow-definition) + +Service for Workflow Definitions for different processes inside of an Organization + +## Quick Start + +```bash +# List available operations +epilot workflow-definition + +# Call an operation +epilot workflow-definition getMaxAllowedLimit +``` + +## Operations + +**Workflows** +- [`getMaxAllowedLimit`](#getmaxallowedlimit) — Get limits and number of created executions for an Organization. +- [`getDefinitions`](#getdefinitions) — Retrieve all Workflow Definitions from an Organization +- [`createDefinition`](#createdefinition) — Create a Workflow Definition. +- [`getDefinition`](#getdefinition) — Get specific Definition by id from the Organization. +- [`updateDefinition`](#updatedefinition) — Update Workflow Definition. +- [`deleteDefinition`](#deletedefinition) — Delete Workflow Definition. +- [`getWorkflowClosingReasons`](#getworkflowclosingreasons) — Returns all closing reasons defined for the workflow. +- [`setWorkflowClosingReasons`](#setworkflowclosingreasons) — Sets which closing reasons are defined for this workflow, based on the entire closing reasons catalog. + +**Flows V2** +- [`listFlowTemplates`](#listflowtemplates) — List all Flow Templates for a customer. Optionally, you can filter flow templates by trigger values. +- [`createFlowTemplate`](#createflowtemplate) — Create a new Flow Template. +- [`searchFlowTemplates`](#searchflowtemplates) — Search for flow templates by name, trigger type, enabled status, and more. +- [`getFlowTemplate`](#getflowtemplate) — Get specific FLow template for a customer +- [`updateFlowTemplate`](#updateflowtemplate) — Update Flow Template. +- [`deleteFlowTemplate`](#deleteflowtemplate) — Delete Flow Template. +- [`duplicateFlowTemplate`](#duplicateflowtemplate) — Duplicate a Flow Template from an existing workflow. +- [`exportFlowTemplate`](#exportflowtemplate) — Export a Flow Template with all referenced automations resolved and bundled alongside. +- [`importFlowTemplate`](#importflowtemplate) — Import a Flow Template from an export payload. Creates all automations and the flow in the caller's organization. + +**Closing Reason** +- [`getAllClosingReasons`](#getallclosingreasons) — Get all Closing Reasons defined in the organization by default all Active. +- [`createClosingReason`](#createclosingreason) — A created Closing Reason is stored for the organization and will be displayed in the library of reasons. +- [`getClosingReason`](#getclosingreason) — Get specific closing reason by id from the organisation. +- [`updateClosingReason`](#updateclosingreason) — Update an existing closing reason +- [`deleteClosingReason`](#deleteclosingreason) — Permanently delete a closing reason (Using INACTIVE status is recommended instead) +- [`changeReasonStatus`](#changereasonstatus) — Change the status of a Closing Reason (eg. ACTIVE to INACTIVE). + +### `getMaxAllowedLimit` + +Get limits and number of created executions for an Organization. + +`GET /v1/workflows/limits/max-allowed` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition getMaxAllowedLimit +``` + +With JSONata filter: + +```bash +epilot workflow-definition getMaxAllowedLimit --jsonata 'currentNoOfWorkflows' +``` + +
+Sample Response + +```json +{ + "currentNoOfWorkflows": 0, + "maxAllowed": 0 +} +``` + +
+ +--- + +### `getDefinitions` + +Retrieve all Workflow Definitions from an Organization + +`GET /v1/workflows/definitions` + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition getDefinitions +``` + +With JSONata filter: + +```bash +epilot workflow-definition getDefinitions --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "string", + "name": "string", + "description": "string", + "creationTime": "2021-04-27T12:01:13.000Z", + "enabled": true, + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": { + "numberOfUnits": 0, + "timePeriod": "minutes", + "actionTypeCondition": "WORKFLOW_STARTED", + "stepId": "string", + "phaseId": "string" + }, + "userIds": [0], + "assignedTo": ["string"], + "enableECPWorkflow": true, + "flow": [ + {}, + {} + ], + "closingReasons": [ + {} + ], + "updateEntityAttributes": [ + {} + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true + } +] +``` + +
+ +--- + +### `createDefinition` + +Create a Workflow Definition. + +`POST /v1/workflows/definitions` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition createDefinition +``` + +With request body: + +```bash +epilot workflow-definition createDefinition \ + -d '{ + "id": "string", + "name": "string", + "description": "string", + "creationTime": "2021-04-27T12:01:13.000Z", + "enabled": true, + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": { + "numberOfUnits": 0, + "timePeriod": "minutes", + "actionTypeCondition": "WORKFLOW_STARTED", + "stepId": "string", + "phaseId": "string" + }, + "userIds": [0], + "assignedTo": ["string"], + "enableECPWorkflow": true, + "flow": [ + { + "id": "string", + "name": "string", + "order": 0, + "type": "STEP", + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": {}, + "assignedTo": ["string"], + "steps": [], + "taxonomies": ["string"] + }, + { + "id": "string", + "name": "string", + "description": {}, + "executionType": "MANUAL", + "automationConfig": {}, + "journey": {}, + "order": 0, + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": {}, + "userIds": [0], + "requirements": [], + "assignedTo": ["string"], + "type": "STEP", + "ecp": {}, + "installer": {}, + "taxonomies": ["string"] + } + ], + "closingReasons": [ + { + "id": "x739cew" + } + ], + "updateEntityAttributes": [ + { + "source": "workflow_status", + "target": {} + } + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow-definition createDefinition +``` + +With JSONata filter: + +```bash +epilot workflow-definition createDefinition --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "name": "string", + "description": "string", + "creationTime": "2021-04-27T12:01:13.000Z", + "enabled": true, + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": { + "numberOfUnits": 0, + "timePeriod": "minutes", + "actionTypeCondition": "WORKFLOW_STARTED", + "stepId": "string", + "phaseId": "string" + }, + "userIds": [0], + "assignedTo": ["string"], + "enableECPWorkflow": true, + "flow": [ + { + "id": "string", + "name": "string", + "order": 0, + "type": "STEP", + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": {}, + "assignedTo": ["string"], + "steps": [], + "taxonomies": ["string"] + }, + { + "id": "string", + "name": "string", + "description": {}, + "executionType": "MANUAL", + "automationConfig": {}, + "journey": {}, + "order": 0, + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": {}, + "userIds": [0], + "requirements": [], + "assignedTo": ["string"], + "type": "STEP", + "ecp": {}, + "installer": {}, + "taxonomies": ["string"] + } + ], + "closingReasons": [ + { + "id": "x739cew" + } + ], + "updateEntityAttributes": [ + { + "source": "workflow_status", + "target": {} + } + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true +} +``` + +
+ +--- + +### `listFlowTemplates` + +List all Flow Templates for a customer. Optionally, you can filter flow templates by trigger values. + +`GET /v2/flows/templates` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `trigger_type` | query | "automation" \| "manual" \| "journey_submission" | No | Type of trigger for whom to filter flow templates | +| `trigger_source_id` | query | string | No | Id of the trigger source to filter flow templates. Interpretation depends on **trigger_type**: +- **automation**: use an `{automation_flow_id}` value +- **journey_submission**: use a `{journey_id}` valu | +| `trigger_schema` | query | string | No | Schema of the trigger source to filter flow templates. This parameter only makes sense when **trigger_type** is `manual` + | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition listFlowTemplates +``` + +With JSONata filter: + +```bash +epilot workflow-definition listFlowTemplates --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "string", + "org_id": "string", + "name": "string", + "description": "string", + "trigger": {}, + "enabled": true, + "version": 2, + "created_at": "2021-04-27T12:01:13.000Z", + "updated_at": "2021-04-27T12:01:13.000Z", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "assigned_to": ["string"], + "available_in_ecp": true, + "additional_triggers": [], + "phases": [], + "tasks": [], + "edges": [], + "closing_reasons": [], + "entity_sync": [], + "taxonomies": ["string"], + "singleClosingReasonSelection": true + } + ] +} +``` + +
+ +--- + +### `createFlowTemplate` + +Create a new Flow Template. + +`POST /v2/flows/templates` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition createFlowTemplate +``` + +With request body: + +```bash +epilot workflow-definition createFlowTemplate \ + -d '{ + "id": "string", + "org_id": "string", + "name": "string", + "description": "string", + "trigger": { + "type": "automation", + "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" + }, + "enabled": true, + "version": 2, + "created_at": "2021-04-27T12:01:13.000Z", + "updated_at": "2021-04-27T12:01:13.000Z", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "assigned_to": ["string"], + "available_in_ecp": true, + "additional_triggers": [ + { + "id": "string", + "type": "manual", + "entity_schema": "string" + }, + { + "id": "string", + "type": "automation", + "automation_id": "string", + "trigger_config": [] + } + ], + "phases": [ + { + "id": "string", + "name": "string", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "assigned_to": ["string"], + "taxonomies": ["string"] + } + ], + "tasks": [ + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL" + }, + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "automation_config": {}, + "trigger_mode": "manual", + "schedule": {}, + "created_automatically": false + } + ], + "edges": [ + { + "id": "string", + "from_id": "string", + "to_id": "string", + "condition_id": "string", + "none_met": true + } + ], + "closing_reasons": [ + { + "id": "string", + "title": "string", + "status": "ACTIVE", + "lastUpdateTime": "string", + "creationTime": "string" + } + ], + "entity_sync": [ + { + "trigger": {}, + "target": {}, + "value": {} + } + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow-definition createFlowTemplate +``` + +With JSONata filter: + +```bash +epilot workflow-definition createFlowTemplate --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "org_id": "string", + "name": "string", + "description": "string", + "trigger": { + "type": "automation", + "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" + }, + "enabled": true, + "version": 2, + "created_at": "2021-04-27T12:01:13.000Z", + "updated_at": "2021-04-27T12:01:13.000Z", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "assigned_to": ["string"], + "available_in_ecp": true, + "additional_triggers": [ + { + "id": "string", + "type": "manual", + "entity_schema": "string" + }, + { + "id": "string", + "type": "automation", + "automation_id": "string", + "trigger_config": [] + } + ], + "phases": [ + { + "id": "string", + "name": "string", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "assigned_to": ["string"], + "taxonomies": ["string"] + } + ], + "tasks": [ + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL" + }, + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "automation_config": {}, + "trigger_mode": "manual", + "schedule": {}, + "created_automatically": false + } + ], + "edges": [ + { + "id": "string", + "from_id": "string", + "to_id": "string", + "condition_id": "string", + "none_met": true + } + ], + "closing_reasons": [ + { + "id": "string", + "title": "string", + "status": "ACTIVE", + "lastUpdateTime": "string", + "creationTime": "string" + } + ], + "entity_sync": [ + { + "trigger": {}, + "target": {}, + "value": {} + } + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true +} +``` + +
+ +--- + +### `searchFlowTemplates` + +Search for flow templates by name, trigger type, enabled status, and more. + +`POST /v2/flows/templates:search` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition searchFlowTemplates +``` + +With request body: + +```bash +epilot workflow-definition searchFlowTemplates \ + -d '{ + "name": "string", + "definition_id": "string", + "trigger_type": "journey_submission", + "enabled": true, + "from": 0, + "size": 0, + "sort_by": "updated_at", + "sort_order": "desc" +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow-definition searchFlowTemplates +``` + +With JSONata filter: + +```bash +epilot workflow-definition searchFlowTemplates --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "hits": 0, + "results": [ + { + "id": "string", + "org_id": "string", + "name": "string", + "description": "string", + "trigger": {}, + "enabled": true, + "version": 2, + "created_at": "2021-04-27T12:01:13.000Z", + "updated_at": "2021-04-27T12:01:13.000Z", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "assigned_to": ["string"], + "available_in_ecp": true, + "additional_triggers": [], + "phases": [], + "tasks": [], + "edges": [], + "closing_reasons": [], + "entity_sync": [], + "taxonomies": ["string"], + "singleClosingReasonSelection": true + } + ] +} +``` + +
+ +--- + +### `getFlowTemplate` + +Get specific FLow template for a customer + +`GET /v2/flows/templates/{flowId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `flowId` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition getFlowTemplate \ + -p flowId=7hj28akg +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition getFlowTemplate 7hj28akg +``` + +With JSONata filter: + +```bash +epilot workflow-definition getFlowTemplate -p flowId=7hj28akg --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "org_id": "string", + "name": "string", + "description": "string", + "trigger": { + "type": "automation", + "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" + }, + "enabled": true, + "version": 2, + "created_at": "2021-04-27T12:01:13.000Z", + "updated_at": "2021-04-27T12:01:13.000Z", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "assigned_to": ["string"], + "available_in_ecp": true, + "additional_triggers": [ + { + "id": "string", + "type": "manual", + "entity_schema": "string" + }, + { + "id": "string", + "type": "automation", + "automation_id": "string", + "trigger_config": [] + } + ], + "phases": [ + { + "id": "string", + "name": "string", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "assigned_to": ["string"], + "taxonomies": ["string"] + } + ], + "tasks": [ + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL" + }, + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "automation_config": {}, + "trigger_mode": "manual", + "schedule": {}, + "created_automatically": false + } + ], + "edges": [ + { + "id": "string", + "from_id": "string", + "to_id": "string", + "condition_id": "string", + "none_met": true + } + ], + "closing_reasons": [ + { + "id": "string", + "title": "string", + "status": "ACTIVE", + "lastUpdateTime": "string", + "creationTime": "string" + } + ], + "entity_sync": [ + { + "trigger": {}, + "target": {}, + "value": {} + } + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true +} +``` + +
+ +--- + +### `updateFlowTemplate` + +Update Flow Template. + +`PUT /v2/flows/templates/{flowId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `flowId` | path | string | Yes | | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition updateFlowTemplate \ + -p flowId=7hj28akg +``` + +With request body: + +```bash +epilot workflow-definition updateFlowTemplate \ + -p flowId=7hj28akg \ + -d '{ + "id": "string", + "org_id": "string", + "name": "string", + "description": "string", + "trigger": { + "type": "automation", + "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" + }, + "enabled": true, + "version": 2, + "created_at": "2021-04-27T12:01:13.000Z", + "updated_at": "2021-04-27T12:01:13.000Z", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "assigned_to": ["string"], + "available_in_ecp": true, + "additional_triggers": [ + { + "id": "string", + "type": "manual", + "entity_schema": "string" + }, + { + "id": "string", + "type": "automation", + "automation_id": "string", + "trigger_config": [] + } + ], + "phases": [ + { + "id": "string", + "name": "string", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "assigned_to": ["string"], + "taxonomies": ["string"] + } + ], + "tasks": [ + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL" + }, + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "automation_config": {}, + "trigger_mode": "manual", + "schedule": {}, + "created_automatically": false + } + ], + "edges": [ + { + "id": "string", + "from_id": "string", + "to_id": "string", + "condition_id": "string", + "none_met": true + } + ], + "closing_reasons": [ + { + "id": "string", + "title": "string", + "status": "ACTIVE", + "lastUpdateTime": "string", + "creationTime": "string" + } + ], + "entity_sync": [ + { + "trigger": {}, + "target": {}, + "value": {} + } + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true +}' +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition updateFlowTemplate 7hj28akg +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow-definition updateFlowTemplate -p flowId=7hj28akg +``` + +With JSONata filter: + +```bash +epilot workflow-definition updateFlowTemplate -p flowId=7hj28akg --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "org_id": "string", + "name": "string", + "description": "string", + "trigger": { + "type": "automation", + "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" + }, + "enabled": true, + "version": 2, + "created_at": "2021-04-27T12:01:13.000Z", + "updated_at": "2021-04-27T12:01:13.000Z", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "assigned_to": ["string"], + "available_in_ecp": true, + "additional_triggers": [ + { + "id": "string", + "type": "manual", + "entity_schema": "string" + }, + { + "id": "string", + "type": "automation", + "automation_id": "string", + "trigger_config": [] + } + ], + "phases": [ + { + "id": "string", + "name": "string", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "assigned_to": ["string"], + "taxonomies": ["string"] + } + ], + "tasks": [ + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL" + }, + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "automation_config": {}, + "trigger_mode": "manual", + "schedule": {}, + "created_automatically": false + } + ], + "edges": [ + { + "id": "string", + "from_id": "string", + "to_id": "string", + "condition_id": "string", + "none_met": true + } + ], + "closing_reasons": [ + { + "id": "string", + "title": "string", + "status": "ACTIVE", + "lastUpdateTime": "string", + "creationTime": "string" + } + ], + "entity_sync": [ + { + "trigger": {}, + "target": {}, + "value": {} + } + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true +} +``` + +
+ +--- + +### `deleteFlowTemplate` + +Delete Flow Template. + +`DELETE /v2/flows/templates/{flowId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `flowId` | path | string | Yes | Id of the flow template to de deleted. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition deleteFlowTemplate \ + -p flowId=7hj28akg +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition deleteFlowTemplate 7hj28akg +``` + +With JSONata filter: + +```bash +epilot workflow-definition deleteFlowTemplate -p flowId=7hj28akg --jsonata '$' +``` + +--- + +### `duplicateFlowTemplate` + +Duplicate a Flow Template from an existing workflow. + +`POST /v2/flows/templates/{flowId}/duplicate` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `flowId` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition duplicateFlowTemplate \ + -p flowId=7hj28akg +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition duplicateFlowTemplate 7hj28akg +``` + +With JSONata filter: + +```bash +epilot workflow-definition duplicateFlowTemplate -p flowId=7hj28akg --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "org_id": "string", + "name": "string", + "description": "string", + "trigger": { + "type": "automation", + "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" + }, + "enabled": true, + "version": 2, + "created_at": "2021-04-27T12:01:13.000Z", + "updated_at": "2021-04-27T12:01:13.000Z", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "assigned_to": ["string"], + "available_in_ecp": true, + "additional_triggers": [ + { + "id": "string", + "type": "manual", + "entity_schema": "string" + }, + { + "id": "string", + "type": "automation", + "automation_id": "string", + "trigger_config": [] + } + ], + "phases": [ + { + "id": "string", + "name": "string", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "assigned_to": ["string"], + "taxonomies": ["string"] + } + ], + "tasks": [ + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL" + }, + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "automation_config": {}, + "trigger_mode": "manual", + "schedule": {}, + "created_automatically": false + } + ], + "edges": [ + { + "id": "string", + "from_id": "string", + "to_id": "string", + "condition_id": "string", + "none_met": true + } + ], + "closing_reasons": [ + { + "id": "string", + "title": "string", + "status": "ACTIVE", + "lastUpdateTime": "string", + "creationTime": "string" + } + ], + "entity_sync": [ + { + "trigger": {}, + "target": {}, + "value": {} + } + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true +} +``` + +
+ +--- + +### `exportFlowTemplate` + +Export a Flow Template with all referenced automations resolved and bundled alongside. + +`GET /v2/flows/templates/{flowId}/export` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `flowId` | path | string | Yes | | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition exportFlowTemplate \ + -p flowId=7hj28akg +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition exportFlowTemplate 7hj28akg +``` + +With JSONata filter: + +```bash +epilot workflow-definition exportFlowTemplate -p flowId=7hj28akg --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "org_id": "string", + "name": "string", + "description": "string", + "trigger": { + "type": "automation", + "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" + }, + "enabled": true, + "version": 2, + "created_at": "2021-04-27T12:01:13.000Z", + "updated_at": "2021-04-27T12:01:13.000Z", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "assigned_to": ["string"], + "available_in_ecp": true, + "additional_triggers": [ + { + "id": "string", + "type": "manual", + "entity_schema": "string" + }, + { + "id": "string", + "type": "automation", + "automation_id": "string", + "trigger_config": [] + } + ], + "phases": [ + { + "id": "string", + "name": "string", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "assigned_to": ["string"], + "taxonomies": ["string"] + } + ], + "tasks": [ + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL" + }, + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "automation_config": {}, + "trigger_mode": "manual", + "schedule": {}, + "created_automatically": false + } + ], + "edges": [ + { + "id": "string", + "from_id": "string", + "to_id": "string", + "condition_id": "string", + "none_met": true + } + ], + "closing_reasons": [ + { + "id": "string", + "title": "string", + "status": "ACTIVE", + "lastUpdateTime": "string", + "creationTime": "string" + } + ], + "entity_sync": [ + { + "trigger": {}, + "target": {}, + "value": {} + } + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true, + "_resolved_automations": {} +} +``` + +
+ +--- + +### `importFlowTemplate` + +Import a Flow Template from an export payload. Creates all automations and the flow in the caller's organization. + +`POST /v2/flows/templates/import` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition importFlowTemplate +``` + +With request body: + +```bash +epilot workflow-definition importFlowTemplate \ + -d '{ + "id": "string", + "org_id": "string", + "name": "string", + "description": "string", + "trigger": { + "type": "automation", + "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" + }, + "enabled": true, + "version": 2, + "created_at": "2021-04-27T12:01:13.000Z", + "updated_at": "2021-04-27T12:01:13.000Z", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "assigned_to": ["string"], + "available_in_ecp": true, + "additional_triggers": [ + { + "id": "string", + "type": "manual", + "entity_schema": "string" + }, + { + "id": "string", + "type": "automation", + "automation_id": "string", + "trigger_config": [] + } + ], + "phases": [ + { + "id": "string", + "name": "string", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "assigned_to": ["string"], + "taxonomies": ["string"] + } + ], + "tasks": [ + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL" + }, + { + "id": "string", + "name": "string", + "description": {}, + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "automation_config": {}, + "trigger_mode": "manual", + "schedule": {}, + "created_automatically": false + } + ], + "edges": [ + { + "id": "string", + "from_id": "string", + "to_id": "string", + "condition_id": "string", + "none_met": true + } + ], + "closing_reasons": [ + { + "id": "string", + "title": "string", + "status": "ACTIVE", + "lastUpdateTime": "string", + "creationTime": "string" + } + ], + "entity_sync": [ + { + "trigger": {}, + "target": {}, + "value": {} + } + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true, + "_resolved_automations": {} +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow-definition importFlowTemplate +``` + +With JSONata filter: + +```bash +epilot workflow-definition importFlowTemplate --jsonata 'flow' +``` + +
+Sample Response + +```json +{ + "flow": { + "id": "string", + "org_id": "string", + "name": "string", + "description": "string", + "trigger": { + "type": "automation", + "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" + }, + "enabled": true, + "version": 2, + "created_at": "2021-04-27T12:01:13.000Z", + "updated_at": "2021-04-27T12:01:13.000Z", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "assigned_to": ["string"], + "available_in_ecp": true, + "additional_triggers": [ + {}, + {} + ], + "phases": [ + {} + ], + "tasks": [ + {}, + {} + ], + "edges": [ + {} + ], + "closing_reasons": [ + {} + ], + "entity_sync": [ + {} + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true + }, + "_id_mappings": { + "flow_id": { + "old": "string", + "new": "string" + }, + "task_ids": {}, + "automation_ids": {} + } +} +``` + +
+ +--- + +### `getDefinition` + +Get specific Definition by id from the Organization. + +`GET /v1/workflows/definitions/{definitionId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `definitionId` | path | string | Yes | Short uuid (length 8) to identify the Workflow Definition. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition getDefinition \ + -p definitionId=7hj28a +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition getDefinition 7hj28a +``` + +With JSONata filter: + +```bash +epilot workflow-definition getDefinition -p definitionId=7hj28a --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "name": "string", + "description": "string", + "creationTime": "2021-04-27T12:01:13.000Z", + "enabled": true, + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": { + "numberOfUnits": 0, + "timePeriod": "minutes", + "actionTypeCondition": "WORKFLOW_STARTED", + "stepId": "string", + "phaseId": "string" + }, + "userIds": [0], + "assignedTo": ["string"], + "enableECPWorkflow": true, + "flow": [ + { + "id": "string", + "name": "string", + "order": 0, + "type": "STEP", + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": {}, + "assignedTo": ["string"], + "steps": [], + "taxonomies": ["string"] + }, + { + "id": "string", + "name": "string", + "description": {}, + "executionType": "MANUAL", + "automationConfig": {}, + "journey": {}, + "order": 0, + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": {}, + "userIds": [0], + "requirements": [], + "assignedTo": ["string"], + "type": "STEP", + "ecp": {}, + "installer": {}, + "taxonomies": ["string"] + } + ], + "closingReasons": [ + { + "id": "x739cew" + } + ], + "updateEntityAttributes": [ + { + "source": "workflow_status", + "target": {} + } + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true +} +``` + +
+ +--- + +### `updateDefinition` + +Update Workflow Definition. + +`PUT /v1/workflows/definitions/{definitionId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `definitionId` | path | string | Yes | Short uuid (length 8) to identify the Workflow Definition. | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition updateDefinition \ + -p definitionId=7hj28a +``` + +With request body: + +```bash +epilot workflow-definition updateDefinition \ + -p definitionId=7hj28a \ + -d '{ + "id": "string", + "name": "string", + "description": "string", + "creationTime": "2021-04-27T12:01:13.000Z", + "enabled": true, + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": { + "numberOfUnits": 0, + "timePeriod": "minutes", + "actionTypeCondition": "WORKFLOW_STARTED", + "stepId": "string", + "phaseId": "string" + }, + "userIds": [0], + "assignedTo": ["string"], + "enableECPWorkflow": true, + "flow": [ + { + "id": "string", + "name": "string", + "order": 0, + "type": "STEP", + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": {}, + "assignedTo": ["string"], + "steps": [], + "taxonomies": ["string"] + }, + { + "id": "string", + "name": "string", + "description": {}, + "executionType": "MANUAL", + "automationConfig": {}, + "journey": {}, + "order": 0, + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": {}, + "userIds": [0], + "requirements": [], + "assignedTo": ["string"], + "type": "STEP", + "ecp": {}, + "installer": {}, + "taxonomies": ["string"] + } + ], + "closingReasons": [ + { + "id": "x739cew" + } + ], + "updateEntityAttributes": [ + { + "source": "workflow_status", + "target": {} + } + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true +}' +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition updateDefinition 7hj28a +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow-definition updateDefinition -p definitionId=7hj28a +``` + +With JSONata filter: + +```bash +epilot workflow-definition updateDefinition -p definitionId=7hj28a --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "name": "string", + "description": "string", + "creationTime": "2021-04-27T12:01:13.000Z", + "enabled": true, + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": { + "numberOfUnits": 0, + "timePeriod": "minutes", + "actionTypeCondition": "WORKFLOW_STARTED", + "stepId": "string", + "phaseId": "string" + }, + "userIds": [0], + "assignedTo": ["string"], + "enableECPWorkflow": true, + "flow": [ + { + "id": "string", + "name": "string", + "order": 0, + "type": "STEP", + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": {}, + "assignedTo": ["string"], + "steps": [], + "taxonomies": ["string"] + }, + { + "id": "string", + "name": "string", + "description": {}, + "executionType": "MANUAL", + "automationConfig": {}, + "journey": {}, + "order": 0, + "dueDate": "2021-04-27T12:00:00.000Z", + "dynamicDueDate": {}, + "userIds": [0], + "requirements": [], + "assignedTo": ["string"], + "type": "STEP", + "ecp": {}, + "installer": {}, + "taxonomies": ["string"] + } + ], + "closingReasons": [ + { + "id": "x739cew" + } + ], + "updateEntityAttributes": [ + { + "source": "workflow_status", + "target": {} + } + ], + "taxonomies": ["string"], + "singleClosingReasonSelection": true +} +``` + +
+ +--- + +### `deleteDefinition` + +Delete Workflow Definition. + +`DELETE /v1/workflows/definitions/{definitionId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `definitionId` | path | string | Yes | Id of the definition to de deleted. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition deleteDefinition \ + -p definitionId=CustomerRequest +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition deleteDefinition CustomerRequest +``` + +With JSONata filter: + +```bash +epilot workflow-definition deleteDefinition -p definitionId=CustomerRequest --jsonata '$' +``` + +--- + +### `getAllClosingReasons` + +Get all Closing Reasons defined in the organization by default all Active. + +`GET /v1/workflows/closing-reasons` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `includeInactive` | query | boolean | No | Filter Closing Reasons by status like active inactiv | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition getAllClosingReasons +``` + +With JSONata filter: + +```bash +epilot workflow-definition getAllClosingReasons --jsonata 'reasons' +``` + +
+Sample Response + +```json +{ + "reasons": [ + { + "id": "string", + "title": "string", + "status": "ACTIVE", + "lastUpdateTime": "string", + "creationTime": "string" + } + ] +} +``` + +
+ +--- + +### `createClosingReason` + +A created Closing Reason is stored for the organization and will be displayed in the library of reasons. + +`POST /v1/workflows/closing-reasons` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition createClosingReason \ + -d '{"id":"string","title":"string","status":"ACTIVE","lastUpdateTime":"string","creationTime":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow-definition createClosingReason +``` + +With JSONata filter: + +```bash +epilot workflow-definition createClosingReason --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "title": "string", + "status": "ACTIVE", + "lastUpdateTime": "string", + "creationTime": "string" +} +``` + +
+ +--- + +### `getClosingReason` + +Get specific closing reason by id from the organisation. + +`GET /v2/workflows/closing-reasons/{reasonId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `reasonId` | path | string | Yes | unique id to identify the closing reason. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition getClosingReason \ + -p reasonId=x739cew +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition getClosingReason x739cew +``` + +With JSONata filter: + +```bash +epilot workflow-definition getClosingReason -p reasonId=x739cew --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "title": "string", + "status": "ACTIVE", + "lastUpdateTime": "string", + "creationTime": "string" +} +``` + +
+ +--- + +### `updateClosingReason` + +Update an existing closing reason + +`PATCH /v2/workflows/closing-reasons/{reasonId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `reasonId` | path | string | Yes | unique id to identify the closing reason. | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition updateClosingReason \ + -p reasonId=x739cew \ + -d '{"id":"string","title":"string","status":"ACTIVE","lastUpdateTime":"string","creationTime":"string"}' +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition updateClosingReason x739cew +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow-definition updateClosingReason -p reasonId=x739cew +``` + +With JSONata filter: + +```bash +epilot workflow-definition updateClosingReason -p reasonId=x739cew --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "title": "string", + "status": "ACTIVE", + "lastUpdateTime": "string", + "creationTime": "string" +} +``` + +
+ +--- + +### `deleteClosingReason` + +Permanently delete a closing reason (Using INACTIVE status is recommended instead) + +`DELETE /v2/workflows/closing-reasons/{reasonId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `reasonId` | path | string | Yes | unique id to identify the closing reason. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition deleteClosingReason \ + -p reasonId=x739cew +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition deleteClosingReason x739cew +``` + +With JSONata filter: + +```bash +epilot workflow-definition deleteClosingReason -p reasonId=x739cew --jsonata '$' +``` + +--- + +### `changeReasonStatus` + +Change the status of a Closing Reason (eg. ACTIVE to INACTIVE). + +`PATCH /v1/workflows/closing-reasons/{reasonId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `reasonId` | path | string | Yes | | + +**Request Body** + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition changeReasonStatus \ + -p reasonId=123e4567-e89b-12d3-a456-426614174000 \ + -d '{"status":"ACTIVE"}' +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition changeReasonStatus 123e4567-e89b-12d3-a456-426614174000 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow-definition changeReasonStatus -p reasonId=123e4567-e89b-12d3-a456-426614174000 +``` + +With JSONata filter: + +```bash +epilot workflow-definition changeReasonStatus -p reasonId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$' +``` + +--- + +### `getWorkflowClosingReasons` + +Returns all closing reasons defined for the workflow. + +`GET /v1/workflows/definitions/{definitionId}/closing-reasons` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `definitionId` | path | string | Yes | ID of a workflow definition | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition getWorkflowClosingReasons \ + -p definitionId=fxcwfw +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition getWorkflowClosingReasons fxcwfw +``` + +With JSONata filter: + +```bash +epilot workflow-definition getWorkflowClosingReasons -p definitionId=fxcwfw --jsonata 'reasons' +``` + +
+Sample Response + +```json +{ + "reasons": [ + { + "id": "x739cew" + } + ] +} +``` + +
+ +--- + +### `setWorkflowClosingReasons` + +Sets which closing reasons are defined for this workflow, based on the entire closing reasons catalog. + +`PATCH /v1/workflows/definitions/{definitionId}/closing-reasons` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `definitionId` | path | string | Yes | ID of a workflow definition | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow-definition setWorkflowClosingReasons \ + -p definitionId=7889 \ + -d '{"reasons":[{"id":"x739cew"}]}' +``` + +Using positional args for path parameters: + +```bash +epilot workflow-definition setWorkflowClosingReasons 7889 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow-definition setWorkflowClosingReasons -p definitionId=7889 +``` + +With JSONata filter: + +```bash +epilot workflow-definition setWorkflowClosingReasons -p definitionId=7889 --jsonata '$' +``` + +--- + +## Deprecated Operations + +- ~~`getClosingReasonV1`~~ GET `/v1/workflows/closing-reasons/{reasonId}` diff --git a/packages/cli/docs/workflow.md b/packages/cli/docs/workflow.md new file mode 100644 index 00000000..f9630636 --- /dev/null +++ b/packages/cli/docs/workflow.md @@ -0,0 +1,2530 @@ +# Workflows Executions + +- **Base URL:** `https://workflows-execution.sls.epilot.io` +- **API Docs:** [https://docs.epilot.io/api/workflow](https://docs.epilot.io/api/workflow) + +Service for Workflow Executions which covers executions of processes defined in an Organization + +## Quick Start + +```bash +# List available operations +epilot workflow + +# Call an operation +epilot workflow getExecutions +``` + +## Operations + +**Workflow Executions** +- [`getExecutions`](#getexecutions) — Retrieve Workflow Executions. Optionally, you can filter them by context & schema. Please be aware, these executions are +- [`createExecution`](#createexecution) — Create a Workflow Execution. Start a new workflow execution, based on a workflow definition (template). +- [`getExecution`](#getexecution) — Get a full workflow execution, included steps information, by execution id. +- [`updateExecution`](#updateexecution) — Patches updates like assignees, status, closingReason for a single Workflow Execution. +- [`deleteExecution`](#deleteexecution) — Delete workflow execution by id. Workflow contexts will NOT be deleted. + +**Workflow Steps** +- [`createStep`](#createstep) — Create a new step in current workflow execution. +- [`updateStep`](#updatestep) — Patches various changes to a workflow execution step. +- [`deleteStep`](#deletestep) — Deletes a step from a workflow execution. + +**Closing Reasons** +- [`getClosingReasonExecution`](#getclosingreasonexecution) — Shows all Closing Reasons defined at the moment of starting the Workflow Execution. + +**Flows V2** +- [`startFlowExecution`](#startflowexecution) — Starts a new Flow Execution based on a flow template. +- [`getFlowExecution`](#getflowexecution) — Get a full flow execution, included tasks, phases, edges & analytics. +- [`patchFlowExecution`](#patchflowexecution) — Patch flow execution with new assignees, status, analytics & other changes. +- [`deleteFlowExecution`](#deleteflowexecution) — Deletes a specific execution of a flow, identified by id. Flow contexts will NOT be deleted. +- [`searchFlowExecutions`](#searchflowexecutions) — Search Flow Executions for a specific Entity. +- [`patchTask`](#patchtask) — Changes various attributes of a flow task, like assignees, status, due date, etc. +- [`runTaskAutomation`](#runtaskautomation) — Runs configured automation for a flow task +- [`executeTask`](#executetask) — Executes any kind of flow task immediately. +- [`patchPhase`](#patchphase) — Apply updates to a phase within flow execution +- [`addTask`](#addtask) — Create a new task in current workflow execution. +- [`cancelTaskSchedule`](#canceltaskschedule) — Cancels a scheduled task, deleting the schedule and marking the task as skipped. + +### `getExecutions` + +Retrieve Workflow Executions. Optionally, you can filter them by context & schema. Please be aware, these executions are + +`GET /v1/workflows/executions` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `context` | query | string | No | Id of an Entity | +| `schema` | query | string | No | Schema of an Entity | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow getExecutions +``` + +With JSONata filter: + +```bash +epilot workflow getExecutions --jsonata '$' +``` + +
+Sample Response + +```json +[ + { + "id": "8gja72h6kas6h", + "name": "Lead Qualification", + "trigger": "MANUAL", + "status": "STARTED", + "creationTime": "2021-04-27T12:01:13.000Z", + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:01:13.000Z", + "flow": [ + { + "id": "sectionId1", + "definitionId": "section_definition_id_1", + "name": "Initial Information Gathering", + "type": "SECTION", + "steps": [ + { + "id": "sada5641f3a21", + "definitionId": "step_definition_id_1", + "name": "Call client" + }, + { + "id": "sada5641f3a22", + "definitionId": "step_definition_id_2", + "name": "Check product availability" + } + ] + }, + { + "id": "firstLevelStepId1", + "definitionId": "step_definition_id_4", + "name": "Print and send catalog", + "type": "STEP" + } + ] + } +] +``` + +
+ +--- + +### `createExecution` + +Create a Workflow Execution. Start a new workflow execution, based on a workflow definition (template). + +`POST /v1/workflows/executions` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow createExecution +``` + +With request body: + +```bash +epilot workflow createExecution \ + -d '{ + "workflowId": "j3f23fh23uif98", + "trigger": "AUTOMATIC", + "contexts": [ + { + "id": "3fa3fa86-0907-4642-a57e-0fe30a19874d", + "schema": "contact" + }, + { + "id": "3a6d42fa-5070-4723-b90f-41ead4303e33", + "schema": "opportunity" + } + ] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow createExecution +``` + +With JSONata filter: + +```bash +epilot workflow createExecution --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "8gja72h6kas6h", + "name": "Lead Qualification", + "trigger": "MANUAL", + "status": "STARTED", + "creationTime": "2021-04-27T12:01:13.000Z", + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:01:13.000Z", + "assignedTo": ["252", "29052"], + "flow": [ + { + "id": "sectionId1", + "name": "Initial Information Gathering", + "steps": [ + { + "id": "sada5641f3a21", + "name": "Call client and confirm address and product", + "definitionId": "step_definition_id_1", + "status": "ASSIGNED", + "assignedTo": ["11"] + }, + { + "id": "sada5641f3a22", + "name": "Check product availability", + "status": "UNASSIGNED", + "definitionId": "step_definition_id_2" + } + ] + }, + { + "id": "firstLevelStepId1", + "definitionId": "step_definition_id_4", + "name": "Print and send catalog", + "status": "SKIPPED", + "dueDate": "2023-01-15T20:00:00" + } + ] +} +``` + +
+ +--- + +### `getExecution` + +Get a full workflow execution, included steps information, by execution id. + +`GET /v1/workflows/executions/{executionId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `executionId` | path | string | Yes | Id of the execution | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow getExecution \ + -p executionId=wd561 +``` + +Using positional args for path parameters: + +```bash +epilot workflow getExecution wd561 +``` + +With JSONata filter: + +```bash +epilot workflow getExecution -p executionId=wd561 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "8gja72h6kas6h", + "name": "Lead Qualification", + "trigger": "MANUAL", + "status": "STARTED", + "creationTime": "2021-04-27T12:01:13.000Z", + "lastUpdateTime": "2021-04-27T12:01:13.000Z", + "dueDate": "2021-04-27T12:01:13.000Z", + "assignedTo": ["252", "29052"], + "flow": [ + { + "id": "sectionId1", + "name": "Initial Information Gathering", + "steps": [ + { + "id": "sada5641f3a21", + "name": "Call client and confirm address and product", + "definitionId": "step_definition_id_1", + "status": "ASSIGNED", + "assignedTo": ["11"] + }, + { + "id": "sada5641f3a22", + "name": "Check product availability", + "status": "UNASSIGNED", + "definitionId": "step_definition_id_2" + } + ] + }, + { + "id": "firstLevelStepId1", + "definitionId": "step_definition_id_4", + "name": "Print and send catalog", + "status": "SKIPPED", + "dueDate": "2023-01-15T20:00:00" + } + ] +} +``` + +
+ +--- + +### `updateExecution` + +Patches updates like assignees, status, closingReason for a single Workflow Execution. + +`PATCH /v1/workflows/executions/{executionId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `executionId` | path | string | Yes | Id of the execution | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow updateExecution \ + -p executionId=wd561 +``` + +With request body: + +```bash +epilot workflow updateExecution \ + -p executionId=wd561 \ + -d '{ + "status": "STARTED", + "assignedTo": ["string"], + "selectedClosingReasons": [ + { + "id": "string", + "title": "string" + } + ], + "closingReasonDescription": "string", + "dueDate": "string", + "dynamicDueDate": { + "numberOfUnits": 0, + "timePeriod": "minutes", + "actionTypeCondition": "WORKFLOW_STARTED", + "stepId": "string", + "phaseId": "string" + }, + "closedBy": "string", + "contexts": [ + { + "id": "string", + "title": "string", + "schema": "string" + } + ], + "completedTime": "string" +}' +``` + +Using positional args for path parameters: + +```bash +epilot workflow updateExecution wd561 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow updateExecution -p executionId=wd561 +``` + +With JSONata filter: + +```bash +epilot workflow updateExecution -p executionId=wd561 --jsonata '$' +``` + +--- + +### `deleteExecution` + +Delete workflow execution by id. Workflow contexts will NOT be deleted. + +`DELETE /v1/workflows/executions/{executionId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `executionId` | path | string | Yes | Id of the execution to de deleted. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow deleteExecution \ + -p executionId=CustomerRequest +``` + +Using positional args for path parameters: + +```bash +epilot workflow deleteExecution CustomerRequest +``` + +With JSONata filter: + +```bash +epilot workflow deleteExecution -p executionId=CustomerRequest --jsonata '$' +``` + +--- + +### `createStep` + +Create a new step in current workflow execution. + +`POST /v1/workflows/executions/{executionId}/steps` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `executionId` | path | string | Yes | Id of the execution | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow createStep \ + -p executionId=wd56125gah +``` + +With request body: + +```bash +epilot workflow createStep \ + -p executionId=wd56125gah \ + -d '{ + "insertionIndex": 0, + "name": "string", + "description": { + "enabled": true, + "value": "string" + }, + "status": "UNASSIGNED", + "sectionId": "string", + "executionType": "MANUAL", + "automationConfig": { + "flowId": "string", + "executionId": "string", + "executionStatus": "string" + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot workflow createStep wd56125gah +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow createStep -p executionId=wd56125gah +``` + +With JSONata filter: + +```bash +epilot workflow createStep -p executionId=wd56125gah --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "definitionId": "string", + "entityRefId": "string", + "name": "string", + "description": { + "enabled": true, + "value": "string" + }, + "type": "STEP", + "ecp": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "installer": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "enabled": true, + "requirements": [ + { + "definitionId": "string", + "type": "STEP", + "condition": "CLOSED" + } + ], + "executionType": "MANUAL", + "sectionId": "string", + "executionId": "string", + "userIds": [0], + "assignedTo": ["string"], + "assignedToInProgress": "string", + "status": "UNASSIGNED", + "created": "string", + "lastUpdated": "string", + "statusLastUpdated": "string", + "startedTime": "string", + "completedTime": "string", + "dueDate": "string", + "dynamicDueDate": { + "numberOfUnits": 0, + "timePeriod": "minutes", + "actionTypeCondition": "WORKFLOW_STARTED", + "stepId": "string", + "phaseId": "string" + }, + "manuallyCreated": true, + "automationConfig": { + "flowId": "string", + "executionId": "string", + "executionStatus": "string" + }, + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + }, + "taxonomies": ["string"] +} +``` + +
+ +--- + +### `updateStep` + +Patches various changes to a workflow execution step. + +`PATCH /v1/workflows/executions/{executionId}/steps/{stepId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `executionId` | path | string | Yes | Id of the execution | +| `stepId` | path | string | Yes | Short uuid (length 6) to identify the Workflow Execution Step. | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow updateStep \ + -p executionId=wd56125gah \ + -p stepId=7hj28a +``` + +With request body: + +```bash +epilot workflow updateStep \ + -p executionId=wd56125gah \ + -p stepId=7hj28a \ + -d '{ + "stepId": "string", + "entityRefId": "string", + "userIds": [0], + "assignedTo": ["string"], + "assignedToInProgress": "string", + "status": "UNASSIGNED", + "dueDate": "string", + "dynamicDueDate": { + "numberOfUnits": 0, + "timePeriod": "minutes", + "actionTypeCondition": "WORKFLOW_STARTED", + "stepId": "string", + "phaseId": "string" + }, + "name": "string", + "description": { + "enabled": true, + "value": "string" + }, + "position": { + "index": 0, + "sectionId": "string" + }, + "automationConfig": { + "flowId": "string", + "executionId": "string", + "executionStatus": "string" + }, + "startedTime": "string", + "completedTime": "string" +}' +``` + +Using positional args for path parameters: + +```bash +epilot workflow updateStep wd56125gah 7hj28a +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow updateStep -p executionId=wd56125gah -p stepId=7hj28a +``` + +With JSONata filter: + +```bash +epilot workflow updateStep -p executionId=wd56125gah -p stepId=7hj28a --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "definitionId": "string", + "entityRefId": "string", + "name": "string", + "description": { + "enabled": true, + "value": "string" + }, + "type": "STEP", + "ecp": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "installer": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "enabled": true, + "requirements": [ + { + "definitionId": "string", + "type": "STEP", + "condition": "CLOSED" + } + ], + "executionType": "MANUAL", + "sectionId": "string", + "executionId": "string", + "userIds": [0], + "assignedTo": ["string"], + "assignedToInProgress": "string", + "status": "UNASSIGNED", + "created": "string", + "lastUpdated": "string", + "statusLastUpdated": "string", + "startedTime": "string", + "completedTime": "string", + "dueDate": "string", + "dynamicDueDate": { + "numberOfUnits": 0, + "timePeriod": "minutes", + "actionTypeCondition": "WORKFLOW_STARTED", + "stepId": "string", + "phaseId": "string" + }, + "manuallyCreated": true, + "automationConfig": { + "flowId": "string", + "executionId": "string", + "executionStatus": "string" + }, + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + }, + "taxonomies": ["string"] +} +``` + +
+ +--- + +### `deleteStep` + +Deletes a step from a workflow execution. + +`DELETE /v1/workflows/executions/{executionId}/steps/{stepId}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `executionId` | path | string | Yes | Id of the execution | +| `stepId` | path | string | Yes | Short uuid (length 6) to identify the Workflow Execution Step. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow deleteStep \ + -p executionId=wd56125gah \ + -p stepId=7hj28a +``` + +Using positional args for path parameters: + +```bash +epilot workflow deleteStep wd56125gah 7hj28a +``` + +With JSONata filter: + +```bash +epilot workflow deleteStep -p executionId=wd56125gah -p stepId=7hj28a --jsonata '$' +``` + +--- + +### `getClosingReasonExecution` + +Shows all Closing Reasons defined at the moment of starting the Workflow Execution. + +`GET /v1/workflows/executions/{executionId}/closing-reasons` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `executionId` | path | string | Yes | Id of the execution | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow getClosingReasonExecution \ + -p executionId=wd561 +``` + +Using positional args for path parameters: + +```bash +epilot workflow getClosingReasonExecution wd561 +``` + +With JSONata filter: + +```bash +epilot workflow getClosingReasonExecution -p executionId=wd561 --jsonata 'reasons' +``` + +
+Sample Response + +```json +{ + "reasons": [ + { + "id": "string", + "title": "string" + } + ] +} +``` + +
+ +--- + +### `startFlowExecution` + +Starts a new Flow Execution based on a flow template. + +`POST /v2/flows/executions` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow startFlowExecution +``` + +With request body: + +```bash +epilot workflow startFlowExecution \ + -d '{ + "flow_template_id": "string", + "trigger": { + "type": "MANUAL", + "automation_config": { + "flow_id": "string", + "execution_id": "string", + "execution_status": "string", + "error_reason": "string" + } + }, + "contexts": [ + { + "entity_id": "string", + "entity_schema": "string", + "is_primary": false + } + ], + "purposes": ["string"] +}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow startFlowExecution +``` + +With JSONata filter: + +```bash +epilot workflow startFlowExecution --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "flow_template_id": "string", + "org_id": "string", + "name": "string", + "created_at": "string", + "updated_at": "string", + "due_date": "string", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "status": "STARTED", + "assigned_to": ["string"], + "analytics": { + "started_at": "string", + "completed_at": "string", + "closed_at": "string", + "started_by": "string", + "closed_by": "string" + }, + "contexts": [ + { + "entity_id": "string", + "entity_schema": "string", + "is_primary": false + } + ], + "crt_tasks": [ + { + "id": "string" + } + ], + "phases": [ + { + "id": "string", + "template_id": "string", + "name": "string", + "status": "OPEN", + "updated_at": "string", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "assigned_to": ["string"], + "analytics": {}, + "taxonomies": ["string"], + "loop_config": {} + } + ], + "tasks": [ + { + "id": "string", + "template_id": "string", + "name": "string", + "description": {}, + "status": "UNASSIGNED", + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "analytics": {}, + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "manually_created": true, + "enabled": true, + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "loop_config": {} + } + ], + "edges": [ + { + "id": "string", + "from_id": "string", + "to_id": "string", + "condition_id": "abc123", + "none_met": true + } + ], + "_execution_chain": { + "parent_execution_id": "string", + "parent_task_id": "string", + "depth": 0 + }, + "closing_reason": { + "selected_reasons": [ + {} + ], + "configured_reasons": [ + {} + ], + "extra_description": "string" + }, + "available_in_ecp": true, + "entity_sync": [ + { + "trigger": {}, + "target": {}, + "value": {} + } + ], + "taxonomies": ["string"], + "trigger": { + "type": "MANUAL", + "automation_config": { + "flow_id": "string", + "execution_id": "string", + "execution_status": "string", + "error_reason": "string" + } + }, + "singleClosingReasonSelection": true +} +``` + +
+ +--- + +### `getFlowExecution` + +Get a full flow execution, included tasks, phases, edges & analytics. + +`GET /v2/flows/executions/{execution_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string | Yes | Id of the execution | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow getFlowExecution \ + -p execution_id=wd561 +``` + +Using positional args for path parameters: + +```bash +epilot workflow getFlowExecution wd561 +``` + +With JSONata filter: + +```bash +epilot workflow getFlowExecution -p execution_id=wd561 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "flow_template_id": "string", + "org_id": "string", + "name": "string", + "created_at": "string", + "updated_at": "string", + "due_date": "string", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "status": "STARTED", + "assigned_to": ["string"], + "analytics": { + "started_at": "string", + "completed_at": "string", + "closed_at": "string", + "started_by": "string", + "closed_by": "string" + }, + "contexts": [ + { + "entity_id": "string", + "entity_schema": "string", + "is_primary": false + } + ], + "crt_tasks": [ + { + "id": "string" + } + ], + "phases": [ + { + "id": "string", + "template_id": "string", + "name": "string", + "status": "OPEN", + "updated_at": "string", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "assigned_to": ["string"], + "analytics": {}, + "taxonomies": ["string"], + "loop_config": {} + } + ], + "tasks": [ + { + "id": "string", + "template_id": "string", + "name": "string", + "description": {}, + "status": "UNASSIGNED", + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "analytics": {}, + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "manually_created": true, + "enabled": true, + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "loop_config": {} + } + ], + "edges": [ + { + "id": "string", + "from_id": "string", + "to_id": "string", + "condition_id": "abc123", + "none_met": true + } + ], + "_execution_chain": { + "parent_execution_id": "string", + "parent_task_id": "string", + "depth": 0 + }, + "closing_reason": { + "selected_reasons": [ + {} + ], + "configured_reasons": [ + {} + ], + "extra_description": "string" + }, + "available_in_ecp": true, + "entity_sync": [ + { + "trigger": {}, + "target": {}, + "value": {} + } + ], + "taxonomies": ["string"], + "trigger": { + "type": "MANUAL", + "automation_config": { + "flow_id": "string", + "execution_id": "string", + "execution_status": "string", + "error_reason": "string" + } + }, + "singleClosingReasonSelection": true +} +``` + +
+ +--- + +### `patchFlowExecution` + +Patch flow execution with new assignees, status, analytics & other changes. + +`PATCH /v2/flows/executions/{execution_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string | Yes | Id of the execution | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow patchFlowExecution \ + -p execution_id=wd561 +``` + +With request body: + +```bash +epilot workflow patchFlowExecution \ + -p execution_id=wd561 \ + -d '{ + "status": "STARTED", + "assigned_to": ["string"], + "closing_reason": { + "selected_reasons": [ + { + "id": "string", + "title": "string" + } + ], + "configured_reasons": [ + { + "id": "string", + "title": "string" + } + ], + "extra_description": "string" + }, + "due_date": "string", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "contexts": [ + { + "entity_id": "string", + "entity_schema": "string", + "is_primary": false + } + ] +}' +``` + +Using positional args for path parameters: + +```bash +epilot workflow patchFlowExecution wd561 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow patchFlowExecution -p execution_id=wd561 +``` + +With JSONata filter: + +```bash +epilot workflow patchFlowExecution -p execution_id=wd561 --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "flow_template_id": "string", + "org_id": "string", + "name": "string", + "created_at": "string", + "updated_at": "string", + "due_date": "string", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "status": "STARTED", + "assigned_to": ["string"], + "analytics": { + "started_at": "string", + "completed_at": "string", + "closed_at": "string", + "started_by": "string", + "closed_by": "string" + }, + "contexts": [ + { + "entity_id": "string", + "entity_schema": "string", + "is_primary": false + } + ], + "crt_tasks": [ + { + "id": "string" + } + ], + "phases": [ + { + "id": "string", + "template_id": "string", + "name": "string", + "status": "OPEN", + "updated_at": "string", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "assigned_to": ["string"], + "analytics": {}, + "taxonomies": ["string"], + "loop_config": {} + } + ], + "tasks": [ + { + "id": "string", + "template_id": "string", + "name": "string", + "description": {}, + "status": "UNASSIGNED", + "journey": {}, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": {}, + "requirements": [], + "assigned_to": ["string"], + "analytics": {}, + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "manually_created": true, + "enabled": true, + "ecp": {}, + "installer": {}, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "loop_config": {} + } + ], + "edges": [ + { + "id": "string", + "from_id": "string", + "to_id": "string", + "condition_id": "abc123", + "none_met": true + } + ], + "_execution_chain": { + "parent_execution_id": "string", + "parent_task_id": "string", + "depth": 0 + }, + "closing_reason": { + "selected_reasons": [ + {} + ], + "configured_reasons": [ + {} + ], + "extra_description": "string" + }, + "available_in_ecp": true, + "entity_sync": [ + { + "trigger": {}, + "target": {}, + "value": {} + } + ], + "taxonomies": ["string"], + "trigger": { + "type": "MANUAL", + "automation_config": { + "flow_id": "string", + "execution_id": "string", + "execution_status": "string", + "error_reason": "string" + } + }, + "singleClosingReasonSelection": true +} +``` + +
+ +--- + +### `deleteFlowExecution` + +Deletes a specific execution of a flow, identified by id. Flow contexts will NOT be deleted. + +`DELETE /v2/flows/executions/{execution_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string | Yes | Id of the execution | +| `soft` | query | boolean | No | If true, the execution will NOT be deleted permanently, but rather kept for archive purpose. | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow deleteFlowExecution \ + -p execution_id=wd561 +``` + +Using positional args for path parameters: + +```bash +epilot workflow deleteFlowExecution wd561 +``` + +With JSONata filter: + +```bash +epilot workflow deleteFlowExecution -p execution_id=wd561 --jsonata '$' +``` + +--- + +### `searchFlowExecutions` + +Search Flow Executions for a specific Entity. + +`POST /v2/flows/executions:search` + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow searchFlowExecutions \ + -d '{"entity_id":"string","entity_schema":"string"}' +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow searchFlowExecutions +``` + +With JSONata filter: + +```bash +epilot workflow searchFlowExecutions --jsonata 'results[0]' +``` + +
+Sample Response + +```json +{ + "results": [ + { + "id": "string", + "flow_template_id": "string", + "org_id": "string", + "name": "string", + "created_at": "string", + "updated_at": "string", + "due_date": "string", + "due_date_config": {}, + "status": "STARTED", + "assigned_to": ["string"], + "analytics": {}, + "contexts": [], + "crt_tasks": [], + "phases": [], + "tasks": [], + "edges": [], + "_execution_chain": {}, + "closing_reason": {}, + "available_in_ecp": true, + "entity_sync": [], + "taxonomies": ["string"], + "trigger": {}, + "singleClosingReasonSelection": true + } + ] +} +``` + +
+ +--- + +### `patchTask` + +Changes various attributes of a flow task, like assignees, status, due date, etc. + +`PATCH /v2/flows/executions/{execution_id}/tasks/{task_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string | Yes | Id of the execution | +| `task_id` | path | string | Yes | Id of the task | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow patchTask \ + -p execution_id=wd561 \ + -p task_id=7hj28a +``` + +With request body: + +```bash +epilot workflow patchTask \ + -p execution_id=wd561 \ + -p task_id=7hj28a \ + -d '{ + "name": "string", + "status": "UNASSIGNED", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "assigned_to": ["string"], + "enabled": true, + "automation_config": { + "flow_id": "string", + "execution_id": "string", + "execution_status": "string", + "error_reason": "string" + }, + "description": { + "enabled": true, + "value": "string" + }, + "ecp": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "installer": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "next_condition_id": "string", + "revert_execution": false +}' +``` + +Using positional args for path parameters: + +```bash +epilot workflow patchTask wd561 7hj28a +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow patchTask -p execution_id=wd561 -p task_id=7hj28a +``` + +With JSONata filter: + +```bash +epilot workflow patchTask -p execution_id=wd561 -p task_id=7hj28a --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "template_id": "string", + "name": "string", + "description": { + "enabled": true, + "value": "string" + }, + "status": "UNASSIGNED", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + }, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "requirements": [ + { + "task_id": "string", + "phase_id": "string", + "when": "TASK_FINISHED" + } + ], + "assigned_to": ["string"], + "analytics": { + "started_at": "1970-01-01T00:00:00.000Z", + "in_progress_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z", + "status_updated_at": "1970-01-01T00:00:00.000Z", + "in_progress_by": "string", + "completed_by": "string", + "skipped_by": "string" + }, + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "manually_created": true, + "enabled": true, + "ecp": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "installer": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "loop_config": { + "max_iterations": 3, + "crt_iterations": 0 + } +} +``` + +
+ +--- + +### `runTaskAutomation` + +Runs configured automation for a flow task + +`POST /v2/flows/executions/{execution_id}/tasks/{task_id}/automation:run` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string | Yes | Id of the execution | +| `task_id` | path | string | Yes | Id of the task | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow runTaskAutomation \ + -p execution_id=wd561 \ + -p task_id=7hj28a +``` + +Using positional args for path parameters: + +```bash +epilot workflow runTaskAutomation wd561 7hj28a +``` + +With JSONata filter: + +```bash +epilot workflow runTaskAutomation -p execution_id=wd561 -p task_id=7hj28a --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "template_id": "string", + "name": "string", + "description": { + "enabled": true, + "value": "string" + }, + "status": "UNASSIGNED", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + }, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "requirements": [ + { + "task_id": "string", + "phase_id": "string", + "when": "TASK_FINISHED" + } + ], + "assigned_to": ["string"], + "analytics": { + "started_at": "1970-01-01T00:00:00.000Z", + "in_progress_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z", + "status_updated_at": "1970-01-01T00:00:00.000Z", + "in_progress_by": "string", + "completed_by": "string", + "skipped_by": "string" + }, + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "manually_created": true, + "enabled": true, + "ecp": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "installer": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "automation_config": { + "flow_id": "string", + "execution_id": "string", + "execution_status": "string", + "error_reason": "string" + }, + "automation_execution_id": "string", + "trigger_mode": "manual", + "schedule": { + "mode": "immediate" + }, + "loop_config": { + "max_iterations": 3, + "crt_iterations": 0 + } +} +``` + +
+ +--- + +### `executeTask` + +Executes any kind of flow task immediately. + +`POST /v2/flows/executions/{execution_id}/tasks/{task_id}/execute` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string | Yes | Id of the execution | +| `task_id` | path | string | Yes | Id of the task | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow executeTask \ + -p execution_id=wd561 \ + -p task_id=7hj28a +``` + +Using positional args for path parameters: + +```bash +epilot workflow executeTask wd561 7hj28a +``` + +With JSONata filter: + +```bash +epilot workflow executeTask -p execution_id=wd561 -p task_id=7hj28a --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "template_id": "string", + "name": "string", + "description": { + "enabled": true, + "value": "string" + }, + "status": "UNASSIGNED", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + }, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "requirements": [ + { + "task_id": "string", + "phase_id": "string", + "when": "TASK_FINISHED" + } + ], + "assigned_to": ["string"], + "analytics": { + "started_at": "1970-01-01T00:00:00.000Z", + "in_progress_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z", + "status_updated_at": "1970-01-01T00:00:00.000Z", + "in_progress_by": "string", + "completed_by": "string", + "skipped_by": "string" + }, + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "manually_created": true, + "enabled": true, + "ecp": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "installer": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "loop_config": { + "max_iterations": 3, + "crt_iterations": 0 + } +} +``` + +
+ +--- + +### `patchPhase` + +Apply updates to a phase within flow execution + +`PATCH /v2/flows/executions/{execution_id}/phases/{phase_id}` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string | Yes | Id of the execution | +| `phase_id` | path | string | Yes | Id of the phase | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow patchPhase \ + -p execution_id=wd561 \ + -p phase_id=9gjs2952j +``` + +With request body: + +```bash +epilot workflow patchPhase \ + -p execution_id=wd561 \ + -p phase_id=9gjs2952j \ + -d '{ + "name": "string", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "assigned_to": ["string"] +}' +``` + +Using positional args for path parameters: + +```bash +epilot workflow patchPhase wd561 9gjs2952j +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow patchPhase -p execution_id=wd561 -p phase_id=9gjs2952j +``` + +With JSONata filter: + +```bash +epilot workflow patchPhase -p execution_id=wd561 -p phase_id=9gjs2952j --jsonata 'id' +``` + +
+Sample Response + +```json +{ + "id": "string", + "template_id": "string", + "name": "string", + "status": "OPEN", + "updated_at": "string", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "assigned_to": ["string"], + "analytics": { + "started_at": "1970-01-01T00:00:00.000Z", + "in_progress_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z", + "status_updated_at": "1970-01-01T00:00:00.000Z", + "in_progress_by": "string", + "completed_by": "string", + "skipped_by": "string" + }, + "taxonomies": ["string"], + "loop_config": { + "max_iterations": 3, + "crt_iterations": 0 + } +} +``` + +
+ +--- + +### `addTask` + +Create a new task in current workflow execution. + +`POST /v2/flows/executions/{execution_id}/tasks` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string | Yes | Id of the execution | + +**Request Body** (required) + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow addTask \ + -p execution_id=wd561 +``` + +With request body: + +```bash +epilot workflow addTask \ + -p execution_id=wd561 \ + -d '{ + "previous_task_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "next_task_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "task": { + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "string", + "status": "UNASSIGNED", + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "assigned_to": ["string"], + "enabled": true, + "automation_config": { + "flow_id": "string", + "execution_id": "string", + "execution_status": "string", + "error_reason": "string" + }, + "phase_id": "string", + "task_type": "MANUAL" + } +}' +``` + +Using positional args for path parameters: + +```bash +epilot workflow addTask wd561 +``` + +Using stdin pipe: + +```bash +cat body.json | epilot workflow addTask -p execution_id=wd561 +``` + +With JSONata filter: + +```bash +epilot workflow addTask -p execution_id=wd561 --jsonata '$' +``` + +
+Sample Response + +```json +{ + "id": "string", + "template_id": "string", + "name": "string", + "description": { + "enabled": true, + "value": "string" + }, + "status": "UNASSIGNED", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + }, + "due_date": "2021-04-27T12:00:00.000Z", + "due_date_config": { + "duration": 0, + "unit": "minutes", + "type": "WORKFLOW_STARTED", + "task_id": "string", + "phase_id": "string" + }, + "requirements": [ + { + "task_id": "string", + "phase_id": "string", + "when": "TASK_FINISHED" + } + ], + "assigned_to": ["string"], + "analytics": { + "started_at": "1970-01-01T00:00:00.000Z", + "in_progress_at": "1970-01-01T00:00:00.000Z", + "completed_at": "1970-01-01T00:00:00.000Z", + "status_updated_at": "1970-01-01T00:00:00.000Z", + "in_progress_by": "string", + "completed_by": "string", + "skipped_by": "string" + }, + "created_at": "1970-01-01T00:00:00.000Z", + "updated_at": "1970-01-01T00:00:00.000Z", + "manually_created": true, + "enabled": true, + "ecp": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "installer": { + "enabled": true, + "label": "string", + "description": "string", + "journey": { + "id": "string", + "journeyId": "string", + "name": "string", + "complete_task_automatically": true + } + }, + "taxonomies": ["string"], + "phase_id": "string", + "task_type": "MANUAL", + "loop_config": { + "max_iterations": 3, + "crt_iterations": 0 + } +} +``` + +
+ +--- + +### `cancelTaskSchedule` + +Cancels a scheduled task, deleting the schedule and marking the task as skipped. + +`DELETE /v2/flows/executions/{execution_id}/tasks/{task_id}/schedule` + +**Parameters** + +| Name | In | Type | Required | Description | +| ---- | -- | ---- | -------- | ----------- | +| `execution_id` | path | string | Yes | Id of the execution | +| `task_id` | path | string | Yes | Id of the task | + +**Flags** + +| Flag | Description | +| ---- | ----------- | +| `-p key=value` | Set a named parameter | +| `-d '{...}'` | Request body JSON | +| `-H 'Key: Value'` | Custom header | +| `-t, --token ` | Bearer token for authentication | +| `--profile ` | Use a named profile | +| `-s, --server ` | Override server base URL | +| `-i, --include` | Include response headers in output | +| `--json` | Output raw JSON (no formatting) | +| `-v, --verbose` | Verbose output (show request details) | +| `--jsonata ` | JSONata expression to transform response | +| `--definition ` | Override OpenAPI spec file/URL | +| `--guided` | Prompt for all parameters interactively | +| `--no-interactive` | Disable interactive prompts | + +**Sample Call** + +```bash +epilot workflow cancelTaskSchedule \ + -p execution_id=wd561 \ + -p task_id=7hj28a +``` + +Using positional args for path parameters: + +```bash +epilot workflow cancelTaskSchedule wd561 7hj28a +``` + +With JSONata filter: + +```bash +epilot workflow cancelTaskSchedule -p execution_id=wd561 -p task_id=7hj28a --jsonata '$' +``` + +--- + +## Deprecated Operations + +- ~~`searchExecutions`~~ POST `/v1/workflows/executions/search` +- ~~`searchSteps`~~ POST `/v1/workflows/executions/steps/search` +- ~~`cancelSchedule`~~ POST `/v2/flows/executions/{execution_id}/schedules/{schedule_id}` diff --git a/packages/cli/package.json b/packages/cli/package.json index d0b6c17e..61fb66b2 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,13 +1,65 @@ { - "name": "epilot", - "version": "0.0.1", - "description": "epilot cli", - "private": false, - "main": "index.js", + "name": "@epilot/cli", + "version": "0.1.9", + "description": "CLI for epilot APIs", + "type": "module", + "bin": { + "epilot": "./dist/bin/epilot.js" + }, + "exports": { + "./bin/epilot.js": "./dist/bin/epilot.js" + }, "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "build": "pnpm generate && tsup", + "generate": "tsx scripts/generate.ts", + "dev": "tsx bin/epilot.ts", + "test": "vitest run", + "typecheck": "tsc --noEmit", + "prepublishOnly": "pnpm build && pnpm test" }, - "keywords": [], + "keywords": [ + "epilot", + "cli", + "api", + "openapi", + "rest", + "developer-tools" + ], "author": "epilot GmbH", - "license": "MIT" + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/epilot-dev/sdk-js.git", + "directory": "packages/cli" + }, + "homepage": "https://github.com/epilot-dev/sdk-js/tree/main/packages/cli#readme", + "bugs": { + "url": "https://github.com/epilot-dev/sdk-js/issues" + }, + "dependencies": { + "@inquirer/prompts": "^7.0.0", + "axios": "^1.11.0", + "citty": "^0.2.1", + "dereference-json-schema": "^0.2.2", + "jsonata": "^2.0.0", + "mock-json-schema": "^1.1.2", + "open": "^10.0.0", + "openapi-client-axios": "^7.8.0" + }, + "devDependencies": { + "msw": "^2.12.10", + "tsup": "^8.0.0", + "tsx": "^4.0.0", + "typescript": "^5.3.0", + "vitest": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "files": [ + "dist", + "definitions", + "README.md", + "LICENSE" + ] } diff --git a/packages/cli/scripts/generate.ts b/packages/cli/scripts/generate.ts new file mode 100644 index 00000000..3f3a84e3 --- /dev/null +++ b/packages/cli/scripts/generate.ts @@ -0,0 +1,906 @@ +#!/usr/bin/env tsx + +/** + * Generates CLI files from existing API clients: + * - Copies full openapi.json specs to definitions/ + * - Generates src/generated/api-list.ts + * - Generates src/commands/apis/*.ts (one per API) + * - Updates src/index.ts with subCommands map + * - Generates docs/*.md with copy-pasteable sample calls + responses + */ + +import { readdirSync, existsSync, copyFileSync, writeFileSync, readFileSync, mkdirSync } from 'node:fs'; +import { execSync } from 'node:child_process'; +import { resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import dereferenceJsonSchema from 'dereference-json-schema'; +import mockJsonSchema from 'mock-json-schema'; +const { dereferenceSync } = dereferenceJsonSchema as unknown as { dereferenceSync: (schema: unknown) => unknown }; +const { mock } = mockJsonSchema as unknown as { mock: (schema: unknown) => unknown }; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const CLI_PKG = JSON.parse(readFileSync(resolve(__dirname, '..', 'package.json'), 'utf-8')); +const CLI_VERSION: string = CLI_PKG.version; + +const ROOT = resolve(__dirname, '..', '..', '..'); +const CLIENTS_DIR = resolve(ROOT, 'clients'); +const CLI_DIR = resolve(ROOT, 'packages', 'cli'); +const DEFS_DIR = resolve(CLI_DIR, 'definitions'); +const APIS_CMD_DIR = resolve(CLI_DIR, 'src', 'commands', 'apis'); +const GENERATED_DIR = resolve(CLI_DIR, 'src', 'generated'); + +const MAX_EXAMPLE_LINES = 80; +const TRUNCATED_DEPTH = 3; +const MAX_ARRAY_ITEMS = 2; + +// ─── Helpers ────────────────────────────────────────────────────────────────── + +const toCamelCase = (name: string): string => { + return name.replace(/-([a-z])/g, (_, c) => c.toUpperCase()); +}; + +type Schema = Record; + +type ParamInfo = { + name: string; + in: string; + required: boolean; + type: string; + description: string; + example: unknown; +}; + +type OperationInfo = { + operationId: string; + method: string; + path: string; + summary: string; + description: string; + deprecated: boolean; + tags: string[]; + params: ParamInfo[]; + requestBodySchema: Schema | null; + requestBodyRequired: boolean; + responseSchema: Schema | null; +}; + +type ClientInfo = { + dirName: string; + apiName: string; + kebabName: string; + hasDefinition: boolean; + title: string; + description: string; + serverUrl: string; + operations: OperationInfo[]; +}; + +const sanitizeDescription = (desc: string): string => { + const firstParagraph = desc.split(/\n\s*\n/)[0] || ''; + return firstParagraph + .replace(/^#{1,6}\s+/gm, '') + .trim() + .substring(0, 300); +}; + +/** + * Extract the first sentence/line of a description for use as a short summary. + * Prefers description over summary because epilot specs duplicate operationId in summary. + */ +const firstLine = (desc: string): string => { + if (!desc) return ''; + const line = desc.split(/\n/)[0].trim(); + return line.substring(0, 120); +}; + +const formatSchemaType = (schema: Schema | undefined, depth = 0): string => { + if (!schema) return 'unknown'; + if (depth > 2) return '...'; + if (schema.enum) return (schema.enum as unknown[]).map((v) => JSON.stringify(v)).join(' \\| '); + if (schema.type === 'string') return schema.format ? `string (${schema.format})` : 'string'; + if (schema.type === 'integer' || schema.type === 'number') return 'number'; + if (schema.type === 'boolean') return 'boolean'; + if (schema.type === 'array') { + const items = schema.items as Schema | undefined; + return `${formatSchemaType(items, depth + 1)}[]`; + } + if (schema.type === 'object') return 'object'; + if (schema.oneOf || schema.anyOf) { + const variants = (schema.oneOf || schema.anyOf) as Schema[]; + return variants.map((v) => formatSchemaType(v, depth + 1)).join(' \\| '); + } + return 'unknown'; +}; + +/** + * JSON serializer with depth/array truncation (matches SDK docs rules). + */ +const toJsonObject = (value: unknown, indent = 0, depth = 0, maxDepth = Infinity): string => { + const pad = ' '.repeat(indent); + const inner = ' '.repeat(indent + 1); + + if (value === null || value === undefined) return 'null'; + if (typeof value === 'boolean' || typeof value === 'number') return String(value); + if (typeof value === 'string') return JSON.stringify(value); + + if (Array.isArray(value)) { + if (value.length === 0) return '[]'; + const hasComplexItems = value.some((v) => typeof v === 'object' && v !== null); + if (!hasComplexItems) { + const inline = value.map((v) => toJsonObject(v, 0, depth + 1, maxDepth)).join(', '); + return `[${inline}]`; + } + if (depth >= maxDepth) return '[]'; + const shown = value.slice(0, MAX_ARRAY_ITEMS); + const items = shown.map((v) => `${inner}${toJsonObject(v, indent + 1, depth + 1, maxDepth)}`); + return `[\n${items.join(',\n')}\n${pad}]`; + } + + if (typeof value === 'object') { + const entries = Object.entries(value); + if (entries.length === 0) return '{}'; + if (depth >= maxDepth) return '{}'; + const props = entries.map(([k, v]) => { + return `${inner}${JSON.stringify(k)}: ${toJsonObject(v, indent + 1, depth + 1, maxDepth)}`; + }); + return `{\n${props.join(',\n')}\n${pad}}`; + } + + return String(value); +}; + +/** + * Build a mock JSON string from a schema, with depth/array truncation matching SDK docs. + */ +const mockJsonExample = (schema: Schema): string | null => { + try { + const example = mock(schema as any); + const full = toJsonObject(example); + if (full.split('\n').length > MAX_EXAMPLE_LINES) { + return toJsonObject(example, 0, 0, TRUNCATED_DEPTH); + } + return full; + } catch { + return null; + } +}; + +/** + * Build a mock CLI `-d` body from a schema — compact single-line JSON for short + * bodies, or truncated multi-line for long ones. + */ +const mockCliBody = (schema: Schema): string | null => { + try { + const example = mock(schema as any); + const compact = JSON.stringify(example); + if (compact.length <= 120) return compact; + const full = toJsonObject(example); + if (full.split('\n').length > MAX_EXAMPLE_LINES) { + return toJsonObject(example, 0, 0, TRUNCATED_DEPTH); + } + return full; + } catch { + return null; + } +}; + +/** + * Produce a sample value for a single parameter (for -p flags). + */ +const sampleParamValue = (param: ParamInfo): string => { + if (param.example !== undefined && param.example !== null) return String(param.example); + if (param.type.includes('boolean')) return 'true'; + if (param.type.includes('number')) return '1'; + if (param.name === 'id' || param.name.endsWith('_id') || param.name.endsWith('Id')) + return '123e4567-e89b-12d3-a456-426614174000'; + if (param.name === 'slug') return 'contact'; + if (param.name === 'email') return 'user@example.com'; + return 'example'; +}; + +// ─── Client Discovery ───────────────────────────────────────────────────────── + +const discoverClients = (): ClientInfo[] => { + const dirs = readdirSync(CLIENTS_DIR, { withFileTypes: true }) + .filter((d) => d.isDirectory() && d.name.endsWith('-client')) + .map((d) => d.name); + + return dirs.map((dirName) => { + const baseName = dirName.replace(/-client$/, ''); + const apiName = toCamelCase(baseName); + const clientDir = resolve(CLIENTS_DIR, dirName, 'src'); + const fullSpecPath = resolve(clientDir, 'openapi.json'); + const runtimeSpecPath = resolve(clientDir, 'openapi-runtime.json'); + const hasDefinition = existsSync(fullSpecPath) || existsSync(runtimeSpecPath); + + let title = apiName; + let description = ''; + let serverUrl = ''; + let operations: OperationInfo[] = []; + + if (hasDefinition) { + const result = extractOperations(dirName, baseName, apiName); + title = result.title; + description = result.description; + serverUrl = result.serverUrl; + operations = result.operations; + } + + return { dirName, apiName, kebabName: baseName, hasDefinition, title, description, serverUrl, operations }; + }); +}; + +const extractOperations = ( + dirName: string, + _baseName: string, + apiName: string, +): { title: string; description: string; serverUrl: string; operations: OperationInfo[] } => { + const fullSpecPath = resolve(CLIENTS_DIR, dirName, 'src/openapi.json'); + const runtimeSpecPath = resolve(CLIENTS_DIR, dirName, 'src/openapi-runtime.json'); + const specPath = existsSync(fullSpecPath) ? fullSpecPath : runtimeSpecPath; + if (!existsSync(specPath)) return { title: apiName, description: '', serverUrl: '', operations: [] }; + + const rawSpec = JSON.parse(readFileSync(specPath, 'utf-8')); + const title = rawSpec.info?.title || apiName; + const description = sanitizeDescription(rawSpec.info?.description || ''); + const serverUrl = rawSpec.servers?.[0]?.url || ''; + + let spec: Record; + try { + spec = dereferenceSync(rawSpec) as Record; + } catch { + spec = rawSpec; + } + + const operations: OperationInfo[] = []; + for (const [path, methods] of Object.entries((spec.paths || {}) as Record>)) { + const pathParams = (methods.parameters || []) as Record[]; + + for (const method of ['get', 'post', 'put', 'patch', 'delete', 'head', 'options']) { + const op = methods[method] as Record | undefined; + if (!op?.operationId) continue; + + const opParams = (op.parameters || []) as Record[]; + const mergedParams = [...pathParams]; + for (const p of opParams) { + const idx = mergedParams.findIndex((pp) => pp.name === p.name && pp.in === p.in); + if (idx >= 0) mergedParams[idx] = p; + else mergedParams.push(p); + } + + const params: ParamInfo[] = mergedParams.map((p) => ({ + name: (p.name as string) || '', + in: (p.in as string) || '', + required: !!p.required, + type: formatSchemaType(p.schema as Schema | undefined), + description: ((p.description as string) || '').substring(0, 200), + example: (p.example as unknown) ?? (p.schema as Schema | undefined)?.example ?? undefined, + })); + + const reqBodyObj = op.requestBody as Record | undefined; + const reqBodyContent = reqBodyObj?.content as Record | undefined; + const reqBodySchema = (reqBodyContent?.['application/json'] as Record)?.schema as + | Schema + | undefined; + + const successResponse = ((op.responses as Record)?.['200'] || + (op.responses as Record)?.['201']) as Record | undefined; + const respContent = successResponse?.content as Record | undefined; + const respSchema = (respContent?.['application/json'] as Record)?.schema as Schema | undefined; + + operations.push({ + operationId: op.operationId as string, + method: method.toUpperCase(), + path, + summary: firstLine((op.description as string) || ''), + description: sanitizeDescription((op.description as string) || ''), + deprecated: !!op.deprecated, + tags: (op.tags as string[]) || [], + params, + requestBodySchema: reqBodySchema || null, + requestBodyRequired: !!reqBodyObj?.required, + responseSchema: respSchema || null, + }); + } + } + + return { title, description, serverUrl, operations }; +}; + +// ─── Code Generation (definitions, api-list, commands, index) ───────────────── + +const copyDefinitions = (clients: ClientInfo[]) => { + mkdirSync(DEFS_DIR, { recursive: true }); + for (const client of clients) { + if (!client.hasDefinition) continue; + const fullSrc = resolve(CLIENTS_DIR, client.dirName, 'src/openapi.json'); + const runtimeSrc = resolve(CLIENTS_DIR, client.dirName, 'src/openapi-runtime.json'); + const src = existsSync(fullSrc) ? fullSrc : runtimeSrc; + const dest = resolve(DEFS_DIR, `${client.kebabName}.json`); + copyFileSync(src, dest); + } +}; + +const generateApiList = (clients: ClientInfo[]): string => { + const entries = clients + .filter((c) => c.hasDefinition) + .map((c) => { + const opIds = c.operations.map((op) => `'${op.operationId}'`).join(', '); + const title = c.title.replace(/'/g, "\\'"); + return ` { apiName: '${c.apiName}', kebabName: '${c.kebabName}', title: '${title}', serverUrl: '${c.serverUrl}', operationCount: ${c.operations.length}, operationIds: [${opIds}] }`; + }); + + return `// Auto-generated by scripts/generate.ts — do not edit +export type ApiInfo = { + apiName: string; + kebabName: string; + title: string; + serverUrl: string; + operationCount: number; + operationIds: string[]; +}; + +export const API_LIST: ApiInfo[] = [ +${entries.join(',\n')}, +]; + +export const API_NAMES = API_LIST.map((a) => a.apiName); +`; +}; + +const generateApiCommand = (client: ClientInfo): string => { + return `// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: '${client.kebabName}', description: '${client.title.replace(/'/g, "\\'")}' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('${client.kebabName}', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); +`; +}; + +const generateIndexFile = (clients: ClientInfo[]): string => { + const validClients = clients.filter((c) => c.hasDefinition); + + const subCommandEntries = validClients.map((c) => { + const key = c.kebabName.includes('-') ? `'${c.kebabName}'` : c.kebabName; + return ` ${key}: () => import('./commands/apis/${c.kebabName}.js').then((m) => m.default),`; + }); + + return `import { defineCommand } from 'citty'; + +export const main = defineCommand({ + meta: { + name: 'epilot', + version: '${CLI_VERSION}', + description: 'CLI for epilot APIs', + }, + args: { + token: { type: 'string', alias: 't', description: 'Bearer token' }, + profile: { type: 'string', description: 'Use a named profile (or EPILOT_PROFILE env)' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', default: true, description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression' }, + }, + subCommands: { + auth: () => import('./commands/auth.js').then((m) => m.default), + profile: () => import('./commands/profile.js').then((m) => m.default), + completion: () => import('./commands/completion.js').then((m) => m.default), + upgrade: () => import('./commands/upgrade.js').then((m) => m.default), +${subCommandEntries.join('\n')} + }, +}); +`; +}; + +// ─── Doc Generation ─────────────────────────────────────────────────────────── + +const generateClientDoc = (client: ClientInfo): string => { + const lines: string[] = []; + const { title, serverUrl, description, kebabName, operations } = client; + + // ── Header ── + lines.push(`# ${title}`); + lines.push(``); + if (serverUrl) lines.push(`- **Base URL:** \`${serverUrl}\``); + lines.push(`- **API Docs:** [https://docs.epilot.io/api/${kebabName}](https://docs.epilot.io/api/${kebabName})`); + lines.push(``); + if (description) { + lines.push(description, ``); + } + + // ── Quick-start ── + lines.push(`## Quick Start`, ``); + lines.push('```bash'); + lines.push(`# List available operations`); + lines.push(`epilot ${kebabName}`); + if (operations.length > 0) { + lines.push(``); + lines.push(`# Call an operation`); + const first = operations[0]; + const firstParams = first.params.filter((p) => p.required); + const paramStr = firstParams.map((p) => `-p ${p.name}=${sampleParamValue(p)}`).join(' '); + lines.push(`epilot ${kebabName} ${first.operationId}${paramStr ? ` ${paramStr}` : ''}`); + } + lines.push('```'); + lines.push(``); + + const activeOps = operations.filter((op) => !op.deprecated); + + // ── Table of contents ── + if (activeOps.length > 0) { + lines.push(`## Operations`, ``); + + const hasTags = activeOps.some((op) => op.tags.length > 0); + if (hasTags) { + const tagOrder: string[] = []; + const tagOps = new Map(); + for (const op of activeOps) { + const tag = op.tags[0] || 'Other'; + if (!tagOps.has(tag)) { + tagOrder.push(tag); + tagOps.set(tag, []); + } + tagOps.get(tag)!.push(op); + } + for (const tag of tagOrder) { + lines.push(`**${tag}**`); + for (const op of tagOps.get(tag)!) { + const anchor = op.operationId.toLowerCase(); + lines.push(`- [\`${op.operationId}\`](#${anchor}) — ${op.summary || `${op.method} ${op.path}`}`); + } + lines.push(``); + } + } else { + for (const op of activeOps) { + const anchor = op.operationId.toLowerCase(); + lines.push(`- [\`${op.operationId}\`](#${anchor}) — ${op.summary || `${op.method} ${op.path}`}`); + } + lines.push(``); + } + + // ── Per-operation sections ── + for (const op of activeOps) { + lines.push(...generateOperationDoc(kebabName, op)); + } + } + + // ── Deprecated ── + const deprecatedOps = operations.filter((op) => op.deprecated); + if (deprecatedOps.length > 0) { + lines.push(`## Deprecated Operations`, ``); + for (const op of deprecatedOps) { + lines.push(`- ~~\`${op.operationId}\`~~ ${op.method} \`${op.path}\``); + } + lines.push(``); + } + + return lines.join('\n'); +}; + +const generateOperationDoc = (kebabName: string, op: OperationInfo): string[] => { + const lines: string[] = []; + + // ── Heading & description ── + lines.push(`### \`${op.operationId}\``); + lines.push(``); + if (op.summary) lines.push(op.summary, ``); + lines.push(`\`${op.method} ${op.path}\``); + lines.push(``); + + // ── Parameters table ── + if (op.params.length > 0) { + lines.push(`**Parameters**`); + lines.push(``); + lines.push(`| Name | In | Type | Required | Description |`); + lines.push(`| ---- | -- | ---- | -------- | ----------- |`); + for (const p of op.params) { + lines.push(`| \`${p.name}\` | ${p.in} | ${p.type} | ${p.required ? 'Yes' : 'No'} | ${p.description} |`); + } + lines.push(``); + } + + if (op.requestBodySchema) { + lines.push(`**Request Body**${op.requestBodyRequired ? ' (required)' : ''}`, ``); + } + + // ── Flags ── + lines.push(`**Flags**`); + lines.push(``); + lines.push(`| Flag | Description |`); + lines.push(`| ---- | ----------- |`); + lines.push(`| \`-p key=value\` | Set a named parameter |`); + lines.push(`| \`-d '{...}'\` | Request body JSON |`); + lines.push(`| \`-H 'Key: Value'\` | Custom header |`); + lines.push(`| \`-t, --token \` | Bearer token for authentication |`); + lines.push(`| \`--profile \` | Use a named profile |`); + lines.push(`| \`-s, --server \` | Override server base URL |`); + lines.push(`| \`-i, --include\` | Include response headers in output |`); + lines.push(`| \`--json\` | Output raw JSON (no formatting) |`); + lines.push(`| \`-v, --verbose\` | Verbose output (show request details) |`); + lines.push(`| \`--jsonata \` | JSONata expression to transform response |`); + lines.push(`| \`--definition \` | Override OpenAPI spec file/URL |`); + lines.push(`| \`--guided\` | Prompt for all parameters interactively |`); + lines.push(`| \`--no-interactive\` | Disable interactive prompts |`); + lines.push(``); + + // ── Sample call ── + lines.push(`**Sample Call**`); + lines.push(``); + + const paramFlags = op.params + .filter((p) => p.required || p.in === 'path') + .map((p) => `-p ${p.name}=${sampleParamValue(p)}`); + + const bodyJson = op.requestBodySchema ? mockCliBody(op.requestBodySchema) : null; + const isCompactBody = bodyJson && !bodyJson.includes('\n'); + + // ─ Primary form: all flags on one line + lines.push('```bash'); + { + const parts = [`epilot ${kebabName} ${op.operationId}`]; + for (const pf of paramFlags) parts.push(pf); + if (bodyJson && isCompactBody) { + parts.push(`-d '${bodyJson}'`); + } + lines.push(parts.join(' \\\n ')); + } + lines.push('```'); + lines.push(``); + + // ─ If body is multi-line, show it separately with heredoc style + if (bodyJson && !isCompactBody) { + lines.push(`With request body:`); + lines.push(``); + lines.push('```bash'); + { + const parts = [`epilot ${kebabName} ${op.operationId}`]; + for (const pf of paramFlags) parts.push(pf); + parts.push(`-d '${bodyJson}'`); + lines.push(parts.join(' \\\n ')); + } + lines.push('```'); + lines.push(``); + } + + // ─ Positional params shorthand (only when path params) + const pathParams = op.params.filter((p) => p.in === 'path'); + if (pathParams.length > 0) { + const positionalVals = pathParams.map((p) => sampleParamValue(p)); + const positionalStr = positionalVals.join(' '); + lines.push(`Using positional args for path parameters:`); + lines.push(``); + lines.push('```bash'); + lines.push(`epilot ${kebabName} ${op.operationId} ${positionalStr}`); + lines.push('```'); + lines.push(``); + } + + // ─ Piping example for body operations + if (op.requestBodySchema) { + lines.push(`Using stdin pipe:`); + lines.push(``); + lines.push('```bash'); + const pFlags = paramFlags.length > 0 ? ` ${paramFlags.join(' ')}` : ''; + lines.push(`cat body.json | epilot ${kebabName} ${op.operationId}${pFlags}`); + lines.push('```'); + lines.push(``); + } + + // ─ JSONata example + lines.push(`With JSONata filter:`); + lines.push(``); + lines.push('```bash'); + { + const pFlags = paramFlags.length > 0 ? ` ${paramFlags.join(' ')}` : ''; + const jsonataExpr = guessJsonataExpr(op); + lines.push(`epilot ${kebabName} ${op.operationId}${pFlags} --jsonata '${jsonataExpr}'`); + } + lines.push('```'); + lines.push(``); + + // ── Sample response ── + if (op.responseSchema) { + const responseJson = mockJsonExample(op.responseSchema); + if (responseJson) { + lines.push(`
`); + lines.push(`Sample Response`); + lines.push(``); + lines.push('```json'); + lines.push(responseJson); + lines.push('```'); + lines.push(``); + lines.push(`
`); + lines.push(``); + } + } + + lines.push(`---`); + lines.push(``); + + return lines; +}; + +/** + * Guess a useful JSONata expression for an operation. + */ +const guessJsonataExpr = (op: OperationInfo): string => { + if (!op.responseSchema) return '$'; + + const props = op.responseSchema.properties as Record | undefined; + if (!props) return '$'; + + // Common patterns + if (props.results) return 'results[0]'; + if (props.data) return 'data'; + if (props.items) return 'items[0]'; + if (props.hits) return 'hits[0]'; + if (props.entity) return 'entity._title'; + if (props.id) return 'id'; + if (props.email) return 'email'; + + // First key + const keys = Object.keys(props); + if (keys.length > 0) return keys[0]; + + return '$'; +}; + +// ─── Docs entry point ────────────────────────────────────────────────────────── + +const generateDocs = (clients: ClientInfo[]) => { + const docsDir = resolve(CLI_DIR, 'docs'); + mkdirSync(docsDir, { recursive: true }); + + const validClients = clients.filter((c) => c.hasDefinition); + + // ── Per-API doc ── + for (const client of validClients) { + const content = generateClientDoc(client); + writeFileSync(resolve(docsDir, `${client.kebabName}.md`), content); + } + + // ── Index doc ── + const indexLines = [ + `# epilot CLI — API Reference`, + ``, + `All ${validClients.length} epilot APIs available via the CLI.`, + ``, + `## Setup`, + ``, + '```bash', + `npx epilot auth login`, + '```', + ``, + `## APIs`, + ``, + `| API | Command | Operations | Docs |`, + `| --- | ------- | ---------- | ---- |`, + ]; + for (const c of validClients) { + indexLines.push( + `| ${c.title} | \`epilot ${c.kebabName}\` | ${c.operations.length} | [${c.kebabName}.md](./${c.kebabName}.md) |`, + ); + } + indexLines.push(``); + indexLines.push(`## Global Flags`); + indexLines.push(``); + indexLines.push(`| Flag | Alias | Description |`); + indexLines.push(`| ---- | ----- | ----------- |`); + indexLines.push(`| \`--token \` | \`-t\` | Bearer token |`); + indexLines.push(`| \`--profile \` | | Use a named profile (or \`EPILOT_PROFILE\` env) |`); + indexLines.push(`| \`--server \` | \`-s\` | Override server base URL |`); + indexLines.push(`| \`--json\` | | Output raw JSON (no colors) |`); + indexLines.push(`| \`--verbose\` | \`-v\` | Show full request details |`); + indexLines.push(`| \`--include\` | \`-i\` | Include response headers |`); + indexLines.push(`| \`--jsonata \` | | Transform response with JSONata |`); + indexLines.push(`| \`--guided\` | | Prompt for all parameters interactively |`); + indexLines.push(`| \`--no-interactive\` | | Disable interactive prompts |`); + indexLines.push(`| \`--definition \` | | Override OpenAPI spec |`); + indexLines.push(``); + indexLines.push(`## Per-Operation Flags`); + indexLines.push(``); + indexLines.push(`| Flag | Alias | Description |`); + indexLines.push(`| ---- | ----- | ----------- |`); + indexLines.push(`| \`-p key=value\` | \`--param\` | Set a parameter (repeatable) |`); + indexLines.push(`| \`-d ''\` | \`--data\` | Request body JSON |`); + indexLines.push(`| \`-H 'Key: Value'\` | \`--header\` | Custom header (repeatable) |`); + indexLines.push(``); + indexLines.push(`## Profiles`); + indexLines.push(``); + indexLines.push('```bash'); + indexLines.push(`# Create profiles for different environments`); + indexLines.push(`epilot profile create dev --server https://entity.dev.sls.epilot.io --token `); + indexLines.push( + `epilot profile create staging --server https://entity.staging.sls.epilot.io --token `, + ); + indexLines.push(``); + indexLines.push(`# Switch between profiles`); + indexLines.push(`epilot profile use dev`); + indexLines.push(``); + indexLines.push(`# Or use per-command`); + indexLines.push(`epilot entity listSchemas --profile staging`); + indexLines.push(``); + indexLines.push(`# Or via env var`); + indexLines.push(`EPILOT_PROFILE=dev epilot entity listSchemas`); + indexLines.push('```'); + indexLines.push(``); + + writeFileSync(resolve(docsDir, 'index.md'), indexLines.join('\n')); + + return validClients.length; +}; + +const updateReadme = (clients: ClientInfo[]): void => { + const readmePath = resolve(CLI_DIR, 'README.md'); + if (!existsSync(readmePath)) return; + + let readme = readFileSync(readmePath, 'utf-8'); + const validClients = clients.filter((c) => c.hasDefinition); + + // Generate help output (matches custom help in bin/epilot.ts) + const maxName = Math.max(...validClients.map((c) => c.kebabName.length)); + const apiLines = validClients.map((c) => ` ${c.kebabName.padEnd(maxName + 2)}${c.title}`); + + const helpBlock = [ + '', + '```', + `epilot v${CLI_VERSION} — CLI for epilot APIs`, + '', + 'USAGE', + ' epilot [params...] [flags]', + ' epilot List operations for an API', + ' epilot --help Show operation details', + '', + 'FLAGS', + ' -t, --token Bearer token for authentication', + ' --profile Use a named profile (or EPILOT_PROFILE)', + ' -s, --server Override server base URL', + ' --json Output raw JSON (no formatting)', + ' -v, --verbose Verbose output (show request details)', + ' --jsonata JSONata expression to transform response', + ' --guided Prompt for all parameters interactively', + ' --no-interactive Disable interactive prompts', + '', + 'PARAMETER FLAGS', + ' -p key=value Set a named parameter', + " -d '{...}' Request body JSON", + " -H 'Key: Value' Custom header", + ' -i, --include Include response headers in output', + '', + 'COMMANDS', + ' auth login Authenticate with epilot (browser)', + ' auth token Store an API token directly', + ' auth status Show authentication status', + ' auth logout Remove stored credentials', + ' profile Manage named profiles', + ' completion Generate shell completion scripts', + '', + 'APIs', + ...apiLines, + '', + 'EXAMPLES', + ' $ epilot auth login', + ' $ epilot user getMeV2', + ' $ epilot entity getEntity contact abc123', + ' $ epilot entity searchEntities -d \'{"q":"*"}\'', + " $ epilot entity searchEntities --jsonata 'results[0]._title'", + ' $ echo \'{"q":"*"}\' | epilot entity searchEntities', + '', + 'Run epilot to list available operations.', + 'Run epilot --help for operation details.', + '```', + '', + ].join('\n'); + + readme = readme.replace(/[\s\S]*?/, helpBlock); + + // Generate API reference table + const tableRows = validClients.map( + (c) => `| ${c.title} | \`epilot ${c.kebabName}\` | [docs](./docs/${c.kebabName}.md) |`, + ); + const apiTable = [ + '', + '| API | Command | Docs |', + '| --- | ------- | ---- |', + ...tableRows, + '', + ].join('\n'); + + readme = readme.replace(/[\s\S]*?/, apiTable); + + writeFileSync(readmePath, readme); +}; + +// ─── Main ───────────────────────────────────────────────────────────────────── + +const main = () => { + console.log('Discovering clients...'); + const clients = discoverClients(); + const validClients = clients.filter((c) => c.hasDefinition); + console.log(`Found ${clients.length} clients, ${validClients.length} with definitions`); + + console.log('Copying OpenAPI definitions...'); + copyDefinitions(clients); + + console.log('Generating api-list.ts...'); + mkdirSync(GENERATED_DIR, { recursive: true }); + writeFileSync(resolve(GENERATED_DIR, 'api-list.ts'), generateApiList(clients)); + + console.log('Generating per-API command files...'); + mkdirSync(APIS_CMD_DIR, { recursive: true }); + for (const client of validClients) { + writeFileSync(resolve(APIS_CMD_DIR, `${client.kebabName}.ts`), generateApiCommand(client)); + } + + console.log('Generating index.ts...'); + writeFileSync(resolve(CLI_DIR, 'src', 'index.ts'), generateIndexFile(clients)); + + console.log('Generating docs...'); + const docCount = generateDocs(clients); + + console.log('Updating README...'); + updateReadme(clients); + + console.log(`\nGenerated:`); + console.log(` - ${validClients.length} definition files`); + console.log(` - ${validClients.length} API command files`); + console.log(` - ${docCount} API doc files + index`); + console.log(` - 1 api-list.ts`); + console.log(` - 1 index.ts`); + const totalOps = validClients.reduce((sum, c) => sum + c.operations.length, 0); + console.log(` - ${totalOps} total operations across all APIs`); + console.log(`\nAPI names: ${validClients.map((c) => c.apiName).join(', ')}`); + + // Format generated files with biome + try { + execSync('npx biome check --write src/generated/ src/index.ts src/commands/apis/', { cwd: CLI_DIR, stdio: 'pipe' }); + } catch { + // biome may exit non-zero for unfixable issues; that's ok + } +}; + +main(); diff --git a/packages/cli/src/commands/apis/access-token.ts b/packages/cli/src/commands/apis/access-token.ts new file mode 100644 index 00000000..caa6b395 --- /dev/null +++ b/packages/cli/src/commands/apis/access-token.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'access-token', description: 'Access Token API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('access-token', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/address-suggestions.ts b/packages/cli/src/commands/apis/address-suggestions.ts new file mode 100644 index 00000000..c30814c8 --- /dev/null +++ b/packages/cli/src/commands/apis/address-suggestions.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'address-suggestions', description: 'Address Suggestions API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('address-suggestions', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/address.ts b/packages/cli/src/commands/apis/address.ts new file mode 100644 index 00000000..06b74b6b --- /dev/null +++ b/packages/cli/src/commands/apis/address.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'address', description: 'Address API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('address', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/ai-agents.ts b/packages/cli/src/commands/apis/ai-agents.ts new file mode 100644 index 00000000..3d3125ff --- /dev/null +++ b/packages/cli/src/commands/apis/ai-agents.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'ai-agents', description: 'AI Agents API - OpenAPI 3.0' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('ai-agents', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/app.ts b/packages/cli/src/commands/apis/app.ts new file mode 100644 index 00000000..d2fefd1d --- /dev/null +++ b/packages/cli/src/commands/apis/app.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'app', description: 'App API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('app', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/audit-logs.ts b/packages/cli/src/commands/apis/audit-logs.ts new file mode 100644 index 00000000..47e0724c --- /dev/null +++ b/packages/cli/src/commands/apis/audit-logs.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'audit-logs', description: 'Audit Log' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('audit-logs', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/automation.ts b/packages/cli/src/commands/apis/automation.ts new file mode 100644 index 00000000..7f0c314d --- /dev/null +++ b/packages/cli/src/commands/apis/automation.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'automation', description: 'Automation API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('automation', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/billing.ts b/packages/cli/src/commands/apis/billing.ts new file mode 100644 index 00000000..849c8523 --- /dev/null +++ b/packages/cli/src/commands/apis/billing.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'billing', description: 'Billing API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('billing', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/blueprint-manifest.ts b/packages/cli/src/commands/apis/blueprint-manifest.ts new file mode 100644 index 00000000..c59ba097 --- /dev/null +++ b/packages/cli/src/commands/apis/blueprint-manifest.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'blueprint-manifest', description: 'Blueprint Manifest API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('blueprint-manifest', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/consent.ts b/packages/cli/src/commands/apis/consent.ts new file mode 100644 index 00000000..e144d5fa --- /dev/null +++ b/packages/cli/src/commands/apis/consent.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'consent', description: 'Consent API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('consent', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/customer-portal.ts b/packages/cli/src/commands/apis/customer-portal.ts new file mode 100644 index 00000000..8df2ef2d --- /dev/null +++ b/packages/cli/src/commands/apis/customer-portal.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'customer-portal', description: 'Portal API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('customer-portal', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/dashboard.ts b/packages/cli/src/commands/apis/dashboard.ts new file mode 100644 index 00000000..302de491 --- /dev/null +++ b/packages/cli/src/commands/apis/dashboard.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'dashboard', description: 'Dashboard API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('dashboard', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/data-management.ts b/packages/cli/src/commands/apis/data-management.ts new file mode 100644 index 00000000..a9dc7651 --- /dev/null +++ b/packages/cli/src/commands/apis/data-management.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'data-management', description: 'Data Management API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('data-management', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/deduplication.ts b/packages/cli/src/commands/apis/deduplication.ts new file mode 100644 index 00000000..1e3bb63b --- /dev/null +++ b/packages/cli/src/commands/apis/deduplication.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'deduplication', description: 'Deduplication API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('deduplication', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/design.ts b/packages/cli/src/commands/apis/design.ts new file mode 100644 index 00000000..7a878d5e --- /dev/null +++ b/packages/cli/src/commands/apis/design.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'design', description: 'Design Builder API v2' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('design', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/document.ts b/packages/cli/src/commands/apis/document.ts new file mode 100644 index 00000000..324aedc6 --- /dev/null +++ b/packages/cli/src/commands/apis/document.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'document', description: 'Document API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('document', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/email-settings.ts b/packages/cli/src/commands/apis/email-settings.ts new file mode 100644 index 00000000..aa4fd784 --- /dev/null +++ b/packages/cli/src/commands/apis/email-settings.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'email-settings', description: 'Messaging Settings API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('email-settings', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/email-template.ts b/packages/cli/src/commands/apis/email-template.ts new file mode 100644 index 00000000..a9c48477 --- /dev/null +++ b/packages/cli/src/commands/apis/email-template.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'email-template', description: 'Email template API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('email-template', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/entity-mapping.ts b/packages/cli/src/commands/apis/entity-mapping.ts new file mode 100644 index 00000000..19ee0d77 --- /dev/null +++ b/packages/cli/src/commands/apis/entity-mapping.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'entity-mapping', description: 'Entity Mapping API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('entity-mapping', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/entity.ts b/packages/cli/src/commands/apis/entity.ts new file mode 100644 index 00000000..ce8424df --- /dev/null +++ b/packages/cli/src/commands/apis/entity.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'entity', description: 'Entity API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('entity', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/environments.ts b/packages/cli/src/commands/apis/environments.ts new file mode 100644 index 00000000..6460008c --- /dev/null +++ b/packages/cli/src/commands/apis/environments.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'environments', description: 'Environments API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('environments', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/erp-integration.ts b/packages/cli/src/commands/apis/erp-integration.ts new file mode 100644 index 00000000..f15de155 --- /dev/null +++ b/packages/cli/src/commands/apis/erp-integration.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'erp-integration', description: 'ERP Integration API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('erp-integration', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/event-catalog.ts b/packages/cli/src/commands/apis/event-catalog.ts new file mode 100644 index 00000000..5c8d20bf --- /dev/null +++ b/packages/cli/src/commands/apis/event-catalog.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'event-catalog', description: 'Event Catalog API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('event-catalog', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/file.ts b/packages/cli/src/commands/apis/file.ts new file mode 100644 index 00000000..01bfc41d --- /dev/null +++ b/packages/cli/src/commands/apis/file.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'file', description: 'File API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('file', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/iban.ts b/packages/cli/src/commands/apis/iban.ts new file mode 100644 index 00000000..1254c022 --- /dev/null +++ b/packages/cli/src/commands/apis/iban.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'iban', description: 'Iban API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('iban', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/journey.ts b/packages/cli/src/commands/apis/journey.ts new file mode 100644 index 00000000..1f74a55c --- /dev/null +++ b/packages/cli/src/commands/apis/journey.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'journey', description: 'Journey API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('journey', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/kanban.ts b/packages/cli/src/commands/apis/kanban.ts new file mode 100644 index 00000000..f54decbf --- /dev/null +++ b/packages/cli/src/commands/apis/kanban.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'kanban', description: 'Kanban API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('kanban', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/message.ts b/packages/cli/src/commands/apis/message.ts new file mode 100644 index 00000000..f1d61c58 --- /dev/null +++ b/packages/cli/src/commands/apis/message.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'message', description: 'Message API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('message', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/metering.ts b/packages/cli/src/commands/apis/metering.ts new file mode 100644 index 00000000..b0602adf --- /dev/null +++ b/packages/cli/src/commands/apis/metering.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'metering', description: 'Metering API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('metering', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/notes.ts b/packages/cli/src/commands/apis/notes.ts new file mode 100644 index 00000000..9d37d66e --- /dev/null +++ b/packages/cli/src/commands/apis/notes.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'notes', description: 'Notes API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('notes', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/notification.ts b/packages/cli/src/commands/apis/notification.ts new file mode 100644 index 00000000..89b383c4 --- /dev/null +++ b/packages/cli/src/commands/apis/notification.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'notification', description: 'Notification API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('notification', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/organization.ts b/packages/cli/src/commands/apis/organization.ts new file mode 100644 index 00000000..b3f1a7e3 --- /dev/null +++ b/packages/cli/src/commands/apis/organization.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'organization', description: 'Organization API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('organization', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/partner-directory.ts b/packages/cli/src/commands/apis/partner-directory.ts new file mode 100644 index 00000000..f0f5ddf0 --- /dev/null +++ b/packages/cli/src/commands/apis/partner-directory.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'partner-directory', description: 'Partner API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('partner-directory', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/permissions.ts b/packages/cli/src/commands/apis/permissions.ts new file mode 100644 index 00000000..b2d6de5e --- /dev/null +++ b/packages/cli/src/commands/apis/permissions.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'permissions', description: 'Permissions API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('permissions', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/pricing-tier.ts b/packages/cli/src/commands/apis/pricing-tier.ts new file mode 100644 index 00000000..7ef7d86f --- /dev/null +++ b/packages/cli/src/commands/apis/pricing-tier.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'pricing-tier', description: 'Pricing Tier API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('pricing-tier', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/pricing.ts b/packages/cli/src/commands/apis/pricing.ts new file mode 100644 index 00000000..3e03474a --- /dev/null +++ b/packages/cli/src/commands/apis/pricing.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'pricing', description: 'Pricing API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('pricing', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/purpose.ts b/packages/cli/src/commands/apis/purpose.ts new file mode 100644 index 00000000..4b424301 --- /dev/null +++ b/packages/cli/src/commands/apis/purpose.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'purpose', description: 'Purpose API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('purpose', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/sandbox.ts b/packages/cli/src/commands/apis/sandbox.ts new file mode 100644 index 00000000..395b54e0 --- /dev/null +++ b/packages/cli/src/commands/apis/sandbox.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'sandbox', description: 'Sandbox API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('sandbox', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/submission.ts b/packages/cli/src/commands/apis/submission.ts new file mode 100644 index 00000000..4b6a57f2 --- /dev/null +++ b/packages/cli/src/commands/apis/submission.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'submission', description: 'Submission API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('submission', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/targeting.ts b/packages/cli/src/commands/apis/targeting.ts new file mode 100644 index 00000000..24945a17 --- /dev/null +++ b/packages/cli/src/commands/apis/targeting.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'targeting', description: 'Targeting API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('targeting', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/template-variables.ts b/packages/cli/src/commands/apis/template-variables.ts new file mode 100644 index 00000000..08ceda29 --- /dev/null +++ b/packages/cli/src/commands/apis/template-variables.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'template-variables', description: 'Template Variables API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('template-variables', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/user.ts b/packages/cli/src/commands/apis/user.ts new file mode 100644 index 00000000..a08fd553 --- /dev/null +++ b/packages/cli/src/commands/apis/user.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'user', description: 'User API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('user', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/validation-rules.ts b/packages/cli/src/commands/apis/validation-rules.ts new file mode 100644 index 00000000..88c10ff6 --- /dev/null +++ b/packages/cli/src/commands/apis/validation-rules.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'validation-rules', description: 'Validation Rules API' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('validation-rules', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/webhooks.ts b/packages/cli/src/commands/apis/webhooks.ts new file mode 100644 index 00000000..aca49373 --- /dev/null +++ b/packages/cli/src/commands/apis/webhooks.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'webhooks', description: 'Webhooks' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('webhooks', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/workflow-definition.ts b/packages/cli/src/commands/apis/workflow-definition.ts new file mode 100644 index 00000000..a88c6291 --- /dev/null +++ b/packages/cli/src/commands/apis/workflow-definition.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'workflow-definition', description: 'Workflows Definitions' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('workflow-definition', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/apis/workflow.ts b/packages/cli/src/commands/apis/workflow.ts new file mode 100644 index 00000000..15303d7b --- /dev/null +++ b/packages/cli/src/commands/apis/workflow.ts @@ -0,0 +1,46 @@ +// Auto-generated by scripts/generate.ts — do not edit +import { defineCommand } from 'citty'; +import { callApi } from '../../lib/call.js'; + +export default defineCommand({ + meta: { name: 'workflow', description: 'Workflows Executions' }, + args: { + operation: { type: 'positional', description: 'operationId to call', required: false }, + param: { type: 'string', alias: 'p', description: 'Parameter key=value' }, + data: { type: 'string', alias: 'd', description: 'Request body JSON' }, + header: { type: 'string', alias: 'H', description: 'Custom header' }, + include: { type: 'boolean', alias: 'i', description: 'Include response headers' }, + definition: { type: 'string', description: 'Override OpenAPI spec file/URL' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + profile: { type: 'string', description: 'Use a named profile' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression to transform response' }, + _ophelp: { type: 'boolean', description: 'Show operation help', required: false }, + _apihelp: { type: 'boolean', description: 'Show API help', required: false }, + }, + run: ({ args, rawArgs }) => { + // Extract additional positional args (after operationId) + const positionalArgs: string[] = []; + if (args.operation && rawArgs) { + const opIdx = rawArgs.indexOf(args.operation); + if (opIdx >= 0) { + for (let i = opIdx + 1; i < rawArgs.length; i++) { + const arg = rawArgs[i]; + if (arg.startsWith('-')) break; + positionalArgs.push(arg); + } + } + } + + return callApi('workflow', { + ...args, + help: !!(args as Record)._ophelp, + _apihelp: !!(args as Record)._apihelp, + _args: positionalArgs, + }); + }, +}); diff --git a/packages/cli/src/commands/auth-login.ts b/packages/cli/src/commands/auth-login.ts new file mode 100644 index 00000000..52d961b4 --- /dev/null +++ b/packages/cli/src/commands/auth-login.ts @@ -0,0 +1,333 @@ +import { defineCommand } from 'citty'; +import { randomBytes } from 'node:crypto'; +import { createServer } from 'node:http'; +import { saveCredentials } from '../lib/auth-store.js'; +import { BOLD, RESET, GREEN, RED, DIM, YELLOW, CYAN } from '../lib/utils.js'; + +export default defineCommand({ + meta: { name: 'login', description: 'Authenticate with epilot' }, + args: { + token: { type: 'string', description: 'Manually provide a token instead of browser login' }, + profile: { type: 'string', description: 'Save credentials to this profile' }, + }, + run: async ({ args }) => { + const profileName = args.profile || process.env.EPILOT_PROFILE; + + // Manual token input + if (args.token) { + saveCredentials({ token: args.token }, profileName); + const suffix = profileName ? ` to profile "${profileName}"` : ''; + process.stdout.write(`${GREEN}Token saved${suffix}.${RESET}\n`); + return; + } + + if (!process.stdin.isTTY) { + process.stderr.write(`${RED}Browser login requires an interactive terminal.${RESET}\n`); + process.stderr.write( + `Use ${BOLD}epilot auth login --token ${RESET} or ${BOLD}epilot auth token${RESET} instead.\n`, + ); + process.exit(1); + } + + const token = await browserLogin(profileName); + if (token) { + process.stdout.write(`${GREEN}${BOLD}Login successful!${RESET}\n`); + } else { + process.stderr.write(`${RED}Login failed or was cancelled.${RESET}\n`); + process.exit(1); + } + }, +}); + +const browserLogin = async (profileName?: string): Promise => { + // Generate a cryptographic state parameter to prevent CSRF + const state = randomBytes(32).toString('hex'); + + // Generate a short verification code the user must confirm after login + const verificationCode = randomBytes(3).toString('hex').toUpperCase(); + + // Show what we're about to do and wait for user confirmation + const suffix = profileName ? ` ${DIM}(profile: ${profileName})${RESET}` : ''; + process.stdout.write(`\n${BOLD}epilot CLI Login${RESET}${suffix}\n\n`); + process.stdout.write('This will open your browser to authenticate with epilot.\n'); + process.stdout.write('\n'); + process.stdout.write(` ${YELLOW}Verification code: ${BOLD}${verificationCode}${RESET}\n`); + process.stdout.write('\n'); + process.stdout.write(`${DIM}Verify this code matches what is shown in your browser after login.${RESET}\n`); + process.stdout.write(`${DIM}This ensures you are logging into the correct CLI session.${RESET}\n`); + process.stdout.write('\n'); + + const { confirm } = await import('@inquirer/prompts'); + const proceed = await confirm({ message: 'Open browser to log in?', default: true }); + if (!proceed) { + return null; + } + + return new Promise((resolve) => { + let settled = false; + let timeoutId: ReturnType; + let tokenPromptController: AbortController | undefined; + + const done = (token: string | null) => { + if (settled) return; + settled = true; + clearTimeout(timeoutId); + + // Cancel the token prompt if it's still waiting + tokenPromptController?.abort(); + + // Force-close all connections so the process can exit + server.closeAllConnections(); + server.close(); + resolve(token); + }; + + const onServerListening = async () => { + const address = server.address(); + if (!address || typeof address === 'string') { + done(null); + return; + } + + const port = address.port; + const callbackUrl = `http://localhost:${port}/callback`; + const loginUrl = + `https://portal.epilot.cloud/login?cli_callback=${encodeURIComponent(callbackUrl)}` + + `&state=${state}` + + `&code=${verificationCode}`; + + process.stdout.write(`\n${DIM}Login URL: ${loginUrl}${RESET}\n\n`); + + try { + const open = (await import('open')).default; + await open(loginUrl); + process.stdout.write(`${CYAN}Browser opened.${RESET} Waiting for authentication...\n`); + } catch { + process.stdout.write(`Could not open browser. Please visit this URL manually:\n\n ${loginUrl}\n\n`); + } + + // Timeout after 5 minutes + timeoutId = setTimeout( + () => { + process.stderr.write(`\n${RED}Login timed out after 5 minutes.${RESET}\n`); + done(null); + }, + 5 * 60 * 1000, + ); + timeoutId.unref(); + + // Fallback: allow manual token paste (masked) while waiting for browser + process.stdout.write(`\n${DIM}Or paste a token manually:${RESET}\n`); + try { + const { password } = await import('@inquirer/prompts'); + tokenPromptController = new AbortController(); + const token = await password( + { message: 'Token:', theme: { prefix: '' } }, + { signal: tokenPromptController.signal }, + ); + if (token?.trim()) { + saveCredentials({ token: token.trim() }, profileName); + done(token.trim()); + } + } catch { + // User cancelled (Ctrl+C) or prompt was aborted by browser callback + } + }; + + const server = createServer((req, res) => { + const url = new URL(req.url!, 'http://localhost'); + + if (url.pathname === '/callback') { + const token = url.searchParams.get('token'); + const returnedState = url.searchParams.get('state'); + const orgId = url.searchParams.get('org_id'); + const userId = url.searchParams.get('user_id'); + const name = url.searchParams.get('name'); + + // Verify state parameter to prevent CSRF + if (returnedState && returnedState !== state) { + res.writeHead(403, { 'Content-Type': 'text/html; charset=utf-8' }); + res.end( + renderPage('Login Failed', 'Invalid session. This request may not have originated from your CLI.', 'error'), + ); + return; + } + + if (!returnedState) { + process.stderr.write( + `${YELLOW}Warning: Login portal did not return state parameter. CSRF protection is not active.${RESET}\n`, + ); + } + + if (token) { + saveCredentials( + { + token, + org_id: orgId ?? undefined, + user_id: userId ?? undefined, + name: name ?? undefined, + }, + profileName, + ); + + res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); + res.end( + renderPage( + 'Login Successful', + 'You can close this tab and return to your terminal.', + 'success', + verificationCode, + ), + ); + done(token); + } else { + res.writeHead(400, { 'Content-Type': 'text/html; charset=utf-8' }); + res.end(renderPage('Login Failed', 'No token was received. Please try again.', 'error')); + done(null); + } + } else { + res.writeHead(404); + res.end(); + } + }); + + server.unref(); + + server.listen(0, () => { + onServerListening().catch(() => done(null)); + }); + }); +}; + +// ── Branded HTML pages ──────────────────────────────────────────────────────── + +const renderPage = (title: string, message: string, status: 'success' | 'error', code?: string): string => { + const icon = status === 'success' ? '✓' : '✕'; + const iconBg = status === 'success' ? '#e8f5e9' : '#ffeef0'; + const iconColor = status === 'success' ? '#2e7d32' : '#c62828'; + const titleColor = status === 'success' ? '#1b5e20' : '#b71c1c'; + + const codeBlock = code + ? ` +
+

Verification code

+
${escapeHtml(code)}
+
` + : ''; + + return ` + + + + + ${escapeHtml(title)} — epilot CLI + + + + +
+ +
+ ${icon} +
+

${escapeHtml(title)}

+

${escapeHtml(message)}

+ ${codeBlock} + +
+ +`; +}; + +const escapeHtml = (s: string): string => + s.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); diff --git a/packages/cli/src/commands/auth-token.ts b/packages/cli/src/commands/auth-token.ts new file mode 100644 index 00000000..4f7b19c0 --- /dev/null +++ b/packages/cli/src/commands/auth-token.ts @@ -0,0 +1,33 @@ +import { defineCommand } from 'citty'; +import { saveCredentials } from '../lib/auth-store.js'; +import { BOLD, RESET, GREEN, RED } from '../lib/utils.js'; + +export default defineCommand({ + meta: { name: 'token', description: 'Store an API token directly' }, + args: { + token: { type: 'positional', description: 'API token to store', required: false }, + profile: { type: 'string', description: 'Save credentials to this profile' }, + }, + run: async ({ args }) => { + const profileName = args.profile || process.env.EPILOT_PROFILE; + + let token = args.token as string | undefined; + + if (!token) { + // Prompt interactively with masked input + const { password } = await import('@inquirer/prompts'); + token = await password({ + message: 'Paste your API token:', + }); + } + + if (!token) { + process.stderr.write(`${RED}No token provided.${RESET}\n`); + process.exit(1); + } + + saveCredentials({ token }, profileName); + const suffix = profileName ? ` to profile "${profileName}"` : ''; + process.stdout.write(`${GREEN}${BOLD}Token saved${suffix}.${RESET}\n`); + }, +}); diff --git a/packages/cli/src/commands/auth.ts b/packages/cli/src/commands/auth.ts new file mode 100644 index 00000000..f557a369 --- /dev/null +++ b/packages/cli/src/commands/auth.ts @@ -0,0 +1,101 @@ +import { defineCommand } from 'citty'; +import { loadCredentials, removeCredentials } from '../lib/auth-store.js'; +import { BOLD, RESET, GREEN, RED, DIM, YELLOW } from '../lib/utils.js'; + +export default defineCommand({ + meta: { + name: 'auth', + description: 'Manage authentication', + }, + subCommands: { + login: () => import('./auth-login.js').then((m) => m.default), + token: () => import('./auth-token.js').then((m) => m.default), + logout: defineCommand({ + meta: { name: 'logout', description: 'Remove stored credentials' }, + run: () => { + const removed = removeCredentials(); + if (removed) { + process.stdout.write(`${GREEN}Logged out successfully.${RESET}\n`); + } else { + process.stdout.write(`No stored credentials found.\n`); + } + }, + }), + status: defineCommand({ + meta: { name: 'status', description: 'Show authentication status' }, + run: () => { + const creds = loadCredentials(); + if (!creds) { + process.stdout.write(`${YELLOW}Not authenticated.${RESET}\n`); + process.stdout.write(`Run ${BOLD}epilot auth login${RESET} to authenticate.\n`); + return; + } + + const claims = parseJwtPayload(creds.token); + const isApiToken = claims?.token_type === 'api'; + const isCognitoToken = typeof claims?.iss === 'string' && claims.iss.includes('cognito-idp'); + const tokenType = isApiToken ? 'API Token' : isCognitoToken ? 'User Token' : 'Token'; + + process.stdout.write(`${GREEN}${BOLD}Authenticated${RESET} ${DIM}(${tokenType})${RESET}\n`); + + // Resolve fields from JWT claims (API token vs Cognito token vs stored creds) + const name = (claims?.token_name || claims?.email || claims?.['cognito:username'] || creds.name) as + | string + | undefined; + const orgId = (claims?.org_id || claims?.['custom:ivy_org_id'] || creds.org_id) as string | undefined; + const userId = (claims?.user_id || claims?.['custom:ivy_user_id'] || creds.user_id) as string | undefined; + const tokenId = claims?.token_id as string | undefined; + const adminEmail = claims?.admin_email as string | undefined; + const tokenUse = claims?.token_use as string | undefined; + const roles = claims?.assume_roles as string[] | undefined; + + if (name) process.stdout.write(` Name: ${name}\n`); + if (adminEmail && adminEmail !== name) process.stdout.write(` Email: ${adminEmail}\n`); + if (orgId) process.stdout.write(` Org: ${orgId}\n`); + if (userId) process.stdout.write(` User: ${userId}\n`); + if (tokenId && tokenId !== userId) process.stdout.write(` Token ID: ${tokenId}\n`); + if (tokenUse) process.stdout.write(` Use: ${tokenUse}\n`); + if (roles?.length) process.stdout.write(` Roles: ${roles.join(', ')}\n`); + + // Expiry + if (creds.expires_at) { + const expiry = new Date(creds.expires_at); + const now = new Date(); + const days = Math.floor((expiry.getTime() - now.getTime()) / (1000 * 60 * 60 * 24)); + process.stdout.write(` Expires: ${creds.expires_at} ${DIM}(${days} days)${RESET}\n`); + } else if (claims?.exp) { + const expiry = new Date((claims.exp as number) * 1000); + const now = new Date(); + const diffMs = expiry.getTime() - now.getTime(); + const label = + diffMs < 0 + ? `${RED}expired${RESET}` + : diffMs < 86400000 + ? `${Math.floor(diffMs / 3600000)}h ${Math.floor((diffMs % 3600000) / 60000)}m` + : `${Math.floor(diffMs / 86400000)} days`; + process.stdout.write(` Expires: ${expiry.toISOString()} ${DIM}(${label})${RESET}\n`); + } else if (claims?.iat && !claims?.exp) { + const issued = new Date((claims.iat as number) * 1000); + process.stdout.write(` Issued: ${issued.toISOString()} ${DIM}(no expiry)${RESET}\n`); + } + + process.stdout.write(` Token: ${creds.token.substring(0, 20)}...${RESET}\n`); + }, + }), + }, +}); + +/** + * Decode a JWT payload without verifying the signature. + * Returns null if the token is not a valid JWT. + */ +const parseJwtPayload = (token: string): Record | null => { + try { + const parts = token.split('.'); + if (parts.length !== 3) return null; + const payload = Buffer.from(parts[1], 'base64url').toString('utf-8'); + return JSON.parse(payload); + } catch { + return null; + } +}; diff --git a/packages/cli/src/commands/completion.ts b/packages/cli/src/commands/completion.ts new file mode 100644 index 00000000..1afcd877 --- /dev/null +++ b/packages/cli/src/commands/completion.ts @@ -0,0 +1,227 @@ +import { defineCommand } from 'citty'; +import { existsSync, mkdirSync, readFileSync, writeFileSync, appendFileSync } from 'node:fs'; +import { homedir } from 'node:os'; +import { join } from 'node:path'; +import { API_LIST } from '../generated/api-list.js'; +import { RESET, GREEN, DIM, YELLOW, RED } from '../lib/utils.js'; + +const BASH_SCRIPT = ` +_epilot_completions() { + local cur="\${COMP_WORDS[COMP_CWORD]}" + local cmd="\${COMP_WORDS[0]}" + + if [[ \${COMP_CWORD} -eq 1 ]]; then + # First arg: subcommands (APIs + auth + profile + completion) + COMPREPLY=( $(compgen -W "$(\${cmd} --_completions subcommands 2>/dev/null)" -- "\${cur}") ) + return + fi + + if [[ \${COMP_CWORD} -eq 2 ]]; then + # Second arg: operationIds for the given API + local api="\${COMP_WORDS[1]}" + COMPREPLY=( $(compgen -W "$(\${cmd} --_completions operations \${api} 2>/dev/null)" -- "\${cur}") ) + return + fi + + # Flags + if [[ "\${cur}" == -* ]]; then + COMPREPLY=( $(compgen -W "--token --profile --server --json --verbose --interactive --no-interactive --jsonata --include --data --param --header --definition --help" -- "\${cur}") ) + return + fi +} + +complete -F _epilot_completions epilot +`.trim(); + +const ZSH_SCRIPT = ` +#compdef epilot + +_epilot() { + local -a subcommands operations flags + + _arguments -C \\ + '1:api:->api' \\ + '2:operation:->operation' \\ + '*:flags:->flags' + + case "$state" in + api) + subcommands=(\${(f)"$(epilot --_completions subcommands 2>/dev/null)"}) + _describe 'api' subcommands + ;; + operation) + operations=(\${(f)"$(epilot --_completions operations $words[2] 2>/dev/null)"}) + _describe 'operation' operations + ;; + flags) + flags=( + '--token[Bearer token]:token:' + '--profile[Use a named profile]:profile:' + '--server[Override server base URL]:url:' + '--json[Output raw JSON]' + '--verbose[Verbose output]' + '--interactive[Interactive mode]' + '--no-interactive[Disable interactive mode]' + '--jsonata[JSONata expression]:expr:' + '--include[Include response headers]' + '-d[Request body JSON]:json:' + '-p[Parameter key=value]:param:' + '-H[Custom header]:header:' + '--definition[Override OpenAPI spec]:file:_files' + '--help[Show help]' + ) + _arguments "$flags[@]" + ;; + esac +} + +_epilot +`.trim(); + +const FISH_SCRIPT = ` +# Fish completions for epilot + +# Disable file completions by default +complete -c epilot -f + +# Subcommands (first arg) +complete -c epilot -n '__fish_use_subcommand' -a '(epilot --_completions subcommands 2>/dev/null)' + +# Operations (second arg) +complete -c epilot -n '__fish_seen_subcommand_from (epilot --_completions subcommands 2>/dev/null)' \\ + -a '(epilot --_completions operations (commandline -opc)[2] 2>/dev/null)' + +# Global flags +complete -c epilot -l token -s t -d 'Bearer token' -r +complete -c epilot -l profile -d 'Use a named profile' -r +complete -c epilot -l server -s s -d 'Override server base URL' -r +complete -c epilot -l json -d 'Output raw JSON' +complete -c epilot -l verbose -s v -d 'Verbose output' +complete -c epilot -l interactive -d 'Interactive mode' +complete -c epilot -l no-interactive -d 'Disable interactive mode' +complete -c epilot -l jsonata -d 'JSONata expression' -r +complete -c epilot -l include -s i -d 'Include response headers' +complete -c epilot -s d -d 'Request body JSON' -r +complete -c epilot -s p -d 'Parameter key=value' -r +complete -c epilot -s H -d 'Custom header' -r +complete -c epilot -l definition -d 'Override OpenAPI spec' -r -F +complete -c epilot -l help -d 'Show help' +`.trim(); + +/** Handle `epilot --_completions [api]` for dynamic shell completions */ +export const handleCompletions = (type: string, api?: string): void => { + if (type === 'subcommands') { + const names = API_LIST.map((a) => a.kebabName); + names.push('auth', 'profile', 'completion', 'upgrade'); + console.log(names.join('\n')); + return; + } + + if (type === 'operations' && api) { + const info = API_LIST.find((a) => a.kebabName === api); + if (info) { + console.log(info.operationIds.join('\n')); + } + return; + } +}; + +export default defineCommand({ + meta: { name: 'completion', description: 'Generate or install shell completion scripts' }, + args: { + shell: { + type: 'positional', + description: 'Shell type: bash, zsh, or fish', + required: false, + }, + install: { + type: 'boolean', + description: 'Install completions to your shell config', + }, + }, + run: async ({ args }) => { + const shell = args.shell || detectShell(); + + if (args.install) { + await installCompletions(shell); + return; + } + + switch (shell) { + case 'bash': + console.log(BASH_SCRIPT); + console.log('\n# Add to your ~/.bashrc:'); + console.log('# eval "$(epilot completion bash)"'); + console.log('# Or run: epilot completion --install'); + break; + case 'zsh': + console.log(ZSH_SCRIPT); + console.log('\n# Add to your ~/.zshrc:'); + console.log('# eval "$(epilot completion zsh)"'); + console.log('# Or run: epilot completion --install'); + break; + case 'fish': + console.log(FISH_SCRIPT); + console.log('\n# Save to ~/.config/fish/completions/epilot.fish:'); + console.log('# epilot completion fish > ~/.config/fish/completions/epilot.fish'); + console.log('# Or run: epilot completion --install'); + break; + default: + console.error(`Unknown shell: ${shell}. Supported: bash, zsh, fish`); + process.exit(1); + } + }, +}); + +const EVAL_LINE_BASH = 'eval "$(epilot completion bash)"'; +const EVAL_LINE_ZSH = 'eval "$(epilot completion zsh)"'; + +const installCompletions = async (shell: string): Promise => { + const home = homedir(); + + switch (shell) { + case 'bash': { + const rcFile = join(home, '.bashrc'); + addEvalLine(rcFile, EVAL_LINE_BASH, '.bashrc'); + break; + } + case 'zsh': { + const rcFile = join(home, '.zshrc'); + addEvalLine(rcFile, EVAL_LINE_ZSH, '.zshrc'); + break; + } + case 'fish': { + const dir = join(home, '.config', 'fish', 'completions'); + const file = join(dir, 'epilot.fish'); + mkdirSync(dir, { recursive: true }); + writeFileSync(file, `${FISH_SCRIPT}\n`); + process.stdout.write(`${GREEN}Completions written to ${file}${RESET}\n`); + process.stdout.write(`${DIM}Fish will pick them up automatically.${RESET}\n`); + break; + } + default: + process.stderr.write(`${RED}Unknown shell: ${shell}. Supported: bash, zsh, fish${RESET}\n`); + process.exit(1); + } +}; + +const addEvalLine = (rcFile: string, evalLine: string, rcName: string): void => { + const existing = existsSync(rcFile) ? readFileSync(rcFile, 'utf-8') : ''; + + if (existing.includes(evalLine)) { + process.stdout.write(`${YELLOW}Completions already installed in ~/${rcName}${RESET}\n`); + return; + } + + const line = `\n# epilot CLI completions\n${evalLine}\n`; + appendFileSync(rcFile, line); + process.stdout.write(`${GREEN}Completions added to ~/${rcName}${RESET}\n`); + process.stdout.write(`${DIM}Restart your shell or run: source ~/${rcName}${RESET}\n`); +}; + +const detectShell = (): string => { + const shell = process.env.SHELL || ''; + if (shell.includes('zsh')) return 'zsh'; + if (shell.includes('fish')) return 'fish'; + return 'bash'; +}; diff --git a/packages/cli/src/commands/profile.ts b/packages/cli/src/commands/profile.ts new file mode 100644 index 00000000..483bd582 --- /dev/null +++ b/packages/cli/src/commands/profile.ts @@ -0,0 +1,105 @@ +import { defineCommand } from 'citty'; +import { listProfiles, upsertProfile, deleteProfile, setActiveProfile, loadProfiles } from '../lib/profiles.js'; +import { BOLD, RESET, GREEN, RED, DIM } from '../lib/utils.js'; + +export default defineCommand({ + meta: { + name: 'profile', + description: 'Manage profiles (server URLs, tokens, environments)', + }, + subCommands: { + list: defineCommand({ + meta: { name: 'list', description: 'List all profiles' }, + run: () => { + const profiles = listProfiles(); + if (profiles.length === 0) { + process.stdout.write(`No profiles configured.\n`); + process.stdout.write(`Run ${BOLD}epilot profile create ${RESET} to create one.\n`); + return; + } + for (const { name, profile, active } of profiles) { + const marker = active ? `${GREEN}* ${RESET}` : ' '; + const server = profile.server ? ` ${DIM}server=${profile.server}${RESET}` : ''; + const token = profile.token ? ` ${DIM}token=***${RESET}` : ''; + const org = profile.org_id ? ` ${DIM}org=${profile.org_id}${RESET}` : ''; + process.stdout.write(`${marker}${BOLD}${name}${RESET}${server}${token}${org}\n`); + } + }, + }), + + create: defineCommand({ + meta: { name: 'create', description: 'Create or update a profile' }, + args: { + name: { type: 'positional', description: 'Profile name', required: true }, + server: { type: 'string', alias: 's', description: 'Server base URL' }, + token: { type: 'string', alias: 't', description: 'Bearer token' }, + }, + run: ({ args }) => { + upsertProfile(args.name, { + name: args.name, + server: args.server, + token: args.token, + }); + process.stdout.write(`${GREEN}Profile "${args.name}" saved.${RESET}\n`); + }, + }), + + use: defineCommand({ + meta: { name: 'use', description: 'Set the active profile' }, + args: { + name: { type: 'positional', description: 'Profile name', required: true }, + }, + run: ({ args }) => { + if (setActiveProfile(args.name)) { + process.stdout.write(`${GREEN}Active profile set to "${args.name}".${RESET}\n`); + } else { + process.stderr.write(`${RED}Profile "${args.name}" not found.${RESET}\n`); + process.exit(1); + } + }, + }), + + show: defineCommand({ + meta: { name: 'show', description: 'Show details of a profile' }, + args: { + name: { type: 'positional', description: 'Profile name', required: true }, + }, + run: ({ args }) => { + const config = loadProfiles(); + const profile = config.profiles[args.name]; + if (!profile) { + process.stderr.write(`${RED}Profile "${args.name}" not found.${RESET}\n`); + process.exit(1); + } + const active = config.active === args.name; + process.stdout.write(`${BOLD}${args.name}${RESET}${active ? ` ${GREEN}(active)${RESET}` : ''}\n`); + if (profile.server) process.stdout.write(` Server: ${profile.server}\n`); + if (profile.token) process.stdout.write(` Token: ${profile.token.substring(0, 20)}...\n`); + if (profile.org_id) process.stdout.write(` Org: ${profile.org_id}\n`); + if (profile.user_id) process.stdout.write(` User: ${profile.user_id}\n`); + if (profile.expires_at) process.stdout.write(` Expires: ${profile.expires_at}\n`); + if (profile.headers) { + process.stdout.write(` Headers:\n`); + for (const [k, v] of Object.entries(profile.headers)) { + process.stdout.write(` ${k}: ${v}\n`); + } + } + }, + }), + + delete: defineCommand({ + meta: { name: 'delete', description: 'Delete a profile' }, + args: { + name: { type: 'positional', description: 'Profile name', required: true }, + }, + run: ({ args }) => { + if (deleteProfile(args.name)) { + process.stdout.write(`${GREEN}Profile "${args.name}" deleted.${RESET}\n`); + } else { + process.stderr.write(`${RED}Profile "${args.name}" not found.${RESET}\n`); + process.exit(1); + } + }, + }), + }, +}); diff --git a/packages/cli/src/commands/upgrade.ts b/packages/cli/src/commands/upgrade.ts new file mode 100644 index 00000000..af127fea --- /dev/null +++ b/packages/cli/src/commands/upgrade.ts @@ -0,0 +1,124 @@ +import { defineCommand } from 'citty'; +import { execSync } from 'node:child_process'; +import { BOLD, RESET, GREEN, RED, DIM, YELLOW, CYAN } from '../lib/utils.js'; + +declare const __CLI_VERSION__: string; + +export default defineCommand({ + meta: { name: 'upgrade', description: 'Upgrade @epilot/cli to the latest version' }, + args: { + check: { type: 'boolean', description: 'Only check for updates, do not install' }, + }, + run: async ({ args }) => { + const current = getCurrentVersion(); + const latest = await getLatestVersion(); + + if (!latest) { + process.stderr.write(`${RED}Could not fetch latest version from npm registry.${RESET}\n`); + process.exit(1); + } + + if (current === latest) { + process.stdout.write(`${GREEN}Already on the latest version ${BOLD}${current}${RESET}\n`); + return; + } + + process.stdout.write(`${CYAN}Current:${RESET} ${current}\n`); + process.stdout.write(`${CYAN}Latest:${RESET} ${BOLD}${latest}${RESET}\n`); + + if (args.check) { + process.stdout.write(`\n${YELLOW}Update available.${RESET} Run ${BOLD}epilot upgrade${RESET} to install.\n`); + return; + } + + process.stdout.write(`\n`); + + const installer = detectInstaller(); + + if (!installer) { + process.stdout.write(`${YELLOW}Could not detect how @epilot/cli was installed.${RESET}\n`); + process.stdout.write(`Upgrade manually with one of:\n`); + process.stdout.write(` ${DIM}npm install -g @epilot/cli@latest${RESET}\n`); + process.stdout.write(` ${DIM}yarn global add @epilot/cli@latest${RESET}\n`); + process.stdout.write(` ${DIM}pnpm add -g @epilot/cli@latest${RESET}\n`); + return; + } + + process.stdout.write(`${DIM}Upgrading via ${installer.name}...${RESET}\n`); + + try { + execSync(installer.command, { stdio: 'inherit' }); + process.stdout.write(`\n${GREEN}${BOLD}Upgraded to @epilot/cli@${latest}${RESET}\n`); + } catch { + process.stderr.write(`${RED}Upgrade failed.${RESET} Try manually:\n ${installer.command}\n`); + process.exit(1); + } + }, +}); + +const getCurrentVersion = (): string => { + // Use build-time injected version, fall back to npm ls + if (typeof __CLI_VERSION__ !== 'undefined') return __CLI_VERSION__; + + try { + const output = execSync('npm ls -g @epilot/cli --depth=0 --json 2>/dev/null', { + encoding: 'utf-8', + timeout: 10000, + }); + const parsed = JSON.parse(output); + return parsed?.dependencies?.['@epilot/cli']?.version ?? 'unknown'; + } catch { + return 'unknown'; + } +}; + +const getLatestVersion = async (): Promise => { + try { + const output = execSync('npm view @epilot/cli version', { + encoding: 'utf-8', + timeout: 10000, + }); + return output.trim() || null; + } catch { + return null; + } +}; + +interface Installer { + name: string; + command: string; +} + +const detectInstaller = (): Installer | null => { + // Check if installed via volta + if (process.env.VOLTA_HOME && whichResolves('volta')) { + return { name: 'volta', command: 'volta install @epilot/cli@latest' }; + } + + // Check the path of the running binary to guess the package manager + const binPath = process.argv[1] || ''; + + if (binPath.includes('/.pnpm/') || binPath.includes('/pnpm/')) { + return { name: 'pnpm', command: 'pnpm add -g @epilot/cli@latest' }; + } + + if (binPath.includes('/yarn/') || binPath.includes('/.yarn/')) { + return { name: 'yarn', command: 'yarn global add @epilot/cli@latest' }; + } + + // Default: try npm + if (whichResolves('npm')) { + return { name: 'npm', command: 'npm install -g @epilot/cli@latest' }; + } + + return null; +}; + +const whichResolves = (cmd: string): boolean => { + try { + execSync(`which ${cmd}`, { encoding: 'utf-8', timeout: 5000 }); + return true; + } catch { + return false; + } +}; diff --git a/packages/cli/src/generated/api-list.ts b/packages/cli/src/generated/api-list.ts new file mode 100644 index 00000000..b00aff8a --- /dev/null +++ b/packages/cli/src/generated/api-list.ts @@ -0,0 +1,1203 @@ +// Auto-generated by scripts/generate.ts — do not edit +export type ApiInfo = { + apiName: string; + kebabName: string; + title: string; + serverUrl: string; + operationCount: number; + operationIds: string[]; +}; + +export const API_LIST: ApiInfo[] = [ + { + apiName: 'accessToken', + kebabName: 'access-token', + title: 'Access Token API', + serverUrl: 'https://access-token.sls.epilot.io', + operationCount: 7, + operationIds: [ + 'listAccessTokens', + 'createAccessToken', + 'revokeAccessToken', + 'getAccessTokenJwks', + 'getAccessTokenOIDC', + 'getPublicTokenJwks', + 'getPublicTokenOIDC', + ], + }, + { + apiName: 'address', + kebabName: 'address', + title: 'Address API', + serverUrl: 'https://address.sls.epilot.io', + operationCount: 3, + operationIds: ['getAddressSuggestions', 'availabilityCheck', 'validateAvailabilityFile'], + }, + { + apiName: 'addressSuggestions', + kebabName: 'address-suggestions', + title: 'Address Suggestions API', + serverUrl: 'https://address-suggestions-api.sls.epilot.io', + operationCount: 4, + operationIds: ['getAddresses', 'validateAddresses', 'checkAvailability', 'validateAddressesFile'], + }, + { + apiName: 'aiAgents', + kebabName: 'ai-agents', + title: 'AI Agents API - OpenAPI 3.0', + serverUrl: 'https://ai-agents.sls.epilot.io', + operationCount: 12, + operationIds: [ + 'listAgents', + 'createAgent', + 'getAgentById', + 'updateAgentById', + 'deleteAgentById', + 'executeAgent', + 'listExecutions', + 'getExecution', + 'cancelExecution', + 'getExecutionTrace', + 'approveExecution', + 'rejectExecution', + ], + }, + { + apiName: 'app', + kebabName: 'app', + title: 'App API', + serverUrl: 'https://app.sls.epilot.io', + operationCount: 30, + operationIds: [ + 'getPublicFacingComponent', + 'listConfigurations', + 'createConfiguration', + 'listPublicConfigurations', + 'getPublicConfiguration', + 'getConfiguration', + 'patchMetadata', + 'deleteConfiguration', + 'queryEvents', + 'createBundleUploadUrl', + 'createZipUploadUrl', + 'createLogoUploadUrl', + 'deleteLogo', + 'listVersions', + 'getVersion', + 'patchVersion', + 'deleteVersion', + 'getReview', + 'createReview', + 'createComponent', + 'patchComponent', + 'deleteComponent', + 'cloneVersion', + 'listInstallations', + 'getInstallation', + 'install', + 'patchInstallation', + 'uninstall', + 'promoteVersion', + 'ingestEvent', + ], + }, + { + apiName: 'auditLogs', + kebabName: 'audit-logs', + title: 'Audit Log', + serverUrl: 'https://audit-logs.sls.epilot.io', + operationCount: 2, + operationIds: ['getLogs', 'getLogById'], + }, + { + apiName: 'automation', + kebabName: 'automation', + title: 'Automation API', + serverUrl: 'https://automation.sls.epilot.io', + operationCount: 16, + operationIds: [ + 'searchFlows', + 'createFlow', + 'batchGetFlows', + 'getFlow', + 'putFlow', + 'deleteFlow', + 'getExecutions', + 'startExecution', + 'bulkTriggerExecutions', + 'getBulkJob', + 'patchBulkJob', + 'getExecution', + 'cancelExecution', + 'retriggerAction', + 'resumeExecutionWithToken', + 'cancelSchedule', + ], + }, + { + apiName: 'billing', + kebabName: 'billing', + title: 'Billing API', + serverUrl: 'https://billing.sls.epilot.io', + operationCount: 10, + operationIds: [ + 'getBillingEvents', + 'createBillingEvent', + 'getBillingEvent', + 'updateBillingEvent', + 'deleteBillingEvent', + 'getBillingEventByExternalId', + 'createContractEntity', + 'updateContractEntity', + 'deleteContractEntity', + 'getCustomerBalance', + ], + }, + { + apiName: 'blueprintManifest', + kebabName: 'blueprint-manifest', + title: 'Blueprint Manifest API', + serverUrl: 'https://blueprint-manifest.sls.epilot.io', + operationCount: 33, + operationIds: [ + 'getJob', + 'createExport', + 'exportManifest', + 'uploadManifest', + 'createPlan', + 'applyPlan', + 'listInstalledManifests', + 'getManifest', + 'updateManifest', + 'deleteManifest', + 'listBlueprints', + 'createBlueprint', + 'listInstalledMarketplaceBlueprints', + 'preInstallBlueprint', + 'getBlueprintPreview', + 'installBlueprint', + 'getBlueprint', + 'updateBlueprint', + 'deleteBlueprint', + 'validateBlueprint', + 'exportBlueprint', + 'formatBlueprintDescription', + 'addBlueprintResource', + 'syncDependencies', + 'bulkAddBlueprintResources', + 'bulkUpdateBlueprintResources', + 'bulkDeleteBlueprintResources', + 'updateBlueprintResource', + 'deleteBlueprintResource', + 'listBlueprintJobs', + 'getBlueprintJob', + 'continueInstallationJob', + 'cancelBlueprintJob', + ], + }, + { + apiName: 'consent', + kebabName: 'consent', + title: 'Consent API', + serverUrl: 'https://consent.sls.epilot.io', + operationCount: 3, + operationIds: ['publishConsentEvent', 'listConsentEvents', 'handleOptInWithToken'], + }, + { + apiName: 'customerPortal', + kebabName: 'customer-portal', + title: 'Portal API', + serverUrl: 'https://customer-portal-api.sls.epilot.io', + operationCount: 134, + operationIds: [ + 'upsertPortal', + 'createUser', + 'createUserV3', + 'validateToken', + 'revokeToken', + 'getPortalConfigByDomain', + 'getPortalConfig', + 'deletePortal', + 'getPortalExtensions', + 'getPublicPortalExtensionDetails', + 'getPortalExtensionsV3', + 'getPublicPortalExtensionDetailsV3', + 'getConsumption', + 'getCosts', + 'getPrices', + 'getExternalLinks', + 'getResolvedExternalLink', + 'getExternalLinksV3', + 'getResolvedExternalLinkV3', + 'getResolvedSeamlessLink', + 'getPublicPortalConfig', + 'getOrgPortalConfig', + 'getPublicPortalConfigV3', + 'getOrgPortalConfigV3', + 'getAllPortalConfigs', + 'getEmailTemplates', + 'upsertEmailTemplates', + 'getEmailTemplatesByPortalId', + 'upsertEmailTemplatesByPortalId', + 'getPublicPortalWidgets', + 'getPortalWidgets', + 'upsertPortalWidget', + 'replaceECPTemplateVariables', + 'getOrganizationSettings', + 'getSchemas', + 'getSchemasByDomain', + 'getOrganizationSettingsByDomain', + 'extraPermissionAttributes', + 'validateCaaRecords', + 'validateCaaRecordsV3', + 'getContact', + 'updateContact', + 'getECPContact', + 'checkContactExists', + 'checkContactExistsV3', + 'getValidSecondaryAttributes', + 'getPortalUser', + 'updatePortalUser', + 'deletePortalUser', + 'updatePortalUserEmail', + 'resendConfirmationEmail', + 'fetchPortalUsersByRelatedEntity', + 'confirmUser', + 'confirmUserWithUserId', + 'userExists', + 'userExistsV3', + 'getRecipientsToNotifyOnAutomation', + 'configureDistribution', + 'configureDistributionV3', + 'getAllOrders', + 'postOrderAcceptance', + 'getOrder', + 'updateOrder', + 'getAllOpportunities', + 'getSearchableAttributesForOpportunities', + 'getSearchResultsForOpportunities', + 'getOpportunity', + 'updateOpportunity', + 'getAllRequests', + 'getAllContracts', + 'getContract', + 'updateContract', + 'addContractByIdentifiers', + 'getEntityIdentifiers', + 'getEntityActivityFeed', + 'validateCadenceEntityEditRules', + 'searchPaymentRelationsInEntities', + 'createCustomEntityActivity', + 'saveEntityFile', + 'deleteEntityFile', + 'savePortalFiles', + 'getRegistrationIdentifiers', + 'getAllFiles', + 'getFileById', + 'trackFileDownloaded', + 'getFilesCountByEntity', + 'getBillingEvents', + 'getCustomerBalance', + 'getBillingAccount', + 'loginToPortalAsUser', + 'triggerEntityAccessEvent', + 'triggerEntityAccessEventV3', + 'getPortalUserEntity', + 'searchPortalUserEntities', + 'canTriggerPortalFlow', + 'getAutomationContext', + 'updateWorkflowStepAsDone', + 'getEntityWorkflows', + 'uploadMeterReadingPhoto', + 'createMeterReading', + 'getAllowedMeterReadingRange', + 'ssoLogin', + 'ssoLoginV3', + 'ssoRedirect', + 'ssoCallback', + 'getPortalPage', + 'updatePortalPage', + 'deletePortalPage', + 'getPortalPages', + 'createPortalPage', + 'getPublicPages', + 'getDefaultPages', + 'getPortalPageBlocks', + 'createPortalPageBlock', + 'getPortalPageBlock', + 'updatePortalPageBlock', + 'deletePortalPageBlock', + 'getUserEntryPoint', + 'updateCampaignPortalBlockStatus', + 'updateNotificationsStatus', + 'deRegisterMLoginUser', + 'notifyMLoginInterestChange', + 'createPortalConfig', + 'getPortalConfigV3', + 'putPortalConfig', + 'deletePortalConfig', + 'listAllPortalConfigs', + 'swapPortalConfig', + 'invitePartner', + 'listBusinessPartners', + 'resendPartnerInvitation', + 'revokePartner', + 'disablePartner', + 'enablePartner', + ], + }, + { + apiName: 'dashboard', + kebabName: 'dashboard', + title: 'Dashboard API', + serverUrl: 'https://dashboard.sls.epilot.io', + operationCount: 7, + operationIds: [ + 'listDashboards', + 'createDashboard', + 'getDashboard', + 'putDashboard', + 'deleteDashboard', + 'listAvailableVisualisations', + 'listAvailableExamples', + ], + }, + { + apiName: 'dataManagement', + kebabName: 'data-management', + title: 'Data Management API', + serverUrl: 'https://data-management.sls.epilot.io', + operationCount: 10, + operationIds: [ + 'queryEntities', + 'createJob', + 'updateJob', + 'getJob', + 'getJobReportUrl', + 'getConfig', + 'createJobForConfig', + 'upsertConfig', + 'listConfigs', + 'listJobs', + ], + }, + { + apiName: 'deduplication', + kebabName: 'deduplication', + title: 'Deduplication API', + serverUrl: 'https://deduplication.sls.epilot.io', + operationCount: 1, + operationIds: ['deduplicate'], + }, + { + apiName: 'design', + kebabName: 'design', + title: 'Design Builder API v2', + serverUrl: 'https://design-builder-api.epilot.io', + operationCount: 13, + operationIds: [ + 'getAllDesigns', + 'addDesign', + 'getDesign', + 'updateDesign', + 'deleteDesign', + 'getThemeFromDesign', + 'getFiles', + 'uploadFile', + 'getLimit', + 'getBrands', + 'getConsumerDesign', + 'addConsumer', + 'removeConsumer', + ], + }, + { + apiName: 'document', + kebabName: 'document', + title: 'Document API', + serverUrl: 'https://document.sls.epilot.io', + operationCount: 3, + operationIds: ['getTemplateMeta', 'generateDocumentV2', 'convertDocument'], + }, + { + apiName: 'emailSettings', + kebabName: 'email-settings', + title: 'Messaging Settings API', + serverUrl: 'https://email-settings.sls.epilot.io', + operationCount: 31, + operationIds: [ + 'provisionEpilotEmailAddress', + 'setEmailAddressPrimary', + 'getEmailAddress', + 'updateEmailAddress', + 'deleteEmailAddress', + 'listEmailAddresses', + 'addEmailAddress', + 'getSharedInbox', + 'updateSharedInbox', + 'deleteSharedInbox', + 'listSharedInboxes', + 'addSharedInbox', + 'listInboxBuckets', + 'connectOutlook', + 'getOutlookConnectionStatus', + 'disconnectOutlook', + 'connectOutlookMailbox', + 'disconnectOutlookMailbox', + 'startMailboxSync', + 'getMailboxSyncStatus', + 'retryMailboxSync', + 'getConnectedOutlookEmails', + 'outlookOAuthCallback', + 'getSettings', + 'addSetting', + 'deleteSetting', + 'updateSetting', + 'addDomain', + 'deleteDomain', + 'verifyNameServers', + 'verifyDomain', + ], + }, + { + apiName: 'emailTemplate', + kebabName: 'email-template', + title: 'Email template API', + serverUrl: 'https://email-template.sls.epilot.io', + operationCount: 7, + operationIds: [ + 'saveTemplate', + 'getTemplateDetail', + 'updateTemplateDetail', + 'replaceVariables', + 'replaceVariablesAsync', + 'bulkSendMessage', + 'revertToOriginalTemplate', + ], + }, + { + apiName: 'entity', + kebabName: 'entity', + title: 'Entity API', + serverUrl: 'https://entity.sls.epilot.io', + operationCount: 81, + operationIds: [ + 'listSchemas', + 'getSchema', + 'putSchema', + 'deleteSchema', + 'getJsonSchema', + 'getSchemaExample', + 'getSchemaVersions', + 'listAvailableCapabilities', + 'listSchemaBlueprints', + 'searchEntities', + 'listEntities', + 'queryEntityGraph', + 'createEntity', + 'validateEntity', + 'validateEntityV2', + 'upsertEntity', + 'getEntityV2', + 'restoreEntity', + 'reindexEntity', + 'getEntity', + 'updateEntity', + 'patchEntity', + 'deleteEntity', + 'autocomplete', + 'wipeAllEntities', + 'createActivity', + 'getActivity', + 'attachActivity', + 'getEntityActivityFeed', + 'getRelations', + 'addRelations', + 'removeRelations', + 'getRelationsV2', + 'getRelationsV3', + 'getRelatedEntitiesCount', + 'updateRelation', + 'deleteRelation', + 'exportEntities', + 'importEntities', + 'listSavedViews', + 'createSavedView', + 'getSavedView', + 'updateSavedView', + 'patchSavedView', + 'deleteSavedView', + 'listFavoriteViewsForUser', + 'listTaxonomies', + 'createTaxonomy', + 'getTaxonomy', + 'updateTaxonomy', + 'deleteTaxonomy', + 'updateClassificationsForTaxonomy', + 'createTaxonomyClassification', + 'getTaxonomyClassification', + 'updateTaxonomyClassification', + 'deleteTaxonomyClassification', + 'taxonomyAutocomplete', + 'taxonomiesClassificationsSearch', + 'listTaxonomyClassificationsForSchema', + 'getTaxonomyBulkActionJobs', + 'getTaxonomyBulkActionJobById', + 'cancelBulkAction', + 'bulkMoveClassifications', + 'bulkMergeClassifications', + 'bulkDeleteClassifications', + 'createSchemaAttribute', + 'getSchemaAttribute', + 'putSchemaAttribute', + 'deleteSchemaAttribute', + 'createSchemaCapability', + 'getSchemaCapability', + 'putSchemaCapability', + 'deleteSchemaCapability', + 'createSchemaGroup', + 'getSchemaGroup', + 'putSchemaGroup', + 'deleteSchemaGroup', + 'createSchemaGroupHeadline', + 'getSchemaGroupHeadline', + 'putSchemaGroupHeadline', + 'deleteSchemaGroupHeadline', + ], + }, + { + apiName: 'entityMapping', + kebabName: 'entity-mapping', + title: 'Entity Mapping API', + serverUrl: 'https://entity-mapping.sls.epilot.io', + operationCount: 12, + operationIds: [ + 'storeConfig', + 'getConfig', + 'deleteConfig', + 'getAllVersions', + 'storeNewVersion', + 'getConfigVersion', + 'executeMapping', + 'searchConfigs', + 'queryMappingHistory', + 'executeRelations', + 'getMappingConfig', + 'putMappingConfig', + ], + }, + { + apiName: 'environments', + kebabName: 'environments', + title: 'Environments API', + serverUrl: 'https://environments.sls.epilot.io', + operationCount: 5, + operationIds: [ + 'listEnvironmentVariables', + 'createEnvironmentVariable', + 'getEnvironmentVariable', + 'updateEnvironmentVariable', + 'deleteEnvironmentVariable', + ], + }, + { + apiName: 'erpIntegration', + kebabName: 'erp-integration', + title: 'ERP Integration API', + serverUrl: 'https://erp-integration-api.sls.epilot.io', + operationCount: 33, + operationIds: [ + 'acknowledgeTracking', + 'triggerErp', + 'processErpUpdatesEvents', + 'processErpUpdatesEventsV2', + 'processErpUpdatesEventsV3', + 'simulateMappingV2', + 'simulateMapping', + 'listIntegrations', + 'createIntegration', + 'getIntegration', + 'updateIntegration', + 'deleteIntegration', + 'queryEvents', + 'replayEvents', + 'listUseCases', + 'createUseCase', + 'getUseCase', + 'updateUseCase', + 'deleteUseCase', + 'listUseCaseHistory', + 'listIntegrationsV2', + 'createIntegrationV2', + 'getIntegrationV2', + 'updateIntegrationV2', + 'deleteIntegrationV2', + 'setIntegrationAppMapping', + 'deleteIntegrationAppMapping', + 'queryInboundMonitoringEvents', + 'getMonitoringStats', + 'getMonitoringTimeSeries', + 'getOutboundStatus', + 'queryAccessLogs', + 'queryOutboundMonitoringEvents', + ], + }, + { + apiName: 'eventCatalog', + kebabName: 'event-catalog', + title: 'Event Catalog API', + serverUrl: 'https://event-catalog.sls.epilot.io', + operationCount: 7, + operationIds: [ + 'listEvents', + 'getEvent', + 'patchEvent', + 'getEventJSONSchema', + 'getEventExample', + 'searchEventHistory', + 'triggerEvent', + ], + }, + { + apiName: 'file', + kebabName: 'file', + title: 'File API', + serverUrl: 'https://file.sls.epilot.io', + operationCount: 27, + operationIds: [ + 'uploadFileV2', + 'saveFileV2', + 'uploadFile', + 'saveFile', + 'getFile', + 'deleteFile', + 'downloadFile', + 'downloadS3File', + 'downloadFiles', + 'previewFile', + 'previewS3FileGet', + 'previewS3File', + 'previewPublicFile', + 'getSession', + 'deleteSession', + 'listPublicLinksForFile', + 'generatePublicLink', + 'accessPublicLink', + 'revokePublicLink', + 'verifyCustomDownloadUrl', + 'uploadFilePublic', + 'getUserSchemaFileCollections', + 'createUserSchemaFileCollection', + 'updateUserSchemaFileCollection', + 'deleteUserSchemaFileCollection', + 'getFilesInCollection', + 'getGlobalFileCollections', + ], + }, + { + apiName: 'iban', + kebabName: 'iban', + title: 'Iban API', + serverUrl: 'https://iban-api.sls.epilot.io', + operationCount: 1, + operationIds: ['validateIban'], + }, + { + apiName: 'journey', + kebabName: 'journey', + title: 'Journey API', + serverUrl: 'https://journey-config.sls.epilot.io', + operationCount: 16, + operationIds: [ + 'getJourneysByOrgId', + 'getJourney', + 'removeJourney', + 'getJourneyProducts', + 'createJourney', + 'updateJourney', + 'patchUpdateJourney', + 'searchJourneys', + 'generateDocument', + 'createJourneyV2', + 'updateJourneyV2', + 'patchUpdateJourneyV2', + 'getJourneyV2', + 'removeJourneyV2', + 'getSettingsForJourney', + 'getButtonOptions', + ], + }, + { + apiName: 'kanban', + kebabName: 'kanban', + title: 'Kanban API', + serverUrl: 'https://kanban.sls.epilot.io', + operationCount: 10, + operationIds: [ + 'createKanbanBoard', + 'getKanbanBoards', + 'getKanbanBoard', + 'updateKanbanBoard', + 'patchKanbanBoard', + 'deleteKanbanBoard', + 'setDefaultKanbanBoard', + 'clearDefaultKanbanBoard', + 'flowsAutocomplete', + 'executeFlowsQuery', + ], + }, + { + apiName: 'message', + kebabName: 'message', + title: 'Message API', + serverUrl: 'https://message.sls.epilot.io', + operationCount: 46, + operationIds: [ + 'sendMessage', + 'updateMessage', + 'getMessage', + 'deleteMessage', + 'getMessageEml', + 'searchMessages', + 'trashMessage', + 'untrashMessage', + 'markReadMessage', + 'markReadMessageV2', + 'markUnreadMessage', + 'getUnread', + 'markUnreadMessageV2', + 'searchThreads', + 'searchThreadsV2', + 'searchIds', + 'updateThread', + 'deleteThread', + 'moveThread', + 'markThreadAsDone', + 'markThreadAsOpen', + 'getThreadTimeline', + 'trashThread', + 'untrashThread', + 'threadBulkActionsRead', + 'threadBulkActionsUnread', + 'threadBulkActionsFavorite', + 'threadBulkActionsUnfavorite', + 'threadBulkActionsTrash', + 'threadBulkActionsUntrash', + 'threadBulkActionsDelete', + 'threadBulkActionsDone', + 'threadBulkActionsOpen', + 'markReadThread', + 'markReadThreadV2', + 'markUnreadThread', + 'markUnreadThreadV2', + 'assignThread', + 'unassignThread', + 'assignUsers', + 'assignUsersV2', + 'pinThread', + 'unpinThread', + 'createDraft', + 'sendDraft', + 'getMessageV2', + ], + }, + { + apiName: 'metering', + kebabName: 'metering', + title: 'Metering API', + serverUrl: 'https://metering.sls.epilot.io', + operationCount: 16, + operationIds: [ + 'getCustomerMeters', + 'getMetersByContractId', + 'getMeter', + 'updateMeter', + 'getMeterCounters', + 'getCounterDetails', + 'createMeterReading', + 'createMeterReadings', + 'createPortalMeterReadings', + 'batchWriteMeterReadings', + 'createMeterReadingFromSubmission', + 'getAllowedReadingForMeter', + 'createReadingWithMeter', + 'getReadingsByInterval', + 'updateMeterReading', + 'deleteMeterReading', + ], + }, + { + apiName: 'notes', + kebabName: 'notes', + title: 'Notes API', + serverUrl: 'https://notes.sls.epilot.io', + operationCount: 12, + operationIds: [ + 'createNote', + 'getNote', + 'updateNote', + 'patchNote', + 'deleteNote', + 'searchNotesByContext', + 'getNotesByContext', + 'pinNote', + 'getNoteContexts', + 'addNoteReaction', + 'removeNoteReaction', + 'toggleNoteReactions', + ], + }, + { + apiName: 'notification', + kebabName: 'notification', + title: 'Notification API', + serverUrl: 'https://notification.sls.epilot.io', + operationCount: 14, + operationIds: [ + 'getNotificationsV2', + 'getNotifications', + 'createNotification', + 'getNotification', + 'markAllAsRead', + 'markAsRead', + 'getTotalUnread', + 'listNotificationTemplates', + 'createNotificationTemplate', + 'getNotificationTemplate', + 'updateNotificationTemplate', + 'patchNotificationTemplate', + 'deleteNotificationTemplate', + 'sendPreview', + ], + }, + { + apiName: 'organization', + kebabName: 'organization', + title: 'Organization API', + serverUrl: 'https://organization-v2.sls.epilot.io', + operationCount: 6, + operationIds: [ + 'getCurrentOrganization', + 'getOrganization', + 'updateOrganization', + 'getSettings', + 'putSettingsValue', + 'deleteSettingsValue', + ], + }, + { + apiName: 'partnerDirectory', + kebabName: 'partner-directory', + title: 'Partner API', + serverUrl: 'https://partner-directory-api.sls.epilot.io', + operationCount: 16, + operationIds: [ + 'approvePartner', + 'rejectPartner', + 'searchAssignable', + 'batchGetAssignable', + 'getPartnerByToken', + 'activatePartner', + 'searchGeolocationForText', + 'invitePartnerV2', + 'getPartnerUsers', + 'createPartnerUser', + 'deletePartnerUser', + 'getPartnerRoles', + 'createPartnerRole', + 'updatePartnerRole', + 'assignPartnerUserRoles', + 'unassignPartnerUserRoles', + ], + }, + { + apiName: 'permissions', + kebabName: 'permissions', + title: 'Permissions API', + serverUrl: 'https://permissions.sls.epilot.io', + operationCount: 13, + operationIds: [ + 'listCurrentRoles', + 'listAllRoles', + 'createRole', + 'searchRoles', + 'getRole', + 'putRole', + 'deleteRole', + 'refreshPermissions', + 'getAssignedRolesForUser', + 'assignRoles', + 'addAssignment', + 'removeAssignment', + 'listAllAssignments', + ], + }, + { + apiName: 'pricing', + kebabName: 'pricing', + title: 'Pricing API', + serverUrl: 'https://pricing-api.sls.epilot.io', + operationCount: 22, + operationIds: [ + '$calculatePricingDetails', + 'createOrder', + 'putOrder', + '$checkoutCart', + '$searchCatalog', + '$privateSearchCatalog', + '$validatePromoCodes', + '$availabilityCheck', + '$validateAvailabilityFile', + '$historicMarketPrices', + '$averageMarketPrice', + '$searchExternalProducts', + '$searchExternalProductRecommendations', + '$searchProviders', + '$searchStreets', + '$computePrice', + '$getCredentials', + '$saveCredentials', + '$deleteCredentials', + '$getExternalCatalogProducts', + '$getExternalCatalogProductRecommendations', + '$productRecommendations', + ], + }, + { + apiName: 'pricingTier', + kebabName: 'pricing-tier', + title: 'Pricing Tier API', + serverUrl: '', + operationCount: 1, + operationIds: ['getCurrentPricingTier'], + }, + { + apiName: 'purpose', + kebabName: 'purpose', + title: 'Purpose API', + serverUrl: 'https://purpose.sls.epilot.io', + operationCount: 6, + operationIds: [ + 'createPurpose', + 'searchPurposes', + 'batchGetPurposes', + 'getPurpose', + 'updatePurpose', + 'deletePurpose', + ], + }, + { + apiName: 'sandbox', + kebabName: 'sandbox', + title: 'Sandbox API', + serverUrl: 'https://sandbox.sls.epilot.io', + operationCount: 7, + operationIds: [ + 'listPipelines', + 'createPipeline', + 'getPipeline', + 'deletePipeline', + 'generatePipelineToken', + 'requestSandbox', + 'listSandboxRequests', + ], + }, + { + apiName: 'submission', + kebabName: 'submission', + title: 'Submission API', + serverUrl: 'https://submission.sls.epilot.io', + operationCount: 2, + operationIds: ['createSubmission', 'getNonce'], + }, + { + apiName: 'targeting', + kebabName: 'targeting', + title: 'Targeting API', + serverUrl: 'https://targeting.sls.epilot.io', + operationCount: 11, + operationIds: [ + 'changeCampaignStatus', + 'getCampaignJobStatus', + 'getCampaignPortals', + 'retriggerCampaignAutomations', + 'matchCampaigns', + 'matchTargets', + 'getTargetQueries', + 'createRecipient', + 'updateRecipient', + 'updateRecipientPortalStatus', + 'getRecipients', + ], + }, + { + apiName: 'templateVariables', + kebabName: 'template-variables', + title: 'Template Variables API', + serverUrl: 'https://template-variables-api.sls.epilot.io', + operationCount: 12, + operationIds: [ + 'getCategories', + 'searchVariables', + 'getVariableContext', + 'replaceTemplates', + 'replaceTemplatesV2', + 'getCustomVariables', + 'createCustomVariable', + 'searchCustomVariables', + 'getCustomVariable', + 'updateCustomVariable', + 'deleteCustomVariable', + 'getBluePrintTableConfig', + ], + }, + { + apiName: 'user', + kebabName: 'user', + title: 'User API', + serverUrl: 'https://user.sls.epilot.io', + operationCount: 34, + operationIds: [ + 'signUpUser', + 'getMeV2', + 'listUsersV2', + 'getUserV2', + 'updateUserV2', + 'deleteUserV2', + 'inviteUser', + 'resendUserInvitation', + 'getGroupsForUser', + 'getGroups', + 'createGroup', + 'getGroup', + 'updateGroup', + 'deleteGroup', + 'advanceUserAssignment', + 'createNavigation', + 'getNavigation', + 'verifyEmailWithToken', + 'checkInviteToken', + 'activateUser', + 'rejectInvite', + 'getUserLoginParametersV2', + 'beginPasskeyAuthentication', + 'beginDiscoverablePasskeyAuthentication', + 'resolveDiscoverableCredential', + 'beginPasskeyRegistration', + 'completePasskeyRegistration', + 'listPasskeys', + 'deletePasskey', + 'switchOrganization', + 'getMe', + 'listUsers', + 'getUser', + 'getUserLoginParameters', + ], + }, + { + apiName: 'validationRules', + kebabName: 'validation-rules', + title: 'Validation Rules API', + serverUrl: 'https://validation-rules.sls.epilot.io', + operationCount: 7, + operationIds: [ + 'getValidationRules', + 'createValidationRule', + 'getValidationRuleById', + 'updateValidationRule', + 'deleteValidationRule', + 'addUsedByReference', + 'removeUsedByReference', + ], + }, + { + apiName: 'webhooks', + kebabName: 'webhooks', + title: 'Webhooks', + serverUrl: 'https://webhooks.sls.epilot.io', + operationCount: 14, + operationIds: [ + 'getPublicKey', + 'getConfiguredEvents', + 'getConfigs', + 'createConfig', + 'getConfig', + 'updateConfig', + 'deleteConfig', + 'triggerWebhook', + 'getWehookEvents', + 'batchReplayEvents', + 'getEventById', + 'replayEvent', + 'getWebhookExample', + 'getWebhookEventsV2', + ], + }, + { + apiName: 'workflow', + kebabName: 'workflow', + title: 'Workflows Executions', + serverUrl: 'https://workflows-execution.sls.epilot.io', + operationCount: 23, + operationIds: [ + 'getExecutions', + 'createExecution', + 'getExecution', + 'updateExecution', + 'deleteExecution', + 'createStep', + 'updateStep', + 'deleteStep', + 'searchExecutions', + 'searchSteps', + 'getClosingReasonExecution', + 'startFlowExecution', + 'getFlowExecution', + 'patchFlowExecution', + 'deleteFlowExecution', + 'searchFlowExecutions', + 'patchTask', + 'runTaskAutomation', + 'executeTask', + 'patchPhase', + 'addTask', + 'cancelTaskSchedule', + 'cancelSchedule', + ], + }, + { + apiName: 'workflowDefinition', + kebabName: 'workflow-definition', + title: 'Workflows Definitions', + serverUrl: 'https://workflows-definition.sls.epilot.io', + operationCount: 24, + operationIds: [ + 'getMaxAllowedLimit', + 'getDefinitions', + 'createDefinition', + 'listFlowTemplates', + 'createFlowTemplate', + 'searchFlowTemplates', + 'getFlowTemplate', + 'updateFlowTemplate', + 'deleteFlowTemplate', + 'duplicateFlowTemplate', + 'exportFlowTemplate', + 'importFlowTemplate', + 'getDefinition', + 'updateDefinition', + 'deleteDefinition', + 'getAllClosingReasons', + 'createClosingReason', + 'getClosingReason', + 'updateClosingReason', + 'deleteClosingReason', + 'getClosingReasonV1', + 'changeReasonStatus', + 'getWorkflowClosingReasons', + 'setWorkflowClosingReasons', + ], + }, +]; + +export const API_NAMES = API_LIST.map((a) => a.apiName); diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts new file mode 100644 index 00000000..1c3aeb9e --- /dev/null +++ b/packages/cli/src/index.ts @@ -0,0 +1,71 @@ +import { defineCommand } from 'citty'; + +export const main = defineCommand({ + meta: { + name: 'epilot', + version: '0.1.9', + description: 'CLI for epilot APIs', + }, + args: { + token: { type: 'string', alias: 't', description: 'Bearer token' }, + profile: { type: 'string', description: 'Use a named profile (or EPILOT_PROFILE env)' }, + server: { type: 'string', alias: 's', description: 'Override server base URL' }, + json: { type: 'boolean', description: 'Output raw JSON' }, + verbose: { type: 'boolean', alias: 'v', description: 'Verbose output' }, + guided: { type: 'boolean', description: 'Prompt for all parameters interactively' }, + interactive: { type: 'boolean', default: true, description: 'Interactive mode' }, + jsonata: { type: 'string', description: 'JSONata expression' }, + }, + subCommands: { + auth: () => import('./commands/auth.js').then((m) => m.default), + profile: () => import('./commands/profile.js').then((m) => m.default), + completion: () => import('./commands/completion.js').then((m) => m.default), + upgrade: () => import('./commands/upgrade.js').then((m) => m.default), + 'access-token': () => import('./commands/apis/access-token.js').then((m) => m.default), + address: () => import('./commands/apis/address.js').then((m) => m.default), + 'address-suggestions': () => import('./commands/apis/address-suggestions.js').then((m) => m.default), + 'ai-agents': () => import('./commands/apis/ai-agents.js').then((m) => m.default), + app: () => import('./commands/apis/app.js').then((m) => m.default), + 'audit-logs': () => import('./commands/apis/audit-logs.js').then((m) => m.default), + automation: () => import('./commands/apis/automation.js').then((m) => m.default), + billing: () => import('./commands/apis/billing.js').then((m) => m.default), + 'blueprint-manifest': () => import('./commands/apis/blueprint-manifest.js').then((m) => m.default), + consent: () => import('./commands/apis/consent.js').then((m) => m.default), + 'customer-portal': () => import('./commands/apis/customer-portal.js').then((m) => m.default), + dashboard: () => import('./commands/apis/dashboard.js').then((m) => m.default), + 'data-management': () => import('./commands/apis/data-management.js').then((m) => m.default), + deduplication: () => import('./commands/apis/deduplication.js').then((m) => m.default), + design: () => import('./commands/apis/design.js').then((m) => m.default), + document: () => import('./commands/apis/document.js').then((m) => m.default), + 'email-settings': () => import('./commands/apis/email-settings.js').then((m) => m.default), + 'email-template': () => import('./commands/apis/email-template.js').then((m) => m.default), + entity: () => import('./commands/apis/entity.js').then((m) => m.default), + 'entity-mapping': () => import('./commands/apis/entity-mapping.js').then((m) => m.default), + environments: () => import('./commands/apis/environments.js').then((m) => m.default), + 'erp-integration': () => import('./commands/apis/erp-integration.js').then((m) => m.default), + 'event-catalog': () => import('./commands/apis/event-catalog.js').then((m) => m.default), + file: () => import('./commands/apis/file.js').then((m) => m.default), + iban: () => import('./commands/apis/iban.js').then((m) => m.default), + journey: () => import('./commands/apis/journey.js').then((m) => m.default), + kanban: () => import('./commands/apis/kanban.js').then((m) => m.default), + message: () => import('./commands/apis/message.js').then((m) => m.default), + metering: () => import('./commands/apis/metering.js').then((m) => m.default), + notes: () => import('./commands/apis/notes.js').then((m) => m.default), + notification: () => import('./commands/apis/notification.js').then((m) => m.default), + organization: () => import('./commands/apis/organization.js').then((m) => m.default), + 'partner-directory': () => import('./commands/apis/partner-directory.js').then((m) => m.default), + permissions: () => import('./commands/apis/permissions.js').then((m) => m.default), + pricing: () => import('./commands/apis/pricing.js').then((m) => m.default), + 'pricing-tier': () => import('./commands/apis/pricing-tier.js').then((m) => m.default), + purpose: () => import('./commands/apis/purpose.js').then((m) => m.default), + sandbox: () => import('./commands/apis/sandbox.js').then((m) => m.default), + submission: () => import('./commands/apis/submission.js').then((m) => m.default), + targeting: () => import('./commands/apis/targeting.js').then((m) => m.default), + 'template-variables': () => import('./commands/apis/template-variables.js').then((m) => m.default), + user: () => import('./commands/apis/user.js').then((m) => m.default), + 'validation-rules': () => import('./commands/apis/validation-rules.js').then((m) => m.default), + webhooks: () => import('./commands/apis/webhooks.js').then((m) => m.default), + workflow: () => import('./commands/apis/workflow.js').then((m) => m.default), + 'workflow-definition': () => import('./commands/apis/workflow-definition.js').then((m) => m.default), + }, +}); diff --git a/packages/cli/src/lib/auth-store.ts b/packages/cli/src/lib/auth-store.ts new file mode 100644 index 00000000..ad726e9b --- /dev/null +++ b/packages/cli/src/lib/auth-store.ts @@ -0,0 +1,101 @@ +import { existsSync, mkdirSync, readFileSync, writeFileSync, unlinkSync } from 'node:fs'; +import { homedir } from 'node:os'; +import { join } from 'node:path'; +import { getResolvedProfile, upsertProfile, resolveProfileName } from './profiles.js'; + +export type Credentials = { + token: string; + org_id?: string; + user_id?: string; + name?: string; + expires_at?: string; +}; + +const getConfigDir = (): string => { + const xdgConfig = process.env.XDG_CONFIG_HOME; + const base = xdgConfig || join(homedir(), '.config'); + return join(base, 'epilot'); +}; + +const getCredentialsPath = (): string => { + return join(getConfigDir(), 'credentials.json'); +}; + +export const loadCredentials = (): Credentials | null => { + const path = getCredentialsPath(); + if (!existsSync(path)) return null; + + try { + const raw = readFileSync(path, 'utf-8'); + const creds = JSON.parse(raw) as Credentials; + + if (creds.expires_at) { + const expiry = new Date(creds.expires_at); + if (expiry < new Date()) return null; + } + + return creds; + } catch { + return null; + } +}; + +/** + * Save credentials. If a profile is active, store into the profile. + * Also saves to legacy credentials.json for backwards compat. + */ +export const saveCredentials = (creds: Credentials, profileName?: string): void => { + // Save to profile if one is specified or active + const targetProfile = profileName || resolveProfileName(); + if (targetProfile) { + upsertProfile(targetProfile, { + token: creds.token, + org_id: creds.org_id, + user_id: creds.user_id, + expires_at: creds.expires_at, + }); + } + + // Also save to legacy credentials.json + const dir = getConfigDir(); + mkdirSync(dir, { recursive: true }); + writeFileSync(getCredentialsPath(), JSON.stringify(creds, null, 2), { mode: 0o600 }); +}; + +export const removeCredentials = (): boolean => { + const path = getCredentialsPath(); + if (!existsSync(path)) return false; + unlinkSync(path); + return true; +}; + +/** + * Resolve token from multiple sources. + * + * Priority: + * 1. --token flag + * 2. EPILOT_TOKEN env var + * 3. Active/selected profile token + * 4. Legacy credentials.json + */ +export const resolveToken = (flagToken?: string, flagProfile?: string): string | null => { + if (flagToken) return flagToken; + + const envToken = process.env.EPILOT_TOKEN; + if (envToken) return envToken; + + // Check profile (resolves from --profile flag, EPILOT_PROFILE env, or active) + const profile = getResolvedProfile(flagProfile); + if (profile?.token) { + // Check profile token expiry + if (profile.expires_at) { + const expiry = new Date(profile.expires_at); + if (expiry < new Date()) return null; + } + return profile.token; + } + + // Fallback to legacy credentials + const creds = loadCredentials(); + return creds?.token ?? null; +}; diff --git a/packages/cli/src/lib/body-handler.ts b/packages/cli/src/lib/body-handler.ts new file mode 100644 index 00000000..c49d2974 --- /dev/null +++ b/packages/cli/src/lib/body-handler.ts @@ -0,0 +1,204 @@ +import { existsSync, mkdirSync, readFileSync, writeFileSync, unlinkSync } from 'node:fs'; +import { homedir } from 'node:os'; +import { join } from 'node:path'; +import { isValidJson } from './utils.js'; + +interface ResolveBodyOptions { + dataFlag: string | undefined; + hasRequestBody: boolean; + isRequired: boolean; + interactive?: boolean; + defaultTemplate?: unknown; + /** Cache key for persisting editor payloads (e.g. "entity/createEntity") */ + cacheKey?: string; +} + +/** + * Resolve request body from multiple sources. + * + * Priority: + * 1. -d flag with JSON data + * 2. Piped stdin (when not a TTY) + * 3. Interactive $EDITOR prompt (when TTY and interactive mode) + * 4. null (no body) + */ +export const resolveBody = async (opts: ResolveBodyOptions): Promise => { + const { dataFlag, hasRequestBody, isRequired, interactive, defaultTemplate, cacheKey } = opts; + + // 1. Explicit -d flag + if (dataFlag) { + if (!isValidJson(dataFlag)) { + throw new Error('Invalid JSON in -d flag. Provide valid JSON data.'); + } + return JSON.parse(dataFlag); + } + + // 2. Check for piped stdin + if (!process.stdin.isTTY) { + const input = await readStdin(); + if (input.trim()) { + if (!isValidJson(input)) { + throw new Error('Invalid JSON from stdin. Provide valid JSON data.'); + } + return JSON.parse(input); + } + } + + // 3. Interactive editor prompt (with retry on invalid JSON) + if (hasRequestBody && interactive && process.stdin.isTTY) { + const cached = cacheKey ? loadPayloadCache(cacheKey) : undefined; + let editorDefault = cached ?? (defaultTemplate ? JSON.stringify(defaultTemplate, null, 2) : '{\n \n}'); + const { editor } = await import('@inquirer/prompts'); + const MAX_RETRIES = 3; + + for (let attempt = 0; attempt < MAX_RETRIES; attempt++) { + const result = await editor({ + message: attempt === 0 ? 'Edit request body (JSON):' : 'Fix JSON and save (or empty to cancel):', + default: editorDefault, + waitForUserInput: false, + }); + + const trimmed = result.trim(); + if (!trimmed) { + if (cacheKey) clearPayloadCache(cacheKey); + if (isRequired) { + throw new Error('Request body is required but editor returned empty content.'); + } + return null; + } + + if (isValidJson(trimmed)) { + if (cacheKey) savePayloadCache(cacheKey, trimmed); + return JSON.parse(trimmed); + } + + // Show parse error and wait for user before re-opening editor + const parseError = getJsonParseError(trimmed); + process.stderr.write(`\x1b[31mInvalid JSON: ${parseError}\x1b[0m\n`); + + if (attempt < MAX_RETRIES - 1) { + const { input } = await import('@inquirer/prompts'); + await input({ message: 'Press ENTER to reopen editor...', theme: { prefix: '' } }); + } + + editorDefault = trimmed; + } + + throw new Error('Invalid JSON from editor after multiple attempts.'); + } + + // 4. No body provided + if (hasRequestBody && isRequired) { + throw new Error( + 'This operation requires a request body. Provide data with -d \'{"key":"value"}\' or pipe via stdin.', + ); + } + + return null; +}; + +/** + * Check if an operation has a request body (and if it's required). + */ +export const getRequestBodyInfo = ( + spec: Record, + operationId: string, +): { hasBody: boolean; isRequired: boolean } => { + const paths = (spec.paths ?? {}) as Record>; + + for (const methods of Object.values(paths)) { + for (const method of ['get', 'post', 'put', 'patch', 'delete', 'head', 'options']) { + const op = methods[method] as Record | undefined; + if (!op || op.operationId !== operationId) continue; + + const reqBody = op.requestBody as Record | undefined; + if (!reqBody) return { hasBody: false, isRequired: false }; + + return { + hasBody: true, + isRequired: !!reqBody.required, + }; + } + } + + return { hasBody: false, isRequired: false }; +}; + +/** + * Payload cache: persists the last editor payload per operation so users + * can re-edit if they make a mistake. Stored under ~/.config/epilot/cache/. + */ +const getPayloadCacheDir = (): string => { + const xdgConfig = process.env.XDG_CONFIG_HOME; + const base = xdgConfig || join(homedir(), '.config'); + return join(base, 'epilot', 'cache'); +}; + +const getPayloadCachePath = (cacheKey: string): string => { + // cacheKey is "apiName/operationId" — use as directory/file + return join(getPayloadCacheDir(), `${cacheKey.replace(/\//g, '_')}.json`); +}; + +export const loadPayloadCache = (cacheKey: string): string | undefined => { + const path = getPayloadCachePath(cacheKey); + if (!existsSync(path)) return undefined; + try { + return readFileSync(path, 'utf-8'); + } catch { + return undefined; + } +}; + +export const savePayloadCache = (cacheKey: string, payload: string): void => { + const dir = getPayloadCacheDir(); + mkdirSync(dir, { recursive: true }); + writeFileSync(getPayloadCachePath(cacheKey), payload, 'utf-8'); +}; + +export const clearPayloadCache = (cacheKey: string): void => { + const path = getPayloadCachePath(cacheKey); + if (existsSync(path)) { + try { + unlinkSync(path); + } catch { + // ignore + } + } +}; + +const getJsonParseError = (str: string): string => { + try { + JSON.parse(str); + return 'unknown error'; + } catch (e) { + return e instanceof Error ? e.message : String(e); + } +}; + +const readStdin = (): Promise => { + return new Promise((resolve) => { + let data = ''; + process.stdin.setEncoding('utf-8'); + + const timeout = setTimeout(() => { + process.stdin.removeAllListeners('data'); + process.stdin.removeAllListeners('end'); + resolve(data); + }, 100); + + process.stdin.on('data', (chunk) => { + data += chunk; + }); + + process.stdin.on('end', () => { + clearTimeout(timeout); + resolve(data); + }); + + // If stdin is already ended + if (process.stdin.readableEnded) { + clearTimeout(timeout); + resolve(data); + } + }); +}; diff --git a/packages/cli/src/lib/call.ts b/packages/cli/src/lib/call.ts new file mode 100644 index 00000000..df8c5093 --- /dev/null +++ b/packages/cli/src/lib/call.ts @@ -0,0 +1,537 @@ +import type { OpenAPIV3 } from 'openapi-client-axios'; +import OpenAPIClientAxiosModule from 'openapi-client-axios'; + +// Handle CJS default export: the default import wraps the module +const OpenAPIClientAxios = + (OpenAPIClientAxiosModule as unknown as { default: typeof OpenAPIClientAxiosModule }).default ?? + OpenAPIClientAxiosModule; + +import { loadDefinition } from './definition-loader.js'; +import { resolveToken } from './auth-store.js'; +import { getResolvedProfile } from './profiles.js'; +import { collectParams, getOperationParams, getMissingRequired } from './param-collector.js'; +import { resolveBody, getRequestBodyInfo } from './body-handler.js'; +import { formatResponse } from './response-formatter.js'; +import { isInteractive, pickOperation, formatOperationsTable, promptParam } from './interactive.js'; +import { BOLD, RESET, DIM, RED, YELLOW, GREEN, methodColor, pager, highlightJson } from './utils.js'; +import type { OperationChoice } from './interactive.js'; + +export type CallArgs = { + operation?: string; + _args?: string[]; + param?: string | string[]; + data?: string; + header?: string | string[]; + include?: boolean; + definition?: string; + server?: string; + profile?: string; + token?: string; + json?: boolean; + verbose?: boolean; + interactive?: boolean; + jsonata?: string; + guided?: boolean; + help?: boolean; + _apihelp?: boolean; +}; + +/** + * Extract all operations from an OpenAPI spec. + */ +const extractOperations = (spec: OpenAPIV3.Document): OperationChoice[] => { + const operations: OperationChoice[] = []; + + for (const [path, methods] of Object.entries(spec.paths ?? {})) { + if (!methods) continue; + for (const method of ['get', 'post', 'put', 'patch', 'delete', 'head', 'options'] as const) { + const op = (methods as Record)[method] as OpenAPIV3.OperationObject | undefined; + if (!op?.operationId) continue; + operations.push({ + operationId: op.operationId, + method: method.toUpperCase(), + path, + summary: (op.summary || '').substring(0, 120), + description: (op.description || '').split('\n')[0].substring(0, 200), + }); + } + } + + return operations; +}; + +// ── Helpers for rich operation help ───────────────────────────────────────── + +const sampleParamValue = (p: OpenAPIV3.ParameterObject): string => { + const schema = p.schema as OpenAPIV3.SchemaObject | undefined; + if (p.example !== undefined) return String(p.example); + if (schema?.example !== undefined) return String(schema.example); + if (schema?.type === 'boolean') return 'true'; + if (schema?.type === 'integer' || schema?.type === 'number') return '1'; + if (p.name === 'id' || p.name.endsWith('_id') || p.name.endsWith('Id')) return '123e4567-e89b-12d3-a456-426614174000'; + if (p.name === 'slug') return 'contact'; + if (p.name === 'email') return 'user@example.com'; + return 'example'; +}; + +const MAX_BODY_LINES = 30; + +const truncateJson = (obj: unknown, depth = 0, maxDepth = 3): unknown => { + if (obj === null || obj === undefined) return obj; + if (typeof obj !== 'object') return obj; + if (depth >= maxDepth) return Array.isArray(obj) ? [] : {}; + if (Array.isArray(obj)) { + return obj.slice(0, 2).map((item) => truncateJson(item, depth + 1, maxDepth)); + } + const result: Record = {}; + for (const [key, value] of Object.entries(obj)) { + result[key] = truncateJson(value, depth + 1, maxDepth); + } + return result; +}; + +import { mock } from 'mock-json-schema'; + +const mockFromSchema = (schema: OpenAPIV3.SchemaObject): unknown => { + return mock(schema); +}; + +// @ts-expect-error CJS default import +import dereferenceJsonSchema from 'dereference-json-schema'; +const { dereferenceSync } = dereferenceJsonSchema as unknown as { dereferenceSync: (schema: unknown) => unknown }; + +/** + * Extract the JSON body schema for an operation (if any). + */ +const getBodySchema = (spec: OpenAPIV3.Document, operationId: string): OpenAPIV3.SchemaObject | undefined => { + const paths = spec.paths ?? {}; + for (const methods of Object.values(paths)) { + if (!methods) continue; + for (const method of ['get', 'post', 'put', 'patch', 'delete', 'head', 'options'] as const) { + const op = (methods as Record)[method]; + if (!op || op.operationId !== operationId) continue; + const reqBody = op.requestBody as OpenAPIV3.RequestBodyObject | undefined; + if (!reqBody) return undefined; + const content = reqBody.content?.['application/json']; + return content?.schema as OpenAPIV3.SchemaObject | undefined; + } + } + return undefined; +}; + +/** + * Build rich operation help text — matching the generated docs quality. + * Returns null if the operation is not found. + */ +const formatOperationHelp = (apiName: string, operationId: string, spec: OpenAPIV3.Document): string | null => { + let out = ''; + const w = (text: string) => { + out += text; + }; + + for (const [path, methods] of Object.entries(spec.paths ?? {})) { + if (!methods) continue; + for (const method of ['get', 'post', 'put', 'patch', 'delete', 'head', 'options'] as const) { + const op = (methods as Record)[method] as OpenAPIV3.OperationObject | undefined; + if (!op || op.operationId !== operationId) continue; + + const color = methodColor(method); + const descFirstLine = (op.description || '').split('\n')[0].trim(); + + // ── Title ── + w(`\n${BOLD}epilot ${apiName} ${operationId}${RESET}`); + if (descFirstLine) w(` — ${descFirstLine}`); + w(`\n\n`); + w(` ${color}${method.toUpperCase()}${RESET} ${path}\n`); + w(`\n`); + + // ── Full description ── + if (op.description) { + const restOfDesc = op.description.split('\n').slice(1).join('\n').trim(); + if (restOfDesc) w(` ${DIM}${restOfDesc}${RESET}\n\n`); + } + + // ── Parameters ── + const params = getOperationParams(spec, operationId); + if (params.length > 0) { + w(`${BOLD}PARAMETERS${RESET}\n\n`); + + const nameWidth = Math.max(...params.map((p) => p.name.length), 4) + 2; + + for (const p of params) { + const schema = p.schema as OpenAPIV3.SchemaObject | undefined; + const type = schema?.type || ''; + const format = schema?.format ? ` (${schema.format})` : ''; + const req = p.required ? `${YELLOW}required${RESET}` : `${DIM}optional${RESET}`; + const desc = p.description ? ` ${DIM}${p.description}${RESET}` : ''; + + w(` ${BOLD}${p.name.padEnd(nameWidth)}${RESET} ${p.in.padEnd(6)} ${type}${format} ${req}${desc}\n`); + } + w(`\n`); + } + + // ── Request body ── + const reqBody = op.requestBody as OpenAPIV3.RequestBodyObject | undefined; + if (reqBody) { + w(`${BOLD}REQUEST BODY${RESET}${reqBody.required ? ` ${YELLOW}(required)${RESET}` : ''}\n`); + if (reqBody.description) w(` ${DIM}${reqBody.description}${RESET}\n`); + + // Show mock body + const content = reqBody.content?.['application/json']; + const bodySchema = content?.schema as OpenAPIV3.SchemaObject | undefined; + if (bodySchema) { + try { + const mockBody = truncateJson(mockFromSchema(bodySchema)); + const bodyStr = highlightJson(JSON.stringify(mockBody, null, 2)); + const lines = bodyStr.split('\n'); + w(`\n`); + if (lines.length <= MAX_BODY_LINES) { + for (const line of lines) w(` ${line}\n`); + } else { + for (const line of lines.slice(0, MAX_BODY_LINES)) w(` ${line}\n`); + w(` ${DIM} ...${RESET}\n`); + } + } catch { + // skip mock on error + } + } + w(`\n`); + } + + // ── Flags ── + w(`${BOLD}FLAGS${RESET}\n\n`); + w(` ${GREEN}-p${RESET} key=value Set a named parameter\n`); + w(` ${GREEN}-d${RESET} '{...}' Request body JSON\n`); + w(` ${GREEN}-H${RESET} 'Key: Value' Custom header\n`); + w(` ${GREEN}-t, --token${RESET} Bearer token for authentication\n`); + w(` ${GREEN}--profile${RESET} Use a named profile\n`); + w(` ${GREEN}-s, --server${RESET} Override server base URL\n`); + w(` ${GREEN}-i, --include${RESET} Include response headers in output\n`); + w(` ${GREEN}--json${RESET} Output raw JSON (no formatting)\n`); + w(` ${GREEN}-v, --verbose${RESET} Verbose output (show request details)\n`); + w(` ${GREEN}--jsonata${RESET} JSONata expression to transform response\n`); + w(` ${GREEN}--definition${RESET} Override OpenAPI spec file/URL\n`); + w(` ${GREEN}--guided${RESET} Prompt for all parameters interactively\n`); + w(` ${GREEN}--no-interactive${RESET} Disable interactive prompts\n`); + w(`\n`); + + // ── Sample calls ── + w(`${BOLD}EXAMPLES${RESET}\n\n`); + + const reqParams = params.filter((p) => p.required || p.in === 'path'); + const pathParams = params.filter((p) => p.in === 'path'); + const pFlags = reqParams.map((p) => `-p ${p.name}=${sampleParamValue(p)}`); + + // Primary: with -p flags + { + const parts = [` ${GREEN}$${RESET} epilot ${apiName} ${operationId}`]; + for (const pf of pFlags) parts.push(pf); + w(`${parts.join(' \\\n ')}\n`); + } + w(`\n`); + + // Positional shorthand + if (pathParams.length > 0) { + const positionalVals = pathParams.map((p) => sampleParamValue(p)); + w(` ${DIM}# positional args for path parameters${RESET}\n`); + w(` ${GREEN}$${RESET} epilot ${apiName} ${operationId} ${positionalVals.join(' ')}\n`); + w(`\n`); + } + + // With body + if (reqBody) { + const content = reqBody.content?.['application/json']; + const bodySchema = content?.schema as OpenAPIV3.SchemaObject | undefined; + if (bodySchema) { + try { + const mockBody = truncateJson(mockFromSchema(bodySchema)); + const compact = JSON.stringify(mockBody); + if (compact.length <= 80) { + w(` ${DIM}# with request body${RESET}\n`); + w(` ${GREEN}$${RESET} epilot ${apiName} ${operationId}`); + if (pFlags.length > 0) w(` ${pFlags.join(' ')}`); + w(` -d '${compact}'\n`); + } else { + const pretty = JSON.stringify(mockBody, null, 2); + w(` ${DIM}# with request body${RESET}\n`); + const parts = [` ${GREEN}$${RESET} epilot ${apiName} ${operationId}`]; + if (pFlags.length > 0) for (const pf of pFlags) parts.push(pf); + parts.push(`-d '${pretty}'`); + w(`${parts.join(' \\\n ')}\n`); + } + w(`\n`); + } catch { + // skip + } + } + + // Stdin pipe + const pFlagsStr = pFlags.length > 0 ? ` ${pFlags.join(' ')}` : ''; + w(` ${DIM}# pipe from file${RESET}\n`); + w(` ${GREEN}$${RESET} cat body.json | epilot ${apiName} ${operationId}${pFlagsStr}\n`); + w(`\n`); + } + + // JSONata + { + const pFlagsStr = pFlags.length > 0 ? ` ${pFlags.join(' ')}` : ''; + const jsonataExpr = guessJsonataExpr(op); + w(` ${DIM}# filter response with JSONata${RESET}\n`); + w(` ${GREEN}$${RESET} epilot ${apiName} ${operationId}${pFlagsStr} --jsonata '${jsonataExpr}'\n`); + w(`\n`); + } + + // Raw JSON for scripting + { + const pFlagsStr = pFlags.length > 0 ? ` ${pFlags.join(' ')}` : ''; + w(` ${DIM}# raw JSON for scripting${RESET}\n`); + w(` ${GREEN}$${RESET} epilot ${apiName} ${operationId}${pFlagsStr} --json\n`); + w(`\n`); + } + + // ── Sample response ── + const successResp = ((op.responses as Record)?.['200'] || + (op.responses as Record)?.['201']) as OpenAPIV3.ResponseObject | undefined; + if (successResp) { + const respContent = successResp.content?.['application/json']; + const respSchema = respContent?.schema as OpenAPIV3.SchemaObject | undefined; + if (respSchema) { + try { + const mockResp = truncateJson(mockFromSchema(respSchema)); + const respStr = JSON.stringify(mockResp, null, 2); + const lines = respStr.split('\n'); + + w(`${BOLD}SAMPLE RESPONSE${RESET}\n\n`); + const limit = 40; + const shown = lines.length <= limit ? lines : lines.slice(0, limit); + const highlighted = highlightJson(shown.join('\n')); + for (const hLine of highlighted.split('\n')) w(` ${hLine}\n`); + if (lines.length > limit) w(` ${DIM} ... (${lines.length - limit} more lines)${RESET}\n`); + w(`\n`); + } catch { + // skip + } + } + } + + return out; + } + } + + return null; +}; + +/** + * Guess a useful JSONata expression for an operation. + */ +const guessJsonataExpr = (op: OpenAPIV3.OperationObject): string => { + const successResp = ((op.responses as Record)?.['200'] || + (op.responses as Record)?.['201']) as OpenAPIV3.ResponseObject | undefined; + if (!successResp) return '$'; + + const respContent = successResp.content?.['application/json']; + const schema = respContent?.schema as OpenAPIV3.SchemaObject | undefined; + if (!schema?.properties) return '$'; + + const props = schema.properties as Record; + if (props.results) return 'results[0]'; + if (props.data) return 'data'; + if (props.items) return 'items[0]'; + if (props.hits) return 'hits'; + if (props.entity) return 'entity._title'; + if (props.id) return 'id'; + if (props.email) return 'email'; + + const keys = Object.keys(props); + return keys.length > 0 ? keys[0] : '$'; +}; + +/** + * Core API call logic. + */ +export const callApi = async (apiName: string, args: CallArgs): Promise => { + // Load the OpenAPI definition and dereference all $ref pointers + const rawSpec = await loadDefinition(apiName, args.definition); + const spec = dereferenceSync(rawSpec) as Record; + const operations = extractOperations(spec as OpenAPIV3.Document); + + // No operation specified: list operations or interactive pick + if (!args.operation) { + const header = + `\n${BOLD}epilot ${apiName}${RESET} - ${(spec as OpenAPIV3.Document).info?.title || apiName}\n\n` + + `${BOLD}Available operations:${RESET}\n\n`; + + if (!args._apihelp && isInteractive({ interactive: args.interactive })) { + process.stdout.write(header); + const operationId = await pickOperation(operations); + // Re-run with selected operation + return callApi(apiName, { ...args, operation: operationId }); + } + + if (args.interactive === false) { + process.stdout.write(header + formatOperationsTable(apiName, operations)); + } else { + pager(header + formatOperationsTable(apiName, operations)); + } + return; + } + + const operationId = args.operation; + + // --help on specific operation + if (args.help) { + const helpText = formatOperationHelp(apiName, operationId, spec as OpenAPIV3.Document); + if (helpText) { + if (args.interactive === false) { + process.stdout.write(helpText); + } else { + pager(helpText); + } + } else { + process.stderr.write(`${RED}Operation "${operationId}" not found.${RESET}\n`); + process.exit(1); + } + return; + } + + // Validate operation exists + const opExists = operations.some((op) => op.operationId === operationId); + if (!opExists) { + process.stderr.write(`${RED}Unknown operation "${operationId}" for ${apiName}.${RESET}\n\n`); + process.stderr.write(`Available: ${operations.map((op) => op.operationId).join(', ')}\n`); + process.exit(1); + } + + // Resolve auth (--token > EPILOT_TOKEN > profile > credentials.json > interactive prompt) + let token = resolveToken(args.token, args.profile); + if (!token) { + if (isInteractive({ interactive: args.interactive })) { + const { promptToken } = await import('./interactive.js'); + token = await promptToken(); + } + if (!token) { + process.stderr.write(`${RED}No authentication token found.${RESET}\n`); + process.stderr.write(`Run 'epilot auth login' or pass --token \n`); + process.exit(1); + } + } + + // Collect parameters + const { params: opParams, pathTemplate } = getOperationParams(spec as OpenAPIV3.Document, operationId); + const positionalArgs = args._args ?? []; + const collected = collectParams(opParams, args.param, positionalArgs, pathTemplate); + + // Guided mode: prompt for ALL params; otherwise prompt only for missing required + if (args.guided && isInteractive({ interactive: args.interactive })) { + for (const param of opParams) { + if (!(param.name in collected)) { + const value = await promptParam(param.name, param); + if (value) collected[param.name] = value; + } + } + } else { + const missing = getMissingRequired(opParams, collected); + if (missing.length > 0 && isInteractive({ interactive: args.interactive })) { + for (const param of opParams) { + if (param.required && !(param.name in collected)) { + const value = await promptParam(param.name, param); + if (value) collected[param.name] = value; + } + } + } + } + + // Validate required params + const stillMissing = getMissingRequired(opParams, collected); + if (stillMissing.length > 0) { + process.stderr.write(`${RED}Missing required parameters: ${stillMissing.join(', ')}${RESET}\n`); + process.exit(1); + } + + // Resolve request body + const { hasBody, isRequired } = getRequestBodyInfo(spec as Record, operationId); + const forceBodyPrompt = args.guided && hasBody; + let bodyTemplate: unknown | undefined; + if (hasBody && (forceBodyPrompt || isInteractive({ interactive: args.interactive }))) { + const bodySchema = getBodySchema(spec as OpenAPIV3.Document, operationId); + if (bodySchema) { + try { + bodyTemplate = mockFromSchema(bodySchema); + } catch { + // skip template on error + } + } + } + const body = await resolveBody({ + dataFlag: args.data, + hasRequestBody: hasBody, + isRequired, + interactive: isInteractive({ interactive: args.interactive }), + defaultTemplate: bodyTemplate, + cacheKey: `${apiName}/${operationId}`, + }); + + // Parse custom headers + const customHeaders: Record = {}; + if (args.header) { + const headers = Array.isArray(args.header) ? args.header : [args.header]; + for (const h of headers) { + const idx = h.indexOf(':'); + if (idx > 0) { + customHeaders[h.substring(0, idx).trim()] = h.substring(idx + 1).trim(); + } + } + } + + // Resolve server URL override: --server flag > profile > spec default + const serverOverride = args.server || getResolvedProfile(args.profile)?.server; + if (serverOverride) { + const specDoc = spec as OpenAPIV3.Document; + specDoc.servers = [{ url: serverOverride }]; + } + + // Init OpenAPI client + const api = new OpenAPIClientAxios({ + definition: spec, + quick: true, + }); + const client = await api.init(); + + // Set auth + client.defaults.headers.common.authorization = `Bearer ${token}`; + + // Set custom headers + for (const [key, value] of Object.entries(customHeaders)) { + client.defaults.headers.common[key] = value; + } + + // Execute the call + const operationFn = (client as Record)[operationId]; + if (typeof operationFn !== 'function') { + process.stderr.write(`${RED}Operation "${operationId}" not found on client.${RESET}\n`); + process.exit(1); + } + + try { + const response = await (operationFn as Function)(Object.keys(collected).length > 0 ? collected : null, body, { + validateStatus: () => true, + }); + + await formatResponse(response, { + json: args.json, + include: args.include, + verbose: args.verbose, + jsonata: args.jsonata, + interactive: args.interactive, + operationId, + }); + + // Exit with non-zero for error responses + if (response.status >= 400) { + process.exit(1); + } + } catch (err) { + process.stderr.write(`${RED}Request failed: ${err instanceof Error ? err.message : String(err)}${RESET}\n`); + process.exit(1); + } +}; diff --git a/packages/cli/src/lib/definition-loader.ts b/packages/cli/src/lib/definition-loader.ts new file mode 100644 index 00000000..789ea1fa --- /dev/null +++ b/packages/cli/src/lib/definition-loader.ts @@ -0,0 +1,62 @@ +import { existsSync, readFileSync } from 'node:fs'; +import { resolve, join, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import type { Document } from 'openapi-client-axios'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +/** + * Load an OpenAPI definition for the given API. + * + * Priority: + * 1. --definition flag (file path or URL) + * 2. .epilot/overrides/.json in CWD + * 3. Bundled definitions/.json + */ +export const loadDefinition = async (apiName: string, definitionOverride?: string): Promise => { + // 1. Explicit override via flag + if (definitionOverride) { + if (definitionOverride.startsWith('http://') || definitionOverride.startsWith('https://')) { + const res = await fetch(definitionOverride); + if (!res.ok) { + throw new Error(`Failed to fetch definition from ${definitionOverride}: ${res.status} ${res.statusText}`); + } + return (await res.json()) as Document; + } + const absPath = resolve(definitionOverride); + if (!existsSync(absPath)) { + throw new Error(`Definition file not found: ${absPath}`); + } + return JSON.parse(readFileSync(absPath, 'utf-8')) as Document; + } + + // 2. Project-level override + const overridePath = join(process.cwd(), '.epilot', 'overrides', `${apiName}.json`); + if (existsSync(overridePath)) { + return JSON.parse(readFileSync(overridePath, 'utf-8')) as Document; + } + + // 3. Bundled definition — check multiple possible locations + const searchPaths = [ + // Built dist: dist/bin/epilot.js -> dist/definitions/ + resolve(__dirname, '..', 'definitions', `${apiName}.json`), + // Built dist (deeper): dist/lib/ -> dist/definitions/ + resolve(__dirname, '..', '..', 'definitions', `${apiName}.json`), + // Dev mode with tsx: src/lib/ -> definitions/ + resolve(__dirname, '..', '..', '..', 'definitions', `${apiName}.json`), + // Dev mode: packages/cli/definitions/ + resolve(__dirname, '..', '..', 'definitions', `${apiName}.json`), + ]; + + for (const path of searchPaths) { + if (existsSync(path)) { + return JSON.parse(readFileSync(path, 'utf-8')) as Document; + } + } + + throw new Error( + `No OpenAPI definition found for "${apiName}". ` + + `Use --definition to provide one, or place it at .epilot/overrides/${apiName}.json`, + ); +}; diff --git a/packages/cli/src/lib/interactive.ts b/packages/cli/src/lib/interactive.ts new file mode 100644 index 00000000..62978d18 --- /dev/null +++ b/packages/cli/src/lib/interactive.ts @@ -0,0 +1,98 @@ +import type { OpenAPIV3 } from 'openapi-client-axios'; +import { RESET, DIM } from './utils.js'; + +export type OperationChoice = { + operationId: string; + method: string; + path: string; + summary: string; + description: string; +}; + +/** + * Check if the current environment supports interactive prompts. + */ +export const isInteractive = (flags?: { interactive?: boolean }): boolean => { + if (flags?.interactive === false) return false; + return !!process.stdout.isTTY; +}; + +/** + * Display an interactive operation picker using @inquirer/prompts. + */ +export const pickOperation = async (operations: OperationChoice[]): Promise => { + const { search } = await import('@inquirer/prompts'); + + const choices = operations.map((op) => ({ + name: `${op.operationId} ${DIM}${op.method.toUpperCase()} ${op.path}${RESET}`, + value: op.operationId, + description: op.description, + })); + + const result = await search({ + message: 'Select an operation (type to filter):', + source: (input) => { + if (!input) return choices; + const term = input.toLowerCase(); + return choices.filter((c) => c.value.toLowerCase().includes(term) || c.name.toLowerCase().includes(term)); + }, + pageSize: 20, + }); + + return result; +}; + +/** + * Prompt for a missing parameter value. + */ +export const promptParam = async (name: string, param: OpenAPIV3.ParameterObject): Promise => { + const { input } = await import('@inquirer/prompts'); + + const schema = param.schema as OpenAPIV3.SchemaObject | undefined; + const defaultValue = schema?.default != null ? String(schema.default) : undefined; + + const hint = param.required ? '(required)' : '(optional, press Enter to skip)'; + const result = await input({ + message: `${name} ${hint}:`, + default: defaultValue, + validate: (value) => { + if (param.required && !value.trim()) { + return `${name} is required`; + } + return true; + }, + }); + + return result; +}; + +/** + * Prompt the user for a bearer token when none is configured. + */ +export const promptToken = async (): Promise => { + const { password } = await import('@inquirer/prompts'); + + const token = await password({ + message: 'No token found. Paste a bearer token (or run `epilot auth login`):', + mask: '*', + validate: (value) => { + if (!value.trim()) return 'Token is required'; + return true; + }, + }); + + return token || null; +}; + +/** + * Print the operations list as a table (non-interactive). + */ +export const formatOperationsTable = (apiName: string, operations: OperationChoice[]): string => { + const lines: string[] = []; + for (const op of operations) { + const desc = op.description ? ` – ${op.description}` : ''; + lines.push(` ${op.operationId} ${DIM}${op.method.toUpperCase()} ${op.path}${desc}${RESET}`); + } + lines.push(`\nRun \`epilot ${apiName} --help\` for details.\n`); + return lines.join('\n'); +}; diff --git a/packages/cli/src/lib/param-collector.ts b/packages/cli/src/lib/param-collector.ts new file mode 100644 index 00000000..3b7b1f14 --- /dev/null +++ b/packages/cli/src/lib/param-collector.ts @@ -0,0 +1,89 @@ +import type { OpenAPIV3 } from 'openapi-client-axios'; +import { parseKeyValue, parseParamValue } from './utils.js'; + +export type CollectedParams = Record; + +type ParameterObject = OpenAPIV3.ParameterObject; + +export type OperationParamsResult = { + params: ParameterObject[]; + pathTemplate: string; +}; + +/** + * Extract parameters for an operation from the OpenAPI spec. + * Expects a dereferenced spec (no $ref pointers in parameters). + * Returns both the params and the URL path template. + */ +export const getOperationParams = (spec: OpenAPIV3.Document, operationId: string): OperationParamsResult => { + for (const [path, methods] of Object.entries(spec.paths ?? {})) { + if (!methods) continue; + + // Get path-level params + const pathParams = ((methods as Record).parameters || []) as ParameterObject[]; + + for (const method of ['get', 'post', 'put', 'patch', 'delete', 'head', 'options'] as const) { + const op = (methods as Record)[method] as OpenAPIV3.OperationObject | undefined; + if (!op || op.operationId !== operationId) continue; + + const opParams = (op.parameters || []) as ParameterObject[]; + // Merge: operation params override path params + const merged = [...pathParams.filter((p) => p.name)]; + for (const p of opParams) { + if (!p.name) continue; // skip unresolved refs + const idx = merged.findIndex((pp) => pp.name === p.name && pp.in === p.in); + if (idx >= 0) merged[idx] = p; + else merged.push(p); + } + return { params: merged, pathTemplate: path }; + } + } + return { params: [], pathTemplate: '' }; +}; + +/** + * Collect parameters from -p flags and positional args. + * + * Positional args are mapped to path parameters in URL template order + * (e.g. /v1/entity/{slug}/{id} → slug first, then id). + */ +export const collectParams = ( + params: ParameterObject[], + paramFlags: string | string[] | undefined, + positionalArgs: string[], + pathTemplate?: string, +): CollectedParams => { + const result: CollectedParams = {}; + + // Map positional args to path parameters in URL template order + let pathParams = params.filter((p) => p.in === 'path'); + if (pathTemplate) { + // Extract param names from URL template in order: /v1/{slug}/{id} → ['slug', 'id'] + const templateOrder = [...pathTemplate.matchAll(/\{([^}]+)\}/g)].map((m) => m[1]); + pathParams = templateOrder + .map((name) => pathParams.find((p) => p.name === name)) + .filter((p): p is ParameterObject => !!p); + } + for (let i = 0; i < positionalArgs.length && i < pathParams.length; i++) { + result[pathParams[i].name] = parseParamValue(positionalArgs[i]); + } + + // Parse -p key=value flags (overrides positional) + if (paramFlags) { + const flags = Array.isArray(paramFlags) ? paramFlags : [paramFlags]; + for (const flag of flags) { + const [key, value] = parseKeyValue(flag); + result[key] = parseParamValue(value); + } + } + + return result; +}; + +/** + * Validate that all required parameters are provided. + * Returns list of missing required param names. + */ +export const getMissingRequired = (params: ParameterObject[], collected: CollectedParams): string[] => { + return params.filter((p) => p.required && !(p.name in collected)).map((p) => `${p.name} (${p.in})`); +}; diff --git a/packages/cli/src/lib/profiles.ts b/packages/cli/src/lib/profiles.ts new file mode 100644 index 00000000..5795efd9 --- /dev/null +++ b/packages/cli/src/lib/profiles.ts @@ -0,0 +1,115 @@ +import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'; +import { homedir } from 'node:os'; +import { join } from 'node:path'; + +export type Profile = { + /** Display name */ + name: string; + /** Override server URL (e.g. http://localhost:3000, https://dev.epilot.cloud) */ + server?: string; + /** Bearer token for this profile */ + token?: string; + /** Org ID */ + org_id?: string; + /** User ID */ + user_id?: string; + /** Token expiry */ + expires_at?: string; + /** Custom headers */ + headers?: Record; +}; + +export type ProfileConfig = { + /** Currently active profile name */ + active?: string; + /** Named profiles */ + profiles: Record; +}; + +const getConfigDir = (): string => { + const xdgConfig = process.env.XDG_CONFIG_HOME; + const base = xdgConfig || join(homedir(), '.config'); + return join(base, 'epilot'); +}; + +const getProfilesPath = (): string => join(getConfigDir(), 'profiles.json'); + +export const loadProfiles = (): ProfileConfig => { + const path = getProfilesPath(); + if (!existsSync(path)) return { profiles: {} }; + try { + return JSON.parse(readFileSync(path, 'utf-8')) as ProfileConfig; + } catch { + return { profiles: {} }; + } +}; + +export const saveProfiles = (config: ProfileConfig): void => { + const dir = getConfigDir(); + mkdirSync(dir, { recursive: true }); + writeFileSync(getProfilesPath(), JSON.stringify(config, null, 2), { mode: 0o600 }); +}; + +/** + * Resolve the effective profile name. + * + * Priority: + * 1. --profile flag (passed explicitly) + * 2. EPILOT_PROFILE env var + * 3. Active profile from config + * 4. "default" if it exists + */ +export const resolveProfileName = (flagProfile?: string): string | null => { + if (flagProfile) return flagProfile; + if (process.env.EPILOT_PROFILE) return process.env.EPILOT_PROFILE; + const config = loadProfiles(); + if (config.active) return config.active; + if (config.profiles.default) return 'default'; + return null; +}; + +/** + * Get the resolved profile (from --profile flag, env, or active). + */ +export const getResolvedProfile = (flagProfile?: string): Profile | null => { + const name = resolveProfileName(flagProfile); + if (!name) return null; + const config = loadProfiles(); + return config.profiles[name] ?? null; +}; + +export const getActiveProfile = (): Profile | null => { + return getResolvedProfile(); +}; + +export const setActiveProfile = (name: string): boolean => { + const config = loadProfiles(); + if (!config.profiles[name]) return false; + config.active = name; + saveProfiles(config); + return true; +}; + +export const upsertProfile = (name: string, profile: Partial): void => { + const config = loadProfiles(); + config.profiles[name] = { name, ...config.profiles[name], ...profile }; + saveProfiles(config); +}; + +export const deleteProfile = (name: string): boolean => { + const config = loadProfiles(); + if (!config.profiles[name]) return false; + delete config.profiles[name]; + if (config.active === name) config.active = undefined; + saveProfiles(config); + return true; +}; + +export const listProfiles = (): { name: string; profile: Profile; active: boolean }[] => { + const config = loadProfiles(); + return Object.entries(config.profiles).map(([name, profile]) => ({ + name, + profile, + active: config.active === name, + })); +}; diff --git a/packages/cli/src/lib/response-formatter.ts b/packages/cli/src/lib/response-formatter.ts new file mode 100644 index 00000000..8a3aa066 --- /dev/null +++ b/packages/cli/src/lib/response-formatter.ts @@ -0,0 +1,139 @@ +import type { AxiosResponse } from 'axios'; +import { BOLD, RESET, RED, DIM, WHITE, BG_GREEN, BG_RED, methodColor, pager, highlightJson } from './utils.js'; + +export type FormatOptions = { + json?: boolean; + include?: boolean; + verbose?: boolean; + jsonata?: string; + interactive?: boolean; + operationId?: string; +}; + +/** Background color for HTTP status code */ +const statusBg = (code: number): string => { + if (code >= 400) return BG_RED; + return BG_GREEN; +}; + +/** + * Format and output an API response. + * + * Default mode: METHOD URL → status badge → highlighted JSON body + * --verbose: REQUEST META → RESPONSE META → RESPONSE BODY + * --include: RESPONSE META → RESPONSE BODY + * --json: raw JSON to stdout (no colors, no metadata) + */ +export const formatResponse = async (response: AxiosResponse, options: FormatOptions): Promise => { + const { json, include, verbose, jsonata, interactive, operationId } = options; + const isTTY = process.stdout.isTTY && process.stderr.isTTY; + const usePager = !json && isTTY && interactive !== false; + + // When paging, buffer everything into one string for less. + // When piped, write metadata to stderr and body to stdout as before. + let buf = ''; + const meta = (text: string) => { + if (usePager) { + buf += text; + } else { + process.stderr.write(text); + } + }; + + const req = response.config; + const method = (req.method || 'GET').toUpperCase(); + const baseURL = req.baseURL || ''; + const reqUrl = req.url || ''; + const url = reqUrl.startsWith('http') + ? reqUrl + : `${baseURL.replace(/\/$/, '')}${reqUrl.startsWith('/') ? '' : '/'}${reqUrl}`; + + // Verbose: show full request meta as JSON (like openapicmd) + if (verbose) { + meta(`${DIM}REQUEST META:${RESET}\n`); + + const requestMeta: Record = { + operationId, + method, + url, + }; + if (req.params && Object.keys(req.params).length > 0) { + requestMeta.params = req.params; + } + if (req.headers) { + const headers: Record = {}; + for (const [key, value] of Object.entries(req.headers)) { + if (key.toLowerCase() === 'authorization') { + headers[key] = 'Bearer ***'; + } else if (typeof value === 'string') { + headers[key] = value; + } + } + requestMeta.headers = headers; + } + meta(`${DIM}${JSON.stringify(requestMeta, null, 2)}${RESET}\n\n`); + } + + // Response meta: --verbose and --include both show it + if (verbose || include) { + meta(`${DIM}RESPONSE META:${RESET}\n`); + const responseMeta: Record = { + code: response.status, + status: response.statusText, + }; + if (include) { + responseMeta.headers = response.headers; + } + meta(`${DIM}${JSON.stringify(responseMeta, null, 2)}${RESET}\n\n`); + } else if (!json && isTTY) { + // Default mode: colored METHOD + URL, then status badge with background + const mColor = methodColor(method); + meta(`${mColor}${BOLD}${method}${RESET} ${url}\n`); + + const bg = statusBg(response.status); + meta(`${bg}${WHITE}${BOLD} ${response.status} ${RESET} ${response.statusText}\n`); + } + + // Process response data + let data = response.data; + + // Apply JSONata transformation + if (jsonata && data) { + try { + const jsonataModule = await import('jsonata'); + const expression = jsonataModule.default(jsonata); + data = await expression.evaluate(data); + } catch (err) { + process.stderr.write(`${RED}JSONata error: ${err instanceof Error ? err.message : String(err)}${RESET}\n`); + process.exit(1); + } + } + + // Output body + if (data !== undefined && data !== null) { + if (verbose || include) { + meta(`${DIM}RESPONSE BODY:${RESET}\n`); + } + + let body: string; + if (typeof data === 'string') { + body = `${data}\n`; + } else if (json) { + body = `${JSON.stringify(data)}\n`; + } else { + const pretty = JSON.stringify(data, null, 2); + body = isTTY ? `${highlightJson(pretty)}\n` : `${pretty}\n`; + } + + if (usePager) { + pager(buf + body); + } else { + process.stdout.write(body); + } + } else { + meta(`${DIM}(empty response)${RESET}\n`); + if (usePager && buf) { + pager(buf); + } + } +}; diff --git a/packages/cli/src/lib/utils.ts b/packages/cli/src/lib/utils.ts new file mode 100644 index 00000000..9577d84e --- /dev/null +++ b/packages/cli/src/lib/utils.ts @@ -0,0 +1,133 @@ +import { spawnSync } from 'node:child_process'; + +/** + * Check if a string is valid JSON. + */ +export const isValidJson = (str: string): boolean => { + try { + JSON.parse(str); + return true; + } catch { + return false; + } +}; + +/** + * Parse a "key=value" string into a [key, value] tuple. + */ +export const parseKeyValue = (str: string): [string, string] => { + const idx = str.indexOf('='); + if (idx === -1) return [str, '']; + return [str.substring(0, idx), str.substring(idx + 1)]; +}; + +/** + * Parse header strings like "Content-Type: application/json". + */ +export const parseHeader = (str: string): [string, string] => { + const idx = str.indexOf(':'); + if (idx === -1) return [str, '']; + return [str.substring(0, idx).trim(), str.substring(idx + 1).trim()]; +}; + +/** + * Try to parse a value as JSON, otherwise return as string. + */ +export const parseParamValue = (value: string): unknown => { + if (value === 'true') return true; + if (value === 'false') return false; + if (value === 'null') return null; + if (/^\d+$/.test(value)) return Number(value); + if (/^\d+\.\d+$/.test(value)) return Number(value); + // Try JSON (arrays, objects) + if (value.startsWith('{') || value.startsWith('[')) { + try { + return JSON.parse(value); + } catch { + return value; + } + } + return value; +}; + +/** + * Colorize HTTP method for display. + */ +export const methodColor = (method: string): string => { + const m = method.toUpperCase(); + switch (m) { + case 'GET': + return '\x1b[32m'; // green + case 'POST': + return '\x1b[33m'; // yellow + case 'PUT': + return '\x1b[34m'; // blue + case 'PATCH': + return '\x1b[36m'; // cyan + case 'DELETE': + return '\x1b[31m'; // red + default: + return '\x1b[37m'; // white + } +}; + +/** + * Page output through `less` if content is taller than the terminal. + * Falls back to direct stdout write if `less` is unavailable or not a TTY. + */ +export const pager = (content: string): void => { + if (!process.stdout.isTTY) { + process.stdout.write(content); + return; + } + + const lines = content.split('\n').length; + const rows = process.stdout.rows || 24; + + if (lines <= rows) { + process.stdout.write(content); + return; + } + + try { + const result = spawnSync('less', ['-R', '-F', '-X'], { + input: content, + stdio: ['pipe', 'inherit', 'inherit'], + }); + if (result.status !== 0 && result.status !== null) { + process.stdout.write(content); + } + } catch { + process.stdout.write(content); + } +}; + +export const RESET = '\x1b[0m'; +export const BOLD = '\x1b[1m'; +export const DIM = '\x1b[2m'; +export const GREEN = '\x1b[32m'; +export const RED = '\x1b[31m'; +export const YELLOW = '\x1b[33m'; +export const CYAN = '\x1b[36m'; +export const WHITE = '\x1b[37m'; +export const BG_GREEN = '\x1b[42m'; +export const BG_RED = '\x1b[41m'; +export const BG_YELLOW = '\x1b[43m'; +export const MAGENTA = '\x1b[35m'; +export const BLUE = '\x1b[34m'; + +/** + * Syntax-highlight a JSON string with ANSI colors. + * Keys = cyan, strings = green, numbers = yellow, booleans/null = magenta. + */ +export const highlightJson = (jsonStr: string): string => + jsonStr.replace( + /("(?:\\.|[^"\\])*")\s*(:)?|(\b(?:true|false|null)\b)|(-?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)/g, + (match, str, colon, bool, num) => { + if (str && colon) return `${CYAN}${str}${RESET}${colon}`; + if (str) return `${GREEN}${str}${RESET}`; + if (bool) return `${MAGENTA}${bool}${RESET}`; + if (num) return `${YELLOW}${num}${RESET}`; + return match; + }, + ); diff --git a/packages/cli/test/auth-token.test.ts b/packages/cli/test/auth-token.test.ts new file mode 100644 index 00000000..2245b3a7 --- /dev/null +++ b/packages/cli/test/auth-token.test.ts @@ -0,0 +1,105 @@ +import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; +import { saveCredentials } from '../src/lib/auth-store.js'; + +// Mock auth-store +vi.mock('../src/lib/auth-store.js', () => ({ + saveCredentials: vi.fn(), +})); + +// Mock @inquirer/prompts +vi.mock('@inquirer/prompts', () => ({ + password: vi.fn(), +})); + +describe('auth token command', () => { + let mockStdout: string; + let mockStderr: string; + let mockExit: ReturnType; + + beforeEach(() => { + mockStdout = ''; + mockStderr = ''; + vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => { + mockStdout += String(chunk); + return true; + }); + vi.spyOn(process.stderr, 'write').mockImplementation((chunk) => { + mockStderr += String(chunk); + return true; + }); + mockExit = vi.spyOn(process, 'exit').mockImplementation((() => {}) as never); + vi.clearAllMocks(); + }); + + afterEach(() => { + vi.restoreAllMocks(); + }); + + it('saves token passed as positional argument', async () => { + const mod = await import('../src/commands/auth-token.js'); + const command = mod.default; + + // Simulate citty calling run with args + await command.run!({ args: { token: 'my-test-token-123', profile: undefined } } as any); + + expect(saveCredentials).toHaveBeenCalledWith({ token: 'my-test-token-123' }, undefined); + expect(mockStdout).toContain('Token saved'); + }); + + it('saves token to named profile', async () => { + const mod = await import('../src/commands/auth-token.js'); + const command = mod.default; + + await command.run!({ args: { token: 'tok-456', profile: 'staging' } } as any); + + expect(saveCredentials).toHaveBeenCalledWith({ token: 'tok-456' }, 'staging'); + expect(mockStdout).toContain('profile "staging"'); + }); + + it('prompts for token interactively when not provided', async () => { + const { password } = await import('@inquirer/prompts'); + (password as ReturnType).mockResolvedValue('interactive-token'); + + const mod = await import('../src/commands/auth-token.js'); + const command = mod.default; + + await command.run!({ args: { token: undefined, profile: undefined } } as any); + + expect(password).toHaveBeenCalledWith({ message: 'Paste your API token:' }); + expect(saveCredentials).toHaveBeenCalledWith({ token: 'interactive-token' }, undefined); + expect(mockStdout).toContain('Token saved'); + }); + + it('exits with error when no token provided interactively', async () => { + const { password } = await import('@inquirer/prompts'); + (password as ReturnType).mockResolvedValue(''); + + const mod = await import('../src/commands/auth-token.js'); + const command = mod.default; + + await command.run!({ args: { token: undefined, profile: undefined } } as any); + + expect(mockStderr).toContain('No token provided'); + expect(mockExit).toHaveBeenCalledWith(1); + }); + + it('uses EPILOT_PROFILE env var when no --profile flag', async () => { + const origEnv = process.env.EPILOT_PROFILE; + process.env.EPILOT_PROFILE = 'env-profile'; + + try { + const mod = await import('../src/commands/auth-token.js'); + const command = mod.default; + + await command.run!({ args: { token: 'tok-env', profile: undefined } } as any); + + expect(saveCredentials).toHaveBeenCalledWith({ token: 'tok-env' }, 'env-profile'); + } finally { + if (origEnv === undefined) { + delete process.env.EPILOT_PROFILE; + } else { + process.env.EPILOT_PROFILE = origEnv; + } + } + }); +}); diff --git a/packages/cli/test/body-handler.test.ts b/packages/cli/test/body-handler.test.ts new file mode 100644 index 00000000..71fc0465 --- /dev/null +++ b/packages/cli/test/body-handler.test.ts @@ -0,0 +1,38 @@ +import { describe, it, expect } from 'vitest'; +import { getRequestBodyInfo } from '../src/lib/body-handler.js'; + +describe('getRequestBodyInfo', () => { + const spec = { + paths: { + '/v1/entity/{slug}': { + post: { + operationId: 'createEntity', + requestBody: { + required: true, + content: { 'application/json': { schema: { type: 'object' } } }, + }, + responses: {}, + }, + get: { + operationId: 'listEntities', + responses: {}, + }, + }, + }, + }; + + it('detects required request body', () => { + const info = getRequestBodyInfo(spec, 'createEntity'); + expect(info).toEqual({ hasBody: true, isRequired: true }); + }); + + it('returns false for operations without body', () => { + const info = getRequestBodyInfo(spec, 'listEntities'); + expect(info).toEqual({ hasBody: false, isRequired: false }); + }); + + it('returns false for unknown operation', () => { + const info = getRequestBodyInfo(spec, 'nonexistent'); + expect(info).toEqual({ hasBody: false, isRequired: false }); + }); +}); diff --git a/packages/cli/test/integration/call.test.ts b/packages/cli/test/integration/call.test.ts new file mode 100644 index 00000000..a1c603de --- /dev/null +++ b/packages/cli/test/integration/call.test.ts @@ -0,0 +1,583 @@ +/** + * Integration tests for the CLI call flow. + * + * Uses MSW to intercept real HTTP requests made by openapi-client-axios, + * verifying that callApi correctly: + * - loads the bundled OpenAPI definition + * - resolves parameters (named + positional) + * - sends request body + * - sets auth headers + * - formats and outputs responses + * - handles errors + */ +import { describe, it, expect, vi, beforeAll, afterAll, afterEach, beforeEach } from 'vitest'; +import { http, HttpResponse } from 'msw'; +import { setupServer } from 'msw/node'; +import { callApi, type CallArgs } from '../../src/lib/call.js'; + +// ─── Capture stdout / stderr ──────────────────────────────────────────────── + +let stdoutOutput: string; +let stderrOutput: string; +let stdoutSpy: ReturnType; +let stderrSpy: ReturnType; + +const originalStdoutIsTTY = process.stdout.isTTY; +const originalStderrIsTTY = process.stderr.isTTY; + +beforeEach(() => { + stdoutOutput = ''; + stderrOutput = ''; + stdoutSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => { + stdoutOutput += String(chunk); + return true; + }); + stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation((chunk) => { + stderrOutput += String(chunk); + return true; + }); + // Simulate TTY so status badge is shown in tests + Object.defineProperty(process.stdout, 'isTTY', { value: true, writable: true }); + Object.defineProperty(process.stderr, 'isTTY', { value: true, writable: true }); + // Ensure pager always falls through to direct write in tests + Object.defineProperty(process.stdout, 'rows', { value: 9999, writable: true, configurable: true }); +}); + +afterEach(() => { + stdoutSpy.mockRestore(); + stderrSpy.mockRestore(); + Object.defineProperty(process.stdout, 'isTTY', { value: originalStdoutIsTTY, writable: true }); + Object.defineProperty(process.stderr, 'isTTY', { value: originalStderrIsTTY, writable: true }); +}); + +// ─── Prevent process.exit from killing the test runner ────────────────────── + +let lastExitCode: number | undefined; + +beforeEach(() => { + lastExitCode = undefined; +}); + +const exitSpy = vi.spyOn(process, 'exit').mockImplementation((code?: string | number | null | undefined) => { + lastExitCode = Number(code ?? 0); + throw new Error(`process.exit(${code})`); +}); + +afterAll(() => { + exitSpy.mockRestore(); +}); + +// ─── MSW Server ───────────────────────────────────────────────────────────── + +const server = setupServer(); + +beforeAll(() => server.listen({ onUnhandledRequest: 'bypass' })); +afterEach(() => server.resetHandlers()); +afterAll(() => server.close()); + +// ─── Helpers ──────────────────────────────────────────────────────────────── + +const ENTITY_BASE = 'https://entity.sls.epilot.io'; +const USER_BASE = 'https://user.sls.epilot.io'; +const FILE_BASE = 'https://file.sls.epilot.io'; + +const TOKEN = 'test-integration-token'; + +const baseArgs: Partial = { + token: TOKEN, + interactive: false, + json: true, +}; + +const call = (apiName: string, args: Partial) => callApi(apiName, { ...baseArgs, ...args } as CallArgs); + +// ─── Entity API ───────────────────────────────────────────────────────────── + +describe('Entity API', () => { + it('GET listSchemas', async () => { + const mockSchemas = { + results: [ + { slug: 'contact', name: 'Contact' }, + { slug: 'order', name: 'Order' }, + ], + }; + + server.use( + http.get(`${ENTITY_BASE}/v1/entity/schemas`, ({ request }) => { + expect(request.headers.get('authorization')).toBe(`Bearer ${TOKEN}`); + return HttpResponse.json(mockSchemas); + }), + ); + + await call('entity', { operation: 'listSchemas' }); + + const output = JSON.parse(stdoutOutput); + expect(output.results).toHaveLength(2); + expect(output.results[0].slug).toBe('contact'); + }); + + it('GET getEntity with -p params', async () => { + const mockEntity = { + entity: { _id: 'abc-123', _schema: 'contact', first_name: 'John', last_name: 'Doe' }, + relations: [], + }; + + let capturedUrl: string | undefined; + + server.use( + http.get(`${ENTITY_BASE}/v1/entity/contact/abc-123`, ({ request }) => { + capturedUrl = request.url; + return HttpResponse.json(mockEntity); + }), + ); + + await call('entity', { + operation: 'getEntity', + param: ['slug=contact', 'id=abc-123'], + }); + + const output = JSON.parse(stdoutOutput); + expect(output.entity._id).toBe('abc-123'); + expect(output.entity.first_name).toBe('John'); + expect(capturedUrl).toContain('/v1/entity/contact/abc-123'); + }); + + it('GET getEntity with positional args', async () => { + const mockEntity = { + entity: { _id: 'xyz-789', _schema: 'order', total: 100 }, + relations: [], + }; + + server.use( + http.get(`${ENTITY_BASE}/v1/entity/:slug/:id`, (_info) => { + return HttpResponse.json(mockEntity); + }), + ); + + // Positional args map to path params in declaration order from spec: + // EntityIdPathParam (id) first, then EntitySlugPathParam (slug) + await call('entity', { + operation: 'getEntity', + _args: ['xyz-789', 'order'], + }); + + const output = JSON.parse(stdoutOutput); + expect(output.entity._schema).toBe('order'); + }); + + it('POST searchEntities with body', async () => { + const mockResults = { + hits: 42, + results: [ + { _id: '1', _schema: 'contact', first_name: 'Alice' }, + { _id: '2', _schema: 'contact', first_name: 'Bob' }, + ], + }; + + let capturedBody: unknown; + + server.use( + http.post(`${ENTITY_BASE}/v1/entity:search`, async ({ request }) => { + capturedBody = await request.json(); + return HttpResponse.json(mockResults); + }), + ); + + await call('entity', { + operation: 'searchEntities', + data: JSON.stringify({ q: 'first_name:Alice', size: 10 }), + }); + + const output = JSON.parse(stdoutOutput); + expect(output.hits).toBe(42); + expect(output.results).toHaveLength(2); + expect(capturedBody).toEqual({ q: 'first_name:Alice', size: 10 }); + }); + + it('POST createEntity with slug param and body', async () => { + const mockCreated = { entity: { _id: 'new-entity-1', _schema: 'contact', first_name: 'New' } }; + + let capturedBody: unknown; + + server.use( + http.post(`${ENTITY_BASE}/v1/entity/contact`, async ({ request }) => { + capturedBody = await request.json(); + return HttpResponse.json(mockCreated, { status: 201 }); + }), + ); + + await call('entity', { + operation: 'createEntity', + param: 'slug=contact', + data: JSON.stringify({ first_name: 'New', last_name: 'Entity' }), + }); + + const output = JSON.parse(stdoutOutput); + expect(output.entity._id).toBe('new-entity-1'); + expect(capturedBody).toEqual({ first_name: 'New', last_name: 'Entity' }); + }); + + it('PUT updateEntity with params and body', async () => { + const mockUpdated = { entity: { _id: 'abc-123', _schema: 'contact', first_name: 'Updated' } }; + + let capturedBody: unknown; + + server.use( + http.put(`${ENTITY_BASE}/v1/entity/contact/abc-123`, async ({ request }) => { + capturedBody = await request.json(); + return HttpResponse.json(mockUpdated); + }), + ); + + await call('entity', { + operation: 'updateEntity', + param: ['slug=contact', 'id=abc-123'], + data: JSON.stringify({ first_name: 'Updated' }), + }); + + const output = JSON.parse(stdoutOutput); + expect(output.entity.first_name).toBe('Updated'); + expect(capturedBody).toEqual({ first_name: 'Updated' }); + }); + + it('DELETE deleteEntity', async () => { + server.use( + http.delete(`${ENTITY_BASE}/v1/entity/contact/to-delete`, () => { + return new HttpResponse(null, { status: 204 }); + }), + ); + + await call('entity', { + operation: 'deleteEntity', + param: ['slug=contact', 'id=to-delete'], + }); + + // 204 No Content — no body output + expect(lastExitCode).toBeUndefined(); // no process.exit call = success + }); +}); + +// ─── User API ─────────────────────────────────────────────────────────────── + +describe('User API', () => { + it('GET getMeV2', async () => { + const mockUser = { + id: 'user-1', + email: 'dev@epilot.cloud', + name: 'Test User', + organization_id: 'org-123', + }; + + server.use( + http.get(`${USER_BASE}/v2/users/me`, ({ request }) => { + expect(request.headers.get('authorization')).toBe(`Bearer ${TOKEN}`); + return HttpResponse.json(mockUser); + }), + ); + + await call('user', { operation: 'getMeV2' }); + + const output = JSON.parse(stdoutOutput); + expect(output.email).toBe('dev@epilot.cloud'); + expect(output.organization_id).toBe('org-123'); + }); + + it('GET getUserV2 with id param', async () => { + const mockUser = { id: 'user-42', email: 'other@epilot.cloud', name: 'Other User' }; + + server.use( + http.get(`${USER_BASE}/v2/users/user-42`, () => { + return HttpResponse.json(mockUser); + }), + ); + + await call('user', { + operation: 'getUserV2', + param: 'id=user-42', + }); + + const output = JSON.parse(stdoutOutput); + expect(output.id).toBe('user-42'); + }); + + it('GET listUsersV2', async () => { + const mockUsers = { + results: [ + { id: 'u1', email: 'a@epilot.cloud' }, + { id: 'u2', email: 'b@epilot.cloud' }, + ], + }; + + server.use( + http.get(`${USER_BASE}/v2/users`, () => { + return HttpResponse.json(mockUsers); + }), + ); + + await call('user', { operation: 'listUsersV2' }); + + const output = JSON.parse(stdoutOutput); + expect(output.results).toHaveLength(2); + }); +}); + +// ─── Error Handling ───────────────────────────────────────────────────────── + +describe('Error handling', () => { + it('returns 403 and exits with code 1', async () => { + server.use( + http.get(`${ENTITY_BASE}/v1/entity/schemas`, () => { + return HttpResponse.json({ message: 'Forbidden' }, { status: 403 }); + }), + ); + + await expect(call('entity', { operation: 'listSchemas' })).rejects.toThrow('process.exit(1)'); + + expect(lastExitCode).toBe(1); + const output = JSON.parse(stdoutOutput); + expect(output.message).toBe('Forbidden'); + }); + + it('returns 404 and exits with code 1', async () => { + server.use( + http.get(`${ENTITY_BASE}/v1/entity/contact/nonexistent`, () => { + return HttpResponse.json({ message: 'Not Found' }, { status: 404 }); + }), + ); + + await expect( + call('entity', { + operation: 'getEntity', + param: ['slug=contact', 'id=nonexistent'], + }), + ).rejects.toThrow('process.exit(1)'); + + expect(lastExitCode).toBe(1); + }); + + it('returns 500 and exits with code 1', async () => { + server.use( + http.post(`${ENTITY_BASE}/v1/entity:search`, () => { + return HttpResponse.json({ message: 'Internal Server Error' }, { status: 500 }); + }), + ); + + await expect( + call('entity', { + operation: 'searchEntities', + data: '{"q":"*"}', + }), + ).rejects.toThrow('process.exit(1)'); + + expect(lastExitCode).toBe(1); + }); + + it('exits with code 1 for unknown operation', async () => { + await expect(call('entity', { operation: 'nonExistentOperation' })).rejects.toThrow('process.exit(1)'); + + expect(lastExitCode).toBe(1); + expect(stderrOutput).toContain('Unknown operation'); + }); + + it('exits with code 1 when no token and non-interactive', async () => { + // Ensure no token is resolved from env or stored credentials + const origToken = process.env.EPILOT_TOKEN; + const origProfile = process.env.EPILOT_PROFILE; + const origXdg = process.env.XDG_CONFIG_HOME; + delete process.env.EPILOT_TOKEN; + delete process.env.EPILOT_PROFILE; + process.env.XDG_CONFIG_HOME = '/tmp/epilot-test-no-creds'; + + try { + await expect( + callApi('entity', { + operation: 'listSchemas', + interactive: false, + // no token + } as CallArgs), + ).rejects.toThrow('process.exit(1)'); + + expect(lastExitCode).toBe(1); + expect(stderrOutput).toContain('No authentication token'); + } finally { + if (origToken !== undefined) process.env.EPILOT_TOKEN = origToken; + else delete process.env.EPILOT_TOKEN; + if (origProfile !== undefined) process.env.EPILOT_PROFILE = origProfile; + else delete process.env.EPILOT_PROFILE; + if (origXdg !== undefined) process.env.XDG_CONFIG_HOME = origXdg; + else delete process.env.XDG_CONFIG_HOME; + } + }); +}); + +// ─── Custom Headers ───────────────────────────────────────────────────────── + +describe('Custom headers', () => { + it('sends custom headers with -H', async () => { + let capturedHeaders: Record = {}; + + server.use( + http.get(`${ENTITY_BASE}/v1/entity/schemas`, ({ request }) => { + capturedHeaders = { + 'x-epilot-org-id': request.headers.get('x-epilot-org-id') || '', + 'x-custom': request.headers.get('x-custom') || '', + }; + return HttpResponse.json({ results: [] }); + }), + ); + + await call('entity', { + operation: 'listSchemas', + header: ['x-epilot-org-id: 12345', 'x-custom: my-value'], + }); + + expect(capturedHeaders['x-epilot-org-id']).toBe('12345'); + expect(capturedHeaders['x-custom']).toBe('my-value'); + }); +}); + +// ─── Server Override ──────────────────────────────────────────────────────── + +describe('Server override', () => { + it('uses --server flag to override base URL', async () => { + let requestReceived = false; + + server.use( + http.get('http://localhost:9999/v1/entity/schemas', () => { + requestReceived = true; + return HttpResponse.json({ results: [] }); + }), + ); + + await call('entity', { + operation: 'listSchemas', + server: 'http://localhost:9999', + }); + + expect(requestReceived).toBe(true); + }); +}); + +// ─── JSONata ──────────────────────────────────────────────────────────────── + +describe('JSONata transformation', () => { + it('filters response with JSONata expression', async () => { + const mockResults = { + hits: 2, + results: [ + { _id: '1', _schema: 'contact', first_name: 'Alice' }, + { _id: '2', _schema: 'contact', first_name: 'Bob' }, + ], + }; + + server.use( + http.post(`${ENTITY_BASE}/v1/entity:search`, () => { + return HttpResponse.json(mockResults); + }), + ); + + await call('entity', { + operation: 'searchEntities', + data: '{"q":"*"}', + jsonata: 'results[0].first_name', + }); + + // JSONata extracts just the first name (strings output unquoted) + expect(stdoutOutput.trim()).toBe('Alice'); + }); + + it('extracts nested field with JSONata', async () => { + const mockUser = { id: 'u1', email: 'dev@epilot.cloud', name: 'Dev' }; + + server.use( + http.get(`${USER_BASE}/v2/users/me`, () => { + return HttpResponse.json(mockUser); + }), + ); + + await call('user', { + operation: 'getMeV2', + jsonata: 'email', + }); + + expect(stdoutOutput.trim()).toBe('dev@epilot.cloud'); + }); +}); + +// ─── Output Modes ─────────────────────────────────────────────────────────── + +describe('Output modes', () => { + const mockData = { results: [{ slug: 'contact' }] }; + + beforeEach(() => { + server.use( + http.get(`${ENTITY_BASE}/v1/entity/schemas`, () => { + return HttpResponse.json(mockData); + }), + ); + }); + + it('--json outputs compact JSON without status badge', async () => { + await call('entity', { operation: 'listSchemas', json: true }); + + // stdout has JSON, stderr has no status badge in json mode + const output = JSON.parse(stdoutOutput); + expect(output.results[0].slug).toBe('contact'); + expect(stderrOutput).toBe(''); // no status badge in --json mode + }); + + it('non-json mode outputs status badge', async () => { + await call('entity', { operation: 'listSchemas', json: false }); + + const combined = stdoutOutput + stderrOutput; + expect(combined).toContain('200'); + expect(combined).toContain('"contact"'); + }); + + it('--include shows response meta and body labels', async () => { + await call('entity', { operation: 'listSchemas', include: true }); + + const combined = stdoutOutput + stderrOutput; + expect(combined).toContain('RESPONSE META:'); + expect(combined).toContain('"code": 200'); + expect(combined).toContain('RESPONSE BODY:'); + }); + + it('--verbose shows request meta and response meta', async () => { + await call('entity', { operation: 'listSchemas', verbose: true }); + + const combined = stdoutOutput + stderrOutput; + expect(combined).toContain('REQUEST META:'); + expect(combined).toContain('GET'); + expect(combined).toContain('Bearer ***'); + expect(combined).toContain('RESPONSE META:'); + }); +}); + +// ─── File API (different base URL) ───────────────────────────────────────── + +describe('File API', () => { + it('GET getFile with id param', async () => { + const mockFile = { + _id: 'file-abc', + filename: 'document.pdf', + mime_type: 'application/pdf', + size_bytes: 12345, + }; + + server.use( + http.get(`${FILE_BASE}/v2/files/file-abc`, () => { + return HttpResponse.json(mockFile); + }), + ); + + await call('file', { + operation: 'getFile', + param: 'id=file-abc', + }); + + const output = JSON.parse(stdoutOutput); + expect(output._id).toBe('file-abc'); + expect(output.filename).toBe('document.pdf'); + }); +}); diff --git a/packages/cli/test/param-collector.test.ts b/packages/cli/test/param-collector.test.ts new file mode 100644 index 00000000..9d95e4e5 --- /dev/null +++ b/packages/cli/test/param-collector.test.ts @@ -0,0 +1,111 @@ +import { describe, it, expect } from 'vitest'; +import { collectParams, getMissingRequired, getOperationParams } from '../src/lib/param-collector.js'; +import type { OpenAPIV3 } from 'openapi-client-axios'; + +const makeParam = (name: string, location: string, required = false): OpenAPIV3.ParameterObject => ({ + name, + in: location, + required, + schema: { type: 'string' }, +}); + +describe('collectParams', () => { + const params = [makeParam('slug', 'path', true), makeParam('id', 'path', true), makeParam('hydrate', 'query', false)]; + + it('maps positional args to path params in declaration order (no template)', () => { + const result = collectParams(params, undefined, ['contact', '123']); + expect(result).toEqual({ slug: 'contact', id: 123 }); + }); + + it('maps positional args to path params in URL template order', () => { + // Params declared as [id, slug] but template is /{slug}/{id} + const reorderedParams = [ + makeParam('id', 'path', true), + makeParam('slug', 'path', true), + makeParam('hydrate', 'query', false), + ]; + const result = collectParams(reorderedParams, undefined, ['contact', '123'], '/v1/{slug}/{id}'); + expect(result).toEqual({ slug: 'contact', id: 123 }); + }); + + it('parses -p key=value flags', () => { + const result = collectParams(params, ['slug=contact', 'id=abc'], []); + expect(result).toEqual({ slug: 'contact', id: 'abc' }); + }); + + it('-p flags override positional args', () => { + const result = collectParams(params, ['slug=override'], ['original', '123']); + expect(result).toEqual({ slug: 'override', id: 123 }); + }); + + it('handles single -p string', () => { + const result = collectParams(params, 'slug=test', []); + expect(result).toEqual({ slug: 'test' }); + }); + + it('parses boolean values', () => { + const result = collectParams(params, 'hydrate=true', []); + expect(result).toEqual({ hydrate: true }); + }); + + it('parses numeric values', () => { + const result = collectParams(params, 'id=42', []); + expect(result).toEqual({ id: 42 }); + }); + + it('returns empty for no inputs', () => { + const result = collectParams(params, undefined, []); + expect(result).toEqual({}); + }); +}); + +describe('getMissingRequired', () => { + const params = [makeParam('slug', 'path', true), makeParam('id', 'path', true), makeParam('hydrate', 'query', false)]; + + it('returns missing required params', () => { + const missing = getMissingRequired(params, { slug: 'contact' }); + expect(missing).toEqual(['id (path)']); + }); + + it('returns empty when all required provided', () => { + const missing = getMissingRequired(params, { slug: 'contact', id: '123' }); + expect(missing).toEqual([]); + }); + + it('ignores optional params', () => { + const missing = getMissingRequired(params, { slug: 'a', id: 'b' }); + expect(missing).toEqual([]); + }); +}); + +describe('getOperationParams', () => { + const spec: OpenAPIV3.Document = { + openapi: '3.0.2', + info: { title: 'Test', version: '1.0.0' }, + paths: { + '/v1/{slug}/{id}': { + parameters: [{ name: 'slug', in: 'path', required: true, schema: { type: 'string' } }], + get: { + operationId: 'getEntity', + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + { name: 'hydrate', in: 'query', schema: { type: 'boolean' } }, + ], + responses: {}, + }, + }, + }, + }; + + it('merges path-level and operation-level params', () => { + const { params, pathTemplate } = getOperationParams(spec, 'getEntity'); + expect(params).toHaveLength(3); + expect(params.map((p) => p.name)).toEqual(['slug', 'id', 'hydrate']); + expect(pathTemplate).toBe('/v1/{slug}/{id}'); + }); + + it('returns empty for unknown operation', () => { + const { params } = getOperationParams(spec, 'nonexistent'); + expect(params).toEqual([]); + }); +}); diff --git a/packages/cli/test/resolve-body.test.ts b/packages/cli/test/resolve-body.test.ts new file mode 100644 index 00000000..eb852e50 --- /dev/null +++ b/packages/cli/test/resolve-body.test.ts @@ -0,0 +1,308 @@ +import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; +import { resolveBody, loadPayloadCache, savePayloadCache, clearPayloadCache } from '../src/lib/body-handler.js'; + +// Mock @inquirer/prompts +vi.mock('@inquirer/prompts', () => ({ + editor: vi.fn(), + input: vi.fn().mockResolvedValue(''), +})); + +describe('resolveBody', () => { + const originalIsTTY = process.stdin.isTTY; + + afterEach(() => { + vi.restoreAllMocks(); + Object.defineProperty(process.stdin, 'isTTY', { value: originalIsTTY, writable: true }); + }); + + describe('with -d flag', () => { + it('parses valid JSON from -d flag', async () => { + const result = await resolveBody({ + dataFlag: '{"name":"test"}', + hasRequestBody: true, + isRequired: true, + }); + expect(result).toEqual({ name: 'test' }); + }); + + it('throws on invalid JSON in -d flag', async () => { + await expect( + resolveBody({ + dataFlag: 'not-json', + hasRequestBody: true, + isRequired: true, + }), + ).rejects.toThrow('Invalid JSON in -d flag'); + }); + + it('-d flag takes priority over interactive mode', async () => { + Object.defineProperty(process.stdin, 'isTTY', { value: true, writable: true }); + + const result = await resolveBody({ + dataFlag: '{"priority":"flag"}', + hasRequestBody: true, + isRequired: true, + interactive: true, + }); + expect(result).toEqual({ priority: 'flag' }); + + // editor should not be called + const { editor } = await import('@inquirer/prompts'); + expect(editor).not.toHaveBeenCalled(); + }); + }); + + describe('interactive editor', () => { + beforeEach(() => { + Object.defineProperty(process.stdin, 'isTTY', { value: true, writable: true }); + }); + + it('opens editor with default template when interactive', async () => { + const { editor } = await import('@inquirer/prompts'); + (editor as ReturnType).mockResolvedValue('{"from":"editor"}'); + + const result = await resolveBody({ + dataFlag: undefined, + hasRequestBody: true, + isRequired: true, + interactive: true, + }); + + expect(editor).toHaveBeenCalledWith({ + message: 'Edit request body (JSON):', + default: '{\n \n}', + waitForUserInput: false, + }); + expect(result).toEqual({ from: 'editor' }); + }); + + it('uses defaultTemplate when provided', async () => { + const { editor } = await import('@inquirer/prompts'); + (editor as ReturnType).mockResolvedValue('{"edited":true}'); + + const template = { name: '', age: 0 }; + await resolveBody({ + dataFlag: undefined, + hasRequestBody: true, + isRequired: true, + interactive: true, + defaultTemplate: template, + }); + + expect(editor).toHaveBeenCalledWith({ + message: 'Edit request body (JSON):', + default: JSON.stringify(template, null, 2), + waitForUserInput: false, + }); + }); + + it('retries editor on invalid JSON then accepts valid JSON', async () => { + const { editor } = await import('@inquirer/prompts'); + const stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true); + (editor as ReturnType) + .mockResolvedValueOnce('not valid json') + .mockResolvedValueOnce('{"fixed": true}'); + + const result = await resolveBody({ + dataFlag: undefined, + hasRequestBody: true, + isRequired: true, + interactive: true, + }); + + expect(result).toEqual({ fixed: true }); + expect(editor).toHaveBeenCalledTimes(2); + // Second call should have the invalid content as default so user can fix it + expect((editor as ReturnType).mock.calls[1][0].default).toBe('not valid json'); + // Error message shown to stderr + expect(stderrSpy).toHaveBeenCalled(); + const errOutput = stderrSpy.mock.calls.map((c) => String(c[0])).join(''); + expect(errOutput).toContain('Invalid JSON'); + stderrSpy.mockRestore(); + }); + + it('throws after max retries with invalid JSON', async () => { + const { editor } = await import('@inquirer/prompts'); + vi.spyOn(process.stderr, 'write').mockImplementation(() => true); + (editor as ReturnType).mockResolvedValue('still not json'); + + await expect( + resolveBody({ + dataFlag: undefined, + hasRequestBody: true, + isRequired: true, + interactive: true, + }), + ).rejects.toThrow('Invalid JSON from editor after multiple attempts'); + }); + + it('throws when editor returns empty and body is required', async () => { + const { editor } = await import('@inquirer/prompts'); + (editor as ReturnType).mockResolvedValue(' '); + + await expect( + resolveBody({ + dataFlag: undefined, + hasRequestBody: true, + isRequired: true, + interactive: true, + }), + ).rejects.toThrow('Request body is required but editor returned empty content'); + }); + + it('returns null when editor returns empty and body is optional', async () => { + const { editor } = await import('@inquirer/prompts'); + (editor as ReturnType).mockResolvedValue(''); + + const result = await resolveBody({ + dataFlag: undefined, + hasRequestBody: true, + isRequired: false, + interactive: true, + }); + expect(result).toBeNull(); + }); + + it('does not open editor when interactive is false', async () => { + const { editor } = await import('@inquirer/prompts'); + + const result = await resolveBody({ + dataFlag: undefined, + hasRequestBody: true, + isRequired: false, + interactive: false, + }); + + expect(editor).not.toHaveBeenCalled(); + expect(result).toBeNull(); + }); + }); + + describe('no body provided', () => { + beforeEach(() => { + Object.defineProperty(process.stdin, 'isTTY', { value: true, writable: true }); + }); + + it('throws when required body is missing in non-interactive mode', async () => { + await expect( + resolveBody({ + dataFlag: undefined, + hasRequestBody: true, + isRequired: true, + interactive: false, + }), + ).rejects.toThrow('This operation requires a request body'); + }); + + it('returns null when optional body is missing', async () => { + const result = await resolveBody({ + dataFlag: undefined, + hasRequestBody: false, + isRequired: false, + }); + expect(result).toBeNull(); + }); + + it('returns null when operation has no request body', async () => { + const result = await resolveBody({ + dataFlag: undefined, + hasRequestBody: false, + isRequired: false, + interactive: true, + }); + expect(result).toBeNull(); + }); + }); + + describe('payload cache', () => { + const cacheKey = 'test-api/testOperation'; + + beforeEach(() => { + Object.defineProperty(process.stdin, 'isTTY', { value: true, writable: true }); + clearPayloadCache(cacheKey); + }); + + afterEach(() => { + clearPayloadCache(cacheKey); + }); + + it('persists editor payload for next run', async () => { + const { editor } = await import('@inquirer/prompts'); + (editor as ReturnType).mockResolvedValue('{"saved":"payload"}'); + + await resolveBody({ + dataFlag: undefined, + hasRequestBody: true, + isRequired: true, + interactive: true, + cacheKey, + }); + + const cached = loadPayloadCache(cacheKey); + expect(cached).toBe('{"saved":"payload"}'); + }); + + it('uses cached payload as editor default over mock template', async () => { + // Pre-populate the cache + savePayloadCache(cacheKey, '{"cached":"data"}'); + + const { editor } = await import('@inquirer/prompts'); + (editor as ReturnType).mockResolvedValue('{"final":"result"}'); + + await resolveBody({ + dataFlag: undefined, + hasRequestBody: true, + isRequired: true, + interactive: true, + defaultTemplate: { mock: 'template' }, + cacheKey, + }); + + // Should use cached value, not the mock template + expect(editor).toHaveBeenCalledWith( + expect.objectContaining({ + default: '{"cached":"data"}', + }), + ); + }); + + it('clears cache when editor returns empty', async () => { + savePayloadCache(cacheKey, '{"old":"data"}'); + + const { editor } = await import('@inquirer/prompts'); + (editor as ReturnType).mockResolvedValue(''); + + await resolveBody({ + dataFlag: undefined, + hasRequestBody: true, + isRequired: false, + interactive: true, + cacheKey, + }); + + const cached = loadPayloadCache(cacheKey); + expect(cached).toBeUndefined(); + }); + + it('falls back to mock template when no cache exists', async () => { + const { editor } = await import('@inquirer/prompts'); + (editor as ReturnType).mockResolvedValue('{"ok":true}'); + + const template = { q: '*', size: 10 }; + await resolveBody({ + dataFlag: undefined, + hasRequestBody: true, + isRequired: true, + interactive: true, + defaultTemplate: template, + cacheKey, + }); + + expect(editor).toHaveBeenCalledWith( + expect.objectContaining({ + default: JSON.stringify(template, null, 2), + }), + ); + }); + }); +}); diff --git a/packages/cli/test/response-formatter.test.ts b/packages/cli/test/response-formatter.test.ts new file mode 100644 index 00000000..9d9b815c --- /dev/null +++ b/packages/cli/test/response-formatter.test.ts @@ -0,0 +1,121 @@ +import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; +import { formatResponse } from '../src/lib/response-formatter.js'; +import type { AxiosResponse } from 'axios'; + +const makeResponse = (status: number, data: unknown, statusText = 'OK'): AxiosResponse => + ({ + status, + statusText, + data, + headers: { 'content-type': 'application/json' }, + config: { + method: 'get', + url: 'https://example.com/api', + headers: {} as any, + } as any, + }) as AxiosResponse; + +/** Collect all writes to stdout+stderr into one combined string. */ +const allOutput = (stdoutWrite: ReturnType, stderrWrite: ReturnType) => { + const stdout = stdoutWrite.mock.calls.map(([s]) => s).join(''); + const stderr = stderrWrite.mock.calls.map(([s]) => s).join(''); + return stdout + stderr; +}; + +describe('formatResponse', () => { + let stdoutWrite: ReturnType; + let stderrWrite: ReturnType; + const originalStderrIsTTY = process.stderr.isTTY; + const originalStdoutIsTTY = process.stdout.isTTY; + const originalStdoutRows = process.stdout.rows; + + beforeEach(() => { + stdoutWrite = vi.spyOn(process.stdout, 'write').mockReturnValue(true); + stderrWrite = vi.spyOn(process.stderr, 'write').mockReturnValue(true); + // Simulate TTY so status badge is shown + Object.defineProperty(process.stdout, 'isTTY', { value: true, writable: true }); + Object.defineProperty(process.stderr, 'isTTY', { value: true, writable: true }); + // Ensure pager always falls through to direct write in tests + Object.defineProperty(process.stdout, 'rows', { value: 9999, writable: true, configurable: true }); + }); + + afterEach(() => { + Object.defineProperty(process.stdout, 'isTTY', { value: originalStdoutIsTTY, writable: true }); + Object.defineProperty(process.stderr, 'isTTY', { value: originalStderrIsTTY, writable: true }); + Object.defineProperty(process.stdout, 'rows', { value: originalStdoutRows, writable: true, configurable: true }); + }); + + it('outputs JSON data to stdout', async () => { + await formatResponse(makeResponse(200, { foo: 'bar' }), { json: true }); + const output = stdoutWrite.mock.calls.map(([s]) => s).join(''); + expect(output).toContain('"foo"'); + expect(output).toContain('"bar"'); + }); + + it('outputs status badge in non-json mode', async () => { + await formatResponse(makeResponse(200, { ok: true }), {}); + const output = allOutput(stdoutWrite, stderrWrite); + expect(output).toContain('200'); + }); + + it('does not output status badge in json mode', async () => { + await formatResponse(makeResponse(200, { ok: true }), { json: true }); + const output = allOutput(stdoutWrite, stderrWrite); + // biome-ignore lint/suspicious/noControlCharactersInRegex: stripping ANSI escape codes + const stripped = output.replace(/\x1b\[[0-9;]*m/g, ''); + // In json mode, '200' should only appear if it's part of the JSON data itself + expect(stripped).not.toMatch(/\b200\b.*OK/); + }); + + it('handles null data with empty response message', async () => { + await formatResponse(makeResponse(204, null, 'No Content'), {}); + const output = allOutput(stdoutWrite, stderrWrite); + // biome-ignore lint/suspicious/noControlCharactersInRegex: stripping ANSI escape codes + const stripped = output.replace(/\x1b\[[0-9;]*m/g, ''); + expect(stripped).toContain('(empty response)'); + }); + + it('handles string data', async () => { + await formatResponse(makeResponse(200, 'hello'), {}); + const output = allOutput(stdoutWrite, stderrWrite); + expect(output).toContain('hello'); + }); + + it('shows response meta with --include', async () => { + await formatResponse(makeResponse(200, {}), { include: true }); + const output = allOutput(stdoutWrite, stderrWrite); + expect(output).toContain('RESPONSE META:'); + expect(output).toContain('content-type'); + expect(output).toContain('RESPONSE BODY:'); + }); + + it('suppresses status badge when --include is used', async () => { + await formatResponse(makeResponse(200, { ok: true }), { include: true }); + const output = allOutput(stdoutWrite, stderrWrite); + // Should show RESPONSE META with code, not the bold status badge + expect(output).toContain('RESPONSE META:'); + expect(output).toContain('"code": 200'); + // biome-ignore lint/suspicious/noControlCharactersInRegex: stripping ANSI escape codes + const stripAnsi = (s: string) => s.replace(/\x1b\[[0-9;]*m/g, ''); + const lines = stripAnsi(output).split('\n'); + // The bold "200 OK" badge line should not appear separately + const badgeLine = lines.find((l) => /^\s*200\s+OK\s*$/.test(l)); + expect(badgeLine).toBeUndefined(); + }); + + it('suppresses status badge when stdout is piped', async () => { + Object.defineProperty(process.stdout, 'isTTY', { value: false, writable: true }); + await formatResponse(makeResponse(200, { ok: true }), {}); + const stderrOutput = stderrWrite.mock.calls.map(([s]) => s).join(''); + expect(stderrOutput).not.toContain('200'); + }); + + it('shows request meta and response meta with --verbose', async () => { + await formatResponse(makeResponse(200, { ok: true }), { verbose: true, operationId: 'testOp' }); + const output = allOutput(stdoutWrite, stderrWrite); + expect(output).toContain('REQUEST META:'); + expect(output).toContain('testOp'); + expect(output).toContain('RESPONSE META:'); + expect(output).toContain('RESPONSE BODY:'); + }); +}); diff --git a/packages/cli/test/utils.test.ts b/packages/cli/test/utils.test.ts new file mode 100644 index 00000000..63f71a82 --- /dev/null +++ b/packages/cli/test/utils.test.ts @@ -0,0 +1,57 @@ +import { describe, it, expect } from 'vitest'; +import { isValidJson, parseKeyValue, parseHeader, parseParamValue } from '../src/lib/utils.js'; + +describe('isValidJson', () => { + it('returns true for valid JSON', () => { + expect(isValidJson('{"a":1}')).toBe(true); + expect(isValidJson('[]')).toBe(true); + expect(isValidJson('"string"')).toBe(true); + }); + + it('returns false for invalid JSON', () => { + expect(isValidJson('{a:1}')).toBe(false); + expect(isValidJson('not json')).toBe(false); + }); +}); + +describe('parseKeyValue', () => { + it('splits on first =', () => { + expect(parseKeyValue('key=value')).toEqual(['key', 'value']); + expect(parseKeyValue('key=val=ue')).toEqual(['key', 'val=ue']); + }); + + it('handles missing =', () => { + expect(parseKeyValue('key')).toEqual(['key', '']); + }); +}); + +describe('parseHeader', () => { + it('splits on first :', () => { + expect(parseHeader('Content-Type: application/json')).toEqual(['Content-Type', 'application/json']); + }); +}); + +describe('parseParamValue', () => { + it('parses booleans', () => { + expect(parseParamValue('true')).toBe(true); + expect(parseParamValue('false')).toBe(false); + }); + + it('parses numbers', () => { + expect(parseParamValue('42')).toBe(42); + expect(parseParamValue('3.14')).toBe(3.14); + }); + + it('parses JSON objects/arrays', () => { + expect(parseParamValue('{"a":1}')).toEqual({ a: 1 }); + expect(parseParamValue('[1,2]')).toEqual([1, 2]); + }); + + it('returns strings for non-special values', () => { + expect(parseParamValue('hello')).toBe('hello'); + }); + + it('parses null', () => { + expect(parseParamValue('null')).toBe(null); + }); +}); diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json new file mode 100644 index 00000000..070209f0 --- /dev/null +++ b/packages/cli/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "bundler", + "lib": ["ES2022"], + "declaration": true, + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "outDir": "dist", + "rootDir": ".", + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true, + "isolatedModules": true + }, + "include": ["src/**/*.ts", "bin/**/*.ts", "scripts/**/*.ts"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/cli/tsup.config.ts b/packages/cli/tsup.config.ts new file mode 100644 index 00000000..96b94aea --- /dev/null +++ b/packages/cli/tsup.config.ts @@ -0,0 +1,28 @@ +import { defineConfig } from 'tsup'; +import { readFileSync } from 'node:fs'; + +const pkg = JSON.parse(readFileSync('./package.json', 'utf-8')); + +export default defineConfig({ + entry: { 'bin/epilot': 'bin/epilot.ts' }, + format: ['esm'], + target: 'node18', + dts: false, + clean: true, + outDir: 'dist', + banner: { js: '#!/usr/bin/env node' }, + platform: 'node', + define: { + __CLI_VERSION__: JSON.stringify(pkg.version), + }, + // Keep heavy CJS deps external; they'll be resolved from node_modules at runtime + external: [ + 'openapi-client-axios', + 'axios', + '@inquirer/prompts', + 'open', + 'jsonata', + 'dereference-json-schema', + 'mock-json-schema', + ], +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b11739f1..40d8a55f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,22 +13,22 @@ importers: version: 2.4.6 '@changesets/cli': specifier: ^2.29.5 - version: 2.29.5 + version: 2.30.0(@types/node@24.12.0) '@types/node': specifier: ^24.0.1 - version: 24.2.0 + version: 24.12.0 '@types/yargs': specifier: ^17.0.33 - version: 17.0.33 + version: 17.0.35 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@24.12.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)) typescript: specifier: ^4.9.3 version: 4.9.5 webpack-cli: specifier: ^5.1.4 - version: 5.1.4(webpack@5.105.2) + version: 5.1.4(webpack@5.105.4) clients/access-token-client: dependencies: @@ -43,7 +43,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -56,31 +56,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/address-client: dependencies: @@ -89,7 +89,7 @@ importers: version: 1.28.1 axios: specifier: ^1.0.0 || >=0.25.0 <1.0.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) buffer: specifier: ^6.0.3 version: 6.0.3 @@ -98,7 +98,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -111,28 +111,28 @@ importers: devDependencies: copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.8.2 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.7.4 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/address-suggestions-client: dependencies: @@ -141,7 +141,7 @@ importers: version: 1.28.1 axios: specifier: ^1.0.0 || >=0.25.0 <1.0.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) buffer: specifier: ^6.0.3 version: 6.0.3 @@ -150,7 +150,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -163,28 +163,28 @@ importers: devDependencies: copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.8.2 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.7.4 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/ai-agents-client: dependencies: @@ -193,7 +193,7 @@ importers: version: 1.28.1 axios: specifier: ^1.0.0 || >=0.25.0 <1.0.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) buffer: specifier: ^6.0.3 version: 6.0.3 @@ -202,7 +202,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -215,28 +215,28 @@ importers: devDependencies: copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.8.2 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.7.4 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.10.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/app-client: dependencies: @@ -251,7 +251,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -264,31 +264,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/audit-logs-client: dependencies: @@ -303,7 +303,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -316,31 +316,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/automation-client: dependencies: @@ -368,10 +368,10 @@ importers: version: 1.3.6 axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 @@ -380,25 +380,25 @@ importers: version: 3.3.2 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) whatwg-url: specifier: ^11.0.0 version: 11.0.0 @@ -413,7 +413,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -426,31 +426,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/blueprint-manifest-client: dependencies: @@ -465,7 +465,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -478,31 +478,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.10.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/consent-client: dependencies: @@ -517,7 +517,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -530,31 +530,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/customer-portal-client: dependencies: @@ -566,7 +566,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -579,31 +579,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/dashboard-client: dependencies: @@ -618,7 +618,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -631,31 +631,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/data-management-client: dependencies: @@ -670,7 +670,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.2.0 version: 3.2.0 @@ -683,31 +683,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.101.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.10.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/deduplication-client: dependencies: @@ -722,7 +722,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.2.0 version: 3.2.0 @@ -735,31 +735,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.101.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.10.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/design-client: dependencies: @@ -774,7 +774,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -787,31 +787,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/document-client: dependencies: @@ -823,7 +823,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -836,31 +836,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/email-settings-client: dependencies: @@ -875,7 +875,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -888,31 +888,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.10.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/email-template-client: dependencies: @@ -927,7 +927,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -940,31 +940,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/entity-client: dependencies: @@ -979,7 +979,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -992,31 +992,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/entity-mapping-client: dependencies: @@ -1031,7 +1031,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1044,31 +1044,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/environments-client: dependencies: @@ -1083,7 +1083,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1096,31 +1096,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/erp-integration-client: dependencies: @@ -1135,7 +1135,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1148,31 +1148,31 @@ importers: devDependencies: axios: specifier: ^1.13.5 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.104.1 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/event-catalog-client: dependencies: @@ -1187,7 +1187,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1200,31 +1200,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/file-client: dependencies: @@ -1236,7 +1236,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1249,31 +1249,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/iban-client: dependencies: @@ -1288,7 +1288,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1301,31 +1301,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/journey-client: dependencies: @@ -1340,7 +1340,7 @@ importers: version: 5.11.1 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1353,37 +1353,37 @@ importers: devDependencies: '@vitest/coverage-v8': specifier: ^1.6.0 - version: 1.6.1(vitest@1.6.1(@types/node@24.2.0)(jsdom@26.1.0)(terser@5.43.1)) + version: 1.6.1(vitest@1.6.1(@types/node@25.4.0)(jsdom@26.1.0)(terser@5.46.0)) axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapi-client-axios-typegen: specifier: ^7.5.1 - version: 7.7.0(encoding@0.1.13)(js-yaml@4.1.0) + version: 7.8.0(encoding@0.1.13)(js-yaml@4.1.1) openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)) ts-loader: specifier: ^8.3.0 - version: 8.4.0(typescript@5.7.3)(webpack@5.105.2) + version: 8.4.0(typescript@5.9.3)(webpack@5.105.4) typescript: specifier: ^5.4.5 - version: 5.7.3 + version: 5.9.3 vitest: specifier: ^1.6.0 - version: 1.6.1(@types/node@24.2.0)(jsdom@26.1.0)(terser@5.43.1) + version: 1.6.1(@types/node@25.4.0)(jsdom@26.1.0)(terser@5.46.0) webpack: specifier: ^5.91.0 - version: 5.105.2(webpack-cli@5.1.4) + version: 5.105.4(webpack-cli@5.1.4) webpack-cli: specifier: ^5.1.4 - version: 5.1.4(webpack@5.105.2) + version: 5.1.4(webpack@5.105.4) clients/kanban-client: dependencies: @@ -1398,7 +1398,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1411,31 +1411,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/message-client: dependencies: @@ -1450,7 +1450,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1463,31 +1463,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/metering-client: dependencies: @@ -1499,7 +1499,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1512,31 +1512,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/notes-client: dependencies: @@ -1551,7 +1551,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.2.0 version: 3.2.0 @@ -1564,31 +1564,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/notification-client: dependencies: @@ -1603,7 +1603,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1616,31 +1616,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/organization-client: dependencies: @@ -1655,7 +1655,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1668,31 +1668,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/partner-directory-client: dependencies: @@ -1707,7 +1707,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1720,31 +1720,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.3.0 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.5.4 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/permissions-client: dependencies: @@ -1759,7 +1759,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1772,31 +1772,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/pricing-client: dependencies: @@ -1811,7 +1811,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1824,31 +1824,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/pricing-tier-client: dependencies: @@ -1863,7 +1863,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1876,31 +1876,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/purpose-client: dependencies: @@ -1915,7 +1915,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.2.0 version: 3.2.0 @@ -1928,31 +1928,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/sandbox-client: dependencies: @@ -1967,7 +1967,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -1980,31 +1980,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/submission-client: dependencies: @@ -2019,7 +2019,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -2032,31 +2032,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/targeting-client: dependencies: @@ -2071,7 +2071,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -2084,31 +2084,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/template-variables-client: dependencies: @@ -2123,7 +2123,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -2136,31 +2136,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/user-client: dependencies: @@ -2175,7 +2175,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -2188,31 +2188,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/validation-rules-client: dependencies: @@ -2227,7 +2227,7 @@ importers: version: 5.11.1 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -2240,34 +2240,34 @@ importers: devDependencies: '@vitest/coverage-v8': specifier: ^1.6.0 - version: 1.6.1(vitest@1.6.1(@types/node@24.2.0)(jsdom@26.1.0)(terser@5.43.1)) + version: 1.6.1(vitest@1.6.1(@types/node@25.4.0)(jsdom@26.1.0)(terser@5.46.0)) axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapi-client-axios-typegen: specifier: ^7.5.1 - version: 7.7.0(encoding@0.1.13)(js-yaml@4.1.0) + version: 7.8.0(encoding@0.1.13)(js-yaml@4.1.1) ts-loader: specifier: ^8.3.0 - version: 8.4.0(typescript@5.7.3)(webpack@5.105.2) + version: 8.4.0(typescript@5.9.3)(webpack@5.105.4) typescript: specifier: ^5.4.5 - version: 5.7.3 + version: 5.9.3 vitest: specifier: ^1.6.0 - version: 1.6.1(@types/node@24.2.0)(jsdom@26.1.0)(terser@5.43.1) + version: 1.6.1(@types/node@25.4.0)(jsdom@26.1.0)(terser@5.46.0) webpack: specifier: ^5.91.0 - version: 5.105.2(webpack-cli@5.1.4) + version: 5.105.4(webpack-cli@5.1.4) webpack-cli: specifier: ^5.1.4 - version: 5.1.4(webpack@5.105.2) + version: 5.1.4(webpack@5.105.4) clients/webhooks-client: dependencies: @@ -2282,7 +2282,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -2295,31 +2295,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/workflow-client: dependencies: @@ -2334,7 +2334,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -2347,31 +2347,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.4.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) clients/workflow-definition-client: dependencies: @@ -2386,7 +2386,7 @@ importers: version: 1.0.0 openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) stream-http: specifier: ^3.1.1 version: 3.2.0 @@ -2399,31 +2399,31 @@ importers: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) copy-webpack-plugin: specifier: ^7.0.0 - version: 7.0.0(webpack@5.105.2) + version: 7.0.0(webpack@5.105.4) json-loader: specifier: ^0.5.7 version: 0.5.7 openapicmd: specifier: ^2.7.0 - version: 2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + version: 2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) ts-loader: specifier: ^8.0.14 - version: 8.4.0(typescript@4.9.5)(webpack@5.105.2) + version: 8.4.0(typescript@4.9.5)(webpack@5.105.4) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + version: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) typescript: specifier: ^4.1.3 version: 4.9.5 webpack: specifier: ^5.18.0 - version: 5.105.2(webpack-cli@4.10.0) + version: 5.105.4(webpack-cli@4.10.0) webpack-cli: specifier: ^4.10.0 - version: 4.10.0(webpack@5.105.2) + version: 4.10.0(webpack@5.105.4) packages/app-bridge: dependencies: @@ -2433,7 +2433,7 @@ importers: devDependencies: '@testing-library/jest-dom': specifier: ^6.6.3 - version: 6.6.4 + version: 6.9.1 '@types/common-tags': specifier: ^1.8.4 version: 1.8.4 @@ -2445,29 +2445,29 @@ importers: version: 5.7.3 vite: specifier: ^6.2.0 - version: 6.3.5(@types/node@24.2.0)(terser@5.43.1)(tsx@4.21.0) + version: 6.4.1(@types/node@25.4.0)(terser@5.46.0)(tsx@4.21.0) vitest: specifier: ^3.0.9 - version: 3.2.4(@types/debug@4.1.12)(@types/node@24.2.0)(jsdom@26.1.0)(msw@2.10.4(@types/node@24.2.0)(typescript@5.7.3))(terser@5.43.1)(tsx@4.21.0) + version: 3.2.4(@types/debug@4.1.12)(@types/node@25.4.0)(jsdom@26.1.0)(msw@2.12.10(@types/node@25.4.0)(typescript@5.7.3))(terser@5.46.0)(tsx@4.21.0) packages/app-sdk: dependencies: msw: specifier: ^2.10.2 - version: 2.10.4(@types/node@20.19.9)(typescript@5.7.3) + version: 2.12.10(@types/node@20.19.37)(typescript@5.7.3) tslib: specifier: ~2.8 version: 2.8.1 devDependencies: '@tsconfig/node16': specifier: ^16.1.4 - version: 16.1.4 + version: 16.1.8 '@types/node': specifier: ~20 - version: 20.19.9 + version: 20.19.37 '@vitest/coverage-v8': specifier: ~2.1 - version: 2.1.9(vitest@2.1.9(@types/node@20.19.9)(jsdom@26.1.0)(msw@2.10.4(@types/node@20.19.9)(typescript@5.7.3))(terser@5.43.1)) + version: 2.1.9(vitest@2.1.9(@types/node@20.19.37)(jsdom@26.1.0)(msw@2.12.10(@types/node@20.19.37)(typescript@5.7.3))(terser@5.46.0)) globals: specifier: ~15.14 version: 15.14.0 @@ -2482,31 +2482,80 @@ importers: version: 5.7.3 vitest: specifier: ~2.1 - version: 2.1.9(@types/node@20.19.9)(jsdom@26.1.0)(msw@2.10.4(@types/node@20.19.9)(typescript@5.7.3))(terser@5.43.1) + version: 2.1.9(@types/node@20.19.37)(jsdom@26.1.0)(msw@2.12.10(@types/node@20.19.37)(typescript@5.7.3))(terser@5.46.0) + + packages/cli: + dependencies: + '@inquirer/prompts': + specifier: ^7.0.0 + version: 7.10.1(@types/node@25.4.0) + axios: + specifier: ^1.11.0 + version: 1.13.6(debug@4.4.1) + citty: + specifier: ^0.2.1 + version: 0.2.1 + dereference-json-schema: + specifier: ^0.2.2 + version: 0.2.2 + jsonata: + specifier: ^2.0.0 + version: 2.1.0 + mock-json-schema: + specifier: ^1.1.2 + version: 1.1.2 + open: + specifier: ^10.0.0 + version: 10.2.0 + openapi-client-axios: + specifier: ^7.8.0 + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) + devDependencies: + msw: + specifier: ^2.12.10 + version: 2.12.10(@types/node@25.4.0)(typescript@5.9.3) + tsup: + specifier: ^8.0.0 + version: 8.5.1(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3) + tsx: + specifier: ^4.0.0 + version: 4.21.0 + typescript: + specifier: ^5.3.0 + version: 5.9.3 + vitest: + specifier: ^1.0.0 + version: 1.6.1(@types/node@25.4.0)(jsdom@26.1.0)(terser@5.46.0) + + packages/cli-wrapper: + dependencies: + '@epilot/cli': + specifier: '*' + version: 0.1.9(@types/node@25.4.0)(js-yaml@4.1.1) packages/epilot-sdk-v2: devDependencies: axios: specifier: ^1.11.0 - version: 1.13.5(debug@4.4.1) + version: 1.13.6(debug@4.4.1) msw: specifier: ^2.10.4 - version: 2.10.4(@types/node@24.2.0)(typescript@5.7.3) + version: 2.12.10(@types/node@25.4.0)(typescript@5.9.3) openapi-client-axios: specifier: ^7.8.0 - version: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + version: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) tsup: specifier: ^8.0.0 - version: 8.5.1(postcss@8.5.6)(tsx@4.21.0)(typescript@5.7.3) + version: 8.5.1(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3) tsx: specifier: ^4.0.0 version: 4.21.0 typescript: specifier: ^5.3.0 - version: 5.7.3 + version: 5.9.3 vitest: specifier: ^1.0.0 - version: 1.6.1(@types/node@24.2.0)(jsdom@26.1.0)(terser@5.43.1) + version: 1.6.1(@types/node@25.4.0)(jsdom@26.1.0)(terser@5.46.0) packages: @@ -2767,17 +2816,8 @@ packages: cpu: [x64] os: [win32] - '@bundled-es-modules/cookie@2.0.1': - resolution: {integrity: sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw==} - - '@bundled-es-modules/statuses@1.0.1': - resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==} - - '@bundled-es-modules/tough-cookie@0.1.6': - resolution: {integrity: sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==} - - '@changesets/apply-release-plan@7.0.12': - resolution: {integrity: sha512-EaET7As5CeuhTzvXTQCRZeBUcisoYPDDcXvgTE/2jmmypKp0RC7LxKj/yzqeh/1qFTZI7oDGFcL1PHRuQuketQ==} + '@changesets/apply-release-plan@7.1.0': + resolution: {integrity: sha512-yq8ML3YS7koKQ/9bk1PqO0HMzApIFNwjlwCnwFEXMzNe8NpzeeYYKCmnhWJGkN8g7E51MnWaSbqRcTcdIxUgnQ==} '@changesets/assemble-release-plan@6.0.9': resolution: {integrity: sha512-tPgeeqCHIwNo8sypKlS3gOPmsS3wP0zHt67JDuL20P4QcXiw/O4Hl7oXiuLnP9yg+rXLQ2sScdV1Kkzde61iSQ==} @@ -2785,12 +2825,12 @@ packages: '@changesets/changelog-git@0.2.1': resolution: {integrity: sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==} - '@changesets/cli@2.29.5': - resolution: {integrity: sha512-0j0cPq3fgxt2dPdFsg4XvO+6L66RC0pZybT9F4dG5TBrLA3jA/1pNkdTXH9IBBVHkgsKrNKenI3n1mPyPlIydg==} + '@changesets/cli@2.30.0': + resolution: {integrity: sha512-5D3Nk2JPqMI1wK25pEymeWRSlSMdo5QOGlyfrKg0AOufrUcjEE3RQgaCpHoBiM31CSNrtSgdJ0U6zL1rLDDfBA==} hasBin: true - '@changesets/config@3.1.1': - resolution: {integrity: sha512-bd+3Ap2TKXxljCggI0mKPfzCQKeV/TU4yO2h2C6vAihIo8tzseAn2e7klSuiyYYXvgu53zMN1OeYMIQkaQoWnA==} + '@changesets/config@3.1.3': + resolution: {integrity: sha512-vnXjcey8YgBn2L1OPWd3ORs0bGC4LoYcK/ubpgvzNVr53JXV5GiTVj7fWdMRsoKUH7hhhMAQnsJUqLr21EncNw==} '@changesets/errors@0.2.0': resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} @@ -2798,8 +2838,8 @@ packages: '@changesets/get-dependents-graph@2.1.3': resolution: {integrity: sha512-gphr+v0mv2I3Oxt19VdWRRUxq3sseyUpX9DaHpTUmLj92Y10AGy+XOtV+kbM6L/fDcpx7/ISDFK6T8A/P3lOdQ==} - '@changesets/get-release-plan@4.0.13': - resolution: {integrity: sha512-DWG1pus72FcNeXkM12tx+xtExyH/c9I1z+2aXlObH3i9YA7+WZEVaiHzHl03thpvAgWTRaH64MpfHxozfF7Dvg==} + '@changesets/get-release-plan@4.0.15': + resolution: {integrity: sha512-Q04ZaRPuEVZtA+auOYgFaVQQSA98dXiVe/yFaZfY7hoSmQICHGvP0TF4u3EDNHWmmCS4ekA/XSpKlSM2PyTS2g==} '@changesets/get-version-range-type@0.4.0': resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} @@ -2810,14 +2850,14 @@ packages: '@changesets/logger@0.1.1': resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} - '@changesets/parse@0.4.1': - resolution: {integrity: sha512-iwksMs5Bf/wUItfcg+OXrEpravm5rEd9Bf4oyIPL4kVTmJQ7PNDSd6MDYkpSJR1pn7tz/k8Zf2DhTCqX08Ou+Q==} + '@changesets/parse@0.4.3': + resolution: {integrity: sha512-ZDmNc53+dXdWEv7fqIUSgRQOLYoUom5Z40gmLgmATmYR9NbL6FJJHwakcCpzaeCy+1D0m0n7mT4jj2B/MQPl7A==} '@changesets/pre@2.0.2': resolution: {integrity: sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==} - '@changesets/read@0.6.5': - resolution: {integrity: sha512-UPzNGhsSjHD3Veb0xO/MwvasGe8eMyNrR/sT9gR8Q3DhOQZirgKhhXv/8hVsI0QpPjR004Z9iFxoJU6in3uGMg==} + '@changesets/read@0.6.7': + resolution: {integrity: sha512-D1G4AUYGrBEk8vj8MGwf75k9GpN6XL3wg8i42P2jZZwFLXnlr2Pn7r9yuQNbaMCarP7ZQWNJbV6XLeysAIMhTA==} '@changesets/should-skip-package@0.1.2': resolution: {integrity: sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==} @@ -2870,6 +2910,11 @@ packages: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} + '@epilot/cli@0.1.9': + resolution: {integrity: sha512-obZZiBvbnMZVeQFjn+xhrPM1PcroNZQVSYMynrapSzjrrOJTkxnT6zl3f2qotLDoQfnS1PJlLQu2uWAthlCZqA==} + engines: {node: '>=18'} + hasBin: true + '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} @@ -3326,8 +3371,97 @@ packages: '@hapi/bourne@3.0.0': resolution: {integrity: sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==} - '@inquirer/confirm@5.1.14': - resolution: {integrity: sha512-5yR4IBfe0kXe59r1YCTG8WXkUbl7Z35HK87Sw+WUyGD8wNUx7JvY7laahzeytyE1oLn74bQnL7hstctQxisQ8Q==} + '@inquirer/ansi@1.0.2': + resolution: {integrity: sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==} + engines: {node: '>=18'} + + '@inquirer/checkbox@4.3.2': + resolution: {integrity: sha512-VXukHf0RR1doGe6Sm4F0Em7SWYLTHSsbGfJdS9Ja2bX5/D5uwVOEjr07cncLROdBvmnvCATYEWlHqYmXv2IlQA==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/confirm@5.1.21': + resolution: {integrity: sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/core@10.3.2': + resolution: {integrity: sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/editor@4.2.23': + resolution: {integrity: sha512-aLSROkEwirotxZ1pBaP8tugXRFCxW94gwrQLxXfrZsKkfjOYC1aRvAZuhpJOb5cu4IBTJdsCigUlf2iCOu4ZDQ==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/expand@4.0.23': + resolution: {integrity: sha512-nRzdOyFYnpeYTTR2qFwEVmIWypzdAx/sIkCMeTNTcflFOovfqUk+HcFhQQVBftAh9gmGrpFj6QcGEqrDMDOiew==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/external-editor@1.0.3': + resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/figures@1.0.15': + resolution: {integrity: sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==} + engines: {node: '>=18'} + + '@inquirer/input@4.3.1': + resolution: {integrity: sha512-kN0pAM4yPrLjJ1XJBjDxyfDduXOuQHrBB8aLDMueuwUGn+vNpF7Gq7TvyVxx8u4SHlFFj4trmj+a2cbpG4Jn1g==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/number@3.0.23': + resolution: {integrity: sha512-5Smv0OK7K0KUzUfYUXDXQc9jrf8OHo4ktlEayFlelCjwMXz0299Y8OrI+lj7i4gCBY15UObk76q0QtxjzFcFcg==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/password@4.0.23': + resolution: {integrity: sha512-zREJHjhT5vJBMZX/IUbyI9zVtVfOLiTO66MrF/3GFZYZ7T4YILW5MSkEYHceSii/KtRk+4i3RE7E1CUXA2jHcA==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/prompts@7.10.1': + resolution: {integrity: sha512-Dx/y9bCQcXLI5ooQ5KyvA4FTgeo2jYj/7plWfV5Ak5wDPKQZgudKez2ixyfz7tKXzcJciTxqLeK7R9HItwiByg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -3335,8 +3469,8 @@ packages: '@types/node': optional: true - '@inquirer/core@10.1.15': - resolution: {integrity: sha512-8xrp836RZvKkpNbVvgWUlxjT4CraKk2q+I3Ksy+seI2zkcE+y6wNs1BVhgcv8VyImFecUhdQrYLdW32pAjwBdA==} + '@inquirer/rawlist@4.1.11': + resolution: {integrity: sha512-+LLQB8XGr3I5LZN/GuAHo+GpDJegQwuPARLChlMICNdwW7OwV2izlCSCxN6cqpL0sMXmbKbFcItJgdQq5EBXTw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -3344,12 +3478,26 @@ packages: '@types/node': optional: true - '@inquirer/figures@1.0.13': - resolution: {integrity: sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==} + '@inquirer/search@3.2.2': + resolution: {integrity: sha512-p2bvRfENXCZdWF/U2BXvnSI9h+tuA8iNqtUKb9UWbmLYCRQxd8WkvwWvYn+3NgYaNwdUkHytJMGG4MMLucI1kA==} engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/select@4.4.2': + resolution: {integrity: sha512-l4xMuJo55MAe+N7Qr4rX90vypFwCajSakx59qe/tMaC1aEHWLyw68wF4o0A4SLAY4E0nd+Vt+EyskeDIqu1M6w==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true - '@inquirer/type@3.0.8': - resolution: {integrity: sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==} + '@inquirer/type@3.0.10': + resolution: {integrity: sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -3446,19 +3594,28 @@ packages: '@jridgewell/gen-mapping@0.3.12': resolution: {integrity: sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==} + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} - '@jridgewell/source-map@0.3.10': - resolution: {integrity: sha512-0pPkgz9dY+bijgistcTTJ5mR+ocqRXLuhXHYdzoMmmoJ2C9S46RCm2GMUbatPEUK9Yjy26IrAy8D/M00lLkv+Q==} + '@jridgewell/source-map@0.3.11': + resolution: {integrity: sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==} '@jridgewell/sourcemap-codec@1.5.4': resolution: {integrity: sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==} + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + '@jridgewell/trace-mapping@0.3.29': resolution: {integrity: sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==} + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} @@ -3475,8 +3632,8 @@ packages: '@manypkg/get-packages@1.1.3': resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} - '@mswjs/interceptors@0.39.5': - resolution: {integrity: sha512-B9nHSJYtsv79uo7QdkZ/b/WoKm20IkVSmTc/WCKarmDtFwM0dRx2ouEniqwNkzCSLn3fydzKmnMzjtfdOWt3VQ==} + '@mswjs/interceptors@0.41.3': + resolution: {integrity: sha512-cXu86tF4VQVfwz8W1SPbhoRyHJkti6mjH/XJIxp40jhO4j2k1m4KYrEykxqWPkFF3vrK4rgQppBh//AwyGSXPA==} engines: {node: '>=18'} '@nodelib/fs.scandir@2.1.5': @@ -3681,8 +3838,8 @@ packages: '@sinonjs/fake-timers@10.3.0': resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} - '@testing-library/jest-dom@6.6.4': - resolution: {integrity: sha512-xDXgLjVunjHqczScfkCJ9iyjdNOVHvvCdqHSSxwM9L0l/wHkTRum67SDc020uAlCoqktJplgO2AAQeLP1wgqDQ==} + '@testing-library/jest-dom@6.9.1': + resolution: {integrity: sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==} engines: {node: '>=14', npm: '>=6', yarn: '>=1'} '@tsconfig/node10@1.0.11': @@ -3697,8 +3854,8 @@ packages: '@tsconfig/node16@1.0.4': resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - '@tsconfig/node16@16.1.4': - resolution: {integrity: sha512-tkWPDtk18K2qJK/DhU010f03iDlw+C8qjXvhwZ4KKpJQC4QFOG3r8tIf2q6aWD0mz9N7RcZcaD9SPlrVLKiDoQ==} + '@tsconfig/node16@16.1.8': + resolution: {integrity: sha512-T/CfdwFry660WjZor56z0F3pxeCllt8KOxWcHFW6ZEuULKUObTDEMdgtctyuJPxwqyWDsvHRfxHaJ4FIICyoqQ==} '@types/babel__core@7.20.5': resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} @@ -3721,9 +3878,6 @@ packages: '@types/common-tags@1.8.4': resolution: {integrity: sha512-S+1hLDJPjWNDhcGxsxEbepzaxWqURP/o+3cP4aa2w7yBXgdcmKGQtZzP8JbyfOd0m+33nh+8+kvxYE2UJtBDkg==} - '@types/cookie@0.6.0': - resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} @@ -3763,11 +3917,14 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@20.19.9': - resolution: {integrity: sha512-cuVNgarYWZqxRJDQHEB58GEONhOK79QVR/qYx4S7kcUObQvUwvFnYxJuuHUKm2aieN9X3yZB4LZsuYNU1Qphsw==} + '@types/node@20.19.37': + resolution: {integrity: sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw==} - '@types/node@24.2.0': - resolution: {integrity: sha512-3xyG3pMCq3oYCNg7/ZP+E1ooTaGB4cG8JWRsqqOYQdbWNY4zbaV0Ennrd7stjiJEFZCaybcIgpTjJWHRfBSIDw==} + '@types/node@24.12.0': + resolution: {integrity: sha512-GYDxsZi3ChgmckRT9HPU0WEhKLP08ev/Yfcq2AstjrDASOYCSXeyjDsHg4v5t4jOj7cyDX3vmprafKlWIG9MXQ==} + + '@types/node@25.4.0': + resolution: {integrity: sha512-9wLpoeWuBlcbBpOY3XmzSTG3oscB6xjBEEtn+pYXTfhyXhIxC5FsBer2KTopBlvKEiW9l13po9fq+SJY/5lkhw==} '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} @@ -3778,14 +3935,11 @@ packages: '@types/through@0.0.33': resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==} - '@types/tough-cookie@4.0.5': - resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} - '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} - '@types/yargs@17.0.33': - resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} + '@types/yargs@17.0.35': + resolution: {integrity: sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==} '@vitest/coverage-v8@1.6.1': resolution: {integrity: sha512-6YeRZwuO4oTGKxD3bijok756oktHSIm3eczVVzNe3scqzuhLwltIF3S9ZL/vwOVIpURmU6SnZhziXXAfw8/Qlw==} @@ -3989,6 +4143,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.16.0: + resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==} + engines: {node: '>=0.4.0'} + hasBin: true + agent-base@7.1.4: resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} engines: {node: '>= 14'} @@ -4088,13 +4247,6 @@ packages: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - asn1@0.2.6: - resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==} - - assert-plus@1.0.0: - resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==} - engines: {node: '>=0.8'} - assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} @@ -4120,14 +4272,8 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} - aws-sign2@0.7.0: - resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==} - - aws4@1.13.2: - resolution: {integrity: sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==} - - axios@1.13.5: - resolution: {integrity: sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==} + axios@1.13.6: + resolution: {integrity: sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==} babel-jest@29.7.0: resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} @@ -4167,9 +4313,6 @@ packages: bath-es5@3.0.3: resolution: {integrity: sha512-PdCioDToH3t84lP40kUFCKWCOCH389Dl1kbC8FGoqOwamxsmqxxnJSXdkTOsPoNHXjem4+sJ+bbNoQm5zeCqxg==} - bcrypt-pbkdf@1.0.2: - resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} - better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -4209,6 +4352,10 @@ packages: builtin-status-codes@3.0.0: resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} + bundle-name@4.1.0: + resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} + engines: {node: '>=18'} + bundle-require@5.1.0: resolution: {integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -4264,9 +4411,6 @@ packages: resolution: {integrity: sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==} hasBin: true - caseless@0.12.0: - resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} - chai@4.5.0: resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==} engines: {node: '>=4'} @@ -4290,6 +4434,9 @@ packages: chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + chardet@2.1.1: + resolution: {integrity: sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==} + check-error@1.0.3: resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} @@ -4309,6 +4456,9 @@ packages: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} + citty@0.2.1: + resolution: {integrity: sha512-kEV95lFBhQgtogAPlQfJJ0WGVSokvLr/UEoFPiKKOXF7pl98HfUVUD0ejsuTCld/9xH9vogSywZ5KqHzXrZpqg==} + cjs-module-lexer@1.4.3: resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} @@ -4431,10 +4581,6 @@ packages: convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - cookie@0.7.2: - resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} - engines: {node: '>= 0.6'} - cookie@1.0.2: resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==} engines: {node: '>=18'} @@ -4452,9 +4598,6 @@ packages: peerDependencies: webpack: ^5.1.0 - core-util-is@1.0.2: - resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} - core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} @@ -4480,10 +4623,6 @@ packages: resolution: {integrity: sha512-2z+rWdzbbSZv6/rhtvzvqeZQHrBaqgogqt85sqFNbabZOuFbCVFb8kPeEtZjiKkbrm395irpNKiYeFeLiQnFPg==} engines: {node: '>=18'} - dashdash@1.14.1: - resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==} - engines: {node: '>=0.10'} - data-uri-to-buffer@4.0.1: resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} engines: {node: '>= 12'} @@ -4535,10 +4674,22 @@ packages: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} + default-browser-id@5.0.1: + resolution: {integrity: sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==} + engines: {node: '>=18'} + + default-browser@5.5.0: + resolution: {integrity: sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==} + engines: {node: '>=18'} + define-data-property@1.1.4: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} + define-lazy-prop@3.0.0: + resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} + engines: {node: '>=12'} + delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} @@ -4554,8 +4705,8 @@ packages: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} - dereference-json-schema@0.2.1: - resolution: {integrity: sha512-uzJsrg225owJyRQ8FNTPHIuBOdSzIZlHhss9u6W8mp7jJldHqGuLv9cULagP/E26QVJDnjtG8U7Dw139mM1ydA==} + dereference-json-schema@0.2.2: + resolution: {integrity: sha512-w8dUsJyrzH4Zsj8W/tKcjLsmcTKXfdNf+n3BBm1SAfnqpaCodgEUWqQGJ+pNb9NOqPwYMGvUnZZ8nQfeFjJlbQ==} destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} @@ -4595,9 +4746,6 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - ecc-jsbn@0.1.2: - resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} - ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} @@ -4637,8 +4785,8 @@ packages: resolution: {integrity: sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==} engines: {node: '>=6.9.0'} - enhanced-resolve@5.19.0: - resolution: {integrity: sha512-phv3E1Xl4tQOShqSte26C7Fl84EwUdZsyOuSSk9qtAGyyQs2s3jJzComh+Abf4g187lUUAvH+H26omrqia2aGg==} + enhanced-resolve@5.20.0: + resolution: {integrity: sha512-/ce7+jQ1PQ6rVXwe+jKEg5hW5ciicHwIQUagZkp6IufBoY3YDgdTTY1azVs0qoRgVmvsNB+rbjLJxDAeHHtwsQ==} engines: {node: '>=10.13.0'} enquirer@2.4.1: @@ -4768,9 +4916,6 @@ packages: resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - extend@3.0.2: - resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} - extendable-error@0.1.7: resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} @@ -4782,10 +4927,6 @@ packages: resolution: {integrity: sha512-AEo4zm+TenK7zQorGK1f9mJ8L14hnTDi2ZQPR+Mub1NX8zimka1mXpV5LpH8x9HoUmFSHZCfLHqWvp0Y4FxxzQ==} engines: {node: '>=8'} - extsprintf@1.3.0: - resolution: {integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==} - engines: {'0': node >=0.6.0} - fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -4863,13 +5004,6 @@ packages: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} - forever-agent@0.6.1: - resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} - - form-data@2.3.3: - resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==} - engines: {node: '>= 0.12'} - form-data@4.0.5: resolution: {integrity: sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==} engines: {node: '>= 6'} @@ -4943,9 +5077,6 @@ packages: get-tsconfig@4.13.6: resolution: {integrity: sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==} - getpass@0.1.7: - resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==} - glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -4983,22 +5114,13 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - graphql@16.11.0: - resolution: {integrity: sha512-mS1lbMsxgQj6hge1XZ6p7GPhbrtFwUFYi3wRzXAC/FmYnyXMTvvI3td3rjmQ2u8ewXueaSvRPWaEcgVVOT9Jnw==} + graphql@16.13.1: + resolution: {integrity: sha512-gGgrVCoDKlIZ8fIqXBBb0pPKqDgki0Z/FSKNiQzSGj2uEYHr1tq5wmBegGwJx6QB5S5cM0khSBpi/JFHMCvsmQ==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} growly@1.3.0: resolution: {integrity: sha512-+xGQY0YyAWCnqy7Cd++hc2JqMYzlm0dG30Jd0beaA64sROr8C4nt8Yc9V5Ro3avlSUDTN0ulqP/VBKi1/lLygw==} - har-schema@2.0.0: - resolution: {integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==} - engines: {node: '>=4'} - - har-validator@5.1.5: - resolution: {integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==} - engines: {node: '>=6'} - deprecated: this library is no longer supported - has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} @@ -5056,10 +5178,6 @@ packages: resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} engines: {node: '>= 14'} - http-signature@1.2.0: - resolution: {integrity: sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==} - engines: {node: '>=0.8', npm: '>=1.3.7'} - http2-client@1.3.5: resolution: {integrity: sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==} @@ -5097,6 +5215,10 @@ packages: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} + iconv-lite@0.7.2: + resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==} + engines: {node: '>=0.10.0'} + ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -5166,6 +5288,11 @@ packages: engines: {node: '>=8'} hasBin: true + is-docker@3.0.0: + resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + hasBin: true + is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -5186,6 +5313,11 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-inside-container@1.0.0: + resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} + engines: {node: '>=14.16'} + hasBin: true + is-node-process@1.2.0: resolution: {integrity: sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==} @@ -5220,9 +5352,6 @@ packages: resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} engines: {node: '>= 0.4'} - is-typedarray@1.0.0: - resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} - is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} @@ -5231,6 +5360,10 @@ packages: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} + is-wsl@3.1.1: + resolution: {integrity: sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==} + engines: {node: '>=16'} + isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} @@ -5245,9 +5378,6 @@ packages: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} - isstream@0.1.2: - resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} - istanbul-lib-coverage@3.2.2: resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} engines: {node: '>=8'} @@ -5451,12 +5581,17 @@ packages: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true + js-yaml@3.14.2: + resolution: {integrity: sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==} + hasBin: true + js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true - jsbn@0.1.1: - resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==} + js-yaml@4.1.1: + resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} + hasBin: true jsdom@26.1.0: resolution: {integrity: sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==} @@ -5484,27 +5619,21 @@ packages: json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - json-schema@0.4.0: - resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} - - json-stringify-safe@5.0.1: - resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} - json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true + jsonata@2.1.0: + resolution: {integrity: sha512-OCzaRMK8HobtX8fp37uIVmL8CY1IGc/a6gLsDqz3quExFR09/U78HUzWYr7T31UEB6+Eu0/8dkVD5fFDOl9a8w==} + engines: {node: '>= 8'} + jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} - jsprim@1.4.2: - resolution: {integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==} - engines: {node: '>=0.6.0'} - keygrip@1.1.0: resolution: {integrity: sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==} engines: {node: '>= 0.6'} @@ -5540,11 +5669,6 @@ packages: resolution: {integrity: sha512-2iHQc7vbA9qLeVq5gKAYh3m5DOMMlMfIKjW/REPAS18Mf63daCJHHVXY9nbu7ivrnYn5PiPC4CE523Tf5qvjeQ==} engines: {node: '>= 7.6.0'} - koa-proxy@1.0.0-alpha.3: - resolution: {integrity: sha512-8ke0WoQKAsQ8BpkC9+I83lKsFaycE9fcLeTx12jQtEa5SrdTI6mNKR5M4LslHbvkX1hDhXreIszXsnom5Ej7RQ==} - peerDependencies: - koa: 2.x - koa-router@12.0.1: resolution: {integrity: sha512-gaDdj3GtzoLoeosacd50kBBTnnh3B9AYxDThQUo4sfUyXdOhY6ku1qyZKW88tQCRgc3Sw6ChXYXWZwwgjOxE0w==} engines: {node: '>= 12'} @@ -5706,6 +5830,9 @@ packages: mock-json-schema@1.1.1: resolution: {integrity: sha512-YV23vlsLP1EEOy0EviUvZTluXjLR+rhMzeayP2rcDiezj3RW01MhOSQkbQskdtg0K2fnGas5LKbSXgNjAOSX4A==} + mock-json-schema@1.1.2: + resolution: {integrity: sha512-3IyduYlhfzPy+nFN8wxUjloUi1hM7l8lN5LITuauUNMQltynJIOfLf/DADwTAp2d6kvSBtWojly1EuxX5B0WkA==} + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -5713,8 +5840,8 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - msw@2.10.4: - resolution: {integrity: sha512-6R1or/qyele7q3RyPwNuvc0IxO8L8/Aim6Sz5ncXEgcWUNxSKE+udriTOWHtpMwmfkLYlacA2y7TIx4cL5lgHA==} + msw@2.12.10: + resolution: {integrity: sha512-G3VUymSE0/iegFnuipujpwyTM2GuZAKXNeerUSrG2+Eg391wW63xFs5ixWsK9MWzr1AGoSkYGmyAzNgbR3+urw==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -5897,9 +6024,6 @@ packages: oas-validator@5.0.8: resolution: {integrity: sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==} - oauth-sign@0.9.0: - resolution: {integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==} - object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -5934,17 +6058,21 @@ packages: only@0.0.2: resolution: {integrity: sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==} + open@10.2.0: + resolution: {integrity: sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==} + engines: {node: '>=18'} + openapi-backend@5.11.1: resolution: {integrity: sha512-TsIbku0692sU1X5Ewhzj49ivd8EIT0GDtwbB7XvT234lY3+oJfTe3cUWaBzeKGeX+a1mjcluuJ4V+wTancRbdA==} engines: {node: '>=12.0.0'} - openapi-client-axios-typegen@7.7.0: - resolution: {integrity: sha512-V659GvUazWxLoc1dJJEqhZFxP1GdKUCkpSHlj5Vg05P1LoN947x8ElGg9VNCmiTNTq/5e6BDXiWYy1XpGTCwvw==} + openapi-client-axios-typegen@7.8.0: + resolution: {integrity: sha512-rOhtWKTNs6K/gLRiX2W4yuARwzzyi9CzMeI8U1WJ+A4MZ0dsoqSeTALL/pdXx4rMJGg+ZjYmSU+h9xZwK+Yalg==} deprecated: 'openapi-client-axios-typegen is deprecated. Please switch to openapicmd typegen instead. See: https://openapistack.co/docs/openapi-client-axios/typegen/' hasBin: true - openapi-client-axios@7.8.0: - resolution: {integrity: sha512-EeMbETGAEUn2XB2tduIwaW8/fBc05ZJPiTGe0dXj4fUmNFKVLAh4rIX6xlIzfKTBdBW+UQEtHO8l3VBQ6DH+XQ==} + openapi-client-axios@7.9.0: + resolution: {integrity: sha512-1VRBbbNQTz6pAWFALXrqr88GclEb+LirqbzmLnFzqOlnCFC2Ao5Gv4JYf783+A8PQbEAu5Or4Rg32RaetllnwA==} peerDependencies: axios: '>=0.25.0' js-yaml: ^4.1.0 @@ -5955,9 +6083,9 @@ packages: openapi-types@12.1.3: resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==} - openapicmd@2.7.0: - resolution: {integrity: sha512-cGS+sSsJX0QmcWGnE3vFI+j3M80xbmRgLH5UKPGZVSI08IIRHv39M3A1WHY3bPySHvZr/heHkHOP2VL6G/2gTQ==} - engines: {node: '>=16.0.0'} + openapicmd@2.9.0: + resolution: {integrity: sha512-iTqxAS2dOvduGN5OTHFD3v1SjhtckwNu6Zw71hTgMLCySquIuD4VpuoCckDrCbeQ4yttNDti3OYCBTpDz47leA==} + engines: {node: '>=20.0.0'} hasBin: true os-tmpdir@1.0.2: @@ -6068,12 +6196,6 @@ packages: resolution: {integrity: sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==} engines: {node: '>= 14.16'} - pause-stream@0.0.11: - resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==} - - performance-now@2.1.0: - resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} - picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -6131,6 +6253,11 @@ packages: engines: {node: '>=10.13.0'} hasBin: true + prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + pretty-format@27.5.1: resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} @@ -6156,9 +6283,6 @@ packages: prr@1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} - psl@1.15.0: - resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==} - punycode@1.4.1: resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} @@ -6173,16 +6297,9 @@ packages: resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==} engines: {node: '>=0.6'} - qs@6.5.3: - resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==} - engines: {node: '>=0.6'} - quansync@0.2.10: resolution: {integrity: sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==} - querystringify@2.2.0: - resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} - queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -6232,24 +6349,6 @@ packages: reftools@1.1.9: resolution: {integrity: sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==} - request-promise-core@1.1.4: - resolution: {integrity: sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==} - engines: {node: '>=0.10.0'} - peerDependencies: - request: ^2.34 - - request-promise-native@1.0.9: - resolution: {integrity: sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==} - engines: {node: '>=0.12.0'} - deprecated: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 - peerDependencies: - request: ^2.34 - - request@2.88.2: - resolution: {integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==} - engines: {node: '>= 6'} - deprecated: request has been deprecated, see https://github.com/request/request/issues/3142 - require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -6258,9 +6357,6 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - requires-port@1.0.0: - resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - resolve-cwd@3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} engines: {node: '>=8'} @@ -6289,6 +6385,9 @@ packages: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} + rettime@0.10.1: + resolution: {integrity: sha512-uyDrIlUEH37cinabq0AX4QbgV4HbFZ/gqoiunWQ1UqBtRvTTytwhNYjE++pO/MjPTZL5KQCf2bEoJ/BJNVQ5Kw==} + reusify@1.1.0: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -6306,6 +6405,10 @@ packages: rrweb-cssom@0.8.0: resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==} + run-applescript@7.1.0: + resolution: {integrity: sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==} + engines: {node: '>=18'} + run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} @@ -6351,12 +6454,14 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.7.4: + resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==} + engines: {node: '>=10'} + hasBin: true + serialize-javascript@5.0.1: resolution: {integrity: sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==} - serialize-javascript@6.0.2: - resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} - set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -6464,11 +6569,6 @@ packages: sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - sshpk@1.18.0: - resolution: {integrity: sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==} - engines: {node: '>=0.10.0'} - hasBin: true - stack-utils@2.0.6: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} @@ -6491,10 +6591,6 @@ packages: std-env@3.9.0: resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} - stealthy-require@1.1.1: - resolution: {integrity: sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==} - engines: {node: '>=0.10.0'} - stream-http@3.2.0: resolution: {integrity: sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==} @@ -6595,6 +6691,10 @@ packages: symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} + tagged-tag@1.0.0: + resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} + engines: {node: '>=20'} + tapable@1.1.3: resolution: {integrity: sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==} engines: {node: '>=6'} @@ -6607,8 +6707,8 @@ packages: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} - terser-webpack-plugin@5.3.16: - resolution: {integrity: sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q==} + terser-webpack-plugin@5.4.0: + resolution: {integrity: sha512-Bn5vxm48flOIfkdl5CaD2+1CiUVbonWQ3KQPyP7/EuIl9Gbzq/gQFOzaMFUEgVjB1396tcK0SG8XcNJ/2kDH8g==} engines: {node: '>= 10.13.0'} peerDependencies: '@swc/core': '*' @@ -6623,8 +6723,8 @@ packages: uglify-js: optional: true - terser@5.43.1: - resolution: {integrity: sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg==} + terser@5.46.0: + resolution: {integrity: sha512-jTwoImyr/QbOWFFso3YoU3ik0jBBDJ6JTOQiy/J2YxVJdZCc+5u7skhNwiOR3FQIygFqVUPHl7qbbxtjW2K3Qg==} engines: {node: '>=10'} hasBin: true @@ -6687,10 +6787,17 @@ packages: tldts-core@6.1.86: resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} + tldts-core@7.0.25: + resolution: {integrity: sha512-ZjCZK0rppSBu7rjHYDYsEaMOIbbT+nWF57hKkv4IUmZWBNrBWBOjIElc0mKRgLM8bm7x/BBlof6t2gi/Oq/Asw==} + tldts@6.1.86: resolution: {integrity: sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==} hasBin: true + tldts@7.0.25: + resolution: {integrity: sha512-keinCnPbwXEUG3ilrWQZU+CqcTTzHq9m2HhoUP2l7Xmi8l1LuijAXLpAJ5zRW+ifKTNscs4NdCkfkDCBYm352w==} + hasBin: true + tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -6706,18 +6813,14 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} - tough-cookie@2.5.0: - resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==} - engines: {node: '>=0.8'} - - tough-cookie@4.1.4: - resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} - engines: {node: '>=6'} - tough-cookie@5.1.2: resolution: {integrity: sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==} engines: {node: '>=16'} + tough-cookie@6.0.0: + resolution: {integrity: sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w==} + engines: {node: '>=16'} + tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} @@ -6797,12 +6900,6 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - tunnel-agent@0.6.0: - resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} - - tweetnacl@0.14.5: - resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} - type-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} @@ -6815,9 +6912,9 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} - type-fest@4.41.0: - resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} - engines: {node: '>=16'} + type-fest@5.4.4: + resolution: {integrity: sha512-JnTrzGu+zPV3aXIUhnyWJj4z/wigMsdYajGLIYakqyOW1nPllzXEJee0QQbHj+CTIQtXGlAjuK0UY+2xTyjVAw==} + engines: {node: '>=20'} type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} @@ -6833,23 +6930,27 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.9.3: + resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + engines: {node: '>=14.17'} + hasBin: true + ufo@1.6.1: resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} - undici-types@7.10.0: - resolution: {integrity: sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==} + undici-types@7.16.0: + resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} + + undici-types@7.18.2: + resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==} universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} - universalify@0.2.0: - resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} - engines: {node: '>= 4.0.0'} - universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} @@ -6858,6 +6959,9 @@ packages: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} + until-async@3.0.2: + resolution: {integrity: sha512-IiSk4HlzAMqTUseHHe3VhIGyuFmN90zMTpD3Z3y8jeQbzLIq500MVM7Jq2vUAnTKAFPJrqwkzr6PoTcPhGcOiw==} + update-browserslist-db@1.1.3: resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} hasBin: true @@ -6873,9 +6977,6 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - url-parse@1.5.10: - resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} - url@0.11.4: resolution: {integrity: sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==} engines: {node: '>= 0.4'} @@ -6886,11 +6987,6 @@ packages: util@0.12.5: resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} - uuid@3.4.0: - resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} - deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. - hasBin: true - uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true @@ -6910,10 +7006,6 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} - verror@1.10.0: - resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} - engines: {'0': node >=0.6.0} - vite-node@1.6.1: resolution: {integrity: sha512-YAXkfvGtuTzwWbDSACdJSg4A4DZiAqckWe90Zapc/sEX3XvHcw1NdurM/6od8J207tSDqNbSsgdCacBgvJKFuA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -6960,27 +7052,22 @@ packages: terser: optional: true - vite@6.3.5: - resolution: {integrity: sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + vite@5.4.21: + resolution: {integrity: sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: - '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - jiti: '>=1.21.0' + '@types/node': ^18.0.0 || >=20.0.0 less: '*' lightningcss: ^1.21.0 sass: '*' sass-embedded: '*' stylus: '*' sugarss: '*' - terser: ^5.16.0 - tsx: ^4.8.1 - yaml: ^2.4.2 + terser: ^5.4.0 peerDependenciesMeta: '@types/node': optional: true - jiti: - optional: true less: optional: true lightningcss: @@ -6995,24 +7082,60 @@ packages: optional: true terser: optional: true - tsx: - optional: true - yaml: - optional: true - vitest@1.6.1: - resolution: {integrity: sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag==} - engines: {node: ^18.0.0 || >=20.0.0} + vite@6.4.1: + resolution: {integrity: sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: - '@edge-runtime/vm': '*' - '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 1.6.1 - '@vitest/ui': 1.6.1 - happy-dom: '*' - jsdom: '*' - peerDependenciesMeta: - '@edge-runtime/vm': + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@1.6.1: + resolution: {integrity: sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 1.6.1 + '@vitest/ui': 1.6.1 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': optional: true '@types/node': optional: true @@ -7141,12 +7264,12 @@ packages: resolution: {integrity: sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==} engines: {node: '>=10.0.0'} - webpack-sources@3.3.3: - resolution: {integrity: sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==} + webpack-sources@3.3.4: + resolution: {integrity: sha512-7tP1PdV4vF+lYPnkMR0jMY5/la2ub5Fc/8VQrrU+lXkiM6C4TjVfGw7iKfyhnTQOsD+6Q/iKw0eFciziRgD58Q==} engines: {node: '>=10.13.0'} - webpack@5.105.2: - resolution: {integrity: sha512-dRXm0a2qcHPUBEzVk8uph0xWSjV/xZxenQQbLwnwP7caQCYpqG1qddwlyEkIDkYn0K8tvmcrZ+bOrzoQ3HxCDw==} + webpack@5.105.4: + resolution: {integrity: sha512-jTywjboN9aHxFlToqb0K0Zs9SbBoW4zRUlGzI2tYNxVYcEi/IPpn+Xi4ye5jTLvX2YeLuic/IvxNot+Q1jMoOw==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -7235,6 +7358,10 @@ packages: utf-8-validate: optional: true + wsl-utils@0.1.0: + resolution: {integrity: sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==} + engines: {node: '>=18'} + xml-name-validator@5.0.0: resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} engines: {node: '>=18'} @@ -7286,8 +7413,8 @@ packages: resolution: {integrity: sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==} engines: {node: '>=12.20'} - yoctocolors-cjs@2.1.2: - resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} + yoctocolors-cjs@2.1.3: + resolution: {integrity: sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==} engines: {node: '>=18'} snapshots: @@ -7309,7 +7436,7 @@ snapshots: https-proxy-agent: 7.0.6 js-yaml: 4.1.0 tslib: 2.8.1 - typescript: 5.7.3 + typescript: 5.9.3 transitivePeerDependencies: - encoding - supports-color @@ -7382,7 +7509,7 @@ snapshots: '@babel/parser': 7.28.0 '@babel/types': 7.28.2 '@jridgewell/gen-mapping': 0.3.12 - '@jridgewell/trace-mapping': 0.3.29 + '@jridgewell/trace-mapping': 0.3.31 jsesc: 3.1.0 '@babel/helper-compilation-targets@7.27.2': @@ -7575,22 +7702,9 @@ snapshots: '@biomejs/cli-win32-x64@2.4.6': optional: true - '@bundled-es-modules/cookie@2.0.1': - dependencies: - cookie: 0.7.2 - - '@bundled-es-modules/statuses@1.0.1': - dependencies: - statuses: 2.0.2 - - '@bundled-es-modules/tough-cookie@0.1.6': - dependencies: - '@types/tough-cookie': 4.0.5 - tough-cookie: 4.1.4 - - '@changesets/apply-release-plan@7.0.12': + '@changesets/apply-release-plan@7.1.0': dependencies: - '@changesets/config': 3.1.1 + '@changesets/config': 3.1.3 '@changesets/get-version-range-type': 0.4.0 '@changesets/git': 3.0.4 '@changesets/should-skip-package': 0.1.2 @@ -7600,7 +7714,7 @@ snapshots: fs-extra: 7.0.1 lodash.startcase: 4.4.0 outdent: 0.5.0 - prettier: 2.7.1 + prettier: 2.8.8 resolve-from: 5.0.0 semver: 7.7.2 @@ -7617,42 +7731,43 @@ snapshots: dependencies: '@changesets/types': 6.1.0 - '@changesets/cli@2.29.5': + '@changesets/cli@2.30.0(@types/node@24.12.0)': dependencies: - '@changesets/apply-release-plan': 7.0.12 + '@changesets/apply-release-plan': 7.1.0 '@changesets/assemble-release-plan': 6.0.9 '@changesets/changelog-git': 0.2.1 - '@changesets/config': 3.1.1 + '@changesets/config': 3.1.3 '@changesets/errors': 0.2.0 '@changesets/get-dependents-graph': 2.1.3 - '@changesets/get-release-plan': 4.0.13 + '@changesets/get-release-plan': 4.0.15 '@changesets/git': 3.0.4 '@changesets/logger': 0.1.1 '@changesets/pre': 2.0.2 - '@changesets/read': 0.6.5 + '@changesets/read': 0.6.7 '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@changesets/write': 0.4.0 + '@inquirer/external-editor': 1.0.3(@types/node@24.12.0) '@manypkg/get-packages': 1.1.3 ansi-colors: 4.1.3 - ci-info: 3.9.0 enquirer: 2.4.1 - external-editor: 3.1.0 fs-extra: 7.0.1 mri: 1.2.0 - p-limit: 2.3.0 package-manager-detector: 0.2.11 picocolors: 1.1.1 resolve-from: 5.0.0 semver: 7.7.2 spawndamnit: 3.0.1 term-size: 2.2.1 + transitivePeerDependencies: + - '@types/node' - '@changesets/config@3.1.1': + '@changesets/config@3.1.3': dependencies: '@changesets/errors': 0.2.0 '@changesets/get-dependents-graph': 2.1.3 '@changesets/logger': 0.1.1 + '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 @@ -7669,12 +7784,12 @@ snapshots: picocolors: 1.1.1 semver: 7.7.2 - '@changesets/get-release-plan@4.0.13': + '@changesets/get-release-plan@4.0.15': dependencies: '@changesets/assemble-release-plan': 6.0.9 - '@changesets/config': 3.1.1 + '@changesets/config': 3.1.3 '@changesets/pre': 2.0.2 - '@changesets/read': 0.6.5 + '@changesets/read': 0.6.7 '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 @@ -7692,10 +7807,10 @@ snapshots: dependencies: picocolors: 1.1.1 - '@changesets/parse@0.4.1': + '@changesets/parse@0.4.3': dependencies: '@changesets/types': 6.1.0 - js-yaml: 3.14.1 + js-yaml: 4.1.1 '@changesets/pre@2.0.2': dependencies: @@ -7704,11 +7819,11 @@ snapshots: '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - '@changesets/read@0.6.5': + '@changesets/read@0.6.7': dependencies: '@changesets/git': 3.0.4 '@changesets/logger': 0.1.1 - '@changesets/parse': 0.4.1 + '@changesets/parse': 0.4.3 '@changesets/types': 6.1.0 fs-extra: 7.0.1 p-filter: 2.1.0 @@ -7758,6 +7873,21 @@ snapshots: '@discoveryjs/json-ext@0.5.7': {} + '@epilot/cli@0.1.9(@types/node@25.4.0)(js-yaml@4.1.1)': + dependencies: + '@inquirer/prompts': 7.10.1(@types/node@25.4.0) + axios: 1.13.6(debug@4.4.1) + citty: 0.2.1 + dereference-json-schema: 0.2.2 + jsonata: 2.1.0 + mock-json-schema: 1.1.2 + open: 10.2.0 + openapi-client-axios: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) + transitivePeerDependencies: + - '@types/node' + - debug + - js-yaml + '@esbuild/aix-ppc64@0.21.5': optional: true @@ -7987,55 +8117,161 @@ snapshots: '@hapi/bourne@3.0.0': {} - '@inquirer/confirm@5.1.14(@types/node@20.19.9)': + '@inquirer/ansi@1.0.2': {} + + '@inquirer/checkbox@4.3.2(@types/node@25.4.0)': dependencies: - '@inquirer/core': 10.1.15(@types/node@20.19.9) - '@inquirer/type': 3.0.8(@types/node@20.19.9) + '@inquirer/ansi': 1.0.2 + '@inquirer/core': 10.3.2(@types/node@25.4.0) + '@inquirer/figures': 1.0.15 + '@inquirer/type': 3.0.10(@types/node@25.4.0) + yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 20.19.9 + '@types/node': 25.4.0 - '@inquirer/confirm@5.1.14(@types/node@24.2.0)': + '@inquirer/confirm@5.1.21(@types/node@20.19.37)': dependencies: - '@inquirer/core': 10.1.15(@types/node@24.2.0) - '@inquirer/type': 3.0.8(@types/node@24.2.0) + '@inquirer/core': 10.3.2(@types/node@20.19.37) + '@inquirer/type': 3.0.10(@types/node@20.19.37) optionalDependencies: - '@types/node': 24.2.0 + '@types/node': 20.19.37 - '@inquirer/core@10.1.15(@types/node@20.19.9)': + '@inquirer/confirm@5.1.21(@types/node@25.4.0)': dependencies: - '@inquirer/figures': 1.0.13 - '@inquirer/type': 3.0.8(@types/node@20.19.9) - ansi-escapes: 4.3.2 + '@inquirer/core': 10.3.2(@types/node@25.4.0) + '@inquirer/type': 3.0.10(@types/node@25.4.0) + optionalDependencies: + '@types/node': 25.4.0 + + '@inquirer/core@10.3.2(@types/node@20.19.37)': + dependencies: + '@inquirer/ansi': 1.0.2 + '@inquirer/figures': 1.0.15 + '@inquirer/type': 3.0.10(@types/node@20.19.37) cli-width: 4.1.0 mute-stream: 2.0.0 signal-exit: 4.1.0 wrap-ansi: 6.2.0 - yoctocolors-cjs: 2.1.2 + yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 20.19.9 + '@types/node': 20.19.37 - '@inquirer/core@10.1.15(@types/node@24.2.0)': + '@inquirer/core@10.3.2(@types/node@25.4.0)': dependencies: - '@inquirer/figures': 1.0.13 - '@inquirer/type': 3.0.8(@types/node@24.2.0) - ansi-escapes: 4.3.2 + '@inquirer/ansi': 1.0.2 + '@inquirer/figures': 1.0.15 + '@inquirer/type': 3.0.10(@types/node@25.4.0) cli-width: 4.1.0 mute-stream: 2.0.0 signal-exit: 4.1.0 wrap-ansi: 6.2.0 - yoctocolors-cjs: 2.1.2 + yoctocolors-cjs: 2.1.3 + optionalDependencies: + '@types/node': 25.4.0 + + '@inquirer/editor@4.2.23(@types/node@25.4.0)': + dependencies: + '@inquirer/core': 10.3.2(@types/node@25.4.0) + '@inquirer/external-editor': 1.0.3(@types/node@25.4.0) + '@inquirer/type': 3.0.10(@types/node@25.4.0) + optionalDependencies: + '@types/node': 25.4.0 + + '@inquirer/expand@4.0.23(@types/node@25.4.0)': + dependencies: + '@inquirer/core': 10.3.2(@types/node@25.4.0) + '@inquirer/type': 3.0.10(@types/node@25.4.0) + yoctocolors-cjs: 2.1.3 + optionalDependencies: + '@types/node': 25.4.0 + + '@inquirer/external-editor@1.0.3(@types/node@24.12.0)': + dependencies: + chardet: 2.1.1 + iconv-lite: 0.7.2 + optionalDependencies: + '@types/node': 24.12.0 + + '@inquirer/external-editor@1.0.3(@types/node@25.4.0)': + dependencies: + chardet: 2.1.1 + iconv-lite: 0.7.2 + optionalDependencies: + '@types/node': 25.4.0 + + '@inquirer/figures@1.0.15': {} + + '@inquirer/input@4.3.1(@types/node@25.4.0)': + dependencies: + '@inquirer/core': 10.3.2(@types/node@25.4.0) + '@inquirer/type': 3.0.10(@types/node@25.4.0) + optionalDependencies: + '@types/node': 25.4.0 + + '@inquirer/number@3.0.23(@types/node@25.4.0)': + dependencies: + '@inquirer/core': 10.3.2(@types/node@25.4.0) + '@inquirer/type': 3.0.10(@types/node@25.4.0) + optionalDependencies: + '@types/node': 25.4.0 + + '@inquirer/password@4.0.23(@types/node@25.4.0)': + dependencies: + '@inquirer/ansi': 1.0.2 + '@inquirer/core': 10.3.2(@types/node@25.4.0) + '@inquirer/type': 3.0.10(@types/node@25.4.0) + optionalDependencies: + '@types/node': 25.4.0 + + '@inquirer/prompts@7.10.1(@types/node@25.4.0)': + dependencies: + '@inquirer/checkbox': 4.3.2(@types/node@25.4.0) + '@inquirer/confirm': 5.1.21(@types/node@25.4.0) + '@inquirer/editor': 4.2.23(@types/node@25.4.0) + '@inquirer/expand': 4.0.23(@types/node@25.4.0) + '@inquirer/input': 4.3.1(@types/node@25.4.0) + '@inquirer/number': 3.0.23(@types/node@25.4.0) + '@inquirer/password': 4.0.23(@types/node@25.4.0) + '@inquirer/rawlist': 4.1.11(@types/node@25.4.0) + '@inquirer/search': 3.2.2(@types/node@25.4.0) + '@inquirer/select': 4.4.2(@types/node@25.4.0) + optionalDependencies: + '@types/node': 25.4.0 + + '@inquirer/rawlist@4.1.11(@types/node@25.4.0)': + dependencies: + '@inquirer/core': 10.3.2(@types/node@25.4.0) + '@inquirer/type': 3.0.10(@types/node@25.4.0) + yoctocolors-cjs: 2.1.3 + optionalDependencies: + '@types/node': 25.4.0 + + '@inquirer/search@3.2.2(@types/node@25.4.0)': + dependencies: + '@inquirer/core': 10.3.2(@types/node@25.4.0) + '@inquirer/figures': 1.0.15 + '@inquirer/type': 3.0.10(@types/node@25.4.0) + yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 24.2.0 + '@types/node': 25.4.0 - '@inquirer/figures@1.0.13': {} + '@inquirer/select@4.4.2(@types/node@25.4.0)': + dependencies: + '@inquirer/ansi': 1.0.2 + '@inquirer/core': 10.3.2(@types/node@25.4.0) + '@inquirer/figures': 1.0.15 + '@inquirer/type': 3.0.10(@types/node@25.4.0) + yoctocolors-cjs: 2.1.3 + optionalDependencies: + '@types/node': 25.4.0 - '@inquirer/type@3.0.8(@types/node@20.19.9)': + '@inquirer/type@3.0.10(@types/node@20.19.37)': optionalDependencies: - '@types/node': 20.19.9 + '@types/node': 20.19.37 - '@inquirer/type@3.0.8(@types/node@24.2.0)': + '@inquirer/type@3.0.10(@types/node@25.4.0)': optionalDependencies: - '@types/node': 24.2.0 + '@types/node': 25.4.0 '@isaacs/balanced-match@4.0.1': {} @@ -8057,7 +8293,7 @@ snapshots: camelcase: 5.3.1 find-up: 4.1.0 get-package-type: 0.1.0 - js-yaml: 3.14.1 + js-yaml: 3.14.2 resolve-from: 5.0.0 '@istanbuljs/schema@0.1.3': {} @@ -8065,27 +8301,64 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 24.2.0 + '@types/node': 24.12.0 + chalk: 4.1.2 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + slash: 3.0.0 + + '@jest/core@29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5))': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0(node-notifier@8.0.2) + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 24.12.0 + ansi-escapes: 4.3.2 chalk: 4.1.2 + ci-info: 3.9.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)) + jest-haste-map: 29.7.0 jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.8 + pretty-format: 29.7.0 slash: 3.0.0 + strip-ansi: 6.0.1 + optionalDependencies: + node-notifier: 8.0.2 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + - ts-node - '@jest/core@29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5))': + '@jest/core@29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0(node-notifier@8.0.2) '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 24.2.0 + '@types/node': 24.12.0 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@24.2.0)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -8108,21 +8381,21 @@ snapshots: - supports-color - ts-node - '@jest/core@29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3))': + '@jest/core@29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0(node-notifier@8.0.2) '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 24.2.0 + '@types/node': 24.12.0 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@24.2.0)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -8149,7 +8422,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 24.2.0 + '@types/node': 24.12.0 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -8167,7 +8440,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 24.2.0 + '@types/node': 24.12.0 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -8188,8 +8461,8 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@jridgewell/trace-mapping': 0.3.29 - '@types/node': 24.2.0 + '@jridgewell/trace-mapping': 0.3.31 + '@types/node': 24.12.0 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -8218,7 +8491,7 @@ snapshots: '@jest/source-map@29.6.3': dependencies: - '@jridgewell/trace-mapping': 0.3.29 + '@jridgewell/trace-mapping': 0.3.31 callsites: 3.1.0 graceful-fs: 4.2.11 @@ -8240,7 +8513,7 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@jest/types': 29.6.3 - '@jridgewell/trace-mapping': 0.3.29 + '@jridgewell/trace-mapping': 0.3.31 babel-plugin-istanbul: 6.1.1 chalk: 4.1.2 convert-source-map: 2.0.0 @@ -8261,8 +8534,8 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 24.2.0 - '@types/yargs': 17.0.33 + '@types/node': 24.12.0 + '@types/yargs': 17.0.35 chalk: 4.1.2 '@jridgewell/gen-mapping@0.3.12': @@ -8270,20 +8543,32 @@ snapshots: '@jridgewell/sourcemap-codec': 1.5.4 '@jridgewell/trace-mapping': 0.3.29 + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping': 0.3.31 + '@jridgewell/resolve-uri@3.1.2': {} - '@jridgewell/source-map@0.3.10': + '@jridgewell/source-map@0.3.11': dependencies: - '@jridgewell/gen-mapping': 0.3.12 - '@jridgewell/trace-mapping': 0.3.29 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 '@jridgewell/sourcemap-codec@1.5.4': {} + '@jridgewell/sourcemap-codec@1.5.5': {} + '@jridgewell/trace-mapping@0.3.29': dependencies: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.4 + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping@0.3.9': dependencies: '@jridgewell/resolve-uri': 3.1.2 @@ -8311,7 +8596,7 @@ snapshots: globby: 11.1.0 read-yaml-file: 1.1.0 - '@mswjs/interceptors@0.39.5': + '@mswjs/interceptors@0.41.3': dependencies: '@open-draft/deferred-promise': 2.2.0 '@open-draft/logger': 0.3.0 @@ -8587,13 +8872,12 @@ snapshots: dependencies: '@sinonjs/commons': 3.0.1 - '@testing-library/jest-dom@6.6.4': + '@testing-library/jest-dom@6.9.1': dependencies: '@adobe/css-tools': 4.4.3 aria-query: 5.3.2 css.escape: 1.5.1 dom-accessibility-api: 0.6.3 - lodash: 4.17.21 picocolors: 1.1.1 redent: 3.0.0 @@ -8605,7 +8889,7 @@ snapshots: '@tsconfig/node16@1.0.4': {} - '@tsconfig/node16@16.1.4': {} + '@tsconfig/node16@16.1.8': {} '@types/babel__core@7.20.5': dependencies: @@ -8634,12 +8918,10 @@ snapshots: '@types/cli-progress@3.11.6': dependencies: - '@types/node': 24.2.0 + '@types/node': 24.12.0 '@types/common-tags@1.8.4': {} - '@types/cookie@0.6.0': {} - '@types/debug@4.1.12': dependencies: '@types/ms': 2.1.0 @@ -8661,7 +8943,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 24.2.0 + '@types/node': 24.12.0 '@types/inquirer@7.3.3': dependencies: @@ -8685,13 +8967,17 @@ snapshots: '@types/node@12.20.55': {} - '@types/node@20.19.9': + '@types/node@20.19.37': dependencies: undici-types: 6.21.0 - '@types/node@24.2.0': + '@types/node@24.12.0': + dependencies: + undici-types: 7.16.0 + + '@types/node@25.4.0': dependencies: - undici-types: 7.10.0 + undici-types: 7.18.2 '@types/stack-utils@2.0.3': {} @@ -8699,17 +8985,15 @@ snapshots: '@types/through@0.0.33': dependencies: - '@types/node': 24.2.0 - - '@types/tough-cookie@4.0.5': {} + '@types/node': 24.12.0 '@types/yargs-parser@21.0.3': {} - '@types/yargs@17.0.33': + '@types/yargs@17.0.35': dependencies: '@types/yargs-parser': 21.0.3 - '@vitest/coverage-v8@1.6.1(vitest@1.6.1(@types/node@24.2.0)(jsdom@26.1.0)(terser@5.43.1))': + '@vitest/coverage-v8@1.6.1(vitest@1.6.1(@types/node@25.4.0)(jsdom@26.1.0)(terser@5.46.0))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -8724,11 +9008,11 @@ snapshots: std-env: 3.9.0 strip-literal: 2.1.1 test-exclude: 6.0.0 - vitest: 1.6.1(@types/node@24.2.0)(jsdom@26.1.0)(terser@5.43.1) + vitest: 1.6.1(@types/node@25.4.0)(jsdom@26.1.0)(terser@5.46.0) transitivePeerDependencies: - supports-color - '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@20.19.9)(jsdom@26.1.0)(msw@2.10.4(@types/node@20.19.9)(typescript@5.7.3))(terser@5.43.1))': + '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@20.19.37)(jsdom@26.1.0)(msw@2.12.10(@types/node@20.19.37)(typescript@5.7.3))(terser@5.46.0))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -8742,7 +9026,7 @@ snapshots: std-env: 3.9.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@20.19.9)(jsdom@26.1.0)(msw@2.10.4(@types/node@20.19.9)(typescript@5.7.3))(terser@5.43.1) + vitest: 2.1.9(@types/node@20.19.37)(jsdom@26.1.0)(msw@2.12.10(@types/node@20.19.37)(typescript@5.7.3))(terser@5.46.0) transitivePeerDependencies: - supports-color @@ -8767,23 +9051,23 @@ snapshots: chai: 5.2.1 tinyrainbow: 2.0.0 - '@vitest/mocker@2.1.9(msw@2.10.4(@types/node@20.19.9)(typescript@5.7.3))(vite@5.4.19(@types/node@20.19.9)(terser@5.43.1))': + '@vitest/mocker@2.1.9(msw@2.12.10(@types/node@20.19.37)(typescript@5.7.3))(vite@5.4.21(@types/node@20.19.37)(terser@5.46.0))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - msw: 2.10.4(@types/node@20.19.9)(typescript@5.7.3) - vite: 5.4.19(@types/node@20.19.9)(terser@5.43.1) + msw: 2.12.10(@types/node@20.19.37)(typescript@5.7.3) + vite: 5.4.21(@types/node@20.19.37)(terser@5.46.0) - '@vitest/mocker@3.2.4(msw@2.10.4(@types/node@24.2.0)(typescript@5.7.3))(vite@6.3.5(@types/node@24.2.0)(terser@5.43.1)(tsx@4.21.0))': + '@vitest/mocker@3.2.4(msw@2.12.10(@types/node@25.4.0)(typescript@5.7.3))(vite@6.4.1(@types/node@25.4.0)(terser@5.46.0)(tsx@4.21.0))': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - msw: 2.10.4(@types/node@24.2.0)(typescript@5.7.3) - vite: 6.3.5(@types/node@24.2.0)(terser@5.43.1)(tsx@4.21.0) + msw: 2.12.10(@types/node@25.4.0)(typescript@5.7.3) + vite: 6.4.1(@types/node@25.4.0)(terser@5.46.0)(tsx@4.21.0) '@vitest/pretty-format@2.1.9': dependencies: @@ -8935,34 +9219,34 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@xtuc/long': 4.2.2 - '@webpack-cli/configtest@1.2.0(webpack-cli@4.10.0)(webpack@5.105.2)': + '@webpack-cli/configtest@1.2.0(webpack-cli@4.10.0)(webpack@5.105.4)': dependencies: - webpack: 5.105.2(webpack-cli@4.10.0) - webpack-cli: 4.10.0(webpack@5.105.2) + webpack: 5.105.4(webpack-cli@4.10.0) + webpack-cli: 4.10.0(webpack@5.105.4) - '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4)(webpack@5.105.2)': + '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4)(webpack@5.105.4)': dependencies: - webpack: 5.105.2(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack@5.105.2) + webpack: 5.105.4(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.105.4) '@webpack-cli/info@1.5.0(webpack-cli@4.10.0)': dependencies: envinfo: 7.14.0 - webpack-cli: 4.10.0(webpack@5.105.2) + webpack-cli: 4.10.0(webpack@5.105.4) - '@webpack-cli/info@2.0.2(webpack-cli@5.1.4)(webpack@5.105.2)': + '@webpack-cli/info@2.0.2(webpack-cli@5.1.4)(webpack@5.105.4)': dependencies: - webpack: 5.105.2(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack@5.105.2) + webpack: 5.105.4(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.105.4) '@webpack-cli/serve@1.7.0(webpack-cli@4.10.0)': dependencies: - webpack-cli: 4.10.0(webpack@5.105.2) + webpack-cli: 4.10.0(webpack@5.105.4) - '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4)(webpack@5.105.2)': + '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4)(webpack@5.105.4)': dependencies: - webpack: 5.105.2(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack@5.105.2) + webpack: 5.105.4(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.105.4) '@xtuc/ieee754@1.2.0': {} @@ -8973,9 +9257,9 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 - acorn-import-phases@1.0.4(acorn@8.15.0): + acorn-import-phases@1.0.4(acorn@8.16.0): dependencies: - acorn: 8.15.0 + acorn: 8.16.0 acorn-walk@8.3.4: dependencies: @@ -8983,6 +9267,8 @@ snapshots: acorn@8.15.0: {} + acorn@8.16.0: {} + agent-base@7.1.4: {} ajv-draft-04@1.0.0(ajv@8.17.1): @@ -9061,12 +9347,6 @@ snapshots: array-union@2.1.0: {} - asn1@0.2.6: - dependencies: - safer-buffer: 2.1.2 - - assert-plus@1.0.0: {} - assertion-error@1.1.0: {} assertion-error@2.0.1: {} @@ -9083,11 +9363,7 @@ snapshots: dependencies: possible-typed-array-names: 1.1.0 - aws-sign2@0.7.0: {} - - aws4@1.13.2: {} - - axios@1.13.5(debug@4.4.1): + axios@1.13.6(debug@4.4.1): dependencies: follow-redirects: 1.15.11(debug@4.4.1) form-data: 4.0.5 @@ -9158,10 +9434,6 @@ snapshots: bath-es5@3.0.3: {} - bcrypt-pbkdf@1.0.2: - dependencies: - tweetnacl: 0.14.5 - better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 @@ -9209,6 +9481,10 @@ snapshots: builtin-status-codes@3.0.0: {} + bundle-name@4.1.0: + dependencies: + run-applescript: 7.1.0 + bundle-require@5.1.0(esbuild@0.27.3): dependencies: esbuild: 0.27.3 @@ -9257,8 +9533,6 @@ snapshots: ansicolors: 0.3.2 redeyed: 2.1.1 - caseless@0.12.0: {} - chai@4.5.0: dependencies: assertion-error: 1.1.0 @@ -9292,6 +9566,8 @@ snapshots: chardet@0.7.0: {} + chardet@2.1.1: {} + check-error@1.0.3: dependencies: get-func-name: 2.0.2 @@ -9306,6 +9582,8 @@ snapshots: ci-info@3.9.0: {} + citty@0.2.1: {} + cjs-module-lexer@1.4.3: {} clean-stack@3.0.1: @@ -9432,8 +9710,6 @@ snapshots: convert-source-map@2.0.0: {} - cookie@0.7.2: {} - cookie@1.0.2: {} cookies@0.9.1: @@ -9443,7 +9719,7 @@ snapshots: copy-to@2.0.1: {} - copy-webpack-plugin@7.0.0(webpack@5.105.2): + copy-webpack-plugin@7.0.0(webpack@5.105.4): dependencies: fast-glob: 3.3.3 glob-parent: 5.1.2 @@ -9453,19 +9729,32 @@ snapshots: p-limit: 3.1.0 schema-utils: 3.3.0 serialize-javascript: 5.0.1 - webpack: 5.105.2(webpack-cli@4.10.0) - - core-util-is@1.0.2: {} + webpack: 5.105.4(webpack-cli@4.10.0) core-util-is@1.0.3: {} - create-jest@29.7.0(@types/node@24.2.0)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)): + create-jest@29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)): + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + create-jest@29.7.0(@types/node@25.4.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@24.2.0)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@25.4.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -9474,13 +9763,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@24.2.0)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)): + create-jest@29.7.0(@types/node@25.4.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@24.2.0)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@25.4.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -9510,10 +9799,6 @@ snapshots: '@asamuzakjp/css-color': 3.2.0 rrweb-cssom: 0.8.0 - dashdash@1.14.1: - dependencies: - assert-plus: 1.0.0 - data-uri-to-buffer@4.0.1: {} data-urls@5.0.0: @@ -9545,12 +9830,21 @@ snapshots: deepmerge@4.3.1: {} + default-browser-id@5.0.1: {} + + default-browser@5.5.0: + dependencies: + bundle-name: 4.1.0 + default-browser-id: 5.0.1 + define-data-property@1.1.4: dependencies: es-define-property: 1.0.1 es-errors: 1.3.0 gopd: 1.2.0 + define-lazy-prop@3.0.0: {} + delayed-stream@1.0.0: {} delegates@1.0.0: {} @@ -9559,7 +9853,7 @@ snapshots: depd@2.0.0: {} - dereference-json-schema@0.2.1: {} + dereference-json-schema@0.2.2: {} destroy@1.2.0: {} @@ -9587,11 +9881,6 @@ snapshots: eastasianwidth@0.2.0: {} - ecc-jsbn@0.1.2: - dependencies: - jsbn: 0.1.1 - safer-buffer: 2.1.2 - ee-first@1.1.1: {} ejs@3.1.10: @@ -9623,7 +9912,7 @@ snapshots: memory-fs: 0.5.0 tapable: 1.1.3 - enhanced-resolve@5.19.0: + enhanced-resolve@5.20.0: dependencies: graceful-fs: 4.2.11 tapable: 2.3.0 @@ -9817,8 +10106,6 @@ snapshots: jest-message-util: 29.7.0 jest-util: 29.7.0 - extend@3.0.2: {} - extendable-error@0.1.7: {} external-editor@3.1.0: @@ -9829,8 +10116,6 @@ snapshots: extract-stack@2.0.0: {} - extsprintf@1.3.0: {} - fast-deep-equal@3.1.3: {} fast-glob@3.3.3: @@ -9904,14 +10189,6 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - forever-agent@0.6.1: {} - - form-data@2.3.3: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - form-data@4.0.5: dependencies: asynckit: 0.4.0 @@ -9988,10 +10265,6 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 - getpass@0.1.7: - dependencies: - assert-plus: 1.0.0 - glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -10040,18 +10313,11 @@ snapshots: graceful-fs@4.2.11: {} - graphql@16.11.0: {} + graphql@16.13.1: {} growly@1.3.0: optional: true - har-schema@2.0.0: {} - - har-validator@5.1.5: - dependencies: - ajv: 6.12.6 - har-schema: 2.0.0 - has-flag@3.0.0: {} has-flag@4.0.0: {} @@ -10117,12 +10383,6 @@ snapshots: transitivePeerDependencies: - supports-color - http-signature@1.2.0: - dependencies: - assert-plus: 1.0.0 - jsprim: 1.4.2 - sshpk: 1.18.0 - http2-client@1.3.5: {} https-browserify@1.0.0: {} @@ -10152,6 +10412,10 @@ snapshots: dependencies: safer-buffer: 2.1.2 + iconv-lite@0.7.2: + dependencies: + safer-buffer: 2.1.2 + ieee754@1.2.1: {} ignore@5.3.2: {} @@ -10213,6 +10477,8 @@ snapshots: is-docker@2.2.1: {} + is-docker@3.0.0: {} + is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: {} @@ -10230,6 +10496,10 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-inside-container@1.0.0: + dependencies: + is-docker: 3.0.0 + is-node-process@1.2.0: {} is-number@7.0.0: {} @@ -10259,14 +10529,16 @@ snapshots: dependencies: which-typed-array: 1.1.19 - is-typedarray@1.0.0: {} - is-windows@1.0.2: {} is-wsl@2.2.0: dependencies: is-docker: 2.2.1 + is-wsl@3.1.1: + dependencies: + is-inside-container: 1.0.0 + isarray@1.0.0: {} isexe@2.0.0: {} @@ -10275,8 +10547,6 @@ snapshots: isobject@3.0.1: {} - isstream@0.1.2: {} - istanbul-lib-coverage@3.2.2: {} istanbul-lib-instrument@5.2.1: @@ -10295,7 +10565,7 @@ snapshots: '@babel/parser': 7.28.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 - semver: 7.7.2 + semver: 7.7.4 transitivePeerDependencies: - supports-color @@ -10354,7 +10624,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 24.2.0 + '@types/node': 24.12.0 chalk: 4.1.2 co: 4.6.0 dedent: 1.6.0 @@ -10374,16 +10644,37 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@24.2.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)): + jest-cli@29.7.0(@types/node@24.12.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)): + dependencies: + '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)) + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + chalk: 4.1.2 + create-jest: 29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)) + exit: 0.1.2 + import-local: 3.2.0 + jest-config: 29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)) + jest-util: 29.7.0 + jest-validate: 29.7.0 + yargs: 17.7.2 + optionalDependencies: + node-notifier: 8.0.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + jest-cli@29.7.0(@types/node@25.4.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)): dependencies: - '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@24.2.0)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + create-jest: 29.7.0(@types/node@25.4.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@24.2.0)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@25.4.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -10395,16 +10686,16 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@24.2.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)): + jest-cli@29.7.0(@types/node@25.4.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)): dependencies: - '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)) + '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@24.2.0)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)) + create-jest: 29.7.0(@types/node@25.4.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@24.2.0)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@25.4.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -10416,7 +10707,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@24.2.0)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)): + jest-config@29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)): dependencies: '@babel/core': 7.28.0 '@jest/test-sequencer': 29.7.0 @@ -10441,13 +10732,13 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 24.2.0 - ts-node: 10.9.2(@types/node@24.2.0)(typescript@4.9.5) + '@types/node': 24.12.0 + ts-node: 10.9.2(@types/node@24.12.0)(typescript@4.9.5) transitivePeerDependencies: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@24.2.0)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)): + jest-config@29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)): dependencies: '@babel/core': 7.28.0 '@jest/test-sequencer': 29.7.0 @@ -10472,20 +10763,113 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 24.2.0 - ts-node: 10.9.2(@types/node@24.2.0)(typescript@5.7.3) + '@types/node': 24.12.0 + ts-node: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) transitivePeerDependencies: - babel-plugin-macros - supports-color - jest-diff@27.5.1: - dependencies: - chalk: 4.1.2 - diff-sequences: 27.5.1 - jest-get-type: 27.5.1 - pretty-format: 27.5.1 - - jest-diff@29.7.0: + jest-config@29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)): + dependencies: + '@babel/core': 7.28.0 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.28.0) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.8 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 24.12.0 + ts-node: 10.9.2(@types/node@25.4.0)(typescript@5.9.3) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-config@29.7.0(@types/node@25.4.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)): + dependencies: + '@babel/core': 7.28.0 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.28.0) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.8 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 25.4.0 + ts-node: 10.9.2(@types/node@25.4.0)(typescript@4.9.5) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-config@29.7.0(@types/node@25.4.0)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)): + dependencies: + '@babel/core': 7.28.0 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.28.0) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.8 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 25.4.0 + ts-node: 10.9.2(@types/node@25.4.0)(typescript@5.9.3) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-diff@27.5.1: + dependencies: + chalk: 4.1.2 + diff-sequences: 27.5.1 + jest-get-type: 27.5.1 + pretty-format: 27.5.1 + + jest-diff@29.7.0: dependencies: chalk: 4.1.2 diff-sequences: 29.6.3 @@ -10509,7 +10893,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 24.2.0 + '@types/node': 24.12.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -10521,7 +10905,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 24.2.0 + '@types/node': 24.12.0 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -10574,7 +10958,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 24.2.0 + '@types/node': 24.12.0 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -10609,7 +10993,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 24.2.0 + '@types/node': 24.12.0 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -10637,7 +11021,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 24.2.0 + '@types/node': 24.12.0 chalk: 4.1.2 cjs-module-lexer: 1.4.3 collect-v8-coverage: 1.0.2 @@ -10676,14 +11060,14 @@ snapshots: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.7.2 + semver: 7.7.4 transitivePeerDependencies: - supports-color jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 24.2.0 + '@types/node': 24.12.0 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -10702,7 +11086,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 24.2.0 + '@types/node': 24.12.0 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -10711,23 +11095,23 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 24.2.0 + '@types/node': 25.4.0 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 24.2.0 + '@types/node': 24.12.0 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@24.2.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)): + jest@29.7.0(@types/node@24.12.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)): dependencies: - '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@24.2.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + jest-cli: 29.7.0(@types/node@24.12.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)) optionalDependencies: node-notifier: 8.0.2 transitivePeerDependencies: @@ -10736,12 +11120,26 @@ snapshots: - supports-color - ts-node - jest@29.7.0(@types/node@24.2.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)): + jest@29.7.0(@types/node@25.4.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)): dependencies: - '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)) + '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@24.2.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)) + jest-cli: 29.7.0(@types/node@25.4.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) + optionalDependencies: + node-notifier: 8.0.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + jest@29.7.0(@types/node@25.4.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)): + dependencies: + '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)) + '@jest/types': 29.6.3 + import-local: 3.2.0 + jest-cli: 29.7.0(@types/node@25.4.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)) optionalDependencies: node-notifier: 8.0.2 transitivePeerDependencies: @@ -10761,11 +11159,18 @@ snapshots: argparse: 1.0.10 esprima: 4.0.1 + js-yaml@3.14.2: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + js-yaml@4.1.0: dependencies: argparse: 2.0.1 - jsbn@0.1.1: {} + js-yaml@4.1.1: + dependencies: + argparse: 2.0.1 jsdom@26.1.0: dependencies: @@ -10804,12 +11209,10 @@ snapshots: json-schema-traverse@1.0.0: {} - json-schema@0.4.0: {} - - json-stringify-safe@5.0.1: {} - json5@2.2.3: {} + jsonata@2.1.0: {} + jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 @@ -10820,13 +11223,6 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 - jsprim@1.4.2: - dependencies: - assert-plus: 1.0.0 - extsprintf: 1.3.0 - json-schema: 0.4.0 - verror: 1.10.0 - keygrip@1.1.0: dependencies: tsscmp: 1.0.6 @@ -10864,13 +11260,6 @@ snapshots: transitivePeerDependencies: - supports-color - koa-proxy@1.0.0-alpha.3(koa@2.16.2): - dependencies: - koa: 2.16.2 - pause-stream: 0.0.11 - request: 2.88.2 - request-promise-native: 1.0.9(request@2.88.2) - koa-router@12.0.1: dependencies: debug: 4.4.1(supports-color@8.1.1) @@ -10981,7 +11370,7 @@ snapshots: make-dir@4.0.0: dependencies: - semver: 7.7.2 + semver: 7.7.4 make-error@1.3.6: {} @@ -11041,7 +11430,7 @@ snapshots: mlly@1.7.4: dependencies: - acorn: 8.15.0 + acorn: 8.16.0 pathe: 2.0.3 pkg-types: 1.3.1 ufo: 1.6.1 @@ -11050,59 +11439,89 @@ snapshots: dependencies: lodash: 4.17.21 + mock-json-schema@1.1.2: + dependencies: + lodash: 4.17.21 + mri@1.2.0: {} ms@2.1.3: {} - msw@2.10.4(@types/node@20.19.9)(typescript@5.7.3): + msw@2.12.10(@types/node@20.19.37)(typescript@5.7.3): dependencies: - '@bundled-es-modules/cookie': 2.0.1 - '@bundled-es-modules/statuses': 1.0.1 - '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 5.1.14(@types/node@20.19.9) - '@mswjs/interceptors': 0.39.5 + '@inquirer/confirm': 5.1.21(@types/node@20.19.37) + '@mswjs/interceptors': 0.41.3 '@open-draft/deferred-promise': 2.2.0 - '@open-draft/until': 2.1.0 - '@types/cookie': 0.6.0 '@types/statuses': 2.0.6 - graphql: 16.11.0 + cookie: 1.0.2 + graphql: 16.13.1 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 path-to-regexp: 6.3.0 picocolors: 1.1.1 + rettime: 0.10.1 + statuses: 2.0.2 strict-event-emitter: 0.5.1 - type-fest: 4.41.0 + tough-cookie: 6.0.0 + type-fest: 5.4.4 + until-async: 3.0.2 yargs: 17.7.2 optionalDependencies: typescript: 5.7.3 transitivePeerDependencies: - '@types/node' - msw@2.10.4(@types/node@24.2.0)(typescript@5.7.3): + msw@2.12.10(@types/node@25.4.0)(typescript@5.7.3): dependencies: - '@bundled-es-modules/cookie': 2.0.1 - '@bundled-es-modules/statuses': 1.0.1 - '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 5.1.14(@types/node@24.2.0) - '@mswjs/interceptors': 0.39.5 + '@inquirer/confirm': 5.1.21(@types/node@25.4.0) + '@mswjs/interceptors': 0.41.3 '@open-draft/deferred-promise': 2.2.0 - '@open-draft/until': 2.1.0 - '@types/cookie': 0.6.0 '@types/statuses': 2.0.6 - graphql: 16.11.0 + cookie: 1.0.2 + graphql: 16.13.1 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 path-to-regexp: 6.3.0 picocolors: 1.1.1 + rettime: 0.10.1 + statuses: 2.0.2 strict-event-emitter: 0.5.1 - type-fest: 4.41.0 + tough-cookie: 6.0.0 + type-fest: 5.4.4 + until-async: 3.0.2 yargs: 17.7.2 optionalDependencies: typescript: 5.7.3 transitivePeerDependencies: - '@types/node' + optional: true + + msw@2.12.10(@types/node@25.4.0)(typescript@5.9.3): + dependencies: + '@inquirer/confirm': 5.1.21(@types/node@25.4.0) + '@mswjs/interceptors': 0.41.3 + '@open-draft/deferred-promise': 2.2.0 + '@types/statuses': 2.0.6 + cookie: 1.0.2 + graphql: 16.13.1 + headers-polyfill: 4.0.3 + is-node-process: 1.2.0 + outvariant: 1.4.3 + path-to-regexp: 6.3.0 + picocolors: 1.1.1 + rettime: 0.10.1 + statuses: 2.0.2 + strict-event-emitter: 0.5.1 + tough-cookie: 6.0.0 + type-fest: 5.4.4 + until-async: 3.0.2 + yargs: 17.7.2 + optionalDependencies: + typescript: 5.9.3 + transitivePeerDependencies: + - '@types/node' mute-stream@0.0.8: {} @@ -11148,7 +11567,7 @@ snapshots: dependencies: growly: 1.3.0 is-wsl: 2.2.0 - semver: 7.7.2 + semver: 7.7.4 shellwords: 0.1.1 uuid: 8.3.2 which: 2.0.2 @@ -11214,8 +11633,6 @@ snapshots: should: 13.2.3 yaml: 1.10.2 - oauth-sign@0.9.0: {} - object-assign@4.1.1: {} object-inspect@1.13.4: {} @@ -11242,27 +11659,34 @@ snapshots: only@0.0.2: {} + open@10.2.0: + dependencies: + default-browser: 5.5.0 + define-lazy-prop: 3.0.0 + is-inside-container: 1.0.0 + wsl-utils: 0.1.0 + openapi-backend@5.11.1: dependencies: '@apidevtools/json-schema-ref-parser': 11.9.3 ajv: 8.17.1 bath-es5: 3.0.3 cookie: 1.0.2 - dereference-json-schema: 0.2.1 + dereference-json-schema: 0.2.2 lodash: 4.17.21 mock-json-schema: 1.1.1 openapi-schema-validator: 12.1.3 openapi-types: 12.1.3 qs: 6.14.0 - openapi-client-axios-typegen@7.7.0(encoding@0.1.13)(js-yaml@4.1.0): + openapi-client-axios-typegen@7.8.0(encoding@0.1.13)(js-yaml@4.1.1): dependencies: '@anttiviljami/dtsgenerator': 3.20.0(encoding@0.1.13) '@apidevtools/json-schema-ref-parser': 11.9.3 - axios: 1.13.5(debug@4.4.1) + axios: 1.13.6(debug@4.4.1) indent-string: 4.0.0 lodash: 4.17.21 - openapi-client-axios: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + openapi-client-axios: 7.9.0(axios@1.13.6)(js-yaml@4.1.1) openapi-types: 12.1.3 yargs: 17.7.2 transitivePeerDependencies: @@ -11271,14 +11695,22 @@ snapshots: - js-yaml - supports-color - openapi-client-axios@7.8.0(axios@1.13.5)(js-yaml@4.1.0): + openapi-client-axios@7.9.0(axios@1.13.6)(js-yaml@4.1.0): dependencies: - axios: 1.13.5(debug@4.4.1) + axios: 1.13.6(debug@4.4.1) bath-es5: 3.0.3 - dereference-json-schema: 0.2.1 + dereference-json-schema: 0.2.2 js-yaml: 4.1.0 openapi-types: 12.1.3 + openapi-client-axios@7.9.0(axios@1.13.6)(js-yaml@4.1.1): + dependencies: + axios: 1.13.6(debug@4.4.1) + bath-es5: 3.0.3 + dereference-json-schema: 0.2.2 + js-yaml: 4.1.1 + openapi-types: 12.1.3 + openapi-schema-validator@12.1.3: dependencies: ajv: 8.17.1 @@ -11288,7 +11720,7 @@ snapshots: openapi-types@12.1.3: {} - openapicmd@2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)): + openapicmd@2.9.0(@types/node@24.12.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)): dependencies: '@anttiviljami/dtsgenerator': 3.20.0(encoding@0.1.13) '@apidevtools/swagger-parser': 10.1.1(openapi-types@12.1.3) @@ -11301,7 +11733,7 @@ snapshots: '@oclif/plugin-plugins': 5.4.46 '@types/inquirer': 7.3.3 ajv: 8.17.1 - axios: 1.13.5(debug@4.4.1) + axios: 1.13.6(debug@4.4.1) chalk: 4.1.2 cli-ux: 6.0.9 common-tags: 1.8.2 @@ -11309,7 +11741,7 @@ snapshots: deepmerge: 4.3.1 get-port: 5.1.1 inquirer: 7.3.3 - jest: 29.7.0(@types/node@24.2.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5)) + jest: 29.7.0(@types/node@24.12.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5)) jest-json-schema: 6.1.0 js-yaml: 4.1.0 klona: 2.0.6 @@ -11317,11 +11749,10 @@ snapshots: koa-bodyparser: 4.4.1 koa-logger: 3.2.1 koa-mount: 4.2.0 - koa-proxy: 1.0.0-alpha.3(koa@2.16.2) koa-router: 12.0.1 koa-static: 5.0.0 openapi-backend: 5.11.1 - openapi-client-axios: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + openapi-client-axios: 7.9.0(axios@1.13.6)(js-yaml@4.1.0) swagger-editor-dist: 4.14.6 swagger-ui-dist: 5.27.1 swagger2openapi: 7.0.8(encoding@0.1.13) @@ -11336,7 +11767,7 @@ snapshots: - supports-color - ts-node - openapicmd@2.7.0(@types/node@24.2.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)): + openapicmd@2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)): dependencies: '@anttiviljami/dtsgenerator': 3.20.0(encoding@0.1.13) '@apidevtools/swagger-parser': 10.1.1(openapi-types@12.1.3) @@ -11349,7 +11780,7 @@ snapshots: '@oclif/plugin-plugins': 5.4.46 '@types/inquirer': 7.3.3 ajv: 8.17.1 - axios: 1.13.5(debug@4.4.1) + axios: 1.13.6(debug@4.4.1) chalk: 4.1.2 cli-ux: 6.0.9 common-tags: 1.8.2 @@ -11357,7 +11788,7 @@ snapshots: deepmerge: 4.3.1 get-port: 5.1.1 inquirer: 7.3.3 - jest: 29.7.0(@types/node@24.2.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3)) + jest: 29.7.0(@types/node@25.4.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5)) jest-json-schema: 6.1.0 js-yaml: 4.1.0 klona: 2.0.6 @@ -11365,11 +11796,57 @@ snapshots: koa-bodyparser: 4.4.1 koa-logger: 3.2.1 koa-mount: 4.2.0 - koa-proxy: 1.0.0-alpha.3(koa@2.16.2) koa-router: 12.0.1 koa-static: 5.0.0 openapi-backend: 5.11.1 - openapi-client-axios: 7.8.0(axios@1.13.5)(js-yaml@4.1.0) + openapi-client-axios: 7.9.0(axios@1.13.6)(js-yaml@4.1.0) + swagger-editor-dist: 4.14.6 + swagger-ui-dist: 5.27.1 + swagger2openapi: 7.0.8(encoding@0.1.13) + tslib: 2.8.1 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - encoding + - node-notifier + - openapi-types + - supports-color + - ts-node + + openapicmd@2.9.0(@types/node@25.4.0)(encoding@0.1.13)(node-notifier@8.0.2)(openapi-types@12.1.3)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)): + dependencies: + '@anttiviljami/dtsgenerator': 3.20.0(encoding@0.1.13) + '@apidevtools/swagger-parser': 10.1.1(openapi-types@12.1.3) + '@koa/cors': 5.0.0 + '@oclif/command': 1.8.36(@oclif/config@1.18.17) + '@oclif/config': 1.18.17 + '@oclif/core': 3.27.0 + '@oclif/errors': 1.3.6 + '@oclif/plugin-help': 6.2.32 + '@oclif/plugin-plugins': 5.4.46 + '@types/inquirer': 7.3.3 + ajv: 8.17.1 + axios: 1.13.6(debug@4.4.1) + chalk: 4.1.2 + cli-ux: 6.0.9 + common-tags: 1.8.2 + debug: 4.4.1(supports-color@8.1.1) + deepmerge: 4.3.1 + get-port: 5.1.1 + inquirer: 7.3.3 + jest: 29.7.0(@types/node@25.4.0)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3)) + jest-json-schema: 6.1.0 + js-yaml: 4.1.0 + klona: 2.0.6 + koa: 2.16.2 + koa-bodyparser: 4.4.1 + koa-logger: 3.2.1 + koa-mount: 4.2.0 + koa-router: 12.0.1 + koa-static: 5.0.0 + openapi-backend: 5.11.1 + openapi-client-axios: 7.9.0(axios@1.13.6)(js-yaml@4.1.0) swagger-editor-dist: 4.14.6 swagger-ui-dist: 5.27.1 swagger2openapi: 7.0.8(encoding@0.1.13) @@ -11472,12 +11949,6 @@ snapshots: pathval@2.0.1: {} - pause-stream@0.0.11: - dependencies: - through: 2.3.8 - - performance-now@2.1.0: {} - picocolors@1.1.1: {} picomatch@2.3.1: {} @@ -11515,6 +11986,8 @@ snapshots: prettier@2.7.1: {} + prettier@2.8.8: {} + pretty-format@27.5.1: dependencies: ansi-regex: 5.0.1 @@ -11540,10 +12013,6 @@ snapshots: prr@1.0.1: {} - psl@1.15.0: - dependencies: - punycode: 2.3.1 - punycode@1.4.1: {} punycode@2.3.1: {} @@ -11554,12 +12023,8 @@ snapshots: dependencies: side-channel: 1.1.0 - qs@6.5.3: {} - quansync@0.2.10: {} - querystringify@2.2.0: {} - queue-microtask@1.2.3: {} randombytes@2.1.0: @@ -11621,47 +12086,10 @@ snapshots: reftools@1.1.9: {} - request-promise-core@1.1.4(request@2.88.2): - dependencies: - lodash: 4.17.21 - request: 2.88.2 - - request-promise-native@1.0.9(request@2.88.2): - dependencies: - request: 2.88.2 - request-promise-core: 1.1.4(request@2.88.2) - stealthy-require: 1.1.1 - tough-cookie: 2.5.0 - - request@2.88.2: - dependencies: - aws-sign2: 0.7.0 - aws4: 1.13.2 - caseless: 0.12.0 - combined-stream: 1.0.8 - extend: 3.0.2 - forever-agent: 0.6.1 - form-data: 2.3.3 - har-validator: 5.1.5 - http-signature: 1.2.0 - is-typedarray: 1.0.0 - isstream: 0.1.2 - json-stringify-safe: 5.0.1 - mime-types: 2.1.35 - oauth-sign: 0.9.0 - performance-now: 2.1.0 - qs: 6.5.3 - safe-buffer: 5.2.1 - tough-cookie: 2.5.0 - tunnel-agent: 0.6.0 - uuid: 3.4.0 - require-directory@2.1.1: {} require-from-string@2.0.2: {} - requires-port@1.0.0: {} - resolve-cwd@3.0.0: dependencies: resolve-from: 5.0.0 @@ -11688,6 +12116,8 @@ snapshots: onetime: 5.1.2 signal-exit: 3.0.7 + rettime@0.10.1: {} + reusify@1.1.0: {} rimraf@6.0.1: @@ -11723,6 +12153,8 @@ snapshots: rrweb-cssom@0.8.0: {} + run-applescript@7.1.0: {} + run-async@2.4.1: {} run-parallel@1.2.0: @@ -11766,11 +12198,9 @@ snapshots: semver@7.7.2: {} - serialize-javascript@5.0.1: - dependencies: - randombytes: 2.1.0 + semver@7.7.4: {} - serialize-javascript@6.0.2: + serialize-javascript@5.0.1: dependencies: randombytes: 2.1.0 @@ -11897,18 +12327,6 @@ snapshots: sprintf-js@1.0.3: {} - sshpk@1.18.0: - dependencies: - asn1: 0.2.6 - assert-plus: 1.0.0 - bcrypt-pbkdf: 1.0.2 - dashdash: 1.14.1 - ecc-jsbn: 0.1.2 - getpass: 0.1.7 - jsbn: 0.1.1 - safer-buffer: 2.1.2 - tweetnacl: 0.14.5 - stack-utils@2.0.6: dependencies: escape-string-regexp: 2.0.0 @@ -11923,8 +12341,6 @@ snapshots: std-env@3.9.0: {} - stealthy-require@1.1.1: {} - stream-http@3.2.0: dependencies: builtin-status-codes: 3.0.0 @@ -12044,25 +12460,26 @@ snapshots: symbol-tree@3.2.4: {} + tagged-tag@1.0.0: {} + tapable@1.1.3: {} tapable@2.3.0: {} term-size@2.2.1: {} - terser-webpack-plugin@5.3.16(webpack@5.105.2): + terser-webpack-plugin@5.4.0(webpack@5.105.4): dependencies: - '@jridgewell/trace-mapping': 0.3.29 + '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 - serialize-javascript: 6.0.2 - terser: 5.43.1 - webpack: 5.105.2(webpack-cli@5.1.4) + terser: 5.46.0 + webpack: 5.105.4(webpack-cli@5.1.4) - terser@5.43.1: + terser@5.46.0: dependencies: - '@jridgewell/source-map': 0.3.10 - acorn: 8.15.0 + '@jridgewell/source-map': 0.3.11 + acorn: 8.16.0 commander: 2.20.3 source-map-support: 0.5.21 @@ -12113,10 +12530,16 @@ snapshots: tldts-core@6.1.86: {} + tldts-core@7.0.25: {} + tldts@6.1.86: dependencies: tldts-core: 6.1.86 + tldts@7.0.25: + dependencies: + tldts-core: 7.0.25 + tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 @@ -12129,22 +12552,14 @@ snapshots: toidentifier@1.0.1: {} - tough-cookie@2.5.0: - dependencies: - psl: 1.15.0 - punycode: 2.3.1 - - tough-cookie@4.1.4: - dependencies: - psl: 1.15.0 - punycode: 2.3.1 - universalify: 0.2.0 - url-parse: 1.5.10 - tough-cookie@5.1.2: dependencies: tldts: 6.1.86 + tough-cookie@6.0.0: + dependencies: + tldts: 7.0.25 + tr46@0.0.3: {} tr46@3.0.0: @@ -12163,7 +12578,7 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-loader@8.4.0(typescript@4.9.5)(webpack@5.105.2): + ts-loader@8.4.0(typescript@4.9.5)(webpack@5.105.4): dependencies: chalk: 4.1.2 enhanced-resolve: 4.5.0 @@ -12171,26 +12586,26 @@ snapshots: micromatch: 4.0.8 semver: 7.7.2 typescript: 4.9.5 - webpack: 5.105.2(webpack-cli@4.10.0) + webpack: 5.105.4(webpack-cli@4.10.0) - ts-loader@8.4.0(typescript@5.7.3)(webpack@5.105.2): + ts-loader@8.4.0(typescript@5.9.3)(webpack@5.105.4): dependencies: chalk: 4.1.2 enhanced-resolve: 4.5.0 loader-utils: 2.0.4 micromatch: 4.0.8 semver: 7.7.2 - typescript: 5.7.3 - webpack: 5.105.2(webpack-cli@5.1.4) + typescript: 5.9.3 + webpack: 5.105.4(webpack-cli@5.1.4) - ts-node@10.9.2(@types/node@24.2.0)(typescript@4.9.5): + ts-node@10.9.2(@types/node@24.12.0)(typescript@4.9.5): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 24.2.0 + '@types/node': 24.12.0 acorn: 8.15.0 acorn-walk: 8.3.4 arg: 4.1.3 @@ -12200,22 +12615,41 @@ snapshots: typescript: 4.9.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + optional: true - ts-node@10.9.2(@types/node@24.2.0)(typescript@5.7.3): + ts-node@10.9.2(@types/node@25.4.0)(typescript@4.9.5): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 24.2.0 + '@types/node': 25.4.0 acorn: 8.15.0 acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.7.3 + typescript: 4.9.5 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + + ts-node@10.9.2(@types/node@25.4.0)(typescript@5.9.3): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 25.4.0 + acorn: 8.15.0 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.9.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optional: true @@ -12226,7 +12660,7 @@ snapshots: tsscmp@1.0.6: {} - tsup@8.5.1(postcss@8.5.6)(tsx@4.21.0)(typescript@5.7.3): + tsup@8.5.1(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3): dependencies: bundle-require: 5.1.0(esbuild@0.27.3) cac: 6.7.14 @@ -12247,7 +12681,7 @@ snapshots: tree-kill: 1.2.2 optionalDependencies: postcss: 8.5.6 - typescript: 5.7.3 + typescript: 5.9.3 transitivePeerDependencies: - jiti - supports-color @@ -12261,19 +12695,15 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - tunnel-agent@0.6.0: - dependencies: - safe-buffer: 5.2.1 - - tweetnacl@0.14.5: {} - type-detect@4.0.8: {} type-detect@4.1.0: {} type-fest@0.21.3: {} - type-fest@4.41.0: {} + type-fest@5.4.4: + dependencies: + tagged-tag: 1.0.0 type-is@1.6.18: dependencies: @@ -12284,20 +12714,24 @@ snapshots: typescript@5.7.3: {} + typescript@5.9.3: {} + ufo@1.6.1: {} undici-types@6.21.0: {} - undici-types@7.10.0: {} + undici-types@7.16.0: {} - universalify@0.1.2: {} + undici-types@7.18.2: {} - universalify@0.2.0: {} + universalify@0.1.2: {} universalify@2.0.1: {} unpipe@1.0.0: {} + until-async@3.0.2: {} + update-browserslist-db@1.1.3(browserslist@4.25.1): dependencies: browserslist: 4.25.1 @@ -12314,11 +12748,6 @@ snapshots: dependencies: punycode: 2.3.1 - url-parse@1.5.10: - dependencies: - querystringify: 2.2.0 - requires-port: 1.0.0 - url@0.11.4: dependencies: punycode: 1.4.1 @@ -12334,8 +12763,6 @@ snapshots: is-typed-array: 1.1.15 which-typed-array: 1.1.19 - uuid@3.4.0: {} - uuid@8.3.2: optional: true @@ -12343,7 +12770,7 @@ snapshots: v8-to-istanbul@9.3.0: dependencies: - '@jridgewell/trace-mapping': 0.3.29 + '@jridgewell/trace-mapping': 0.3.31 '@types/istanbul-lib-coverage': 2.0.6 convert-source-map: 2.0.0 @@ -12351,19 +12778,13 @@ snapshots: vary@1.1.2: {} - verror@1.10.0: - dependencies: - assert-plus: 1.0.0 - core-util-is: 1.0.2 - extsprintf: 1.3.0 - - vite-node@1.6.1(@types/node@24.2.0)(terser@5.43.1): + vite-node@1.6.1(@types/node@25.4.0)(terser@5.46.0): dependencies: cac: 6.7.14 debug: 4.4.1(supports-color@8.1.1) pathe: 1.1.2 picocolors: 1.1.1 - vite: 5.4.19(@types/node@24.2.0)(terser@5.43.1) + vite: 5.4.19(@types/node@25.4.0)(terser@5.46.0) transitivePeerDependencies: - '@types/node' - less @@ -12375,13 +12796,13 @@ snapshots: - supports-color - terser - vite-node@2.1.9(@types/node@20.19.9)(terser@5.43.1): + vite-node@2.1.9(@types/node@20.19.37)(terser@5.46.0): dependencies: cac: 6.7.14 debug: 4.4.1(supports-color@8.1.1) es-module-lexer: 1.7.0 pathe: 1.1.2 - vite: 5.4.19(@types/node@20.19.9)(terser@5.43.1) + vite: 5.4.21(@types/node@20.19.37)(terser@5.46.0) transitivePeerDependencies: - '@types/node' - less @@ -12393,13 +12814,13 @@ snapshots: - supports-color - terser - vite-node@3.2.4(@types/node@24.2.0)(terser@5.43.1)(tsx@4.21.0): + vite-node@3.2.4(@types/node@25.4.0)(terser@5.46.0)(tsx@4.21.0): dependencies: cac: 6.7.14 debug: 4.4.1(supports-color@8.1.1) es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 6.3.5(@types/node@24.2.0)(terser@5.43.1)(tsx@4.21.0) + vite: 6.4.1(@types/node@25.4.0)(terser@5.46.0)(tsx@4.21.0) transitivePeerDependencies: - '@types/node' - jiti @@ -12414,27 +12835,27 @@ snapshots: - tsx - yaml - vite@5.4.19(@types/node@20.19.9)(terser@5.43.1): + vite@5.4.19(@types/node@25.4.0)(terser@5.46.0): dependencies: esbuild: 0.21.5 postcss: 8.5.6 rollup: 4.46.2 optionalDependencies: - '@types/node': 20.19.9 + '@types/node': 25.4.0 fsevents: 2.3.3 - terser: 5.43.1 + terser: 5.46.0 - vite@5.4.19(@types/node@24.2.0)(terser@5.43.1): + vite@5.4.21(@types/node@20.19.37)(terser@5.46.0): dependencies: esbuild: 0.21.5 postcss: 8.5.6 rollup: 4.46.2 optionalDependencies: - '@types/node': 24.2.0 + '@types/node': 20.19.37 fsevents: 2.3.3 - terser: 5.43.1 + terser: 5.46.0 - vite@6.3.5(@types/node@24.2.0)(terser@5.43.1)(tsx@4.21.0): + vite@6.4.1(@types/node@25.4.0)(terser@5.46.0)(tsx@4.21.0): dependencies: esbuild: 0.25.8 fdir: 6.4.6(picomatch@4.0.3) @@ -12443,12 +12864,12 @@ snapshots: rollup: 4.46.2 tinyglobby: 0.2.14 optionalDependencies: - '@types/node': 24.2.0 + '@types/node': 25.4.0 fsevents: 2.3.3 - terser: 5.43.1 + terser: 5.46.0 tsx: 4.21.0 - vitest@1.6.1(@types/node@24.2.0)(jsdom@26.1.0)(terser@5.43.1): + vitest@1.6.1(@types/node@25.4.0)(jsdom@26.1.0)(terser@5.46.0): dependencies: '@vitest/expect': 1.6.1 '@vitest/runner': 1.6.1 @@ -12467,11 +12888,11 @@ snapshots: strip-literal: 2.1.1 tinybench: 2.9.0 tinypool: 0.8.4 - vite: 5.4.19(@types/node@24.2.0)(terser@5.43.1) - vite-node: 1.6.1(@types/node@24.2.0)(terser@5.43.1) + vite: 5.4.19(@types/node@25.4.0)(terser@5.46.0) + vite-node: 1.6.1(@types/node@25.4.0)(terser@5.46.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 24.2.0 + '@types/node': 25.4.0 jsdom: 26.1.0 transitivePeerDependencies: - less @@ -12483,10 +12904,10 @@ snapshots: - supports-color - terser - vitest@2.1.9(@types/node@20.19.9)(jsdom@26.1.0)(msw@2.10.4(@types/node@20.19.9)(typescript@5.7.3))(terser@5.43.1): + vitest@2.1.9(@types/node@20.19.37)(jsdom@26.1.0)(msw@2.12.10(@types/node@20.19.37)(typescript@5.7.3))(terser@5.46.0): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.10.4(@types/node@20.19.9)(typescript@5.7.3))(vite@5.4.19(@types/node@20.19.9)(terser@5.43.1)) + '@vitest/mocker': 2.1.9(msw@2.12.10(@types/node@20.19.37)(typescript@5.7.3))(vite@5.4.21(@types/node@20.19.37)(terser@5.46.0)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -12502,11 +12923,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.1.1 tinyrainbow: 1.2.0 - vite: 5.4.19(@types/node@20.19.9)(terser@5.43.1) - vite-node: 2.1.9(@types/node@20.19.9)(terser@5.43.1) + vite: 5.4.21(@types/node@20.19.37)(terser@5.46.0) + vite-node: 2.1.9(@types/node@20.19.37)(terser@5.46.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 20.19.9 + '@types/node': 20.19.37 jsdom: 26.1.0 transitivePeerDependencies: - less @@ -12519,11 +12940,11 @@ snapshots: - supports-color - terser - vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.2.0)(jsdom@26.1.0)(msw@2.10.4(@types/node@24.2.0)(typescript@5.7.3))(terser@5.43.1)(tsx@4.21.0): + vitest@3.2.4(@types/debug@4.1.12)(@types/node@25.4.0)(jsdom@26.1.0)(msw@2.12.10(@types/node@25.4.0)(typescript@5.7.3))(terser@5.46.0)(tsx@4.21.0): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(msw@2.10.4(@types/node@24.2.0)(typescript@5.7.3))(vite@6.3.5(@types/node@24.2.0)(terser@5.43.1)(tsx@4.21.0)) + '@vitest/mocker': 3.2.4(msw@2.12.10(@types/node@25.4.0)(typescript@5.7.3))(vite@6.4.1(@types/node@25.4.0)(terser@5.46.0)(tsx@4.21.0)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -12541,12 +12962,12 @@ snapshots: tinyglobby: 0.2.14 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 6.3.5(@types/node@24.2.0)(terser@5.43.1)(tsx@4.21.0) - vite-node: 3.2.4(@types/node@24.2.0)(terser@5.43.1)(tsx@4.21.0) + vite: 6.4.1(@types/node@25.4.0)(terser@5.46.0)(tsx@4.21.0) + vite-node: 3.2.4(@types/node@25.4.0)(terser@5.46.0)(tsx@4.21.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.12 - '@types/node': 24.2.0 + '@types/node': 25.4.0 jsdom: 26.1.0 transitivePeerDependencies: - jiti @@ -12581,10 +13002,10 @@ snapshots: webidl-conversions@7.0.0: {} - webpack-cli@4.10.0(webpack@5.105.2): + webpack-cli@4.10.0(webpack@5.105.4): dependencies: '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 1.2.0(webpack-cli@4.10.0)(webpack@5.105.2) + '@webpack-cli/configtest': 1.2.0(webpack-cli@4.10.0)(webpack@5.105.4) '@webpack-cli/info': 1.5.0(webpack-cli@4.10.0) '@webpack-cli/serve': 1.7.0(webpack-cli@4.10.0) colorette: 2.0.20 @@ -12594,15 +13015,15 @@ snapshots: import-local: 3.2.0 interpret: 2.2.0 rechoir: 0.7.1 - webpack: 5.105.2(webpack-cli@4.10.0) + webpack: 5.105.4(webpack-cli@4.10.0) webpack-merge: 5.10.0 - webpack-cli@5.1.4(webpack@5.105.2): + webpack-cli@5.1.4(webpack@5.105.4): dependencies: '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4)(webpack@5.105.2) - '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4)(webpack@5.105.2) - '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4)(webpack@5.105.2) + '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4)(webpack@5.105.4) + '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4)(webpack@5.105.4) + '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4)(webpack@5.105.4) colorette: 2.0.20 commander: 10.0.1 cross-spawn: 7.0.6 @@ -12611,7 +13032,7 @@ snapshots: import-local: 3.2.0 interpret: 3.1.1 rechoir: 0.8.0 - webpack: 5.105.2(webpack-cli@5.1.4) + webpack: 5.105.4(webpack-cli@5.1.4) webpack-merge: 5.10.0 webpack-merge@5.10.0: @@ -12620,9 +13041,9 @@ snapshots: flat: 5.0.2 wildcard: 2.0.1 - webpack-sources@3.3.3: {} + webpack-sources@3.3.4: {} - webpack@5.105.2(webpack-cli@4.10.0): + webpack@5.105.4(webpack-cli@4.10.0): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.8 @@ -12630,11 +13051,11 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@webassemblyjs/wasm-edit': 1.14.1 '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.15.0 - acorn-import-phases: 1.0.4(acorn@8.15.0) + acorn: 8.16.0 + acorn-import-phases: 1.0.4(acorn@8.16.0) browserslist: 4.28.1 chrome-trace-event: 1.0.4 - enhanced-resolve: 5.19.0 + enhanced-resolve: 5.20.0 es-module-lexer: 2.0.0 eslint-scope: 5.1.1 events: 3.3.0 @@ -12646,17 +13067,17 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.0 - terser-webpack-plugin: 5.3.16(webpack@5.105.2) + terser-webpack-plugin: 5.4.0(webpack@5.105.4) watchpack: 2.5.1 - webpack-sources: 3.3.3 + webpack-sources: 3.3.4 optionalDependencies: - webpack-cli: 4.10.0(webpack@5.105.2) + webpack-cli: 4.10.0(webpack@5.105.4) transitivePeerDependencies: - '@swc/core' - esbuild - uglify-js - webpack@5.105.2(webpack-cli@5.1.4): + webpack@5.105.4(webpack-cli@5.1.4): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.8 @@ -12664,11 +13085,11 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@webassemblyjs/wasm-edit': 1.14.1 '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.15.0 - acorn-import-phases: 1.0.4(acorn@8.15.0) + acorn: 8.16.0 + acorn-import-phases: 1.0.4(acorn@8.16.0) browserslist: 4.28.1 chrome-trace-event: 1.0.4 - enhanced-resolve: 5.19.0 + enhanced-resolve: 5.20.0 es-module-lexer: 2.0.0 eslint-scope: 5.1.1 events: 3.3.0 @@ -12680,11 +13101,11 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.0 - terser-webpack-plugin: 5.3.16(webpack@5.105.2) + terser-webpack-plugin: 5.4.0(webpack@5.105.4) watchpack: 2.5.1 - webpack-sources: 3.3.3 + webpack-sources: 3.3.4 optionalDependencies: - webpack-cli: 5.1.4(webpack@5.105.2) + webpack-cli: 5.1.4(webpack@5.105.4) transitivePeerDependencies: - '@swc/core' - esbuild @@ -12769,6 +13190,10 @@ snapshots: ws@8.18.3: {} + wsl-utils@0.1.0: + dependencies: + is-wsl: 3.1.1 + xml-name-validator@5.0.0: {} xmlchars@2.2.0: {} @@ -12803,4 +13228,4 @@ snapshots: yocto-queue@1.2.1: {} - yoctocolors-cjs@2.1.2: {} + yoctocolors-cjs@2.1.3: {}