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