{"_id":"@arythmatic/flow-client","_rev":"2-973991f0c6f249505fe1321dcbca7a62","name":"@arythmatic/flow-client","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@arythmatic/flow-client","version":"0.1.0","keywords":["flow","arythmatic","api","testing","workflow","client","http","monitoring","security"],"author":{"name":"Arythmatic"},"license":"MIT","_id":"@arythmatic/flow-client@0.1.0","maintainers":[{"name":"arythmaticsuperroot","email":"support@arythmatic.cloud"}],"homepage":"https://github.com/askmeidentitycorp/flowapi-releases#readme","bugs":{"url":"https://github.com/askmeidentitycorp/flowapi-releases/issues"},"bin":{"flow":"bin/flow.js"},"dist":{"shasum":"57db0a4e284ae7993345a9fe5a4c513a9dbb1099","tarball":"https://registry.npmjs.org/@arythmatic/flow-client/-/flow-client-0.1.0.tgz","fileCount":14,"integrity":"sha512-ZcqQZa1b7FTwQmfeK/rOczxfwv2Eq8065WK4ixYL/1f5mnHis2M2p2/PkcBFVc78FODYkh9OMQCWP4LAyh41dQ==","signatures":[{"sig":"MEUCIQCYqfikgx70ZcA4iEeR4l4lFbEmeicqsPWseqw/EelAYAIgCjwvnGrQ5fA+ib3qECZFIVcrXTGmc1ZgbY0f1nCxefw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33561},"main":"src/index.js","type":"module","engines":{"node":">=18.0.0"},"exports":{".":"./src/index.js"},"gitHead":"6c0d75fc02e65fdc5b617310bbe1531b7bd47701","scripts":{"test":"echo 'No tests configured yet'","prepublishOnly":"npm pack --dry-run"},"_npmUser":{"name":"arythmaticsuperroot","email":"support@arythmatic.cloud"},"repository":{"url":"git+https://github.com/askmeidentitycorp/flowapi-releases.git","type":"git"},"_npmVersion":"11.5.2","description":"Official JavaScript client for Arythmatic Flow — API testing, workflows, AI, monitoring, and security scanning.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"commander":"^14.0.3"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/flow-client_0.1.0_1776957657963_0.842286750098924","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@arythmatic/flow-client","version":"0.2.0","description":"Official JavaScript client for Arythmatic Flow — API testing, workflows, AI, monitoring, and security scanning.","type":"module","main":"src/index.js","exports":{".":"./src/index.js"},"bin":{"flow":"bin/flow.js"},"scripts":{"test":"echo 'No tests configured yet'","prepublishOnly":"npm pack --dry-run"},"keywords":["flow","arythmatic","api","testing","workflow","client","http","monitoring","security"],"author":{"name":"Arythmatic"},"license":"MIT","engines":{"node":">=18.0.0"},"dependencies":{"commander":"^14.0.3"},"repository":{"type":"git","url":"git+https://github.com/askmeidentitycorp/flowapi-releases.git"},"_id":"@arythmatic/flow-client@0.2.0","gitHead":"7325c87c50e4db7c4e4c345126d9cec222a09d9a","bugs":{"url":"https://github.com/askmeidentitycorp/flowapi-releases/issues"},"homepage":"https://github.com/askmeidentitycorp/flowapi-releases#readme","_nodeVersion":"22.14.0","_npmVersion":"11.5.2","dist":{"integrity":"sha512-qJprHAYPj0gFH2zLp7cDnBsjUgRxJ4z43Zy09JmEW0wBTbBjrXHEQn49DVRUtTMnxRFQtbriyL6EDl2bDT3lQA==","shasum":"3b17b217ec8c5a34cb3e81006566fbc8d2450795","tarball":"https://registry.npmjs.org/@arythmatic/flow-client/-/flow-client-0.2.0.tgz","fileCount":26,"unpackedSize":48077,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD5n+3u5itx6iQc9lDSbr/Jez40tEKZyhgi/UwO1dPcmAIhAJCCTiPu8fMRGH55nCX0Ok1WftEq/iFLi3Qulxydf3mJ"}]},"_npmUser":{"name":"arythmaticsuperroot","email":"support@arythmatic.cloud"},"directories":{},"maintainers":[{"name":"arythmaticsuperroot","email":"support@arythmatic.cloud"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/flow-client_0.2.0_1777043640014_0.8274116894421981"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-23T15:20:57.865Z","modified":"2026-04-24T15:14:00.323Z","0.1.0":"2026-04-23T15:20:58.228Z","0.2.0":"2026-04-24T15:14:00.197Z"},"bugs":{"url":"https://github.com/askmeidentitycorp/flowapi-releases/issues"},"author":{"name":"Arythmatic"},"license":"MIT","homepage":"https://github.com/askmeidentitycorp/flowapi-releases#readme","keywords":["flow","arythmatic","api","testing","workflow","client","http","monitoring","security"],"repository":{"type":"git","url":"git+https://github.com/askmeidentitycorp/flowapi-releases.git"},"description":"Official JavaScript client for Arythmatic Flow — API testing, workflows, AI, monitoring, and security scanning.","maintainers":[{"name":"arythmaticsuperroot","email":"support@arythmatic.cloud"}],"readme":"# @arythmatic/flow-client\n\nOfficial JavaScript client for [Arythmatic Flow](https://flow.arythmatic.cloud) — the API platform for testing, workflows, AI, monitoring, and security scanning.\n\n## Install\n\n```bash\nnpm install @arythmatic/flow-client\n```\n\n## Quick Start\n\n```js\nimport { FlowClient } from '@arythmatic/flow-client';\n\nconst flow = new FlowClient();\n\n// Authenticate\nawait flow.login({ email: 'you@example.com', password: 'secret' });\n\n// Set active team\nflow.setTeamId('your-team-id');\n\n// Run a stored collection\nconst collections = await flow.collections.list();\nconst result = await flow.collections.run(collections[0].id);\nconsole.log(result);\n```\n\n## Features\n\n- **HTTP Client** — axios-like interface with interceptors, timeouts, and auto-auth headers.\n- **Collections** — list, run, and inspect stored request collections.\n- **Workflows** — execute DAG-based workflows with custom inputs.\n- **AI** — generate requests from descriptions, suggest assertions, manage conversations.\n- **Monitoring** — create uptime/performance monitors and trigger on-demand checks.\n- **Security Scanning** — run OWASP-style vulnerability scans on requests, collections, or URLs.\n- **Proxy Execution** — send arbitrary HTTP requests through Flow's engine (CORS-free, with variables, scripts, and assertions).\n\n## Configuration\n\n```js\nconst flow = new FlowClient({\n  baseURL: 'https://flow.arythmatic.cloud', // or your self-hosted instance\n  accessToken: '...',   // optional: pre-authenticated\n  refreshToken: '...',  // optional\n  teamId: '...',        // optional: default team\n  timeout: 30000,       // request timeout in ms\n  headers: {},          // extra default headers\n});\n```\n\n## Authentication\n\n```js\n// Login (stores tokens automatically)\nconst { user, teams } = await flow.login({ email, password });\n\n// Register\nconst { user, team } = await flow.register({ email, password, name });\n\n// Refresh\nawait flow.refresh();\n\n// Get current user\nconst me = await flow.auth.me();\n```\n\n## Collections\n\n```js\nconst collections = await flow.collections.list();\n\n// Run the entire collection\nconst run = await flow.collections.run(collectionId, {\n  mode: 'sequential',        // or 'parallel'\n  environmentId: 'env-id',\n  stopOnFailure: true,\n});\n\n// Run only specific requests from the collection\nconst runSubset = await flow.collections.run(collectionId, {\n  requestIds: ['req-id-1', 'req-id-2'],\n});\n\n// Run a single request from a collection\nconst runOne = await flow.collections.runOne(collectionId, 'req-id-1');\n\nconst runs = await flow.collections.runs(collectionId);\n```\n\n## Workflows\n\n```js\nconst workflows = await flow.workflows.list();\nconst result = await flow.workflows.run(workflowId, {\n  environmentId: 'env-id',\n  input: { userId: '123' },\n});\nconst history = await flow.workflows.runs(workflowId);\n```\n\n## AI\n\n```js\n// Generate request definitions from text\nconst { requests } = await flow.ai.generate({\n  input: 'A todo list API with CRUD',\n  type: 'description',\n});\n\n// Suggest assertions\nconst { assertions } = await flow.ai.suggestAssertions({ status, headers, body, url, method });\n\n// Token usage\nconst usage = await flow.ai.usage();\n```\n\n## Monitors\n\n```js\nconst monitor = await flow.monitors.create({\n  name: 'API Health',\n  type: 'standalone',\n  url: 'https://api.example.com/health',\n  method: 'GET',\n  expectedStatus: 200,\n  interval: '30m',\n});\nawait flow.monitors.check(monitor.id);\n```\n\n## Security Scans\n\n```js\n// Scan a stored request\nawait flow.scans.scanRequest(requestId);\n\n// Scan a collection\nawait flow.scans.scanCollection(collectionId);\n\n// Scan any URL\nawait flow.scans.scanUrl('https://api.example.com/users');\n\n// Get results\nconst report = await flow.scans.get(scanId);\n```\n\n## Environments\n\n```js\nconst envs = await flow.environments.list();\nconst env = await flow.environments.create({ name: 'Staging', color: '#3b82f6' });\nawait flow.environments.setVars(env.id, [{ k: 'BASE_URL', v: 'https://staging.example.com' }]);\n```\n\n## Data Tables\n\n```js\nconst tables = await flow.dataTables.list();\nconst table = await flow.dataTables.create({ name: 'Users', columns: ['id', 'name', 'role'] });\nawait flow.dataTables.update(table.id, { rows: [[1, 'Alice', 'admin']] });\n```\n\n## Request Templates\n\n```js\nconst tpls = await flow.requestTemplates.list();\nconst tpl = await flow.requestTemplates.create({ name: 'Get User', method: 'GET', path: '/users/{{id}}' });\n```\n\n## Comments\n\n```js\nconst comments = await flow.comments.listForRequest(requestId);\nawait flow.comments.create(requestId, { body: 'Looks good!' });\n```\n\n## Audit Log\n\n```js\nconst log = await flow.auditLog.list({ entity: 'collection', limit: 50 });\nconst users = await flow.auditLog.users();\n```\n\n## Performance Tests\n\n```js\nconst result = await flow.perfTests.run({ url: 'https://api.example.com/health', concurrency: 20, totalRequests: 200 });\nconst runs = await flow.perfTests.list();\n```\n\n## Team Management\n\n```js\nconst myTeams = await flow.teams.list();\nconst members = await flow.teams.members(teamId);\nawait flow.teams.invite(teamId, { email: 'new@example.com', role: 'admin' });\nawait flow.teams.acceptInvitation(token);\n```\n\n## History\n\n```js\nconst entries = await flow.history.list({ collectionId, limit: 20 });\nconst entry = await flow.history.get(entryId);\nawait flow.history.deleteMany({ olderThanDays: 30 });\n```\n\n## Import / Export\n\n```js\nconst result = await flow.importExport.importCollection({ content: postmanJson });\nawait flow.importExport.exportCollection(collectionId, 'openapi');\nawait flow.importExport.exportCicd(collectionId, 'github', { schedule: '0 9 * * *' });\n```\n\n## Workflow Folders & Templates\n\n```js\nconst folders = await flow.workflowFolders.list();\nawait flow.workflowFolders.create({ name: 'Onboarding', parentId });\n\nconst templates = await flow.workflowTemplates.list();\nawait flow.workflowTemplates.use(templateId, { name: 'My Onboarding Flow' });\n```\n\n## MCP Servers\n\n```js\nconst templates = await flow.mcpServers.templates();\nconst servers = await flow.mcpServers.list();\nawait flow.mcpServers.create({ name: 'slack', type: 'template', credentials: { token: 'xoxb-...' } });\nawait flow.mcpServers.reconnect(serverId);\n```\n\n## Proxy / Arbitrary Requests\n\nSend any HTTP request through Flow's execution engine:\n\n```js\nconst res = await flow.requests.execute({\n  method: 'POST',\n  url: 'https://api.example.com/users',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({ name: 'Alice' }),\n  envVars: [{ key: 'BASE_URL', value: 'https://api.example.com' }],\n  assertions: [\n    { type: 'status', operator: 'eq', expected: 201 },\n  ],\n});\n```\n\nShorthand helpers are also available:\n\n```js\nawait flow.requests.get(url, opts);\nawait flow.requests.post(url, opts);\n// put, patch, delete\n```\n\n## Interceptors\n\n```js\nflow.interceptors.request.use((config) => {\n  console.log('Outgoing:', config.method, config.url);\n  return config;\n});\n\nflow.interceptors.response.use(\n  (res) => res,\n  (err) => {\n    console.error('Request failed:', err.message);\n    throw err;\n  }\n);\n```\n\n## Error Handling\n\n```js\nimport { FlowError, FlowAuthError } from '@arythmatic/flow-client';\n\ntry {\n  await flow.collections.list();\n} catch (err) {\n  if (err instanceof FlowAuthError) {\n    await flow.refresh();\n  }\n  console.error(err.status, err.code, err.response);\n}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}