@roarkanalytics/sdk-mcp 4.44.1 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/client-headers.d.mts +2 -2
- package/client-headers.d.mts.map +1 -1
- package/client-headers.d.ts +2 -2
- package/client-headers.d.ts.map +1 -1
- package/client-headers.js +1 -1
- package/client-headers.js.map +1 -1
- package/client-headers.mjs +1 -1
- package/client-headers.mjs.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 +9 -1
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +9 -1
- package/code-tool-worker.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 +269 -38
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +269 -38
- package/local-docs-search.mjs.map +1 -1
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +52 -4
- package/methods.js.map +1 -1
- package/methods.mjs +52 -4
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.js.map +1 -1
- package/server.mjs +1 -1
- package/server.mjs.map +1 -1
- package/src/client-headers.ts +1 -1
- package/src/code-tool-worker.ts +9 -1
- package/src/local-docs-search.ts +312 -38
- package/src/methods.ts +52 -4
- package/src/server.ts +1 -1
package/local-docs-search.js
CHANGED
|
@@ -226,11 +226,12 @@ const EMBEDDED_METHODS = [
|
|
|
226
226
|
endpoint: '/v1/call',
|
|
227
227
|
httpMethod: 'get',
|
|
228
228
|
summary: 'List calls',
|
|
229
|
-
description: 'Returns a paginated list of calls for the authenticated project.',
|
|
229
|
+
description: 'Returns a paginated list of calls for the authenticated project. Pass agentId to keep calls for specific agents, or properties[agent_name][eq] when you only have the agent name. sortBy and sortDirection apply together with those filters.',
|
|
230
230
|
stainlessPath: '(resource) call > (method) list',
|
|
231
231
|
qualified: 'client.call.list',
|
|
232
232
|
params: [
|
|
233
233
|
'after?: string;',
|
|
234
|
+
'agentId?: string;',
|
|
234
235
|
"countedInResults?: 'true' | 'false';",
|
|
235
236
|
"excludeHiddenRuns?: 'true' | 'false';",
|
|
236
237
|
'limit?: number;',
|
|
@@ -244,7 +245,7 @@ const EMBEDDED_METHODS = [
|
|
|
244
245
|
"status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED';",
|
|
245
246
|
],
|
|
246
247
|
response: "{ data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED'; startedAt: string; agents?: { id: string; agentVersionId?: 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; }; }",
|
|
247
|
-
markdown: "## list\n\n`client.call.list(after?: string, countedInResults?: 'true' | 'false', excludeHiddenRuns?: 'true' | 'false', limit?: number, properties?: object, searchText?: string, simulationRunPlanIds?: string, simulationRunPlanJobId?: string, simulationRunPlanJobIds?: 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- `countedInResults?: 'true' | 'false'`\n true: only simulated calls their run's results count (not invalidated, for example because the agent never spoke). false: only the simulated calls the results leave out, each invalidated. Live calls, and calls removed from their run, match neither.\n\n- `excludeHiddenRuns?: 'true' | 'false'`\n true: leave out calls from runs hidden from the runs list. Live calls stay in. false is the same as leaving it out.\n\n- `limit?: number`\n Maximum number of calls to return (default: 20, max: 100)\n\n- `properties?: object`\n Filter on
|
|
248
|
+
markdown: "## list\n\n`client.call.list(after?: string, agentId?: string, countedInResults?: 'true' | 'false', excludeHiddenRuns?: 'true' | 'false', limit?: number, properties?: object, searchText?: string, simulationRunPlanIds?: string, simulationRunPlanJobId?: string, simulationRunPlanJobIds?: 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. Pass agentId to keep calls for specific agents, or properties[agent_name][eq] when you only have the agent name. sortBy and sortDirection apply together with those filters.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - use the nextCursor value from a previous response\n\n- `agentId?: string`\n Calls that include any of these agents. One id, or several separated by commas, at most 100. A call with more than one agent matches when any of them is listed. An id that is not an agent on a call in this project matches nothing. Combines with the other filters, including sortBy and sortDirection.\n\n- `countedInResults?: 'true' | 'false'`\n true: only simulated calls their run's results count (not invalidated, for example because the agent never spoke). false: only the simulated calls the results leave out, each invalidated. Live calls, and calls removed from their run, match neither.\n\n- `excludeHiddenRuns?: 'true' | 'false'`\n true: leave out calls from runs hidden from the runs list. Live calls stay in. false is the same as leaving it out.\n\n- `limit?: number`\n Maximum number of calls to return (default: 20, max: 100)\n\n- `properties?: object`\n Filter on properties, one entry per property name. properties[<name>][exists]=true keeps calls that have the property set (whatever the value), properties[<name>][exists]=false keeps calls missing it (never sent, sent as null, or removed). properties[<name>][eq]=<value> keeps calls whose value equals it, ignoring case. agent_name and agent_id are built in and read the agents linked to the call, not a stored snapshot: agent_name matches an agent name, agent_id matches an agent id (a UUID). A call with several agents matches when any of them does. A custom property the project has never stored matches no calls under eq. Names match the way properties are stored, so planTier and plan_tier are one property, and agentName is agent_name. At most 20 properties. A name taken by a built-in call filter, such as status, is rejected with 400. One operator per property.\n\n- `searchText?: string`\n Search text to filter calls by title, summary, or transcript\n\n- `simulationRunPlanIds?: string`\n Calls from every run of any of these run plans, comma-separated, at most 100\n\n- `simulationRunPlanJobId?: string`\n Filter by simulation run plan job ID to get all calls from a specific simulation batch\n\n- `simulationRunPlanJobIds?: string`\n Calls from any of these simulation runs (run plan job ids), comma-separated, at most 100\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; agentVersionId?: 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; agentVersionId?: 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```",
|
|
248
249
|
perLanguage: {
|
|
249
250
|
typescript: {
|
|
250
251
|
method: 'client.call.list',
|
|
@@ -884,6 +885,234 @@ const EMBEDDED_METHODS = [
|
|
|
884
885
|
},
|
|
885
886
|
},
|
|
886
887
|
},
|
|
888
|
+
{
|
|
889
|
+
name: 'list',
|
|
890
|
+
endpoint: '/v1/live-report',
|
|
891
|
+
httpMethod: 'get',
|
|
892
|
+
summary: 'List live reports',
|
|
893
|
+
description: "Lists the project's saved live call reports, newest first.",
|
|
894
|
+
stainlessPath: '(resource) liveReport > (method) list',
|
|
895
|
+
qualified: 'client.liveReport.list',
|
|
896
|
+
params: ['limit?: number;', 'offset?: number;'],
|
|
897
|
+
response: "{ data: { items: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: object; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: object[]; timezone: string; updatedAt: string; }[]; totalCount: number; }; }",
|
|
898
|
+
markdown: "## list\n\n`client.liveReport.list(limit?: number, offset?: number): { data: object; }`\n\n**get** `/v1/live-report`\n\nLists the project's saved live call reports, newest first.\n\n### Parameters\n\n- `limit?: number`\n Page size, at most 100.\n\n- `offset?: number`\n\n### Returns\n\n- `{ data: { items: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: object; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: object[]; timezone: string; updatedAt: string; }[]; totalCount: number; }; }`\n\n - `data: { items: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: object; slack: object[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }[]; totalCount: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst liveReports = await client.liveReport.list();\n\nconsole.log(liveReports);\n```",
|
|
899
|
+
perLanguage: {
|
|
900
|
+
typescript: {
|
|
901
|
+
method: 'client.liveReport.list',
|
|
902
|
+
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 liveReports = await client.liveReport.list();\n\nconsole.log(liveReports.data);",
|
|
903
|
+
},
|
|
904
|
+
python: {
|
|
905
|
+
method: 'live_report.list',
|
|
906
|
+
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)\nlive_reports = client.live_report.list()\nprint(live_reports.data)',
|
|
907
|
+
},
|
|
908
|
+
http: {
|
|
909
|
+
example: 'curl https://api.roark.ai/v1/live-report \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
910
|
+
},
|
|
911
|
+
},
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
name: 'create',
|
|
915
|
+
endpoint: '/v1/live-report',
|
|
916
|
+
httpMethod: 'post',
|
|
917
|
+
summary: 'Create a live report',
|
|
918
|
+
description: "Saves a report on the project's live calls. Simulations are never included.\n\nTargets are analytics measures held to a bar: a threshold metric is read as its pass rate (`value` is a\npercentage, 0-100, held AT_LEAST by default); a numeric metric as its average (held AT_MOST by default).\nEvery target is read for the period and the period before it, so the report says whether each was met\nand how it moved.\n\nScheduled reports are written `deliveryHour` hours into the day after each period ends in `timezone`\n(a week runs Monday to Sunday), then emailed and posted per `notifications`. With `generateNow` (the\ndefault) the report for the latest closed period is written right away and not sent.",
|
|
919
|
+
stainlessPath: '(resource) liveReport > (method) create',
|
|
920
|
+
qualified: 'client.liveReport.create',
|
|
921
|
+
params: [
|
|
922
|
+
'name: string;',
|
|
923
|
+
'agentId?: string;',
|
|
924
|
+
"cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY';",
|
|
925
|
+
'dashboardId?: string;',
|
|
926
|
+
'deliveryHour?: number;',
|
|
927
|
+
'description?: string;',
|
|
928
|
+
"filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[];",
|
|
929
|
+
'generateNow?: boolean;',
|
|
930
|
+
'includeTranscriptExcerpts?: boolean;',
|
|
931
|
+
'notifications?: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; };',
|
|
932
|
+
"status?: 'ACTIVE' | 'PAUSED';",
|
|
933
|
+
"targets?: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[];",
|
|
934
|
+
'timezone?: string;',
|
|
935
|
+
],
|
|
936
|
+
response: "{ data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: object; slack: object[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }; }",
|
|
937
|
+
markdown: "## create\n\n`client.liveReport.create(name: string, agentId?: string, cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY', dashboardId?: string, deliveryHour?: number, description?: string, filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[], generateNow?: boolean, includeTranscriptExcerpts?: boolean, notifications?: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; }, status?: 'ACTIVE' | 'PAUSED', targets?: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[], timezone?: string): { data: object; }`\n\n**post** `/v1/live-report`\n\nSaves a report on the project's live calls. Simulations are never included.\n\nTargets are analytics measures held to a bar: a threshold metric is read as its pass rate (`value` is a\npercentage, 0-100, held AT_LEAST by default); a numeric metric as its average (held AT_MOST by default).\nEvery target is read for the period and the period before it, so the report says whether each was met\nand how it moved.\n\nScheduled reports are written `deliveryHour` hours into the day after each period ends in `timezone`\n(a week runs Monday to Sunday), then emailed and posted per `notifications`. With `generateNow` (the\ndefault) the report for the latest closed period is written right away and not sent.\n\n### Parameters\n\n- `name: string`\n\n- `agentId?: string`\n\n- `cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY'`\n\n- `dashboardId?: string`\n\n- `deliveryHour?: number`\n\n- `description?: string`\n\n- `filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]`\n\n- `generateNow?: boolean`\n Write the report for the latest closed period right away. Default true.\n\n- `includeTranscriptExcerpts?: boolean`\n\n- `notifications?: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; }`\n\n- `status?: 'ACTIVE' | 'PAUSED'`\n\n- `targets?: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]`\n\n- `timezone?: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: object; slack: object[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }; }`\n\n - `data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; notificationConfigId: string; }[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst liveReport = await client.liveReport.create({ name: 'x' });\n\nconsole.log(liveReport);\n```",
|
|
938
|
+
perLanguage: {
|
|
939
|
+
typescript: {
|
|
940
|
+
method: 'client.liveReport.create',
|
|
941
|
+
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 liveReport = await client.liveReport.create({ name: 'x' });\n\nconsole.log(liveReport.data);",
|
|
942
|
+
},
|
|
943
|
+
python: {
|
|
944
|
+
method: 'live_report.create',
|
|
945
|
+
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)\nlive_report = client.live_report.create(\n name="x",\n)\nprint(live_report.data)',
|
|
946
|
+
},
|
|
947
|
+
http: {
|
|
948
|
+
example: 'curl https://api.roark.ai/v1/live-report \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "name": "x"\n }\'',
|
|
949
|
+
},
|
|
950
|
+
},
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
name: 'getById',
|
|
954
|
+
endpoint: '/v1/live-report/{reportId}',
|
|
955
|
+
httpMethod: 'get',
|
|
956
|
+
summary: 'Get a live report',
|
|
957
|
+
description: 'Get a live report',
|
|
958
|
+
stainlessPath: '(resource) liveReport > (method) getById',
|
|
959
|
+
qualified: 'client.liveReport.getByID',
|
|
960
|
+
params: ['reportId: string;'],
|
|
961
|
+
response: "{ data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: object; slack: object[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }; }",
|
|
962
|
+
markdown: "## getById\n\n`client.liveReport.getByID(reportId: string): { data: object; }`\n\n**get** `/v1/live-report/{reportId}`\n\nGet a live report\n\n### Parameters\n\n- `reportId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: object; slack: object[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }; }`\n\n - `data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; notificationConfigId: string; }[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.liveReport.getByID('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(response);\n```",
|
|
963
|
+
perLanguage: {
|
|
964
|
+
typescript: {
|
|
965
|
+
method: 'client.liveReport.getByID',
|
|
966
|
+
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.liveReport.getByID('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(response.data);",
|
|
967
|
+
},
|
|
968
|
+
python: {
|
|
969
|
+
method: 'live_report.get_by_id',
|
|
970
|
+
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.live_report.get_by_id(\n "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",\n)\nprint(response.data)',
|
|
971
|
+
},
|
|
972
|
+
http: {
|
|
973
|
+
example: 'curl https://api.roark.ai/v1/live-report/$REPORT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
974
|
+
},
|
|
975
|
+
},
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
name: 'update',
|
|
979
|
+
endpoint: '/v1/live-report/{reportId}',
|
|
980
|
+
httpMethod: 'patch',
|
|
981
|
+
summary: 'Update a live report',
|
|
982
|
+
description: 'Changes the fields sent. Set `status` to PAUSED to stop scheduled reports.',
|
|
983
|
+
stainlessPath: '(resource) liveReport > (method) update',
|
|
984
|
+
qualified: 'client.liveReport.update',
|
|
985
|
+
params: [
|
|
986
|
+
'reportId: string;',
|
|
987
|
+
'agentId?: string;',
|
|
988
|
+
"cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY';",
|
|
989
|
+
'dashboardId?: string;',
|
|
990
|
+
'deliveryHour?: number;',
|
|
991
|
+
'description?: string;',
|
|
992
|
+
"filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[];",
|
|
993
|
+
'includeTranscriptExcerpts?: boolean;',
|
|
994
|
+
'name?: string;',
|
|
995
|
+
'notifications?: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; };',
|
|
996
|
+
"status?: 'ACTIVE' | 'PAUSED';",
|
|
997
|
+
"targets?: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[];",
|
|
998
|
+
'timezone?: string;',
|
|
999
|
+
],
|
|
1000
|
+
response: "{ data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: object; slack: object[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }; }",
|
|
1001
|
+
markdown: "## update\n\n`client.liveReport.update(reportId: string, agentId?: string, cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY', dashboardId?: string, deliveryHour?: number, description?: string, filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[], includeTranscriptExcerpts?: boolean, name?: string, notifications?: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; }, status?: 'ACTIVE' | 'PAUSED', targets?: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[], timezone?: string): { data: object; }`\n\n**patch** `/v1/live-report/{reportId}`\n\nChanges the fields sent. Set `status` to PAUSED to stop scheduled reports.\n\n### Parameters\n\n- `reportId: string`\n\n- `agentId?: string`\n\n- `cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY'`\n\n- `dashboardId?: string`\n\n- `deliveryHour?: number`\n\n- `description?: string`\n\n- `filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]`\n\n- `includeTranscriptExcerpts?: boolean`\n\n- `name?: string`\n\n- `notifications?: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; }`\n\n- `status?: 'ACTIVE' | 'PAUSED'`\n\n- `targets?: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]`\n\n- `timezone?: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: object; slack: object[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }; }`\n\n - `data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; notificationConfigId: string; }[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst liveReport = await client.liveReport.update('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(liveReport);\n```",
|
|
1002
|
+
perLanguage: {
|
|
1003
|
+
typescript: {
|
|
1004
|
+
method: 'client.liveReport.update',
|
|
1005
|
+
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 liveReport = await client.liveReport.update('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(liveReport.data);",
|
|
1006
|
+
},
|
|
1007
|
+
python: {
|
|
1008
|
+
method: 'live_report.update',
|
|
1009
|
+
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)\nlive_report = client.live_report.update(\n report_id="5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",\n)\nprint(live_report.data)',
|
|
1010
|
+
},
|
|
1011
|
+
http: {
|
|
1012
|
+
example: 'curl https://api.roark.ai/v1/live-report/$REPORT_ID \\\n -X PATCH \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1013
|
+
},
|
|
1014
|
+
},
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
name: 'delete',
|
|
1018
|
+
endpoint: '/v1/live-report/{reportId}',
|
|
1019
|
+
httpMethod: 'delete',
|
|
1020
|
+
summary: 'Delete a live report',
|
|
1021
|
+
description: 'Deletes the report and stops its scheduled reports.',
|
|
1022
|
+
stainlessPath: '(resource) liveReport > (method) delete',
|
|
1023
|
+
qualified: 'client.liveReport.delete',
|
|
1024
|
+
params: ['reportId: string;'],
|
|
1025
|
+
response: '{ data: { id: string; deleted: true; }; }',
|
|
1026
|
+
markdown: "## delete\n\n`client.liveReport.delete(reportId: string): { data: object; }`\n\n**delete** `/v1/live-report/{reportId}`\n\nDeletes the report and stops its scheduled reports.\n\n### Parameters\n\n- `reportId: string`\n\n### Returns\n\n- `{ data: { id: string; deleted: true; }; }`\n\n - `data: { id: string; deleted: true; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst liveReport = await client.liveReport.delete('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(liveReport);\n```",
|
|
1027
|
+
perLanguage: {
|
|
1028
|
+
typescript: {
|
|
1029
|
+
method: 'client.liveReport.delete',
|
|
1030
|
+
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 liveReport = await client.liveReport.delete('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(liveReport.data);",
|
|
1031
|
+
},
|
|
1032
|
+
python: {
|
|
1033
|
+
method: 'live_report.delete',
|
|
1034
|
+
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)\nlive_report = client.live_report.delete(\n "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",\n)\nprint(live_report.data)',
|
|
1035
|
+
},
|
|
1036
|
+
http: {
|
|
1037
|
+
example: 'curl https://api.roark.ai/v1/live-report/$REPORT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1038
|
+
},
|
|
1039
|
+
},
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
name: 'run',
|
|
1043
|
+
endpoint: '/v1/live-report/{reportId}/generate',
|
|
1044
|
+
httpMethod: 'post',
|
|
1045
|
+
summary: 'Generate a live report document',
|
|
1046
|
+
description: 'Writes the report now, for its latest closed period or a custom window (`periodStart` + `periodEnd`,\nat most 92 days, ended). Returns 202 with the document in PENDING; poll\nGET /v1/live-report/{reportId}/document/{documentId} until `status` is READY or FAILED (typically a few\nminutes). An identical request already in flight is returned as-is. A generated document is not emailed.',
|
|
1047
|
+
stainlessPath: '(resource) liveReport > (method) run',
|
|
1048
|
+
qualified: 'client.liveReport.run',
|
|
1049
|
+
params: ['reportId: string;', 'periodEnd?: string;', 'periodStart?: string;'],
|
|
1050
|
+
response: "{ data: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; targets: object[]; }; document: { agents: object[]; appendix: object; charts: object[]; checks: object[]; evidence: object; executiveSummary: object; generatedAtIso: string; headline: object; liveReportId: string; model: string; recommendations: object[]; targets: object[]; themes: object[]; version: 1; volume: object; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }; }",
|
|
1051
|
+
markdown: "## run\n\n`client.liveReport.run(reportId: string, periodEnd?: string, periodStart?: string): { data: object; }`\n\n**post** `/v1/live-report/{reportId}/generate`\n\nWrites the report now, for its latest closed period or a custom window (`periodStart` + `periodEnd`,\nat most 92 days, ended). Returns 202 with the document in PENDING; poll\nGET /v1/live-report/{reportId}/document/{documentId} until `status` is READY or FAILED (typically a few\nminutes). An identical request already in flight is returned as-is. A generated document is not emailed.\n\n### Parameters\n\n- `reportId: string`\n\n- `periodEnd?: string`\n ISO 8601 end (exclusive) of a custom window. Requires periodStart.\n\n- `periodStart?: string`\n ISO 8601 start of a custom window. Omit both for the latest closed period.\n\n### Returns\n\n- `{ data: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; targets: object[]; }; document: { agents: object[]; appendix: object; charts: object[]; checks: object[]; evidence: object; executiveSummary: object; generatedAtIso: string; headline: object; liveReportId: string; model: string; recommendations: object[]; targets: object[]; themes: object[]; version: 1; volume: object; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }; }`\n\n - `data: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; }; document: { agents: { agentId: string; agentName: string; conversationCount: number; sharePct: number; targets: object[]; }[]; appendix: { methodology: string; notes: string[]; }; charts: { blocked: boolean; description: string; display: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; error: string; interval: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; name: string; omittedSeries: number; series: object[]; }[]; checks: { checkName: string; comparable: boolean; deltaPts: number; evaluatedCount: number; failedCount: number; isTarget: boolean; metricDefinitionId: string; metricSlug: string; passRatePct: number; previousPassRatePct: number; }[]; evidence: { failingConversationCount: number; failingCountIsLowerBound: boolean; readConversationCount: number; sampled: boolean; }; executiveSummary: { keyFindings: object[]; paragraphs: string[]; sections?: object[]; }; generatedAtIso: string; headline: { agentName: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; periodEndIso: string; periodLabel: string; periodStartIso: string; reportName: string; statTiles: object[]; timezone: string; verdict: 'ON_TARGET' | 'OFF_TARGET' | 'NO_TARGETS' | 'NO_DATA'; verdictProse: string; }; liveReportId: string; model: string; recommendations: { afterText: string; beforeText: string; body: string; channel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL'; order: number; promptOptimizationFindingId: string; severity: 'HIGH' | 'MEDIUM' | 'LOW'; source: 'PROMPT_OPTIMIZER' | 'DEBRIEF'; themeSlugs: string[]; title: string; }[]; targets: { actual: number; actualLabel: string; aggregation: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator: 'AT_LEAST' | 'AT_MOST'; deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL'; deltaLabel: string; error: string; failingConversationCount: number; key: string; label: string; lifecycle: 'NEW_MISS' | 'STILL_MISSED' | 'RECOVERED' | 'HOLDING'; metricDefinitionId: string; metricName: string; metricSlug: string; percentile: number; previous: number; previousLabel: string; sampleSize: number; series: object[]; status: 'MET' | 'MISSED' | 'NO_DATA'; targetLabel: string; targetValue: number; unit: 'PERCENT' | 'VALUE'; }[]; themes: { affectedConversationCount: number; analysis: string; checkNames: string[]; collectorQuote: object; estimatedAffectedConversationCount: number; excerpts: object[]; flaggedForImpact: boolean; impact: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW'; impactReason: string; issue: object; lifecycle: 'NEW' | 'PERSISTENT' | 'IMPROVING' | 'FIXED'; memberConversationIds: string[]; metricDefinitionIds: string[]; prevalence: 'WIDESPREAD' | 'RECURRING' | 'ISOLATED'; rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL'; severity: 'HIGH' | 'MEDIUM' | 'LOW'; slug: string; title: string; totalConversationCount: number; memberCalls?: object[]; }[]; version: 1; volume: { conversationCount: number; deltaPct: number; endings: object[]; previousConversationCount: number; series: object[]; }; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.liveReport.run('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(response);\n```",
|
|
1052
|
+
perLanguage: {
|
|
1053
|
+
typescript: {
|
|
1054
|
+
method: 'client.liveReport.run',
|
|
1055
|
+
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.liveReport.run('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(response.data);",
|
|
1056
|
+
},
|
|
1057
|
+
python: {
|
|
1058
|
+
method: 'live_report.run',
|
|
1059
|
+
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.live_report.run(\n report_id="5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",\n)\nprint(response.data)',
|
|
1060
|
+
},
|
|
1061
|
+
http: {
|
|
1062
|
+
example: 'curl https://api.roark.ai/v1/live-report/$REPORT_ID/generate \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1063
|
+
},
|
|
1064
|
+
},
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
name: 'listDocuments',
|
|
1068
|
+
endpoint: '/v1/live-report/{reportId}/document',
|
|
1069
|
+
httpMethod: 'get',
|
|
1070
|
+
summary: 'List report documents',
|
|
1071
|
+
description: "Lists a report's documents, newest period first.",
|
|
1072
|
+
stainlessPath: '(resource) liveReport > (method) listDocuments',
|
|
1073
|
+
qualified: 'client.liveReport.listDocuments',
|
|
1074
|
+
params: ['reportId: string;', 'limit?: number;', 'offset?: number;'],
|
|
1075
|
+
response: "{ data: { items: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: object; document: object; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }[]; totalCount: number; }; }",
|
|
1076
|
+
markdown: "## listDocuments\n\n`client.liveReport.listDocuments(reportId: string, limit?: number, offset?: number): { data: object; }`\n\n**get** `/v1/live-report/{reportId}/document`\n\nLists a report's documents, newest period first.\n\n### Parameters\n\n- `reportId: string`\n\n- `limit?: number`\n Page size, at most 100.\n\n- `offset?: number`\n\n### Returns\n\n- `{ data: { items: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: object; document: object; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }[]; totalCount: number; }; }`\n\n - `data: { items: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; targets: object[]; }; document: { agents: object[]; appendix: object; charts: object[]; checks: object[]; evidence: object; executiveSummary: object; generatedAtIso: string; headline: object; liveReportId: string; model: string; recommendations: object[]; targets: object[]; themes: object[]; version: 1; volume: object; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }[]; totalCount: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.liveReport.listDocuments('reportId');\n\nconsole.log(response);\n```",
|
|
1077
|
+
perLanguage: {
|
|
1078
|
+
typescript: {
|
|
1079
|
+
method: 'client.liveReport.listDocuments',
|
|
1080
|
+
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.liveReport.listDocuments('reportId');\n\nconsole.log(response.data);",
|
|
1081
|
+
},
|
|
1082
|
+
python: {
|
|
1083
|
+
method: 'live_report.list_documents',
|
|
1084
|
+
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.live_report.list_documents(\n report_id="reportId",\n)\nprint(response.data)',
|
|
1085
|
+
},
|
|
1086
|
+
http: {
|
|
1087
|
+
example: 'curl https://api.roark.ai/v1/live-report/$REPORT_ID/document \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1088
|
+
},
|
|
1089
|
+
},
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
name: 'getDocument',
|
|
1093
|
+
endpoint: '/v1/live-report/{reportId}/document/{documentId}',
|
|
1094
|
+
httpMethod: 'get',
|
|
1095
|
+
summary: 'Get a report document',
|
|
1096
|
+
description: 'Returns one written report. `document` is null until `status` is READY. Theme excerpts and grader quotes (call transcript text) are included only for keys with transcript:read.',
|
|
1097
|
+
stainlessPath: '(resource) liveReport > (method) getDocument',
|
|
1098
|
+
qualified: 'client.liveReport.getDocument',
|
|
1099
|
+
params: ['reportId: string;', 'documentId: string;'],
|
|
1100
|
+
response: "{ data: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; targets: object[]; }; document: { agents: object[]; appendix: object; charts: object[]; checks: object[]; evidence: object; executiveSummary: object; generatedAtIso: string; headline: object; liveReportId: string; model: string; recommendations: object[]; targets: object[]; themes: object[]; version: 1; volume: object; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }; }",
|
|
1101
|
+
markdown: "## getDocument\n\n`client.liveReport.getDocument(reportId: string, documentId: string): { data: object; }`\n\n**get** `/v1/live-report/{reportId}/document/{documentId}`\n\nReturns one written report. `document` is null until `status` is READY. Theme excerpts and grader quotes (call transcript text) are included only for keys with transcript:read.\n\n### Parameters\n\n- `reportId: string`\n\n- `documentId: string`\n\n### Returns\n\n- `{ data: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; targets: object[]; }; document: { agents: object[]; appendix: object; charts: object[]; checks: object[]; evidence: object; executiveSummary: object; generatedAtIso: string; headline: object; liveReportId: string; model: string; recommendations: object[]; targets: object[]; themes: object[]; version: 1; volume: object; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }; }`\n\n - `data: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; }; document: { agents: { agentId: string; agentName: string; conversationCount: number; sharePct: number; targets: object[]; }[]; appendix: { methodology: string; notes: string[]; }; charts: { blocked: boolean; description: string; display: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; error: string; interval: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; name: string; omittedSeries: number; series: object[]; }[]; checks: { checkName: string; comparable: boolean; deltaPts: number; evaluatedCount: number; failedCount: number; isTarget: boolean; metricDefinitionId: string; metricSlug: string; passRatePct: number; previousPassRatePct: number; }[]; evidence: { failingConversationCount: number; failingCountIsLowerBound: boolean; readConversationCount: number; sampled: boolean; }; executiveSummary: { keyFindings: object[]; paragraphs: string[]; sections?: object[]; }; generatedAtIso: string; headline: { agentName: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; periodEndIso: string; periodLabel: string; periodStartIso: string; reportName: string; statTiles: object[]; timezone: string; verdict: 'ON_TARGET' | 'OFF_TARGET' | 'NO_TARGETS' | 'NO_DATA'; verdictProse: string; }; liveReportId: string; model: string; recommendations: { afterText: string; beforeText: string; body: string; channel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL'; order: number; promptOptimizationFindingId: string; severity: 'HIGH' | 'MEDIUM' | 'LOW'; source: 'PROMPT_OPTIMIZER' | 'DEBRIEF'; themeSlugs: string[]; title: string; }[]; targets: { actual: number; actualLabel: string; aggregation: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator: 'AT_LEAST' | 'AT_MOST'; deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL'; deltaLabel: string; error: string; failingConversationCount: number; key: string; label: string; lifecycle: 'NEW_MISS' | 'STILL_MISSED' | 'RECOVERED' | 'HOLDING'; metricDefinitionId: string; metricName: string; metricSlug: string; percentile: number; previous: number; previousLabel: string; sampleSize: number; series: object[]; status: 'MET' | 'MISSED' | 'NO_DATA'; targetLabel: string; targetValue: number; unit: 'PERCENT' | 'VALUE'; }[]; themes: { affectedConversationCount: number; analysis: string; checkNames: string[]; collectorQuote: object; estimatedAffectedConversationCount: number; excerpts: object[]; flaggedForImpact: boolean; impact: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW'; impactReason: string; issue: object; lifecycle: 'NEW' | 'PERSISTENT' | 'IMPROVING' | 'FIXED'; memberConversationIds: string[]; metricDefinitionIds: string[]; prevalence: 'WIDESPREAD' | 'RECURRING' | 'ISOLATED'; rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL'; severity: 'HIGH' | 'MEDIUM' | 'LOW'; slug: string; title: string; totalConversationCount: number; memberCalls?: object[]; }[]; version: 1; volume: { conversationCount: number; deltaPct: number; endings: object[]; previousConversationCount: number; series: object[]; }; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.liveReport.getDocument('9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b', {\n reportId: '5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f',\n});\n\nconsole.log(response);\n```",
|
|
1102
|
+
perLanguage: {
|
|
1103
|
+
typescript: {
|
|
1104
|
+
method: 'client.liveReport.getDocument',
|
|
1105
|
+
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.liveReport.getDocument('9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b', {\n reportId: '5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f',\n});\n\nconsole.log(response.data);",
|
|
1106
|
+
},
|
|
1107
|
+
python: {
|
|
1108
|
+
method: 'live_report.get_document',
|
|
1109
|
+
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.live_report.get_document(\n "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",\n report_id="5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",\n)\nprint(response.data)',
|
|
1110
|
+
},
|
|
1111
|
+
http: {
|
|
1112
|
+
example: 'curl https://api.roark.ai/v1/live-report/$REPORT_ID/document/$DOCUMENT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1113
|
+
},
|
|
1114
|
+
},
|
|
1115
|
+
},
|
|
887
1116
|
{
|
|
888
1117
|
name: 'listDefinitions',
|
|
889
1118
|
endpoint: '/v1/metric/definitions',
|
|
@@ -3342,11 +3571,13 @@ const EMBEDDED_METHODS = [
|
|
|
3342
3571
|
params: [
|
|
3343
3572
|
'jobDescription: string;',
|
|
3344
3573
|
'name: string;',
|
|
3345
|
-
"
|
|
3574
|
+
"llm?: { model: string; provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; };",
|
|
3575
|
+
"stt?: { model: string; provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; };",
|
|
3576
|
+
"tts?: { provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; voiceId: string; model?: string; };",
|
|
3346
3577
|
'voice?: string;',
|
|
3347
3578
|
],
|
|
3348
3579
|
response: '{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }',
|
|
3349
|
-
markdown: "## build\n\n`client.agent.build(jobDescription: string, name: string, tts?: { provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; voiceId: string; }, voice?: string): { data: object; }`\n\n**post** `/v1/agent/build`\n\nCreates a new Roark-hosted agent from a one-line job description. Roark authors the system prompt and hosts the config, so the agent is live and self-improvable from creation.\n\n### Parameters\n\n- `jobDescription: string`\n One-line description of what the agent should do. Roark authors the system prompt from this.\n\n- `name: string`\n Name of the agent\n\n- `tts?: { provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; voiceId: string; }`\n Optional provider voice the hosted agent speaks with\n\n- `voice?: string`\n Optional display name of the agent's voice. The authored prompt matches its delivery to it.\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.build({ jobDescription: 'x', name: 'x' });\n\nconsole.log(response);\n```",
|
|
3580
|
+
markdown: "## build\n\n`client.agent.build(jobDescription: string, name: string, llm?: { model: string; provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; }, stt?: { model: string; provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; }, tts?: { provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; voiceId: string; model?: string; }, voice?: string): { data: object; }`\n\n**post** `/v1/agent/build`\n\nCreates a new Roark-hosted agent from a one-line job description. Roark authors the system prompt and hosts the config, so the agent is live and self-improvable from creation.\n\n### Parameters\n\n- `jobDescription: string`\n One-line description of what the agent should do. Roark authors the system prompt from this.\n\n- `name: string`\n Name of the agent\n\n- `llm?: { model: string; provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; }`\n Optional text model the hosted agent thinks with. Roark's default when omitted\n\n- `stt?: { model: string; provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; }`\n Optional transcriber the hosted agent hears with. Roark's default when omitted\n\n- `tts?: { provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; voiceId: string; model?: string; }`\n Optional provider voice the hosted agent speaks with\n\n- `voice?: string`\n Optional display name of the agent's voice. The authored prompt matches its delivery to it.\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.build({ jobDescription: 'x', name: 'x' });\n\nconsole.log(response);\n```",
|
|
3350
3581
|
perLanguage: {
|
|
3351
3582
|
typescript: {
|
|
3352
3583
|
method: 'client.agent.build',
|
|
@@ -3745,8 +3976,8 @@ const EMBEDDED_METHODS = [
|
|
|
3745
3976
|
stainlessPath: '(resource) agentVersion > (method) list',
|
|
3746
3977
|
qualified: 'client.agentVersion.list',
|
|
3747
3978
|
params: ['agentId: string;', 'after?: string;', 'limit?: number;'],
|
|
3748
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3749
|
-
markdown: "## list\n\n`client.agentVersion.list(agentId: string, after?: string, limit?: number): { data: object[]; pagination: object; }`\n\n**get** `/v1/agent/{agentId}/versions`\n\nThe open draft first, if there is one, then published versions newest first. Paginated: pass `pagination.nextCursor` as `after` for the next page.\n\n### Parameters\n\n- `agentId: string`\n\n- `after?: string`\n\n- `limit?: number`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3979
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
|
|
3980
|
+
markdown: "## list\n\n`client.agentVersion.list(agentId: string, after?: string, limit?: number): { data: object[]; pagination: object; }`\n\n**get** `/v1/agent/{agentId}/versions`\n\nThe open draft first, if there is one, then published versions newest first. Paginated: pass `pagination.nextCursor` as `after` for the next page.\n\n### Parameters\n\n- `agentId: string`\n\n- `after?: string`\n\n- `limit?: number`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: 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 agentVersions = await client.agentVersion.list('agentId');\n\nconsole.log(agentVersions);\n```",
|
|
3750
3981
|
perLanguage: {
|
|
3751
3982
|
typescript: {
|
|
3752
3983
|
method: 'client.agentVersion.list',
|
|
@@ -3770,8 +4001,8 @@ const EMBEDDED_METHODS = [
|
|
|
3770
4001
|
stainlessPath: '(resource) agentVersion > (method) getById',
|
|
3771
4002
|
qualified: 'client.agentVersion.getByID',
|
|
3772
4003
|
params: ['agentId: string;', 'versionId: string;'],
|
|
3773
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3774
|
-
markdown: "## getById\n\n`client.agentVersion.getByID(agentId: string, versionId: string): { data: object; }`\n\n**get** `/v1/agent/{agentId}/versions/{versionId}`\n\nOne version with every setting, plus the issues that stop it from running, if any.\n\n### Parameters\n\n- `agentId: string`\n\n- `versionId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
4004
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
4005
|
+
markdown: "## getById\n\n`client.agentVersion.getByID(agentId: string, versionId: string): { data: object; }`\n\n**get** `/v1/agent/{agentId}/versions/{versionId}`\n\nOne version with every setting, plus the issues that stop it from running, if any.\n\n### Parameters\n\n- `agentId: string`\n\n- `versionId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agentVersion.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response);\n```",
|
|
3775
4006
|
perLanguage: {
|
|
3776
4007
|
typescript: {
|
|
3777
4008
|
method: 'client.agentVersion.getByID',
|
|
@@ -3787,32 +4018,32 @@ const EMBEDDED_METHODS = [
|
|
|
3787
4018
|
},
|
|
3788
4019
|
},
|
|
3789
4020
|
{
|
|
3790
|
-
name: '
|
|
3791
|
-
endpoint: '/v1/agent/{agentId}/versions/{versionId}/
|
|
4021
|
+
name: 'rollback',
|
|
4022
|
+
endpoint: '/v1/agent/{agentId}/versions/{versionId}/rollback',
|
|
3792
4023
|
httpMethod: 'post',
|
|
3793
|
-
summary: '
|
|
3794
|
-
description: "
|
|
3795
|
-
stainlessPath: '(resource) agentVersion > (method)
|
|
3796
|
-
qualified: 'client.agentVersion.
|
|
4024
|
+
summary: 'Roll an agent back to a version',
|
|
4025
|
+
description: "Publishes a new version, numbered after the latest, with this version's settings and makes it live. History stays append-only. An open draft started before this is kept but can no longer be published (409 `agent_draft_base_changed`); discard it or start a new one. Pass `expectedLiveVersionId` to be refused (409 `agent_live_version_changed`) if another version went live since you read it.",
|
|
4026
|
+
stainlessPath: '(resource) agentVersion > (method) rollback',
|
|
4027
|
+
qualified: 'client.agentVersion.rollback',
|
|
3797
4028
|
params: [
|
|
3798
4029
|
'agentId: string;',
|
|
3799
4030
|
'versionId: string;',
|
|
3800
4031
|
'expectedLiveVersionId?: string;',
|
|
3801
4032
|
'summary?: string;',
|
|
3802
4033
|
],
|
|
3803
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3804
|
-
markdown: "##
|
|
4034
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
4035
|
+
markdown: "## rollback\n\n`client.agentVersion.rollback(agentId: string, versionId: string, expectedLiveVersionId?: string, summary?: string): { data: object; }`\n\n**post** `/v1/agent/{agentId}/versions/{versionId}/rollback`\n\nPublishes a new version, numbered after the latest, with this version's settings and makes it live. History stays append-only. An open draft started before this is kept but can no longer be published (409 `agent_draft_base_changed`); discard it or start a new one. Pass `expectedLiveVersionId` to be refused (409 `agent_live_version_changed`) if another version went live since you read it.\n\n### Parameters\n\n- `agentId: string`\n\n- `versionId: string`\n\n- `expectedLiveVersionId?: string`\n The live version when you decided to roll back. When sent, the rollback is refused with 409 if another version went live since.\n\n- `summary?: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agentVersion.rollback('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response);\n```",
|
|
3805
4036
|
perLanguage: {
|
|
3806
4037
|
typescript: {
|
|
3807
|
-
method: 'client.agentVersion.
|
|
3808
|
-
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.agentVersion.
|
|
4038
|
+
method: 'client.agentVersion.rollback',
|
|
4039
|
+
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.agentVersion.rollback('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response.data);",
|
|
3809
4040
|
},
|
|
3810
4041
|
python: {
|
|
3811
|
-
method: 'agent_version.
|
|
3812
|
-
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_version.
|
|
4042
|
+
method: 'agent_version.rollback',
|
|
4043
|
+
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_version.rollback(\n version_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
|
|
3813
4044
|
},
|
|
3814
4045
|
http: {
|
|
3815
|
-
example: 'curl https://api.roark.ai/v1/agent/$AGENT_ID/versions/$VERSION_ID/
|
|
4046
|
+
example: 'curl https://api.roark.ai/v1/agent/$AGENT_ID/versions/$VERSION_ID/rollback \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
3816
4047
|
},
|
|
3817
4048
|
},
|
|
3818
4049
|
},
|
|
@@ -3825,8 +4056,8 @@ const EMBEDDED_METHODS = [
|
|
|
3825
4056
|
stainlessPath: '(resource) agentDraft > (method) get',
|
|
3826
4057
|
qualified: 'client.agentDraft.get',
|
|
3827
4058
|
params: ['agentId: string;'],
|
|
3828
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3829
|
-
markdown: "## get\n\n`client.agentDraft.get(agentId: string): { data: object; }`\n\n**get** `/v1/agent/{agentId}/draft`\n\nThe agent's open draft, with the issues that would stop it from being published.\n\n### Parameters\n\n- `agentId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
4059
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
4060
|
+
markdown: "## get\n\n`client.agentDraft.get(agentId: string): { data: object; }`\n\n**get** `/v1/agent/{agentId}/draft`\n\nThe agent's open draft, with the issues that would stop it from being published.\n\n### Parameters\n\n- `agentId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentDraft = await client.agentDraft.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(agentDraft);\n```",
|
|
3830
4061
|
perLanguage: {
|
|
3831
4062
|
typescript: {
|
|
3832
4063
|
method: 'client.agentDraft.get',
|
|
@@ -3850,8 +4081,8 @@ const EMBEDDED_METHODS = [
|
|
|
3850
4081
|
stainlessPath: '(resource) agentDraft > (method) create',
|
|
3851
4082
|
qualified: 'client.agentDraft.create',
|
|
3852
4083
|
params: ['agentId: string;', 'fromVersionId?: string;'],
|
|
3853
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3854
|
-
markdown: "## create\n\n`client.agentDraft.create(agentId: string, fromVersionId?: string): { data: object; }`\n\n**post** `/v1/agent/{agentId}/draft`\n\nOpens the agent's one shared draft, a copy of the live version or of an older published version. Fails with 409 when a draft is already open.\n\n### Parameters\n\n- `agentId: string`\n\n- `fromVersionId?: string`\n Start from this published version instead of the live one.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
4084
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
4085
|
+
markdown: "## create\n\n`client.agentDraft.create(agentId: string, fromVersionId?: string): { data: object; }`\n\n**post** `/v1/agent/{agentId}/draft`\n\nOpens the agent's one shared draft, a copy of the live version or of an older published version. Fails with 409 when a draft is already open.\n\n### Parameters\n\n- `agentId: string`\n\n- `fromVersionId?: string`\n Start from this published version instead of the live one.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentDraft = await client.agentDraft.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(agentDraft);\n```",
|
|
3855
4086
|
perLanguage: {
|
|
3856
4087
|
typescript: {
|
|
3857
4088
|
method: 'client.agentDraft.create',
|
|
@@ -3869,18 +4100,18 @@ const EMBEDDED_METHODS = [
|
|
|
3869
4100
|
{
|
|
3870
4101
|
name: 'update',
|
|
3871
4102
|
endpoint: '/v1/agent/{agentId}/draft',
|
|
3872
|
-
httpMethod: '
|
|
4103
|
+
httpMethod: 'put',
|
|
3873
4104
|
summary: 'Edit the draft',
|
|
3874
4105
|
description: 'Changes settings on the draft. Omitted settings stay as they are. Pass the revision you read as expectedRevision to fail with 409 if anyone edited the draft since, instead of applying on top of their edit.',
|
|
3875
4106
|
stainlessPath: '(resource) agentDraft > (method) update',
|
|
3876
4107
|
qualified: 'client.agentDraft.update',
|
|
3877
4108
|
params: [
|
|
3878
4109
|
'agentId: string;',
|
|
3879
|
-
"settings: { backgroundNoise?: string; backgroundNoiseUrl?: string; backgroundNoiseVolume?: number; callMaxDurationSeconds?: number; callSilenceTimeoutSeconds?: number; chatInactivityTimeoutSeconds?: number; chatMaxDurationSeconds?: number; endCallGoodbyeMessage?: string; endDetectionPhrases?: string[]; endDetectionReasons?: string[]; firstMessage?: string; firstMessageAudioUrl?: string; firstMessageMode?: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount?: number; idleMessages?: string[]; idleTimeoutSeconds?: number; interruptionMode?: 'ALLOW' | 'BLOCK'; language?: string;
|
|
4110
|
+
"settings: { backgroundNoise?: string; backgroundNoiseUrl?: string; backgroundNoiseVolume?: number; callMaxDurationSeconds?: number; callSilenceTimeoutSeconds?: number; chatInactivityTimeoutSeconds?: number; chatMaxDurationSeconds?: number; endCallGoodbyeMessage?: string; endDetectionPhrases?: string[]; endDetectionReasons?: string[]; firstMessage?: string; firstMessageAudioUrl?: string; firstMessageMode?: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount?: number; idleMessages?: string[]; idleTimeoutSeconds?: number; interruptionMode?: 'ALLOW' | 'BLOCK'; language?: string; modalities?: 'call' | 'chat'[]; subAgents?: { handoffs: object[]; isInitial: boolean; key: 'main' | string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; vadStartSecs?: number; vadStopSecs?: number; };",
|
|
3880
4111
|
'expectedRevision?: number;',
|
|
3881
4112
|
],
|
|
3882
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3883
|
-
markdown: "## update\n\n`client.agentDraft.update(agentId: string, settings: { backgroundNoise?: string; backgroundNoiseUrl?: string; backgroundNoiseVolume?: number; callMaxDurationSeconds?: number; callSilenceTimeoutSeconds?: number; chatInactivityTimeoutSeconds?: number; chatMaxDurationSeconds?: number; endCallGoodbyeMessage?: string; endDetectionPhrases?: string[]; endDetectionReasons?: string[]; firstMessage?: string; firstMessageAudioUrl?: string; firstMessageMode?: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount?: number; idleMessages?: string[]; idleTimeoutSeconds?: number; interruptionMode?: 'ALLOW' | 'BLOCK'; language?: string;
|
|
4113
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
4114
|
+
markdown: "## update\n\n`client.agentDraft.update(agentId: string, settings: { backgroundNoise?: string; backgroundNoiseUrl?: string; backgroundNoiseVolume?: number; callMaxDurationSeconds?: number; callSilenceTimeoutSeconds?: number; chatInactivityTimeoutSeconds?: number; chatMaxDurationSeconds?: number; endCallGoodbyeMessage?: string; endDetectionPhrases?: string[]; endDetectionReasons?: string[]; firstMessage?: string; firstMessageAudioUrl?: string; firstMessageMode?: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount?: number; idleMessages?: string[]; idleTimeoutSeconds?: number; interruptionMode?: 'ALLOW' | 'BLOCK'; language?: string; modalities?: 'call' | 'chat'[]; subAgents?: { handoffs: object[]; isInitial: boolean; key: 'main' | string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; vadStartSecs?: number; vadStopSecs?: number; }, expectedRevision?: number): { data: object; }`\n\n**put** `/v1/agent/{agentId}/draft`\n\nChanges settings on the draft. Omitted settings stay as they are. Pass the revision you read as expectedRevision to fail with 409 if anyone edited the draft since, instead of applying on top of their edit.\n\n### Parameters\n\n- `agentId: string`\n\n- `settings: { backgroundNoise?: string; backgroundNoiseUrl?: string; backgroundNoiseVolume?: number; callMaxDurationSeconds?: number; callSilenceTimeoutSeconds?: number; chatInactivityTimeoutSeconds?: number; chatMaxDurationSeconds?: number; endCallGoodbyeMessage?: string; endDetectionPhrases?: string[]; endDetectionReasons?: string[]; firstMessage?: string; firstMessageAudioUrl?: string; firstMessageMode?: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount?: number; idleMessages?: string[]; idleTimeoutSeconds?: number; interruptionMode?: 'ALLOW' | 'BLOCK'; language?: string; modalities?: 'call' | 'chat'[]; subAgents?: { handoffs: object[]; isInitial: boolean; key: 'main' | string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; vadStartSecs?: number; vadStopSecs?: number; }`\n The settings to change. Omitted settings stay as they are; null clears one to the runtime default. subAgents replaces every speaker, model configs included, and must include `main`; in a model config, omitted fields use the runtime default.\n\n- `expectedRevision?: number`\n The draft's revision when you read it. When sent, the edit is refused if the draft changed since; when omitted, it applies on top of the latest edit.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentDraft = await client.agentDraft.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n settings: {},\n});\n\nconsole.log(agentDraft);\n```",
|
|
3884
4115
|
perLanguage: {
|
|
3885
4116
|
typescript: {
|
|
3886
4117
|
method: 'client.agentDraft.update',
|
|
@@ -3891,7 +4122,7 @@ const EMBEDDED_METHODS = [
|
|
|
3891
4122
|
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_draft = client.agent_draft.update(\n agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n settings={},\n)\nprint(agent_draft.data)',
|
|
3892
4123
|
},
|
|
3893
4124
|
http: {
|
|
3894
|
-
example: 'curl https://api.roark.ai/v1/agent/$AGENT_ID/draft \\\n -X
|
|
4125
|
+
example: 'curl https://api.roark.ai/v1/agent/$AGENT_ID/draft \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "settings": {}\n }\'',
|
|
3895
4126
|
},
|
|
3896
4127
|
},
|
|
3897
4128
|
},
|
|
@@ -3904,8 +4135,8 @@ const EMBEDDED_METHODS = [
|
|
|
3904
4135
|
stainlessPath: '(resource) agentDraft > (method) delete',
|
|
3905
4136
|
qualified: 'client.agentDraft.delete',
|
|
3906
4137
|
params: ['agentId: string;'],
|
|
3907
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3908
|
-
markdown: "## delete\n\n`client.agentDraft.delete(agentId: string): { data: object; }`\n\n**delete** `/v1/agent/{agentId}/draft`\n\nThrows the open draft away and returns it. The live version is unchanged.\n\n### Parameters\n\n- `agentId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
4138
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
4139
|
+
markdown: "## delete\n\n`client.agentDraft.delete(agentId: string): { data: object; }`\n\n**delete** `/v1/agent/{agentId}/draft`\n\nThrows the open draft away and returns it. The live version is unchanged.\n\n### Parameters\n\n- `agentId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentDraft = await client.agentDraft.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(agentDraft);\n```",
|
|
3909
4140
|
perLanguage: {
|
|
3910
4141
|
typescript: {
|
|
3911
4142
|
method: 'client.agentDraft.delete',
|
|
@@ -3929,8 +4160,8 @@ const EMBEDDED_METHODS = [
|
|
|
3929
4160
|
stainlessPath: '(resource) agentDraft > (method) publish',
|
|
3930
4161
|
qualified: 'client.agentDraft.publish',
|
|
3931
4162
|
params: ['agentId: string;', 'expectedRevision: number;', 'summary?: string;'],
|
|
3932
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3933
|
-
markdown: "## publish\n\n`client.agentDraft.publish(agentId: string, expectedRevision: number, summary?: string): { data: object; }`\n\n**post** `/v1/agent/{agentId}/draft/publish`\n\nMakes the draft the live version, numbered v1, v2, ... Fails with 409 if the draft was edited after expectedRevision, if another version was published since the draft started, or if it changes nothing; with 400 and the issues if the version cannot run.\n\n### Parameters\n\n- `agentId: string`\n\n- `expectedRevision: number`\n The draft revision you reviewed.\n\n- `summary?: string`\n What changed.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
4163
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
4164
|
+
markdown: "## publish\n\n`client.agentDraft.publish(agentId: string, expectedRevision: number, summary?: string): { data: object; }`\n\n**post** `/v1/agent/{agentId}/draft/publish`\n\nMakes the draft the live version, numbered v1, v2, ... Fails with 409 if the draft was edited after expectedRevision, if another version was published since the draft started, or if it changes nothing; with 400 and the issues if the version cannot run.\n\n### Parameters\n\n- `agentId: string`\n\n- `expectedRevision: number`\n The draft revision you reviewed.\n\n- `summary?: string`\n What changed.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agentDraft.publish('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n expectedRevision: 1,\n});\n\nconsole.log(response);\n```",
|
|
3934
4165
|
perLanguage: {
|
|
3935
4166
|
typescript: {
|
|
3936
4167
|
method: 'client.agentDraft.publish',
|
|
@@ -4340,11 +4571,11 @@ const EMBEDDED_METHODS = [
|
|
|
4340
4571
|
stainlessPath: '(resource) config > (method) diff',
|
|
4341
4572
|
qualified: 'client.config.diff',
|
|
4342
4573
|
params: [
|
|
4343
|
-
"resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; 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[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; 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; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[];",
|
|
4574
|
+
"resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; 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[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; 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; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[];",
|
|
4344
4575
|
'prune?: boolean;',
|
|
4345
4576
|
],
|
|
4346
4577
|
response: "{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }; }",
|
|
4347
|
-
markdown: "## diff\n\n`client.config.diff(resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; 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[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; 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; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/diff`\n\nDry run for an apply: returns the projected changes (create / update / delete) for the submitted bundle without writing anything. Works for both project and organization keys.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; 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[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; 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; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: 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: 'x' }] });\n\nconsole.log(response);\n```",
|
|
4578
|
+
markdown: "## diff\n\n`client.config.diff(resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; 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[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; 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; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/diff`\n\nDry run for an apply: returns the projected changes (create / update / delete) for the submitted bundle without writing anything. Works for both project and organization keys.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; 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[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; 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; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: 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: 'x' }] });\n\nconsole.log(response);\n```",
|
|
4348
4579
|
perLanguage: {
|
|
4349
4580
|
typescript: {
|
|
4350
4581
|
method: 'client.config.diff',
|
|
@@ -4368,11 +4599,11 @@ const EMBEDDED_METHODS = [
|
|
|
4368
4599
|
stainlessPath: '(resource) config > (method) apply',
|
|
4369
4600
|
qualified: 'client.config.apply',
|
|
4370
4601
|
params: [
|
|
4371
|
-
"resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; 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[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; 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; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[];",
|
|
4602
|
+
"resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; 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[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; 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; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[];",
|
|
4372
4603
|
'prune?: boolean;',
|
|
4373
4604
|
],
|
|
4374
4605
|
response: "{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }; }",
|
|
4375
|
-
markdown: "## apply\n\n`client.config.apply(resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; 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[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; 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; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/apply`\n\nReconcile a config-as-code bundle. With a PROJECT API key, submit project-scoped resources (agents, personas, flows, collectors, metrics, ...). With an ORGANIZATION API key, submit `kind: project` resources, each optionally carrying its members and its own nested `resources`. Submit the full desired set; managed resources are updated, new ones created, and (unless prune is false) managed resources absent from the bundle are deleted. Identity is by name.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; 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[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; 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; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: 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: 'x' }] });\n\nconsole.log(response);\n```",
|
|
4606
|
+
markdown: "## apply\n\n`client.config.apply(resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; 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[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; 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; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/apply`\n\nReconcile a config-as-code bundle. With a PROJECT API key, submit project-scoped resources (agents, personas, flows, collectors, metrics, ...). With an ORGANIZATION API key, submit `kind: project` resources, each optionally carrying its members and its own nested `resources`. Submit the full desired set; managed resources are updated, new ones created, and (unless prune is false) managed resources absent from the bundle are deleted. Identity is by name.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; 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[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; 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; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: 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: 'x' }] });\n\nconsole.log(response);\n```",
|
|
4376
4607
|
perLanguage: {
|
|
4377
4608
|
typescript: {
|
|
4378
4609
|
method: 'client.config.apply',
|