@roarkanalytics/sdk-mcp 2.31.0 → 2.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auth.d.mts.map +1 -1
- package/auth.d.ts.map +1 -1
- package/code-tool-types.d.mts.map +1 -1
- package/code-tool-types.d.ts.map +1 -1
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +16 -6
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +16 -6
- package/code-tool-worker.mjs.map +1 -1
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts.map +1 -1
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts +2 -2
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts +2 -2
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.mjs.map +1 -1
- package/http.d.mts.map +1 -1
- package/http.d.ts.map +1 -1
- package/http.mjs.map +1 -1
- package/index.mjs.map +1 -1
- package/instructions.mjs.map +1 -1
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +752 -460
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +752 -460
- package/local-docs-search.mjs.map +1 -1
- package/logger.d.mts.map +1 -1
- package/logger.d.ts.map +1 -1
- package/logger.mjs.map +1 -1
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +94 -34
- package/methods.js.map +1 -1
- package/methods.mjs +94 -34
- package/methods.mjs.map +1 -1
- package/options.mjs.map +1 -1
- package/package.json +2 -2
- package/server.d.mts.map +1 -1
- package/server.d.ts.map +1 -1
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/server.mjs.map +1 -1
- package/src/code-tool-worker.ts +16 -6
- package/src/local-docs-search.ts +844 -491
- package/src/methods.ts +94 -34
- package/src/server.ts +1 -1
- package/stdio.d.mts.map +1 -1
- package/stdio.d.ts.map +1 -1
- package/stdio.mjs.map +1 -1
- package/types.d.mts.map +1 -1
- package/types.d.ts.map +1 -1
package/local-docs-search.js
CHANGED
|
@@ -54,16 +54,16 @@ const EMBEDDED_METHODS = [
|
|
|
54
54
|
response: "{ data: { status: 'healthy' | 'degraded' | 'unhealthy'; timestamp: string; version: string; }; }",
|
|
55
55
|
markdown: "## 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```",
|
|
56
56
|
perLanguage: {
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
typescript: {
|
|
58
|
+
method: 'client.health.get',
|
|
59
|
+
example: "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);",
|
|
59
60
|
},
|
|
60
61
|
python: {
|
|
61
62
|
method: 'health.get',
|
|
62
63
|
example: '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)',
|
|
63
64
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
example: "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);",
|
|
65
|
+
http: {
|
|
66
|
+
example: 'curl https://api.roark.ai/health \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
},
|
|
@@ -84,19 +84,19 @@ const EMBEDDED_METHODS = [
|
|
|
84
84
|
"sortDirection?: 'asc' | 'desc';",
|
|
85
85
|
"status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED';",
|
|
86
86
|
],
|
|
87
|
-
response: "{ 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; }; }",
|
|
88
|
-
markdown: "## 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```",
|
|
87
|
+
response: "{ 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; }; }",
|
|
88
|
+
markdown: "## 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```",
|
|
89
89
|
perLanguage: {
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
typescript: {
|
|
91
|
+
method: 'client.call.list',
|
|
92
|
+
example: "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);",
|
|
92
93
|
},
|
|
93
94
|
python: {
|
|
94
95
|
method: 'call.list',
|
|
95
96
|
example: '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)',
|
|
96
97
|
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
example: "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);",
|
|
98
|
+
http: {
|
|
99
|
+
example: 'curl https://api.roark.ai/v1/call \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
100
100
|
},
|
|
101
101
|
},
|
|
102
102
|
},
|
|
@@ -118,24 +118,27 @@ const EMBEDDED_METHODS = [
|
|
|
118
118
|
'customer?: { phoneNumberE164: string; label?: string; };',
|
|
119
119
|
'customers?: { phoneNumberE164: string; label?: string; }[];',
|
|
120
120
|
'endedStatus?: string;',
|
|
121
|
+
'externalId?: string;',
|
|
122
|
+
'livekitRoomId?: string;',
|
|
121
123
|
'properties?: object;',
|
|
122
124
|
'stereoRecordingUrl?: string;',
|
|
123
125
|
'toolInvocations?: { name: string; parameters: object; result: string | object; startOffsetMs: number; agent?: { customId?: string; roarkId?: string; }; description?: string; endOffsetMs?: number; }[];',
|
|
124
|
-
"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; }[];",
|
|
126
|
+
"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; }[];",
|
|
127
|
+
'vapiCallId?: string;',
|
|
125
128
|
],
|
|
126
|
-
response: "{ 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'; }; }",
|
|
127
|
-
markdown: "## 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```",
|
|
129
|
+
response: "{ 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'; }; }",
|
|
130
|
+
markdown: "## 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```",
|
|
128
131
|
perLanguage: {
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
typescript: {
|
|
133
|
+
method: 'client.call.create',
|
|
134
|
+
example: "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);",
|
|
131
135
|
},
|
|
132
136
|
python: {
|
|
133
137
|
method: 'call.create',
|
|
134
138
|
example: '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)',
|
|
135
139
|
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
example: "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);",
|
|
140
|
+
http: {
|
|
141
|
+
example: '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 }\'',
|
|
139
142
|
},
|
|
140
143
|
},
|
|
141
144
|
},
|
|
@@ -148,19 +151,19 @@ const EMBEDDED_METHODS = [
|
|
|
148
151
|
stainlessPath: '(resource) call > (method) getById',
|
|
149
152
|
qualified: 'client.call.getByID',
|
|
150
153
|
params: ['callId: string;'],
|
|
151
|
-
response: "{ 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; }; }",
|
|
152
|
-
markdown: "## 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```",
|
|
154
|
+
response: "{ 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; }; }",
|
|
155
|
+
markdown: "## 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```",
|
|
153
156
|
perLanguage: {
|
|
154
|
-
|
|
155
|
-
|
|
157
|
+
typescript: {
|
|
158
|
+
method: 'client.call.getByID',
|
|
159
|
+
example: "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);",
|
|
156
160
|
},
|
|
157
161
|
python: {
|
|
158
162
|
method: 'call.get_by_id',
|
|
159
163
|
example: '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)',
|
|
160
164
|
},
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
example: "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);",
|
|
165
|
+
http: {
|
|
166
|
+
example: 'curl https://api.roark.ai/v1/call/$CALL_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
164
167
|
},
|
|
165
168
|
},
|
|
166
169
|
},
|
|
@@ -176,41 +179,16 @@ const EMBEDDED_METHODS = [
|
|
|
176
179
|
response: '{ data: { status: string; averageCategoricalSentiment?: string; averageSentiment?: number; commonEmotion?: string; }; }',
|
|
177
180
|
markdown: "## 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```",
|
|
178
181
|
perLanguage: {
|
|
179
|
-
http: {
|
|
180
|
-
example: 'curl https://api.roark.ai/v1/call/$CALL_ID/sentiment-run \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
181
|
-
},
|
|
182
|
-
python: {
|
|
183
|
-
method: 'call.list_sentiment_runs',
|
|
184
|
-
example: '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)',
|
|
185
|
-
},
|
|
186
182
|
typescript: {
|
|
187
183
|
method: 'client.call.listSentimentRuns',
|
|
188
184
|
example: "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);",
|
|
189
185
|
},
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
name: 'listEvaluationRuns',
|
|
194
|
-
endpoint: '/v1/call/{callId}/evaluation-run',
|
|
195
|
-
httpMethod: 'get',
|
|
196
|
-
summary: 'List call evaluation runs',
|
|
197
|
-
description: 'Fetch all evaluation run results for a specific call.',
|
|
198
|
-
stainlessPath: '(resource) call > (method) listEvaluationRuns',
|
|
199
|
-
qualified: 'client.call.listEvaluationRuns',
|
|
200
|
-
params: ['callId: string;'],
|
|
201
|
-
response: "{ 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; }[]; }",
|
|
202
|
-
markdown: "## 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```",
|
|
203
|
-
perLanguage: {
|
|
204
|
-
http: {
|
|
205
|
-
example: 'curl https://api.roark.ai/v1/call/$CALL_ID/evaluation-run \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
206
|
-
},
|
|
207
186
|
python: {
|
|
208
|
-
method: 'call.
|
|
209
|
-
example: '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.
|
|
187
|
+
method: 'call.list_sentiment_runs',
|
|
188
|
+
example: '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)',
|
|
210
189
|
},
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
example: "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);",
|
|
190
|
+
http: {
|
|
191
|
+
example: 'curl https://api.roark.ai/v1/call/$CALL_ID/sentiment-run \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
214
192
|
},
|
|
215
193
|
},
|
|
216
194
|
},
|
|
@@ -219,23 +197,23 @@ const EMBEDDED_METHODS = [
|
|
|
219
197
|
endpoint: '/v1/call/{callId}/metrics',
|
|
220
198
|
httpMethod: 'get',
|
|
221
199
|
summary: 'List call metrics',
|
|
222
|
-
description: 'Fetch all call-level metrics for a specific call, including both system-generated and custom metrics. Only returns successfully computed metrics.',
|
|
200
|
+
description: '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`).',
|
|
223
201
|
stainlessPath: '(resource) call > (method) listMetrics',
|
|
224
202
|
qualified: 'client.call.listMetrics',
|
|
225
|
-
params: ['callId: string;', 'flatten?: string;'],
|
|
226
|
-
response: "{ data: { description: string; metricDefinitionId: string; metricId: string; name: string; scope: 'GLOBAL' | 'PER_PARTICIPANT'; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; values: {
|
|
227
|
-
markdown: "## 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: {
|
|
203
|
+
params: ['callId: string;', 'flatten?: string;', "status?: 'success' | 'all';"],
|
|
204
|
+
response: "{ 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; }; }[]; }",
|
|
205
|
+
markdown: "## 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```",
|
|
228
206
|
perLanguage: {
|
|
229
|
-
|
|
230
|
-
|
|
207
|
+
typescript: {
|
|
208
|
+
method: 'client.call.listMetrics',
|
|
209
|
+
example: "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);",
|
|
231
210
|
},
|
|
232
211
|
python: {
|
|
233
212
|
method: 'call.list_metrics',
|
|
234
213
|
example: '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)',
|
|
235
214
|
},
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
example: "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);",
|
|
215
|
+
http: {
|
|
216
|
+
example: 'curl https://api.roark.ai/v1/call/$CALL_ID/metrics \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
239
217
|
},
|
|
240
218
|
},
|
|
241
219
|
},
|
|
@@ -254,16 +232,16 @@ const EMBEDDED_METHODS = [
|
|
|
254
232
|
response: "{ 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'; }; }",
|
|
255
233
|
markdown: "## 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```",
|
|
256
234
|
perLanguage: {
|
|
257
|
-
|
|
258
|
-
|
|
235
|
+
typescript: {
|
|
236
|
+
method: 'client.call.getTranscript',
|
|
237
|
+
example: "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);",
|
|
259
238
|
},
|
|
260
239
|
python: {
|
|
261
240
|
method: 'call.get_transcript',
|
|
262
241
|
example: '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)',
|
|
263
242
|
},
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
example: "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);",
|
|
243
|
+
http: {
|
|
244
|
+
example: 'curl https://api.roark.ai/v1/call/$CALL_ID/transcript \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
267
245
|
},
|
|
268
246
|
},
|
|
269
247
|
},
|
|
@@ -275,19 +253,19 @@ const EMBEDDED_METHODS = [
|
|
|
275
253
|
description: 'Fetch all metric definitions available in the project, including both system-generated and custom metrics.',
|
|
276
254
|
stainlessPath: '(resource) metric > (method) listDefinitions',
|
|
277
255
|
qualified: 'client.metric.listDefinitions',
|
|
278
|
-
response:
|
|
279
|
-
markdown: "## 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```",
|
|
256
|
+
response: '{ data: object | object | object | object | object[]; }',
|
|
257
|
+
markdown: "## 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```",
|
|
280
258
|
perLanguage: {
|
|
281
|
-
|
|
282
|
-
|
|
259
|
+
typescript: {
|
|
260
|
+
method: 'client.metric.listDefinitions',
|
|
261
|
+
example: "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);",
|
|
283
262
|
},
|
|
284
263
|
python: {
|
|
285
264
|
method: 'metric.list_definitions',
|
|
286
265
|
example: '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)',
|
|
287
266
|
},
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
example: "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);",
|
|
267
|
+
http: {
|
|
268
|
+
example: 'curl https://api.roark.ai/v1/metric/definitions \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
291
269
|
},
|
|
292
270
|
},
|
|
293
271
|
},
|
|
@@ -295,40 +273,25 @@ const EMBEDDED_METHODS = [
|
|
|
295
273
|
name: 'createDefinition',
|
|
296
274
|
endpoint: '/v1/metric/definitions',
|
|
297
275
|
httpMethod: 'post',
|
|
298
|
-
summary: 'Create
|
|
299
|
-
description: 'Create a new
|
|
276
|
+
summary: 'Create custom metric definition',
|
|
277
|
+
description: '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.',
|
|
300
278
|
stainlessPath: '(resource) metric > (method) createDefinition',
|
|
301
279
|
qualified: 'client.metric.createDefinition',
|
|
302
280
|
params: [
|
|
303
|
-
'analysisPackageId: string;',
|
|
304
|
-
'name: string;',
|
|
305
|
-
"outputType: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';",
|
|
306
|
-
'booleanFalseLabel?: string;',
|
|
307
|
-
'booleanTrueLabel?: string;',
|
|
308
|
-
'classificationOptions?: { description: string; displayOrder: number; label: string; }[];',
|
|
309
|
-
'llmPrompt?: string;',
|
|
310
|
-
'maxClassifications?: number;',
|
|
311
|
-
'metricId?: string;',
|
|
312
|
-
"participantRole?: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';",
|
|
313
|
-
'scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[];',
|
|
314
|
-
'scaleMax?: number;',
|
|
315
|
-
'scaleMin?: number;',
|
|
316
|
-
"scope?: 'GLOBAL' | 'PER_PARTICIPANT';",
|
|
317
|
-
"supportedContexts?: 'CALL' | 'SEGMENT' | 'TURN'[];",
|
|
281
|
+
"{ 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'; };",
|
|
318
282
|
],
|
|
319
|
-
response: "{ 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;
|
|
320
|
-
markdown: "## 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```",
|
|
283
|
+
response: "{ 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; }; }",
|
|
321
284
|
perLanguage: {
|
|
322
|
-
|
|
323
|
-
|
|
285
|
+
typescript: {
|
|
286
|
+
method: 'client.metric.createDefinition',
|
|
287
|
+
example: "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);",
|
|
324
288
|
},
|
|
325
289
|
python: {
|
|
326
290
|
method: 'metric.create_definition',
|
|
327
|
-
example: '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)',
|
|
291
|
+
example: '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)',
|
|
328
292
|
},
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
example: "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);",
|
|
293
|
+
http: {
|
|
294
|
+
example: '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 }\'',
|
|
332
295
|
},
|
|
333
296
|
},
|
|
334
297
|
},
|
|
@@ -344,16 +307,16 @@ const EMBEDDED_METHODS = [
|
|
|
344
307
|
response: "{ 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; }; }",
|
|
345
308
|
markdown: "## 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```",
|
|
346
309
|
perLanguage: {
|
|
347
|
-
|
|
348
|
-
|
|
310
|
+
typescript: {
|
|
311
|
+
method: 'client.metricPolicy.list',
|
|
312
|
+
example: "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);",
|
|
349
313
|
},
|
|
350
314
|
python: {
|
|
351
315
|
method: 'metric_policy.list',
|
|
352
316
|
example: '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)',
|
|
353
317
|
},
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
example: "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);",
|
|
318
|
+
http: {
|
|
319
|
+
example: 'curl https://api.roark.ai/v1/metric/policies \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
357
320
|
},
|
|
358
321
|
},
|
|
359
322
|
},
|
|
@@ -369,16 +332,16 @@ const EMBEDDED_METHODS = [
|
|
|
369
332
|
response: "{ data: { id: string; conditions: { conditions: object[]; }[]; createdAt: string; metrics: { id: string; }[]; name: string; status: 'ACTIVE' | 'INACTIVE'; type: 'SYSTEM' | 'USER'; updatedAt: string; }; }",
|
|
370
333
|
markdown: "## 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```",
|
|
371
334
|
perLanguage: {
|
|
372
|
-
|
|
373
|
-
|
|
335
|
+
typescript: {
|
|
336
|
+
method: 'client.metricPolicy.getByID',
|
|
337
|
+
example: "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);",
|
|
374
338
|
},
|
|
375
339
|
python: {
|
|
376
340
|
method: 'metric_policy.get_by_id',
|
|
377
341
|
example: '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)',
|
|
378
342
|
},
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
example: "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);",
|
|
343
|
+
http: {
|
|
344
|
+
example: 'curl https://api.roark.ai/v1/metric/policies/$POLICY_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
382
345
|
},
|
|
383
346
|
},
|
|
384
347
|
},
|
|
@@ -400,16 +363,16 @@ const EMBEDDED_METHODS = [
|
|
|
400
363
|
response: "{ data: { id: string; conditions: { conditions: object[]; }[]; createdAt: string; metrics: { id: string; }[]; name: string; status: 'ACTIVE' | 'INACTIVE'; type: 'SYSTEM' | 'USER'; updatedAt: string; }; }",
|
|
401
364
|
markdown: "## 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```",
|
|
402
365
|
perLanguage: {
|
|
403
|
-
|
|
404
|
-
|
|
366
|
+
typescript: {
|
|
367
|
+
method: 'client.metricPolicy.create',
|
|
368
|
+
example: "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);",
|
|
405
369
|
},
|
|
406
370
|
python: {
|
|
407
371
|
method: 'metric_policy.create',
|
|
408
372
|
example: '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)',
|
|
409
373
|
},
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
example: "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);",
|
|
374
|
+
http: {
|
|
375
|
+
example: '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 }\'',
|
|
413
376
|
},
|
|
414
377
|
},
|
|
415
378
|
},
|
|
@@ -431,16 +394,16 @@ const EMBEDDED_METHODS = [
|
|
|
431
394
|
response: "{ data: { id: string; conditions: { conditions: object[]; }[]; createdAt: string; metrics: { id: string; }[]; name: string; status: 'ACTIVE' | 'INACTIVE'; type: 'SYSTEM' | 'USER'; updatedAt: string; }; }",
|
|
432
395
|
markdown: "## 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```",
|
|
433
396
|
perLanguage: {
|
|
434
|
-
|
|
435
|
-
|
|
397
|
+
typescript: {
|
|
398
|
+
method: 'client.metricPolicy.update',
|
|
399
|
+
example: "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);",
|
|
436
400
|
},
|
|
437
401
|
python: {
|
|
438
402
|
method: 'metric_policy.update',
|
|
439
403
|
example: '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)',
|
|
440
404
|
},
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
example: "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);",
|
|
405
|
+
http: {
|
|
406
|
+
example: 'curl https://api.roark.ai/v1/metric/policies/$POLICY_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
444
407
|
},
|
|
445
408
|
},
|
|
446
409
|
},
|
|
@@ -456,16 +419,16 @@ const EMBEDDED_METHODS = [
|
|
|
456
419
|
response: '{ data: { deleted: boolean; }; }',
|
|
457
420
|
markdown: "## 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```",
|
|
458
421
|
perLanguage: {
|
|
459
|
-
|
|
460
|
-
|
|
422
|
+
typescript: {
|
|
423
|
+
method: 'client.metricPolicy.delete',
|
|
424
|
+
example: "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);",
|
|
461
425
|
},
|
|
462
426
|
python: {
|
|
463
427
|
method: 'metric_policy.delete',
|
|
464
428
|
example: '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)',
|
|
465
429
|
},
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
example: "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);",
|
|
430
|
+
http: {
|
|
431
|
+
example: 'curl https://api.roark.ai/v1/metric/policies/$POLICY_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
469
432
|
},
|
|
470
433
|
},
|
|
471
434
|
},
|
|
@@ -485,16 +448,16 @@ const EMBEDDED_METHODS = [
|
|
|
485
448
|
response: "{ 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; }; }",
|
|
486
449
|
markdown: "## 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```",
|
|
487
450
|
perLanguage: {
|
|
488
|
-
|
|
489
|
-
|
|
451
|
+
typescript: {
|
|
452
|
+
method: 'client.metricCollectionJob.list',
|
|
453
|
+
example: "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);",
|
|
490
454
|
},
|
|
491
455
|
python: {
|
|
492
456
|
method: 'metric_collection_job.list',
|
|
493
457
|
example: '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)',
|
|
494
458
|
},
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
example: "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);",
|
|
459
|
+
http: {
|
|
460
|
+
example: 'curl https://api.roark.ai/v1/metric/collection-jobs \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
498
461
|
},
|
|
499
462
|
},
|
|
500
463
|
},
|
|
@@ -510,16 +473,16 @@ const EMBEDDED_METHODS = [
|
|
|
510
473
|
response: "{ 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; }; }",
|
|
511
474
|
markdown: "## 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```",
|
|
512
475
|
perLanguage: {
|
|
513
|
-
|
|
514
|
-
|
|
476
|
+
typescript: {
|
|
477
|
+
method: 'client.metricCollectionJob.getByID',
|
|
478
|
+
example: "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);",
|
|
515
479
|
},
|
|
516
480
|
python: {
|
|
517
481
|
method: 'metric_collection_job.get_by_id',
|
|
518
482
|
example: '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)',
|
|
519
483
|
},
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
example: "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);",
|
|
484
|
+
http: {
|
|
485
|
+
example: 'curl https://api.roark.ai/v1/metric/collection-jobs/$JOB_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
523
486
|
},
|
|
524
487
|
},
|
|
525
488
|
},
|
|
@@ -533,18 +496,45 @@ const EMBEDDED_METHODS = [
|
|
|
533
496
|
qualified: 'client.metricCollectionJob.create',
|
|
534
497
|
params: ['metrics: { id: string; }[];', 'callIds?: string[];', 'chatIds?: string[];'],
|
|
535
498
|
response: "{ 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; }; }",
|
|
536
|
-
markdown: "## 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
|
|
499
|
+
markdown: "## 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```",
|
|
537
500
|
perLanguage: {
|
|
538
|
-
|
|
539
|
-
|
|
501
|
+
typescript: {
|
|
502
|
+
method: 'client.metricCollectionJob.create',
|
|
503
|
+
example: "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);",
|
|
540
504
|
},
|
|
541
505
|
python: {
|
|
542
506
|
method: 'metric_collection_job.create',
|
|
543
507
|
example: '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)',
|
|
544
508
|
},
|
|
509
|
+
http: {
|
|
510
|
+
example: '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 }\'',
|
|
511
|
+
},
|
|
512
|
+
},
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
name: 'run',
|
|
516
|
+
endpoint: '/v1/simulation/run',
|
|
517
|
+
httpMethod: 'post',
|
|
518
|
+
summary: 'Run a simulation',
|
|
519
|
+
description: '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.',
|
|
520
|
+
stainlessPath: '(resource) simulation > (method) run',
|
|
521
|
+
qualified: 'client.simulation.run',
|
|
522
|
+
params: [
|
|
523
|
+
"{ 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; }[]; };",
|
|
524
|
+
],
|
|
525
|
+
response: '{ data: { createdAt: string; savedAsPlan: boolean; simulationJobCount: number; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }',
|
|
526
|
+
markdown: "## 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```",
|
|
527
|
+
perLanguage: {
|
|
545
528
|
typescript: {
|
|
546
|
-
method: 'client.
|
|
547
|
-
example: "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
|
|
529
|
+
method: 'client.simulation.run',
|
|
530
|
+
example: "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);",
|
|
531
|
+
},
|
|
532
|
+
python: {
|
|
533
|
+
method: 'simulation.run',
|
|
534
|
+
example: '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)',
|
|
535
|
+
},
|
|
536
|
+
http: {
|
|
537
|
+
example: 'curl https://api.roark.ai/v1/simulation/run \\\n -X POST \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
548
538
|
},
|
|
549
539
|
},
|
|
550
540
|
},
|
|
@@ -557,19 +547,19 @@ const EMBEDDED_METHODS = [
|
|
|
557
547
|
stainlessPath: '(resource) simulationJob > (method) lookup',
|
|
558
548
|
qualified: 'client.simulationJob.lookup',
|
|
559
549
|
params: ['roarkPhoneNumber: object;', 'callReceivedAt?: object;'],
|
|
560
|
-
response: '{ data: { agentEndpoint: object; createdAt: string; persona: object; processingStatus: string; scenario: object; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }',
|
|
561
|
-
markdown: "## 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:
|
|
550
|
+
response: '{ 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; }; }',
|
|
551
|
+
markdown: "## 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```",
|
|
562
552
|
perLanguage: {
|
|
563
|
-
|
|
564
|
-
|
|
553
|
+
typescript: {
|
|
554
|
+
method: 'client.simulationJob.lookup',
|
|
555
|
+
example: "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);",
|
|
565
556
|
},
|
|
566
557
|
python: {
|
|
567
558
|
method: 'simulation_job.lookup',
|
|
568
559
|
example: '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)',
|
|
569
560
|
},
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
example: "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);",
|
|
561
|
+
http: {
|
|
562
|
+
example: 'curl https://api.roark.ai/v1/simulation/job/lookup \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
573
563
|
},
|
|
574
564
|
},
|
|
575
565
|
},
|
|
@@ -582,19 +572,19 @@ const EMBEDDED_METHODS = [
|
|
|
582
572
|
stainlessPath: '(resource) simulationJob > (method) getById',
|
|
583
573
|
qualified: 'client.simulationJob.getByID',
|
|
584
574
|
params: ['jobId: object;'],
|
|
585
|
-
response: '{ data: { agentEndpoint: object; createdAt: string; persona: object; processingStatus: string; scenario: object; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }',
|
|
586
|
-
markdown: "## 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:
|
|
575
|
+
response: '{ 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; }; }',
|
|
576
|
+
markdown: "## 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```",
|
|
587
577
|
perLanguage: {
|
|
588
|
-
|
|
589
|
-
|
|
578
|
+
typescript: {
|
|
579
|
+
method: 'client.simulationJob.getByID',
|
|
580
|
+
example: "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);",
|
|
590
581
|
},
|
|
591
582
|
python: {
|
|
592
583
|
method: 'simulation_job.get_by_id',
|
|
593
584
|
example: '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)',
|
|
594
585
|
},
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
example: "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);",
|
|
586
|
+
http: {
|
|
587
|
+
example: 'curl https://api.roark.ai/v1/simulation/job/$JOB_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
598
588
|
},
|
|
599
589
|
},
|
|
600
590
|
},
|
|
@@ -607,19 +597,19 @@ const EMBEDDED_METHODS = [
|
|
|
607
597
|
stainlessPath: '(resource) simulationRunPlan > (method) list',
|
|
608
598
|
qualified: 'client.simulationRunPlan.list',
|
|
609
599
|
params: ['after?: string;', 'agentId?: string;', 'limit?: number;', 'searchText?: string;'],
|
|
610
|
-
response: "{ 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; }; }",
|
|
611
|
-
markdown: "## 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```",
|
|
600
|
+
response: "{ 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; }; }",
|
|
601
|
+
markdown: "## 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```",
|
|
612
602
|
perLanguage: {
|
|
613
|
-
|
|
614
|
-
|
|
603
|
+
typescript: {
|
|
604
|
+
method: 'client.simulationRunPlan.list',
|
|
605
|
+
example: "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);",
|
|
615
606
|
},
|
|
616
607
|
python: {
|
|
617
608
|
method: 'simulation_run_plan.list',
|
|
618
609
|
example: '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)',
|
|
619
610
|
},
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
example: "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);",
|
|
611
|
+
http: {
|
|
612
|
+
example: 'curl https://api.roark.ai/v1/simulation/plan \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
623
613
|
},
|
|
624
614
|
},
|
|
625
615
|
},
|
|
@@ -632,19 +622,19 @@ const EMBEDDED_METHODS = [
|
|
|
632
622
|
stainlessPath: '(resource) simulationRunPlan > (method) getById',
|
|
633
623
|
qualified: 'client.simulationRunPlan.getByID',
|
|
634
624
|
params: ['planId: string;'],
|
|
635
|
-
response: "{ 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; }; }",
|
|
636
|
-
markdown: "## 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```",
|
|
625
|
+
response: "{ 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; }; }",
|
|
626
|
+
markdown: "## 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```",
|
|
637
627
|
perLanguage: {
|
|
638
|
-
|
|
639
|
-
|
|
628
|
+
typescript: {
|
|
629
|
+
method: 'client.simulationRunPlan.getByID',
|
|
630
|
+
example: "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);",
|
|
640
631
|
},
|
|
641
632
|
python: {
|
|
642
633
|
method: 'simulation_run_plan.get_by_id',
|
|
643
634
|
example: '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)',
|
|
644
635
|
},
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
example: "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);",
|
|
636
|
+
http: {
|
|
637
|
+
example: 'curl https://api.roark.ai/v1/simulation/plan/$PLAN_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
648
638
|
},
|
|
649
639
|
},
|
|
650
640
|
},
|
|
@@ -653,39 +643,40 @@ const EMBEDDED_METHODS = [
|
|
|
653
643
|
endpoint: '/v1/simulation/plan',
|
|
654
644
|
httpMethod: 'post',
|
|
655
645
|
summary: 'Create a run plan',
|
|
656
|
-
description: 'Creates a new simulation run plan
|
|
646
|
+
description: '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.',
|
|
657
647
|
stainlessPath: '(resource) simulationRunPlan > (method) create',
|
|
658
648
|
qualified: 'client.simulationRunPlan.create',
|
|
659
649
|
params: [
|
|
660
650
|
'agentEndpoints: { id: string; }[];',
|
|
661
651
|
"direction: 'INBOUND' | 'OUTBOUND';",
|
|
662
652
|
'maxSimulationDurationSeconds: number;',
|
|
663
|
-
'metrics: { id
|
|
653
|
+
'metrics: { id?: string; metricId?: string; slug?: string; }[];',
|
|
664
654
|
'name: string;',
|
|
665
|
-
'personas: { id: string; }[];',
|
|
666
|
-
'scenarios: { id: string; variables?: object; }[];',
|
|
667
655
|
'autoRun?: boolean;',
|
|
668
656
|
'description?: string;',
|
|
669
657
|
'endCallPhrases?: string[];',
|
|
670
658
|
'endCallReasons?: string[];',
|
|
671
659
|
"executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';",
|
|
660
|
+
"flows?: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[];",
|
|
672
661
|
'iterationCount?: number;',
|
|
673
662
|
'maxConcurrentJobs?: number;',
|
|
663
|
+
'personas?: { id: string; }[];',
|
|
664
|
+
'scenarios?: { id: string; variables?: object; }[];',
|
|
674
665
|
'silenceTimeoutSeconds?: number;',
|
|
675
666
|
],
|
|
676
|
-
response: "{ 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; }; }; }",
|
|
677
|
-
markdown: "## create\n\n`client.simulationRunPlan.create(agentEndpoints: { id: string; }[], direction: 'INBOUND' | 'OUTBOUND', maxSimulationDurationSeconds: number, metrics: { id
|
|
667
|
+
response: "{ 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; }; }; }",
|
|
668
|
+
markdown: "## 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```",
|
|
678
669
|
perLanguage: {
|
|
679
|
-
|
|
680
|
-
|
|
670
|
+
typescript: {
|
|
671
|
+
method: 'client.simulationRunPlan.create',
|
|
672
|
+
example: "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);",
|
|
681
673
|
},
|
|
682
674
|
python: {
|
|
683
675
|
method: 'simulation_run_plan.create',
|
|
684
|
-
example: '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=[{
|
|
676
|
+
example: '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)',
|
|
685
677
|
},
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
example: "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);",
|
|
678
|
+
http: {
|
|
679
|
+
example: '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 }\'',
|
|
689
680
|
},
|
|
690
681
|
},
|
|
691
682
|
},
|
|
@@ -705,28 +696,30 @@ const EMBEDDED_METHODS = [
|
|
|
705
696
|
'endCallPhrases?: string[];',
|
|
706
697
|
'endCallReasons?: string[];',
|
|
707
698
|
"executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';",
|
|
699
|
+
"flows?: { id: string; edgeCases?: 'ALL' | { id: string; personaOverrideId?: string; variables?: object; }[]; happyPath?: boolean; personaOverrideId?: string; variables?: object; }[];",
|
|
700
|
+
'isHidden?: boolean;',
|
|
708
701
|
'iterationCount?: number;',
|
|
709
702
|
'maxConcurrentJobs?: number;',
|
|
710
703
|
'maxSimulationDurationSeconds?: number;',
|
|
711
|
-
'metrics?: { id
|
|
704
|
+
'metrics?: { id?: string; metricId?: string; slug?: string; }[];',
|
|
712
705
|
'name?: string;',
|
|
713
706
|
'personas?: { id: string; }[];',
|
|
714
707
|
'scenarios?: { id: string; variables?: object; }[];',
|
|
715
708
|
'silenceTimeoutSeconds?: number;',
|
|
716
709
|
],
|
|
717
|
-
response: "{ 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; }; }",
|
|
718
|
-
markdown: "## 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
|
|
710
|
+
response: "{ 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; }; }",
|
|
711
|
+
markdown: "## 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```",
|
|
719
712
|
perLanguage: {
|
|
720
|
-
|
|
721
|
-
|
|
713
|
+
typescript: {
|
|
714
|
+
method: 'client.simulationRunPlan.update',
|
|
715
|
+
example: "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);",
|
|
722
716
|
},
|
|
723
717
|
python: {
|
|
724
718
|
method: 'simulation_run_plan.update',
|
|
725
719
|
example: '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)',
|
|
726
720
|
},
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
example: "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);",
|
|
721
|
+
http: {
|
|
722
|
+
example: 'curl https://api.roark.ai/v1/simulation/plan/$PLAN_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
730
723
|
},
|
|
731
724
|
},
|
|
732
725
|
},
|
|
@@ -742,16 +735,16 @@ const EMBEDDED_METHODS = [
|
|
|
742
735
|
response: '{ data: { deleted: boolean; }; }',
|
|
743
736
|
markdown: "## 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```",
|
|
744
737
|
perLanguage: {
|
|
745
|
-
|
|
746
|
-
|
|
738
|
+
typescript: {
|
|
739
|
+
method: 'client.simulationRunPlan.delete',
|
|
740
|
+
example: "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);",
|
|
747
741
|
},
|
|
748
742
|
python: {
|
|
749
743
|
method: 'simulation_run_plan.delete',
|
|
750
744
|
example: '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)',
|
|
751
745
|
},
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
example: "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);",
|
|
746
|
+
http: {
|
|
747
|
+
example: 'curl https://api.roark.ai/v1/simulation/plan/$PLAN_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
755
748
|
},
|
|
756
749
|
},
|
|
757
750
|
},
|
|
@@ -771,19 +764,19 @@ const EMBEDDED_METHODS = [
|
|
|
771
764
|
'simulationRunPlanId?: string;',
|
|
772
765
|
'status?: string;',
|
|
773
766
|
],
|
|
774
|
-
response: "{ 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; }; }",
|
|
775
|
-
markdown: "## 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,
|
|
767
|
+
response: "{ 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; }; }",
|
|
768
|
+
markdown: "## 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```",
|
|
776
769
|
perLanguage: {
|
|
777
|
-
|
|
778
|
-
|
|
770
|
+
typescript: {
|
|
771
|
+
method: 'client.simulationRunPlanJob.list',
|
|
772
|
+
example: "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);",
|
|
779
773
|
},
|
|
780
774
|
python: {
|
|
781
775
|
method: 'simulation_run_plan_job.list',
|
|
782
776
|
example: '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)',
|
|
783
777
|
},
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
example: "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);",
|
|
778
|
+
http: {
|
|
779
|
+
example: 'curl https://api.roark.ai/v1/simulation/plan/jobs \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
787
780
|
},
|
|
788
781
|
},
|
|
789
782
|
},
|
|
@@ -797,18 +790,18 @@ const EMBEDDED_METHODS = [
|
|
|
797
790
|
qualified: 'client.simulationRunPlanJob.getByID',
|
|
798
791
|
params: ['jobId: object;'],
|
|
799
792
|
response: '{ 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; }; }',
|
|
800
|
-
markdown: "## 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:
|
|
793
|
+
markdown: "## 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```",
|
|
801
794
|
perLanguage: {
|
|
802
|
-
|
|
803
|
-
|
|
795
|
+
typescript: {
|
|
796
|
+
method: 'client.simulationRunPlanJob.getByID',
|
|
797
|
+
example: "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);",
|
|
804
798
|
},
|
|
805
799
|
python: {
|
|
806
800
|
method: 'simulation_run_plan_job.get_by_id',
|
|
807
801
|
example: '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)',
|
|
808
802
|
},
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
example: "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);",
|
|
803
|
+
http: {
|
|
804
|
+
example: 'curl https://api.roark.ai/v1/simulation/plan/job/$JOB_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
812
805
|
},
|
|
813
806
|
},
|
|
814
807
|
},
|
|
@@ -817,155 +810,26 @@ const EMBEDDED_METHODS = [
|
|
|
817
810
|
endpoint: '/v1/simulation/plan/{planId}/job',
|
|
818
811
|
httpMethod: 'post',
|
|
819
812
|
summary: 'Run a simulation plan',
|
|
820
|
-
description: '
|
|
813
|
+
description: '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.',
|
|
821
814
|
stainlessPath: '(resource) simulationRunPlanJob > (method) start',
|
|
822
815
|
qualified: 'client.simulationRunPlanJob.start',
|
|
823
|
-
params: [
|
|
816
|
+
params: [
|
|
817
|
+
'planId: object;',
|
|
818
|
+
'variables?: object | { flowId: string; variables: object; edgeCaseId?: string; happyPath?: true; }[] | { scenarioId: string; variables: object; }[];',
|
|
819
|
+
],
|
|
824
820
|
response: '{ data: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }',
|
|
825
|
-
markdown: '## 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\
|
|
821
|
+
markdown: '## 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```',
|
|
826
822
|
perLanguage: {
|
|
827
|
-
http: {
|
|
828
|
-
example: 'curl https://api.roark.ai/v1/simulation/plan/$PLAN_ID/job \\\n -X POST \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
829
|
-
},
|
|
830
|
-
python: {
|
|
831
|
-
method: 'simulation_run_plan_job.start',
|
|
832
|
-
example: '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)',
|
|
833
|
-
},
|
|
834
823
|
typescript: {
|
|
835
824
|
method: 'client.simulationRunPlanJob.start',
|
|
836
825
|
example: "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);",
|
|
837
826
|
},
|
|
838
|
-
},
|
|
839
|
-
},
|
|
840
|
-
{
|
|
841
|
-
name: 'list',
|
|
842
|
-
endpoint: '/v1/simulation/scenario',
|
|
843
|
-
httpMethod: 'get',
|
|
844
|
-
summary: 'List simulation scenarios',
|
|
845
|
-
description: 'Returns a paginated list of simulation scenarios for the authenticated project.',
|
|
846
|
-
stainlessPath: '(resource) simulationScenario > (method) list',
|
|
847
|
-
qualified: 'client.simulationScenario.list',
|
|
848
|
-
params: ['after?: string;', 'limit?: number;'],
|
|
849
|
-
response: '{ 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; }; }',
|
|
850
|
-
markdown: "## 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```",
|
|
851
|
-
perLanguage: {
|
|
852
|
-
http: {
|
|
853
|
-
example: 'curl https://api.roark.ai/v1/simulation/scenario \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
854
|
-
},
|
|
855
827
|
python: {
|
|
856
|
-
method: '
|
|
857
|
-
example: '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)\
|
|
858
|
-
},
|
|
859
|
-
typescript: {
|
|
860
|
-
method: 'client.simulationScenario.list',
|
|
861
|
-
example: "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);",
|
|
862
|
-
},
|
|
863
|
-
},
|
|
864
|
-
},
|
|
865
|
-
{
|
|
866
|
-
name: 'getById',
|
|
867
|
-
endpoint: '/v1/simulation/scenario/{scenarioId}',
|
|
868
|
-
httpMethod: 'get',
|
|
869
|
-
summary: 'Get scenario by ID',
|
|
870
|
-
description: 'Returns a specific simulation scenario by its ID.',
|
|
871
|
-
stainlessPath: '(resource) simulationScenario > (method) getById',
|
|
872
|
-
qualified: 'client.simulationScenario.getByID',
|
|
873
|
-
params: ['scenarioId: string;'],
|
|
874
|
-
response: '{ data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }; }',
|
|
875
|
-
markdown: "## 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```",
|
|
876
|
-
perLanguage: {
|
|
877
|
-
http: {
|
|
878
|
-
example: 'curl https://api.roark.ai/v1/simulation/scenario/$SCENARIO_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
879
|
-
},
|
|
880
|
-
python: {
|
|
881
|
-
method: 'simulation_scenario.get_by_id',
|
|
882
|
-
example: '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)',
|
|
883
|
-
},
|
|
884
|
-
typescript: {
|
|
885
|
-
method: 'client.simulationScenario.getByID',
|
|
886
|
-
example: "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);",
|
|
887
|
-
},
|
|
888
|
-
},
|
|
889
|
-
},
|
|
890
|
-
{
|
|
891
|
-
name: 'create',
|
|
892
|
-
endpoint: '/v1/simulation/scenario',
|
|
893
|
-
httpMethod: 'post',
|
|
894
|
-
summary: 'Create a scenario',
|
|
895
|
-
description: 'Creates a new simulation scenario for the authenticated project.',
|
|
896
|
-
stainlessPath: '(resource) simulationScenario > (method) create',
|
|
897
|
-
qualified: 'client.simulationScenario.create',
|
|
898
|
-
params: [
|
|
899
|
-
'name: string;',
|
|
900
|
-
'steps: { content: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[];',
|
|
901
|
-
],
|
|
902
|
-
response: '{ data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }; }',
|
|
903
|
-
markdown: "## 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```",
|
|
904
|
-
perLanguage: {
|
|
905
|
-
http: {
|
|
906
|
-
example: '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 }\'',
|
|
907
|
-
},
|
|
908
|
-
python: {
|
|
909
|
-
method: 'simulation_scenario.create',
|
|
910
|
-
example: '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)',
|
|
911
|
-
},
|
|
912
|
-
typescript: {
|
|
913
|
-
method: 'client.simulationScenario.create',
|
|
914
|
-
example: "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);",
|
|
915
|
-
},
|
|
916
|
-
},
|
|
917
|
-
},
|
|
918
|
-
{
|
|
919
|
-
name: 'update',
|
|
920
|
-
endpoint: '/v1/simulation/scenario/{scenarioId}',
|
|
921
|
-
httpMethod: 'put',
|
|
922
|
-
summary: 'Update a scenario',
|
|
923
|
-
description: 'Updates an existing simulation scenario by its ID.',
|
|
924
|
-
stainlessPath: '(resource) simulationScenario > (method) update',
|
|
925
|
-
qualified: 'client.simulationScenario.update',
|
|
926
|
-
params: [
|
|
927
|
-
'scenarioId: string;',
|
|
928
|
-
"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; }[];",
|
|
929
|
-
'name?: string;',
|
|
930
|
-
],
|
|
931
|
-
response: '{ data: { id: string; createdAt: string; description: string; name: string; steps: { content: string; nodeId: string; type: string; dtmfDigits?: string; linkedScenarioId?: string; silenceDurationSeconds?: number; }[]; updatedAt: string; }; }',
|
|
932
|
-
markdown: "## 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```",
|
|
933
|
-
perLanguage: {
|
|
934
|
-
http: {
|
|
935
|
-
example: '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 }\'',
|
|
936
|
-
},
|
|
937
|
-
python: {
|
|
938
|
-
method: 'simulation_scenario.update',
|
|
939
|
-
example: '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)',
|
|
940
|
-
},
|
|
941
|
-
typescript: {
|
|
942
|
-
method: 'client.simulationScenario.update',
|
|
943
|
-
example: "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);",
|
|
828
|
+
method: 'simulation_run_plan_job.start',
|
|
829
|
+
example: '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)',
|
|
944
830
|
},
|
|
945
|
-
},
|
|
946
|
-
},
|
|
947
|
-
{
|
|
948
|
-
name: 'delete',
|
|
949
|
-
endpoint: '/v1/simulation/scenario/{scenarioId}',
|
|
950
|
-
httpMethod: 'delete',
|
|
951
|
-
summary: 'Delete a scenario',
|
|
952
|
-
description: 'Deletes a simulation scenario by its ID.',
|
|
953
|
-
stainlessPath: '(resource) simulationScenario > (method) delete',
|
|
954
|
-
qualified: 'client.simulationScenario.delete',
|
|
955
|
-
params: ['scenarioId: string;'],
|
|
956
|
-
response: '{ data: { deleted: boolean; }; }',
|
|
957
|
-
markdown: "## 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```",
|
|
958
|
-
perLanguage: {
|
|
959
831
|
http: {
|
|
960
|
-
example: 'curl https://api.roark.ai/v1/simulation/
|
|
961
|
-
},
|
|
962
|
-
python: {
|
|
963
|
-
method: 'simulation_scenario.delete',
|
|
964
|
-
example: '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)',
|
|
965
|
-
},
|
|
966
|
-
typescript: {
|
|
967
|
-
method: 'client.simulationScenario.delete',
|
|
968
|
-
example: "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);",
|
|
832
|
+
example: 'curl https://api.roark.ai/v1/simulation/plan/$PLAN_ID/job \\\n -X POST \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
969
833
|
},
|
|
970
834
|
},
|
|
971
835
|
},
|
|
@@ -978,19 +842,19 @@ const EMBEDDED_METHODS = [
|
|
|
978
842
|
stainlessPath: '(resource) simulationPersona > (method) list',
|
|
979
843
|
qualified: 'client.simulationPersona.list',
|
|
980
844
|
params: ['after?: string;', 'limit?: number;', 'searchText?: string;'],
|
|
981
|
-
response: "{ 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; }; }",
|
|
982
|
-
markdown: "## 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```",
|
|
845
|
+
response: "{ 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; }; }",
|
|
846
|
+
markdown: "## 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```",
|
|
983
847
|
perLanguage: {
|
|
984
|
-
|
|
985
|
-
|
|
848
|
+
typescript: {
|
|
849
|
+
method: 'client.simulationPersona.list',
|
|
850
|
+
example: "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);",
|
|
986
851
|
},
|
|
987
852
|
python: {
|
|
988
853
|
method: 'simulation_persona.list',
|
|
989
854
|
example: '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)',
|
|
990
855
|
},
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
example: "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);",
|
|
856
|
+
http: {
|
|
857
|
+
example: 'curl https://api.roark.ai/v1/persona \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
994
858
|
},
|
|
995
859
|
},
|
|
996
860
|
},
|
|
@@ -1003,19 +867,19 @@ const EMBEDDED_METHODS = [
|
|
|
1003
867
|
stainlessPath: '(resource) simulationPersona > (method) getById',
|
|
1004
868
|
qualified: 'client.simulationPersona.getByID',
|
|
1005
869
|
params: ['personaId: string;'],
|
|
1006
|
-
response: "{ 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'; }; }",
|
|
1007
|
-
markdown: "## 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```",
|
|
870
|
+
response: "{ 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'; }; }",
|
|
871
|
+
markdown: "## 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```",
|
|
1008
872
|
perLanguage: {
|
|
1009
|
-
|
|
1010
|
-
|
|
873
|
+
typescript: {
|
|
874
|
+
method: 'client.simulationPersona.getByID',
|
|
875
|
+
example: "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);",
|
|
1011
876
|
},
|
|
1012
877
|
python: {
|
|
1013
878
|
method: 'simulation_persona.get_by_id',
|
|
1014
879
|
example: '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)',
|
|
1015
880
|
},
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
example: "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);",
|
|
881
|
+
http: {
|
|
882
|
+
example: 'curl https://api.roark.ai/v1/persona/$PERSONA_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1019
883
|
},
|
|
1020
884
|
},
|
|
1021
885
|
},
|
|
@@ -1049,20 +913,21 @@ const EMBEDDED_METHODS = [
|
|
|
1049
913
|
"secondaryLanguage?: 'EN';",
|
|
1050
914
|
"speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';",
|
|
1051
915
|
"speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';",
|
|
916
|
+
'understoodLanguages?: string[];',
|
|
1052
917
|
],
|
|
1053
|
-
response: "{ 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'; }; }",
|
|
1054
|
-
markdown: "## 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
|
|
918
|
+
response: "{ 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'; }; }",
|
|
919
|
+
markdown: "## 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```",
|
|
1055
920
|
perLanguage: {
|
|
1056
|
-
|
|
1057
|
-
|
|
921
|
+
typescript: {
|
|
922
|
+
method: 'client.simulationPersona.create',
|
|
923
|
+
example: "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);",
|
|
1058
924
|
},
|
|
1059
925
|
python: {
|
|
1060
926
|
method: 'simulation_persona.create',
|
|
1061
927
|
example: '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)',
|
|
1062
928
|
},
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
example: "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);",
|
|
929
|
+
http: {
|
|
930
|
+
example: '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 }\'',
|
|
1066
931
|
},
|
|
1067
932
|
},
|
|
1068
933
|
},
|
|
@@ -1097,20 +962,391 @@ const EMBEDDED_METHODS = [
|
|
|
1097
962
|
"secondaryLanguage?: 'EN';",
|
|
1098
963
|
"speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';",
|
|
1099
964
|
"speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';",
|
|
965
|
+
'understoodLanguages?: string[];',
|
|
1100
966
|
],
|
|
1101
|
-
response: "{ 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'; }; }",
|
|
1102
|
-
markdown: "## 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```",
|
|
967
|
+
response: "{ 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'; }; }",
|
|
968
|
+
markdown: "## 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```",
|
|
1103
969
|
perLanguage: {
|
|
1104
|
-
|
|
1105
|
-
|
|
970
|
+
typescript: {
|
|
971
|
+
method: 'client.simulationPersona.update',
|
|
972
|
+
example: "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);",
|
|
1106
973
|
},
|
|
1107
974
|
python: {
|
|
1108
975
|
method: 'simulation_persona.update',
|
|
1109
976
|
example: '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)',
|
|
1110
977
|
},
|
|
978
|
+
http: {
|
|
979
|
+
example: 'curl https://api.roark.ai/v1/persona/$PERSONA_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
980
|
+
},
|
|
981
|
+
},
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
name: 'list',
|
|
985
|
+
endpoint: '/v1/simulation/environment',
|
|
986
|
+
httpMethod: 'get',
|
|
987
|
+
summary: 'List environments',
|
|
988
|
+
description: "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.",
|
|
989
|
+
stainlessPath: '(resource) simulationEnvironment > (method) list',
|
|
990
|
+
qualified: 'client.simulationEnvironment.list',
|
|
991
|
+
params: ['after?: string;', 'limit?: number;'],
|
|
992
|
+
response: '{ data: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }',
|
|
993
|
+
markdown: "## 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```",
|
|
994
|
+
perLanguage: {
|
|
1111
995
|
typescript: {
|
|
1112
|
-
method: 'client.
|
|
1113
|
-
example: "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
|
|
996
|
+
method: 'client.simulationEnvironment.list',
|
|
997
|
+
example: "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);",
|
|
998
|
+
},
|
|
999
|
+
python: {
|
|
1000
|
+
method: 'simulation_environment.list',
|
|
1001
|
+
example: '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)',
|
|
1002
|
+
},
|
|
1003
|
+
http: {
|
|
1004
|
+
example: 'curl https://api.roark.ai/v1/simulation/environment \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1005
|
+
},
|
|
1006
|
+
},
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
name: 'getById',
|
|
1010
|
+
endpoint: '/v1/simulation/environment/{environmentId}',
|
|
1011
|
+
httpMethod: 'get',
|
|
1012
|
+
summary: 'Get environment by ID',
|
|
1013
|
+
description: 'Returns a single environment by its ID.',
|
|
1014
|
+
stainlessPath: '(resource) simulationEnvironment > (method) getById',
|
|
1015
|
+
qualified: 'client.simulationEnvironment.getByID',
|
|
1016
|
+
params: ['environmentId: string;'],
|
|
1017
|
+
response: '{ data: { id: string; backgroundNoise: string; createdAt: string; name: string; updatedAt: string; description?: string; }; }',
|
|
1018
|
+
markdown: "## 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```",
|
|
1019
|
+
perLanguage: {
|
|
1020
|
+
typescript: {
|
|
1021
|
+
method: 'client.simulationEnvironment.getByID',
|
|
1022
|
+
example: "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);",
|
|
1023
|
+
},
|
|
1024
|
+
python: {
|
|
1025
|
+
method: 'simulation_environment.get_by_id',
|
|
1026
|
+
example: '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)',
|
|
1027
|
+
},
|
|
1028
|
+
http: {
|
|
1029
|
+
example: 'curl https://api.roark.ai/v1/simulation/environment/$ENVIRONMENT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1030
|
+
},
|
|
1031
|
+
},
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
name: 'list',
|
|
1035
|
+
endpoint: '/v1/customer-flow',
|
|
1036
|
+
httpMethod: 'get',
|
|
1037
|
+
summary: 'List customer flows',
|
|
1038
|
+
description: "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.",
|
|
1039
|
+
stainlessPath: '(resource) customerFlow > (method) list',
|
|
1040
|
+
qualified: 'client.customerFlow.list',
|
|
1041
|
+
params: [
|
|
1042
|
+
'after?: string;',
|
|
1043
|
+
"includeSystem?: 'true' | 'false';",
|
|
1044
|
+
'limit?: number;',
|
|
1045
|
+
'searchText?: string;',
|
|
1046
|
+
"type?: 'SCRIPTED' | 'IMPROV' | 'VOICEMAIL';",
|
|
1047
|
+
],
|
|
1048
|
+
response: "{ 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; }; }",
|
|
1049
|
+
markdown: "## 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```",
|
|
1050
|
+
perLanguage: {
|
|
1051
|
+
typescript: {
|
|
1052
|
+
method: 'client.customerFlow.list',
|
|
1053
|
+
example: "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);",
|
|
1054
|
+
},
|
|
1055
|
+
python: {
|
|
1056
|
+
method: 'customer_flow.list',
|
|
1057
|
+
example: '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)',
|
|
1058
|
+
},
|
|
1059
|
+
http: {
|
|
1060
|
+
example: 'curl https://api.roark.ai/v1/customer-flow \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1061
|
+
},
|
|
1062
|
+
},
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
name: 'getById',
|
|
1066
|
+
endpoint: '/v1/customer-flow/{flowId}',
|
|
1067
|
+
httpMethod: 'get',
|
|
1068
|
+
summary: 'Get customer flow by ID',
|
|
1069
|
+
description: 'Returns a customer flow with its happy path, edge cases, expectations and linked agents. Scripted flows also carry their step graph.',
|
|
1070
|
+
stainlessPath: '(resource) customerFlow > (method) getById',
|
|
1071
|
+
qualified: 'client.customerFlow.getByID',
|
|
1072
|
+
params: ['flowId: string;'],
|
|
1073
|
+
response: "{ 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; }; }",
|
|
1074
|
+
markdown: "## 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```",
|
|
1075
|
+
perLanguage: {
|
|
1076
|
+
typescript: {
|
|
1077
|
+
method: 'client.customerFlow.getByID',
|
|
1078
|
+
example: "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);",
|
|
1079
|
+
},
|
|
1080
|
+
python: {
|
|
1081
|
+
method: 'customer_flow.get_by_id',
|
|
1082
|
+
example: '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)',
|
|
1083
|
+
},
|
|
1084
|
+
http: {
|
|
1085
|
+
example: 'curl https://api.roark.ai/v1/customer-flow/$FLOW_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1086
|
+
},
|
|
1087
|
+
},
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
name: 'create',
|
|
1091
|
+
endpoint: '/v1/customer-flow',
|
|
1092
|
+
httpMethod: 'post',
|
|
1093
|
+
summary: 'Create a customer flow',
|
|
1094
|
+
description: '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.',
|
|
1095
|
+
stainlessPath: '(resource) customerFlow > (method) create',
|
|
1096
|
+
qualified: 'client.customerFlow.create',
|
|
1097
|
+
params: [
|
|
1098
|
+
"{ 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; }[]; };",
|
|
1099
|
+
],
|
|
1100
|
+
response: "{ 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; }; }",
|
|
1101
|
+
perLanguage: {
|
|
1102
|
+
typescript: {
|
|
1103
|
+
method: 'client.customerFlow.create',
|
|
1104
|
+
example: "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);",
|
|
1105
|
+
},
|
|
1106
|
+
python: {
|
|
1107
|
+
method: 'customer_flow.create',
|
|
1108
|
+
example: '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)',
|
|
1109
|
+
},
|
|
1110
|
+
http: {
|
|
1111
|
+
example: '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 }\'',
|
|
1112
|
+
},
|
|
1113
|
+
},
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
name: 'update',
|
|
1117
|
+
endpoint: '/v1/customer-flow/{flowId}',
|
|
1118
|
+
httpMethod: 'put',
|
|
1119
|
+
summary: 'Update a customer flow',
|
|
1120
|
+
description: "Updates a flow's title, description, branching mode, linked agents or flow-level expectations. The step graph is replaced through PUT /graph.",
|
|
1121
|
+
stainlessPath: '(resource) customerFlow > (method) update',
|
|
1122
|
+
qualified: 'client.customerFlow.update',
|
|
1123
|
+
params: [
|
|
1124
|
+
'flowId: string;',
|
|
1125
|
+
'agentExpectations?: { prompt: string; }[];',
|
|
1126
|
+
'agentIds?: string[];',
|
|
1127
|
+
"branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE';",
|
|
1128
|
+
'description?: string;',
|
|
1129
|
+
'title?: string;',
|
|
1130
|
+
],
|
|
1131
|
+
response: "{ 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; }; }",
|
|
1132
|
+
markdown: "## 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```",
|
|
1133
|
+
perLanguage: {
|
|
1134
|
+
typescript: {
|
|
1135
|
+
method: 'client.customerFlow.update',
|
|
1136
|
+
example: "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);",
|
|
1137
|
+
},
|
|
1138
|
+
python: {
|
|
1139
|
+
method: 'customer_flow.update',
|
|
1140
|
+
example: '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)',
|
|
1141
|
+
},
|
|
1142
|
+
http: {
|
|
1143
|
+
example: 'curl https://api.roark.ai/v1/customer-flow/$FLOW_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1144
|
+
},
|
|
1145
|
+
},
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
name: 'delete',
|
|
1149
|
+
endpoint: '/v1/customer-flow/{flowId}',
|
|
1150
|
+
httpMethod: 'delete',
|
|
1151
|
+
summary: 'Delete a customer flow',
|
|
1152
|
+
description: '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.',
|
|
1153
|
+
stainlessPath: '(resource) customerFlow > (method) delete',
|
|
1154
|
+
qualified: 'client.customerFlow.delete',
|
|
1155
|
+
params: ['flowId: string;'],
|
|
1156
|
+
response: '{ data: { deleted: boolean; }; }',
|
|
1157
|
+
markdown: "## 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```",
|
|
1158
|
+
perLanguage: {
|
|
1159
|
+
typescript: {
|
|
1160
|
+
method: 'client.customerFlow.delete',
|
|
1161
|
+
example: "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);",
|
|
1162
|
+
},
|
|
1163
|
+
python: {
|
|
1164
|
+
method: 'customer_flow.delete',
|
|
1165
|
+
example: '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)',
|
|
1166
|
+
},
|
|
1167
|
+
http: {
|
|
1168
|
+
example: 'curl https://api.roark.ai/v1/customer-flow/$FLOW_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1169
|
+
},
|
|
1170
|
+
},
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
name: 'replaceGraph',
|
|
1174
|
+
endpoint: '/v1/customer-flow/{flowId}/graph',
|
|
1175
|
+
httpMethod: 'put',
|
|
1176
|
+
summary: "Replace a scripted flow's steps",
|
|
1177
|
+
description: "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.",
|
|
1178
|
+
stainlessPath: '(resource) customerFlow > (method) replaceGraph',
|
|
1179
|
+
qualified: 'client.customerFlow.replaceGraph',
|
|
1180
|
+
params: [
|
|
1181
|
+
'flowId: string;',
|
|
1182
|
+
"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[]; }[]; }[];",
|
|
1183
|
+
'allowUnmerge?: boolean;',
|
|
1184
|
+
],
|
|
1185
|
+
response: '{ data: { edgeCases: object | object | object[]; graph: flow_step[]; happyPath: object | object | object; variantsReshaped: boolean; warnings: string[]; }; }',
|
|
1186
|
+
markdown: "## 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```",
|
|
1187
|
+
perLanguage: {
|
|
1188
|
+
typescript: {
|
|
1189
|
+
method: 'client.customerFlow.replaceGraph',
|
|
1190
|
+
example: "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);",
|
|
1191
|
+
},
|
|
1192
|
+
python: {
|
|
1193
|
+
method: 'customer_flow.replace_graph',
|
|
1194
|
+
example: '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)',
|
|
1195
|
+
},
|
|
1196
|
+
http: {
|
|
1197
|
+
example: '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 }\'',
|
|
1198
|
+
},
|
|
1199
|
+
},
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
name: 'updateHappyPath',
|
|
1203
|
+
endpoint: '/v1/customer-flow/{flowId}/happy-path',
|
|
1204
|
+
httpMethod: 'put',
|
|
1205
|
+
summary: "Update a flow's happy path",
|
|
1206
|
+
description: "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.",
|
|
1207
|
+
stainlessPath: '(resource) customerFlow > (method) updateHappyPath',
|
|
1208
|
+
qualified: 'client.customerFlow.updateHappyPath',
|
|
1209
|
+
params: [
|
|
1210
|
+
'flowId: string;',
|
|
1211
|
+
'additionalExpectations?: { prompt: string; }[];',
|
|
1212
|
+
'environmentId?: string;',
|
|
1213
|
+
'personaOverrideId?: string;',
|
|
1214
|
+
'precededByCustomerFlowId?: string;',
|
|
1215
|
+
'precededByCustomerFlowVariantId?: string;',
|
|
1216
|
+
'prompt?: string;',
|
|
1217
|
+
'title?: string;',
|
|
1218
|
+
],
|
|
1219
|
+
response: "{ 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; }; }",
|
|
1220
|
+
markdown: "## 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```",
|
|
1221
|
+
perLanguage: {
|
|
1222
|
+
typescript: {
|
|
1223
|
+
method: 'client.customerFlow.updateHappyPath',
|
|
1224
|
+
example: "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);",
|
|
1225
|
+
},
|
|
1226
|
+
python: {
|
|
1227
|
+
method: 'customer_flow.update_happy_path',
|
|
1228
|
+
example: '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)',
|
|
1229
|
+
},
|
|
1230
|
+
http: {
|
|
1231
|
+
example: 'curl https://api.roark.ai/v1/customer-flow/$FLOW_ID/happy-path \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1232
|
+
},
|
|
1233
|
+
},
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
name: 'add',
|
|
1237
|
+
endpoint: '/v1/customer-flow/{flowId}/edge-case',
|
|
1238
|
+
httpMethod: 'post',
|
|
1239
|
+
summary: 'Add an edge case',
|
|
1240
|
+
description: "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.",
|
|
1241
|
+
stainlessPath: '(resource) customerFlowEdgeCase > (method) add',
|
|
1242
|
+
qualified: 'client.customerFlowEdgeCase.add',
|
|
1243
|
+
params: [
|
|
1244
|
+
'flowId: string;',
|
|
1245
|
+
'title: string;',
|
|
1246
|
+
'environmentId?: string;',
|
|
1247
|
+
'personaOverrideId?: string;',
|
|
1248
|
+
'precededByCustomerFlowId?: string;',
|
|
1249
|
+
'precededByCustomerFlowVariantId?: string;',
|
|
1250
|
+
'prompt?: string;',
|
|
1251
|
+
],
|
|
1252
|
+
response: "{ 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; }; }",
|
|
1253
|
+
markdown: "## 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```",
|
|
1254
|
+
perLanguage: {
|
|
1255
|
+
typescript: {
|
|
1256
|
+
method: 'client.customerFlowEdgeCase.add',
|
|
1257
|
+
example: "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);",
|
|
1258
|
+
},
|
|
1259
|
+
python: {
|
|
1260
|
+
method: 'customer_flow_edge_case.add',
|
|
1261
|
+
example: '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)',
|
|
1262
|
+
},
|
|
1263
|
+
http: {
|
|
1264
|
+
example: '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 }\'',
|
|
1265
|
+
},
|
|
1266
|
+
},
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
name: 'update',
|
|
1270
|
+
endpoint: '/v1/customer-flow/{flowId}/edge-case/{edgeCaseId}',
|
|
1271
|
+
httpMethod: 'put',
|
|
1272
|
+
summary: 'Update an edge case',
|
|
1273
|
+
description: "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.",
|
|
1274
|
+
stainlessPath: '(resource) customerFlowEdgeCase > (method) update',
|
|
1275
|
+
qualified: 'client.customerFlowEdgeCase.update',
|
|
1276
|
+
params: [
|
|
1277
|
+
'flowId: string;',
|
|
1278
|
+
'edgeCaseId: string;',
|
|
1279
|
+
'additionalExpectations?: { prompt: string; }[];',
|
|
1280
|
+
'environmentId?: string;',
|
|
1281
|
+
'personaOverrideId?: string;',
|
|
1282
|
+
'precededByCustomerFlowId?: string;',
|
|
1283
|
+
'precededByCustomerFlowVariantId?: string;',
|
|
1284
|
+
'prompt?: string;',
|
|
1285
|
+
'title?: string;',
|
|
1286
|
+
],
|
|
1287
|
+
response: "{ 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; }; }",
|
|
1288
|
+
markdown: "## 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```",
|
|
1289
|
+
perLanguage: {
|
|
1290
|
+
typescript: {
|
|
1291
|
+
method: 'client.customerFlowEdgeCase.update',
|
|
1292
|
+
example: "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);",
|
|
1293
|
+
},
|
|
1294
|
+
python: {
|
|
1295
|
+
method: 'customer_flow_edge_case.update',
|
|
1296
|
+
example: '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)',
|
|
1297
|
+
},
|
|
1298
|
+
http: {
|
|
1299
|
+
example: '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"',
|
|
1300
|
+
},
|
|
1301
|
+
},
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
name: 'remove',
|
|
1305
|
+
endpoint: '/v1/customer-flow/{flowId}/edge-case/{edgeCaseId}',
|
|
1306
|
+
httpMethod: 'delete',
|
|
1307
|
+
summary: 'Remove an edge case',
|
|
1308
|
+
description: '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.',
|
|
1309
|
+
stainlessPath: '(resource) customerFlowEdgeCase > (method) remove',
|
|
1310
|
+
qualified: 'client.customerFlowEdgeCase.remove',
|
|
1311
|
+
params: ['flowId: string;', 'edgeCaseId: string;'],
|
|
1312
|
+
response: '{ data: { deleted: boolean; }; }',
|
|
1313
|
+
markdown: "## 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```",
|
|
1314
|
+
perLanguage: {
|
|
1315
|
+
typescript: {
|
|
1316
|
+
method: 'client.customerFlowEdgeCase.remove',
|
|
1317
|
+
example: "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);",
|
|
1318
|
+
},
|
|
1319
|
+
python: {
|
|
1320
|
+
method: 'customer_flow_edge_case.remove',
|
|
1321
|
+
example: '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)',
|
|
1322
|
+
},
|
|
1323
|
+
http: {
|
|
1324
|
+
example: '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"',
|
|
1325
|
+
},
|
|
1326
|
+
},
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
name: 'promote',
|
|
1330
|
+
endpoint: '/v1/customer-flow/{flowId}/edge-case/{edgeCaseId}/promote',
|
|
1331
|
+
httpMethod: 'post',
|
|
1332
|
+
summary: 'Promote an edge case to the happy path',
|
|
1333
|
+
description: "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.",
|
|
1334
|
+
stainlessPath: '(resource) customerFlowEdgeCase > (method) promote',
|
|
1335
|
+
qualified: 'client.customerFlowEdgeCase.promote',
|
|
1336
|
+
params: ['flowId: string;', 'edgeCaseId: string;'],
|
|
1337
|
+
response: "{ 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; }; }",
|
|
1338
|
+
markdown: "## 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```",
|
|
1339
|
+
perLanguage: {
|
|
1340
|
+
typescript: {
|
|
1341
|
+
method: 'client.customerFlowEdgeCase.promote',
|
|
1342
|
+
example: "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);",
|
|
1343
|
+
},
|
|
1344
|
+
python: {
|
|
1345
|
+
method: 'customer_flow_edge_case.promote',
|
|
1346
|
+
example: '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)',
|
|
1347
|
+
},
|
|
1348
|
+
http: {
|
|
1349
|
+
example: '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"',
|
|
1114
1350
|
},
|
|
1115
1351
|
},
|
|
1116
1352
|
},
|
|
@@ -1126,16 +1362,16 @@ const EMBEDDED_METHODS = [
|
|
|
1126
1362
|
response: '{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }',
|
|
1127
1363
|
markdown: "## 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```",
|
|
1128
1364
|
perLanguage: {
|
|
1129
|
-
|
|
1130
|
-
|
|
1365
|
+
typescript: {
|
|
1366
|
+
method: 'client.agent.list',
|
|
1367
|
+
example: "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);",
|
|
1131
1368
|
},
|
|
1132
1369
|
python: {
|
|
1133
1370
|
method: 'agent.list',
|
|
1134
1371
|
example: '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)',
|
|
1135
1372
|
},
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
example: "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);",
|
|
1373
|
+
http: {
|
|
1374
|
+
example: 'curl https://api.roark.ai/v1/agent \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1139
1375
|
},
|
|
1140
1376
|
},
|
|
1141
1377
|
},
|
|
@@ -1151,16 +1387,16 @@ const EMBEDDED_METHODS = [
|
|
|
1151
1387
|
response: '{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }',
|
|
1152
1388
|
markdown: "## 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```",
|
|
1153
1389
|
perLanguage: {
|
|
1154
|
-
|
|
1155
|
-
|
|
1390
|
+
typescript: {
|
|
1391
|
+
method: 'client.agent.getByID',
|
|
1392
|
+
example: "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);",
|
|
1156
1393
|
},
|
|
1157
1394
|
python: {
|
|
1158
1395
|
method: 'agent.get_by_id',
|
|
1159
1396
|
example: '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)',
|
|
1160
1397
|
},
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
example: "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);",
|
|
1398
|
+
http: {
|
|
1399
|
+
example: 'curl https://api.roark.ai/v1/agent/$AGENT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1164
1400
|
},
|
|
1165
1401
|
},
|
|
1166
1402
|
},
|
|
@@ -1176,16 +1412,16 @@ const EMBEDDED_METHODS = [
|
|
|
1176
1412
|
response: '{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }',
|
|
1177
1413
|
markdown: "## 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```",
|
|
1178
1414
|
perLanguage: {
|
|
1179
|
-
|
|
1180
|
-
|
|
1415
|
+
typescript: {
|
|
1416
|
+
method: 'client.agent.create',
|
|
1417
|
+
example: "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);",
|
|
1181
1418
|
},
|
|
1182
1419
|
python: {
|
|
1183
1420
|
method: 'agent.create',
|
|
1184
1421
|
example: '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)',
|
|
1185
1422
|
},
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
example: "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);",
|
|
1423
|
+
http: {
|
|
1424
|
+
example: '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 }\'',
|
|
1189
1425
|
},
|
|
1190
1426
|
},
|
|
1191
1427
|
},
|
|
@@ -1201,16 +1437,16 @@ const EMBEDDED_METHODS = [
|
|
|
1201
1437
|
response: '{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }',
|
|
1202
1438
|
markdown: "## 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```",
|
|
1203
1439
|
perLanguage: {
|
|
1204
|
-
|
|
1205
|
-
|
|
1440
|
+
typescript: {
|
|
1441
|
+
method: 'client.agent.update',
|
|
1442
|
+
example: "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);",
|
|
1206
1443
|
},
|
|
1207
1444
|
python: {
|
|
1208
1445
|
method: 'agent.update',
|
|
1209
1446
|
example: '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)',
|
|
1210
1447
|
},
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
example: "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);",
|
|
1448
|
+
http: {
|
|
1449
|
+
example: 'curl https://api.roark.ai/v1/agent/$AGENT_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1214
1450
|
},
|
|
1215
1451
|
},
|
|
1216
1452
|
},
|
|
@@ -1223,19 +1459,19 @@ const EMBEDDED_METHODS = [
|
|
|
1223
1459
|
stainlessPath: '(resource) agentEndpoint > (method) list',
|
|
1224
1460
|
qualified: 'client.agentEndpoint.list',
|
|
1225
1461
|
params: ['after?: string;', 'agentId?: string;', 'limit?: number;', 'searchText?: string;'],
|
|
1226
|
-
response: "{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type:
|
|
1227
|
-
markdown: "## 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:
|
|
1462
|
+
response: "{ 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; }; }",
|
|
1463
|
+
markdown: "## 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```",
|
|
1228
1464
|
perLanguage: {
|
|
1229
|
-
|
|
1230
|
-
|
|
1465
|
+
typescript: {
|
|
1466
|
+
method: 'client.agentEndpoint.list',
|
|
1467
|
+
example: "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);",
|
|
1231
1468
|
},
|
|
1232
1469
|
python: {
|
|
1233
1470
|
method: 'agent_endpoint.list',
|
|
1234
1471
|
example: '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)',
|
|
1235
1472
|
},
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
example: "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);",
|
|
1473
|
+
http: {
|
|
1474
|
+
example: 'curl https://api.roark.ai/v1/agent/endpoint \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1239
1475
|
},
|
|
1240
1476
|
},
|
|
1241
1477
|
},
|
|
@@ -1248,19 +1484,19 @@ const EMBEDDED_METHODS = [
|
|
|
1248
1484
|
stainlessPath: '(resource) agentEndpoint > (method) getById',
|
|
1249
1485
|
qualified: 'client.agentEndpoint.getByID',
|
|
1250
1486
|
params: ['endpointId: string;'],
|
|
1251
|
-
response: "{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type:
|
|
1252
|
-
markdown: "## 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:
|
|
1487
|
+
response: "{ 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; }; }",
|
|
1488
|
+
markdown: "## 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```",
|
|
1253
1489
|
perLanguage: {
|
|
1254
|
-
|
|
1255
|
-
|
|
1490
|
+
typescript: {
|
|
1491
|
+
method: 'client.agentEndpoint.getByID',
|
|
1492
|
+
example: "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);",
|
|
1256
1493
|
},
|
|
1257
1494
|
python: {
|
|
1258
1495
|
method: 'agent_endpoint.get_by_id',
|
|
1259
1496
|
example: '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)',
|
|
1260
1497
|
},
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
example: "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);",
|
|
1498
|
+
http: {
|
|
1499
|
+
example: 'curl https://api.roark.ai/v1/agent/endpoint/$ENDPOINT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1264
1500
|
},
|
|
1265
1501
|
},
|
|
1266
1502
|
},
|
|
@@ -1280,19 +1516,19 @@ const EMBEDDED_METHODS = [
|
|
|
1280
1516
|
'outboundDialHttpRequestDefinitionId?: string;',
|
|
1281
1517
|
"outboundDialType?: 'NONE' | 'HTTP_REQUEST';",
|
|
1282
1518
|
],
|
|
1283
|
-
response: "{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type:
|
|
1284
|
-
markdown: "## 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:
|
|
1519
|
+
response: "{ 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; }; }",
|
|
1520
|
+
markdown: "## 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```",
|
|
1285
1521
|
perLanguage: {
|
|
1286
|
-
|
|
1287
|
-
|
|
1522
|
+
typescript: {
|
|
1523
|
+
method: 'client.agentEndpoint.create',
|
|
1524
|
+
example: "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);",
|
|
1288
1525
|
},
|
|
1289
1526
|
python: {
|
|
1290
1527
|
method: 'agent_endpoint.create',
|
|
1291
1528
|
example: '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)',
|
|
1292
1529
|
},
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
example: "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);",
|
|
1530
|
+
http: {
|
|
1531
|
+
example: '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 }\'',
|
|
1296
1532
|
},
|
|
1297
1533
|
},
|
|
1298
1534
|
},
|
|
@@ -1310,19 +1546,19 @@ const EMBEDDED_METHODS = [
|
|
|
1310
1546
|
'outboundDialHttpRequestDefinitionId?: string;',
|
|
1311
1547
|
"outboundDialType?: 'NONE' | 'HTTP_REQUEST';",
|
|
1312
1548
|
],
|
|
1313
|
-
response: "{ data: { id: string; agentId: string; createdAt: string; direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment: string; outboundDialHttpRequestDefinitionId: string; outboundDialType: 'NONE' | 'HTTP_REQUEST'; type:
|
|
1314
|
-
markdown: "## 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:
|
|
1549
|
+
response: "{ 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; }; }",
|
|
1550
|
+
markdown: "## 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```",
|
|
1315
1551
|
perLanguage: {
|
|
1316
|
-
|
|
1317
|
-
|
|
1552
|
+
typescript: {
|
|
1553
|
+
method: 'client.agentEndpoint.update',
|
|
1554
|
+
example: "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);",
|
|
1318
1555
|
},
|
|
1319
1556
|
python: {
|
|
1320
1557
|
method: 'agent_endpoint.update',
|
|
1321
1558
|
example: '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)',
|
|
1322
1559
|
},
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
example: "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);",
|
|
1560
|
+
http: {
|
|
1561
|
+
example: 'curl https://api.roark.ai/v1/agent/endpoint/$ENDPOINT_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1326
1562
|
},
|
|
1327
1563
|
},
|
|
1328
1564
|
},
|
|
@@ -1338,16 +1574,16 @@ const EMBEDDED_METHODS = [
|
|
|
1338
1574
|
response: "{ 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; }; }",
|
|
1339
1575
|
markdown: "## 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```",
|
|
1340
1576
|
perLanguage: {
|
|
1341
|
-
|
|
1342
|
-
|
|
1577
|
+
typescript: {
|
|
1578
|
+
method: 'client.httpRequestDefinition.list',
|
|
1579
|
+
example: "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);",
|
|
1343
1580
|
},
|
|
1344
1581
|
python: {
|
|
1345
1582
|
method: 'http_request_definition.list',
|
|
1346
1583
|
example: '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)',
|
|
1347
1584
|
},
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
example: "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);",
|
|
1585
|
+
http: {
|
|
1586
|
+
example: 'curl https://api.roark.ai/v1/http-request-definition \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1351
1587
|
},
|
|
1352
1588
|
},
|
|
1353
1589
|
},
|
|
@@ -1363,16 +1599,16 @@ const EMBEDDED_METHODS = [
|
|
|
1363
1599
|
response: "{ 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; }; }",
|
|
1364
1600
|
markdown: "## 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```",
|
|
1365
1601
|
perLanguage: {
|
|
1366
|
-
|
|
1367
|
-
|
|
1602
|
+
typescript: {
|
|
1603
|
+
method: 'client.httpRequestDefinition.getByID',
|
|
1604
|
+
example: "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);",
|
|
1368
1605
|
},
|
|
1369
1606
|
python: {
|
|
1370
1607
|
method: 'http_request_definition.get_by_id',
|
|
1371
1608
|
example: '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)',
|
|
1372
1609
|
},
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
example: "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);",
|
|
1610
|
+
http: {
|
|
1611
|
+
example: 'curl https://api.roark.ai/v1/http-request-definition/$DEFINITION_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1376
1612
|
},
|
|
1377
1613
|
},
|
|
1378
1614
|
},
|
|
@@ -1395,16 +1631,16 @@ const EMBEDDED_METHODS = [
|
|
|
1395
1631
|
response: "{ 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; }; }",
|
|
1396
1632
|
markdown: "## 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```",
|
|
1397
1633
|
perLanguage: {
|
|
1398
|
-
|
|
1399
|
-
|
|
1634
|
+
typescript: {
|
|
1635
|
+
method: 'client.httpRequestDefinition.create',
|
|
1636
|
+
example: "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);",
|
|
1400
1637
|
},
|
|
1401
1638
|
python: {
|
|
1402
1639
|
method: 'http_request_definition.create',
|
|
1403
1640
|
example: '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)',
|
|
1404
1641
|
},
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
example: "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);",
|
|
1642
|
+
http: {
|
|
1643
|
+
example: '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 }\'',
|
|
1408
1644
|
},
|
|
1409
1645
|
},
|
|
1410
1646
|
},
|
|
@@ -1427,16 +1663,16 @@ const EMBEDDED_METHODS = [
|
|
|
1427
1663
|
response: "{ 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; }; }",
|
|
1428
1664
|
markdown: "## 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```",
|
|
1429
1665
|
perLanguage: {
|
|
1430
|
-
|
|
1431
|
-
|
|
1666
|
+
typescript: {
|
|
1667
|
+
method: 'client.httpRequestDefinition.update',
|
|
1668
|
+
example: "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);",
|
|
1432
1669
|
},
|
|
1433
1670
|
python: {
|
|
1434
1671
|
method: 'http_request_definition.update',
|
|
1435
1672
|
example: '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)',
|
|
1436
1673
|
},
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
example: "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);",
|
|
1674
|
+
http: {
|
|
1675
|
+
example: 'curl https://api.roark.ai/v1/http-request-definition/$DEFINITION_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1440
1676
|
},
|
|
1441
1677
|
},
|
|
1442
1678
|
},
|
|
@@ -1452,16 +1688,16 @@ const EMBEDDED_METHODS = [
|
|
|
1452
1688
|
response: '{ data: { id: string; createdAt: string; description: string; events: string[]; headers: object; updatedAt: string; url: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }',
|
|
1453
1689
|
markdown: "## 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```",
|
|
1454
1690
|
perLanguage: {
|
|
1455
|
-
|
|
1456
|
-
|
|
1691
|
+
typescript: {
|
|
1692
|
+
method: 'client.webhook.list',
|
|
1693
|
+
example: "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);",
|
|
1457
1694
|
},
|
|
1458
1695
|
python: {
|
|
1459
1696
|
method: 'webhook.list',
|
|
1460
1697
|
example: '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)',
|
|
1461
1698
|
},
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
example: "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);",
|
|
1699
|
+
http: {
|
|
1700
|
+
example: 'curl https://api.roark.ai/v1/webhook \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1465
1701
|
},
|
|
1466
1702
|
},
|
|
1467
1703
|
},
|
|
@@ -1477,16 +1713,16 @@ const EMBEDDED_METHODS = [
|
|
|
1477
1713
|
response: '{ data: { id: string; createdAt: string; description: string; events: string[]; headers: object; updatedAt: string; url: string; }; }',
|
|
1478
1714
|
markdown: "## 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```",
|
|
1479
1715
|
perLanguage: {
|
|
1480
|
-
|
|
1481
|
-
|
|
1716
|
+
typescript: {
|
|
1717
|
+
method: 'client.webhook.getByID',
|
|
1718
|
+
example: "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);",
|
|
1482
1719
|
},
|
|
1483
1720
|
python: {
|
|
1484
1721
|
method: 'webhook.get_by_id',
|
|
1485
1722
|
example: '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)',
|
|
1486
1723
|
},
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
example: "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);",
|
|
1724
|
+
http: {
|
|
1725
|
+
example: 'curl https://api.roark.ai/v1/webhook/$WEBHOOK_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1490
1726
|
},
|
|
1491
1727
|
},
|
|
1492
1728
|
},
|
|
@@ -1502,16 +1738,16 @@ const EMBEDDED_METHODS = [
|
|
|
1502
1738
|
response: '{ data: { id: string; createdAt: string; description: string; events: string[]; headers: object; signingSecret: string; updatedAt: string; url: string; }; }',
|
|
1503
1739
|
markdown: "## 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```",
|
|
1504
1740
|
perLanguage: {
|
|
1505
|
-
|
|
1506
|
-
|
|
1741
|
+
typescript: {
|
|
1742
|
+
method: 'client.webhook.create',
|
|
1743
|
+
example: "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);",
|
|
1507
1744
|
},
|
|
1508
1745
|
python: {
|
|
1509
1746
|
method: 'webhook.create',
|
|
1510
1747
|
example: '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)',
|
|
1511
1748
|
},
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
example: "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);",
|
|
1749
|
+
http: {
|
|
1750
|
+
example: '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 }\'',
|
|
1515
1751
|
},
|
|
1516
1752
|
},
|
|
1517
1753
|
},
|
|
@@ -1527,16 +1763,72 @@ const EMBEDDED_METHODS = [
|
|
|
1527
1763
|
response: '{ data: { success: boolean; }; }',
|
|
1528
1764
|
markdown: "## 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```",
|
|
1529
1765
|
perLanguage: {
|
|
1530
|
-
|
|
1531
|
-
|
|
1766
|
+
typescript: {
|
|
1767
|
+
method: 'client.webhook.delete',
|
|
1768
|
+
example: "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);",
|
|
1532
1769
|
},
|
|
1533
1770
|
python: {
|
|
1534
1771
|
method: 'webhook.delete',
|
|
1535
1772
|
example: '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)',
|
|
1536
1773
|
},
|
|
1774
|
+
http: {
|
|
1775
|
+
example: 'curl https://api.roark.ai/v1/webhook/$WEBHOOK_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1776
|
+
},
|
|
1777
|
+
},
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
name: 'diff',
|
|
1781
|
+
endpoint: '/v1/config/diff',
|
|
1782
|
+
httpMethod: 'post',
|
|
1783
|
+
summary: 'Diff a config bundle',
|
|
1784
|
+
description: '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.',
|
|
1785
|
+
stainlessPath: '(resource) config > (method) diff',
|
|
1786
|
+
qualified: 'client.config.diff',
|
|
1787
|
+
params: [
|
|
1788
|
+
"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; }[];",
|
|
1789
|
+
'prune?: boolean;',
|
|
1790
|
+
],
|
|
1791
|
+
response: "{ 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; }; }; }",
|
|
1792
|
+
markdown: "## 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```",
|
|
1793
|
+
perLanguage: {
|
|
1537
1794
|
typescript: {
|
|
1538
|
-
method: 'client.
|
|
1539
|
-
example: "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
|
|
1795
|
+
method: 'client.config.diff',
|
|
1796
|
+
example: "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);",
|
|
1797
|
+
},
|
|
1798
|
+
python: {
|
|
1799
|
+
method: 'config.diff',
|
|
1800
|
+
example: '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)',
|
|
1801
|
+
},
|
|
1802
|
+
http: {
|
|
1803
|
+
example: '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 }\'',
|
|
1804
|
+
},
|
|
1805
|
+
},
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
name: 'apply',
|
|
1809
|
+
endpoint: '/v1/config/apply',
|
|
1810
|
+
httpMethod: 'post',
|
|
1811
|
+
summary: 'Apply a config bundle',
|
|
1812
|
+
description: '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.',
|
|
1813
|
+
stainlessPath: '(resource) config > (method) apply',
|
|
1814
|
+
qualified: 'client.config.apply',
|
|
1815
|
+
params: [
|
|
1816
|
+
"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; }[];",
|
|
1817
|
+
'prune?: boolean;',
|
|
1818
|
+
],
|
|
1819
|
+
response: "{ 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; }; }; }",
|
|
1820
|
+
markdown: "## 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```",
|
|
1821
|
+
perLanguage: {
|
|
1822
|
+
typescript: {
|
|
1823
|
+
method: 'client.config.apply',
|
|
1824
|
+
example: "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);",
|
|
1825
|
+
},
|
|
1826
|
+
python: {
|
|
1827
|
+
method: 'config.apply',
|
|
1828
|
+
example: '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)',
|
|
1829
|
+
},
|
|
1830
|
+
http: {
|
|
1831
|
+
example: '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 }\'',
|
|
1540
1832
|
},
|
|
1541
1833
|
},
|
|
1542
1834
|
},
|