import "./chunk-YPSWSI3M.js";

// src/docs/audit-logs.json
var audit_logs_default = '# Audit Log\n\n- **Base URL:** `https://audit-logs.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/audit-logs](https://docs.epilot.io/api/audit-logs)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.auditLogs.getLogs(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/audit-logs\'\n\nconst auditLogsClient = getClient()\nauthorize(auditLogsClient, () => \'<token>\')\nconst { data } = await auditLogsClient.getLogs(...)\n```\n\n## Operations\n\n**Events**\n- [`getLogs`](#getlogs)\n\n**Audit Log**\n- [`getLogById`](#getlogbyid)\n\n**Schemas**\n- [`SearchOptions`](#searchoptions)\n- [`HttpContext`](#httpcontext)\n- [`Caller`](#caller)\n- [`Event`](#event)\n\n### `getLogs`\n\nRetrieve Audit Log events. Optionally, you can filter them by organization.\n\n`POST /v1/logs`\n\n```ts\nconst { data } = await client.getLogs(\n  null,\n  {\n    limit: 50,\n    page: 0,\n    timestamp: \'2021-06-01T12:00:00Z\',\n    service_name: \'workflows\',\n    event_name: \'deleteWorkflow\',\n    outcome: \'success\',\n    method: \'POST\',\n    user: {\n      email: \'max.mustermann@mail.com\',\n      user_id: 123456\n    }\n  },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n  "logs": [\n    {\n      "id": "2843c005-c5b0-4df2-94ee-1ca2ddd998ac",\n      "org_id": 123456,\n      "service_name": "workflows",\n      "event_name": "deleteWorkflow",\n      "status_code": 200,\n      "timestamp": "2021-06-01T12:00:00Z",\n      "caller": {\n        "user_email": "max.mustermann@mail.com",\n        "user_id": 123456,\n        "trigger_type": "user"\n      },\n      "http": {\n        "method": "GET",\n        "ip": null,\n        "headers": {\n          "Authorization": "Bearer token"\n        },\n        "query": {\n          "limit": 50,\n          "page": 0\n        },\n        "pathParams": {\n          "eventId": "2843c005-c5b0-4df2-94ee-1ca2ddd998ac"\n        },\n        "path": "/v1/logs",\n        "domainName": "audit-logs.sls.epilot.io"\n      },\n      "detail": "{\\"workflow_id\\": \\"123456\\"}",\n      "activity": "Workflow with ID 123456 was deleted",\n      "source_url": "string"\n    }\n  ],\n  "total": 1\n}\n```\n\n</details>\n\n---\n\n### `getLogById`\n\nRetrieve Audit Log events\n\n`GET /v1/logs/{logId}`\n\n```ts\nconst { data } = await client.getLogById({\n  logId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n  "log": {\n    "id": "2843c005-c5b0-4df2-94ee-1ca2ddd998ac",\n    "org_id": 123456,\n    "service_name": "workflows",\n    "event_name": "deleteWorkflow",\n    "status_code": 200,\n    "timestamp": "2021-06-01T12:00:00Z",\n    "caller": {\n      "user_email": "max.mustermann@mail.com",\n      "user_id": 123456,\n      "trigger_type": "user"\n    },\n    "http": {\n      "method": "GET",\n      "ip": null,\n      "headers": {\n        "Authorization": "Bearer token"\n      },\n      "query": {\n        "limit": 50,\n        "page": 0\n      },\n      "pathParams": {\n        "eventId": "2843c005-c5b0-4df2-94ee-1ca2ddd998ac"\n      },\n      "path": "/v1/logs",\n      "domainName": "audit-logs.sls.epilot.io"\n    },\n    "detail": "{\\"workflow_id\\": \\"123456\\"}",\n    "activity": "Workflow with ID 123456 was deleted",\n    "source_url": "string"\n  }\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `SearchOptions`\n\n```ts\ntype SearchOptions = {\n  limit?: number\n  page?: number\n  timestamp?: {\n    from?: string\n    to?: string\n  }\n  service_name?: string\n  event_name?: string\n  outcome?: "success" | "failure"\n  method?: string\n  user?: {\n    email?: string\n    user_id?: string\n  }\n}\n```\n\n### `HttpContext`\n\n```ts\ntype HttpContext = {\n  method?: string\n  ip?: string\n  headers?: object\n  query?: object\n  pathParams?: object\n  path?: string\n  domainName?: string\n}\n```\n\n### `Caller`\n\n```ts\ntype Caller = {\n  user_email?: string\n  user_id?: string\n  trigger_type?: "user" | "api" | "automation"\n}\n```\n\n### `Event`\n\n```ts\ntype Event = {\n  id?: string // uuid\n  org_id?: string\n  service_name?: string\n  event_name?: string\n  status_code?: number\n  timestamp?: string\n  caller?: {\n    user_email?: string\n    user_id?: string\n    trigger_type?: "user" | "api" | "automation"\n  }\n  http?: {\n    method?: string\n    ip?: string\n    headers?: object\n    query?: object\n    pathParams?: object\n    path?: string\n    domainName?: string\n  }\n  detail?: string\n  activity?: string\n  source_url?: string\n}\n```\n';
export {
  audit_logs_default as default
};
