@roarkanalytics/sdk-mcp 2.30.0 → 2.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/auth.d.mts.map +1 -1
  2. package/auth.d.ts.map +1 -1
  3. package/code-tool-types.d.mts.map +1 -1
  4. package/code-tool-types.d.ts.map +1 -1
  5. package/code-tool-worker.d.mts.map +1 -1
  6. package/code-tool-worker.d.ts.map +1 -1
  7. package/code-tool-worker.js +16 -6
  8. package/code-tool-worker.js.map +1 -1
  9. package/code-tool-worker.mjs +16 -6
  10. package/code-tool-worker.mjs.map +1 -1
  11. package/code-tool.d.mts.map +1 -1
  12. package/code-tool.d.ts.map +1 -1
  13. package/code-tool.mjs.map +1 -1
  14. package/docs-search-tool.d.mts +2 -2
  15. package/docs-search-tool.d.mts.map +1 -1
  16. package/docs-search-tool.d.ts +2 -2
  17. package/docs-search-tool.d.ts.map +1 -1
  18. package/docs-search-tool.mjs.map +1 -1
  19. package/http.d.mts.map +1 -1
  20. package/http.d.ts.map +1 -1
  21. package/http.mjs.map +1 -1
  22. package/index.mjs.map +1 -1
  23. package/instructions.mjs.map +1 -1
  24. package/local-docs-search.d.mts.map +1 -1
  25. package/local-docs-search.d.ts.map +1 -1
  26. package/local-docs-search.js +752 -460
  27. package/local-docs-search.js.map +1 -1
  28. package/local-docs-search.mjs +752 -460
  29. package/local-docs-search.mjs.map +1 -1
  30. package/logger.d.mts.map +1 -1
  31. package/logger.d.ts.map +1 -1
  32. package/logger.mjs.map +1 -1
  33. package/methods.d.mts.map +1 -1
  34. package/methods.d.ts.map +1 -1
  35. package/methods.js +94 -34
  36. package/methods.js.map +1 -1
  37. package/methods.mjs +94 -34
  38. package/methods.mjs.map +1 -1
  39. package/options.mjs.map +1 -1
  40. package/package.json +2 -2
  41. package/server.d.mts.map +1 -1
  42. package/server.d.ts.map +1 -1
  43. package/server.js +1 -1
  44. package/server.mjs +1 -1
  45. package/server.mjs.map +1 -1
  46. package/src/code-tool-worker.ts +16 -6
  47. package/src/local-docs-search.ts +844 -491
  48. package/src/methods.ts +94 -34
  49. package/src/server.ts +1 -1
  50. package/stdio.d.mts.map +1 -1
  51. package/stdio.d.ts.map +1 -1
  52. package/stdio.mjs.map +1 -1
  53. package/types.d.mts.map +1 -1
  54. package/types.d.ts.map +1 -1
@@ -63,19 +63,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
63
63
  markdown:
64
64
  "## get\n\n`client.health.get(): { data: object; }`\n\n**get** `/health`\n\nReturns the health status of the API and its dependencies\n\n### Returns\n\n- `{ data: { status: 'healthy' | 'degraded' | 'unhealthy'; timestamp: string; version: string; }; }`\n\n - `data: { status: 'healthy' | 'degraded' | 'unhealthy'; timestamp: string; version: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst health = await client.health.get();\n\nconsole.log(health);\n```",
65
65
  perLanguage: {
66
- http: {
66
+ typescript: {
67
+ method: 'client.health.get',
67
68
  example:
68
- 'curl https://api.roark.ai/health \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
69
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst health = await client.health.get();\n\nconsole.log(health.data);",
69
70
  },
70
71
  python: {
71
72
  method: 'health.get',
72
73
  example:
73
74
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nhealth = client.health.get()\nprint(health.data)',
74
75
  },
75
- typescript: {
76
- method: 'client.health.get',
76
+ http: {
77
77
  example:
78
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst health = await client.health.get();\n\nconsole.log(health.data);",
78
+ 'curl https://api.roark.ai/health \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
79
79
  },
80
80
  },
81
81
  },
@@ -97,23 +97,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
97
97
  "status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED';",
98
98
  ],
99
99
  response:
100
- "{ data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; startedAt: string; agents?: { id: string; endpoint?: object; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
100
+ "{ data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED'; startedAt: string; agents?: { id: string; endpoint?: object; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; externalId?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
101
101
  markdown:
102
- "## list\n\n`client.call.list(after?: string, limit?: number, searchText?: string, simulationRunPlanJobId?: string, sortBy?: 'createdAt' | 'startedAt' | 'endedAt' | 'duration' | 'title' | 'status', sortDirection?: 'asc' | 'desc', status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'): { data: object[]; pagination: object; }`\n\n**get** `/v1/call`\n\nReturns a paginated list of calls for the authenticated project.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - use the nextCursor value from a previous response\n\n- `limit?: number`\n Maximum number of calls to return (default: 20, max: 100)\n\n- `searchText?: string`\n Search text to filter calls by title, summary, or transcript\n\n- `simulationRunPlanJobId?: string`\n Filter by simulation run plan job ID to get all calls from a specific simulation batch\n\n- `sortBy?: 'createdAt' | 'startedAt' | 'endedAt' | 'duration' | 'title' | 'status'`\n Field to sort by (default: createdAt)\n\n- `sortDirection?: 'asc' | 'desc'`\n Sort direction (default: desc)\n\n- `status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'`\n Filter by call status\n\n### Returns\n\n- `{ data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; startedAt: string; agents?: { id: string; endpoint?: object; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n\n - `data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; startedAt: string; agents?: { id: string; endpoint?: { id: string; environment: string; phoneNumberE164?: string; }; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst calls = await client.call.list();\n\nconsole.log(calls);\n```",
102
+ "## list\n\n`client.call.list(after?: string, limit?: number, searchText?: string, simulationRunPlanJobId?: string, sortBy?: 'createdAt' | 'startedAt' | 'endedAt' | 'duration' | 'title' | 'status', sortDirection?: 'asc' | 'desc', status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'): { data: object[]; pagination: object; }`\n\n**get** `/v1/call`\n\nReturns a paginated list of calls for the authenticated project.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - use the nextCursor value from a previous response\n\n- `limit?: number`\n Maximum number of calls to return (default: 20, max: 100)\n\n- `searchText?: string`\n Search text to filter calls by title, summary, or transcript\n\n- `simulationRunPlanJobId?: string`\n Filter by simulation run plan job ID to get all calls from a specific simulation batch\n\n- `sortBy?: 'createdAt' | 'startedAt' | 'endedAt' | 'duration' | 'title' | 'status'`\n Field to sort by (default: createdAt)\n\n- `sortDirection?: 'asc' | 'desc'`\n Sort direction (default: desc)\n\n- `status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'`\n Filter by call status\n\n### Returns\n\n- `{ data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED'; startedAt: string; agents?: { id: string; endpoint?: object; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; externalId?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n\n - `data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED'; startedAt: string; agents?: { id: string; endpoint?: { id: string; environment: string; phoneNumberE164?: string; }; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; externalId?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst calls = await client.call.list();\n\nconsole.log(calls);\n```",
103
103
  perLanguage: {
104
- http: {
104
+ typescript: {
105
+ method: 'client.call.list',
105
106
  example:
106
- 'curl https://api.roark.ai/v1/call \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
107
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst calls = await client.call.list();\n\nconsole.log(calls.data);",
107
108
  },
108
109
  python: {
109
110
  method: 'call.list',
110
111
  example:
111
112
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\ncalls = client.call.list()\nprint(calls.data)',
112
113
  },
113
- typescript: {
114
- method: 'client.call.list',
114
+ http: {
115
115
  example:
116
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst calls = await client.call.list();\n\nconsole.log(calls.data);",
116
+ 'curl https://api.roark.ai/v1/call \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
117
117
  },
118
118
  },
119
119
  },
@@ -135,29 +135,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
135
135
  'customer?: { phoneNumberE164: string; label?: string; };',
136
136
  'customers?: { phoneNumberE164: string; label?: string; }[];',
137
137
  'endedStatus?: string;',
138
+ 'externalId?: string;',
139
+ 'livekitRoomId?: string;',
138
140
  'properties?: object;',
139
141
  'stereoRecordingUrl?: string;',
140
142
  'toolInvocations?: { name: string; parameters: object; result: string | object; startOffsetMs: number; agent?: { customId?: string; roarkId?: string; }; description?: string; endOffsetMs?: number; }[];',
141
- "transcript?: { endOffsetMs: number; role: 'AGENT'; startOffsetMs: number; text: string; agent?: { customId?: string; roarkId?: string; }; languageCode?: string; } | { endOffsetMs: number; role: 'CUSTOMER'; startOffsetMs: number; text: string; customer?: { label?: string; phoneNumberE164?: string; }; languageCode?: string; }[];",
143
+ "transcript?: { endOffsetMs: number; role: 'AGENT'; startOffsetMs: number; text: string; agent?: { customId?: string; roarkId?: string; }; languageCode?: string; payload?: object; } | { endOffsetMs: number; role: 'CUSTOMER'; startOffsetMs: number; text: string; customer?: { label?: string; phoneNumberE164?: string; }; languageCode?: string; payload?: object; }[];",
144
+ 'vapiCallId?: string;',
142
145
  ],
143
146
  response:
144
- "{ data: { id: string; agents: { id: string; endpoint?: object; }[]; callDirection: 'INBOUND' | 'OUTBOUND'; createdAt: string; customers: { label?: string; phoneNumberE164?: string; }[]; projectId: string; startedAt: string; status: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; }; }",
147
+ "{ data: { id: string; agents: { id: string; endpoint?: object; }[]; callDirection: 'INBOUND' | 'OUTBOUND'; createdAt: string; customers: { label?: string; phoneNumberE164?: string; }[]; externalId: string; projectId: string; startedAt: string; status: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; }; }",
145
148
  markdown:
