@roarkanalytics/sdk-mcp 4.44.1 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/client-headers.d.mts +2 -2
- package/client-headers.d.mts.map +1 -1
- package/client-headers.d.ts +2 -2
- package/client-headers.d.ts.map +1 -1
- package/client-headers.js +1 -1
- package/client-headers.js.map +1 -1
- package/client-headers.mjs +1 -1
- package/client-headers.mjs.map +1 -1
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +9 -1
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +9 -1
- package/code-tool-worker.mjs.map +1 -1
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +269 -38
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +269 -38
- package/local-docs-search.mjs.map +1 -1
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +52 -4
- package/methods.js.map +1 -1
- package/methods.mjs +52 -4
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.js.map +1 -1
- package/server.mjs +1 -1
- package/server.mjs.map +1 -1
- package/src/client-headers.ts +1 -1
- package/src/code-tool-worker.ts +9 -1
- package/src/local-docs-search.ts +312 -38
- package/src/methods.ts +52 -4
- package/src/server.ts +1 -1
package/local-docs-search.mjs
CHANGED
|
@@ -187,11 +187,12 @@ const EMBEDDED_METHODS = [
|
|
|
187
187
|
endpoint: '/v1/call',
|
|
188
188
|
httpMethod: 'get',
|
|
189
189
|
summary: 'List calls',
|
|
190
|
-
description: 'Returns a paginated list of calls for the authenticated project.',
|
|
190
|
+
description: 'Returns a paginated list of calls for the authenticated project. Pass agentId to keep calls for specific agents, or properties[agent_name][eq] when you only have the agent name. sortBy and sortDirection apply together with those filters.',
|
|
191
191
|
stainlessPath: '(resource) call > (method) list',
|
|
192
192
|
qualified: 'client.call.list',
|
|
193
193
|
params: [
|
|
194
194
|
'after?: string;',
|
|
195
|
+
'agentId?: string;',
|
|
195
196
|
"countedInResults?: 'true' | 'false';",
|
|
196
197
|
"excludeHiddenRuns?: 'true' | 'false';",
|
|
197
198
|
'limit?: number;',
|
|
@@ -205,7 +206,7 @@ const EMBEDDED_METHODS = [
|
|
|
205
206
|
"status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED';",
|
|
206
207
|
],
|
|
207
208
|
response: "{ data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED'; startedAt: string; agents?: { id: string; agentVersionId?: string; endpoint?: object; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; externalId?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
|
|
208
|
-
markdown: "## list\n\n`client.call.list(after?: string, countedInResults?: 'true' | 'false', excludeHiddenRuns?: 'true' | 'false', limit?: number, properties?: object, searchText?: string, simulationRunPlanIds?: string, simulationRunPlanJobId?: string, simulationRunPlanJobIds?: string, sortBy?: 'createdAt' | 'startedAt' | 'endedAt' | 'duration' | 'title' | 'status', sortDirection?: 'asc' | 'desc', status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'): { data: object[]; pagination: object; }`\n\n**get** `/v1/call`\n\nReturns a paginated list of calls for the authenticated project.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - use the nextCursor value from a previous response\n\n- `countedInResults?: 'true' | 'false'`\n true: only simulated calls their run's results count (not invalidated, for example because the agent never spoke). false: only the simulated calls the results leave out, each invalidated. Live calls, and calls removed from their run, match neither.\n\n- `excludeHiddenRuns?: 'true' | 'false'`\n true: leave out calls from runs hidden from the runs list. Live calls stay in. false is the same as leaving it out.\n\n- `limit?: number`\n Maximum number of calls to return (default: 20, max: 100)\n\n- `properties?: object`\n Filter on
|
|
209
|
+
markdown: "## list\n\n`client.call.list(after?: string, agentId?: string, countedInResults?: 'true' | 'false', excludeHiddenRuns?: 'true' | 'false', limit?: number, properties?: object, searchText?: string, simulationRunPlanIds?: string, simulationRunPlanJobId?: string, simulationRunPlanJobIds?: string, sortBy?: 'createdAt' | 'startedAt' | 'endedAt' | 'duration' | 'title' | 'status', sortDirection?: 'asc' | 'desc', status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'): { data: object[]; pagination: object; }`\n\n**get** `/v1/call`\n\nReturns a paginated list of calls for the authenticated project. Pass agentId to keep calls for specific agents, or properties[agent_name][eq] when you only have the agent name. sortBy and sortDirection apply together with those filters.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - use the nextCursor value from a previous response\n\n- `agentId?: string`\n Calls that include any of these agents. One id, or several separated by commas, at most 100. A call with more than one agent matches when any of them is listed. An id that is not an agent on a call in this project matches nothing. Combines with the other filters, including sortBy and sortDirection.\n\n- `countedInResults?: 'true' | 'false'`\n true: only simulated calls their run's results count (not invalidated, for example because the agent never spoke). false: only the simulated calls the results leave out, each invalidated. Live calls, and calls removed from their run, match neither.\n\n- `excludeHiddenRuns?: 'true' | 'false'`\n true: leave out calls from runs hidden from the runs list. Live calls stay in. false is the same as leaving it out.\n\n- `limit?: number`\n Maximum number of calls to return (default: 20, max: 100)\n\n- `properties?: object`\n Filter on properties, one entry per property name. properties[<name>][exists]=true keeps calls that have the property set (whatever the value), properties[<name>][exists]=false keeps calls missing it (never sent, sent as null, or removed). properties[<name>][eq]=<value> keeps calls whose value equals it, ignoring case. agent_name and agent_id are built in and read the agents linked to the call, not a stored snapshot: agent_name matches an agent name, agent_id matches an agent id (a UUID). A call with several agents matches when any of them does. A custom property the project has never stored matches no calls under eq. Names match the way properties are stored, so planTier and plan_tier are one property, and agentName is agent_name. At most 20 properties. A name taken by a built-in call filter, such as status, is rejected with 400. One operator per property.\n\n- `searchText?: string`\n Search text to filter calls by title, summary, or transcript\n\n- `simulationRunPlanIds?: string`\n Calls from every run of any of these run plans, comma-separated, at most 100\n\n- `simulationRunPlanJobId?: string`\n Filter by simulation run plan job ID to get all calls from a specific simulation batch\n\n- `simulationRunPlanJobIds?: string`\n Calls from any of these simulation runs (run plan job ids), comma-separated, at most 100\n\n- `sortBy?: 'createdAt' | 'startedAt' | 'endedAt' | 'duration' | 'title' | 'status'`\n Field to sort by (default: createdAt)\n\n- `sortDirection?: 'asc' | 'desc'`\n Sort direction (default: desc)\n\n- `status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'`\n Filter by call status\n\n### Returns\n\n- `{ data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED'; startedAt: string; agents?: { id: string; agentVersionId?: string; endpoint?: object; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; externalId?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n\n - `data: { id: string; callDirection: 'INBOUND' | 'OUTBOUND'; projectId: string; recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED'; startedAt: string; agents?: { id: string; agentVersionId?: string; endpoint?: { id: string; environment: string; phoneNumberE164?: string; }; }[]; createdAt?: string; customers?: { label?: string; phoneNumberE164?: string; }[]; durationMs?: number; endedAt?: string; endedStatus?: string; externalId?: string; policyIds?: string[]; properties?: object; recordingUrl?: string; simulationJobId?: string; status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED'; summary?: string; supersededByCallId?: string; title?: string; updatedAt?: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst calls = await client.call.list();\n\nconsole.log(calls);\n```",
|
|
209
210
|
perLanguage: {
|
|
210
211
|
typescript: {
|
|
211
212
|
method: 'client.call.list',
|
|
@@ -845,6 +846,234 @@ const EMBEDDED_METHODS = [
|
|
|
845
846
|
},
|
|
846
847
|
},
|
|
847
848
|
},
|
|
849
|
+
{
|
|
850
|
+
name: 'list',
|
|
851
|
+
endpoint: '/v1/live-report',
|
|
852
|
+
httpMethod: 'get',
|
|
853
|
+
summary: 'List live reports',
|
|
854
|
+
description: "Lists the project's saved live call reports, newest first.",
|
|
855
|
+
stainlessPath: '(resource) liveReport > (method) list',
|
|
856
|
+
qualified: 'client.liveReport.list',
|
|
857
|
+
params: ['limit?: number;', 'offset?: number;'],
|
|
858
|
+
response: "{ data: { items: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: object; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: object[]; timezone: string; updatedAt: string; }[]; totalCount: number; }; }",
|
|
859
|
+
markdown: "## list\n\n`client.liveReport.list(limit?: number, offset?: number): { data: object; }`\n\n**get** `/v1/live-report`\n\nLists the project's saved live call reports, newest first.\n\n### Parameters\n\n- `limit?: number`\n Page size, at most 100.\n\n- `offset?: number`\n\n### Returns\n\n- `{ data: { items: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: object; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: object[]; timezone: string; updatedAt: string; }[]; totalCount: number; }; }`\n\n - `data: { items: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: object; slack: object[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }[]; totalCount: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst liveReports = await client.liveReport.list();\n\nconsole.log(liveReports);\n```",
|
|
860
|
+
perLanguage: {
|
|
861
|
+
typescript: {
|
|
862
|
+
method: 'client.liveReport.list',
|
|
863
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst liveReports = await client.liveReport.list();\n\nconsole.log(liveReports.data);",
|
|
864
|
+
},
|
|
865
|
+
python: {
|
|
866
|
+
method: 'live_report.list',
|
|
867
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nlive_reports = client.live_report.list()\nprint(live_reports.data)',
|
|
868
|
+
},
|
|
869
|
+
http: {
|
|
870
|
+
example: 'curl https://api.roark.ai/v1/live-report \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
871
|
+
},
|
|
872
|
+
},
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
name: 'create',
|
|
876
|
+
endpoint: '/v1/live-report',
|
|
877
|
+
httpMethod: 'post',
|
|
878
|
+
summary: 'Create a live report',
|
|
879
|
+
description: "Saves a report on the project's live calls. Simulations are never included.\n\nTargets are analytics measures held to a bar: a threshold metric is read as its pass rate (`value` is a\npercentage, 0-100, held AT_LEAST by default); a numeric metric as its average (held AT_MOST by default).\nEvery target is read for the period and the period before it, so the report says whether each was met\nand how it moved.\n\nScheduled reports are written `deliveryHour` hours into the day after each period ends in `timezone`\n(a week runs Monday to Sunday), then emailed and posted per `notifications`. With `generateNow` (the\ndefault) the report for the latest closed period is written right away and not sent.",
|
|
880
|
+
stainlessPath: '(resource) liveReport > (method) create',
|
|
881
|
+
qualified: 'client.liveReport.create',
|
|
882
|
+
params: [
|
|
883
|
+
'name: string;',
|
|
884
|
+
'agentId?: string;',
|
|
885
|
+
"cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY';",
|
|
886
|
+
'dashboardId?: string;',
|
|
887
|
+
'deliveryHour?: number;',
|
|
888
|
+
'description?: string;',
|
|
889
|
+
"filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[];",
|
|
890
|
+
'generateNow?: boolean;',
|
|
891
|
+
'includeTranscriptExcerpts?: boolean;',
|
|
892
|
+
'notifications?: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; };',
|
|
893
|
+
"status?: 'ACTIVE' | 'PAUSED';",
|
|
894
|
+
"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; }[];",
|
|
895
|
+
'timezone?: string;',
|
|
896
|
+
],
|
|
897
|
+
response: "{ data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: object; slack: object[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }; }",
|
|
898
|
+
markdown: "## create\n\n`client.liveReport.create(name: string, agentId?: string, cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY', dashboardId?: string, deliveryHour?: number, description?: string, filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[], generateNow?: boolean, includeTranscriptExcerpts?: boolean, notifications?: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; }, status?: 'ACTIVE' | 'PAUSED', targets?: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[], timezone?: string): { data: object; }`\n\n**post** `/v1/live-report`\n\nSaves a report on the project's live calls. Simulations are never included.\n\nTargets are analytics measures held to a bar: a threshold metric is read as its pass rate (`value` is a\npercentage, 0-100, held AT_LEAST by default); a numeric metric as its average (held AT_MOST by default).\nEvery target is read for the period and the period before it, so the report says whether each was met\nand how it moved.\n\nScheduled reports are written `deliveryHour` hours into the day after each period ends in `timezone`\n(a week runs Monday to Sunday), then emailed and posted per `notifications`. With `generateNow` (the\ndefault) the report for the latest closed period is written right away and not sent.\n\n### Parameters\n\n- `name: string`\n\n- `agentId?: string`\n\n- `cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY'`\n\n- `dashboardId?: string`\n\n- `deliveryHour?: number`\n\n- `description?: string`\n\n- `filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]`\n\n- `generateNow?: boolean`\n Write the report for the latest closed period right away. Default true.\n\n- `includeTranscriptExcerpts?: boolean`\n\n- `notifications?: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; }`\n\n- `status?: 'ACTIVE' | 'PAUSED'`\n\n- `targets?: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]`\n\n- `timezone?: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: object; slack: object[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }; }`\n\n - `data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; notificationConfigId: string; }[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst liveReport = await client.liveReport.create({ name: 'x' });\n\nconsole.log(liveReport);\n```",
|
|
899
|
+
perLanguage: {
|
|
900
|
+
typescript: {
|
|
901
|
+
method: 'client.liveReport.create',
|
|
902
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst liveReport = await client.liveReport.create({ name: 'x' });\n\nconsole.log(liveReport.data);",
|
|
903
|
+
},
|
|
904
|
+
python: {
|
|
905
|
+
method: 'live_report.create',
|
|
906
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nlive_report = client.live_report.create(\n name="x",\n)\nprint(live_report.data)',
|
|
907
|
+
},
|
|
908
|
+
http: {
|
|
909
|
+
example: 'curl https://api.roark.ai/v1/live-report \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "name": "x"\n }\'',
|
|
910
|
+
},
|
|
911
|
+
},
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
name: 'getById',
|
|
915
|
+
endpoint: '/v1/live-report/{reportId}',
|
|
916
|
+
httpMethod: 'get',
|
|
917
|
+
summary: 'Get a live report',
|
|
918
|
+
description: 'Get a live report',
|
|
919
|
+
stainlessPath: '(resource) liveReport > (method) getById',
|
|
920
|
+
qualified: 'client.liveReport.getByID',
|
|
921
|
+
params: ['reportId: string;'],
|
|
922
|
+
response: "{ data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: object; slack: object[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }; }",
|
|
923
|
+
markdown: "## getById\n\n`client.liveReport.getByID(reportId: string): { data: object; }`\n\n**get** `/v1/live-report/{reportId}`\n\nGet a live report\n\n### Parameters\n\n- `reportId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: object; slack: object[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }; }`\n\n - `data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; notificationConfigId: string; }[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.liveReport.getByID('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(response);\n```",
|
|
924
|
+
perLanguage: {
|
|
925
|
+
typescript: {
|
|
926
|
+
method: 'client.liveReport.getByID',
|
|
927
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.liveReport.getByID('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(response.data);",
|
|
928
|
+
},
|
|
929
|
+
python: {
|
|
930
|
+
method: 'live_report.get_by_id',
|
|
931
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.live_report.get_by_id(\n "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",\n)\nprint(response.data)',
|
|
932
|
+
},
|
|
933
|
+
http: {
|
|
934
|
+
example: 'curl https://api.roark.ai/v1/live-report/$REPORT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
935
|
+
},
|
|
936
|
+
},
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
name: 'update',
|
|
940
|
+
endpoint: '/v1/live-report/{reportId}',
|
|
941
|
+
httpMethod: 'patch',
|
|
942
|
+
summary: 'Update a live report',
|
|
943
|
+
description: 'Changes the fields sent. Set `status` to PAUSED to stop scheduled reports.',
|
|
944
|
+
stainlessPath: '(resource) liveReport > (method) update',
|
|
945
|
+
qualified: 'client.liveReport.update',
|
|
946
|
+
params: [
|
|
947
|
+
'reportId: string;',
|
|
948
|
+
'agentId?: string;',
|
|
949
|
+
"cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY';",
|
|
950
|
+
'dashboardId?: string;',
|
|
951
|
+
'deliveryHour?: number;',
|
|
952
|
+
'description?: string;',
|
|
953
|
+
"filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[];",
|
|
954
|
+
'includeTranscriptExcerpts?: boolean;',
|
|
955
|
+
'name?: string;',
|
|
956
|
+
'notifications?: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; };',
|
|
957
|
+
"status?: 'ACTIVE' | 'PAUSED';",
|
|
958
|
+
"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; }[];",
|
|
959
|
+
'timezone?: string;',
|
|
960
|
+
],
|
|
961
|
+
response: "{ data: { id: string; agentId: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; configKey: string; configManaged: boolean; createdAt: string; dashboardId: string; deliveryHour: number; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; nextDeliveryAt: string; notifications: { email: object; slack: object[]; fromConfig?: boolean; }; projectId: string; status: 'ACTIVE' | 'PAUSED'; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; timezone: string; updatedAt: string; }; }",
|
|
962
|
+
markdown: "## 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```",
|
|
963
|
+
perLanguage: {
|
|
964
|
+
typescript: {
|
|
965
|
+
method: 'client.liveReport.update',
|
|
966
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst liveReport = await client.liveReport.update('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(liveReport.data);",
|
|
967
|
+
},
|
|
968
|
+
python: {
|
|
969
|
+
method: 'live_report.update',
|
|
970
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nlive_report = client.live_report.update(\n report_id="5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",\n)\nprint(live_report.data)',
|
|
971
|
+
},
|
|
972
|
+
http: {
|
|
973
|
+
example: 'curl https://api.roark.ai/v1/live-report/$REPORT_ID \\\n -X PATCH \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
974
|
+
},
|
|
975
|
+
},
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
name: 'delete',
|
|
979
|
+
endpoint: '/v1/live-report/{reportId}',
|
|
980
|
+
httpMethod: 'delete',
|
|
981
|
+
summary: 'Delete a live report',
|
|
982
|
+
description: 'Deletes the report and stops its scheduled reports.',
|
|
983
|
+
stainlessPath: '(resource) liveReport > (method) delete',
|
|
984
|
+
qualified: 'client.liveReport.delete',
|
|
985
|
+
params: ['reportId: string;'],
|
|
986
|
+
response: '{ data: { id: string; deleted: true; }; }',
|
|
987
|
+
markdown: "## delete\n\n`client.liveReport.delete(reportId: string): { data: object; }`\n\n**delete** `/v1/live-report/{reportId}`\n\nDeletes the report and stops its scheduled reports.\n\n### Parameters\n\n- `reportId: string`\n\n### Returns\n\n- `{ data: { id: string; deleted: true; }; }`\n\n - `data: { id: string; deleted: true; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst liveReport = await client.liveReport.delete('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(liveReport);\n```",
|
|
988
|
+
perLanguage: {
|
|
989
|
+
typescript: {
|
|
990
|
+
method: 'client.liveReport.delete',
|
|
991
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst liveReport = await client.liveReport.delete('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(liveReport.data);",
|
|
992
|
+
},
|
|
993
|
+
python: {
|
|
994
|
+
method: 'live_report.delete',
|
|
995
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nlive_report = client.live_report.delete(\n "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",\n)\nprint(live_report.data)',
|
|
996
|
+
},
|
|
997
|
+
http: {
|
|
998
|
+
example: 'curl https://api.roark.ai/v1/live-report/$REPORT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
999
|
+
},
|
|
1000
|
+
},
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
name: 'run',
|
|
1004
|
+
endpoint: '/v1/live-report/{reportId}/generate',
|
|
1005
|
+
httpMethod: 'post',
|
|
1006
|
+
summary: 'Generate a live report document',
|
|
1007
|
+
description: 'Writes the report now, for its latest closed period or a custom window (`periodStart` + `periodEnd`,\nat most 92 days, ended). Returns 202 with the document in PENDING; poll\nGET /v1/live-report/{reportId}/document/{documentId} until `status` is READY or FAILED (typically a few\nminutes). An identical request already in flight is returned as-is. A generated document is not emailed.',
|
|
1008
|
+
stainlessPath: '(resource) liveReport > (method) run',
|
|
1009
|
+
qualified: 'client.liveReport.run',
|
|
1010
|
+
params: ['reportId: string;', 'periodEnd?: string;', 'periodStart?: string;'],
|
|
1011
|
+
response: "{ data: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; targets: object[]; }; document: { agents: object[]; appendix: object; charts: object[]; checks: object[]; evidence: object; executiveSummary: object; generatedAtIso: string; headline: object; liveReportId: string; model: string; recommendations: object[]; targets: object[]; themes: object[]; version: 1; volume: object; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }; }",
|
|
1012
|
+
markdown: "## run\n\n`client.liveReport.run(reportId: string, periodEnd?: string, periodStart?: string): { data: object; }`\n\n**post** `/v1/live-report/{reportId}/generate`\n\nWrites the report now, for its latest closed period or a custom window (`periodStart` + `periodEnd`,\nat most 92 days, ended). Returns 202 with the document in PENDING; poll\nGET /v1/live-report/{reportId}/document/{documentId} until `status` is READY or FAILED (typically a few\nminutes). An identical request already in flight is returned as-is. A generated document is not emailed.\n\n### Parameters\n\n- `reportId: string`\n\n- `periodEnd?: string`\n ISO 8601 end (exclusive) of a custom window. Requires periodStart.\n\n- `periodStart?: string`\n ISO 8601 start of a custom window. Omit both for the latest closed period.\n\n### Returns\n\n- `{ data: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; targets: object[]; }; document: { agents: object[]; appendix: object; charts: object[]; checks: object[]; evidence: object; executiveSummary: object; generatedAtIso: string; headline: object; liveReportId: string; model: string; recommendations: object[]; targets: object[]; themes: object[]; version: 1; volume: object; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }; }`\n\n - `data: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; }; document: { agents: { agentId: string; agentName: string; conversationCount: number; sharePct: number; targets: object[]; }[]; appendix: { methodology: string; notes: string[]; }; charts: { blocked: boolean; description: string; display: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; error: string; interval: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; name: string; omittedSeries: number; series: object[]; }[]; checks: { checkName: string; comparable: boolean; deltaPts: number; evaluatedCount: number; failedCount: number; isTarget: boolean; metricDefinitionId: string; metricSlug: string; passRatePct: number; previousPassRatePct: number; }[]; evidence: { failingConversationCount: number; failingCountIsLowerBound: boolean; readConversationCount: number; sampled: boolean; }; executiveSummary: { keyFindings: object[]; paragraphs: string[]; sections?: object[]; }; generatedAtIso: string; headline: { agentName: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; periodEndIso: string; periodLabel: string; periodStartIso: string; reportName: string; statTiles: object[]; timezone: string; verdict: 'ON_TARGET' | 'OFF_TARGET' | 'NO_TARGETS' | 'NO_DATA'; verdictProse: string; }; liveReportId: string; model: string; recommendations: { afterText: string; beforeText: string; body: string; channel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL'; order: number; promptOptimizationFindingId: string; severity: 'HIGH' | 'MEDIUM' | 'LOW'; source: 'PROMPT_OPTIMIZER' | 'DEBRIEF'; themeSlugs: string[]; title: string; }[]; targets: { actual: number; actualLabel: string; aggregation: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator: 'AT_LEAST' | 'AT_MOST'; deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL'; deltaLabel: string; error: string; failingConversationCount: number; key: string; label: string; lifecycle: 'NEW_MISS' | 'STILL_MISSED' | 'RECOVERED' | 'HOLDING'; metricDefinitionId: string; metricName: string; metricSlug: string; percentile: number; previous: number; previousLabel: string; sampleSize: number; series: object[]; status: 'MET' | 'MISSED' | 'NO_DATA'; targetLabel: string; targetValue: number; unit: 'PERCENT' | 'VALUE'; }[]; themes: { affectedConversationCount: number; analysis: string; checkNames: string[]; collectorQuote: object; estimatedAffectedConversationCount: number; excerpts: object[]; flaggedForImpact: boolean; impact: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW'; impactReason: string; issue: object; lifecycle: 'NEW' | 'PERSISTENT' | 'IMPROVING' | 'FIXED'; memberConversationIds: string[]; metricDefinitionIds: string[]; prevalence: 'WIDESPREAD' | 'RECURRING' | 'ISOLATED'; rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL'; severity: 'HIGH' | 'MEDIUM' | 'LOW'; slug: string; title: string; totalConversationCount: number; memberCalls?: object[]; }[]; version: 1; volume: { conversationCount: number; deltaPct: number; endings: object[]; previousConversationCount: number; series: object[]; }; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.liveReport.run('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(response);\n```",
|
|
1013
|
+
perLanguage: {
|
|
1014
|
+
typescript: {
|
|
1015
|
+
method: 'client.liveReport.run',
|
|
1016
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.liveReport.run('5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f');\n\nconsole.log(response.data);",
|
|
1017
|
+
},
|
|
1018
|
+
python: {
|
|
1019
|
+
method: 'live_report.run',
|
|
1020
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.live_report.run(\n report_id="5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",\n)\nprint(response.data)',
|
|
1021
|
+
},
|
|
1022
|
+
http: {
|
|
1023
|
+
example: 'curl https://api.roark.ai/v1/live-report/$REPORT_ID/generate \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1024
|
+
},
|
|
1025
|
+
},
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
name: 'listDocuments',
|
|
1029
|
+
endpoint: '/v1/live-report/{reportId}/document',
|
|
1030
|
+
httpMethod: 'get',
|
|
1031
|
+
summary: 'List report documents',
|
|
1032
|
+
description: "Lists a report's documents, newest period first.",
|
|
1033
|
+
stainlessPath: '(resource) liveReport > (method) listDocuments',
|
|
1034
|
+
qualified: 'client.liveReport.listDocuments',
|
|
1035
|
+
params: ['reportId: string;', 'limit?: number;', 'offset?: number;'],
|
|
1036
|
+
response: "{ data: { items: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: object; document: object; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }[]; totalCount: number; }; }",
|
|
1037
|
+
markdown: "## listDocuments\n\n`client.liveReport.listDocuments(reportId: string, limit?: number, offset?: number): { data: object; }`\n\n**get** `/v1/live-report/{reportId}/document`\n\nLists a report's documents, newest period first.\n\n### Parameters\n\n- `reportId: string`\n\n- `limit?: number`\n Page size, at most 100.\n\n- `offset?: number`\n\n### Returns\n\n- `{ data: { items: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: object; document: object; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }[]; totalCount: number; }; }`\n\n - `data: { items: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; targets: object[]; }; document: { agents: object[]; appendix: object; charts: object[]; checks: object[]; evidence: object; executiveSummary: object; generatedAtIso: string; headline: object; liveReportId: string; model: string; recommendations: object[]; targets: object[]; themes: object[]; version: 1; volume: object; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }[]; totalCount: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.liveReport.listDocuments('reportId');\n\nconsole.log(response);\n```",
|
|
1038
|
+
perLanguage: {
|
|
1039
|
+
typescript: {
|
|
1040
|
+
method: 'client.liveReport.listDocuments',
|
|
1041
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.liveReport.listDocuments('reportId');\n\nconsole.log(response.data);",
|
|
1042
|
+
},
|
|
1043
|
+
python: {
|
|
1044
|
+
method: 'live_report.list_documents',
|
|
1045
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.live_report.list_documents(\n report_id="reportId",\n)\nprint(response.data)',
|
|
1046
|
+
},
|
|
1047
|
+
http: {
|
|
1048
|
+
example: 'curl https://api.roark.ai/v1/live-report/$REPORT_ID/document \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1049
|
+
},
|
|
1050
|
+
},
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
name: 'getDocument',
|
|
1054
|
+
endpoint: '/v1/live-report/{reportId}/document/{documentId}',
|
|
1055
|
+
httpMethod: 'get',
|
|
1056
|
+
summary: 'Get a report document',
|
|
1057
|
+
description: 'Returns one written report. `document` is null until `status` is READY. Theme excerpts and grader quotes (call transcript text) are included only for keys with transcript:read.',
|
|
1058
|
+
stainlessPath: '(resource) liveReport > (method) getDocument',
|
|
1059
|
+
qualified: 'client.liveReport.getDocument',
|
|
1060
|
+
params: ['reportId: string;', 'documentId: string;'],
|
|
1061
|
+
response: "{ data: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; targets: object[]; }; document: { agents: object[]; appendix: object; charts: object[]; checks: object[]; evidence: object; executiveSummary: object; generatedAtIso: string; headline: object; liveReportId: string; model: string; recommendations: object[]; targets: object[]; themes: object[]; version: 1; volume: object; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }; }",
|
|
1062
|
+
markdown: "## getDocument\n\n`client.liveReport.getDocument(reportId: string, documentId: string): { data: object; }`\n\n**get** `/v1/live-report/{reportId}/document/{documentId}`\n\nReturns one written report. `document` is null until `status` is READY. Theme excerpts and grader quotes (call transcript text) are included only for keys with transcript:read.\n\n### Parameters\n\n- `reportId: string`\n\n- `documentId: string`\n\n### Returns\n\n- `{ data: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: object[]; includeTranscriptExcerpts: boolean; name: string; targets: object[]; }; document: { agents: object[]; appendix: object; charts: object[]; checks: object[]; evidence: object; executiveSummary: object; generatedAtIso: string; headline: object; liveReportId: string; model: string; recommendations: object[]; targets: object[]; themes: object[]; version: 1; volume: object; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }; }`\n\n - `data: { id: string; announcedAt: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; completedAt: string; createdAt: string; definition: { agentId: string; agentName: string; dashboardId: string; description: string; filters: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; includeTranscriptExcerpts: boolean; name: string; targets: { metric: string; value: number; aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator?: 'AT_LEAST' | 'AT_MOST'; label?: string; passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO'; passValue?: string | number | boolean; percentile?: number; }[]; }; document: { agents: { agentId: string; agentName: string; conversationCount: number; sharePct: number; targets: object[]; }[]; appendix: { methodology: string; notes: string[]; }; charts: { blocked: boolean; description: string; display: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; error: string; interval: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; name: string; omittedSeries: number; series: object[]; }[]; checks: { checkName: string; comparable: boolean; deltaPts: number; evaluatedCount: number; failedCount: number; isTarget: boolean; metricDefinitionId: string; metricSlug: string; passRatePct: number; previousPassRatePct: number; }[]; evidence: { failingConversationCount: number; failingCountIsLowerBound: boolean; readConversationCount: number; sampled: boolean; }; executiveSummary: { keyFindings: object[]; paragraphs: string[]; sections?: object[]; }; generatedAtIso: string; headline: { agentName: string; cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY'; periodEndIso: string; periodLabel: string; periodStartIso: string; reportName: string; statTiles: object[]; timezone: string; verdict: 'ON_TARGET' | 'OFF_TARGET' | 'NO_TARGETS' | 'NO_DATA'; verdictProse: string; }; liveReportId: string; model: string; recommendations: { afterText: string; beforeText: string; body: string; channel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL'; order: number; promptOptimizationFindingId: string; severity: 'HIGH' | 'MEDIUM' | 'LOW'; source: 'PROMPT_OPTIMIZER' | 'DEBRIEF'; themeSlugs: string[]; title: string; }[]; targets: { actual: number; actualLabel: string; aggregation: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX'; comparator: 'AT_LEAST' | 'AT_MOST'; deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL'; deltaLabel: string; error: string; failingConversationCount: number; key: string; label: string; lifecycle: 'NEW_MISS' | 'STILL_MISSED' | 'RECOVERED' | 'HOLDING'; metricDefinitionId: string; metricName: string; metricSlug: string; percentile: number; previous: number; previousLabel: string; sampleSize: number; series: object[]; status: 'MET' | 'MISSED' | 'NO_DATA'; targetLabel: string; targetValue: number; unit: 'PERCENT' | 'VALUE'; }[]; themes: { affectedConversationCount: number; analysis: string; checkNames: string[]; collectorQuote: object; estimatedAffectedConversationCount: number; excerpts: object[]; flaggedForImpact: boolean; impact: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW'; impactReason: string; issue: object; lifecycle: 'NEW' | 'PERSISTENT' | 'IMPROVING' | 'FIXED'; memberConversationIds: string[]; metricDefinitionIds: string[]; prevalence: 'WIDESPREAD' | 'RECURRING' | 'ISOLATED'; rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL'; severity: 'HIGH' | 'MEDIUM' | 'LOW'; slug: string; title: string; totalConversationCount: number; memberCalls?: object[]; }[]; version: 1; volume: { conversationCount: number; deltaPct: number; endings: object[]; previousConversationCount: number; series: object[]; }; }; errorMessage: string; liveReportId: string; periodEnd: string; periodStart: string; projectId: string; status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED'; timezone: string; trigger: 'SCHEDULED' | 'MANUAL'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.liveReport.getDocument('9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b', {\n reportId: '5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f',\n});\n\nconsole.log(response);\n```",
|
|
1063
|
+
perLanguage: {
|
|
1064
|
+
typescript: {
|
|
1065
|
+
method: 'client.liveReport.getDocument',
|
|
1066
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.liveReport.getDocument('9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b', {\n reportId: '5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f',\n});\n\nconsole.log(response.data);",
|
|
1067
|
+
},
|
|
1068
|
+
python: {
|
|
1069
|
+
method: 'live_report.get_document',
|
|
1070
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.live_report.get_document(\n "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",\n report_id="5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",\n)\nprint(response.data)',
|
|
1071
|
+
},
|
|
1072
|
+
http: {
|
|
1073
|
+
example: 'curl https://api.roark.ai/v1/live-report/$REPORT_ID/document/$DOCUMENT_ID \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1074
|
+
},
|
|
1075
|
+
},
|
|
1076
|
+
},
|
|
848
1077
|
{
|
|
849
1078
|
name: 'listDefinitions',
|
|
850
1079
|
endpoint: '/v1/metric/definitions',
|
|
@@ -3303,11 +3532,13 @@ const EMBEDDED_METHODS = [
|
|
|
3303
3532
|
params: [
|
|
3304
3533
|
'jobDescription: string;',
|
|
3305
3534
|
'name: string;',
|
|
3306
|
-
"
|
|
3535
|
+
"llm?: { model: string; provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; };",
|
|
3536
|
+
"stt?: { model: string; provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; };",
|
|
3537
|
+
"tts?: { provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; voiceId: string; model?: string; };",
|
|
3307
3538
|
'voice?: string;',
|
|
3308
3539
|
],
|
|
3309
3540
|
response: '{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }',
|
|
3310
|
-
markdown: "## build\n\n`client.agent.build(jobDescription: string, name: string, tts?: { provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; voiceId: string; }, voice?: string): { data: object; }`\n\n**post** `/v1/agent/build`\n\nCreates a new Roark-hosted agent from a one-line job description. Roark authors the system prompt and hosts the config, so the agent is live and self-improvable from creation.\n\n### Parameters\n\n- `jobDescription: string`\n One-line description of what the agent should do. Roark authors the system prompt from this.\n\n- `name: string`\n Name of the agent\n\n- `tts?: { provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; voiceId: string; }`\n Optional provider voice the hosted agent speaks with\n\n- `voice?: string`\n Optional display name of the agent's voice. The authored prompt matches its delivery to it.\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }`\n\n - `data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agent.build({ jobDescription: 'x', name: 'x' });\n\nconsole.log(response);\n```",
|
|
3541
|
+
markdown: "## build\n\n`client.agent.build(jobDescription: string, name: string, llm?: { model: string; provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; }, stt?: { model: string; provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; }, tts?: { provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; voiceId: string; model?: string; }, voice?: string): { data: object; }`\n\n**post** `/v1/agent/build`\n\nCreates a new Roark-hosted agent from a one-line job description. Roark authors the system prompt and hosts the config, so the agent is live and self-improvable from creation.\n\n### Parameters\n\n- `jobDescription: string`\n One-line description of what the agent should do. Roark authors the system prompt from this.\n\n- `name: string`\n Name of the agent\n\n- `llm?: { model: string; provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS'; }`\n Optional text model the hosted agent thinks with. Roark's default when omitted\n\n- `stt?: { model: string; provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS'; }`\n Optional transcriber the hosted agent hears with. Roark's default when omitted\n\n- `tts?: { provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME'; voiceId: string; model?: string; }`\n Optional provider voice the hosted agent speaks with\n\n- `voice?: string`\n Optional display name of the agent's voice. The authored prompt matches its delivery to it.\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }`\n\n - `data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agent.build({ jobDescription: 'x', name: 'x' });\n\nconsole.log(response);\n```",
|
|
3311
3542
|
perLanguage: {
|
|
3312
3543
|
typescript: {
|
|
3313
3544
|
method: 'client.agent.build',
|
|
@@ -3706,8 +3937,8 @@ const EMBEDDED_METHODS = [
|
|
|
3706
3937
|
stainlessPath: '(resource) agentVersion > (method) list',
|
|
3707
3938
|
qualified: 'client.agentVersion.list',
|
|
3708
3939
|
params: ['agentId: string;', 'after?: string;', 'limit?: number;'],
|
|
3709
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3710
|
-
markdown: "## list\n\n`client.agentVersion.list(agentId: string, after?: string, limit?: number): { data: object[]; pagination: object; }`\n\n**get** `/v1/agent/{agentId}/versions`\n\nThe open draft first, if there is one, then published versions newest first. Paginated: pass `pagination.nextCursor` as `after` for the next page.\n\n### Parameters\n\n- `agentId: string`\n\n- `after?: string`\n\n- `limit?: number`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3940
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
|
|
3941
|
+
markdown: "## list\n\n`client.agentVersion.list(agentId: string, after?: string, limit?: number): { data: object[]; pagination: object; }`\n\n**get** `/v1/agent/{agentId}/versions`\n\nThe open draft first, if there is one, then published versions newest first. Paginated: pass `pagination.nextCursor` as `after` for the next page.\n\n### Parameters\n\n- `agentId: string`\n\n- `after?: string`\n\n- `limit?: number`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentVersions = await client.agentVersion.list('agentId');\n\nconsole.log(agentVersions);\n```",
|
|
3711
3942
|
perLanguage: {
|
|
3712
3943
|
typescript: {
|
|
3713
3944
|
method: 'client.agentVersion.list',
|
|
@@ -3731,8 +3962,8 @@ const EMBEDDED_METHODS = [
|
|
|
3731
3962
|
stainlessPath: '(resource) agentVersion > (method) getById',
|
|
3732
3963
|
qualified: 'client.agentVersion.getByID',
|
|
3733
3964
|
params: ['agentId: string;', 'versionId: string;'],
|
|
3734
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3735
|
-
markdown: "## getById\n\n`client.agentVersion.getByID(agentId: string, versionId: string): { data: object; }`\n\n**get** `/v1/agent/{agentId}/versions/{versionId}`\n\nOne version with every setting, plus the issues that stop it from running, if any.\n\n### Parameters\n\n- `agentId: string`\n\n- `versionId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3965
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
3966
|
+
markdown: "## getById\n\n`client.agentVersion.getByID(agentId: string, versionId: string): { data: object; }`\n\n**get** `/v1/agent/{agentId}/versions/{versionId}`\n\nOne version with every setting, plus the issues that stop it from running, if any.\n\n### Parameters\n\n- `agentId: string`\n\n- `versionId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agentVersion.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response);\n```",
|
|
3736
3967
|
perLanguage: {
|
|
3737
3968
|
typescript: {
|
|
3738
3969
|
method: 'client.agentVersion.getByID',
|
|
@@ -3748,32 +3979,32 @@ const EMBEDDED_METHODS = [
|
|
|
3748
3979
|
},
|
|
3749
3980
|
},
|
|
3750
3981
|
{
|
|
3751
|
-
name: '
|
|
3752
|
-
endpoint: '/v1/agent/{agentId}/versions/{versionId}/
|
|
3982
|
+
name: 'rollback',
|
|
3983
|
+
endpoint: '/v1/agent/{agentId}/versions/{versionId}/rollback',
|
|
3753
3984
|
httpMethod: 'post',
|
|
3754
|
-
summary: '
|
|
3755
|
-
description: "
|
|
3756
|
-
stainlessPath: '(resource) agentVersion > (method)
|
|
3757
|
-
qualified: 'client.agentVersion.
|
|
3985
|
+
summary: 'Roll an agent back to a version',
|
|
3986
|
+
description: "Publishes a new version, numbered after the latest, with this version's settings and makes it live. History stays append-only. An open draft started before this is kept but can no longer be published (409 `agent_draft_base_changed`); discard it or start a new one. Pass `expectedLiveVersionId` to be refused (409 `agent_live_version_changed`) if another version went live since you read it.",
|
|
3987
|
+
stainlessPath: '(resource) agentVersion > (method) rollback',
|
|
3988
|
+
qualified: 'client.agentVersion.rollback',
|
|
3758
3989
|
params: [
|
|
3759
3990
|
'agentId: string;',
|
|
3760
3991
|
'versionId: string;',
|
|
3761
3992
|
'expectedLiveVersionId?: string;',
|
|
3762
3993
|
'summary?: string;',
|
|
3763
3994
|
],
|
|
3764
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3765
|
-
markdown: "##
|
|
3995
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
3996
|
+
markdown: "## rollback\n\n`client.agentVersion.rollback(agentId: string, versionId: string, expectedLiveVersionId?: string, summary?: string): { data: object; }`\n\n**post** `/v1/agent/{agentId}/versions/{versionId}/rollback`\n\nPublishes a new version, numbered after the latest, with this version's settings and makes it live. History stays append-only. An open draft started before this is kept but can no longer be published (409 `agent_draft_base_changed`); discard it or start a new one. Pass `expectedLiveVersionId` to be refused (409 `agent_live_version_changed`) if another version went live since you read it.\n\n### Parameters\n\n- `agentId: string`\n\n- `versionId: string`\n\n- `expectedLiveVersionId?: string`\n The live version when you decided to roll back. When sent, the rollback is refused with 409 if another version went live since.\n\n- `summary?: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agentVersion.rollback('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response);\n```",
|
|
3766
3997
|
perLanguage: {
|
|
3767
3998
|
typescript: {
|
|
3768
|
-
method: 'client.agentVersion.
|
|
3769
|
-
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.agentVersion.
|
|
3999
|
+
method: 'client.agentVersion.rollback',
|
|
4000
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.agentVersion.rollback('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response.data);",
|
|
3770
4001
|
},
|
|
3771
4002
|
python: {
|
|
3772
|
-
method: 'agent_version.
|
|
3773
|
-
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.agent_version.
|
|
4003
|
+
method: 'agent_version.rollback',
|
|
4004
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.agent_version.rollback(\n version_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)',
|
|
3774
4005
|
},
|
|
3775
4006
|
http: {
|
|
3776
|
-
example: 'curl https://api.roark.ai/v1/agent/$AGENT_ID/versions/$VERSION_ID/
|
|
4007
|
+
example: 'curl https://api.roark.ai/v1/agent/$AGENT_ID/versions/$VERSION_ID/rollback \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
3777
4008
|
},
|
|
3778
4009
|
},
|
|
3779
4010
|
},
|
|
@@ -3786,8 +4017,8 @@ const EMBEDDED_METHODS = [
|
|
|
3786
4017
|
stainlessPath: '(resource) agentDraft > (method) get',
|
|
3787
4018
|
qualified: 'client.agentDraft.get',
|
|
3788
4019
|
params: ['agentId: string;'],
|
|
3789
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3790
|
-
markdown: "## get\n\n`client.agentDraft.get(agentId: string): { data: object; }`\n\n**get** `/v1/agent/{agentId}/draft`\n\nThe agent's open draft, with the issues that would stop it from being published.\n\n### Parameters\n\n- `agentId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
4020
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
4021
|
+
markdown: "## get\n\n`client.agentDraft.get(agentId: string): { data: object; }`\n\n**get** `/v1/agent/{agentId}/draft`\n\nThe agent's open draft, with the issues that would stop it from being published.\n\n### Parameters\n\n- `agentId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentDraft = await client.agentDraft.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(agentDraft);\n```",
|
|
3791
4022
|
perLanguage: {
|
|
3792
4023
|
typescript: {
|
|
3793
4024
|
method: 'client.agentDraft.get',
|
|
@@ -3811,8 +4042,8 @@ const EMBEDDED_METHODS = [
|
|
|
3811
4042
|
stainlessPath: '(resource) agentDraft > (method) create',
|
|
3812
4043
|
qualified: 'client.agentDraft.create',
|
|
3813
4044
|
params: ['agentId: string;', 'fromVersionId?: string;'],
|
|
3814
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3815
|
-
markdown: "## create\n\n`client.agentDraft.create(agentId: string, fromVersionId?: string): { data: object; }`\n\n**post** `/v1/agent/{agentId}/draft`\n\nOpens the agent's one shared draft, a copy of the live version or of an older published version. Fails with 409 when a draft is already open.\n\n### Parameters\n\n- `agentId: string`\n\n- `fromVersionId?: string`\n Start from this published version instead of the live one.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
4045
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
4046
|
+
markdown: "## create\n\n`client.agentDraft.create(agentId: string, fromVersionId?: string): { data: object; }`\n\n**post** `/v1/agent/{agentId}/draft`\n\nOpens the agent's one shared draft, a copy of the live version or of an older published version. Fails with 409 when a draft is already open.\n\n### Parameters\n\n- `agentId: string`\n\n- `fromVersionId?: string`\n Start from this published version instead of the live one.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentDraft = await client.agentDraft.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(agentDraft);\n```",
|
|
3816
4047
|
perLanguage: {
|
|
3817
4048
|
typescript: {
|
|
3818
4049
|
method: 'client.agentDraft.create',
|
|
@@ -3830,18 +4061,18 @@ const EMBEDDED_METHODS = [
|
|
|
3830
4061
|
{
|
|
3831
4062
|
name: 'update',
|
|
3832
4063
|
endpoint: '/v1/agent/{agentId}/draft',
|
|
3833
|
-
httpMethod: '
|
|
4064
|
+
httpMethod: 'put',
|
|
3834
4065
|
summary: 'Edit the draft',
|
|
3835
4066
|
description: 'Changes settings on the draft. Omitted settings stay as they are. Pass the revision you read as expectedRevision to fail with 409 if anyone edited the draft since, instead of applying on top of their edit.',
|
|
3836
4067
|
stainlessPath: '(resource) agentDraft > (method) update',
|
|
3837
4068
|
qualified: 'client.agentDraft.update',
|
|
3838
4069
|
params: [
|
|
3839
4070
|
'agentId: string;',
|
|
3840
|
-
"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;
|
|
4071
|
+
"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; };",
|
|
3841
4072
|
'expectedRevision?: number;',
|
|
3842
4073
|
],
|
|
3843
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3844
|
-
markdown: "## update\n\n`client.agentDraft.update(agentId: string, settings: { backgroundNoise?: string; backgroundNoiseUrl?: string; backgroundNoiseVolume?: number; callMaxDurationSeconds?: number; callSilenceTimeoutSeconds?: number; chatInactivityTimeoutSeconds?: number; chatMaxDurationSeconds?: number; endCallGoodbyeMessage?: string; endDetectionPhrases?: string[]; endDetectionReasons?: string[]; firstMessage?: string; firstMessageAudioUrl?: string; firstMessageMode?: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount?: number; idleMessages?: string[]; idleTimeoutSeconds?: number; interruptionMode?: 'ALLOW' | 'BLOCK'; language?: string;
|
|
4074
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
4075
|
+
markdown: "## update\n\n`client.agentDraft.update(agentId: string, settings: { backgroundNoise?: string; backgroundNoiseUrl?: string; backgroundNoiseVolume?: number; callMaxDurationSeconds?: number; callSilenceTimeoutSeconds?: number; chatInactivityTimeoutSeconds?: number; chatMaxDurationSeconds?: number; endCallGoodbyeMessage?: string; endDetectionPhrases?: string[]; endDetectionReasons?: string[]; firstMessage?: string; firstMessageAudioUrl?: string; firstMessageMode?: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount?: number; idleMessages?: string[]; idleTimeoutSeconds?: number; interruptionMode?: 'ALLOW' | 'BLOCK'; language?: string; modalities?: 'call' | 'chat'[]; subAgents?: { handoffs: object[]; isInitial: boolean; key: 'main' | string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; vadStartSecs?: number; vadStopSecs?: number; }, expectedRevision?: number): { data: object; }`\n\n**put** `/v1/agent/{agentId}/draft`\n\nChanges settings on the draft. Omitted settings stay as they are. Pass the revision you read as expectedRevision to fail with 409 if anyone edited the draft since, instead of applying on top of their edit.\n\n### Parameters\n\n- `agentId: string`\n\n- `settings: { backgroundNoise?: string; backgroundNoiseUrl?: string; backgroundNoiseVolume?: number; callMaxDurationSeconds?: number; callSilenceTimeoutSeconds?: number; chatInactivityTimeoutSeconds?: number; chatMaxDurationSeconds?: number; endCallGoodbyeMessage?: string; endDetectionPhrases?: string[]; endDetectionReasons?: string[]; firstMessage?: string; firstMessageAudioUrl?: string; firstMessageMode?: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount?: number; idleMessages?: string[]; idleTimeoutSeconds?: number; interruptionMode?: 'ALLOW' | 'BLOCK'; language?: string; modalities?: 'call' | 'chat'[]; subAgents?: { handoffs: object[]; isInitial: boolean; key: 'main' | string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; vadStartSecs?: number; vadStopSecs?: number; }`\n The settings to change. Omitted settings stay as they are; null clears one to the runtime default. subAgents replaces every speaker, model configs included, and must include `main`; in a model config, omitted fields use the runtime default.\n\n- `expectedRevision?: number`\n The draft's revision when you read it. When sent, the edit is refused if the draft changed since; when omitted, it applies on top of the latest edit.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentDraft = await client.agentDraft.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n settings: {},\n});\n\nconsole.log(agentDraft);\n```",
|
|
3845
4076
|
perLanguage: {
|
|
3846
4077
|
typescript: {
|
|
3847
4078
|
method: 'client.agentDraft.update',
|
|
@@ -3852,7 +4083,7 @@ const EMBEDDED_METHODS = [
|
|
|
3852
4083
|
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nagent_draft = client.agent_draft.update(\n agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n settings={},\n)\nprint(agent_draft.data)',
|
|
3853
4084
|
},
|
|
3854
4085
|
http: {
|
|
3855
|
-
example: 'curl https://api.roark.ai/v1/agent/$AGENT_ID/draft \\\n -X
|
|
4086
|
+
example: 'curl https://api.roark.ai/v1/agent/$AGENT_ID/draft \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "settings": {}\n }\'',
|
|
3856
4087
|
},
|
|
3857
4088
|
},
|
|
3858
4089
|
},
|
|
@@ -3865,8 +4096,8 @@ const EMBEDDED_METHODS = [
|
|
|
3865
4096
|
stainlessPath: '(resource) agentDraft > (method) delete',
|
|
3866
4097
|
qualified: 'client.agentDraft.delete',
|
|
3867
4098
|
params: ['agentId: string;'],
|
|
3868
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3869
|
-
markdown: "## delete\n\n`client.agentDraft.delete(agentId: string): { data: object; }`\n\n**delete** `/v1/agent/{agentId}/draft`\n\nThrows the open draft away and returns it. The live version is unchanged.\n\n### Parameters\n\n- `agentId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
4099
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
4100
|
+
markdown: "## delete\n\n`client.agentDraft.delete(agentId: string): { data: object; }`\n\n**delete** `/v1/agent/{agentId}/draft`\n\nThrows the open draft away and returns it. The live version is unchanged.\n\n### Parameters\n\n- `agentId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentDraft = await client.agentDraft.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(agentDraft);\n```",
|
|
3870
4101
|
perLanguage: {
|
|
3871
4102
|
typescript: {
|
|
3872
4103
|
method: 'client.agentDraft.delete',
|
|
@@ -3890,8 +4121,8 @@ const EMBEDDED_METHODS = [
|
|
|
3890
4121
|
stainlessPath: '(resource) agentDraft > (method) publish',
|
|
3891
4122
|
qualified: 'client.agentDraft.publish',
|
|
3892
4123
|
params: ['agentId: string;', 'expectedRevision: number;', 'summary?: string;'],
|
|
3893
|
-
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
3894
|
-
markdown: "## publish\n\n`client.agentDraft.publish(agentId: string, expectedRevision: number, summary?: string): { data: object; }`\n\n**post** `/v1/agent/{agentId}/draft/publish`\n\nMakes the draft the live version, numbered v1, v2, ... Fails with 409 if the draft was edited after expectedRevision, if another version was published since the draft started, or if it changes nothing; with 400 and the issues if the version cannot run.\n\n### Parameters\n\n- `agentId: string`\n\n- `expectedRevision: number`\n The draft revision you reviewed.\n\n- `summary?: string`\n What changed.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string;
|
|
4124
|
+
response: "{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }",
|
|
4125
|
+
markdown: "## publish\n\n`client.agentDraft.publish(agentId: string, expectedRevision: number, summary?: string): { data: object; }`\n\n**post** `/v1/agent/{agentId}/draft/publish`\n\nMakes the draft the live version, numbered v1, v2, ... Fails with 409 if the draft was edited after expectedRevision, if another version was published since the draft started, or if it changes nothing; with 400 and the issues if the version cannot run.\n\n### Parameters\n\n- `agentId: string`\n\n- `expectedRevision: number`\n The draft revision you reviewed.\n\n- `summary?: string`\n What changed.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: object[]; isInitial: boolean; key: string; modelConfigs: object[]; name: string; systemPrompt: string; tools: object[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }; }`\n\n - `data: { id: string; agentId: string; backgroundNoise: string; backgroundNoiseUrl: string; backgroundNoiseVolume: number; baseVersionId: string; callMaxDurationSeconds: number; callSilenceTimeoutSeconds: number; chatInactivityTimeoutSeconds: number; chatMaxDurationSeconds: number; createdAt: string; createdById: string; createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; endCallGoodbyeMessage: string; endDetectionPhrases: string[]; endDetectionReasons: string[]; firstMessage: string; firstMessageAudioUrl: string; firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER'; idleMaxCount: number; idleMessages: string[]; idleTimeoutSeconds: number; interruptionMode: 'ALLOW' | 'BLOCK'; language: string; modalities: 'call' | 'chat'[]; publishedAt: string; publishedById: string; publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM'; revision: number; rolledBackFromVersionId: string; status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED'; subAgents: { handoffs: { description: string; history: 'SHARED' | 'NONE'; note: string; once: boolean; to: string; }[]; isInitial: boolean; key: string; modelConfigs: { llm: object[]; stt: object[]; tts: object[]; type: 'CASCADE'; } | { speechToSpeech: object; type: 'SPEECH_TO_SPEECH'; }[]; name: string; systemPrompt: string; tools: { pinnedVersion: number; toolDefinitionId: string; }[]; }[]; summary: string; updatedAt: string; vadStartSecs: number; vadStopSecs: number; versionNumber: number; issues?: { field: string; message: string; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agentDraft.publish('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n expectedRevision: 1,\n});\n\nconsole.log(response);\n```",
|
|
3895
4126
|
perLanguage: {
|
|
3896
4127
|
typescript: {
|
|
3897
4128
|
method: 'client.agentDraft.publish',
|
|
@@ -4301,11 +4532,11 @@ const EMBEDDED_METHODS = [
|
|
|
4301
4532
|
stainlessPath: '(resource) config > (method) diff',
|
|
4302
4533
|
qualified: 'client.config.diff',
|
|
4303
4534
|
params: [
|
|
4304
|
-
"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[]; }[]; }[];",
|
|
4535
|
+
"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[]; }[]; }[];",
|
|
4305
4536
|
'prune?: boolean;',
|
|
4306
4537
|
],
|
|
4307
4538
|
response: "{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }; }",
|
|
4308
|
-
markdown: "## diff\n\n`client.config.diff(resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/diff`\n\nDry run for an apply: returns the projected changes (create / update / delete) for the submitted bundle without writing anything. Works for both project and organization keys.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.config.diff({ resources: [{ kind: 'agent', name: 'x' }] });\n\nconsole.log(response);\n```",
|
|
4539
|
+
markdown: "## diff\n\n`client.config.diff(resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/diff`\n\nDry run for an apply: returns the projected changes (create / update / delete) for the submitted bundle without writing anything. Works for both project and organization keys.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.config.diff({ resources: [{ kind: 'agent', name: 'x' }] });\n\nconsole.log(response);\n```",
|
|
4309
4540
|
perLanguage: {
|
|
4310
4541
|
typescript: {
|
|
4311
4542
|
method: 'client.config.diff',
|
|
@@ -4329,11 +4560,11 @@ const EMBEDDED_METHODS = [
|
|
|
4329
4560
|
stainlessPath: '(resource) config > (method) apply',
|
|
4330
4561
|
qualified: 'client.config.apply',
|
|
4331
4562
|
params: [
|
|
4332
|
-
"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[]; }[]; }[];",
|
|
4563
|
+
"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[]; }[]; }[];",
|
|
4333
4564
|
'prune?: boolean;',
|
|
4334
4565
|
],
|
|
4335
4566
|
response: "{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }; }",
|
|
4336
|
-
markdown: "## apply\n\n`client.config.apply(resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/apply`\n\nReconcile a config-as-code bundle. With a PROJECT API key, submit project-scoped resources (agents, personas, flows, collectors, metrics, ...). With an ORGANIZATION API key, submit `kind: project` resources, each optionally carrying its members and its own nested `resources`. Submit the full desired set; managed resources are updated, new ones created, and (unless prune is false) managed resources absent from the bundle are deleted. Identity is by name.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.config.apply({ resources: [{ kind: 'agent', name: 'x' }] });\n\nconsole.log(response);\n```",
|
|
4567
|
+
markdown: "## apply\n\n`client.config.apply(resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/apply`\n\nReconcile a config-as-code bundle. With a PROJECT API key, submit project-scoped resources (agents, personas, flows, collectors, metrics, ...). With an ORGANIZATION API key, submit `kind: project` resources, each optionally carrying its members and its own nested `resources`. Submit the full desired set; managed resources are updated, new ones created, and (unless prune is false) managed resources absent from the bundle are deleted. Identity is by name.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: { displayOrder: number; label: string; description?: string; }[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; flows: { edgeCases?: string[]; flow?: string; happyPath?: boolean; personaOverride?: string; system?: string; }[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; calculationType?: 'LLM_JUDGE'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { calculationType: 'HTTP_REQUEST'; httpRequest: object; kind: 'metric'; name: string; displayName?: string; falseLabel?: string; trueLabel?: string; } | { calculationType: 'THRESHOLD'; kind: 'metric'; name: string; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetric: string; value: string | number | boolean; aggregationMode?: string; countThreshold?: number; falseLabel?: string; sourceParticipantRole?: 'AGENT' | 'CUSTOMER'; sourceVariant?: string; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.config.apply({ resources: [{ kind: 'agent', name: 'x' }] });\n\nconsole.log(response);\n```",
|
|
4337
4568
|
perLanguage: {
|
|
4338
4569
|
typescript: {
|
|
4339
4570
|
method: 'client.config.apply',
|