@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.
@@ -272,11 +272,13 @@ const EMBEDDED_METHODS: MethodEntry[] = [
272
272
  endpoint: '/v1/call',
273
273
  httpMethod: 'get',
274
274
  summary: 'List calls',
275
- description: 'Returns a paginated list of calls for the authenticated project.',
275
+ description:
276
+ '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.',
276
277
  stainlessPath: '(resource) call > (method) list',
277
278
  qualified: 'client.call.list',
278
279
  params: [
279
280
  'after?: string;',
281
+ 'agentId?: string;',
280
282
  "countedInResults?: 'true' | 'false';",
281
283
  "excludeHiddenRuns?: 'true' | 'false';",
282
284
  'limit?: number;',
@@ -292,7 +294,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
292
294
  response:
293
295
  "{ 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; }; }",
294
296
  markdown:
295
- "## 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 custom 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). A property the project has never seen is missing on every call. Names match the way properties are stored, so planTier and plan_tier are one property. At most 20 properties; a name taken by a built-in call filter, such as status, is rejected with 400.\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```",
297
+ "## 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```",
296
298
  perLanguage: {
297
299
  typescript: {
298
300
  method: 'client.call.list',
@@ -1058,6 +1060,276 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1058
1060
  },
1059
1061
  },
1060
1062
  },
1063
+ {
1064
+ name: 'list',
1065
+ endpoint: '/v1/live-report',
1066
+ httpMethod: 'get',
1067
+ summary: 'List live reports',
1068
+ description: "Lists the project's saved live call reports, newest first.",
1069
+ stainlessPath: '(resource) liveReport > (method) list',
1070
+ qualified: 'client.liveReport.list',
1071
+ params: ['limit?: number;', 'offset?: number;'],
1072
+ response:
1073
+ "{ 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; }; }",
1074
+ markdown:
1075
+ "## 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```",
1076
+ perLanguage: {
1077
+ typescript: {
1078
+ method: 'client.liveReport.list',
1079
+ example:
1080
+ "import Roark from '@roarkanalytics/sdk';\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);",
1081
+ },
1082
+ python: {
1083
+ method: 'live_report.list',
1084
+ example:
1085
+ '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)',
1086
+ },
1087
+ http: {
1088
+ example:
1089
+ 'curl https://api.roark.ai/v1/live-report \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1090
+ },
1091
+ },
1092
+ },
1093
+ {
1094
+ name: 'create',
1095
+ endpoint: '/v1/live-report',
1096
+ httpMethod: 'post',
1097
+ summary: 'Create a live report',
1098
+ description:
1099
+ "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.",
1100
+ stainlessPath: '(resource) liveReport > (method) create',
1101
+ qualified: 'client.liveReport.create',
1102
+ params: [
1103
+ 'name: string;',
1104
+ 'agentId?: string;',
1105
+ "cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY';",
1106
+ 'dashboardId?: string;',
1107
+ 'deliveryHour?: number;',
1108
+ 'description?: string;',
1109
+ "filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[];",
1110
+ 'generateNow?: boolean;',
1111
+ 'includeTranscriptExcerpts?: boolean;',
1112
+ 'notifications?: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; };',
1113
+ "status?: 'ACTIVE' | 'PAUSED';",
1114
+ "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; }[];",
1115
+ 'timezone?: string;',
1116
+ ],
1117
+ response:
1118
+ "{ 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; }; }",
1119
+ markdown:
1120
+ "## 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```",
1121
+ perLanguage: {
1122
+ typescript: {
1123
+ method: 'client.liveReport.create',
1124
+ example:
1125
+ "import Roark from '@roarkanalytics/sdk';\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);",
1126
+ },
1127
+ python: {
1128
+ method: 'live_report.create',
1129
+ example:
1130
+ '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)',
1131
+ },
1132
+ http: {
1133
+ example:
1134
+ '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 }\'',
1135
+ },
1136
+ },
1137
+ },
1138
+ {
1139
+ name: 'getById',
1140
+ endpoint: '/v1/live-report/{reportId}',
1141
+ httpMethod: 'get',
1142
+ summary: 'Get a live report',
1143
+ description: 'Get a live report',
1144
+ stainlessPath: '(resource) liveReport > (method) getById',
1145
+ qualified: 'client.liveReport.getByID',
1146
+ params: ['reportId: string;'],
1147
+ response:
1148
+ "{ 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; }; }",
1149
+ markdown:
1150
+ "## 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```",
1151
+ perLanguage: {
1152
+ typescript: {
1153
+ method: 'client.liveReport.getByID',
1154
+ example:
1155
+ "import Roark from '@roarkanalytics/sdk';\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);",
1156
+ },
1157
+ python: {
1158
+ method: 'live_report.get_by_id',
1159
+ example:
1160
+ '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)',
1161
+ },
1162
+ http: {
1163
+ example:
1164
+ 'curl https://api.roark.ai/v1/live-report/$REPORT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1165
+ },
1166
+ },
1167
+ },
1168
+ {
1169
+ name: 'update',
1170
+ endpoint: '/v1/live-report/{reportId}',
1171
+ httpMethod: 'patch',
1172
+ summary: 'Update a live report',
1173
+ description: 'Changes the fields sent. Set `status` to PAUSED to stop scheduled reports.',
1174
+ stainlessPath: '(resource) liveReport > (method) update',
1175
+ qualified: 'client.liveReport.update',
1176
+ params: [
1177
+ 'reportId: string;',
1178
+ 'agentId?: string;',
1179
+ "cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY';",
1180
+ 'dashboardId?: string;',
1181
+ 'deliveryHour?: number;',
1182
+ 'description?: string;',
1183
+ "filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[];",
1184
+ 'includeTranscriptExcerpts?: boolean;',
1185
+ 'name?: string;',
1186
+ 'notifications?: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; };',
1187
+ "status?: 'ACTIVE' | 'PAUSED';",
1188
+ "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; }[];",
1189
+ 'timezone?: string;',
1190
+ ],
1191
+ response:
1192
+ "{ 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; }; }",
1193
+ markdown:
1194
+ "## 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```",
1195
+ perLanguage: {
1196
+ typescript: {
1197
+ method: 'client.liveReport.update',
1198
+ example:
1199
+ "import Roark from '@roarkanalytics/sdk';\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);",
1200
+ },
1201
+ python: {
1202
+ method: 'live_report.update',
1203
+ example:
1204
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nlive_report = client.live_report.update(\n report_id="5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",\n)\nprint(live_report.data)',
1205
+ },
1206
+ http: {
1207
+ example:
1208
+ 'curl https://api.roark.ai/v1/live-report/$REPORT_ID \\\n -X PATCH \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1209
+ },
1210
+ },
1211
+ },
1212
+ {
1213
+ name: 'delete',
1214
+ endpoint: '/v1/live-report/{reportId}',
1215
+ httpMethod: 'delete',
1216
+ summary: 'Delete a live report',
1217
+ description: 'Deletes the report and stops its scheduled reports.',
1218
+ stainlessPath: '(resource) liveReport > (method) delete',
1219
+ qualified: 'client.liveReport.delete',
1220
+ params: ['reportId: string;'],
1221
+ response: '{ data: { id: string; deleted: true; }; }',
1222
+ markdown:
1223
+ "## 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```",
1224
+ perLanguage: {
1225
+ typescript: {
1226
+ method: 'client.liveReport.delete',
1227
+ example:
1228
+ "import Roark from '@roarkanalytics/sdk';\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);",
1229
+ },
1230
+ python: {
1231
+ method: 'live_report.delete',
1232
+ example:
1233
+ '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)',
1234
+ },
1235
+ http: {
1236
+ example:
1237
+ 'curl https://api.roark.ai/v1/live-report/$REPORT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1238
+ },
1239
+ },
1240
+ },
1241
+ {
1242
+ name: 'run',
1243
+ endpoint: '/v1/live-report/{reportId}/generate',
1244
+ httpMethod: 'post',
1245
+ summary: 'Generate a live report document',
1246
+ description:
1247
+ '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.',
1248
+ stainlessPath: '(resource) liveReport > (method) run',
1249
+ qualified: 'client.liveReport.run',
1250
+ params: ['reportId: string;', 'periodEnd?: string;', 'periodStart?: string;'],
1251
+ response:
1252
+ "{ 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'; }; }",
1253
+ markdown:
1254
+ "## 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```",
1255
+ perLanguage: {
1256
+ typescript: {
1257
+ method: 'client.liveReport.run',
1258
+ example:
1259
+ "import Roark from '@roarkanalytics/sdk';\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);",
1260
+ },
1261
+ python: {
1262
+ method: 'live_report.run',
1263
+ example:
1264
+ '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)',
1265
+ },
1266
+ http: {
1267
+ example:
1268
+ 'curl https://api.roark.ai/v1/live-report/$REPORT_ID/generate \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1269
+ },
1270
+ },
1271
+ },
1272
+ {
1273
+ name: 'listDocuments',
1274
+ endpoint: '/v1/live-report/{reportId}/document',
1275
+ httpMethod: 'get',
1276
+ summary: 'List report documents',
1277
+ description: "Lists a report's documents, newest period first.",
1278
+ stainlessPath: '(resource) liveReport > (method) listDocuments',
1279
+ qualified: 'client.liveReport.listDocuments',
1280
+ params: ['reportId: string;', 'limit?: number;', 'offset?: number;'],
1281
+ response:
1282
+ "{ 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; }; }",
1283
+ markdown:
1284
+ "## 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```",
1285
+ perLanguage: {
1286
+ typescript: {
1287
+ method: 'client.liveReport.listDocuments',
1288
+ example:
1289
+ "import Roark from '@roarkanalytics/sdk';\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);",
1290
+ },
1291
+ python: {
1292
+ method: 'live_report.list_documents',
1293
+ example:
1294
+ '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)',
1295
+ },
1296
+ http: {
1297
+ example:
1298
+ 'curl https://api.roark.ai/v1/live-report/$REPORT_ID/document \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1299
+ },
1300
+ },
1301
+ },
1302
+ {
1303
+ name: 'getDocument',
1304
+ endpoint: '/v1/live-report/{reportId}/document/{documentId}',
1305
+ httpMethod: 'get',
1306
+ summary: 'Get a report document',
1307
+ description:
1308
+ '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.',
1309
+ stainlessPath: '(resource) liveReport > (method) getDocument',
1310
+ qualified: 'client.liveReport.getDocument',
1311
+ params: ['reportId: string;', 'documentId: string;'],
1312
+ response:
1313
+ "{ 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'; }; }",
1314
+ markdown:
1315
+ "## 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```",
1316
+ perLanguage: {
1317
+ typescript: {
1318
+ method: 'client.liveReport.getDocument',
1319
+ example:
1320
+ "import Roark from '@roarkanalytics/sdk';\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);",
1321
+ },
1322
+ python: {
1323
+ method: 'live_report.get_document',
1324
+ example:
1325
+ '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)',
1326
+ },
1327
+ http: {
1328
+ example:
1329
+ 'curl https://api.roark.ai/v1/live-report/$REPORT_ID/document/$DOCUMENT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1330
+ },
1331
+ },
1332
+ },
1061
1333
  {
1062
1334
  name: 'listDefinitions',
1063
1335
  endpoint: '/v1/metric/definitions',
@@ -4005,13 +4277,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4005
4277
  params: [
4006
4278
  'jobDescription: string;',
4007
4279
  'name: string;',
4008
- "tts?: { provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; voiceId: string; };",
4280
+ "llm?: { model: string; provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; };",
4281
+ "stt?: { model: string; provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; };",
4282
+ "tts?: { provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; voiceId: string; model?: string; };",
4009
4283
  'voice?: string;',
4010
4284
  ],
4011
4285
  response:
4012
4286
  '{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }',
4013
4287
  markdown:
4014
- "## 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```",
4288
+ "## 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```",
4015
4289
  perLanguage: {
4016
4290
  typescript: {
4017
4291
  method: 'client.agent.build',
@@ -4490,9 +4764,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4490
4764
  qualified: 'client.agentVersion.list',
4491
4765
  params: ['agentId: string;', 'after?: string;', 'limit?: number;'],
4492
4766
  response:
4493
- "{ 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
4767
+ "{ 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; }; }",
4494
4768
  markdown:
4495
- "## 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: 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```",
4769
+ "## 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```",
4496
4770
  perLanguage: {
4497
4771
  typescript: {
4498
4772
  method: 'client.agentVersion.list',
@@ -4520,9 +4794,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4520
4794
  qualified: 'client.agentVersion.getByID',
4521
4795
  params: ['agentId: string;', 'versionId: string;'],
4522
4796
  response:
4523
- "{ 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
4797
+ "{ 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; }[]; }; }",
4524
4798
  markdown:
4525
- "## 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: 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```",
4799
+ "## 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```",
4526
4800
  perLanguage: {
4527
4801
  typescript: {
4528
4802
  method: 'client.agentVersion.getByID',
@@ -4541,14 +4815,14 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4541
4815
  },
4542
4816
  },
4543
4817
  {
4544
- name: 'restore',
4545
- endpoint: '/v1/agent/{agentId}/versions/{versionId}/restore',
4818
+ name: 'rollback',
4819
+ endpoint: '/v1/agent/{agentId}/versions/{versionId}/rollback',
4546
4820
  httpMethod: 'post',
4547
- summary: 'Restore an agent version',
4821
+ summary: 'Roll an agent back to a version',
4548
4822
  description:
4549
- "Roll back: 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.",
4550
- stainlessPath: '(resource) agentVersion > (method) restore',
4551
- qualified: 'client.agentVersion.restore',
4823
+ "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.",
4824
+ stainlessPath: '(resource) agentVersion > (method) rollback',
4825
+ qualified: 'client.agentVersion.rollback',
4552
4826
  params: [
4553
4827
  'agentId: string;',
4554
4828
  'versionId: string;',
@@ -4556,23 +4830,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4556
4830
  'summary?: string;',
4557
4831
  ],
4558
4832
  response:
4559
- "{ 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
4833
+ "{ 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; }[]; }; }",
4560
4834
  markdown:
4561
- "## restore\n\n`client.agentVersion.restore(agentId: string, versionId: string, expectedLiveVersionId?: string, summary?: string): { data: object; }`\n\n**post** `/v1/agent/{agentId}/versions/{versionId}/restore`\n\nRoll back: 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.\n\n### Parameters\n\n- `agentId: string`\n\n- `versionId: string`\n\n- `expectedLiveVersionId?: string`\n The live version when you decided to restore. When sent, the restore 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: 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.restore('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response);\n```",
4835
+ "## 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```",
4562
4836
  perLanguage: {
4563
4837
  typescript: {
4564
- method: 'client.agentVersion.restore',
4838
+ method: 'client.agentVersion.rollback',
4565
4839
  example:
4566
- "import Roark from '@roarkanalytics/sdk';\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.restore('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response.data);",
4840
+ "import Roark from '@roarkanalytics/sdk';\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);",
4567
4841
  },
4568
4842
  python: {
4569
- method: 'agent_version.restore',
4843
+ method: 'agent_version.rollback',
4570
4844
  example:
4571
- '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.restore(\n version_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
4845
+ '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)',
4572
4846
  },
4573
4847
  http: {
4574
4848
  example:
4575
- 'curl https://api.roark.ai/v1/agent/$AGENT_ID/versions/$VERSION_ID/restore \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
4849
+ 'curl https://api.roark.ai/v1/agent/$AGENT_ID/versions/$VERSION_ID/rollback \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
4576
4850
  },
4577
4851
  },
4578
4852
  },
@@ -4586,9 +4860,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4586
4860
  qualified: 'client.agentDraft.get',
4587
4861
  params: ['agentId: string;'],
4588
4862
  response:
4589
- "{ 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
4863
+ "{ 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; }[]; }; }",
4590
4864
  markdown:
4591
- "## 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: 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```",
4865
+ "## 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```",
4592
4866
  perLanguage: {
4593
4867
  typescript: {
4594
4868
  method: 'client.agentDraft.get',
@@ -4617,9 +4891,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4617
4891
  qualified: 'client.agentDraft.create',
4618
4892
  params: ['agentId: string;', 'fromVersionId?: string;'],
4619
4893
  response:
4620
- "{ 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
4894
+ "{ 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; }[]; }; }",
4621
4895
  markdown:
4622
- "## 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: 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```",
4896
+ "## 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```",
4623
4897
  perLanguage: {
4624
4898
  typescript: {
4625
4899
  method: 'client.agentDraft.create',
@@ -4640,7 +4914,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4640
4914
  {
4641
4915
  name: 'update',
4642
4916
  endpoint: '/v1/agent/{agentId}/draft',
4643
- httpMethod: 'patch',
4917
+ httpMethod: 'put',
4644
4918
  summary: 'Edit the draft',
4645
4919
  description:
4646
4920
  '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.',
@@ -4648,13 +4922,13 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4648
4922
  qualified: 'client.agentDraft.update',
4649
4923
  params: [
4650
4924
  'agentId: string;',
4651
- "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; llmBackendModel?: string; llmMaxTokens?: number; llmModel?: string; llmProvider?: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature?: number; llmVoice?: string; modalities?: 'call' | 'chat'[]; sttEndpointingMs?: number; sttKeyterms?: string[]; sttModel?: string; sttProvider?: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat?: boolean; sttTurnDetection?: 'pipeline' | 'provider'; subAgents?: { handoffs: object[]; isInitial: boolean; key: 'main' | string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; vadStartSecs?: number; vadStopSecs?: number; };",
4925
+ "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; };",
4652
4926
  'expectedRevision?: number;',
4653
4927
  ],
4654
4928
  response:
4655
- "{ 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
4929
+ "{ 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; }[]; }; }",
4656
4930
  markdown:
4657
- "## 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; llmBackendModel?: string; llmMaxTokens?: number; llmModel?: string; llmProvider?: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature?: number; llmVoice?: string; modalities?: 'call' | 'chat'[]; sttEndpointingMs?: number; sttKeyterms?: string[]; sttModel?: string; sttProvider?: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat?: boolean; sttTurnDetection?: 'pipeline' | 'provider'; subAgents?: { handoffs: object[]; isInitial: boolean; key: 'main' | string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; vadStartSecs?: number; vadStopSecs?: number; }, expectedRevision?: number): { data: object; }`\n\n**patch** `/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; llmBackendModel?: string; llmMaxTokens?: number; llmModel?: string; llmProvider?: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature?: number; llmVoice?: string; modalities?: 'call' | 'chat'[]; sttEndpointingMs?: number; sttKeyterms?: string[]; sttModel?: string; sttProvider?: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat?: boolean; sttTurnDetection?: 'pipeline' | 'provider'; subAgents?: { handoffs: object[]; isInitial: boolean; key: 'main' | string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; 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 and must include `main`.\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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: 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```",
4931
+ "## 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```",
4658
4932
  perLanguage: {
4659
4933
  typescript: {
4660
4934
  method: 'client.agentDraft.update',
@@ -4668,7 +4942,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4668
4942
  },
4669
4943
  http: {
4670
4944
  example:
4671
- 'curl https://api.roark.ai/v1/agent/$AGENT_ID/draft \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "settings": {}\n }\'',
4945
+ '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 }\'',
4672
4946
  },
4673
4947
  },
4674
4948
  },
@@ -4682,9 +4956,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4682
4956
  qualified: 'client.agentDraft.delete',
4683
4957
  params: ['agentId: string;'],
4684
4958
  response:
4685
- "{ 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
4959
+ "{ 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; }[]; }; }",
4686
4960
  markdown:
4687
- "## 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: 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```",
4961
+ "## 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```",
4688
4962
  perLanguage: {
4689
4963
  typescript: {
4690
4964
  method: 'client.agentDraft.delete',
@@ -4713,9 +4987,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4713
4987
  qualified: 'client.agentDraft.publish',
4714
4988
  params: ['agentId: string;', 'expectedRevision: number;', 'summary?: string;'],
4715
4989
  response:
4716
- "{ 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
4990
+ "{ 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; }[]; }; }",
4717
4991
  markdown:
4718
- "## 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: object[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: string; }[]; 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; llmBackendModel: string; llmMaxTokens: number; llmModel: string; llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; llmTemperature: number; llmVoice: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; restoredFromVersionId: string; revision: number; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; sttEndpointingMs: number; sttKeyterms: string[]; sttModel: string; sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; sttSmartFormat: boolean; sttTurnDetection: 'pipeline' | 'provider'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; ttsModel: string; ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; ttsSimilarityBoost: number; ttsSpeed: number; ttsStability: number; ttsVoiceId: 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```",
4992
+ "## 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```",
4719
4993
  perLanguage: {
4720
4994
  typescript: {
4721
4995
  method: 'client.agentDraft.publish',
@@ -5206,13 +5480,13 @@ const EMBEDDED_METHODS: MethodEntry[] = [
5206
5480
  stainlessPath: '(resource) config > (method) diff',
5207
5481
  qualified: 'client.config.diff',
5208
5482
  params: [
5209
- "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[]; }[]; }[];",
5483
+ "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[]; }[]; }[];",
5210
5484
  'prune?: boolean;',
5211
5485
  ],
5212
5486
  response:
5213
5487
  "{ 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; }; }; }",
5214
5488
  markdown:
5215
- "## 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```",
5489
+ "## 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```",
5216
5490
  perLanguage: {
5217
5491
  typescript: {
5218
5492
  method: 'client.config.diff',
@@ -5240,13 +5514,13 @@ const EMBEDDED_METHODS: MethodEntry[] = [
5240
5514
  stainlessPath: '(resource) config > (method) apply',
5241
5515
  qualified: 'client.config.apply',
5242
5516
  params: [
5243
- "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[]; }[]; }[];",
5517
+ "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[]; }[]; }[];",
5244
5518
  'prune?: boolean;',
5245
5519
  ],
5246
5520
  response:
5247
5521
  "{ 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; }; }; }",
5248
5522
  markdown:
5249
- "## 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```",
5523
+ "## 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```",
5250
5524
  perLanguage: {
5251
5525
  typescript: {
5252
5526
  method: 'client.config.apply',