146
- "## create\n\n`client.call.create(callDirection: 'INBOUND' | 'OUTBOUND', interfaceType: 'PHONE' | 'WEB', recordingUrl: string, startedAt: string, agent?: { roarkId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { name: string; customId?: string; description?: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { customId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; }, agents?: { roarkId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { name: string; customId?: string; description?: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { customId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; }[], customer?: { phoneNumberE164: string; label?: string; }, customers?: { phoneNumberE164: string; label?: string; }[], endedStatus?: string, properties?: object, stereoRecordingUrl?: string, toolInvocations?: { name: string; parameters: object; result: string | object; startOffsetMs: number; agent?: { customId?: string; roarkId?: string; }; description?: string; endOffsetMs?: number; }[], transcript?: { endOffsetMs: number; role: 'AGENT'; startOffsetMs: number; text: string; agent?: { customId?: string; roarkId?: string; }; languageCode?: string; } | { endOffsetMs: number; role: 'CUSTOMER'; startOffsetMs: number; text: string; customer?: { label?: string; phoneNumberE164?: string; }; languageCode?: string; }[]): { data: object; }`\n\n**post** `/v1/call`\n\nCreate a new call with recording, transcript, agents, and customers\n\n### Parameters\n\n- `callDirection: 'INBOUND' | 'OUTBOUND'`\n Direction of the call (INBOUND or OUTBOUND)\n\n- `interfaceType: 'PHONE' | 'WEB'`\n Interface type of the call (PHONE or WEB)\n\n- `recordingUrl: string`\n URL of source recording (must be an accessible WAV, MP3, MP4, or OGG file). Can be a signed URL.\n\n- `startedAt: string`\n When the call started (ISO 8601 format)\n\n- `agent?: { roarkId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { name: string; customId?: string; description?: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { customId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; }`\n Single agent participating in the call. Use this for simpler API when you have only one agent.\n\n- `agents?: { roarkId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { name: string; customId?: string; description?: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { customId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; }[]`\n Agents participating in the call. Each agent requires identification and prompt information.\n\n- `customer?: { phoneNumberE164: string; label?: string; }`\n Single customer participating in the call. Use this for simpler API when you have only one customer.\n - `phoneNumberE164: string`\n Customer phone number in E.164 format (e.g., +14155551234)\n - `label?: string`\n Label to identify this customer in the transcript (e.g., \"speaker-01\", \"speaker-02\")\n\n- `customers?: { phoneNumberE164: string; label?: string; }[]`\n Customers participating in the call.\n\n- `endedStatus?: string`\n High-level call end status, indicating how the call terminated\n\n- `properties?: object`\n Custom properties to include with the call. These can be used for filtering and will show in the call details page\n\n- `stereoRecordingUrl?: string`\n URL of source stereo recording. Must be accessible. Can be a signed URL. Supported formats: WAV, MP3, MP4, OGG.\n\n- `toolInvocations?: { name: string; parameters: object; result: string | object; startOffsetMs: number; agent?: { customId?: string; roarkId?: string; }; description?: string; endOffsetMs?: number; }[]`\n List of tool invocations made during the call\n\n- `transcript?: { endOffsetMs: number; role: 'AGENT'; startOffsetMs: number; text: string; agent?: { customId?: string; roarkId?: string; }; languageCode?: string; } | { endOffsetMs: number; role: 'CUSTOMER'; startOffsetMs: number; text: string; customer?: { label?: string; phoneNumberE164?: string; }; languageCode?: string; }[]`\n List of transcript entries made during the call\n\n### Returns\n\n- `{ data: { id: string; agents: { id: string; endpoint?: object; }[]; callDirection: 'INBOUND' | 'OUTBOUND'; createdAt: string; customers: { label?: string; phoneNumberE164?: string; }[]; projectId: string; startedAt: string; status: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; }; }`\n\n - `data: { id: string; agents: { id: string; endpoint?: { id: string; environment: string; phoneNumberE164?: string; }; }[]; callDirection: 'INBOUND' | 'OUTBOUND'; createdAt: string; customers: { label?: string; phoneNumberE164?: string; }[]; projectId: string; startedAt: string; status: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst call = await client.call.create({\n callDirection: 'INBOUND',\n interfaceType: 'PHONE',\n recordingUrl: 'https://example.com',\n startedAt: 'startedAt',\n});\n\nconsole.log(call);\n```",
149
+ "## create\n\n`client.call.create(callDirection: 'INBOUND' | 'OUTBOUND', interfaceType: 'PHONE' | 'WEB', recordingUrl: string, startedAt: string, agent?: { roarkId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { name: string; customId?: string; description?: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { customId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; }, agents?: { roarkId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { name: string; customId?: string; description?: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { customId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; }[], customer?: { phoneNumberE164: string; label?: string; }, customers?: { phoneNumberE164: string; label?: string; }[], endedStatus?: string, externalId?: string, livekitRoomId?: string, properties?: object, stereoRecordingUrl?: string, toolInvocations?: { name: string; parameters: object; result: string | object; startOffsetMs: number; agent?: { customId?: string; roarkId?: string; }; description?: string; endOffsetMs?: number; }[], transcript?: { endOffsetMs: number; role: 'AGENT'; startOffsetMs: number; text: string; agent?: { customId?: string; roarkId?: string; }; languageCode?: string; payload?: object; } | { endOffsetMs: number; role: 'CUSTOMER'; startOffsetMs: number; text: string; customer?: { label?: string; phoneNumberE164?: string; }; languageCode?: string; payload?: object; }[], vapiCallId?: string): { data: object; }`\n\n**post** `/v1/call`\n\nCreate a new call with recording, transcript, agents, and customers\n\n### Parameters\n\n- `callDirection: 'INBOUND' | 'OUTBOUND'`\n Direction of the call (INBOUND or OUTBOUND)\n\n- `interfaceType: 'PHONE' | 'WEB'`\n Interface type of the call (PHONE or WEB)\n\n- `recordingUrl: string`\n URL of source recording (must be an accessible WAV, MP3, MP4, or OGG file). Can be a signed URL.\n\n- `startedAt: string`\n When the call started (ISO 8601 format)\n\n- `agent?: { roarkId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { name: string; customId?: string; description?: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { customId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; }`\n Single agent participating in the call. Use this for simpler API when you have only one agent.\n\n- `agents?: { roarkId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { name: string; customId?: string; description?: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; } | { customId: string; endpoint?: { id: string; } | { type: string; value: string; direction?: string; }; prompt?: { resolvedPrompt: string; }; }[]`\n Agents participating in the call. Each agent requires identification and prompt information.\n\n- `customer?: { phoneNumberE164: string; label?: string; }`\n Single customer participating in the call. Use this for simpler API when you have only one customer.\n - `phoneNumberE164: string`\n Customer phone number in E.164 format (e.g., +14155551234)\n - `label?: string`\n Label to identify this customer in the transcript (e.g., \"speaker-01\", \"speaker-02\")\n\n- `customers?: { phoneNumberE164: string; label?: string; }[]`\n Customers participating in the call.\n\n- `endedStatus?: string`\n High-level call end status, indicating how the call terminated\n\n- `externalId?: string`\n A stable identifier from your own system (e.g. session ID, conversation ID) used to correlate this call with OpenTelemetry traces. Set the same value as a `roark.external_id` span or resource attribute on your traces and the matching trace will be linked automatically. Must be unique within a project.\n\n- `livekitRoomId?: string`\n The LiveKit Cloud room ID to link this call with OpenTelemetry trace data from LiveKit. Used for matching calls with OTEL traces.\n\n- `properties?: object`\n Custom properties to include with the call. These can be used for filtering and will show in the call details page\n\n- `stereoRecordingUrl?: string`\n URL of source stereo recording. Must be accessible. Can be a signed URL. Supported formats: WAV, MP3, MP4, OGG.\n\n- `toolInvocations?: { name: string; parameters: object; result: string | object; startOffsetMs: number; agent?: { customId?: string; roarkId?: string; }; description?: string; endOffsetMs?: number; }[]`\n List of tool invocations made during the call\n\n- `transcript?: { endOffsetMs: number; role: 'AGENT'; startOffsetMs: number; text: string; agent?: { customId?: string; roarkId?: string; }; languageCode?: string; payload?: object; } | { endOffsetMs: number; role: 'CUSTOMER'; startOffsetMs: number; text: string; customer?: { label?: string; phoneNumberE164?: string; }; languageCode?: string; payload?: object; }[]`\n List of transcript entries made during the call\n\n- `vapiCallId?: string`\n The Vapi call ID (UUID) to link this call with OpenTelemetry trace data from Vapi. Used for matching calls with OTEL traces.\n\n### Returns\n\n- `{ data: { id: string; agents: { id: string; endpoint?: object; }[]; callDirection: 'INBOUND' | 'OUTBOUND'; createdAt: string; customers: { label?: string; phoneNumberE164?: string; }[]; externalId: string; projectId: string; startedAt: string; status: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; }; }`\n\n - `data: { id: string; agents: { id: string; endpoint?: { id: string; environment: string; phoneNumberE164?: string; }; }[]; callDirection: 'INBOUND' | 'OUTBOUND'; createdAt: string; customers: { label?: string; phoneNumberE164?: string; }[]; externalId: string; projectId: string; startedAt: string; status: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst call = await client.call.create({\n callDirection: 'INBOUND',\n interfaceType: 'PHONE',\n recordingUrl: 'https://example.com',\n startedAt: 'startedAt',\n});\n\nconsole.log(call);\n```",
147
150
  perLanguage: {
148
- http: {
151
+ typescript: {
152
+ method: 'client.call.create',
149
153
  example:
150
- 'curl https://api.roark.ai/v1/call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "callDirection": "INBOUND",\n "interfaceType": "PHONE",\n "recordingUrl": "https://example.com",\n "startedAt": "startedAt"\n }\'',
154
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst call = await client.call.create({\n callDirection: 'INBOUND',\n interfaceType: 'PHONE',\n recordingUrl: 'https://example.com',\n startedAt: 'startedAt',\n});\n\nconsole.log(call.data);",
151
155
  },
152
156
  python: {
153
157
  method: 'call.create',
154
158
  example:
155
159
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\ncall = client.call.create(\n call_direction="INBOUND",\n interface_type="PHONE",\n recording_url="https://example.com",\n started_at="startedAt",\n)\nprint(call.data)',
156
160
  },
157
- typescript: {
158
- method: 'client.call.create',
161
+ http: {
159
162
  example:
160
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst call = await client.call.create({\n callDirection: 'INBOUND',\n interfaceType: 'PHONE',\n recordingUrl: 'https://example.com',\n startedAt: 'startedAt',\n});\n\nconsole.log(call.data);",
163
+ 'curl https://api.roark.ai/v1/call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "callDirection": "INBOUND",\n "interfaceType": "PHONE",\n "recordingUrl": "https://example.com",\n "startedAt": "startedAt"\n }\'',
161
164
  },
162
165
  },
163
166
  },
@@ -171,23 +174,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
171
174
  qualified: 'client.call.getByID',
172
175
  params: ['callId: string;'],
173
176
  response:
174
- "{ data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; startedAt: string; agents?: { id: string; endpoint?: object; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }; }",
177
+ "{ data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED'; startedAt: string; agents?: { id: string; endpoint?: object; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; externalId?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }; }",
175
178
  markdown:
176
- "## getById\n\n`client.call.getByID(callId: string): { data: object; }`\n\n**get** `/v1/call/{callId}`\n\nRetrieve an existing call by its unique identifier\n\n### Parameters\n\n- `callId: string`\n\n### Returns\n\n- `{ data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; startedAt: string; agents?: { id: string; endpoint?: object; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }; }`\n\n - `data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; startedAt: string; agents?: { id: string; endpoint?: { id: string; environment: string; phoneNumberE164?: string; }; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.call.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
179
+ "## getById\n\n`client.call.getByID(callId: string): { data: object; }`\n\n**get** `/v1/call/{callId}`\n\nRetrieve an existing call by its unique identifier\n\n### Parameters\n\n- `callId: string`\n\n### Returns\n\n- `{ data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED'; startedAt: string; agents?: { id: string; endpoint?: object; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; externalId?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }; }`\n\n - `data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED'; startedAt: string; agents?: { id: string; endpoint?: { id: string; environment: string; phoneNumberE164?: string; }; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; externalId?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.call.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
177
180
  perLanguage: {
178
- http: {
181
+ typescript: {
182
+ method: 'client.call.getByID',
179
183
  example:
180
- 'curl https://api.roark.ai/v1/call/$CALL_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
184
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.call.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);",
181
185
  },
182
186
  python: {
183
187
  method: 'call.get_by_id',
184
188
  example:
185
189
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.call.get_by_id(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
186
190
  },
187
- typescript: {
188
- method: 'client.call.getByID',
191
+ http: {
189
192
  example:
190
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.call.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);",
193
+ 'curl https://api.roark.ai/v1/call/$CALL_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
191
194
  },
192
195
  },
193
196
  },
@@ -206,49 +209,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
206
209
  markdown:
207
210
  "## listSentimentRuns\n\n`client.call.listSentimentRuns(callId: string): { data: object; }`\n\n**get** `/v1/call/{callId}/sentiment-run`\n\nFetch detailed sentiment analysis results for a specific call, including emotional tone, key phrases, and sentiment scores.\n\n### Parameters\n\n- `callId: string`\n ID of the call to fetch sentiment run for\n\n### Returns\n\n- `{ data: { status: string; averageCategoricalSentiment?: string; averageSentiment?: number; commonEmotion?: string; }; }`\n\n - `data: { status: string; averageCategoricalSentiment?: string; averageSentiment?: number; commonEmotion?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.call.listSentimentRuns('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
208
211
  perLanguage: {
209
- http: {
210
- example:
211
- 'curl https://api.roark.ai/v1/call/$CALL_ID/sentiment-run \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
212
- },
213
- python: {
214
- method: 'call.list_sentiment_runs',
215
- example:
216
- 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.call.list_sentiment_runs(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
217
- },
218
212
  typescript: {
219
213
  method: 'client.call.listSentimentRuns',
220
214
  example:
221
215
  "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.call.listSentimentRuns('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);",
222
216
  },
223
- },
224
- },
225
- {
226
- name: 'listEvaluationRuns',
227
- endpoint: '/v1/call/{callId}/evaluation-run',
228
- httpMethod: 'get',
229
- summary: 'List call evaluation runs',
230
- description: 'Fetch all evaluation run results for a specific call.',
231
- stainlessPath: '(resource) call > (method) listEvaluationRuns',
232
- qualified: 'client.call.listEvaluationRuns',
233
- params: ['callId: string;'],
234
- response:
235
- "{ data: { blockRuns: { blockDefinitionId: string; blockName: string; blockRunId: string; createdAt: string; reason: string; result: 'PASSED' | 'FAILED' | 'SKIPPED'; score: number; status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED'; }[]; evaluator: { id: string; name: string; weight?: number; }; evidence: { commentText: string; createdAt: string; isPositive: boolean; snippetText: string; }[]; metrics: { booleanValue: boolean; confidence: number; createdAt: string; name: string; numericValue: number; reasoning: string; role: string; textValue: string; valueType: string; }[]; status: 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED'; id?: string; completedAt?: string; result?: 'SUCCESS' | 'FAILURE' | 'SKIPPED'; score?: number; startedAt?: string; summary?: string; }[]; }",
236
- markdown:
237
- "## listEvaluationRuns\n\n`client.call.listEvaluationRuns(callId: string): { data: object[]; }`\n\n**get** `/v1/call/{callId}/evaluation-run`\n\nFetch all evaluation run results for a specific call.\n\n### Parameters\n\n- `callId: string`\n ID of the call to fetch evaluation run for\n\n### Returns\n\n- `{ data: { blockRuns: { blockDefinitionId: string; blockName: string; blockRunId: string; createdAt: string; reason: string; result: 'PASSED' | 'FAILED' | 'SKIPPED'; score: number; status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED'; }[]; evaluator: { id: string; name: string; weight?: number; }; evidence: { commentText: string; createdAt: string; isPositive: boolean; snippetText: string; }[]; metrics: { booleanValue: boolean; confidence: number; createdAt: string; name: string; numericValue: number; reasoning: string; role: string; textValue: string; valueType: string; }[]; status: 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED'; id?: string; completedAt?: string; result?: 'SUCCESS' | 'FAILURE' | 'SKIPPED'; score?: number; startedAt?: string; summary?: string; }[]; }`\n\n - `data: { blockRuns: { blockDefinitionId: string; blockName: string; blockRunId: string; createdAt: string; reason: string; result: 'PASSED' | 'FAILED' | 'SKIPPED'; score: number; status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED'; }[]; evaluator: { id: string; name: string; weight?: number; }; evidence: { commentText: string; createdAt: string; isPositive: boolean; snippetText: string; }[]; metrics: { booleanValue: boolean; confidence: number; createdAt: string; name: string; numericValue: number; reasoning: string; role: string; textValue: string; valueType: string; }[]; status: 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED'; id?: string; completedAt?: string; result?: 'SUCCESS' | 'FAILURE' | 'SKIPPED'; score?: number; startedAt?: string; summary?: string; }[]`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.call.listEvaluationRuns('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
238
- perLanguage: {
239
- http: {
240
- example:
241
- 'curl https://api.roark.ai/v1/call/$CALL_ID/evaluation-run \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
242
- },
243
217
  python: {
244
- method: 'call.list_evaluation_runs',
218
+ method: 'call.list_sentiment_runs',
245
219
  example:
246
- 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.call.list_evaluation_runs(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
220
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.call.list_sentiment_runs(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
247
221
  },
248
- typescript: {
249
- method: 'client.call.listEvaluationRuns',
222
+ http: {
250
223
  example:
251
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.call.listEvaluationRuns('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);",
224
+ 'curl https://api.roark.ai/v1/call/$CALL_ID/sentiment-run \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
252
225
  },
253
226
  },
254
227
  },
@@ -258,28 +231,28 @@ const EMBEDDED_METHODS: MethodEntry[] = [
258
231
  httpMethod: 'get',
259
232
  summary: 'List call metrics',
260
233
  description:
261
- 'Fetch all call-level metrics for a specific call, including both system-generated and custom metrics. Only returns successfully computed metrics.',
234
+ 'Fetch all call-level metrics for a specific call, including both system-generated and custom metrics. Only returns rows from the **latest** metric-collection job per metric — if the same metric has been recomputed, prior runs are excluded and remain in the metric history. By default returns only successfully computed metrics; pass `?status=all` to also include rows that resolved as NOT_APPLICABLE / DATA_MISSING / ERROR (the `value` field is omitted on those entries — check `captureStatus`).',
262
235
  stainlessPath: '(resource) call > (method) listMetrics',
263
236
  qualified: 'client.call.listMetrics',
264
- params: ['callId: string;', 'flatten?: string;'],
237
+ params: ['callId: string;', 'flatten?: string;', "status?: 'success' | 'all';"],
265
238
  response:
266
- "{ data: { description: string; metricDefinitionId: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; values: { computedAt: string; confidence: number; context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE'; value: number | boolean | string; fromSegment?: object; participantRole?: 'agent' | 'customer'; policyIds?: string[]; segment?: object; toSegment?: object; valueReasoning?: string; }[]; unit?: { name: string; symbol: string; }; }[]; }",
239
+ "{ data: { description: string; metricDefinitionId: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; values: { captureStatus: 'SUCCESS' | 'NOT_APPLICABLE' | 'DATA_MISSING' | 'ERROR'; computedAt: string; context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE'; callId?: string; chatId?: string; confidence?: number; errorMessage?: string; fromSegment?: object; participantRole?: 'agent' | 'customer'; policyIds?: string[]; segment?: object; toSegment?: object; value?: number | boolean | string; valueReasoning?: string; } | { captureStatus: 'SUCCESS' | 'NOT_APPLICABLE' | 'DATA_MISSING' | 'ERROR'; computedAt: string; context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE'; callId?: string; chatId?: string; confidence?: number; errorMessage?: string; fromSegment?: object; participantRole?: 'agent' | 'customer'; policyIds?: string[]; propertyVerdicts?: object[]; segment?: object; toSegment?: object; value?: number | boolean | string; valueReasoning?: string; }[]; unit?: { name: string; symbol: string; }; }[]; }",
267
240
  markdown:
268
- "## listMetrics\n\n`client.call.listMetrics(callId: string, flatten?: string): { data: object[]; }`\n\n**get** `/v1/call/{callId}/metrics`\n\nFetch all call-level metrics for a specific call, including both system-generated and custom metrics. Only returns successfully computed metrics.\n\n### Parameters\n\n- `callId: string`\n\n- `flatten?: string`\n Whether to return a flat list instead of grouped by metric definition (default: false)\n\n### Returns\n\n- `{ data: { description: string; metricDefinitionId: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; values: { computedAt: string; confidence: number; context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE'; value: number | boolean | string; fromSegment?: object; participantRole?: 'agent' | 'customer'; policyIds?: string[]; segment?: object; toSegment?: object; valueReasoning?: string; }[]; unit?: { name: string; symbol: string; }; }[]; }`\n\n - `data: { description: string; metricDefinitionId: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; values: { computedAt: string; confidence: number; context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE'; value: number | boolean | string; fromSegment?: { id: string; endOffsetMs: number; startOffsetMs: number; text: string; }; participantRole?: 'agent' | 'customer'; policyIds?: string[]; segment?: { id: string; endOffsetMs: number; startOffsetMs: number; text: string; }; toSegment?: { id: string; endOffsetMs: number; startOffsetMs: number; text: string; }; valueReasoning?: string; }[]; unit?: { name: string; symbol: string; }; }[]`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.call.listMetrics('callId');\n\nconsole.log(response);\n```",
241
+ "## listMetrics\n\n`client.call.listMetrics(callId: string, flatten?: string, status?: 'success' | 'all'): { data: object[]; }`\n\n**get** `/v1/call/{callId}/metrics`\n\nFetch all call-level metrics for a specific call, including both system-generated and custom metrics. Only returns rows from the **latest** metric-collection job per metric — if the same metric has been recomputed, prior runs are excluded and remain in the metric history. By default returns only successfully computed metrics; pass `?status=all` to also include rows that resolved as NOT_APPLICABLE / DATA_MISSING / ERROR (the `value` field is omitted on those entries — check `captureStatus`).\n\n### Parameters\n\n- `callId: string`\n\n- `flatten?: string`\n Whether to return a flat list instead of grouped by metric definition (default: false)\n\n- `status?: 'success' | 'all'`\n Filter metrics by capture status. `success` (default) returns only successfully computed metrics — backwards-compatible with the historical behavior. `all` also returns NOT_APPLICABLE / DATA_MISSING / ERROR rows (with `value` omitted), so clients can distinguish \"still computing\" from \"computed but no value\" and exit retry loops correctly.\n\n### Returns\n\n- `{ data: { description: string; metricDefinitionId: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; values: { captureStatus: 'SUCCESS' | 'NOT_APPLICABLE' | 'DATA_MISSING' | 'ERROR'; computedAt: string; context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE'; callId?: string; chatId?: string; confidence?: number; errorMessage?: string; fromSegment?: object; participantRole?: 'agent' | 'customer'; policyIds?: string[]; segment?: object; toSegment?: object; value?: number | boolean | string; valueReasoning?: string; } | { captureStatus: 'SUCCESS' | 'NOT_APPLICABLE' | 'DATA_MISSING' | 'ERROR'; computedAt: string; context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE'; callId?: string; chatId?: string; confidence?: number; errorMessage?: string; fromSegment?: object; participantRole?: 'agent' | 'customer'; policyIds?: string[]; propertyVerdicts?: object[]; segment?: object; toSegment?: object; value?: number | boolean | string; valueReasoning?: string; }[]; unit?: { name: string; symbol: string; }; }[]; }`\n\n - `data: { description: string; metricDefinitionId: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; values: { captureStatus: 'SUCCESS' | 'NOT_APPLICABLE' | 'DATA_MISSING' | 'ERROR'; computedAt: string; context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE'; callId?: string; chatId?: string; confidence?: number; errorMessage?: string; fromSegment?: { id: string; endOffsetMs: number; startOffsetMs: number; text: string; }; participantRole?: 'agent' | 'customer'; policyIds?: string[]; segment?: { id: string; endOffsetMs: number; startOffsetMs: number; text: string; }; toSegment?: { id: string; endOffsetMs: number; startOffsetMs: number; text: string; }; value?: number | boolean | string; valueReasoning?: string; } | { captureStatus: 'SUCCESS' | 'NOT_APPLICABLE' | 'DATA_MISSING' | 'ERROR'; computedAt: string; context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE'; callId?: string; chatId?: string; confidence?: number; errorMessage?: string; fromSegment?: { id: string; endOffsetMs: number; startOffsetMs: number; text: string; }; participantRole?: 'agent' | 'customer'; policyIds?: string[]; propertyVerdicts?: { expectedValue: string; propertyName: string; verdict: 'MATCH' | 'MISMATCH' | 'NOT_MENTIONED'; observedValue?: string; reasoning?: string; segment?: { id: string; endOffsetMs: number; startOffsetMs: number; text: string; }; }[]; segment?: { id: string; endOffsetMs: number; startOffsetMs: number; text: string; }; toSegment?: { id: string; endOffsetMs: number; startOffsetMs: number; text: string; }; value?: number | boolean | string; valueReasoning?: string; }[]; unit?: { name: string; symbol: string; }; }[]`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.call.listMetrics('callId');\n\nconsole.log(response);\n```",
269
242
  perLanguage: {
270
- http: {
243
+ typescript: {
244
+ method: 'client.call.listMetrics',
271
245
  example:
272
- 'curl https://api.roark.ai/v1/call/$CALL_ID/metrics \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
246
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.call.listMetrics('callId');\n\nconsole.log(response.data);",
273
247
  },
274
248
  python: {
275
249
  method: 'call.list_metrics',
276
250
  example:
277
251
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.call.list_metrics(\n call_id="callId",\n)\nprint(response.data)',
278
252
  },
279
- typescript: {
280
- method: 'client.call.listMetrics',
253
+ http: {
281
254
  example:
282
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.call.listMetrics('callId');\n\nconsole.log(response.data);",
255
+ 'curl https://api.roark.ai/v1/call/$CALL_ID/metrics \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
283
256
  },
284
257
  },
285
258
  },
@@ -301,19 +274,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
301
274
  markdown:
302
275
  "## getTranscript\n\n`client.call.getTranscript(callId: string, source?: 'ROARK_POST_CALL' | 'SIMULATION_AGENT_REALTIME' | 'CUSTOMER_AGENT_REALTIME'): { data: object; }`\n\n**get** `/v1/call/{callId}/transcript`\n\nFetch the full transcript for a specific call. Optionally specify a transcription source; otherwise the best available source is used automatically.\n\n### Parameters\n\n- `callId: string`\n\n- `source?: 'ROARK_POST_CALL' | 'SIMULATION_AGENT_REALTIME' | 'CUSTOMER_AGENT_REALTIME'`\n Transcription source to fetch. When omitted, uses the preferred source based on availability: CUSTOMER_AGENT_REALTIME > SIMULATION_AGENT_REALTIME > ROARK_POST_CALL\n\n### Returns\n\n- `{ data: { entries: { endOffsetMs: number; participantId: string; role: 'AGENT' | 'CUSTOMER'; startOffsetMs: number; text: string; }[]; participants: { id: string; agentId: string; type: 'AGENT'; } | { id: string; customerId: string; type: 'CUSTOMER'; } | { id: string; customerId: string; type: 'SIMULATED_CUSTOMER'; } | { id: string; type: 'BACKGROUND_SPEAKER'; }[]; transcriptionSource: 'ROARK_POST_CALL' | 'SIMULATION_AGENT_REALTIME' | 'CUSTOMER_AGENT_REALTIME'; }; }`\n\n - `data: { entries: { endOffsetMs: number; participantId: string; role: 'AGENT' | 'CUSTOMER'; startOffsetMs: number; text: string; }[]; participants: { id: string; agentId: string; type: 'AGENT'; } | { id: string; customerId: string; type: 'CUSTOMER'; } | { id: string; customerId: string; type: 'SIMULATED_CUSTOMER'; } | { id: string; type: 'BACKGROUND_SPEAKER'; }[]; transcriptionSource: 'ROARK_POST_CALL' | 'SIMULATION_AGENT_REALTIME' | 'CUSTOMER_AGENT_REALTIME'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.call.getTranscript('callId');\n\nconsole.log(response);\n```",
303
276
  perLanguage: {
304
- http: {
277
+ typescript: {
278
+ method: 'client.call.getTranscript',
305
279
  example:
306
- 'curl https://api.roark.ai/v1/call/$CALL_ID/transcript \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
280
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.call.getTranscript('callId');\n\nconsole.log(response.data);",
307
281
  },
308
282
  python: {
309
283
  method: 'call.get_transcript',
310
284
  example:
311
285
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.call.get_transcript(\n call_id="callId",\n)\nprint(response.data)',
312
286
  },
313
- typescript: {
314
- method: 'client.call.getTranscript',
287
+ http: {
315
288
  example:
316
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.call.getTranscript('callId');\n\nconsole.log(response.data);",
289
+ 'curl https://api.roark.ai/v1/call/$CALL_ID/transcript \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
317
290
  },
318
291
  },
319
292
  },
@@ -326,24 +299,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
326
299
  'Fetch all metric definitions available in the project, including both system-generated and custom metrics.',
327
300
  stainlessPath: '(resource) metric > (method) listDefinitions',
328
301
  qualified: 'client.metric.listDefinitions',
329
- response:
330
- "{ data: { id: string; description: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; unit?: { name: string; symbol: string; }; }[]; }",
302
+ response: '{ data: object | object | object | object | object[]; }',
331
303
  markdown:
332
- "## listDefinitions\n\n`client.metric.listDefinitions(): { data: object[]; }`\n\n**get** `/v1/metric/definitions`\n\nFetch all metric definitions available in the project, including both system-generated and custom metrics.\n\n### Returns\n\n- `{ data: { id: string; description: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; unit?: { name: string; symbol: string; }; }[]; }`\n\n - `data: { id: string; description: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; unit?: { name: string; symbol: string; }; }[]`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.metric.listDefinitions();\n\nconsole.log(response);\n```",
304
+ "## listDefinitions\n\n`client.metric.listDefinitions(): { data: object | object | object | object | object[]; }`\n\n**get** `/v1/metric/definitions`\n\nFetch all metric definitions available in the project, including both system-generated and custom metrics.\n\n### Returns\n\n- `{ data: { id: string; calculationType: 'LLM_JUDGE'; description: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PROVIDER'; description: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: 'EACH' | 'COUNT' | 'AVERAGE' | 'MIN' | 'MAX' | 'MEDIAN' | 'P95' | 'P99' | 'SUM'; countThreshold: number; operator: string; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; formula: { expression: string; sources: object[]; }; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: object; triggerCombinator: 'AND' | 'OR'; triggers: object[]; windowMode: string; }; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }[]; }`\n\n - `data: { id: string; calculationType: 'LLM_JUDGE'; description: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PROVIDER'; description: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: 'EACH' | 'COUNT' | 'AVERAGE' | 'MIN' | 'MAX' | 'MEDIAN' | 'P95' | 'P99' | 'SUM'; countThreshold: number; operator: string; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; formula: { expression: string; sources: { sourceMetricDefinitionId: string; sourceVariantId: string; }[]; }; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: { operator: string; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; windowAfter: number; windowBefore: number; }; triggerCombinator: 'AND' | 'OR'; triggers: { operator: string; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }[]; windowMode: string; }; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }[]`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.metric.listDefinitions();\n\nconsole.log(response);\n```",
333
305
  perLanguage: {
334
- http: {
306
+ typescript: {
307
+ method: 'client.metric.listDefinitions',
335
308
  example:
336
- 'curl https://api.roark.ai/v1/metric/definitions \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
309
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.metric.listDefinitions();\n\nconsole.log(response.data);",
337
310
  },
338
311
  python: {
339
312
  method: 'metric.list_definitions',
340
313
  example:
341
314
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.metric.list_definitions()\nprint(response.data)',
342
315
  },
343
- typescript: {
344
- method: 'client.metric.listDefinitions',
316
+ http: {
345
317
  example:
346
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.metric.listDefinitions();\n\nconsole.log(response.data);",
318
+ 'curl https://api.roark.ai/v1/metric/definitions \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
347
319
  },
348
320
  },
349
321
  },
@@ -351,46 +323,30 @@ const EMBEDDED_METHODS: MethodEntry[] = [
351
323
  name: 'createDefinition',
352
324
  endpoint: '/v1/metric/definitions',
353
325
  httpMethod: 'post',
354
- summary: 'Create a metric definition',
326
+ summary: 'Create custom metric definition',
355
327
  description:
356
- 'Create a new custom metric definition. The metric will be added to the specified analysis package and can be used for evaluating calls.',
328
+ 'Create a new metric definition. The `calculationType` field selects the variant: LLM_JUDGE (LLM-evaluated), FORMULA (computed from a math expression over other metrics), or PATTERN (detects a trigger→outcome pattern within a window). To create a threshold on top of an existing metric, use `POST /metric/definitions/{idOrSlug}/thresholds` instead.',
357
329
  stainlessPath: '(resource) metric > (method) createDefinition',
358
330
  qualified: 'client.metric.createDefinition',
359
331
  params: [
360
- 'analysisPackageId: string;',
361
- 'name: string;',
362
- "outputType: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';",
363
- 'booleanFalseLabel?: string;',
364
- 'booleanTrueLabel?: string;',
365
- 'classificationOptions?: { description: string; displayOrder: number; label: string; }[];',
366
- 'llmPrompt?: string;',
367
- 'maxClassifications?: number;',
368
- 'metricId?: string;',
369
- "participantRole?: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';",
370
- 'scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[];',
371
- 'scaleMax?: number;',
372
- 'scaleMin?: number;',
373
- "scope?: 'GLOBAL' | 'PER_PARTICIPANT';",
374
- "supportedContexts?: 'CALL' | 'SEGMENT' | 'TURN'[];",
332
+ "{ analysisPackageId: string; calculationType: 'LLM_JUDGE'; name: string; outputType: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; booleanFalseLabel?: string; booleanTrueLabel?: string; classificationOptions?: { description: string; displayOrder: number; label: string; }[]; llmPrompt?: string; maxClassifications?: number; metricId?: string; participantRole?: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; slug?: string; supportedContexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; } | { analysisPackageId: string; calculationType: 'FORMULA'; formula: string; name: string; outputType: 'NUMERIC' | 'BOOLEAN'; sources: { sourceMetricDefinitionId: string; sourceVariantId?: string; }[]; metricId?: string; slug?: string; } | { analysisPackageId: string; calculationType: 'PATTERN'; name: string; operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: { operator: string; sourceMetricDefinitionId: string; thresholdValue: string; windowAfter: number; sourceParticipantRole?: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId?: string; windowBefore?: number; }; metricId?: string; slug?: string; trigger?: { operator: string; sourceMetricDefinitionId: string; thresholdValue: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId?: string; }; triggerCombinator?: 'AND' | 'OR'; triggers?: { operator: string; sourceMetricDefinitionId: string; thresholdValue: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId?: string; }[]; windowMode?: 'seconds' | 'segments'; };",
375
333
  ],
376
334
  response:
377
- "{ data: { id: string; description: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; unit?: { name: string; symbol: string; }; }; }",
378
- markdown:
379
- "## createDefinition\n\n`client.metric.createDefinition(analysisPackageId: string, name: string, outputType: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET', booleanFalseLabel?: string, booleanTrueLabel?: string, classificationOptions?: { description: string; displayOrder: number; label: string; }[], llmPrompt?: string, maxClassifications?: number, metricId?: string, participantRole?: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER', scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[], scaleMax?: number, scaleMin?: number, scope?: 'GLOBAL' | 'PER_PARTICIPANT', supportedContexts?: 'CALL' | 'SEGMENT' | 'TURN'[]): { data: object; }`\n\n**post** `/v1/metric/definitions`\n\nCreate a new custom metric definition. The metric will be added to the specified analysis package and can be used for evaluating calls.\n\n### Parameters\n\n- `analysisPackageId: string`\n ID of the analysis package to add this metric to\n\n- `name: string`\n Name of the metric\n\n- `outputType: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'`\n Type of value this metric produces\n\n- `booleanFalseLabel?: string`\n Label for the false/negative case (only for BOOLEAN type)\n\n- `booleanTrueLabel?: string`\n Label for the true/positive case (only for BOOLEAN type)\n\n- `classificationOptions?: { description: string; displayOrder: number; label: string; }[]`\n Options for classification. Required for CLASSIFICATION type.\n\n- `llmPrompt?: string`\n LLM prompt/criteria for evaluating this metric. Used to instruct the model on how to score. Required for BOOLEAN, NUMERIC, TEXT, and SCALE types.\n\n- `maxClassifications?: number`\n Maximum number of classifications that can be selected (only for CLASSIFICATION type)\n\n- `metricId?: string`\n Unique identifier for the metric (e.g. \"customer_satisfaction\"). Auto-generated from name if not provided.\n\n- `participantRole?: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'`\n Participant role to evaluate. Required when scope is PER_PARTICIPANT.\n\n- `scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]`\n Labels for scale ranges (only for SCALE type)\n\n- `scaleMax?: number`\n Maximum value for scale. Required for SCALE type.\n\n- `scaleMin?: number`\n Minimum value for scale. Required for SCALE type.\n\n- `scope?: 'GLOBAL' | 'PER_PARTICIPANT'`\n Whether metric is global or per-participant (default: GLOBAL)\n\n- `supportedContexts?: 'CALL' | 'SEGMENT' | 'TURN'[]`\n Which levels this metric can produce values at (default: [\"CALL\"])\n\n### Returns\n\n- `{ data: { id: string; description: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; unit?: { name: string; symbol: string; }; }; }`\n\n - `data: { id: string; description: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; unit?: { name: string; symbol: string; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.metric.createDefinition({\n analysisPackageId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n name: 'Customer Satisfaction',\n outputType: 'BOOLEAN',\n});\n\nconsole.log(response);\n```",
335
+ "{ data: { id: string; calculationType: 'LLM_JUDGE'; description: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: object; } | { id: string; calculationType: 'FORMULA'; description: string; formula: object; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: object; } | { id: string; calculationType: 'PATTERN'; description: string; metricId: string; name: string; pattern: object; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: object; }; }",
380
336
  perLanguage: {
381
- http: {
337
+ typescript: {
338
+ method: 'client.metric.createDefinition',
382
339
  example:
383
- 'curl https://api.roark.ai/v1/metric/definitions \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "analysisPackageId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "name": "Customer Satisfaction",\n "outputType": "BOOLEAN",\n "booleanFalseLabel": "Not Satisfied",\n "booleanTrueLabel": "Satisfied",\n "llmPrompt": "Evaluate whether the customer expressed satisfaction with the service provided.",\n "metricId": "customer_satisfaction",\n "scaleMax": 5,\n "scaleMin": 1,\n "scope": "GLOBAL",\n "supportedContexts": [\n "CALL"\n ]\n }\'',
340
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.metric.createDefinition({\n analysisPackageId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n calculationType: 'LLM_JUDGE',\n name: 'Customer Satisfaction',\n outputType: 'BOOLEAN',\n});\n\nconsole.log(response.data);",
384
341
  },
385
342
  python: {
386
343
  method: 'metric.create_definition',
387
344
  example:
388
- 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.metric.create_definition(\n analysis_package_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n name="Customer Satisfaction",\n output_type="BOOLEAN",\n)\nprint(response.data)',
345
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.metric.create_definition(\n analysis_package_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n calculation_type="LLM_JUDGE",\n name="Customer Satisfaction",\n output_type="BOOLEAN",\n)\nprint(response.data)',
389
346
  },
390
- typescript: {
391
- method: 'client.metric.createDefinition',
347
+ http: {
392
348
  example:
393
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.metric.createDefinition({\n analysisPackageId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n name: 'Customer Satisfaction',\n outputType: 'BOOLEAN',\n});\n\nconsole.log(response.data);",
349
+ 'curl https://api.roark.ai/v1/metric/definitions \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "analysisPackageId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "calculationType": "LLM_JUDGE",\n "name": "Customer Satisfaction",\n "outputType": "BOOLEAN",\n "llmPrompt": "Evaluate whether the customer expressed satisfaction with the service provided.",\n "metricId": "customer_satisfaction",\n "slug": "customer_satisfaction"\n }\'',
394
350
  },
395
351
  },
396
352
  },
@@ -408,19 +364,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
408
364
  markdown:
409
365
  "## list\n\n`client.metricPolicy.list(after?: string, limit?: number, status?: 'ACTIVE' | 'INACTIVE'): { data: object[]; pagination: object; }`\n\n**get** `/v1/metric/policies`\n\nReturns a paginated list of metric policies for the project, including system policies.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - use the nextCursor value from a previous response\n\n- `limit?: number`\n Maximum number of policies to return (default: 20, max: 50)\n\n- `status?: 'ACTIVE' | 'INACTIVE'`\n Filter by policy status\n\n### Returns\n\n- `{ data: { id: string; conditions: { conditions: object[]; }[]; createdAt: string; metrics: { id: string; }[]; name: string; status: 'ACTIVE' | 'INACTIVE'; type: 'SYSTEM' | 'USER'; updatedAt: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n Paginated list of metric policies\n\n - `data: { id: string; conditions: { conditions: { conditionKey: string; conditionOperator: string; conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION'; conditionValue: string; }[]; }[]; createdAt: string; metrics: { id: string; }[]; name: string; status: 'ACTIVE' | 'INACTIVE'; type: 'SYSTEM' | 'USER'; updatedAt: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst metricPolicies = await client.metricPolicy.list();\n\nconsole.log(metricPolicies);\n```",
410
366
  perLanguage: {
411
- http: {
367
+ typescript: {
368
+ method: 'client.metricPolicy.list',
412
369
  example:
413
- 'curl https://api.roark.ai/v1/metric/policies \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
370
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst metricPolicies = await client.metricPolicy.list();\n\nconsole.log(metricPolicies.data);",
414
371
  },
415
372
  python: {
416
373
  method: 'metric_policy.list',
417
374
  example:
418
375
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nmetric_policies = client.metric_policy.list()\nprint(metric_policies.data)',
419
376
  },
420
- typescript: {
421
- method: 'client.metricPolicy.list',
377
+ http: {
422
378
  example:
423
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst metricPolicies = await client.metricPolicy.list();\n\nconsole.log(metricPolicies.data);",
379
+ 'curl https://api.roark.ai/v1/metric/policies \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
424
380
  },
425
381
  },
426
382
  },
@@ -438,19 +394,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
438
394
  markdown:
439
395
  "## getById\n\n`client.metricPolicy.getByID(policyId: string): { data: object; }`\n\n**get** `/v1/metric/policies/{policyId}`\n\nReturns a specific metric policy with its conditions and metrics.\n\n### Parameters\n\n- `policyId: string`\n\n### Returns\n\n- `{ data: { id: string; conditions: { conditions: object[]; }[]; createdAt: string; metrics: { id: string; }[]; name: string; status: 'ACTIVE' | 'INACTIVE'; type: 'SYSTEM' | 'USER'; updatedAt: string; }; }`\n\n - `data: { id: string; conditions: { conditions: { conditionKey: string; conditionOperator: string; conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION'; conditionValue: string; }[]; }[]; createdAt: string; metrics: { id: string; }[]; name: string; status: 'ACTIVE' | 'INACTIVE'; type: 'SYSTEM' | 'USER'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.metricPolicy.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
440
396
  perLanguage: {
441
- http: {
397
+ typescript: {
398
+ method: 'client.metricPolicy.getByID',
442
399
  example:
443
- 'curl https://api.roark.ai/v1/metric/policies/$POLICY_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
400
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.metricPolicy.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);",
444
401
  },
445
402
  python: {
446
403
  method: 'metric_policy.get_by_id',
447
404
  example:
448
405
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.metric_policy.get_by_id(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
449
406
  },
450
- typescript: {
451
- method: 'client.metricPolicy.getByID',
407
+ http: {
452
408
  example:
453
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.metricPolicy.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);",
409
+ 'curl https://api.roark.ai/v1/metric/policies/$POLICY_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
454
410
  },
455
411
  },
456
412
  },
@@ -475,19 +431,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
475
431
  markdown:
476
432
  "## create\n\n`client.metricPolicy.create(metrics: { id: string; }[], modality: 'call' | 'chat', name: string, conditions?: { conditions: { conditionKey: string; conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION'; conditionOperator?: string; conditionValue?: string; }[]; }[], status?: 'ACTIVE' | 'INACTIVE'): { data: object; }`\n\n**post** `/v1/metric/policies`\n\nCreates a new metric policy. Policies define which metrics to collect and under what conditions.\n\n### Parameters\n\n- `metrics: { id: string; }[]`\n Metric definitions to collect when this policy matches\n\n- `modality: 'call' | 'chat'`\n Modality this policy targets. A policy fires for exactly one modality and can only reference metrics that support that modality.\n\n- `name: string`\n Name of the metric policy\n\n- `conditions?: { conditions: { conditionKey: string; conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION'; conditionOperator?: string; conditionValue?: string; }[]; }[]`\n Condition groups. Omit to match all calls.\n\n- `status?: 'ACTIVE' | 'INACTIVE'`\n Status of the policy (default: ACTIVE)\n\n### Returns\n\n- `{ data: { id: string; conditions: { conditions: object[]; }[]; createdAt: string; metrics: { id: string; }[]; name: string; status: 'ACTIVE' | 'INACTIVE'; type: 'SYSTEM' | 'USER'; updatedAt: string; }; }`\n\n - `data: { id: string; conditions: { conditions: { conditionKey: string; conditionOperator: string; conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION'; conditionValue: string; }[]; }[]; createdAt: string; metrics: { id: string; }[]; name: string; status: 'ACTIVE' | 'INACTIVE'; type: 'SYSTEM' | 'USER'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst metricPolicy = await client.metricPolicy.create({\n metrics: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n modality: 'call',\n name: 'Evaluate all inbound calls',\n});\n\nconsole.log(metricPolicy);\n```",
477
433
  perLanguage: {
478
- http: {
434
+ typescript: {
435
+ method: 'client.metricPolicy.create',
479
436
  example:
480
- 'curl https://api.roark.ai/v1/metric/policies \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "metrics": [\n {\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\n ],\n "modality": "call",\n "name": "Evaluate all inbound calls",\n "status": "ACTIVE"\n }\'',
437
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst metricPolicy = await client.metricPolicy.create({\n metrics: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n modality: 'call',\n name: 'Evaluate all inbound calls',\n});\n\nconsole.log(metricPolicy.data);",
481
438
  },
482
439
  python: {
483
440
  method: 'metric_policy.create',
484
441
  example:
485
442
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nmetric_policy = client.metric_policy.create(\n metrics=[{\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }],\n modality="call",\n name="Evaluate all inbound calls",\n)\nprint(metric_policy.data)',
486
443
  },
487
- typescript: {
488
- method: 'client.metricPolicy.create',
444
+ http: {
489
445
  example:
490
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst metricPolicy = await client.metricPolicy.create({\n metrics: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n modality: 'call',\n name: 'Evaluate all inbound calls',\n});\n\nconsole.log(metricPolicy.data);",
446
+ 'curl https://api.roark.ai/v1/metric/policies \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "metrics": [\n {\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\n ],\n "modality": "call",\n "name": "Evaluate all inbound calls",\n "status": "ACTIVE"\n }\'',
491
447
  },
492
448
  },
493
449
  },
@@ -511,19 +467,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
511
467
  markdown:
512
468
  "## update\n\n`client.metricPolicy.update(policyId: string, conditions?: { conditions: { conditionKey: string; conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION'; conditionOperator?: string; conditionValue?: string; }[]; }[], metrics?: { id: string; }[], name?: string, status?: 'ACTIVE' | 'INACTIVE'): { data: object; }`\n\n**put** `/v1/metric/policies/{policyId}`\n\nUpdates an existing metric policy. System policies cannot be modified.\n\n### Parameters\n\n- `policyId: string`\n\n- `conditions?: { conditions: { conditionKey: string; conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION'; conditionOperator?: string; conditionValue?: string; }[]; }[]`\n Condition groups. Omit to keep existing, provide empty array to remove all conditions.\n\n- `metrics?: { id: string; }[]`\n Metric definitions to collect when this policy matches\n\n- `name?: string`\n Name of the metric policy\n\n- `status?: 'ACTIVE' | 'INACTIVE'`\n Status of the policy\n\n### Returns\n\n- `{ data: { id: string; conditions: { conditions: object[]; }[]; createdAt: string; metrics: { id: string; }[]; name: string; status: 'ACTIVE' | 'INACTIVE'; type: 'SYSTEM' | 'USER'; updatedAt: string; }; }`\n\n - `data: { id: string; conditions: { conditions: { conditionKey: string; conditionOperator: string; conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION'; conditionValue: string; }[]; }[]; createdAt: string; metrics: { id: string; }[]; name: string; status: 'ACTIVE' | 'INACTIVE'; type: 'SYSTEM' | 'USER'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst metricPolicy = await client.metricPolicy.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(metricPolicy);\n```",
513
469
  perLanguage: {
514
- http: {
470
+ typescript: {
471
+ method: 'client.metricPolicy.update',
515
472
  example:
516
- 'curl https://api.roark.ai/v1/metric/policies/$POLICY_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
473
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst metricPolicy = await client.metricPolicy.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(metricPolicy.data);",
517
474
  },
518
475
  python: {
519
476
  method: 'metric_policy.update',
520
477
  example:
521
478
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nmetric_policy = client.metric_policy.update(\n policy_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(metric_policy.data)',
522
479
  },
523
- typescript: {
524
- method: 'client.metricPolicy.update',
480
+ http: {
525
481
  example:
526
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst metricPolicy = await client.metricPolicy.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(metricPolicy.data);",
482
+ 'curl https://api.roark.ai/v1/metric/policies/$POLICY_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
527
483
  },
528
484
  },
529
485
  },
@@ -540,19 +496,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
540
496
  markdown:
541
497
  "## delete\n\n`client.metricPolicy.delete(policyId: string): { data: object; }`\n\n**delete** `/v1/metric/policies/{policyId}`\n\nSoft-deletes a metric policy. System policies cannot be deleted.\n\n### Parameters\n\n- `policyId: string`\n\n### Returns\n\n- `{ data: { deleted: boolean; }; }`\n\n - `data: { deleted: boolean; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst metricPolicy = await client.metricPolicy.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(metricPolicy);\n```",
542
498
  perLanguage: {
543
- http: {
499
+ typescript: {
500
+ method: 'client.metricPolicy.delete',
544
501
  example:
545
- 'curl https://api.roark.ai/v1/metric/policies/$POLICY_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
502
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst metricPolicy = await client.metricPolicy.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(metricPolicy.data);",
546
503
  },
547
504
  python: {
548
505
  method: 'metric_policy.delete',
549
506
  example:
550
507
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nmetric_policy = client.metric_policy.delete(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(metric_policy.data)',
551
508
  },
552
- typescript: {
553
- method: 'client.metricPolicy.delete',
509
+ http: {
554
510
  example:
555
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst metricPolicy = await client.metricPolicy.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(metricPolicy.data);",
511
+ 'curl https://api.roark.ai/v1/metric/policies/$POLICY_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
556
512
  },
557
513
  },
558
514
  },
@@ -574,19 +530,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
574
530
  markdown:
575
531
  "## list\n\n`client.metricCollectionJob.list(after?: string, limit?: number, status?: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'): { data: object[]; pagination: object; }`\n\n**get** `/v1/metric/collection-jobs`\n\nReturns a paginated list of metric collection jobs for the project.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - use the nextCursor value from a previous response\n\n- `limit?: number`\n Maximum number of jobs to return (default: 20, max: 50)\n\n- `status?: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'`\n Filter by job status\n\n### Returns\n\n- `{ data: { id: string; completedAt: string; completedItems: number; createdAt: string; errorMessage: string; failedItems: number; policyIds: string[]; startedAt: string; status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'; totalItems: number; triggeredBy: 'USER_MANUAL' | 'USER_API' | 'METRIC_POLICY' | 'SIMULATION'; updatedAt: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n Paginated list of metric collection jobs\n\n - `data: { id: string; completedAt: string; completedItems: number; createdAt: string; errorMessage: string; failedItems: number; policyIds: string[]; startedAt: string; status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'; totalItems: number; triggeredBy: 'USER_MANUAL' | 'USER_API' | 'METRIC_POLICY' | 'SIMULATION'; updatedAt: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst metricCollectionJobs = await client.metricCollectionJob.list();\n\nconsole.log(metricCollectionJobs);\n```",
576
532
  perLanguage: {
577
- http: {
533
+ typescript: {
534
+ method: 'client.metricCollectionJob.list',
578
535
  example:
579
- 'curl https://api.roark.ai/v1/metric/collection-jobs \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
536
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst metricCollectionJobs = await client.metricCollectionJob.list();\n\nconsole.log(metricCollectionJobs.data);",
580
537
  },
581
538
  python: {
582
539
  method: 'metric_collection_job.list',
583
540
  example:
584
541
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nmetric_collection_jobs = client.metric_collection_job.list()\nprint(metric_collection_jobs.data)',
585
542
  },
586
- typescript: {
587
- method: 'client.metricCollectionJob.list',
543
+ http: {
588
544
  example:
589
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst metricCollectionJobs = await client.metricCollectionJob.list();\n\nconsole.log(metricCollectionJobs.data);",
545
+ 'curl https://api.roark.ai/v1/metric/collection-jobs \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
590
546
  },
591
547
  },
592
548
  },
@@ -604,19 +560,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
604
560
  markdown:
605
561
  "## getById\n\n`client.metricCollectionJob.getByID(jobId: string): { data: object; }`\n\n**get** `/v1/metric/collection-jobs/{jobId}`\n\nReturns a specific metric collection job with progress information.\n\n### Parameters\n\n- `jobId: string`\n\n### Returns\n\n- `{ data: { id: string; completedAt: string; completedItems: number; createdAt: string; errorMessage: string; failedItems: number; policyIds: string[]; startedAt: string; status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'; totalItems: number; triggeredBy: 'USER_MANUAL' | 'USER_API' | 'METRIC_POLICY' | 'SIMULATION'; updatedAt: string; }; }`\n\n - `data: { id: string; completedAt: string; completedItems: number; createdAt: string; errorMessage: string; failedItems: number; policyIds: string[]; startedAt: string; status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'; totalItems: number; triggeredBy: 'USER_MANUAL' | 'USER_API' | 'METRIC_POLICY' | 'SIMULATION'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.metricCollectionJob.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
606
562
  perLanguage: {
607
- http: {
563
+ typescript: {
564
+ method: 'client.metricCollectionJob.getByID',
608
565
  example:
609
- 'curl https://api.roark.ai/v1/metric/collection-jobs/$JOB_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
566
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.metricCollectionJob.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);",
610
567
  },
611
568
  python: {
612
569
  method: 'metric_collection_job.get_by_id',
613
570
  example:
614
571
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.metric_collection_job.get_by_id(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
615
572
  },
616
- typescript: {
617
- method: 'client.metricCollectionJob.getByID',
573
+ http: {
618
574
  example:
619
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.metricCollectionJob.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);",
575
+ 'curl https://api.roark.ai/v1/metric/collection-jobs/$JOB_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
620
576
  },
621
577
  },
622
578
  },
@@ -633,21 +589,54 @@ const EMBEDDED_METHODS: MethodEntry[] = [
633
589
  response:
634
590
  "{ data: { id: string; completedAt: string; completedItems: number; createdAt: string; errorMessage: string; failedItems: number; policyIds: string[]; startedAt: string; status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'; totalItems: number; triggeredBy: 'USER_MANUAL' | 'USER_API' | 'METRIC_POLICY' | 'SIMULATION'; updatedAt: string; }; }",
635
591
  markdown:
636
- "## create\n\n`client.metricCollectionJob.create(metrics: { id: string; }[], callIds?: string[], chatIds?: string[]): { data: object; }`\n\n**post** `/v1/metric/collection-jobs`\n\nCreates a metric collection job for the specified calls or chats and metrics, then triggers processing. Provide exactly one of callIds or chatIds.\n\n### Parameters\n\n- `metrics: { id: string; }[]`\n Metric definitions to collect\n\n- `callIds?: string[]`\n Call IDs to collect metrics for. Mutually exclusive with chatIds.\n\n- `chatIds?: string[]`\n Chat IDs to collect metrics for. Mutually exclusive with callIds.\n\n### Returns\n\n- `{ data: { id: string; completedAt: string; completedItems: number; createdAt: string; errorMessage: string; failedItems: number; policyIds: string[]; startedAt: string; status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'; totalItems: number; triggeredBy: 'USER_MANUAL' | 'USER_API' | 'METRIC_POLICY' | 'SIMULATION'; updatedAt: string; }; }`\n\n - `data: { id: string; completedAt: string; completedItems: number; createdAt: string; errorMessage: string; failedItems: number; policyIds: string[]; startedAt: string; status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'; totalItems: number; triggeredBy: 'USER_MANUAL' | 'USER_API' | 'METRIC_POLICY' | 'SIMULATION'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst metricCollectionJob = await client.metricCollectionJob.create({ metrics: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }] });\n\nconsole.log(metricCollectionJob);\n```",
592
+ "## create\n\n`client.metricCollectionJob.create(metrics: { id: string; }[], callIds?: string[], chatIds?: string[]): { data: object; }`\n\n**post** `/v1/metric/collection-jobs`\n\nCreates a metric collection job for the specified calls or chats and metrics, then triggers processing. Provide exactly one of callIds or chatIds.\n\n### Parameters\n\n- `metrics: { id: string; }[]`\n Metric definitions to collect. Max 20 per request.\n\n- `callIds?: string[]`\n Call IDs to collect metrics for. Mutually exclusive with chatIds. Max 500 per request.\n\n- `chatIds?: string[]`\n Chat IDs to collect metrics for. Mutually exclusive with callIds. Max 500 per request.\n\n### Returns\n\n- `{ data: { id: string; completedAt: string; completedItems: number; createdAt: string; errorMessage: string; failedItems: number; policyIds: string[]; startedAt: string; status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'; totalItems: number; triggeredBy: 'USER_MANUAL' | 'USER_API' | 'METRIC_POLICY' | 'SIMULATION'; updatedAt: string; }; }`\n\n - `data: { id: string; completedAt: string; completedItems: number; createdAt: string; errorMessage: string; failedItems: number; policyIds: string[]; startedAt: string; status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'; totalItems: number; triggeredBy: 'USER_MANUAL' | 'USER_API' | 'METRIC_POLICY' | 'SIMULATION'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst metricCollectionJob = await client.metricCollectionJob.create({ metrics: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }] });\n\nconsole.log(metricCollectionJob);\n```",
637
593
  perLanguage: {
638
- http: {
594
+ typescript: {
595
+ method: 'client.metricCollectionJob.create',
639
596
  example:
640
- 'curl https://api.roark.ai/v1/metric/collection-jobs \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "metrics": [\n {\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\n ]\n }\'',
597
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst metricCollectionJob = await client.metricCollectionJob.create({\n metrics: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n});\n\nconsole.log(metricCollectionJob.data);",
641
598
  },
642
599
  python: {
643
600
  method: 'metric_collection_job.create',
644
601
  example:
645
602
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nmetric_collection_job = client.metric_collection_job.create(\n metrics=[{\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }],\n)\nprint(metric_collection_job.data)',
646
603
  },
604
+ http: {
605
+ example:
606
+ 'curl https://api.roark.ai/v1/metric/collection-jobs \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "metrics": [\n {\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\n ]\n }\'',
607
+ },
608
+ },
609
+ },
610
+ {
611
+ name: 'run',
612
+ endpoint: '/v1/simulation/run',
613
+ httpMethod: 'post',
614
+ summary: 'Run a simulation',
615
+ description:
616
+ 'Starts a simulation and returns the run.\n\nSend `plan` to describe a simulation and run it once. Add `saveAsPlan` to keep that\nconfiguration as a reusable run plan. Send `planId` instead to run a plan you already have.',
617
+ stainlessPath: '(resource) simulation > (method) run',
618
+ qualified: 'client.simulation.run',
619
+ params: [
620
+ "{ plan: { agentEndpoints: { id: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; maxSimulationDurationSeconds: number; metrics: { id?: string; metricId?: string; slug?: string; }[]; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows?: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]; iterationCount?: number; maxConcurrentJobs?: number; name?: string; personas?: { id: string; }[]; scenarios?: { id: string; variables?: object; }[]; silenceTimeoutSeconds?: number; }; saveAsPlan?: boolean; variables?: object | { flowId: string; variables: object; edgeCaseId?: string; happyPath?: true; }[] | { scenarioId: string; variables: object; }[]; } | { planId: string; variables?: object | { flowId: string; variables: object; edgeCaseId?: string; happyPath?: true; }[] | { scenarioId: string; variables: object; }[]; };",
621
+ ],
622
+ response:
623
+ '{ data: { createdAt: string; savedAsPlan: boolean; simulationJobCount: number; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }',
624
+ markdown:
625
+ "## run\n\n`client.simulation.run(body?: { plan: { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; maxSimulationDurationSeconds: number; metrics: object[]; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows?: object[]; iterationCount?: number; maxConcurrentJobs?: number; name?: string; personas?: object[]; scenarios?: object[]; silenceTimeoutSeconds?: number; }; saveAsPlan?: boolean; variables?: object | { flowId: string; variables: object; edgeCaseId?: string; happyPath?: true; }[] | { scenarioId: string; variables: object; }[]; } | { planId: string; variables?: object | { flowId: string; variables: object; edgeCaseId?: string; happyPath?: true; }[] | { scenarioId: string; variables: object; }[]; }): { data: object; }`\n\n**post** `/v1/simulation/run`\n\nStarts a simulation and returns the run.\n\nSend `plan` to describe a simulation and run it once. Add `saveAsPlan` to keep that\nconfiguration as a reusable run plan. Send `planId` instead to run a plan you already have.\n\n### Parameters\n\n- `body?: { plan: { agentEndpoints: { id: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; maxSimulationDurationSeconds: number; metrics: { id?: string; metricId?: string; slug?: string; }[]; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows?: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]; iterationCount?: number; maxConcurrentJobs?: number; name?: string; personas?: { id: string; }[]; scenarios?: { id: string; variables?: object; }[]; silenceTimeoutSeconds?: number; }; saveAsPlan?: boolean; variables?: object | { flowId: string; variables: object; edgeCaseId?: string; happyPath?: true; }[] | { scenarioId: string; variables: object; }[]; } | { planId: string; variables?: object | { flowId: string; variables: object; edgeCaseId?: string; happyPath?: true; }[] | { scenarioId: string; variables: object; }[]; }`\n Either a simulation to configure and run, or the id of a plan to run.\n\n### Returns\n\n- `{ data: { createdAt: string; savedAsPlan: boolean; simulationJobCount: number; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }`\n\n - `data: { createdAt: string; savedAsPlan: boolean; simulationJobCount: number; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulation.run();\n\nconsole.log(response);\n```",
626
+ perLanguage: {
647
627
  typescript: {
648
- method: 'client.metricCollectionJob.create',
628
+ method: 'client.simulation.run',
649
629
  example:
650
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst metricCollectionJob = await client.metricCollectionJob.create({\n metrics: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n});\n\nconsole.log(metricCollectionJob.data);",
630
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulation.run({\n plan: {\n agentEndpoints: [{ id: '7c9e6679-7425-40de-944b-e07fc1f90ae7' }],\n direction: 'OUTBOUND',\n maxSimulationDurationSeconds: 300,\n metrics: [{}],\n },\n});\n\nconsole.log(response.data);",
631
+ },
632
+ python: {
633
+ method: 'simulation.run',
634
+ example:
635
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.simulation.run(\n plan={\n "agent_endpoints": [{\n "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"\n }],\n "direction": "OUTBOUND",\n "max_simulation_duration_seconds": 300,\n "metrics": [{}],\n },\n)\nprint(response.data)',
636
+ },
637
+ http: {
638
+ example:
639
+ 'curl https://api.roark.ai/v1/simulation/run \\\n -X POST \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
651
640
  },
652
641
  },
653
642
  },
@@ -661,23 +650,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
661
650
  qualified: 'client.simulationJob.lookup',
662
651
  params: ['roarkPhoneNumber: object;', 'callReceivedAt?: object;'],
663
652
  response:
664
- '{ data: { agentEndpoint: object; createdAt: string; persona: object; processingStatus: string; scenario: object; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }',
653
+ '{ data: { agentEndpoint: object; createdAt: string; persona: object; processingStatus: string; runPlan: object; scenario: object; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }',
665
654
  markdown:
666
- "## lookup\n\n`client.simulationJob.lookup(roarkPhoneNumber: object, callReceivedAt?: object): { data: object; }`\n\n**get** `/v1/simulation/job/lookup`\n\nFind the matching simulation using the number used by the Roark simulation agent.\n\n### Parameters\n\n- `roarkPhoneNumber: object`\n Phone number provisioned by Roark for the simulation job in E.164 format. In the case of an inbound simulation, this is the number that calls your agent; in the case of an outbound simulation, this is the number you call from your agent.\n\n- `callReceivedAt?: object`\n ISO 8601 timestamp of when the call was received. Alternatively, any time between the start and end of the call is valid. Defaults to the current time, which fetches any jobs that are currently ongoing.\n\n### Returns\n\n- `{ data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; }; createdAt: string; persona: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }`\n\n - `data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; }; createdAt: string; persona: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationJob.lookup({ roarkPhoneNumber: {} });\n\nconsole.log(response);\n```",
655
+ "## lookup\n\n`client.simulationJob.lookup(roarkPhoneNumber: object, callReceivedAt?: object): { data: object; }`\n\n**get** `/v1/simulation/job/lookup`\n\nFind the matching simulation using the number used by the Roark simulation agent.\n\n### Parameters\n\n- `roarkPhoneNumber: object`\n Phone number provisioned by Roark for the simulation job in E.164 format. In the case of an inbound simulation, this is the number that calls your agent; in the case of an outbound simulation, this is the number you call from your agent.\n\n- `callReceivedAt?: object`\n ISO 8601 timestamp of when the call was received. Alternatively, any time between the start and end of the call is valid. Defaults to the current time, which fetches any jobs that are currently ongoing.\n\n### Returns\n\n- `{ data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; persona: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }`\n\n - `data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; persona: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationJob.lookup({ roarkPhoneNumber: {} });\n\nconsole.log(response);\n```",
667
656
  perLanguage: {
668
- http: {
657
+ typescript: {
658
+ method: 'client.simulationJob.lookup',
669
659
  example:
670
- 'curl https://api.roark.ai/v1/simulation/job/lookup \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
660
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationJob.lookup({ roarkPhoneNumber: {} });\n\nconsole.log(response.data);",
671
661
  },
672
662
  python: {
673
663
  method: 'simulation_job.lookup',
674
664
  example:
675
665
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.simulation_job.lookup(\n roark_phone_number={},\n)\nprint(response.data)',
676
666
  },
677
- typescript: {
678
- method: 'client.simulationJob.lookup',
667
+ http: {
679
668
  example:
680
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationJob.lookup({ roarkPhoneNumber: {} });\n\nconsole.log(response.data);",
669
+ 'curl https://api.roark.ai/v1/simulation/job/lookup \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
681
670
  },
682
671
  },
683
672
  },
@@ -692,23 +681,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
692
681
  qualified: 'client.simulationJob.getByID',
693
682
  params: ['jobId: object;'],
694
683
  response:
695
- '{ data: { agentEndpoint: object; createdAt: string; persona: object; processingStatus: string; scenario: object; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }',
684
+ '{ data: { agentEndpoint: object; createdAt: string; persona: object; processingStatus: string; runPlan: object; scenario: object; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }',
696
685
  markdown:
697
- "## getById\n\n`client.simulationJob.getByID(jobId: object): { data: object; }`\n\n**get** `/v1/simulation/job/{jobId}`\n\nGet a individual simulation run directly by its ID. This is generally part of a larger simulation run plan job.\n\n### Parameters\n\n- `jobId: object`\n\n### Returns\n\n- `{ data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; }; createdAt: string; persona: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }`\n\n - `data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; }; createdAt: string; persona: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationJob.getByID('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response);\n```",
686
+ "## getById\n\n`client.simulationJob.getByID(jobId: object): { data: object; }`\n\n**get** `/v1/simulation/job/{jobId}`\n\nGet a individual simulation run directly by its ID. This is generally part of a larger simulation run plan job.\n\n### Parameters\n\n- `jobId: object`\n\n### Returns\n\n- `{ data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; persona: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }`\n\n - `data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; persona: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationJob.getByID('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response);\n```",
698
687
  perLanguage: {
699
- http: {
688
+ typescript: {
689
+ method: 'client.simulationJob.getByID',
700
690
  example:
701
- 'curl https://api.roark.ai/v1/simulation/job/$JOB_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
691
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationJob.getByID('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response.data);",
702
692
  },
703
693
  python: {
704
694
  method: 'simulation_job.get_by_id',
705
695
  example:
706
696
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.simulation_job.get_by_id(\n "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",\n)\nprint(response.data)',
707
697
  },
708
- typescript: {
709
- method: 'client.simulationJob.getByID',
698
+ http: {
710
699
  example:
711
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationJob.getByID('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response.data);",
700
+ 'curl https://api.roark.ai/v1/simulation/job/$JOB_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
712
701
  },
713
702
  },
714
703
  },
@@ -723,23 +712,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
723
712
  qualified: 'client.simulationRunPlan.list',
724
713
  params: ['after?: string;', 'agentId?: string;', 'limit?: number;', 'searchText?: string;'],
725
714
  response:
726
- "{ data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
715
+ "{ data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id: string; edgeCases?: 'ALL' | object[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
727
716
  markdown:
728
- "## list\n\n`client.simulationRunPlan.list(after?: string, agentId?: string, limit?: number, searchText?: string): { data: object[]; pagination: object; }`\n\n**get** `/v1/simulation/plan`\n\nReturns a paginated list of simulation run plans. Optionally filter by search text or agent ID.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - use the nextCursor value from a previous response\n\n- `agentId?: string`\n Filter run plans by agent ID\n\n- `limit?: number`\n Maximum number of run plans to return (default: 20, max: 50)\n\n- `searchText?: string`\n Search text to filter run plans by name\n\n### Returns\n\n- `{ data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n Paginated list of simulation run plans\n\n - `data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlans = await client.simulationRunPlan.list();\n\nconsole.log(simulationRunPlans);\n```",
717
+ "## list\n\n`client.simulationRunPlan.list(after?: string, agentId?: string, limit?: number, searchText?: string): { data: object[]; pagination: object; }`\n\n**get** `/v1/simulation/plan`\n\nReturns a paginated list of simulation run plans. Optionally filter by search text or agent ID.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - use the nextCursor value from a previous response\n\n- `agentId?: string`\n Filter run plans by agent ID\n\n- `limit?: number`\n Maximum number of run plans to return (default: 20, max: 50)\n\n- `searchText?: string`\n Search text to filter run plans by name\n\n### Returns\n\n- `{ data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id: string; edgeCases?: 'ALL' | object[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n Paginated list of simulation run plans\n\n - `data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlans = await client.simulationRunPlan.list();\n\nconsole.log(simulationRunPlans);\n```",
729
718
  perLanguage: {
730
- http: {
719
+ typescript: {
720
+ method: 'client.simulationRunPlan.list',
731
721
  example:
732
- 'curl https://api.roark.ai/v1/simulation/plan \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
722
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationRunPlans = await client.simulationRunPlan.list();\n\nconsole.log(simulationRunPlans.data);",
733
723
  },
734
724
  python: {
735
725
  method: 'simulation_run_plan.list',
736
726
  example:
737
727
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_run_plans = client.simulation_run_plan.list()\nprint(simulation_run_plans.data)',
738
728
  },
739
- typescript: {
740
- method: 'client.simulationRunPlan.list',
729
+ http: {
741
730
  example:
742
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationRunPlans = await client.simulationRunPlan.list();\n\nconsole.log(simulationRunPlans.data);",
731
+ 'curl https://api.roark.ai/v1/simulation/plan \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
743
732
  },
744
733
  },
745
734
  },
@@ -753,23 +742,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
753
742
  qualified: 'client.simulationRunPlan.getByID',
754
743
  params: ['planId: string;'],
755
744
  response:
756
- "{ data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; }",
745
+ "{ data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id: string; edgeCases?: 'ALL' | object[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; }",
757
746
  markdown:
758
- "## getById\n\n`client.simulationRunPlan.getByID(planId: string): { data: object; }`\n\n**get** `/v1/simulation/plan/{planId}`\n\nReturns a specific simulation run plan by its ID.\n\n### Parameters\n\n- `planId: string`\n\n### Returns\n\n- `{ data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; }`\n\n - `data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationRunPlan.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
747
+ "## getById\n\n`client.simulationRunPlan.getByID(planId: string): { data: object; }`\n\n**get** `/v1/simulation/plan/{planId}`\n\nReturns a specific simulation run plan by its ID.\n\n### Parameters\n\n- `planId: string`\n\n### Returns\n\n- `{ data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id: string; edgeCases?: 'ALL' | object[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; }`\n\n - `data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationRunPlan.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
759
748
  perLanguage: {
760
- http: {
749
+ typescript: {
750
+ method: 'client.simulationRunPlan.getByID',
761
751
  example:
762
- 'curl https://api.roark.ai/v1/simulation/plan/$PLAN_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
752
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationRunPlan.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);",
763
753
  },
764
754
  python: {
765
755
  method: 'simulation_run_plan.get_by_id',
766
756
  example:
767
757
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.simulation_run_plan.get_by_id(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
768
758
  },
769
- typescript: {
770
- method: 'client.simulationRunPlan.getByID',
759
+ http: {
771
760
  example:
772
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationRunPlan.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);",
761
+ 'curl https://api.roark.ai/v1/simulation/plan/$PLAN_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
773
762
  },
774
763
  },
775
764
  },
@@ -779,44 +768,45 @@ const EMBEDDED_METHODS: MethodEntry[] = [
779
768
  httpMethod: 'post',
780
769
  summary: 'Create a run plan',
781
770
  description:
782
- 'Creates a new simulation run plan. Optionally triggers a job immediately if autoRun is true.',
771
+ 'Creates a new simulation run plan.\n\nTo run a simulation, use POST /v1/simulation/run instead: it starts a run from a plan or\nfrom an inline configuration, and takes runtime variables. Create a plan here when you want\na reusable, named one to run later.',
783
772
  stainlessPath: '(resource) simulationRunPlan > (method) create',
784
773
  qualified: 'client.simulationRunPlan.create',
785
774
  params: [
786
775
  'agentEndpoints: { id: string; }[];',
787
776
  "direction: 'INBOUND' | 'OUTBOUND';",
788
777
  'maxSimulationDurationSeconds: number;',
789
- 'metrics: { id: string; }[];',
778
+ 'metrics: { id?: string; metricId?: string; slug?: string; }[];',
790
779
  'name: string;',
791
- 'personas: { id: string; }[];',
792
- 'scenarios: { id: string; variables?: object; }[];',
793
780
  'autoRun?: boolean;',
794
781
  'description?: string;',
795
782
  'endCallPhrases?: string[];',
796
783
  'endCallReasons?: string[];',
797
784
  "executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';",
785
+ "flows?: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[];",
798
786
  'iterationCount?: number;',
799
787
  'maxConcurrentJobs?: number;',
788
+ 'personas?: { id: string; }[];',
789
+ 'scenarios?: { id: string; variables?: object; }[];',
800
790
  'silenceTimeoutSeconds?: number;',
801
791
  ],
802
792
  response:
803
- "{ data: { runPlan: { id: string; agentEndpoints: object[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: object[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: object[]; name: string; personas: object[]; scenarios: object[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; runPlanJob?: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }; }",
793
+ "{ data: { runPlan: { id: string; agentEndpoints: object[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: object[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: object[]; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: object[]; name: string; personas: object[]; scenarios: object[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; runPlanJob?: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }; }",
804
794
  markdown:
805
- "## create\n\n`client.simulationRunPlan.create(agentEndpoints: { id: string; }[], direction: 'INBOUND' | 'OUTBOUND', maxSimulationDurationSeconds: number, metrics: { id: string; }[], name: string, personas: { id: string; }[], scenarios: { id: string; variables?: object; }[], autoRun?: boolean, description?: string, endCallPhrases?: string[], endCallReasons?: string[], executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT', iterationCount?: number, maxConcurrentJobs?: number, silenceTimeoutSeconds?: number): { data: object; }`\n\n**post** `/v1/simulation/plan`\n\nCreates a new simulation run plan. Optionally triggers a job immediately if autoRun is true.\n\n### Parameters\n\n- `agentEndpoints: { id: string; }[]`\n Agent endpoints to include in this run plan\n\n- `direction: 'INBOUND' | 'OUTBOUND'`\n Direction of the simulation (INBOUND or OUTBOUND)\n\n- `maxSimulationDurationSeconds: number`\n Maximum duration in seconds for each simulation\n\n- `metrics: { id: string; }[]`\n Metric definitions to include in this run plan\n\n- `name: string`\n Name of the run plan\n\n- `personas: { id: string; }[]`\n Personas to include in this run plan\n\n- `scenarios: { id: string; variables?: object; }[]`\n Scenarios to include in this run plan. The same scenario ID can appear multiple times with different variables.\n\n- `autoRun?: boolean`\n Whether to automatically trigger a job after creating the run plan\n\n- `description?: string`\n Description of the run plan\n\n- `endCallPhrases?: string[]`\n Phrases that trigger end of call. Empty array disables the feature.\n\n- `endCallReasons?: string[]`\n Semantic conditions that trigger end of call. The LLM evaluates the conversation against these conditions. Empty array disables the feature.\n\n- `executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'`\n Execution mode (PARALLEL or SEQUENTIAL)\n\n- `iterationCount?: number`\n Number of iterations to run for each test case. Must be 1 for OUTBOUND direction.\n\n- `maxConcurrentJobs?: number`\n Maximum number of concurrent simulation jobs\n\n- `silenceTimeoutSeconds?: number`\n Timeout in seconds for silence detection\n\n### Returns\n\n- `{ data: { runPlan: { id: string; agentEndpoints: object[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: object[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: object[]; name: string; personas: object[]; scenarios: object[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; runPlanJob?: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }; }`\n\n - `data: { runPlan: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; runPlanJob?: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlan = await client.simulationRunPlan.create({\n agentEndpoints: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n direction: 'INBOUND',\n maxSimulationDurationSeconds: 300,\n metrics: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n name: 'My Run Plan',\n personas: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n scenarios: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n});\n\nconsole.log(simulationRunPlan);\n```",
795
+ "## create\n\n`client.simulationRunPlan.create(agentEndpoints: { id: string; }[], direction: 'INBOUND' | 'OUTBOUND', maxSimulationDurationSeconds: number, metrics: { id?: string; metricId?: string; slug?: string; }[], name: string, autoRun?: boolean, description?: string, endCallPhrases?: string[], endCallReasons?: string[], executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT', flows?: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[], iterationCount?: number, maxConcurrentJobs?: number, personas?: { id: string; }[], scenarios?: { id: string; variables?: object; }[], silenceTimeoutSeconds?: number): { data: object; }`\n\n**post** `/v1/simulation/plan`\n\nCreates a new simulation run plan.\n\nTo run a simulation, use POST /v1/simulation/run instead: it starts a run from a plan or\nfrom an inline configuration, and takes runtime variables. Create a plan here when you want\na reusable, named one to run later.\n\n### Parameters\n\n- `agentEndpoints: { id: string; }[]`\n Agent endpoints to include in this run plan\n\n- `direction: 'INBOUND' | 'OUTBOUND'`\n Direction of the simulation (INBOUND or OUTBOUND)\n\n- `maxSimulationDurationSeconds: number`\n Maximum duration in seconds for each simulation\n\n- `metrics: { id?: string; metricId?: string; slug?: string; }[]`\n Metric definitions to include in this run plan. Reference each by `id` (UUID) or `slug`.\n\n- `name: string`\n Name of the run plan\n\n- `autoRun?: boolean`\n Deprecated: use POST /v1/simulation/run, which starts a run and accepts runtime `variables` as well. This flag runs the plan with only the values pinned on it.\n\n- `description?: string`\n Description of the run plan\n\n- `endCallPhrases?: string[]`\n Phrases that trigger end of call. Empty array disables the feature.\n\n- `endCallReasons?: string[]`\n Semantic conditions that trigger end of call. The LLM evaluates the conversation against these conditions. Empty array disables the feature.\n\n- `executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'`\n Execution mode (PARALLEL or SEQUENTIAL)\n\n- `flows?: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]`\n Customer flows to include in this run plan. The same flow can appear more than once with a different persona override or different variables.\n\n- `iterationCount?: number`\n Number of iterations to run for each test case (1-10000)\n\n- `maxConcurrentJobs?: number`\n Maximum number of concurrent simulation jobs\n\n- `personas?: { id: string; }[]`\n Personas to include in this run plan. Required with `scenarios`; ignored with `flows`, where each variant carries its own persona.\n\n- `scenarios?: { id: string; variables?: object; }[]`\n Deprecated: use `flows` instead. Scenarios to include in this run plan. The same scenario ID can appear multiple times with different variables.\n\n- `silenceTimeoutSeconds?: number`\n Timeout in seconds for silence detection\n\n### Returns\n\n- `{ data: { runPlan: { id: string; agentEndpoints: object[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: object[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: object[]; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: object[]; name: string; personas: object[]; scenarios: object[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; runPlanJob?: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }; }`\n\n - `data: { runPlan: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; runPlanJob?: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlan = await client.simulationRunPlan.create({\n agentEndpoints: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n direction: 'INBOUND',\n maxSimulationDurationSeconds: 300,\n metrics: [{}],\n name: 'My Run Plan',\n});\n\nconsole.log(simulationRunPlan);\n```",
806
796
  perLanguage: {
807
- http: {
797
+ typescript: {
798
+ method: 'client.simulationRunPlan.create',
808
799
  example:
809
- 'curl https://api.roark.ai/v1/simulation/plan \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "agentEndpoints": [\n {\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\n ],\n "direction": "INBOUND",\n "maxSimulationDurationSeconds": 300,\n "metrics": [\n {\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\n ],\n "name": "My Run Plan",\n "personas": [\n {\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\n ],\n "scenarios": [\n {\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\n ],\n "description": "A run plan for testing inbound calls",\n "endCallPhrases": [\n "goodbye"\n ],\n "endCallReasons": [\n "Order has been confirmed by the agent"\n ],\n "executionMode": "PARALLEL",\n "iterationCount": 1,\n "maxConcurrentJobs": 5,\n "silenceTimeoutSeconds": 30\n }\'',
800
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationRunPlan = await client.simulationRunPlan.create({\n agentEndpoints: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n direction: 'INBOUND',\n maxSimulationDurationSeconds: 300,\n metrics: [{}],\n name: 'My Run Plan',\n});\n\nconsole.log(simulationRunPlan.data);",
810
801
  },
811
802
  python: {
812
803
  method: 'simulation_run_plan.create',
813
804
  example:
814
- 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_run_plan = client.simulation_run_plan.create(\n agent_endpoints=[{\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }],\n direction="INBOUND",\n max_simulation_duration_seconds=300,\n metrics=[{\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }],\n name="My Run Plan",\n personas=[{\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }],\n scenarios=[{\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }],\n)\nprint(simulation_run_plan.data)',
805
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_run_plan = client.simulation_run_plan.create(\n agent_endpoints=[{\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }],\n direction="INBOUND",\n max_simulation_duration_seconds=300,\n metrics=[{}],\n name="My Run Plan",\n)\nprint(simulation_run_plan.data)',
815
806
  },
816
- typescript: {
817
- method: 'client.simulationRunPlan.create',
807
+ http: {
818
808
  example:
819
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationRunPlan = await client.simulationRunPlan.create({\n agentEndpoints: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n direction: 'INBOUND',\n maxSimulationDurationSeconds: 300,\n metrics: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n name: 'My Run Plan',\n personas: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n scenarios: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n});\n\nconsole.log(simulationRunPlan.data);",
809
+ 'curl https://api.roark.ai/v1/simulation/plan \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "agentEndpoints": [\n {\n "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\n ],\n "direction": "INBOUND",\n "maxSimulationDurationSeconds": 300,\n "metrics": [\n {}\n ],\n "name": "My Run Plan",\n "autoRun": false,\n "description": "A run plan for testing inbound calls",\n "endCallPhrases": [\n "goodbye"\n ],\n "endCallReasons": [\n "Order has been confirmed by the agent"\n ],\n "executionMode": "PARALLEL",\n "iterationCount": 1,\n "maxConcurrentJobs": 5,\n "silenceTimeoutSeconds": 30\n }\'',
820
810
  },
821
811
  },
822
812
  },
@@ -836,33 +826,35 @@ const EMBEDDED_METHODS: MethodEntry[] = [
836
826
  'endCallPhrases?: string[];',
837
827
  'endCallReasons?: string[];',
838
828
  "executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';",
829
+ "flows?: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[];",
830
+ 'isHidden?: boolean;',
839
831
  'iterationCount?: number;',
840
832
  'maxConcurrentJobs?: number;',
841
833
  'maxSimulationDurationSeconds?: number;',
842
- 'metrics?: { id: string; }[];',
834
+ 'metrics?: { id?: string; metricId?: string; slug?: string; }[];',
843
835
  'name?: string;',
844
836
  'personas?: { id: string; }[];',
845
837
  'scenarios?: { id: string; variables?: object; }[];',
846
838
  'silenceTimeoutSeconds?: number;',
847
839
  ],
848
840
  response:
849
- "{ data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; }",
841
+ "{ data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id: string; edgeCases?: 'ALL' | object[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; }",
850
842
  markdown:
851
- "## update\n\n`client.simulationRunPlan.update(planId: string, agentEndpoints?: { id: string; }[], description?: string, direction?: 'INBOUND' | 'OUTBOUND', endCallPhrases?: string[], endCallReasons?: string[], executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT', iterationCount?: number, maxConcurrentJobs?: number, maxSimulationDurationSeconds?: number, metrics?: { id: string; }[], name?: string, personas?: { id: string; }[], scenarios?: { id: string; variables?: object; }[], silenceTimeoutSeconds?: number): { data: object; }`\n\n**put** `/v1/simulation/plan/{planId}`\n\nUpdates an existing simulation run plan by its ID.\n\n### Parameters\n\n- `planId: string`\n\n- `agentEndpoints?: { id: string; }[]`\n Agent endpoints to include in this run plan\n\n- `description?: string`\n Description of the run plan\n\n- `direction?: 'INBOUND' | 'OUTBOUND'`\n Direction of the simulation (INBOUND or OUTBOUND)\n\n- `endCallPhrases?: string[]`\n Phrases that trigger end of call. Empty array disables the feature.\n\n- `endCallReasons?: string[]`\n Semantic conditions that trigger end of call. The LLM evaluates the conversation against these conditions. Empty array disables the feature.\n\n- `executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'`\n Execution mode (PARALLEL or SEQUENTIAL)\n\n- `iterationCount?: number`\n Number of iterations to run for each test case. Must be 1 for OUTBOUND direction.\n\n- `maxConcurrentJobs?: number`\n Maximum number of concurrent simulation jobs\n\n- `maxSimulationDurationSeconds?: number`\n Maximum duration in seconds for each simulation\n\n- `metrics?: { id: string; }[]`\n Metric definitions to include in this run plan\n\n- `name?: string`\n Name of the run plan\n\n- `personas?: { id: string; }[]`\n Personas to include in this run plan\n\n- `scenarios?: { id: string; variables?: object; }[]`\n Scenarios to include in this run plan. The same scenario ID can appear multiple times with different variables.\n\n- `silenceTimeoutSeconds?: number`\n Timeout in seconds for silence detection\n\n### Returns\n\n- `{ data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; }`\n\n - `data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlan = await client.simulationRunPlan.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(simulationRunPlan);\n```",
843
+ "## update\n\n`client.simulationRunPlan.update(planId: string, agentEndpoints?: { id: string; }[], description?: string, direction?: 'INBOUND' | 'OUTBOUND', endCallPhrases?: string[], endCallReasons?: string[], executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT', flows?: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[], isHidden?: boolean, iterationCount?: number, maxConcurrentJobs?: number, maxSimulationDurationSeconds?: number, metrics?: { id?: string; metricId?: string; slug?: string; }[], name?: string, personas?: { id: string; }[], scenarios?: { id: string; variables?: object; }[], silenceTimeoutSeconds?: number): { data: object; }`\n\n**put** `/v1/simulation/plan/{planId}`\n\nUpdates an existing simulation run plan by its ID.\n\n### Parameters\n\n- `planId: string`\n\n- `agentEndpoints?: { id: string; }[]`\n Agent endpoints to include in this run plan\n\n- `description?: string`\n Description of the run plan\n\n- `direction?: 'INBOUND' | 'OUTBOUND'`\n Direction of the simulation (INBOUND or OUTBOUND)\n\n- `endCallPhrases?: string[]`\n Phrases that trigger end of call. Empty array disables the feature.\n\n- `endCallReasons?: string[]`\n Semantic conditions that trigger end of call. The LLM evaluates the conversation against these conditions. Empty array disables the feature.\n\n- `executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'`\n Execution mode (PARALLEL or SEQUENTIAL)\n\n- `flows?: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]`\n Replaces the customer flows attached to this run plan. Omit to leave them unchanged; send an empty array to detach them all.\n\n- `isHidden?: boolean`\n Whether this plan is hidden from GET /v1/simulation/plan.\n\nA run started without `saveAsPlan` creates a hidden plan to carry it. Send\n`{ \"name\": \"...\", \"isHidden\": false }` to keep that configuration as a reusable plan,\nwhich is what the app does when you save a one-off run.\n\n- `iterationCount?: number`\n Number of iterations to run for each test case (1-10000)\n\n- `maxConcurrentJobs?: number`\n Maximum number of concurrent simulation jobs\n\n- `maxSimulationDurationSeconds?: number`\n Maximum duration in seconds for each simulation\n\n- `metrics?: { id?: string; metricId?: string; slug?: string; }[]`\n Metric definitions to include in this run plan. Reference each by `id` (UUID) or `slug`.\n\n- `name?: string`\n Name of the run plan\n\n- `personas?: { id: string; }[]`\n Personas to include in this run plan\n\n- `scenarios?: { id: string; variables?: object; }[]`\n Deprecated: use `flows` instead. Replaces the scenarios on this run plan. Omit to leave them unchanged; send an empty array to detach them all, which is how a scenario-based plan is moved over to flows.\n\n- `silenceTimeoutSeconds?: number`\n Timeout in seconds for silence detection\n\n### Returns\n\n- `{ data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id: string; edgeCases?: 'ALL' | object[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; }`\n\n - `data: { id: string; agentEndpoints: { id: string; }[]; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[]; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlan = await client.simulationRunPlan.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(simulationRunPlan);\n```",
852
844
  perLanguage: {
853
- http: {
845
+ typescript: {
846
+ method: 'client.simulationRunPlan.update',
854
847
  example:
855
- 'curl https://api.roark.ai/v1/simulation/plan/$PLAN_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
848
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationRunPlan = await client.simulationRunPlan.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(simulationRunPlan.data);",
856
849
  },
857
850
  python: {
858
851
  method: 'simulation_run_plan.update',
859
852
  example:
860
853
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_run_plan = client.simulation_run_plan.update(\n plan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(simulation_run_plan.data)',
861
854
  },
862
- typescript: {
863
- method: 'client.simulationRunPlan.update',
855
+ http: {
864
856
  example:
865
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationRunPlan = await client.simulationRunPlan.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(simulationRunPlan.data);",
857
+ 'curl https://api.roark.ai/v1/simulation/plan/$PLAN_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
866
858
  },
867
859
  },
868
860
  },
@@ -879,19 +871,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
879
871
  markdown:
880
872
  "## delete\n\n`client.simulationRunPlan.delete(planId: string): { data: object; }`\n\n**delete** `/v1/simulation/plan/{planId}`\n\nSoft-deletes a simulation run plan by its ID.\n\n### Parameters\n\n- `planId: string`\n\n### Returns\n\n- `{ data: { deleted: boolean; }; }`\n\n - `data: { deleted: boolean; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlan = await client.simulationRunPlan.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(simulationRunPlan);\n```",
881
873
  perLanguage: {
882
- http: {
874
+ typescript: {
875
+ method: 'client.simulationRunPlan.delete',
883
876
  example:
884
- 'curl https://api.roark.ai/v1/simulation/plan/$PLAN_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
877
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationRunPlan = await client.simulationRunPlan.delete(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(simulationRunPlan.data);",
885
878
  },
886
879
  python: {
887
880
  method: 'simulation_run_plan.delete',
888
881
  example:
889
882
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_run_plan = client.simulation_run_plan.delete(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(simulation_run_plan.data)',
890
883
  },
891
- typescript: {
892
- method: 'client.simulationRunPlan.delete',
884
+ http: {
893
885
  example:
894
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationRunPlan = await client.simulationRunPlan.delete(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(simulationRunPlan.data);",
886
+ 'curl https://api.roark.ai/v1/simulation/plan/$PLAN_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
895
887
  },
896
888
  },
897
889
  },
@@ -913,23 +905,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
913
905
  'status?: string;',
914
906
  ],
915
907
  response:
916
- "{ data: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; triggeredBy: 'SCHEDULED' | 'USER_TRIGGERED_FROM_UI' | 'RE_RUN' | 'TRIGGERED_FROM_API'; endedAt?: string; startedAt?: string; }[]; pagination: { hasMore: boolean; total: number; nextCursor?: string; }; }",
908
+ "{ data: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; triggeredBy: 'SCHEDULED' | 'USER_TRIGGERED_FROM_UI' | 'RE_RUN' | 'TRIGGERED_FROM_API' | 'SYSTEM'; endedAt?: string; startedAt?: string; }[]; pagination: { hasMore: boolean; total: number; nextCursor?: string; }; }",
917
909
  markdown:
918
- "## list\n\n`client.simulationRunPlanJob.list(after?: string, labelId?: string, labelName?: string, limit?: number, simulationRunPlanId?: string, status?: string): { data: object[]; pagination: object; }`\n\n**get** `/v1/simulation/plan/jobs`\n\nReturns a paginated list of simulation run plan jobs. Filter by status, plan ID, or label to find specific simulation batches.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - use the nextCursor value from a previous response\n\n- `labelId?: string`\n Filter by label ID attached to the plan job. Use this if you know the label ID.\n\n- `labelName?: string`\n Filter by label name attached to the plan job. More user-friendly alternative to labelId. Case-insensitive.\n\n- `limit?: number`\n Maximum number of plan jobs to return (default: 20, max: 50)\n\n- `simulationRunPlanId?: string`\n Filter by simulation run plan ID\n\n- `status?: string`\n Filter by plan job status (PENDING, CREATING_SNAPSHOTS, CREATING_SIMULATIONS, RUNNING_SIMULATIONS, ENDING_SIMULATIONS, COMPLETED, FAILED, TIMED_OUT, CANCELLED, CANCELLING)\n\n### Returns\n\n- `{ data: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; triggeredBy: 'SCHEDULED' | 'USER_TRIGGERED_FROM_UI' | 'RE_RUN' | 'TRIGGERED_FROM_API'; endedAt?: string; startedAt?: string; }[]; pagination: { hasMore: boolean; total: number; nextCursor?: string; }; }`\n Paginated list of simulation run plan jobs\n\n - `data: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; triggeredBy: 'SCHEDULED' | 'USER_TRIGGERED_FROM_UI' | 'RE_RUN' | 'TRIGGERED_FROM_API'; endedAt?: string; startedAt?: string; }[]`\n - `pagination: { hasMore: boolean; total: number; nextCursor?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlanJobs = await client.simulationRunPlanJob.list();\n\nconsole.log(simulationRunPlanJobs);\n```",
910
+ "## list\n\n`client.simulationRunPlanJob.list(after?: string, labelId?: string, labelName?: string, limit?: number, simulationRunPlanId?: string, status?: string): { data: object[]; pagination: object; }`\n\n**get** `/v1/simulation/plan/jobs`\n\nReturns a paginated list of simulation run plan jobs. Filter by status, plan ID, or label to find specific simulation batches.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - use the nextCursor value from a previous response\n\n- `labelId?: string`\n Filter by label ID attached to the plan job. Use this if you know the label ID.\n\n- `labelName?: string`\n Filter by label name attached to the plan job. More user-friendly alternative to labelId. Case-insensitive.\n\n- `limit?: number`\n Maximum number of plan jobs to return (default: 20, max: 50)\n\n- `simulationRunPlanId?: string`\n Filter by simulation run plan ID\n\n- `status?: string`\n Filter by plan job status (PENDING, QUEUED, CREATING_SNAPSHOTS, CREATING_SIMULATIONS, PREPARING_CAPACITY, RUNNING_SIMULATIONS, COMPLETED, FAILED, TIMED_OUT, CANCELLED, CANCELLING, ENDING_SIMULATIONS)\n\n### Returns\n\n- `{ data: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; triggeredBy: 'SCHEDULED' | 'USER_TRIGGERED_FROM_UI' | 'RE_RUN' | 'TRIGGERED_FROM_API' | 'SYSTEM'; endedAt?: string; startedAt?: string; }[]; pagination: { hasMore: boolean; total: number; nextCursor?: string; }; }`\n Paginated list of simulation run plan jobs\n\n - `data: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; triggeredBy: 'SCHEDULED' | 'USER_TRIGGERED_FROM_UI' | 'RE_RUN' | 'TRIGGERED_FROM_API' | 'SYSTEM'; endedAt?: string; startedAt?: string; }[]`\n - `pagination: { hasMore: boolean; total: number; nextCursor?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlanJobs = await client.simulationRunPlanJob.list();\n\nconsole.log(simulationRunPlanJobs);\n```",
919
911
  perLanguage: {
920
- http: {
912
+ typescript: {
913
+ method: 'client.simulationRunPlanJob.list',
921
914
  example:
922
- 'curl https://api.roark.ai/v1/simulation/plan/jobs \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
915
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationRunPlanJobs = await client.simulationRunPlanJob.list();\n\nconsole.log(simulationRunPlanJobs.data);",
923
916
  },
924
917
  python: {
925
918
  method: 'simulation_run_plan_job.list',
926
919
  example:
927
920
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_run_plan_jobs = client.simulation_run_plan_job.list()\nprint(simulation_run_plan_jobs.data)',
928
921
  },
929
- typescript: {
930
- method: 'client.simulationRunPlanJob.list',
922
+ http: {
931
923
  example:
932
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationRunPlanJobs = await client.simulationRunPlanJob.list();\n\nconsole.log(simulationRunPlanJobs.data);",
924
+ 'curl https://api.roark.ai/v1/simulation/plan/jobs \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
933
925
  },
934
926
  },
935
927
  },
@@ -945,21 +937,21 @@ const EMBEDDED_METHODS: MethodEntry[] = [
945
937
  response:
946
938
  '{ data: { createdAt: string; simulationJobs: { agentEndpoint: object; createdAt: string; persona: object; processingStatus: string; scenario: object; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }[]; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; endedAt?: string; startedAt?: string; }; }',
947
939
  markdown:
948
- "## getById\n\n`client.simulationRunPlanJob.getByID(jobId: object): { data: object; }`\n\n**get** `/v1/simulation/plan/job/{jobId}`\n\nRetrieve details of a simulation plan job including all associated simulation jobs (calls)\n\n### Parameters\n\n- `jobId: object`\n\n### Returns\n\n- `{ data: { createdAt: string; simulationJobs: { agentEndpoint: object; createdAt: string; persona: object; processingStatus: string; scenario: object; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }[]; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; endedAt?: string; startedAt?: string; }; }`\n\n - `data: { createdAt: string; simulationJobs: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; }; createdAt: string; persona: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }[]; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; endedAt?: string; startedAt?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationRunPlanJob.getByID('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response);\n```",
940
+ "## getById\n\n`client.simulationRunPlanJob.getByID(jobId: object): { data: object; }`\n\n**get** `/v1/simulation/plan/job/{jobId}`\n\nRetrieve details of a simulation plan job including all associated simulation jobs (calls)\n\n### Parameters\n\n- `jobId: object`\n\n### Returns\n\n- `{ data: { createdAt: string; simulationJobs: { agentEndpoint: object; createdAt: string; persona: object; processingStatus: string; scenario: object; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }[]; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; endedAt?: string; startedAt?: string; }; }`\n\n - `data: { createdAt: string; simulationJobs: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; persona: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }[]; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; endedAt?: string; startedAt?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationRunPlanJob.getByID('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response);\n```",
949
941
  perLanguage: {
950
- http: {
942
+ typescript: {
943
+ method: 'client.simulationRunPlanJob.getByID',
951
944
  example:
952
- 'curl https://api.roark.ai/v1/simulation/plan/job/$JOB_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
945
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationRunPlanJob.getByID('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response.data);",
953
946
  },
954
947
  python: {
955
948
  method: 'simulation_run_plan_job.get_by_id',
956
949
  example:
957
950
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.simulation_run_plan_job.get_by_id(\n "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",\n)\nprint(response.data)',
958
951
  },
959
- typescript: {
960
- method: 'client.simulationRunPlanJob.getByID',
952
+ http: {
961
953
  example:
962
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationRunPlanJob.getByID('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response.data);",
954
+ 'curl https://api.roark.ai/v1/simulation/plan/job/$JOB_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
963
955
  },
964
956
  },
965
957
  },
@@ -969,349 +961,642 @@ const EMBEDDED_METHODS: MethodEntry[] = [
969
961
  httpMethod: 'post',
970
962
  summary: 'Run a simulation plan',
971
963
  description:
972
- 'Create and execute a job for an existing simulation run plan. Optionally provide runtime variables to override plan-defined variables.',
964
+ 'Deprecated: use POST /v1/simulation/run, which does the same thing and can also take the\nplan configuration inline, so a one-off run does not have to create a plan first.\n\nCreates and executes a job for an existing simulation run plan. Optionally provide runtime\nvariables to override plan-defined variables.',
973
965
  stainlessPath: '(resource) simulationRunPlanJob > (method) start',
974
966
  qualified: 'client.simulationRunPlanJob.start',
975
- params: ['planId: object;', 'variables?: object | { scenarioId: string; variables: object; }[];'],
967
+ params: [
968
+ 'planId: object;',
969
+ 'variables?: object | { flowId: string; variables: object; edgeCaseId?: string; happyPath?: true; }[] | { scenarioId: string; variables: object; }[];',
970
+ ],
976
971
  response:
977
972
  '{ data: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }',
978
973
  markdown:
979
- '## start\n\n`client.simulationRunPlanJob.start(planId: object, variables?: object | { scenarioId: string; variables: object; }[]): { data: object; }`\n\n**post** `/v1/simulation/plan/{planId}/job`\n\nCreate and execute a job for an existing simulation run plan. Optionally provide runtime variables to override plan-defined variables.\n\n### Parameters\n\n- `planId: object`\n\n- `variables?: object | { scenarioId: string; variables: object; }[]`\n Runtime variables that override plan-defined scenario variables. Accepts one of two formats:\n\nOption 1 — Global (flat key-value object, applies to ALL scenarios):\n { "orderNumber": "12345", "environment": "staging" }\n\nOption 2 Per-scenario (array of objects with scenarioId + variables):\n [\n { "scenarioId": "550e8400-...", "variables": { "orderNumber": "12345" } },\n { "scenarioId": "7a3d2e1f-...", "variables": { "orderNumber": "67890" } }\n ]\n\n### Returns\n\n- `{ data: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }`\n\n - `data: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }`\n\n### Example\n\n```typescript\nimport Roark from \'@roarkanalytics/sdk\';\n\nconst client = new Roark();\n\nconst response = await client.simulationRunPlanJob.start(\'7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f\');\n\nconsole.log(response);\n```',
974
+ '## start\n\n`client.simulationRunPlanJob.start(planId: object, variables?: object | { flowId: string; variables: object; edgeCaseId?: string; happyPath?: true; }[] | { scenarioId: string; variables: object; }[]): { data: object; }`\n\n**post** `/v1/simulation/plan/{planId}/job`\n\nDeprecated: use POST /v1/simulation/run, which does the same thing and can also take the\nplan configuration inline, so a one-off run does not have to create a plan first.\n\nCreates and executes a job for an existing simulation run plan. Optionally provide runtime\nvariables to override plan-defined variables.\n\n### Parameters\n\n- `planId: object`\n\n- `variables?: object | { flowId: string; variables: object; edgeCaseId?: string; happyPath?: true; }[] | { scenarioId: string; variables: object; }[]`\n Values for the {{variables}} the run resolves, overriding whatever the plan has pinned.\n\nAn object applies them to the whole run:\n\n { "orderNumber": "12345", "tier": "gold" }\n\nAn array applies them per flow, or to just its happy path or one of its edge cases, when a single\nset will not do. Each entry carries what it applies to:\n\n [\n { "flowId": "550e8400-...", "variables": { "orderNumber": "12345" } },\n { "flowId": "550e8400-...", "happyPath": true, "variables": { "orderNumber": "55555" } },\n { "flowId": "550e8400-...", "edgeCaseId": "7a3d2e1f-...", "variables": { "orderNumber": "67890" } }\n ]\n\nAn entry that narrows to neither covers everything that flow resolves. A flow this plan does not\nattach, or an edge case that does not belong to the flow, is rejected rather than ignored.\n\nA plan built on scenarios rather than customer flows targets them the same way, with `scenarioId` in\nplace of `flowId`. That form is deprecated alongside scenarios themselves, and still accepted so runs\nagainst those plans keep working.\n\n### Returns\n\n- `{ data: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }`\n\n - `data: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }`\n\n### Example\n\n```typescript\nimport Roark from \'@roarkanalytics/sdk\';\n\nconst client = new Roark();\n\nconst response = await client.simulationRunPlanJob.start(\'7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f\');\n\nconsole.log(response);\n```',
980
975
  perLanguage: {
981
- http: {
976
+ typescript: {
977
+ method: 'client.simulationRunPlanJob.start',
982
978
  example:
983
- 'curl https://api.roark.ai/v1/simulation/plan/$PLAN_ID/job \\\n -X POST \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
979
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationRunPlanJob.start('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response.data);",
984
980
  },
985
981
  python: {
986
982
  method: 'simulation_run_plan_job.start',
987
983
  example:
988
984
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.simulation_run_plan_job.start(\n plan_id="7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",\n)\nprint(response.data)',
989
985
  },
990
- typescript: {
991
- method: 'client.simulationRunPlanJob.start',
986
+ http: {
992
987
  example:
993
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationRunPlanJob.start('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response.data);",
988
+ 'curl https://api.roark.ai/v1/simulation/plan/$PLAN_ID/job \\\n -X POST \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
994
989
  },
995
990
  },
996
991
  },
997
992
  {
998
993
  name: 'list',
999
- endpoint: '/v1/simulation/scenario',
994
+ endpoint: '/v1/persona',
1000
995
  httpMethod: 'get',
1001
- summary: 'List simulation scenarios',
1002
- description: 'Returns a paginated list of simulation scenarios for the authenticated project.',
1003
- stainlessPath: '(resource) simulationScenario > (method) list',
1004
- qualified: 'client.simulationScenario.list',
1005
- params: ['after?: string;', 'limit?: number;'],
996
+ summary: 'List personas',
997
+ description: 'Returns a paginated list of personas for the authenticated project.',
998
+ stainlessPath: '(resource) simulationPersona > (method) list',
999
+ qualified: 'client.simulationPersona.list',
1000
+ params: ['after?: string;', 'limit?: number;', 'searchText?: string;'],
1006
1001
  response:
1007
- '{ data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }',
1002
+ "{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
1008
1003
  markdown:
1009
- "## list\n\n`client.simulationScenario.list(after?: string, limit?: number): { data: object[]; pagination: object; }`\n\n**get** `/v1/simulation/scenario`\n\nReturns a paginated list of simulation scenarios for the authenticated project.\n\n### Parameters\n\n- `after?: string`\n\n- `limit?: number`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n\n - `data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationScenarios = await client.simulationScenario.list();\n\nconsole.log(simulationScenarios);\n```",
1004
+ "## list\n\n`client.simulationPersona.list(after?: string, limit?: number, searchText?: string): { data: object[]; pagination: object; }`\n\n**get** `/v1/persona`\n\nReturns a paginated list of personas for the authenticated project.\n\n### Parameters\n\n- `after?: string`\n\n- `limit?: number`\n\n- `searchText?: string`\n\n### Returns\n\n- `{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n\n - `data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationPersonas = await client.simulationPersona.list();\n\nconsole.log(simulationPersonas);\n```",
1010
1005
  perLanguage: {
1011
- http: {
1006
+ typescript: {
1007
+ method: 'client.simulationPersona.list',
1012
1008
  example:
1013
- 'curl https://api.roark.ai/v1/simulation/scenario \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1009
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationPersonas = await client.simulationPersona.list();\n\nconsole.log(simulationPersonas.data);",
1014
1010
  },
1015
1011
  python: {
1016
- method: 'simulation_scenario.list',
1012
+ method: 'simulation_persona.list',
1017
1013
  example:
1018
- 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_scenarios = client.simulation_scenario.list()\nprint(simulation_scenarios.data)',
1014
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_personas = client.simulation_persona.list()\nprint(simulation_personas.data)',
1019
1015
  },
1020
- typescript: {
1021
- method: 'client.simulationScenario.list',
1016
+ http: {
1022
1017
  example:
1023
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationScenarios = await client.simulationScenario.list();\n\nconsole.log(simulationScenarios.data);",
1018
+ 'curl https://api.roark.ai/v1/persona \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1024
1019
  },
1025
1020
  },
1026
1021
  },
1027
1022
  {
1028
1023
  name: 'getById',
1029
- endpoint: '/v1/simulation/scenario/{scenarioId}',
1024
+ endpoint: '/v1/persona/{personaId}',
1030
1025
  httpMethod: 'get',
1031
- summary: 'Get scenario by ID',
1032
- description: 'Returns a specific simulation scenario by its ID.',
1033
- stainlessPath: '(resource) simulationScenario > (method) getById',
1034
- qualified: 'client.simulationScenario.getByID',
1035
- params: ['scenarioId: string;'],
1026
+ summary: 'Get persona by ID',
1027
+ description: 'Returns a specific persona by its ID.',
1028
+ stainlessPath: '(resource) simulationPersona > (method) getById',
1029
+ qualified: 'client.simulationPersona.getByID',
1030
+ params: ['personaId: string;'],
1036
1031
  response:
1037
- '{ data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }; }',
1032
+ "{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; }",
1038
1033
  markdown:
1039
- "## getById\n\n`client.simulationScenario.getByID(scenarioId: string): { data: object; }`\n\n**get** `/v1/simulation/scenario/{scenarioId}`\n\nReturns a specific simulation scenario by its ID.\n\n### Parameters\n\n- `scenarioId: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }; }`\n\n - `data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationScenario.getByID('scenarioId');\n\nconsole.log(response);\n```",
1034
+ "## getById\n\n`client.simulationPersona.getByID(personaId: string): { data: object; }`\n\n**get** `/v1/persona/{personaId}`\n\nReturns a specific persona by its ID.\n\n### Parameters\n\n- `personaId: string`\n\n### Returns\n\n- `{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; }`\n\n - `data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationPersona.getByID('personaId');\n\nconsole.log(response);\n```",
1040
1035
  perLanguage: {
1041
- http: {
1036
+ typescript: {
1037
+ method: 'client.simulationPersona.getByID',
1042
1038
  example:
1043
- 'curl https://api.roark.ai/v1/simulation/scenario/$SCENARIO_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1039
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationPersona.getByID('personaId');\n\nconsole.log(response.data);",
1044
1040
  },
1045
1041
  python: {
1046
- method: 'simulation_scenario.get_by_id',
1042
+ method: 'simulation_persona.get_by_id',
1047
1043
  example:
1048
- 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.simulation_scenario.get_by_id(\n "scenarioId",\n)\nprint(response.data)',
1044
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.simulation_persona.get_by_id(\n "personaId",\n)\nprint(response.data)',
1049
1045
  },
1050
- typescript: {
1051
- method: 'client.simulationScenario.getByID',
1046
+ http: {
1052
1047
  example:
1053
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationScenario.getByID('scenarioId');\n\nconsole.log(response.data);",
1048
+ 'curl https://api.roark.ai/v1/persona/$PERSONA_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1054
1049
  },
1055
1050
  },
1056
1051
  },
1057
1052
  {
1058
1053
  name: 'create',
1059
- endpoint: '/v1/simulation/scenario',
1054
+ endpoint: '/v1/persona',
1060
1055
  httpMethod: 'post',
1061
- summary: 'Create a scenario',
1062
- description: 'Creates a new simulation scenario for the authenticated project.',
1063
- stainlessPath: '(resource) simulationScenario > (method) create',
1064
- qualified: 'client.simulationScenario.create',
1056
+ summary: 'Create a new persona',
1057
+ description: 'Creates a new persona for the authenticated project.',
1058
+ stainlessPath: '(resource) simulationPersona > (method) create',
1059
+ qualified: 'client.simulationPersona.create',
1065
1060
  params: [
1061
+ 'accent: string;',
1062
+ "gender: 'MALE' | 'FEMALE';",
1063
+ 'language: string;',
1066
1064
  'name: string;',
1067
- 'steps: { content: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[];',
1065
+ 'backgroundNoise?: string;',
1066
+ 'backstoryPrompt?: string;',
1067
+ "baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';",
1068
+ "confirmationStyle?: 'EXPLICIT' | 'VAGUE';",
1069
+ 'description?: string;',
1070
+ 'hasDisfluencies?: boolean;',
1071
+ 'idleMessageMaxSpokenCount?: number;',
1072
+ 'idleMessageResetCountOnUserSpeechEnabled?: boolean;',
1073
+ 'idleMessages?: string[];',
1074
+ 'idleTimeoutSeconds?: number;',
1075
+ "intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE';",
1076
+ "memoryReliability?: 'HIGH' | 'LOW';",
1077
+ 'properties?: object;',
1078
+ "responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK';",
1079
+ "secondaryLanguage?: 'EN';",
1080
+ "speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';",
1081
+ "speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';",
1082
+ 'understoodLanguages?: string[];',
1068
1083
  ],
1069
1084
  response:
1070
- '{ data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }; }',
1085
+ "{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; }",
1071
1086
  markdown:
1072
- "## create\n\n`client.simulationScenario.create(name: string, steps: { content: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]): { data: object; }`\n\n**post** `/v1/simulation/scenario`\n\nCreates a new simulation scenario for the authenticated project.\n\n### Parameters\n\n- `name: string`\n Name of the scenario (used as the START node content)\n\n- `steps: { content: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]`\n Ordered list of steps for the scenario (at least one step is required)\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }; }`\n\n - `data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationScenario = await client.simulationScenario.create({ name: 'x', steps: [{ content: 'content', type: 'AGENT_TURN' }] });\n\nconsole.log(simulationScenario);\n```",
1087
+ "## create\n\n`client.simulationPersona.create(accent: string, gender: 'MALE' | 'FEMALE', language: string, name: string, backgroundNoise?: string, backstoryPrompt?: string, baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED', confirmationStyle?: 'EXPLICIT' | 'VAGUE', description?: string, hasDisfluencies?: boolean, idleMessageMaxSpokenCount?: number, idleMessageResetCountOnUserSpeechEnabled?: boolean, idleMessages?: string[], idleTimeoutSeconds?: number, intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE', memoryReliability?: 'HIGH' | 'LOW', properties?: object, responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK', secondaryLanguage?: 'EN', speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING', speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST', understoodLanguages?: string[]): { data: object; }`\n\n**post** `/v1/persona`\n\nCreates a new persona for the authenticated project.\n\n### Parameters\n\n- `accent: string`\n Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with optional variants\n\n- `gender: 'MALE' | 'FEMALE'`\n Gender of the persona\n\n- `language: string`\n Primary language ISO 639-1 code for the persona\n\n- `name: string`\n The name the agent will identify as during conversations\n\n- `backgroundNoise?: string`\n Background noise setting\n\n- `backstoryPrompt?: string`\n Background story and behavioral patterns for the persona\n\n- `baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'`\n Base emotional state of the persona\n\n- `confirmationStyle?: 'EXPLICIT' | 'VAGUE'`\n How the persona confirms information\n\n- `description?: string`\n Human-readable description of the persona\n\n- `hasDisfluencies?: boolean`\n Whether the persona uses filler words like \"um\" and \"uh\"\n\n- `idleMessageMaxSpokenCount?: number`\n Maximum number of idle messages the persona will send before giving up\n\n- `idleMessageResetCountOnUserSpeechEnabled?: boolean`\n Whether the idle message counter resets when the agent speaks\n\n- `idleMessages?: string[]`\n Messages the persona will say when the agent goes silent during a call. Defaults to language-appropriate phrases when omitted or sent as null.\n\n- `idleTimeoutSeconds?: number`\n Seconds of silence before the persona sends an idle message\n\n- `intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'`\n How clearly the persona expresses their intentions\n\n- `memoryReliability?: 'HIGH' | 'LOW'`\n How reliable the persona's memory is\n\n- `properties?: object`\n Additional custom properties about the persona\n\n- `responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK'`\n Controls how quickly the persona responds to pauses in conversation (QUICK, NORMAL, RELAXED)\n\n- `secondaryLanguage?: 'EN'`\n Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)\n\n- `speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'`\n Speech clarity of the persona\n\n- `speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'`\n Speech pace of the persona\n\n- `understoodLanguages?: string[]`\n Languages the persona can understand. Defaults to the languages the persona speaks.\n\n### Returns\n\n- `{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; }`\n\n - `data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationPersona = await client.simulationPersona.create({\n accent: 'US',\n gender: 'MALE',\n language: 'EN',\n name: 'name',\n});\n\nconsole.log(simulationPersona);\n```",
1073
1088
  perLanguage: {
1074
- http: {
1089
+ typescript: {
1090
+ method: 'client.simulationPersona.create',
1075
1091
  example:
1076
- 'curl https://api.roark.ai/v1/simulation/scenario \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "name": "x",\n "steps": [\n {\n "content": "content",\n "type": "AGENT_TURN"\n }\n ]\n }\'',
1092
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationPersona = await client.simulationPersona.create({\n accent: 'US',\n gender: 'MALE',\n language: 'EN',\n name: 'name',\n});\n\nconsole.log(simulationPersona.data);",
1077
1093
  },
1078
1094
  python: {
1079
- method: 'simulation_scenario.create',
1095
+ method: 'simulation_persona.create',
1080
1096
  example:
1081
- 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_scenario = client.simulation_scenario.create(\n name="x",\n steps=[{\n "content": "content",\n "type": "AGENT_TURN",\n }],\n)\nprint(simulation_scenario.data)',
1097
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_persona = client.simulation_persona.create(\n accent="US",\n gender="MALE",\n language="EN",\n name="name",\n)\nprint(simulation_persona.data)',
1082
1098
  },
1083
- typescript: {
1084
- method: 'client.simulationScenario.create',
1099
+ http: {
1085
1100
  example:
1086
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationScenario = await client.simulationScenario.create({\n name: 'x',\n steps: [{ content: 'content', type: 'AGENT_TURN' }],\n});\n\nconsole.log(simulationScenario.data);",
1101
+ 'curl https://api.roark.ai/v1/persona \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "accent": "US",\n "gender": "MALE",\n "language": "EN",\n "name": "name",\n "backstoryPrompt": "A busy professional calling during lunch break",\n "properties": {\n "age": "bar",\n "zipCode": "bar",\n "occupation": "bar"\n }\n }\'',
1087
1102
  },
1088
1103
  },
1089
1104
  },
1090
1105
  {
1091
1106
  name: 'update',
1092
- endpoint: '/v1/simulation/scenario/{scenarioId}',
1107
+ endpoint: '/v1/persona/{personaId}',
1093
1108
  httpMethod: 'put',
1094
- summary: 'Update a scenario',
1095
- description: 'Updates an existing simulation scenario by its ID.',
1096
- stainlessPath: '(resource) simulationScenario > (method) update',
1097
- qualified: 'client.simulationScenario.update',
1109
+ summary: 'Update a persona',
1110
+ description: 'Updates an existing persona by its ID.',
1111
+ stainlessPath: '(resource) simulationPersona > (method) update',
1112
+ qualified: 'client.simulationPersona.update',
1098
1113
  params: [
1099
- 'scenarioId: string;',
1100
- "stepChanges: { action: 'create'; content: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; } | { action: 'update'; nodeId: string; content?: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; type?: string; } | { action: 'delete'; nodeId: string; }[];",
1114
+ 'personaId: string;',
1115
+ 'accent?: string;',
1116
+ 'backgroundNoise?: string;',
1117
+ 'backstoryPrompt?: string;',
1118
+ "baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';",
1119
+ "confirmationStyle?: 'EXPLICIT' | 'VAGUE';",
1120
+ 'description?: string;',
1121
+ "gender?: 'MALE' | 'FEMALE';",
1122
+ 'hasDisfluencies?: boolean;',
1123
+ 'idleMessageMaxSpokenCount?: number;',
1124
+ 'idleMessageResetCountOnUserSpeechEnabled?: boolean;',
1125
+ 'idleMessages?: string[];',
1126
+ 'idleTimeoutSeconds?: number;',
1127
+ "intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE';",
1128
+ 'language?: string;',
1129
+ "memoryReliability?: 'HIGH' | 'LOW';",
1101
1130
  'name?: string;',
1131
+ 'properties?: object;',
1132
+ "responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK';",
1133
+ "secondaryLanguage?: 'EN';",
1134
+ "speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';",
1135
+ "speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';",
1136
+ 'understoodLanguages?: string[];',
1102
1137
  ],
1103
1138
  response:
1104
- '{ data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }; }',
1139
+ "{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; }",
1105
1140
  markdown:
1106
- "## update\n\n`client.simulationScenario.update(scenarioId: string, stepChanges: { action: 'create'; content: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; } | { action: 'update'; nodeId: string; content?: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; type?: string; } | { action: 'delete'; nodeId: string; }[], name?: string): { data: object; }`\n\n**put** `/v1/simulation/scenario/{scenarioId}`\n\nUpdates an existing simulation scenario by its ID.\n\n### Parameters\n\n- `scenarioId: string`\n\n- `stepChanges: { action: 'create'; content: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; } | { action: 'update'; nodeId: string; content?: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; type?: string; } | { action: 'delete'; nodeId: string; }[]`\n List of step changes to apply to the scenario\n\n- `name?: string`\n New name for the scenario (updates the START node content)\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }; }`\n\n - `data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationScenario = await client.simulationScenario.update('scenarioId', { stepChanges: [{\n action: 'create',\n content: 'content',\n type: 'AGENT_TURN',\n}] });\n\nconsole.log(simulationScenario);\n```",
1141
+ "## update\n\n`client.simulationPersona.update(personaId: string, accent?: string, backgroundNoise?: string, backstoryPrompt?: string, baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED', confirmationStyle?: 'EXPLICIT' | 'VAGUE', description?: string, gender?: 'MALE' | 'FEMALE', hasDisfluencies?: boolean, idleMessageMaxSpokenCount?: number, idleMessageResetCountOnUserSpeechEnabled?: boolean, idleMessages?: string[], idleTimeoutSeconds?: number, intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE', language?: string, memoryReliability?: 'HIGH' | 'LOW', name?: string, properties?: object, responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK', secondaryLanguage?: 'EN', speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING', speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST', understoodLanguages?: string[]): { data: object; }`\n\n**put** `/v1/persona/{personaId}`\n\nUpdates an existing persona by its ID.\n\n### Parameters\n\n- `personaId: string`\n\n- `accent?: string`\n Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with optional variants\n\n- `backgroundNoise?: string`\n Background noise setting\n\n- `backstoryPrompt?: string`\n Background story and behavioral patterns for the persona\n\n- `baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'`\n Base emotional state of the persona\n\n- `confirmationStyle?: 'EXPLICIT' | 'VAGUE'`\n How the persona confirms information\n\n- `description?: string`\n Human-readable description of the persona\n\n- `gender?: 'MALE' | 'FEMALE'`\n Gender of the persona\n\n- `hasDisfluencies?: boolean`\n Whether the persona uses filler words like \"um\" and \"uh\"\n\n- `idleMessageMaxSpokenCount?: number`\n Maximum number of idle messages the persona will send before giving up\n\n- `idleMessageResetCountOnUserSpeechEnabled?: boolean`\n Whether the idle message counter resets when the agent speaks\n\n- `idleMessages?: string[]`\n Messages the persona will say when the agent goes silent during a call. null = \"Automatic\": language-appropriate defaults are used at call time.\n\n- `idleTimeoutSeconds?: number`\n Seconds of silence before the persona sends an idle message\n\n- `intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'`\n How clearly the persona expresses their intentions\n\n- `language?: string`\n Primary language ISO 639-1 code for the persona\n\n- `memoryReliability?: 'HIGH' | 'LOW'`\n How reliable the persona's memory is\n\n- `name?: string`\n The name the agent will identify as during conversations\n\n- `properties?: object`\n Additional custom properties about the persona\n\n- `responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK'`\n Controls how quickly the persona responds to pauses in conversation (QUICK, NORMAL, RELAXED)\n\n- `secondaryLanguage?: 'EN'`\n Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)\n\n- `speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'`\n Speech clarity of the persona\n\n- `speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'`\n Speech pace of the persona\n\n- `understoodLanguages?: string[]`\n Languages the persona can understand. Multilingual combinations are limited by multilingual speech recognition support.\n\n### Returns\n\n- `{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; }`\n\n - `data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationPersona = await client.simulationPersona.update('personaId');\n\nconsole.log(simulationPersona);\n```",
1107
1142
  perLanguage: {
1108
- http: {
1143
+ typescript: {
1144
+ method: 'client.simulationPersona.update',
1109
1145
  example:
1110
- 'curl https://api.roark.ai/v1/simulation/scenario/$SCENARIO_ID \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "stepChanges": [\n {\n "action": "create",\n "content": "content",\n "type": "AGENT_TURN"\n }\n ]\n }\'',
1146
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationPersona = await client.simulationPersona.update('personaId');\n\nconsole.log(simulationPersona.data);",
1111
1147
  },
1112
1148
  python: {
1113
- method: 'simulation_scenario.update',
1149
+ method: 'simulation_persona.update',
1114
1150
  example:
1115
- 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_scenario = client.simulation_scenario.update(\n scenario_id="scenarioId",\n step_changes=[{\n "action": "create",\n "content": "content",\n "type": "AGENT_TURN",\n }],\n)\nprint(simulation_scenario.data)',
1151
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_persona = client.simulation_persona.update(\n persona_id="personaId",\n)\nprint(simulation_persona.data)',
1116
1152
  },
1117
- typescript: {
1118
- method: 'client.simulationScenario.update',
1153
+ http: {
1119
1154
  example:
1120
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationScenario = await client.simulationScenario.update('scenarioId', {\n stepChanges: [\n {\n action: 'create',\n content: 'content',\n type: 'AGENT_TURN',\n },\n ],\n});\n\nconsole.log(simulationScenario.data);",
1155
+ 'curl https://api.roark.ai/v1/persona/$PERSONA_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1121
1156
  },
1122
1157
  },
1123
1158
  },
1124
1159
  {
1125
- name: 'delete',
1126
- endpoint: '/v1/simulation/scenario/{scenarioId}',
1127
- httpMethod: 'delete',
1128
- summary: 'Delete a scenario',
1129
- description: 'Deletes a simulation scenario by its ID.',
1130
- stainlessPath: '(resource) simulationScenario > (method) delete',
1131
- qualified: 'client.simulationScenario.delete',
1132
- params: ['scenarioId: string;'],
1133
- response: '{ data: { deleted: boolean; }; }',
1160
+ name: 'list',
1161
+ endpoint: '/v1/simulation/environment',
1162
+ httpMethod: 'get',
1163
+ summary: 'List environments',
1164
+ description:
1165
+ "Returns a paginated list of environments: the project's own plus the environments Roark curates and shares across every project. Reference one by id when setting a customer flow variant's environment.",
1166
+ stainlessPath: '(resource) simulationEnvironment > (method) list',
1167
+ qualified: 'client.simulationEnvironment.list',
1168
+ params: ['after?: string;', 'limit?: number;'],
1169
+ response:
1170
+ '{ data: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }',
1134
1171
  markdown:
1135
- "## delete\n\n`client.simulationScenario.delete(scenarioId: string): { data: object; }`\n\n**delete** `/v1/simulation/scenario/{scenarioId}`\n\nDeletes a simulation scenario by its ID.\n\n### Parameters\n\n- `scenarioId: string`\n\n### Returns\n\n- `{ data: { deleted: boolean; }; }`\n\n - `data: { deleted: boolean; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationScenario = await client.simulationScenario.delete('scenarioId');\n\nconsole.log(simulationScenario);\n```",
1172
+ "## list\n\n`client.simulationEnvironment.list(after?: string, limit?: number): { data: object[]; pagination: object; }`\n\n**get** `/v1/simulation/environment`\n\nReturns a paginated list of environments: the project's own plus the environments Roark curates and shares across every project. Reference one by id when setting a customer flow variant's environment.\n\n### Parameters\n\n- `after?: string`\n\n- `limit?: number`\n\n### Returns\n\n- `{ data: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n Paginated list of environments: the project's own plus the shared Roark-curated ones\n\n - `data: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationEnvironments = await client.simulationEnvironment.list();\n\nconsole.log(simulationEnvironments);\n```",
1136
1173
  perLanguage: {
1137
- http: {
1174
+ typescript: {
1175
+ method: 'client.simulationEnvironment.list',
1138
1176
  example:
1139
- 'curl https://api.roark.ai/v1/simulation/scenario/$SCENARIO_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1177
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationEnvironments = await client.simulationEnvironment.list();\n\nconsole.log(simulationEnvironments.data);",
1140
1178
  },
1141
1179
  python: {
1142
- method: 'simulation_scenario.delete',
1180
+ method: 'simulation_environment.list',
1143
1181
  example:
1144
- 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_scenario = client.simulation_scenario.delete(\n "scenarioId",\n)\nprint(simulation_scenario.data)',
1182
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_environments = client.simulation_environment.list()\nprint(simulation_environments.data)',
1145
1183
  },
1184
+ http: {
1185
+ example:
1186
+ 'curl https://api.roark.ai/v1/simulation/environment \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1187
+ },
1188
+ },
1189
+ },
1190
+ {
1191
+ name: 'getById',
1192
+ endpoint: '/v1/simulation/environment/{environmentId}',
1193
+ httpMethod: 'get',
1194
+ summary: 'Get environment by ID',
1195
+ description: 'Returns a single environment by its ID.',
1196
+ stainlessPath: '(resource) simulationEnvironment > (method) getById',
1197
+ qualified: 'client.simulationEnvironment.getByID',
1198
+ params: ['environmentId: string;'],
1199
+ response:
1200
+ '{ data: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; }',
1201
+ markdown:
1202
+ "## getById\n\n`client.simulationEnvironment.getByID(environmentId: string): { data: object; }`\n\n**get** `/v1/simulation/environment/{environmentId}`\n\nReturns a single environment by its ID.\n\n### Parameters\n\n- `environmentId: string`\n\n### Returns\n\n- `{ data: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; }`\n\n - `data: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationEnvironment.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
1203
+ perLanguage: {
1146
1204
  typescript: {
1147
- method: 'client.simulationScenario.delete',
1205
+ method: 'client.simulationEnvironment.getByID',
1206
+ example:
1207
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationEnvironment.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);",
1208
+ },
1209
+ python: {
1210
+ method: 'simulation_environment.get_by_id',
1211
+ example:
1212
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.simulation_environment.get_by_id(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
1213
+ },
1214
+ http: {
1148
1215
  example:
1149
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationScenario = await client.simulationScenario.delete('scenarioId');\n\nconsole.log(simulationScenario.data);",
1216
+ 'curl https://api.roark.ai/v1/simulation/environment/$ENVIRONMENT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1150
1217
  },
1151
1218
  },
1152
1219
  },
1153
1220
  {
1154
1221
  name: 'list',
1155
- endpoint: '/v1/persona',
1222
+ endpoint: '/v1/customer-flow',
1156
1223
  httpMethod: 'get',
1157
- summary: 'List personas',
1158
- description: 'Returns a paginated list of personas for the authenticated project.',
1159
- stainlessPath: '(resource) simulationPersona > (method) list',
1160
- qualified: 'client.simulationPersona.list',
1161
- params: ['after?: string;', 'limit?: number;', 'searchText?: string;'],
1224
+ summary: 'List customer flows',
1225
+ description:
1226
+ "Returns a paginated list of customer flows with their agents, expectations, happy path and edge cases. The step graph is the one field omitted: reading it walks the project's whole step graph, so it comes back from the single-flow endpoint instead. Customer flows are how a project describes what to test; they replace the older simulation scenarios.",
1227
+ stainlessPath: '(resource) customerFlow > (method) list',
1228
+ qualified: 'client.customerFlow.list',
1229
+ params: [
1230
+ 'after?: string;',
1231
+ "includeSystem?: 'true' | 'false';",
1232
+ 'limit?: number;',
1233
+ 'searchText?: string;',
1234
+ "type?: 'SCRIPTED' | 'IMPROV' | 'VOICEMAIL';",
1235
+ ],
1162
1236
  response:
1163
- "{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
1237
+ "{ data: { id: string; agentExpectations: object[]; agents: object[]; branchingMode: 'DETERMINISTIC' | 'ADAPTIVE'; createdAt: string; edgeCases: object[]; happyPath: object; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'SCRIPTED'; updatedAt: string; description?: string; graph?: flow_step[]; } | { id: string; agentExpectations: object[]; agents: object[]; createdAt: string; edgeCases: object[]; happyPath: object; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'IMPROV'; updatedAt: string; description?: string; } | { id: string; agentExpectations: object[]; agents: object[]; createdAt: string; edgeCases: object[]; happyPath: object; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'VOICEMAIL'; updatedAt: string; description?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
1164
1238
  markdown:
1165
- "## list\n\n`client.simulationPersona.list(after?: string, limit?: number, searchText?: string): { data: object[]; pagination: object; }`\n\n**get** `/v1/persona`\n\nReturns a paginated list of personas for the authenticated project.\n\n### Parameters\n\n- `after?: string`\n\n- `limit?: number`\n\n- `searchText?: string`\n\n### Returns\n\n- `{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n\n - `data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationPersonas = await client.simulationPersona.list();\n\nconsole.log(simulationPersonas);\n```",
1239
+ "## list\n\n`client.customerFlow.list(after?: string, includeSystem?: 'true' | 'false', limit?: number, searchText?: string, type?: 'SCRIPTED' | 'IMPROV' | 'VOICEMAIL'): { data: object | object | object[]; pagination: object; }`\n\n**get** `/v1/customer-flow`\n\nReturns a paginated list of customer flows with their agents, expectations, happy path and edge cases. The step graph is the one field omitted: reading it walks the project's whole step graph, so it comes back from the single-flow endpoint instead. Customer flows are how a project describes what to test; they replace the older simulation scenarios.\n\n### Parameters\n\n- `after?: string`\n\n- `includeSystem?: 'true' | 'false'`\n\n- `limit?: number`\n\n- `searchText?: string`\n\n- `type?: 'SCRIPTED' | 'IMPROV' | 'VOICEMAIL'`\n\n### Returns\n\n- `{ data: { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; branchingMode: 'DETERMINISTIC' | 'ADAPTIVE'; createdAt: string; edgeCases: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: flow_step[]; title: string; type: 'SCRIPTED'; updatedAt: string; }[]; happyPath: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: flow_step[]; title: string; type: 'SCRIPTED'; updatedAt: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'SCRIPTED'; updatedAt: string; description?: string; graph?: object | object | object | object | object | object | object[]; } | { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; createdAt: string; edgeCases: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; }[]; happyPath: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'IMPROV'; updatedAt: string; description?: string; } | { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; createdAt: string; edgeCases: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }[]; happyPath: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'VOICEMAIL'; updatedAt: string; description?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n Paginated list of customer flows\n\n - `data: { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; branchingMode: 'DETERMINISTIC' | 'ADAPTIVE'; createdAt: string; edgeCases: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; title: string; type: 'SCRIPTED'; updatedAt: string; }[]; happyPath: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; title: string; type: 'SCRIPTED'; updatedAt: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'SCRIPTED'; updatedAt: string; description?: string; graph?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; }[]; } | { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; createdAt: string; edgeCases: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; }[]; happyPath: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'IMPROV'; updatedAt: string; description?: string; } | { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; createdAt: string; edgeCases: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }[]; happyPath: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'VOICEMAIL'; updatedAt: string; description?: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst customerFlows = await client.customerFlow.list();\n\nconsole.log(customerFlows);\n```",
1166
1240
  perLanguage: {
1167
- http: {
1241
+ typescript: {
1242
+ method: 'client.customerFlow.list',
1168
1243
  example:
1169
- 'curl https://api.roark.ai/v1/persona \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1244
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst customerFlows = await client.customerFlow.list();\n\nconsole.log(customerFlows.data);",
1170
1245
  },
1171
1246
  python: {
1172
- method: 'simulation_persona.list',
1247
+ method: 'customer_flow.list',
1173
1248
  example:
1174
- 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_personas = client.simulation_persona.list()\nprint(simulation_personas.data)',
1249
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\ncustomer_flows = client.customer_flow.list()\nprint(customer_flows.data)',
1175
1250
  },
1176
- typescript: {
1177
- method: 'client.simulationPersona.list',
1251
+ http: {
1178
1252
  example:
1179
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationPersonas = await client.simulationPersona.list();\n\nconsole.log(simulationPersonas.data);",
1253
+ 'curl https://api.roark.ai/v1/customer-flow \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1180
1254
  },
1181
1255
  },
1182
1256
  },
1183
1257
  {
1184
1258
  name: 'getById',
1185
- endpoint: '/v1/persona/{personaId}',
1259
+ endpoint: '/v1/customer-flow/{flowId}',
1186
1260
  httpMethod: 'get',
1187
- summary: 'Get persona by ID',
1188
- description: 'Returns a specific persona by its ID.',
1189
- stainlessPath: '(resource) simulationPersona > (method) getById',
1190
- qualified: 'client.simulationPersona.getByID',
1191
- params: ['personaId: string;'],
1261
+ summary: 'Get customer flow by ID',
1262
+ description:
1263
+ 'Returns a customer flow with its happy path, edge cases, expectations and linked agents. Scripted flows also carry their step graph.',
1264
+ stainlessPath: '(resource) customerFlow > (method) getById',
1265
+ qualified: 'client.customerFlow.getByID',
1266
+ params: ['flowId: string;'],
1192
1267
  response:
1193
- "{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; }",
1268
+ "{ data: { id: string; agentExpectations: object[]; agents: object[]; branchingMode: 'DETERMINISTIC' | 'ADAPTIVE'; createdAt: string; edgeCases: object[]; happyPath: object; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'SCRIPTED'; updatedAt: string; description?: string; graph?: flow_step[]; } | { id: string; agentExpectations: object[]; agents: object[]; createdAt: string; edgeCases: object[]; happyPath: object; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'IMPROV'; updatedAt: string; description?: string; } | { id: string; agentExpectations: object[]; agents: object[]; createdAt: string; edgeCases: object[]; happyPath: object; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'VOICEMAIL'; updatedAt: string; description?: string; }; }",
1194
1269
  markdown:
1195
- "## getById\n\n`client.simulationPersona.getByID(personaId: string): { data: object; }`\n\n**get** `/v1/persona/{personaId}`\n\nReturns a specific persona by its ID.\n\n### Parameters\n\n- `personaId: string`\n\n### Returns\n\n- `{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; }`\n\n - `data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationPersona.getByID('personaId');\n\nconsole.log(response);\n```",
1270
+ "## getById\n\n`client.customerFlow.getByID(flowId: string): { data: object | object | object; }`\n\n**get** `/v1/customer-flow/{flowId}`\n\nReturns a customer flow with its happy path, edge cases, expectations and linked agents. Scripted flows also carry their step graph.\n\n### Parameters\n\n- `flowId: string`\n\n### Returns\n\n- `{ data: { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; branchingMode: 'DETERMINISTIC' | 'ADAPTIVE'; createdAt: string; edgeCases: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: flow_step[]; title: string; type: 'SCRIPTED'; updatedAt: string; }[]; happyPath: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: flow_step[]; title: string; type: 'SCRIPTED'; updatedAt: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'SCRIPTED'; updatedAt: string; description?: string; graph?: object | object | object | object | object | object | object[]; } | { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; createdAt: string; edgeCases: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; }[]; happyPath: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'IMPROV'; updatedAt: string; description?: string; } | { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; createdAt: string; edgeCases: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }[]; happyPath: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'VOICEMAIL'; updatedAt: string; description?: string; }; }`\n\n - `data: { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; branchingMode: 'DETERMINISTIC' | 'ADAPTIVE'; createdAt: string; edgeCases: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; title: string; type: 'SCRIPTED'; updatedAt: string; }[]; happyPath: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; title: string; type: 'SCRIPTED'; updatedAt: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'SCRIPTED'; updatedAt: string; description?: string; graph?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; }[]; } | { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; createdAt: string; edgeCases: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; }[]; happyPath: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'IMPROV'; updatedAt: string; description?: string; } | { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; createdAt: string; edgeCases: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }[]; happyPath: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'VOICEMAIL'; updatedAt: string; description?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.customerFlow.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
1196
1271
  perLanguage: {
1197
- http: {
1272
+ typescript: {
1273
+ method: 'client.customerFlow.getByID',
1198
1274
  example:
1199
- 'curl https://api.roark.ai/v1/persona/$PERSONA_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1275
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.customerFlow.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);",
1200
1276
  },
1201
1277
  python: {
1202
- method: 'simulation_persona.get_by_id',
1278
+ method: 'customer_flow.get_by_id',
1203
1279
  example:
1204
- 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.simulation_persona.get_by_id(\n "personaId",\n)\nprint(response.data)',
1280
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.customer_flow.get_by_id(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
1205
1281
  },
1206
- typescript: {
1207
- method: 'client.simulationPersona.getByID',
1282
+ http: {
1208
1283
  example:
1209
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.simulationPersona.getByID('personaId');\n\nconsole.log(response.data);",
1284
+ 'curl https://api.roark.ai/v1/customer-flow/$FLOW_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1210
1285
  },
1211
1286
  },
1212
1287
  },
1213
1288
  {
1214
1289
  name: 'create',
1215
- endpoint: '/v1/persona',
1290
+ endpoint: '/v1/customer-flow',
1216
1291
  httpMethod: 'post',
1217
- summary: 'Create a new persona',
1218
- description: 'Creates a new persona for the authenticated project.',
1219
- stainlessPath: '(resource) simulationPersona > (method) create',
1220
- qualified: 'client.simulationPersona.create',
1292
+ summary: 'Create a customer flow',
1293
+ description:
1294
+ 'Creates a customer flow. A SCRIPTED flow carries a step graph and gets one way of running it per path through the graph; an IMPROV flow carries the briefs you send. Customer flows replace the older simulation scenarios, so build a flow for anything new.',
1295
+ stainlessPath: '(resource) customerFlow > (method) create',
1296
+ qualified: 'client.customerFlow.create',
1221
1297
  params: [
1222
- 'accent: string;',
1223
- "gender: 'MALE' | 'FEMALE';",
1224
- 'language: string;',
1225
- 'name: string;',
1226
- 'backgroundNoise?: string;',
1227
- 'backstoryPrompt?: string;',
1228
- "baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';",
1229
- "confirmationStyle?: 'EXPLICIT' | 'VAGUE';",
1298
+ "{ graph: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; }[]; title: string; type: 'SCRIPTED'; agentExpectations?: { prompt: string; }[]; agentIds?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; } | { agentIds: string[]; happyPath: { environmentId: string; personaOverrideId: string; title: string; precededByCustomerFlowId?: string; precededByCustomerFlowVariantId?: string; prompt?: string; }; title: string; type: 'IMPROV'; agentExpectations?: { prompt: string; }[]; description?: string; edgeCases?: { title: string; environmentId?: string; personaOverrideId?: string; precededByCustomerFlowId?: string; precededByCustomerFlowVariantId?: string; prompt?: string; }[]; };",
1299
+ ],
1300
+ response:
1301
+ "{ data: { id: string; agentExpectations: object[]; agents: object[]; branchingMode: 'DETERMINISTIC' | 'ADAPTIVE'; createdAt: string; edgeCases: object[]; happyPath: object; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'SCRIPTED'; updatedAt: string; description?: string; graph?: flow_step[]; } | { id: string; agentExpectations: object[]; agents: object[]; createdAt: string; edgeCases: object[]; happyPath: object; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'IMPROV'; updatedAt: string; description?: string; } | { id: string; agentExpectations: object[]; agents: object[]; createdAt: string; edgeCases: object[]; happyPath: object; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'VOICEMAIL'; updatedAt: string; description?: string; }; }",
1302
+ perLanguage: {
1303
+ typescript: {
1304
+ method: 'client.customerFlow.create',
1305
+ example:
1306
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst customerFlow = await client.customerFlow.create({\n graph: [{ type: 'CUSTOMER_FIRST_MESSAGE' }],\n title: 'Reschedule an appointment',\n type: 'SCRIPTED',\n});\n\nconsole.log(customerFlow.data);",
1307
+ },
1308
+ python: {
1309
+ method: 'customer_flow.create',
1310
+ example:
1311
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\ncustomer_flow = client.customer_flow.create(\n graph=[{\n "type": "CUSTOMER_FIRST_MESSAGE"\n }],\n title="Reschedule an appointment",\n type="SCRIPTED",\n)\nprint(customer_flow.data)',
1312
+ },
1313
+ http: {
1314
+ example:
1315
+ 'curl https://api.roark.ai/v1/customer-flow \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "graph": [\n {\n "type": "CUSTOMER_FIRST_MESSAGE",\n "content": "Hi, I need to move my appointment.",\n "steps": []\n }\n ],\n "title": "Reschedule an appointment",\n "type": "SCRIPTED",\n "agentIds": [\n "7c9e6679-7425-40de-944b-e07fc1f90ae7"\n ]\n }\'',
1316
+ },
1317
+ },
1318
+ },
1319
+ {
1320
+ name: 'update',
1321
+ endpoint: '/v1/customer-flow/{flowId}',
1322
+ httpMethod: 'put',
1323
+ summary: 'Update a customer flow',
1324
+ description:
1325
+ "Updates a flow's title, description, branching mode, linked agents or flow-level expectations. The step graph is replaced through PUT /graph.",
1326
+ stainlessPath: '(resource) customerFlow > (method) update',
1327
+ qualified: 'client.customerFlow.update',
1328
+ params: [
1329
+ 'flowId: string;',
1330
+ 'agentExpectations?: { prompt: string; }[];',
1331
+ 'agentIds?: string[];',
1332
+ "branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE';",
1230
1333
  'description?: string;',
1231
- 'hasDisfluencies?: boolean;',
1232
- 'idleMessageMaxSpokenCount?: number;',
1233
- 'idleMessageResetCountOnUserSpeechEnabled?: boolean;',
1234
- 'idleMessages?: string[];',
1235
- 'idleTimeoutSeconds?: number;',
1236
- "intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE';",
1237
- "memoryReliability?: 'HIGH' | 'LOW';",
1238
- 'properties?: object;',
1239
- "responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK';",
1240
- "secondaryLanguage?: 'EN';",
1241
- "speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';",
1242
- "speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';",
1334
+ 'title?: string;',
1243
1335
  ],
1244
1336
  response:
1245
- "{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; }",
1337
+ "{ data: { id: string; agentExpectations: object[]; agents: object[]; branchingMode: 'DETERMINISTIC' | 'ADAPTIVE'; createdAt: string; edgeCases: object[]; happyPath: object; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'SCRIPTED'; updatedAt: string; description?: string; graph?: flow_step[]; } | { id: string; agentExpectations: object[]; agents: object[]; createdAt: string; edgeCases: object[]; happyPath: object; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'IMPROV'; updatedAt: string; description?: string; } | { id: string; agentExpectations: object[]; agents: object[]; createdAt: string; edgeCases: object[]; happyPath: object; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'VOICEMAIL'; updatedAt: string; description?: string; }; }",
1338
+ markdown:
1339
+ "## update\n\n`client.customerFlow.update(flowId: string, agentExpectations?: { prompt: string; }[], agentIds?: string[], branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE', description?: string, title?: string): { data: object | object | object; }`\n\n**put** `/v1/customer-flow/{flowId}`\n\nUpdates a flow's title, description, branching mode, linked agents or flow-level expectations. The step graph is replaced through PUT /graph.\n\n### Parameters\n\n- `flowId: string`\n\n- `agentExpectations?: { prompt: string; }[]`\n Replaces the flow-level expectations. Omit to leave them unchanged.\n\n- `agentIds?: string[]`\n Replaces the linked agents. Omit to leave them unchanged. An improv flow must keep at least one; a scripted flow can be left with none.\n\n- `branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'`\n Scripted flows only.\n\n- `description?: string`\n\n- `title?: string`\n\n### Returns\n\n- `{ data: { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; branchingMode: 'DETERMINISTIC' | 'ADAPTIVE'; createdAt: string; edgeCases: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: flow_step[]; title: string; type: 'SCRIPTED'; updatedAt: string; }[]; happyPath: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: flow_step[]; title: string; type: 'SCRIPTED'; updatedAt: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'SCRIPTED'; updatedAt: string; description?: string; graph?: object | object | object | object | object | object | object[]; } | { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; createdAt: string; edgeCases: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; }[]; happyPath: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'IMPROV'; updatedAt: string; description?: string; } | { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; createdAt: string; edgeCases: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }[]; happyPath: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'VOICEMAIL'; updatedAt: string; description?: string; }; }`\n\n - `data: { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; branchingMode: 'DETERMINISTIC' | 'ADAPTIVE'; createdAt: string; edgeCases: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; title: string; type: 'SCRIPTED'; updatedAt: string; }[]; happyPath: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; title: string; type: 'SCRIPTED'; updatedAt: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'SCRIPTED'; updatedAt: string; description?: string; graph?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; }[]; } | { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; createdAt: string; edgeCases: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; }[]; happyPath: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'IMPROV'; updatedAt: string; description?: string; } | { id: string; agentExpectations: { id: string; prompt: string; }[]; agents: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; createdAt: string; edgeCases: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }[]; happyPath: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; source: 'SYSTEM' | 'CUSTOM'; title: string; type: 'VOICEMAIL'; updatedAt: string; description?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst customerFlow = await client.customerFlow.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(customerFlow);\n```",
1340
+ perLanguage: {
1341
+ typescript: {
1342
+ method: 'client.customerFlow.update',
1343
+ example:
1344
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst customerFlow = await client.customerFlow.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(customerFlow.data);",
1345
+ },
1346
+ python: {
1347
+ method: 'customer_flow.update',
1348
+ example:
1349
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\ncustomer_flow = client.customer_flow.update(\n flow_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(customer_flow.data)',
1350
+ },
1351
+ http: {
1352
+ example:
1353
+ 'curl https://api.roark.ai/v1/customer-flow/$FLOW_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1354
+ },
1355
+ },
1356
+ },
1357
+ {
1358
+ name: 'delete',
1359
+ endpoint: '/v1/customer-flow/{flowId}',
1360
+ httpMethod: 'delete',
1361
+ summary: 'Delete a customer flow',
1362
+ description:
1363
+ 'Soft-deletes a customer flow along with its edge cases, expectations and (for scripted flows) its step graph. Run plans that linked it drop it from their test cases.',
1364
+ stainlessPath: '(resource) customerFlow > (method) delete',
1365
+ qualified: 'client.customerFlow.delete',
1366
+ params: ['flowId: string;'],
1367
+ response: '{ data: { deleted: boolean; }; }',
1368
+ markdown:
1369
+ "## delete\n\n`client.customerFlow.delete(flowId: string): { data: object; }`\n\n**delete** `/v1/customer-flow/{flowId}`\n\nSoft-deletes a customer flow along with its edge cases, expectations and (for scripted flows) its step graph. Run plans that linked it drop it from their test cases.\n\n### Parameters\n\n- `flowId: string`\n\n### Returns\n\n- `{ data: { deleted: boolean; }; }`\n\n - `data: { deleted: boolean; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst customerFlow = await client.customerFlow.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(customerFlow);\n```",
1370
+ perLanguage: {
1371
+ typescript: {
1372
+ method: 'client.customerFlow.delete',
1373
+ example:
1374
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst customerFlow = await client.customerFlow.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(customerFlow.data);",
1375
+ },
1376
+ python: {
1377
+ method: 'customer_flow.delete',
1378
+ example:
1379
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\ncustomer_flow = client.customer_flow.delete(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(customer_flow.data)',
1380
+ },
1381
+ http: {
1382
+ example:
1383
+ 'curl https://api.roark.ai/v1/customer-flow/$FLOW_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1384
+ },
1385
+ },
1386
+ },
1387
+ {
1388
+ name: 'replaceGraph',
1389
+ endpoint: '/v1/customer-flow/{flowId}/graph',
1390
+ httpMethod: 'put',
1391
+ summary: "Replace a scripted flow's steps",
1392
+ description:
1393
+ "Replaces a scripted flow's conversation graph with the tree you send. This is a full replace, not a merge:\na step you omit is removed.\n\nInclude `nodeId` on a step to update the existing one, omit it to create a new step. Where two branches\nrejoin, keep the `mergeIntoNodeIds` references a read gave you. Dropping them un-merges those branches\nand is refused unless `allowUnmerge` is set.\n\nA change to the set of paths re-seeds how the flow runs, which the response reports as\n`variantsReshaped` along with the resulting happy path and edge cases.",
1394
+ stainlessPath: '(resource) customerFlow > (method) replaceGraph',
1395
+ qualified: 'client.customerFlow.replaceGraph',
1396
+ params: [
1397
+ 'flowId: string;',
1398
+ "graph: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; }[];",
1399
+ 'allowUnmerge?: boolean;',
1400
+ ],
1401
+ response:
1402
+ '{ data: { edgeCases: object | object | object[]; graph: flow_step[]; happyPath: object | object | object; variantsReshaped: boolean; warnings: string[]; }; }',
1403
+ markdown:
1404
+ "## replaceGraph\n\n`client.customerFlow.replaceGraph(flowId: string, graph: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[], allowUnmerge?: boolean): { data: object; }`\n\n**put** `/v1/customer-flow/{flowId}/graph`\n\nReplaces a scripted flow's conversation graph with the tree you send. This is a full replace, not a merge:\na step you omit is removed.\n\nInclude `nodeId` on a step to update the existing one, omit it to create a new step. Where two branches\nrejoin, keep the `mergeIntoNodeIds` references a read gave you. Dropping them un-merges those branches\nand is refused unless `allowUnmerge` is set.\n\nA change to the set of paths re-seeds how the flow runs, which the response reports as\n`variantsReshaped` along with the resulting happy path and edge cases.\n\n### Parameters\n\n- `flowId: string`\n\n- `graph: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; }[]`\n The complete graph. This replaces the flow's existing steps rather than merging into them.\n\n- `allowUnmerge?: boolean`\n Confirms a write that drops branches which currently rejoin. Only needed when the request omits mergeIntoNodeIds references the flow already had; a faithful round trip never needs it.\n\n### Returns\n\n- `{ data: { edgeCases: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: flow_step[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }[]; graph: object | object | object | object | object | object | object[]; happyPath: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: flow_step[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; variantsReshaped: boolean; warnings: string[]; }; }`\n\n - `data: { edgeCases: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }[]; graph: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; }[]; happyPath: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: flow_step[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: flow_step[]; }[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; variantsReshaped: boolean; warnings: string[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.customerFlow.replaceGraph('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { graph: [{ type: 'AGENT_TURN' }] });\n\nconsole.log(response);\n```",
1405
+ perLanguage: {
1406
+ typescript: {
1407
+ method: 'client.customerFlow.replaceGraph',
1408
+ example:
1409
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.customerFlow.replaceGraph('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n graph: [{ type: 'AGENT_TURN' }],\n});\n\nconsole.log(response.data);",
1410
+ },
1411
+ python: {
1412
+ method: 'customer_flow.replace_graph',
1413
+ example:
1414
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.customer_flow.replace_graph(\n flow_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n graph=[{\n "type": "AGENT_TURN"\n }],\n)\nprint(response.data)',
1415
+ },
1416
+ http: {
1417
+ example:
1418
+ 'curl https://api.roark.ai/v1/customer-flow/$FLOW_ID/graph \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "graph": [\n {\n "type": "AGENT_TURN"\n }\n ]\n }\'',
1419
+ },
1420
+ },
1421
+ },
1422
+ {
1423
+ name: 'updateHappyPath',
1424
+ endpoint: '/v1/customer-flow/{flowId}/happy-path',
1425
+ httpMethod: 'put',
1426
+ summary: "Update a flow's happy path",
1427
+ description:
1428
+ "Updates the happy path's title, persona, environment, brief or expectations. Omitted fields are left\nalone; `additionalExpectations` replaces the set wholesale rather than appending.\n\nIts persona and environment are what the edge cases inherit, so changing them here changes every edge\ncase that does not name its own.",
1429
+ stainlessPath: '(resource) customerFlow > (method) updateHappyPath',
1430
+ qualified: 'client.customerFlow.updateHappyPath',
1431
+ params: [
1432
+ 'flowId: string;',
1433
+ 'additionalExpectations?: { prompt: string; }[];',
1434
+ 'environmentId?: string;',
1435
+ 'personaOverrideId?: string;',
1436
+ 'precededByCustomerFlowId?: string;',
1437
+ 'precededByCustomerFlowVariantId?: string;',
1438
+ 'prompt?: string;',
1439
+ 'title?: string;',
1440
+ ],
1441
+ response:
1442
+ "{ data: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: flow_step[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; }",
1443
+ markdown:
1444
+ "## updateHappyPath\n\n`client.customerFlow.updateHappyPath(flowId: string, additionalExpectations?: { prompt: string; }[], environmentId?: string, personaOverrideId?: string, precededByCustomerFlowId?: string, precededByCustomerFlowVariantId?: string, prompt?: string, title?: string): { data: object | object | object; }`\n\n**put** `/v1/customer-flow/{flowId}/happy-path`\n\nUpdates the happy path's title, persona, environment, brief or expectations. Omitted fields are left\nalone; `additionalExpectations` replaces the set wholesale rather than appending.\n\nIts persona and environment are what the edge cases inherit, so changing them here changes every edge\ncase that does not name its own.\n\n### Parameters\n\n- `flowId: string`\n\n- `additionalExpectations?: { prompt: string; }[]`\n Replaces the expectations that apply to this variant on top of the flow's. Omit to leave them alone, send [] to clear. Improv flows only: a scripted variant's expectations come from the agent turns on its path and are rewritten on the next graph edit.\n\n- `environmentId?: string`\n\n- `personaOverrideId?: string`\n The persona this runs as. Null on an edge case inherits the happy path's.\n\n- `precededByCustomerFlowId?: string`\n\n- `precededByCustomerFlowVariantId?: string`\n\n- `prompt?: string`\n\n- `title?: string`\n\n### Returns\n\n- `{ data: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: object | object | object | object | object | object | object[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; }`\n\n - `data: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; }[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.customerFlow.updateHappyPath('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
1445
+ perLanguage: {
1446
+ typescript: {
1447
+ method: 'client.customerFlow.updateHappyPath',
1448
+ example:
1449
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.customerFlow.updateHappyPath('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);",
1450
+ },
1451
+ python: {
1452
+ method: 'customer_flow.update_happy_path',
1453
+ example:
1454
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.customer_flow.update_happy_path(\n flow_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
1455
+ },
1456
+ http: {
1457
+ example:
1458
+ 'curl https://api.roark.ai/v1/customer-flow/$FLOW_ID/happy-path \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1459
+ },
1460
+ },
1461
+ },
1462
+ {
1463
+ name: 'add',
1464
+ endpoint: '/v1/customer-flow/{flowId}/edge-case',
1465
+ httpMethod: 'post',
1466
+ summary: 'Add an edge case',
1467
+ description:
1468
+ "Adds a variant to an IMPROV flow.\n\nA scripted flow's variants are owned by the path engine, one per path through the graph, so they are\ncreated by editing the graph through PUT /v1/customer-flow/{flowId}/graph rather than here.\n\nLeave personaOverrideId or environmentId unset to inherit the happy path's.",
1469
+ stainlessPath: '(resource) customerFlowEdgeCase > (method) add',
1470
+ qualified: 'client.customerFlowEdgeCase.add',
1471
+ params: [
1472
+ 'flowId: string;',
1473
+ 'title: string;',
1474
+ 'environmentId?: string;',
1475
+ 'personaOverrideId?: string;',
1476
+ 'precededByCustomerFlowId?: string;',
1477
+ 'precededByCustomerFlowVariantId?: string;',
1478
+ 'prompt?: string;',
1479
+ ],
1480
+ response:
1481
+ "{ data: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: flow_step[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; }",
1482
+ markdown:
1483
+ "## add\n\n`client.customerFlowEdgeCase.add(flowId: string, title: string, environmentId?: string, personaOverrideId?: string, precededByCustomerFlowId?: string, precededByCustomerFlowVariantId?: string, prompt?: string): { data: object | object | object; }`\n\n**post** `/v1/customer-flow/{flowId}/edge-case`\n\nAdds a variant to an IMPROV flow.\n\nA scripted flow's variants are owned by the path engine, one per path through the graph, so they are\ncreated by editing the graph through PUT /v1/customer-flow/{flowId}/graph rather than here.\n\nLeave personaOverrideId or environmentId unset to inherit the happy path's.\n\n### Parameters\n\n- `flowId: string`\n\n- `title: string`\n\n- `environmentId?: string`\n\n- `personaOverrideId?: string`\n The persona this runs as. Omit to inherit the happy path's.\n\n- `precededByCustomerFlowId?: string`\n\n- `precededByCustomerFlowVariantId?: string`\n\n- `prompt?: string`\n\n### Returns\n\n- `{ data: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: object | object | object | object | object | object | object[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; }`\n\n - `data: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; }[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.customerFlowEdgeCase.add('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { title: 'x' });\n\nconsole.log(response);\n```",
1484
+ perLanguage: {
1485
+ typescript: {
1486
+ method: 'client.customerFlowEdgeCase.add',
1487
+ example:
1488
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.customerFlowEdgeCase.add('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n title: 'x',\n});\n\nconsole.log(response.data);",
1489
+ },
1490
+ python: {
1491
+ method: 'customer_flow_edge_case.add',
1492
+ example:
1493
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.customer_flow_edge_case.add(\n flow_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n title="x",\n)\nprint(response.data)',
1494
+ },
1495
+ http: {
1496
+ example:
1497
+ 'curl https://api.roark.ai/v1/customer-flow/$FLOW_ID/edge-case \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "title": "x"\n }\'',
1498
+ },
1499
+ },
1500
+ },
1501
+ {
1502
+ name: 'update',
1503
+ endpoint: '/v1/customer-flow/{flowId}/edge-case/{edgeCaseId}',
1504
+ httpMethod: 'put',
1505
+ summary: 'Update an edge case',
1506
+ description:
1507
+ "Updates an edge case's title, persona, environment, brief, preceded-by link or expectations. Omitted fields are left alone; `additionalExpectations` replaces the set wholesale rather than appending. Promoting it to the happy path is a separate call, since that also demotes the incumbent.",
1508
+ stainlessPath: '(resource) customerFlowEdgeCase > (method) update',
1509
+ qualified: 'client.customerFlowEdgeCase.update',
1510
+ params: [
1511
+ 'flowId: string;',
1512
+ 'edgeCaseId: string;',
1513
+ 'additionalExpectations?: { prompt: string; }[];',
1514
+ 'environmentId?: string;',
1515
+ 'personaOverrideId?: string;',
1516
+ 'precededByCustomerFlowId?: string;',
1517
+ 'precededByCustomerFlowVariantId?: string;',
1518
+ 'prompt?: string;',
1519
+ 'title?: string;',
1520
+ ],
1521
+ response:
1522
+ "{ data: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: flow_step[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; }",
1523
+ markdown:
1524
+ "## update\n\n`client.customerFlowEdgeCase.update(flowId: string, edgeCaseId: string, additionalExpectations?: { prompt: string; }[], environmentId?: string, personaOverrideId?: string, precededByCustomerFlowId?: string, precededByCustomerFlowVariantId?: string, prompt?: string, title?: string): { data: object | object | object; }`\n\n**put** `/v1/customer-flow/{flowId}/edge-case/{edgeCaseId}`\n\nUpdates an edge case's title, persona, environment, brief, preceded-by link or expectations. Omitted fields are left alone; `additionalExpectations` replaces the set wholesale rather than appending. Promoting it to the happy path is a separate call, since that also demotes the incumbent.\n\n### Parameters\n\n- `flowId: string`\n\n- `edgeCaseId: string`\n\n- `additionalExpectations?: { prompt: string; }[]`\n Replaces the expectations that apply to this variant on top of the flow's. Omit to leave them alone, send [] to clear. Improv flows only: a scripted variant's expectations come from the agent turns on its path and are rewritten on the next graph edit.\n\n- `environmentId?: string`\n\n- `personaOverrideId?: string`\n The persona this runs as. Null on an edge case inherits the happy path's.\n\n- `precededByCustomerFlowId?: string`\n\n- `precededByCustomerFlowVariantId?: string`\n\n- `prompt?: string`\n\n- `title?: string`\n\n### Returns\n\n- `{ data: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: object | object | object | object | object | object | object[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; }`\n\n - `data: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; }[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst customerFlowEdgeCase = await client.customerFlowEdgeCase.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { flowId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(customerFlowEdgeCase);\n```",
1525
+ perLanguage: {
1526
+ typescript: {
1527
+ method: 'client.customerFlowEdgeCase.update',
1528
+ example:
1529
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst customerFlowEdgeCase = await client.customerFlowEdgeCase.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { flowId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(customerFlowEdgeCase.data);",
1530
+ },
1531
+ python: {
1532
+ method: 'customer_flow_edge_case.update',
1533
+ example:
1534
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\ncustomer_flow_edge_case = client.customer_flow_edge_case.update(\n edge_case_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n flow_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(customer_flow_edge_case.data)',
1535
+ },
1536
+ http: {
1537
+ example:
1538
+ 'curl https://api.roark.ai/v1/customer-flow/$FLOW_ID/edge-case/$EDGE_CASE_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1539
+ },
1540
+ },
1541
+ },
1542
+ {
1543
+ name: 'remove',
1544
+ endpoint: '/v1/customer-flow/{flowId}/edge-case/{edgeCaseId}',
1545
+ httpMethod: 'delete',
1546
+ summary: 'Remove an edge case',
1547
+ description:
1548
+ 'Soft-deletes a variant. On a scripted flow the path engine re-creates a variant for any path still in the graph, so remove the path through PUT /graph instead if that is what you meant.',
1549
+ stainlessPath: '(resource) customerFlowEdgeCase > (method) remove',
1550
+ qualified: 'client.customerFlowEdgeCase.remove',
1551
+ params: ['flowId: string;', 'edgeCaseId: string;'],
1552
+ response: '{ data: { deleted: boolean; }; }',
1246
1553
  markdown:
1247
- "## create\n\n`client.simulationPersona.create(accent: string, gender: 'MALE' | 'FEMALE', language: string, name: string, backgroundNoise?: string, backstoryPrompt?: string, baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED', confirmationStyle?: 'EXPLICIT' | 'VAGUE', description?: string, hasDisfluencies?: boolean, idleMessageMaxSpokenCount?: number, idleMessageResetCountOnUserSpeechEnabled?: boolean, idleMessages?: string[], idleTimeoutSeconds?: number, intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE', memoryReliability?: 'HIGH' | 'LOW', properties?: object, responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK', secondaryLanguage?: 'EN', speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING', speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'): { data: object; }`\n\n**post** `/v1/persona`\n\nCreates a new persona for the authenticated project.\n\n### Parameters\n\n- `accent: string`\n Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with optional variants\n\n- `gender: 'MALE' | 'FEMALE'`\n Gender of the persona\n\n- `language: string`\n Primary language ISO 639-1 code for the persona\n\n- `name: string`\n The name the agent will identify as during conversations\n\n- `backgroundNoise?: string`\n Background noise setting\n\n- `backstoryPrompt?: string`\n Background story and behavioral patterns for the persona\n\n- `baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'`\n Base emotional state of the persona\n\n- `confirmationStyle?: 'EXPLICIT' | 'VAGUE'`\n How the persona confirms information\n\n- `description?: string`\n Human-readable description of the persona\n\n- `hasDisfluencies?: boolean`\n Whether the persona uses filler words like \"um\" and \"uh\"\n\n- `idleMessageMaxSpokenCount?: number`\n Maximum number of idle messages the persona will send before giving up\n\n- `idleMessageResetCountOnUserSpeechEnabled?: boolean`\n Whether the idle message counter resets when the agent speaks\n\n- `idleMessages?: string[]`\n Messages the persona will say when the agent goes silent during a call\n\n- `idleTimeoutSeconds?: number`\n Seconds of silence before the persona sends an idle message\n\n- `intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'`\n How clearly the persona expresses their intentions\n\n- `memoryReliability?: 'HIGH' | 'LOW'`\n How reliable the persona's memory is\n\n- `properties?: object`\n Additional custom properties about the persona\n\n- `responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK'`\n Controls how quickly the persona responds to pauses in conversation (QUICK, NORMAL, RELAXED)\n\n- `secondaryLanguage?: 'EN'`\n Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)\n\n- `speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'`\n Speech clarity of the persona\n\n- `speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'`\n Speech pace of the persona\n\n### Returns\n\n- `{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; }`\n\n - `data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationPersona = await client.simulationPersona.create({\n accent: 'US',\n gender: 'MALE',\n language: 'EN',\n name: 'name',\n});\n\nconsole.log(simulationPersona);\n```",
1554
+ "## remove\n\n`client.customerFlowEdgeCase.remove(flowId: string, edgeCaseId: string): { data: object; }`\n\n**delete** `/v1/customer-flow/{flowId}/edge-case/{edgeCaseId}`\n\nSoft-deletes a variant. On a scripted flow the path engine re-creates a variant for any path still in the graph, so remove the path through PUT /graph instead if that is what you meant.\n\n### Parameters\n\n- `flowId: string`\n\n- `edgeCaseId: string`\n\n### Returns\n\n- `{ data: { deleted: boolean; }; }`\n\n - `data: { deleted: boolean; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst customerFlowEdgeCase = await client.customerFlowEdgeCase.remove('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { flowId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(customerFlowEdgeCase);\n```",
1248
1555
  perLanguage: {
1249
- http: {
1556
+ typescript: {
1557
+ method: 'client.customerFlowEdgeCase.remove',
1250
1558
  example:
1251
- 'curl https://api.roark.ai/v1/persona \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "accent": "US",\n "gender": "MALE",\n "language": "EN",\n "name": "name",\n "backstoryPrompt": "A busy professional calling during lunch break",\n "properties": {\n "age": "bar",\n "zipCode": "bar",\n "occupation": "bar"\n }\n }\'',
1559
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst customerFlowEdgeCase = await client.customerFlowEdgeCase.remove(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { flowId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(customerFlowEdgeCase.data);",
1252
1560
  },
1253
1561
  python: {
1254
- method: 'simulation_persona.create',
1562
+ method: 'customer_flow_edge_case.remove',
1255
1563
  example:
1256
- 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_persona = client.simulation_persona.create(\n accent="US",\n gender="MALE",\n language="EN",\n name="name",\n)\nprint(simulation_persona.data)',
1564
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\ncustomer_flow_edge_case = client.customer_flow_edge_case.remove(\n edge_case_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n flow_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(customer_flow_edge_case.data)',
1257
1565
  },
1258
- typescript: {
1259
- method: 'client.simulationPersona.create',
1566
+ http: {
1260
1567
  example:
1261
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationPersona = await client.simulationPersona.create({\n accent: 'US',\n gender: 'MALE',\n language: 'EN',\n name: 'name',\n});\n\nconsole.log(simulationPersona.data);",
1568
+ 'curl https://api.roark.ai/v1/customer-flow/$FLOW_ID/edge-case/$EDGE_CASE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1262
1569
  },
1263
1570
  },
1264
1571
  },
1265
1572
  {
1266
- name: 'update',
1267
- endpoint: '/v1/persona/{personaId}',
1268
- httpMethod: 'put',
1269
- summary: 'Update a persona',
1270
- description: 'Updates an existing persona by its ID.',
1271
- stainlessPath: '(resource) simulationPersona > (method) update',
1272
- qualified: 'client.simulationPersona.update',
1273
- params: [
1274
- 'personaId: string;',
1275
- 'accent?: string;',
1276
- 'backgroundNoise?: string;',
1277
- 'backstoryPrompt?: string;',
1278
- "baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';",
1279
- "confirmationStyle?: 'EXPLICIT' | 'VAGUE';",
1280
- 'description?: string;',
1281
- "gender?: 'MALE' | 'FEMALE';",
1282
- 'hasDisfluencies?: boolean;',
1283
- 'idleMessageMaxSpokenCount?: number;',
1284
- 'idleMessageResetCountOnUserSpeechEnabled?: boolean;',
1285
- 'idleMessages?: string[];',
1286
- 'idleTimeoutSeconds?: number;',
1287
- "intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE';",
1288
- 'language?: string;',
1289
- "memoryReliability?: 'HIGH' | 'LOW';",
1290
- 'name?: string;',
1291
- 'properties?: object;',
1292
- "responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK';",
1293
- "secondaryLanguage?: 'EN';",
1294
- "speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';",
1295
- "speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';",
1296
- ],
1573
+ name: 'promote',
1574
+ endpoint: '/v1/customer-flow/{flowId}/edge-case/{edgeCaseId}/promote',
1575
+ httpMethod: 'post',
1576
+ summary: 'Promote an edge case to the happy path',
1577
+ description:
1578
+ "Makes this edge case the flow's happy path, and the outgoing happy path an edge case. Its persona and environment are baked into it first, so edge cases that were inheriting keep the configuration they had.",
1579
+ stainlessPath: '(resource) customerFlowEdgeCase > (method) promote',
1580
+ qualified: 'client.customerFlowEdgeCase.promote',
1581
+ params: ['flowId: string;', 'edgeCaseId: string;'],
1297
1582
  response:
1298
- "{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; }",
1583
+ "{ data: { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: flow_step[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: object[]; createdAt: string; environment: object; isGenerated: boolean; personaOverride: object; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; }",
1299
1584
  markdown:
1300
- "## update\n\n`client.simulationPersona.update(personaId: string, accent?: string, backgroundNoise?: string, backstoryPrompt?: string, baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED', confirmationStyle?: 'EXPLICIT' | 'VAGUE', description?: string, gender?: 'MALE' | 'FEMALE', hasDisfluencies?: boolean, idleMessageMaxSpokenCount?: number, idleMessageResetCountOnUserSpeechEnabled?: boolean, idleMessages?: string[], idleTimeoutSeconds?: number, intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE', language?: string, memoryReliability?: 'HIGH' | 'LOW', name?: string, properties?: object, responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK', secondaryLanguage?: 'EN', speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING', speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'): { data: object; }`\n\n**put** `/v1/persona/{personaId}`\n\nUpdates an existing persona by its ID.\n\n### Parameters\n\n- `personaId: string`\n\n- `accent?: string`\n Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with optional variants\n\n- `backgroundNoise?: string`\n Background noise setting\n\n- `backstoryPrompt?: string`\n Background story and behavioral patterns for the persona\n\n- `baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'`\n Base emotional state of the persona\n\n- `confirmationStyle?: 'EXPLICIT' | 'VAGUE'`\n How the persona confirms information\n\n- `description?: string`\n Human-readable description of the persona\n\n- `gender?: 'MALE' | 'FEMALE'`\n Gender of the persona\n\n- `hasDisfluencies?: boolean`\n Whether the persona uses filler words like \"um\" and \"uh\"\n\n- `idleMessageMaxSpokenCount?: number`\n Maximum number of idle messages the persona will send before giving up\n\n- `idleMessageResetCountOnUserSpeechEnabled?: boolean`\n Whether the idle message counter resets when the agent speaks\n\n- `idleMessages?: string[]`\n Messages the persona will say when the agent goes silent during a call\n\n- `idleTimeoutSeconds?: number`\n Seconds of silence before the persona sends an idle message\n\n- `intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'`\n How clearly the persona expresses their intentions\n\n- `language?: string`\n Primary language ISO 639-1 code for the persona\n\n- `memoryReliability?: 'HIGH' | 'LOW'`\n How reliable the persona's memory is\n\n- `name?: string`\n The name the agent will identify as during conversations\n\n- `properties?: object`\n Additional custom properties about the persona\n\n- `responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK'`\n Controls how quickly the persona responds to pauses in conversation (QUICK, NORMAL, RELAXED)\n\n- `secondaryLanguage?: 'EN'`\n Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)\n\n- `speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'`\n Speech clarity of the persona\n\n- `speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'`\n Speech pace of the persona\n\n### Returns\n\n- `{ data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; }`\n\n - `data: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationPersona = await client.simulationPersona.update('personaId');\n\nconsole.log(simulationPersona);\n```",
1585
+ "## promote\n\n`client.customerFlowEdgeCase.promote(flowId: string, edgeCaseId: string): { data: object | object | object; }`\n\n**post** `/v1/customer-flow/{flowId}/edge-case/{edgeCaseId}/promote`\n\nMakes this edge case the flow's happy path, and the outgoing happy path an edge case. Its persona and environment are baked into it first, so edge cases that were inheriting keep the configuration they had.\n\n### Parameters\n\n- `flowId: string`\n\n- `edgeCaseId: string`\n\n### Returns\n\n- `{ data: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: object | object | object | object | object | object | object[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }; }`\n\n - `data: { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; steps: { type: 'AGENT_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_TURN'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_FIRST_MESSAGE'; content?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_SILENCE'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; silenceDurationSeconds?: number; steps?: object | object | object | object | object | object | object[]; } | { type: 'CUSTOMER_DTMF'; dtmfDigits?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'VOICEMAIL'; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; } | { type: 'SCENARIO_LINK'; linkedCustomerFlowId?: string; linkedCustomerFlowVariantId?: string; mergeIntoNodeIds?: string[]; nodeId?: string; ref?: string; steps?: object | object | object | object | object | object | object[]; }[]; title: string; type: 'SCRIPTED'; updatedAt: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'IMPROV'; updatedAt: string; prompt?: string; } | { id: string; additionalExpectations: { id: string; prompt: string; }[]; createdAt: string; environment: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; isGenerated: boolean; personaOverride: { id: string; accent: string; backgroundNoise: string; baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; secondaryLanguage?: 'EN'; }; precededByCustomerFlowId: string; precededByCustomerFlowVariantId: string; title: string; type: 'VOICEMAIL'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.customerFlowEdgeCase.promote('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { flowId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(response);\n```",
1301
1586
  perLanguage: {
1302
- http: {
1587
+ typescript: {
1588
+ method: 'client.customerFlowEdgeCase.promote',
1303
1589
  example:
1304
- 'curl https://api.roark.ai/v1/persona/$PERSONA_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1590
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.customerFlowEdgeCase.promote('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n flowId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response.data);",
1305
1591
  },
1306
1592
  python: {
1307
- method: 'simulation_persona.update',
1593
+ method: 'customer_flow_edge_case.promote',
1308
1594
  example:
1309
- 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_persona = client.simulation_persona.update(\n persona_id="personaId",\n)\nprint(simulation_persona.data)',
1595
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.customer_flow_edge_case.promote(\n edge_case_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n flow_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
1310
1596
  },
1311
- typescript: {
1312
- method: 'client.simulationPersona.update',
1597
+ http: {
1313
1598
  example:
1314
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationPersona = await client.simulationPersona.update('personaId');\n\nconsole.log(simulationPersona.data);",
1599
+ 'curl https://api.roark.ai/v1/customer-flow/$FLOW_ID/edge-case/$EDGE_CASE_ID/promote \\\n -X POST \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1315
1600
  },
1316
1601
  },
1317
1602
  },
@@ -1329,19 +1614,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1329
1614
  markdown:
1330
1615
  "## list\n\n`client.agent.list(after?: string, limit?: number, searchText?: string): { data: object[]; pagination: object; }`\n\n**get** `/v1/agent`\n\nReturns a paginated list of agents for the authenticated project.\n\n### Parameters\n\n- `after?: string`\n\n- `limit?: number`\n\n- `searchText?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n\n - `data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agents = await client.agent.list();\n\nconsole.log(agents);\n```",
1331
1616
  perLanguage: {
1332
- http: {
1617
+ typescript: {
1618
+ method: 'client.agent.list',
1333
1619
  example:
1334
- 'curl https://api.roark.ai/v1/agent \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1620
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agents = await client.agent.list();\n\nconsole.log(agents.data);",
1335
1621
  },
1336
1622
  python: {
1337
1623
  method: 'agent.list',
1338
1624
  example:
1339
1625
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nagents = client.agent.list()\nprint(agents.data)',
1340
1626
  },
1341
- typescript: {
1342
- method: 'client.agent.list',
1627
+ http: {
1343
1628
  example:
1344
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agents = await client.agent.list();\n\nconsole.log(agents.data);",
1629
+ 'curl https://api.roark.ai/v1/agent \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1345
1630
  },
1346
1631
  },
1347
1632
  },
@@ -1359,19 +1644,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1359
1644
  markdown:
1360
1645
  "## getById\n\n`client.agent.getByID(agentId: string): { data: object; }`\n\n**get** `/v1/agent/{agentId}`\n\nReturns a specific agent by its ID.\n\n### Parameters\n\n- `agentId: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }`\n\n - `data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agent.getByID('agentId');\n\nconsole.log(response);\n```",
1361
1646
  perLanguage: {
1362
- http: {
1647
+ typescript: {
1648
+ method: 'client.agent.getByID',
1363
1649
  example:
1364
- 'curl https://api.roark.ai/v1/agent/$AGENT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1650
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.agent.getByID('agentId');\n\nconsole.log(response.data);",
1365
1651
  },
1366
1652
  python: {
1367
1653
  method: 'agent.get_by_id',
1368
1654
  example:
1369
1655
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.agent.get_by_id(\n "agentId",\n)\nprint(response.data)',
1370
1656
  },
1371
- typescript: {
1372
- method: 'client.agent.getByID',
1657
+ http: {
1373
1658
  example:
1374
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.agent.getByID('agentId');\n\nconsole.log(response.data);",
1659
+ 'curl https://api.roark.ai/v1/agent/$AGENT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1375
1660
  },
1376
1661
  },
1377
1662
  },
@@ -1389,19 +1674,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1389
1674
  markdown:
1390
1675
  "## create\n\n`client.agent.create(name: string, customId?: string, description?: string): { data: object; }`\n\n**post** `/v1/agent`\n\nCreates a new agent for the authenticated project.\n\n### Parameters\n\n- `name: string`\n Name of the agent\n\n- `customId?: string`\n Custom identifier for the agent\n\n- `description?: string`\n Description of the agent\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }`\n\n - `data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agent = await client.agent.create({ name: 'x' });\n\nconsole.log(agent);\n```",
1391
1676
  perLanguage: {
1392
- http: {
1677
+ typescript: {
1678
+ method: 'client.agent.create',
1393
1679
  example:
1394
- 'curl https://api.roark.ai/v1/agent \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "name": "x"\n }\'',
1680
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agent = await client.agent.create({ name: 'x' });\n\nconsole.log(agent.data);",
1395
1681
  },
1396
1682
  python: {
1397
1683
  method: 'agent.create',
1398
1684
  example:
1399
1685
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nagent = client.agent.create(\n name="x",\n)\nprint(agent.data)',
1400
1686
  },
1401
- typescript: {
1402
- method: 'client.agent.create',
1687
+ http: {
1403
1688
  example:
1404
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agent = await client.agent.create({ name: 'x' });\n\nconsole.log(agent.data);",
1689
+ 'curl https://api.roark.ai/v1/agent \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "name": "x"\n }\'',
1405
1690
  },
1406
1691
  },
1407
1692
  },
@@ -1419,19 +1704,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1419
1704
  markdown:
1420
1705
  "## update\n\n`client.agent.update(agentId: string, description?: string, name?: string): { data: object; }`\n\n**put** `/v1/agent/{agentId}`\n\nUpdates an existing agent by its ID.\n\n### Parameters\n\n- `agentId: string`\n\n- `description?: string`\n Description of the agent\n\n- `name?: string`\n Name of the agent\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }`\n\n - `data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agent = await client.agent.update('agentId');\n\nconsole.log(agent);\n```",
1421
1706
  perLanguage: {
1422
- http: {
1707
+ typescript: {
1708
+ method: 'client.agent.update',
1423
1709
  example:
1424
- 'curl https://api.roark.ai/v1/agent/$AGENT_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1710
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agent = await client.agent.update('agentId');\n\nconsole.log(agent.data);",
1425
1711
  },
1426
1712
  python: {
1427
1713
  method: 'agent.update',
1428
1714
  example:
1429
1715
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nagent = client.agent.update(\n agent_id="agentId",\n)\nprint(agent.data)',
1430
1716
  },
1431
- typescript: {
1432
- method: 'client.agent.update',
1717
+ http: {
1433
1718
  example:
1434
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agent = await client.agent.update('agentId');\n\nconsole.log(agent.data);",
1719
+ 'curl https://api.roark.ai/v1/agent/$AGENT_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1435
1720
  },
1436
1721
  },
1437
1722
  },
@@ -1445,23 +1730,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1445
1730
  qualified: 'client.agentEndpoint.list',
1446
1731
  params: ['after?: string;', 'agentId?: string;', 'limit?: number;', 'searchText?: string;'],
1447
1732
  response:
1448
- "{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; updatedAt: string; value: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
1733
+ "{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: string; updatedAt: string; value: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
1449
1734
  markdown:
1450
- "## list\n\n`client.agentEndpoint.list(after?: string, agentId?: string, limit?: number, searchText?: string): { data: object[]; pagination: object; }`\n\n**get** `/v1/agent/endpoint`\n\nReturns a paginated list of agent endpoints for the authenticated project.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - endpoint ID to start after\n\n- `agentId?: string`\n Filter by agent ID\n\n- `limit?: number`\n Maximum number of endpoints to return (default: 20, max: 50)\n\n- `searchText?: string`\n Search text to filter endpoints\n\n### Returns\n\n- `{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; updatedAt: string; value: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n\n - `data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; updatedAt: string; value: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentEndpoints = await client.agentEndpoint.list();\n\nconsole.log(agentEndpoints);\n```",
1735
+ "## list\n\n`client.agentEndpoint.list(after?: string, agentId?: string, limit?: number, searchText?: string): { data: object[]; pagination: object; }`\n\n**get** `/v1/agent/endpoint`\n\nReturns a paginated list of agent endpoints for the authenticated project.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - endpoint ID to start after\n\n- `agentId?: string`\n Filter by agent ID\n\n- `limit?: number`\n Maximum number of endpoints to return (default: 20, max: 50)\n\n- `searchText?: string`\n Search text to filter endpoints\n\n### Returns\n\n- `{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: string; updatedAt: string; value: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n\n - `data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: string; updatedAt: string; value: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentEndpoints = await client.agentEndpoint.list();\n\nconsole.log(agentEndpoints);\n```",
1451
1736
  perLanguage: {
1452
- http: {
1737
+ typescript: {
1738
+ method: 'client.agentEndpoint.list',
1453
1739
  example:
1454
- 'curl https://api.roark.ai/v1/agent/endpoint \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1740
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agentEndpoints = await client.agentEndpoint.list();\n\nconsole.log(agentEndpoints.data);",
1455
1741
  },
1456
1742
  python: {
1457
1743
  method: 'agent_endpoint.list',
1458
1744
  example:
1459
1745
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nagent_endpoints = client.agent_endpoint.list()\nprint(agent_endpoints.data)',
1460
1746
  },
1461
- typescript: {
1462
- method: 'client.agentEndpoint.list',
1747
+ http: {
1463
1748
  example:
1464
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agentEndpoints = await client.agentEndpoint.list();\n\nconsole.log(agentEndpoints.data);",
1749
+ 'curl https://api.roark.ai/v1/agent/endpoint \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1465
1750
  },
1466
1751
  },
1467
1752
  },
@@ -1475,23 +1760,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1475
1760
  qualified: 'client.agentEndpoint.getByID',
1476
1761
  params: ['endpointId: string;'],
1477
1762
  response:
1478
- "{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; updatedAt: string; value: string; }; }",
1763
+ "{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: string; updatedAt: string; value: string; }; }",
1479
1764
  markdown:
1480
- "## getById\n\n`client.agentEndpoint.getByID(endpointId: string): { data: object; }`\n\n**get** `/v1/agent/endpoint/{endpointId}`\n\nReturns a specific agent endpoint by its ID.\n\n### Parameters\n\n- `endpointId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; updatedAt: string; value: string; }; }`\n\n - `data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; updatedAt: string; value: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agentEndpoint.getByID('endpointId');\n\nconsole.log(response);\n```",
1765
+ "## getById\n\n`client.agentEndpoint.getByID(endpointId: string): { data: object; }`\n\n**get** `/v1/agent/endpoint/{endpointId}`\n\nReturns a specific agent endpoint by its ID.\n\n### Parameters\n\n- `endpointId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: string; updatedAt: string; value: string; }; }`\n\n - `data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: string; updatedAt: string; value: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agentEndpoint.getByID('endpointId');\n\nconsole.log(response);\n```",
1481
1766
  perLanguage: {
1482
- http: {
1767
+ typescript: {
1768
+ method: 'client.agentEndpoint.getByID',
1483
1769
  example:
1484
- 'curl https://api.roark.ai/v1/agent/endpoint/$ENDPOINT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1770
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.agentEndpoint.getByID('endpointId');\n\nconsole.log(response.data);",
1485
1771
  },
1486
1772
  python: {
1487
1773
  method: 'agent_endpoint.get_by_id',
1488
1774
  example:
1489
1775
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.agent_endpoint.get_by_id(\n "endpointId",\n)\nprint(response.data)',
1490
1776
  },
1491
- typescript: {
1492
- method: 'client.agentEndpoint.getByID',
1777
+ http: {
1493
1778
  example:
1494
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.agentEndpoint.getByID('endpointId');\n\nconsole.log(response.data);",
1779
+ 'curl https://api.roark.ai/v1/agent/endpoint/$ENDPOINT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1495
1780
  },
1496
1781
  },
1497
1782
  },
@@ -1512,23 +1797,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1512
1797
  "outboundDialType?: 'NONE' | 'HTTP_REQUEST';",
1513
1798
  ],
1514
1799
  response:
1515
- "{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; updatedAt: string; value: string; }; }",
1800
+ "{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: string; updatedAt: string; value: string; }; }",
1516
1801
  markdown:
1517
- "## create\n\n`client.agentEndpoint.create(agentId: string, direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING', value: string, environment?: string, outboundDialHttpRequestDefinitionId?: string, outboundDialType?: 'NONE' | 'HTTP_REQUEST'): { data: object; }`\n\n**post** `/v1/agent/endpoint`\n\nCreates a new agent endpoint for the authenticated project.\n\n### Parameters\n\n- `agentId: string`\n Agent ID to associate this endpoint with\n\n- `direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'`\n Call direction: INCOMING, OUTGOING, or INCOMING_AND_OUTGOING\n\n- `value: string`\n Phone number in E.164 format (e.g., +12345678900)\n\n- `environment?: string`\n Environment name (default: production)\n\n- `outboundDialHttpRequestDefinitionId?: string`\n ID of the HTTP request definition for outbound dialing (required when outboundDialType is HTTP_REQUEST)\n\n- `outboundDialType?: 'NONE' | 'HTTP_REQUEST'`\n Outbound dial type: NONE or HTTP_REQUEST (default: NONE)\n\n### Returns\n\n- `{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; updatedAt: string; value: string; }; }`\n\n - `data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; updatedAt: string; value: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentEndpoint = await client.agentEndpoint.create({\n agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n direction: 'INCOMING',\n value: 'value',\n});\n\nconsole.log(agentEndpoint);\n```",
1802
+ "## create\n\n`client.agentEndpoint.create(agentId: string, direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING', value: string, environment?: string, outboundDialHttpRequestDefinitionId?: string, outboundDialType?: 'NONE' | 'HTTP_REQUEST'): { data: object; }`\n\n**post** `/v1/agent/endpoint`\n\nCreates a new agent endpoint for the authenticated project.\n\n### Parameters\n\n- `agentId: string`\n Agent ID to associate this endpoint with\n\n- `direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'`\n Call direction: INCOMING, OUTGOING, or INCOMING_AND_OUTGOING\n\n- `value: string`\n Phone number in E.164 format (e.g., +12345678900)\n\n- `environment?: string`\n Environment name (default: production)\n\n- `outboundDialHttpRequestDefinitionId?: string`\n ID of the HTTP request definition for outbound dialing (required when outboundDialType is HTTP_REQUEST)\n\n- `outboundDialType?: 'NONE' | 'HTTP_REQUEST'`\n Outbound dial type: NONE or HTTP_REQUEST (default: NONE)\n\n### Returns\n\n- `{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: string; updatedAt: string; value: string; }; }`\n\n - `data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: string; updatedAt: string; value: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentEndpoint = await client.agentEndpoint.create({\n agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n direction: 'INCOMING',\n value: 'value',\n});\n\nconsole.log(agentEndpoint);\n```",
1518
1803
  perLanguage: {
1519
- http: {
1804
+ typescript: {
1805
+ method: 'client.agentEndpoint.create',
1520
1806
  example:
1521
- 'curl https://api.roark.ai/v1/agent/endpoint \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "agentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "direction": "INCOMING",\n "value": "value"\n }\'',
1807
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agentEndpoint = await client.agentEndpoint.create({\n agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n direction: 'INCOMING',\n value: 'value',\n});\n\nconsole.log(agentEndpoint.data);",
1522
1808
  },
1523
1809
  python: {
1524
1810
  method: 'agent_endpoint.create',
1525
1811
  example:
1526
1812
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nagent_endpoint = client.agent_endpoint.create(\n agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n direction="INCOMING",\n value="value",\n)\nprint(agent_endpoint.data)',
1527
1813
  },
1528
- typescript: {
1529
- method: 'client.agentEndpoint.create',
1814
+ http: {
1530
1815
  example:
1531
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agentEndpoint = await client.agentEndpoint.create({\n agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n direction: 'INCOMING',\n value: 'value',\n});\n\nconsole.log(agentEndpoint.data);",
1816
+ 'curl https://api.roark.ai/v1/agent/endpoint \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "agentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "direction": "INCOMING",\n "value": "value"\n }\'',
1532
1817
  },
1533
1818
  },
1534
1819
  },
@@ -1548,23 +1833,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1548
1833
  "outboundDialType?: 'NONE' | 'HTTP_REQUEST';",
1549
1834
  ],
1550
1835
  response:
1551
- "{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; updatedAt: string; value: string; }; }",
1836
+ "{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: string; updatedAt: string; value: string; }; }",
1552
1837
  markdown:
1553
- "## update\n\n`client.agentEndpoint.update(endpointId: string, environment?: string, outboundDialHttpRequestDefinitionId?: string, outboundDialType?: 'NONE' | 'HTTP_REQUEST'): { data: object; }`\n\n**put** `/v1/agent/endpoint/{endpointId}`\n\nUpdates an existing agent endpoint by its ID. Only environment and outboundDialType can be modified.\n\n### Parameters\n\n- `endpointId: string`\n\n- `environment?: string`\n Environment name\n\n- `outboundDialHttpRequestDefinitionId?: string`\n ID of the HTTP request definition for outbound dialing\n\n- `outboundDialType?: 'NONE' | 'HTTP_REQUEST'`\n Outbound dial type: NONE or HTTP_REQUEST\n\n### Returns\n\n- `{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; updatedAt: string; value: string; }; }`\n\n - `data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES'; updatedAt: string; value: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentEndpoint = await client.agentEndpoint.update('endpointId');\n\nconsole.log(agentEndpoint);\n```",
1838
+ "## update\n\n`client.agentEndpoint.update(endpointId: string, environment?: string, outboundDialHttpRequestDefinitionId?: string, outboundDialType?: 'NONE' | 'HTTP_REQUEST'): { data: object; }`\n\n**put** `/v1/agent/endpoint/{endpointId}`\n\nUpdates an existing agent endpoint by its ID. Only environment and outboundDialType can be modified.\n\n### Parameters\n\n- `endpointId: string`\n\n- `environment?: string`\n Environment name\n\n- `outboundDialHttpRequestDefinitionId?: string`\n ID of the HTTP request definition for outbound dialing\n\n- `outboundDialType?: 'NONE' | 'HTTP_REQUEST'`\n Outbound dial type: NONE or HTTP_REQUEST\n\n### Returns\n\n- `{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: string; updatedAt: string; value: string; }; }`\n\n - `data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type: string; updatedAt: string; value: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentEndpoint = await client.agentEndpoint.update('endpointId');\n\nconsole.log(agentEndpoint);\n```",
1554
1839
  perLanguage: {
1555
- http: {
1840
+ typescript: {
1841
+ method: 'client.agentEndpoint.update',
1556
1842
  example:
1557
- 'curl https://api.roark.ai/v1/agent/endpoint/$ENDPOINT_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1843
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agentEndpoint = await client.agentEndpoint.update('endpointId');\n\nconsole.log(agentEndpoint.data);",
1558
1844
  },
1559
1845
  python: {
1560
1846
  method: 'agent_endpoint.update',
1561
1847
  example:
1562
1848
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nagent_endpoint = client.agent_endpoint.update(\n endpoint_id="endpointId",\n)\nprint(agent_endpoint.data)',
1563
1849
  },
1564
- typescript: {
1565
- method: 'client.agentEndpoint.update',
1850
+ http: {
1566
1851
  example:
1567
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agentEndpoint = await client.agentEndpoint.update('endpointId');\n\nconsole.log(agentEndpoint.data);",
1852
+ 'curl https://api.roark.ai/v1/agent/endpoint/$ENDPOINT_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1568
1853
  },
1569
1854
  },
1570
1855
  },
@@ -1582,19 +1867,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1582
1867
  markdown:
1583
1868
  "## list\n\n`client.httpRequestDefinition.list(after?: string, limit?: number): { data: object[]; pagination: object; }`\n\n**get** `/v1/http-request-definition`\n\nReturns a paginated list of HTTP request definitions for the authenticated project.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - definition ID to start after\n\n- `limit?: number`\n Maximum number of definitions to return (default: 20, max: 50)\n\n### Returns\n\n- `{ data: { id: string; body: string; createdAt: string; description: string; headers: object; method: 'POST' | 'PUT' | 'PATCH' | 'GET'; parsedBody: object | string; scope: 'AGENT_OUTBOUND_DIAL'; updatedAt: string; url: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n\n - `data: { id: string; body: string; createdAt: string; description: string; headers: object; method: 'POST' | 'PUT' | 'PATCH' | 'GET'; parsedBody: object | string; scope: 'AGENT_OUTBOUND_DIAL'; updatedAt: string; url: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst httpRequestDefinitions = await client.httpRequestDefinition.list();\n\nconsole.log(httpRequestDefinitions);\n```",
1584
1869
  perLanguage: {
1585
- http: {
1870
+ typescript: {
1871
+ method: 'client.httpRequestDefinition.list',
1586
1872
  example:
1587
- 'curl https://api.roark.ai/v1/http-request-definition \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1873
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst httpRequestDefinitions = await client.httpRequestDefinition.list();\n\nconsole.log(httpRequestDefinitions.data);",
1588
1874
  },
1589
1875
  python: {
1590
1876
  method: 'http_request_definition.list',
1591
1877
  example:
1592
1878
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nhttp_request_definitions = client.http_request_definition.list()\nprint(http_request_definitions.data)',
1593
1879
  },
1594
- typescript: {
1595
- method: 'client.httpRequestDefinition.list',
1880
+ http: {
1596
1881
  example:
1597
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst httpRequestDefinitions = await client.httpRequestDefinition.list();\n\nconsole.log(httpRequestDefinitions.data);",
1882
+ 'curl https://api.roark.ai/v1/http-request-definition \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1598
1883
  },
1599
1884
  },
1600
1885
  },
@@ -1612,19 +1897,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1612
1897
  markdown:
1613
1898
  "## getById\n\n`client.httpRequestDefinition.getByID(definitionId: string): { data: object; }`\n\n**get** `/v1/http-request-definition/{definitionId}`\n\nReturns a specific HTTP request definition by its ID.\n\n### Parameters\n\n- `definitionId: string`\n\n### Returns\n\n- `{ data: { id: string; body: string; createdAt: string; description: string; headers: object; method: 'POST' | 'PUT' | 'PATCH' | 'GET'; parsedBody: object | string; scope: 'AGENT_OUTBOUND_DIAL'; updatedAt: string; url: string; }; }`\n\n - `data: { id: string; body: string; createdAt: string; description: string; headers: object; method: 'POST' | 'PUT' | 'PATCH' | 'GET'; parsedBody: object | string; scope: 'AGENT_OUTBOUND_DIAL'; updatedAt: string; url: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.httpRequestDefinition.getByID('definitionId');\n\nconsole.log(response);\n```",
1614
1899
  perLanguage: {
1615
- http: {
1900
+ typescript: {
1901
+ method: 'client.httpRequestDefinition.getByID',
1616
1902
  example:
1617
- 'curl https://api.roark.ai/v1/http-request-definition/$DEFINITION_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1903
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.httpRequestDefinition.getByID('definitionId');\n\nconsole.log(response.data);",
1618
1904
  },
1619
1905
  python: {
1620
1906
  method: 'http_request_definition.get_by_id',
1621
1907
  example:
1622
1908
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.http_request_definition.get_by_id(\n "definitionId",\n)\nprint(response.data)',
1623
1909
  },
1624
- typescript: {
1625
- method: 'client.httpRequestDefinition.getByID',
1910
+ http: {
1626
1911
  example:
1627
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.httpRequestDefinition.getByID('definitionId');\n\nconsole.log(response.data);",
1912
+ 'curl https://api.roark.ai/v1/http-request-definition/$DEFINITION_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1628
1913
  },
1629
1914
  },
1630
1915
  },
@@ -1650,19 +1935,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1650
1935
  markdown:
1651
1936
  "## create\n\n`client.httpRequestDefinition.create(scope: 'AGENT_OUTBOUND_DIAL', url: string, body?: string | object, description?: string, headers?: object, method?: 'POST' | 'PUT' | 'PATCH' | 'GET'): { data: object; }`\n\n**post** `/v1/http-request-definition`\n\nCreates a new HTTP request definition. The signing secret is only returned in this response and cannot be retrieved later.\n\n### Parameters\n\n- `scope: 'AGENT_OUTBOUND_DIAL'`\n Scope: AGENT_OUTBOUND_DIAL\n\n- `url: string`\n URL for the HTTP request\n\n- `body?: string | object`\n Request body template. Accepts a JSON object or a string with placeholders like {{phoneNumberToDial}}. Objects are serialized to JSON for storage.\n\n- `description?: string`\n Description of the HTTP request definition\n\n- `headers?: object`\n Request headers as key-value pairs\n\n- `method?: 'POST' | 'PUT' | 'PATCH' | 'GET'`\n HTTP method (default: POST)\n\n### Returns\n\n- `{ data: { id: string; body: string; createdAt: string; description: string; headers: object; method: 'POST' | 'PUT' | 'PATCH' | 'GET'; parsedBody: object | string; scope: 'AGENT_OUTBOUND_DIAL'; signingSecret: string; updatedAt: string; url: string; }; }`\n\n - `data: { id: string; body: string; createdAt: string; description: string; headers: object; method: 'POST' | 'PUT' | 'PATCH' | 'GET'; parsedBody: object | string; scope: 'AGENT_OUTBOUND_DIAL'; signingSecret: string; updatedAt: string; url: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst httpRequestDefinition = await client.httpRequestDefinition.create({ scope: 'AGENT_OUTBOUND_DIAL', url: 'https://example.com' });\n\nconsole.log(httpRequestDefinition);\n```",
1652
1937
  perLanguage: {
1653
- http: {
1938
+ typescript: {
1939
+ method: 'client.httpRequestDefinition.create',
1654
1940
  example:
1655
- 'curl https://api.roark.ai/v1/http-request-definition \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "scope": "AGENT_OUTBOUND_DIAL",\n "url": "https://example.com"\n }\'',
1941
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst httpRequestDefinition = await client.httpRequestDefinition.create({\n scope: 'AGENT_OUTBOUND_DIAL',\n url: 'https://example.com',\n});\n\nconsole.log(httpRequestDefinition.data);",
1656
1942
  },
1657
1943
  python: {
1658
1944
  method: 'http_request_definition.create',
1659
1945
  example:
1660
1946
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nhttp_request_definition = client.http_request_definition.create(\n scope="AGENT_OUTBOUND_DIAL",\n url="https://example.com",\n)\nprint(http_request_definition.data)',
1661
1947
  },
1662
- typescript: {
1663
- method: 'client.httpRequestDefinition.create',
1948
+ http: {
1664
1949
  example:
1665
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst httpRequestDefinition = await client.httpRequestDefinition.create({\n scope: 'AGENT_OUTBOUND_DIAL',\n url: 'https://example.com',\n});\n\nconsole.log(httpRequestDefinition.data);",
1950
+ 'curl https://api.roark.ai/v1/http-request-definition \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "scope": "AGENT_OUTBOUND_DIAL",\n "url": "https://example.com"\n }\'',
1666
1951
  },
1667
1952
  },
1668
1953
  },
@@ -1687,19 +1972,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1687
1972
  markdown:
1688
1973
  "## update\n\n`client.httpRequestDefinition.update(definitionId: string, body?: string | object, description?: string, headers?: object, method?: 'POST' | 'PUT' | 'PATCH' | 'GET', url?: string): { data: object; }`\n\n**put** `/v1/http-request-definition/{definitionId}`\n\nUpdates an existing HTTP request definition.\n\n### Parameters\n\n- `definitionId: string`\n\n- `body?: string | object`\n Request body template. Accepts a JSON object or a string with placeholders like {{phoneNumberToDial}}. Objects are serialized to JSON for storage.\n\n- `description?: string`\n Description of the HTTP request definition\n\n- `headers?: object`\n Request headers as key-value pairs\n\n- `method?: 'POST' | 'PUT' | 'PATCH' | 'GET'`\n HTTP method: POST, PUT, PATCH, or GET\n\n- `url?: string`\n URL for the HTTP request\n\n### Returns\n\n- `{ data: { id: string; body: string; createdAt: string; description: string; headers: object; method: 'POST' | 'PUT' | 'PATCH' | 'GET'; parsedBody: object | string; scope: 'AGENT_OUTBOUND_DIAL'; updatedAt: string; url: string; }; }`\n\n - `data: { id: string; body: string; createdAt: string; description: string; headers: object; method: 'POST' | 'PUT' | 'PATCH' | 'GET'; parsedBody: object | string; scope: 'AGENT_OUTBOUND_DIAL'; updatedAt: string; url: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst httpRequestDefinition = await client.httpRequestDefinition.update('definitionId');\n\nconsole.log(httpRequestDefinition);\n```",
1689
1974
  perLanguage: {
1690
- http: {
1975
+ typescript: {
1976
+ method: 'client.httpRequestDefinition.update',
1691
1977
  example:
1692
- 'curl https://api.roark.ai/v1/http-request-definition/$DEFINITION_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1978
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst httpRequestDefinition = await client.httpRequestDefinition.update('definitionId');\n\nconsole.log(httpRequestDefinition.data);",
1693
1979
  },
1694
1980
  python: {
1695
1981
  method: 'http_request_definition.update',
1696
1982
  example:
1697
1983
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nhttp_request_definition = client.http_request_definition.update(\n definition_id="definitionId",\n)\nprint(http_request_definition.data)',
1698
1984
  },
1699
- typescript: {
1700
- method: 'client.httpRequestDefinition.update',
1985
+ http: {
1701
1986
  example:
1702
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst httpRequestDefinition = await client.httpRequestDefinition.update('definitionId');\n\nconsole.log(httpRequestDefinition.data);",
1987
+ 'curl https://api.roark.ai/v1/http-request-definition/$DEFINITION_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1703
1988
  },
1704
1989
  },
1705
1990
  },
@@ -1717,19 +2002,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1717
2002
  markdown:
1718
2003
  "## list\n\n`client.webhook.list(after?: string, limit?: number): { data: object[]; pagination: object; }`\n\n**get** `/v1/webhook`\n\nReturns a paginated list of webhooks with their event subscriptions.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - webhook ID to start after\n\n- `limit?: number`\n Maximum number of webhooks to return (default: 20, max: 50)\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; events: string[]; headers: object; updatedAt: string; url: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n\n - `data: { id: string; createdAt: string; description: string; events: string[]; headers: object; updatedAt: string; url: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst webhooks = await client.webhook.list();\n\nconsole.log(webhooks);\n```",
1719
2004
  perLanguage: {
1720
- http: {
2005
+ typescript: {
2006
+ method: 'client.webhook.list',
1721
2007
  example:
1722
- 'curl https://api.roark.ai/v1/webhook \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
2008
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst webhooks = await client.webhook.list();\n\nconsole.log(webhooks.data);",
1723
2009
  },
1724
2010
  python: {
1725
2011
  method: 'webhook.list',
1726
2012
  example:
1727
2013
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nwebhooks = client.webhook.list()\nprint(webhooks.data)',
1728
2014
  },
1729
- typescript: {
1730
- method: 'client.webhook.list',
2015
+ http: {
1731
2016
  example:
1732
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst webhooks = await client.webhook.list();\n\nconsole.log(webhooks.data);",
2017
+ 'curl https://api.roark.ai/v1/webhook \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1733
2018
  },
1734
2019
  },
1735
2020
  },
@@ -1747,19 +2032,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1747
2032
  markdown:
1748
2033
  "## getById\n\n`client.webhook.getByID(webhookId: string): { data: object; }`\n\n**get** `/v1/webhook/{webhookId}`\n\nReturns a specific webhook with its event subscriptions.\n\n### Parameters\n\n- `webhookId: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; events: string[]; headers: object; updatedAt: string; url: string; }; }`\n\n - `data: { id: string; createdAt: string; description: string; events: string[]; headers: object; updatedAt: string; url: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.webhook.getByID('webhookId');\n\nconsole.log(response);\n```",
1749
2034
  perLanguage: {
1750
- http: {
2035
+ typescript: {
2036
+ method: 'client.webhook.getByID',
1751
2037
  example:
1752
- 'curl https://api.roark.ai/v1/webhook/$WEBHOOK_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
2038
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.webhook.getByID('webhookId');\n\nconsole.log(response.data);",
1753
2039
  },
1754
2040
  python: {
1755
2041
  method: 'webhook.get_by_id',
1756
2042
  example:
1757
2043
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.webhook.get_by_id(\n "webhookId",\n)\nprint(response.data)',
1758
2044
  },
1759
- typescript: {
1760
- method: 'client.webhook.getByID',
2045
+ http: {
1761
2046
  example:
1762
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.webhook.getByID('webhookId');\n\nconsole.log(response.data);",
2047
+ 'curl https://api.roark.ai/v1/webhook/$WEBHOOK_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1763
2048
  },
1764
2049
  },
1765
2050
  },
@@ -1778,19 +2063,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1778
2063
  markdown:
1779
2064
  "## create\n\n`client.webhook.create(events: string[], url: string, description?: string, headers?: object): { data: object; }`\n\n**post** `/v1/webhook`\n\nCreates a new webhook with event subscriptions. The signing secret is only returned in this response.\n\n### Parameters\n\n- `events: string[]`\n Event types to subscribe to (at least one required)\n\n- `url: string`\n Webhook URL\n\n- `description?: string`\n Webhook description\n\n- `headers?: object`\n Request headers (e.g. authorization tokens)\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; events: string[]; headers: object; signingSecret: string; updatedAt: string; url: string; }; }`\n\n - `data: { id: string; createdAt: string; description: string; events: string[]; headers: object; signingSecret: string; updatedAt: string; url: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst webhook = await client.webhook.create({ events: ['CALL_ANALYSIS_COMPLETED'], url: 'https://example.com' });\n\nconsole.log(webhook);\n```",
1780
2065
  perLanguage: {
1781
- http: {
2066
+ typescript: {
2067
+ method: 'client.webhook.create',
1782
2068
  example:
1783
- 'curl https://api.roark.ai/v1/webhook \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "events": [\n "CALL_ANALYSIS_COMPLETED"\n ],\n "url": "https://example.com"\n }\'',
2069
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst webhook = await client.webhook.create({\n events: ['CALL_ANALYSIS_COMPLETED'],\n url: 'https://example.com',\n});\n\nconsole.log(webhook.data);",
1784
2070
  },
1785
2071
  python: {
1786
2072
  method: 'webhook.create',
1787
2073
  example:
1788
2074
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nwebhook = client.webhook.create(\n events=["CALL_ANALYSIS_COMPLETED"],\n url="https://example.com",\n)\nprint(webhook.data)',
1789
2075
  },
1790
- typescript: {
1791
- method: 'client.webhook.create',
2076
+ http: {
1792
2077
  example:
1793
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst webhook = await client.webhook.create({\n events: ['CALL_ANALYSIS_COMPLETED'],\n url: 'https://example.com',\n});\n\nconsole.log(webhook.data);",
2078
+ 'curl https://api.roark.ai/v1/webhook \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "events": [\n "CALL_ANALYSIS_COMPLETED"\n ],\n "url": "https://example.com"\n }\'',
1794
2079
  },
1795
2080
  },
1796
2081
  },
@@ -1807,19 +2092,87 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1807
2092
  markdown:
1808
2093
  "## delete\n\n`client.webhook.delete(webhookId: string): { data: object; }`\n\n**delete** `/v1/webhook/{webhookId}`\n\nDeletes a webhook and all its event subscriptions.\n\n### Parameters\n\n- `webhookId: string`\n\n### Returns\n\n- `{ data: { success: boolean; }; }`\n\n - `data: { success: boolean; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst webhook = await client.webhook.delete('webhookId');\n\nconsole.log(webhook);\n```",
1809
2094
  perLanguage: {
1810
- http: {
2095
+ typescript: {
2096
+ method: 'client.webhook.delete',
1811
2097
  example:
1812
- 'curl https://api.roark.ai/v1/webhook/$WEBHOOK_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
2098
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst webhook = await client.webhook.delete('webhookId');\n\nconsole.log(webhook.data);",
1813
2099
  },
1814
2100
  python: {
1815
2101
  method: 'webhook.delete',
1816
2102
  example:
1817
2103
  'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nwebhook = client.webhook.delete(\n "webhookId",\n)\nprint(webhook.data)',
1818
2104
  },
2105
+ http: {
2106
+ example:
2107
+ 'curl https://api.roark.ai/v1/webhook/$WEBHOOK_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
2108
+ },
2109
+ },
2110
+ },
2111
+ {
2112
+ name: 'diff',
2113
+ endpoint: '/v1/config/diff',
2114
+ httpMethod: 'post',
2115
+ summary: 'Diff a config bundle',
2116
+ description:
2117
+ 'Dry run: returns the changes reconcile a config-as-code bundle into the project. Submit the full desired set of resources; resources already managed by config are updated, new ones created, and (unless prune is false) config-managed resources absent from the bundle are deleted. Identity is by name — no ids in the bundle. No writes are performed.',
2118
+ stainlessPath: '(resource) config > (method) diff',
2119
+ qualified: 'client.config.diff',
2120
+ params: [
2121
+ "resources: { kind: 'agent'; name: string; customId?: string; description?: string; endpoints?: { direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; name: string; value: string; environment?: string; }[]; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; mergeInto?: string[]; ref?: string; silenceDurationSeconds?: number; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; title?: string; } | { kind: 'collector'; metrics: string[]; modality: 'call' | 'chat'; name: string; filters?: { conditions: { key: string; type: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION'; operator?: string; value?: string; }[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; }[];",
2122
+ 'prune?: boolean;',
2123
+ ],
2124
+ response:
2125
+ "{ data: { changes: { configKey: string; kind: 'agent' | 'persona' | 'flow' | 'collector' | 'metric'; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }; }",
2126
+ markdown:
2127
+ "## diff\n\n`client.config.diff(resources: { kind: 'agent'; name: string; customId?: string; description?: string; endpoints?: { direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; name: string; value: string; environment?: string; }[]; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; mergeInto?: string[]; ref?: string; silenceDurationSeconds?: number; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; title?: string; } | { kind: 'collector'; metrics: string[]; modality: 'call' | 'chat'; name: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/diff`\n\nDry run: returns the changes reconcile a config-as-code bundle into the project. Submit the full desired set of resources; resources already managed by config are updated, new ones created, and (unless prune is false) config-managed resources absent from the bundle are deleted. Identity is by name — no ids in the bundle. No writes are performed.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; endpoints?: { direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; name: string; value: string; environment?: string; }[]; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; mergeInto?: string[]; ref?: string; silenceDurationSeconds?: number; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; title?: string; } | { kind: 'collector'; metrics: string[]; modality: 'call' | 'chat'; name: string; filters?: { conditions: { key: string; type: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION'; operator?: string; value?: string; }[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: 'agent' | 'persona' | 'flow' | 'collector' | 'metric'; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: 'agent' | 'persona' | 'flow' | 'collector' | 'metric'; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.config.diff({ resources: [{ kind: 'agent', name: 'name' }] });\n\nconsole.log(response);\n```",
2128
+ perLanguage: {
2129
+ typescript: {
2130
+ method: 'client.config.diff',
2131
+ example:
2132
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.config.diff({ resources: [{ kind: 'agent', name: 'name' }] });\n\nconsole.log(response.data);",
2133
+ },
2134
+ python: {
2135
+ method: 'config.diff',
2136
+ example:
2137
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.config.diff(\n resources=[{\n "kind": "agent",\n "name": "name",\n }],\n)\nprint(response.data)',
2138
+ },
2139
+ http: {
2140
+ example:
2141
+ 'curl https://api.roark.ai/v1/config/diff \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "resources": [\n {\n "kind": "agent",\n "name": "name"\n }\n ]\n }\'',
2142
+ },
2143
+ },
2144
+ },
2145
+ {
2146
+ name: 'apply',
2147
+ endpoint: '/v1/config/apply',
2148
+ httpMethod: 'post',
2149
+ summary: 'Apply a config bundle',
2150
+ description:
2151
+ 'Reconcile a config-as-code bundle into the project. Submit the full desired set of resources; resources already managed by config are updated, new ones created, and (unless prune is false) config-managed resources absent from the bundle are deleted. Identity is by name — no ids in the bundle.',
2152
+ stainlessPath: '(resource) config > (method) apply',
2153
+ qualified: 'client.config.apply',
2154
+ params: [
2155
+ "resources: { kind: 'agent'; name: string; customId?: string; description?: string; endpoints?: { direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; name: string; value: string; environment?: string; }[]; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; mergeInto?: string[]; ref?: string; silenceDurationSeconds?: number; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; title?: string; } | { kind: 'collector'; metrics: string[]; modality: 'call' | 'chat'; name: string; filters?: { conditions: { key: string; type: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION'; operator?: string; value?: string; }[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; }[];",
2156
+ 'prune?: boolean;',
2157
+ ],
2158
+ response:
2159
+ "{ data: { changes: { configKey: string; kind: 'agent' | 'persona' | 'flow' | 'collector' | 'metric'; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }; }",
2160
+ markdown:
2161
+ "## apply\n\n`client.config.apply(resources: { kind: 'agent'; name: string; customId?: string; description?: string; endpoints?: { direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; name: string; value: string; environment?: string; }[]; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; mergeInto?: string[]; ref?: string; silenceDurationSeconds?: number; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; title?: string; } | { kind: 'collector'; metrics: string[]; modality: 'call' | 'chat'; name: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/apply`\n\nReconcile a config-as-code bundle into the project. Submit the full desired set of resources; resources already managed by config are updated, new ones created, and (unless prune is false) config-managed resources absent from the bundle are deleted. Identity is by name — no ids in the bundle.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; endpoints?: { direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; name: string; value: string; environment?: string; }[]; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED'; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; mergeInto?: string[]; ref?: string; silenceDurationSeconds?: number; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; title?: string; } | { kind: 'collector'; metrics: string[]; modality: 'call' | 'chat'; name: string; filters?: { conditions: { key: string; type: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION'; operator?: string; value?: string; }[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: 'agent' | 'persona' | 'flow' | 'collector' | 'metric'; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: 'agent' | 'persona' | 'flow' | 'collector' | 'metric'; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.config.apply({ resources: [{ kind: 'agent', name: 'name' }] });\n\nconsole.log(response);\n```",
2162
+ perLanguage: {
1819
2163
  typescript: {
1820
- method: 'client.webhook.delete',
2164
+ method: 'client.config.apply',
1821
2165
  example:
1822
- "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst webhook = await client.webhook.delete('webhookId');\n\nconsole.log(webhook.data);",
2166
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.config.apply({ resources: [{ kind: 'agent', name: 'name' }] });\n\nconsole.log(response.data);",
2167
+ },
2168
+ python: {
2169
+ method: 'config.apply',
2170
+ example:
2171
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.config.apply(\n resources=[{\n "kind": "agent",\n "name": "name",\n }],\n)\nprint(response.data)',
2172
+ },
2173
+ http: {
2174
+ example:
2175
+ 'curl https://api.roark.ai/v1/config/apply \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "resources": [\n {\n "kind": "agent",\n "name": "name"\n }\n ]\n }\'',
1823
2176
  },
1824
2177
  },
1825
2178
  },