@roarkanalytics/sdk-mcp 4.3.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +5 -0
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +5 -0
- 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 +145 -14
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +145 -14
- 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 +30 -0
- package/methods.js.map +1 -1
- package/methods.mjs +30 -0
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +5 -0
- package/src/local-docs-search.ts +172 -14
- package/src/methods.ts +30 -0
- package/src/server.ts +1 -1
package/src/local-docs-search.ts
CHANGED
|
@@ -911,9 +911,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
911
911
|
'sessionId?: string;',
|
|
912
912
|
'toolDescription?: string;',
|
|
913
913
|
],
|
|
914
|
-
response:
|
|
914
|
+
response:
|
|
915
|
+
"{ data: { reused: boolean; simulationJobId: string; source: 'GENERATED' | 'FIXTURE'; toolName: string; result?: object; }; }",
|
|
915
916
|
markdown:
|
|
916
|
-
"## mockTool\n\n`client.simulation.mockTool(simulationJobId: string, toolName: string, arguments?: object, sessionId?: string, toolDescription?: string): { data: object; }`\n\n**post** `/v1/simulation/tool-mock`\n\nThe server half of the tool guard for code-first agents. When a guarded tool fires during a Roark test call, send the invocation here instead of executing it: Roark answers with a simulated backend response that is valid JSON, shaped by the tool contract you pass, consistent with the test scenario, and consistent with earlier mocked responses in the same call. Real callers are never affected: the guard only diverts when the agent-config resolve response identified the session as a Roark simulation, and this endpoint independently re-validates the simulation before answering.\n\nFailure contract for your wrapper: `404` means the simulation id is unknown to this project (treat the session as real). `409` means the simulation has already ended (stale session state: do NOT execute the real tool; return your static fallback). `5xx` means generation failed (return your static fallback).\n\nIdentical retries (same tool, same arguments) within a few minutes return the stored response, so double-fired handlers stay consistent.\n\n### Parameters\n\n- `simulationJobId: string`\n The simulation this session belongs to, from the agent-config resolve response (`simulationJobId`). Roark re-validates it against the live simulation before answering.\n\n- `toolName: string`\n The tool the agent invoked.\n\n- `arguments?: object`\n The arguments the agent called the tool with, verbatim.\n\n- `sessionId?: string`\n Your session or room identifier, echoed back in logs for correlation.\n\n- `toolDescription?: string`\n The tool's contract: its description and, ideally, its parameter and return shape. The more contract you pass, the more faithful the simulated response.\n\n### Returns\n\n- `{ data: { reused: boolean; simulationJobId: string; toolName: string; result?: object; }; }`\n\n - `data: { reused: boolean; simulationJobId: string; toolName: string; result?: object; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulation.mockTool({\n simulationJobId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n toolName: 'book_appointment',\n});\n\nconsole.log(response);\n```",
|
|
917
|
+
"## mockTool\n\n`client.simulation.mockTool(simulationJobId: string, toolName: string, arguments?: object, sessionId?: string, toolDescription?: string): { data: object; }`\n\n**post** `/v1/simulation/tool-mock`\n\nThe server half of the tool guard for code-first agents. When a guarded tool fires during a Roark test call, send the invocation here instead of executing it: Roark answers with a simulated backend response that is valid JSON, shaped by the tool contract you pass, consistent with the test scenario, and consistent with earlier mocked responses in the same call. Real callers are never affected: the guard only diverts when the agent-config resolve response identified the session as a Roark simulation, and this endpoint independently re-validates the simulation before answering.\n\nFailure contract for your wrapper: `404` means the simulation id is unknown to this project (treat the session as real). `409` means the simulation has already ended (stale session state: do NOT execute the real tool; return your static fallback). `5xx` means generation failed (return your static fallback).\n\nIdentical retries (same tool, same arguments) within a few minutes return the stored response, so double-fired handlers stay consistent.\n\n### Parameters\n\n- `simulationJobId: string`\n The simulation this session belongs to, from the agent-config resolve response (`simulationJobId`). Roark re-validates it against the live simulation before answering.\n\n- `toolName: string`\n The tool the agent invoked.\n\n- `arguments?: object`\n The arguments the agent called the tool with, verbatim.\n\n- `sessionId?: string`\n Your session or room identifier, echoed back in logs for correlation.\n\n- `toolDescription?: string`\n The tool's contract: its description and, ideally, its parameter and return shape. The more contract you pass, the more faithful the simulated response.\n\n### Returns\n\n- `{ data: { reused: boolean; simulationJobId: string; source: 'GENERATED' | 'FIXTURE'; toolName: string; result?: object; }; }`\n\n - `data: { reused: boolean; simulationJobId: string; source: 'GENERATED' | 'FIXTURE'; toolName: string; result?: object; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulation.mockTool({\n simulationJobId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n toolName: 'book_appointment',\n});\n\nconsole.log(response);\n```",
|
|
917
918
|
perLanguage: {
|
|
918
919
|
typescript: {
|
|
919
920
|
method: 'client.simulation.mockTool',
|
|
@@ -941,9 +942,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
941
942
|
qualified: 'client.simulationJob.lookup',
|
|
942
943
|
params: ['roarkPhoneNumber: string;', 'callReceivedAt?: string;'],
|
|
943
944
|
response:
|
|
944
|
-
"{ data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; enrichment: { outcome: 'NOT_REQUESTED' | 'WAITING' | 'MERGED' | 'TIMED_OUT' | 'SKIPPED' | 'UNKNOWN'; requested: boolean; metricsNotCollected?: number; metricsScoredOnSimulationInstead?: number; waitEndedAt?: string; waitStartedAt?: string; }; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }",
|
|
945
|
+
"{ data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; enrichment: { outcome: 'NOT_REQUESTED' | 'WAITING' | 'MERGED' | 'TIMED_OUT' | 'SKIPPED' | 'UNKNOWN'; requested: boolean; metricsNotCollected?: number; metricsScoredOnSimulationInstead?: number; waitEndedAt?: string; waitStartedAt?: string; }; failureOwner: 'ROARK' | 'AGENT'; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE' | 'CALLER_NEVER_TOOK_OVER'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }",
|
|
945
946
|
markdown:
|
|
946
|
-
"## lookup\n\n`client.simulationJob.lookup(roarkPhoneNumber: string, callReceivedAt?: string): { data: object; }`\n\n**get** `/v1/simulation/job/lookup`\n\nFind the matching simulation using the number used by the Roark simulation agent.\n\n### Parameters\n\n- `roarkPhoneNumber: string`\n Phone number provisioned by Roark for the simulation job in E.164 format. In the case of an inbound simulation, this is the number that calls your agent; in the case of an outbound simulation, this is the number you call from your agent.\n\n- `callReceivedAt?: string`\n ISO 8601 timestamp of when the call was received. Alternatively, any time between the start and end of the call is valid. Defaults to the current time, which fetches any jobs that are currently ongoing.\n\n### Returns\n\n- `{ data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; enrichment: { outcome: 'NOT_REQUESTED' | 'WAITING' | 'MERGED' | 'TIMED_OUT' | 'SKIPPED' | 'UNKNOWN'; requested: boolean; metricsNotCollected?: number; metricsScoredOnSimulationInstead?: number; waitEndedAt?: string; waitStartedAt?: string; }; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }`\n\n - `data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; enrichment: { outcome: 'NOT_REQUESTED' | 'WAITING' | 'MERGED' | 'TIMED_OUT' | 'SKIPPED' | 'UNKNOWN'; requested: boolean; metricsNotCollected?: number; metricsScoredOnSimulationInstead?: number; waitEndedAt?: string; waitStartedAt?: string; }; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationJob.lookup({ roarkPhoneNumber: 'roarkPhoneNumber' });\n\nconsole.log(response);\n```",
|
|
947
|
+
"## lookup\n\n`client.simulationJob.lookup(roarkPhoneNumber: string, callReceivedAt?: string): { data: object; }`\n\n**get** `/v1/simulation/job/lookup`\n\nFind the matching simulation using the number used by the Roark simulation agent.\n\n### Parameters\n\n- `roarkPhoneNumber: string`\n Phone number provisioned by Roark for the simulation job in E.164 format. In the case of an inbound simulation, this is the number that calls your agent; in the case of an outbound simulation, this is the number you call from your agent.\n\n- `callReceivedAt?: string`\n ISO 8601 timestamp of when the call was received. Alternatively, any time between the start and end of the call is valid. Defaults to the current time, which fetches any jobs that are currently ongoing.\n\n### Returns\n\n- `{ data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; enrichment: { outcome: 'NOT_REQUESTED' | 'WAITING' | 'MERGED' | 'TIMED_OUT' | 'SKIPPED' | 'UNKNOWN'; requested: boolean; metricsNotCollected?: number; metricsScoredOnSimulationInstead?: number; waitEndedAt?: string; waitStartedAt?: string; }; failureOwner: 'ROARK' | 'AGENT'; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE' | 'CALLER_NEVER_TOOK_OVER'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }`\n\n - `data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; enrichment: { outcome: 'NOT_REQUESTED' | 'WAITING' | 'MERGED' | 'TIMED_OUT' | 'SKIPPED' | 'UNKNOWN'; requested: boolean; metricsNotCollected?: number; metricsScoredOnSimulationInstead?: number; waitEndedAt?: string; waitStartedAt?: string; }; failureOwner: 'ROARK' | 'AGENT'; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE' | 'CALLER_NEVER_TOOK_OVER'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationJob.lookup({ roarkPhoneNumber: 'roarkPhoneNumber' });\n\nconsole.log(response);\n```",
|
|
947
948
|
perLanguage: {
|
|
948
949
|
typescript: {
|
|
949
950
|
method: 'client.simulationJob.lookup',
|
|
@@ -972,9 +973,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
972
973
|
qualified: 'client.simulationJob.getByID',
|
|
973
974
|
params: ['jobId: string;'],
|
|
974
975
|
response:
|
|
975
|
-
"{ data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; enrichment: { outcome: 'NOT_REQUESTED' | 'WAITING' | 'MERGED' | 'TIMED_OUT' | 'SKIPPED' | 'UNKNOWN'; requested: boolean; metricsNotCollected?: number; metricsScoredOnSimulationInstead?: number; waitEndedAt?: string; waitStartedAt?: string; }; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }",
|
|
976
|
+
"{ data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; enrichment: { outcome: 'NOT_REQUESTED' | 'WAITING' | 'MERGED' | 'TIMED_OUT' | 'SKIPPED' | 'UNKNOWN'; requested: boolean; metricsNotCollected?: number; metricsScoredOnSimulationInstead?: number; waitEndedAt?: string; waitStartedAt?: string; }; failureOwner: 'ROARK' | 'AGENT'; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE' | 'CALLER_NEVER_TOOK_OVER'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }",
|
|
976
977
|
markdown:
|
|
977
|
-
"## getById\n\n`client.simulationJob.getByID(jobId: string): { data: object; }`\n\n**get** `/v1/simulation/job/{jobId}`\n\nGet a individual simulation run directly by its ID. This is generally part of a larger simulation run plan job.\n\n### Parameters\n\n- `jobId: string`\n\n### Returns\n\n- `{ data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; enrichment: { outcome: 'NOT_REQUESTED' | 'WAITING' | 'MERGED' | 'TIMED_OUT' | 'SKIPPED' | 'UNKNOWN'; requested: boolean; metricsNotCollected?: number; metricsScoredOnSimulationInstead?: number; waitEndedAt?: string; waitStartedAt?: string; }; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }`\n\n - `data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; enrichment: { outcome: 'NOT_REQUESTED' | 'WAITING' | 'MERGED' | 'TIMED_OUT' | 'SKIPPED' | 'UNKNOWN'; requested: boolean; metricsNotCollected?: number; metricsScoredOnSimulationInstead?: number; waitEndedAt?: string; waitStartedAt?: string; }; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationJob.getByID('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response);\n```",
|
|
978
|
+
"## getById\n\n`client.simulationJob.getByID(jobId: string): { data: object; }`\n\n**get** `/v1/simulation/job/{jobId}`\n\nGet a individual simulation run directly by its ID. This is generally part of a larger simulation run plan job.\n\n### Parameters\n\n- `jobId: string`\n\n### Returns\n\n- `{ data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; enrichment: { outcome: 'NOT_REQUESTED' | 'WAITING' | 'MERGED' | 'TIMED_OUT' | 'SKIPPED' | 'UNKNOWN'; requested: boolean; metricsNotCollected?: number; metricsScoredOnSimulationInstead?: number; waitEndedAt?: string; waitStartedAt?: string; }; failureOwner: 'ROARK' | 'AGENT'; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE' | 'CALLER_NEVER_TOOK_OVER'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }; }`\n\n - `data: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; enrichment: { outcome: 'NOT_REQUESTED' | 'WAITING' | 'MERGED' | 'TIMED_OUT' | 'SKIPPED' | 'UNKNOWN'; requested: boolean; metricsNotCollected?: number; metricsScoredOnSimulationInstead?: number; waitEndedAt?: string; waitStartedAt?: string; }; failureOwner: 'ROARK' | 'AGENT'; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE' | 'CALLER_NEVER_TOOK_OVER'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; runPlan: { id: string; name: string; variables: object; }; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationJob.getByID('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response);\n```",
|
|
978
979
|
perLanguage: {
|
|
979
980
|
typescript: {
|
|
980
981
|
method: 'client.simulationJob.getByID',
|
|
@@ -992,6 +993,163 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
992
993
|
},
|
|
993
994
|
},
|
|
994
995
|
},
|
|
996
|
+
{
|
|
997
|
+
name: 'list',
|
|
998
|
+
endpoint: '/v1/simulation/job/{jobId}/tool-mock',
|
|
999
|
+
httpMethod: 'get',
|
|
1000
|
+
summary: 'List mocked tool invocations',
|
|
1001
|
+
description:
|
|
1002
|
+
"Every guarded tool invocation Roark answered during this simulation: what the agent tried to call, with what arguments, and the simulated response it received. Use this to assert tool behavior in CI after a test call, with zero real side effects. Empty when the agent's tools are not guarded (see the tool guard docs).",
|
|
1003
|
+
stainlessPath: '(resource) simulationJobToolMock > (method) list',
|
|
1004
|
+
qualified: 'client.simulationJobToolMock.list',
|
|
1005
|
+
params: ['jobId: string;'],
|
|
1006
|
+
response:
|
|
1007
|
+
"{ data: { id: string; createdAt: string; sessionId: string; source: 'GENERATED' | 'FIXTURE'; toolName: string; arguments?: object; result?: object; }[]; }",
|
|
1008
|
+
markdown:
|
|
1009
|
+
"## list\n\n`client.simulationJobToolMock.list(jobId: string): { data: object[]; }`\n\n**get** `/v1/simulation/job/{jobId}/tool-mock`\n\nEvery guarded tool invocation Roark answered during this simulation: what the agent tried to call, with what arguments, and the simulated response it received. Use this to assert tool behavior in CI after a test call, with zero real side effects. Empty when the agent's tools are not guarded (see the tool guard docs).\n\n### Parameters\n\n- `jobId: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; sessionId: string; source: 'GENERATED' | 'FIXTURE'; toolName: string; arguments?: object; result?: object; }[]; }`\n\n - `data: { id: string; createdAt: string; sessionId: string; source: 'GENERATED' | 'FIXTURE'; toolName: string; arguments?: object; result?: object; }[]`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationJobToolMocks = await client.simulationJobToolMock.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(simulationJobToolMocks);\n```",
|
|
1010
|
+
perLanguage: {
|
|
1011
|
+
typescript: {
|
|
1012
|
+
method: 'client.simulationJobToolMock.list',
|
|
1013
|
+
example:
|
|
1014
|
+
"import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationJobToolMocks = await client.simulationJobToolMock.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(simulationJobToolMocks.data);",
|
|
1015
|
+
},
|
|
1016
|
+
python: {
|
|
1017
|
+
method: 'simulation_job_tool_mock.list',
|
|
1018
|
+
example:
|
|
1019
|
+
'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_job_tool_mocks = client.simulation_job_tool_mock.list(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(simulation_job_tool_mocks.data)',
|
|
1020
|
+
},
|
|
1021
|
+
http: {
|
|
1022
|
+
example:
|
|
1023
|
+
'curl https://api.roark.ai/v1/simulation/job/$JOB_ID/tool-mock \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1024
|
+
},
|
|
1025
|
+
},
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
name: 'list',
|
|
1029
|
+
endpoint: '/v1/simulation/tool-fixture',
|
|
1030
|
+
httpMethod: 'get',
|
|
1031
|
+
summary: 'List tool fixtures',
|
|
1032
|
+
description: 'All deterministic tool responses configured for this project, optionally filtered by tool.',
|
|
1033
|
+
stainlessPath: '(resource) simulationToolFixture > (method) list',
|
|
1034
|
+
qualified: 'client.simulationToolFixture.list',
|
|
1035
|
+
params: ['toolName?: string;'],
|
|
1036
|
+
response:
|
|
1037
|
+
'{ data: { id: string; createdAt: string; customerFlowVariantId: string; description: string; enabled: boolean; toolName: string; updatedAt: string; response?: object; }[]; }',
|
|
1038
|
+
markdown:
|
|
1039
|
+
"## list\n\n`client.simulationToolFixture.list(toolName?: string): { data: object[]; }`\n\n**get** `/v1/simulation/tool-fixture`\n\nAll deterministic tool responses configured for this project, optionally filtered by tool.\n\n### Parameters\n\n- `toolName?: string`\n Only fixtures for this tool.\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; customerFlowVariantId: string; description: string; enabled: boolean; toolName: string; updatedAt: string; response?: object; }[]; }`\n\n - `data: { id: string; createdAt: string; customerFlowVariantId: string; description: string; enabled: boolean; toolName: string; updatedAt: string; response?: object; }[]`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationToolFixtures = await client.simulationToolFixture.list();\n\nconsole.log(simulationToolFixtures);\n```",
|
|
1040
|
+
perLanguage: {
|
|
1041
|
+
typescript: {
|
|
1042
|
+
method: 'client.simulationToolFixture.list',
|
|
1043
|
+
example:
|
|
1044
|
+
"import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationToolFixtures = await client.simulationToolFixture.list();\n\nconsole.log(simulationToolFixtures.data);",
|
|
1045
|
+
},
|
|
1046
|
+
python: {
|
|
1047
|
+
method: 'simulation_tool_fixture.list',
|
|
1048
|
+
example:
|
|
1049
|
+
'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_tool_fixtures = client.simulation_tool_fixture.list()\nprint(simulation_tool_fixtures.data)',
|
|
1050
|
+
},
|
|
1051
|
+
http: {
|
|
1052
|
+
example:
|
|
1053
|
+
'curl https://api.roark.ai/v1/simulation/tool-fixture \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1054
|
+
},
|
|
1055
|
+
},
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
name: 'create',
|
|
1059
|
+
endpoint: '/v1/simulation/tool-fixture',
|
|
1060
|
+
httpMethod: 'post',
|
|
1061
|
+
summary: 'Set a tool fixture',
|
|
1062
|
+
description:
|
|
1063
|
+
'Create-or-replace by scope: one fixture per tool project-wide, plus one per (tool, flow variant). Setting the same scope twice replaces the response, so CI can apply fixtures idempotently. During Roark test calls the tool guard answers with the fixture verbatim instead of generating a response; real callers are never affected.',
|
|
1064
|
+
stainlessPath: '(resource) simulationToolFixture > (method) create',
|
|
1065
|
+
qualified: 'client.simulationToolFixture.create',
|
|
1066
|
+
params: [
|
|
1067
|
+
'toolName: string;',
|
|
1068
|
+
'customerFlowVariantId?: string;',
|
|
1069
|
+
'description?: string;',
|
|
1070
|
+
'enabled?: boolean;',
|
|
1071
|
+
'response?: object;',
|
|
1072
|
+
],
|
|
1073
|
+
response:
|
|
1074
|
+
'{ data: { id: string; createdAt: string; customerFlowVariantId: string; description: string; enabled: boolean; toolName: string; updatedAt: string; response?: object; }; }',
|
|
1075
|
+
markdown:
|
|
1076
|
+
"## create\n\n`client.simulationToolFixture.create(toolName: string, customerFlowVariantId?: string, description?: string, enabled?: boolean, response?: object): { data: object; }`\n\n**post** `/v1/simulation/tool-fixture`\n\nCreate-or-replace by scope: one fixture per tool project-wide, plus one per (tool, flow variant). Setting the same scope twice replaces the response, so CI can apply fixtures idempotently. During Roark test calls the tool guard answers with the fixture verbatim instead of generating a response; real callers are never affected.\n\n### Parameters\n\n- `toolName: string`\n The tool this fixture answers for.\n\n- `customerFlowVariantId?: string`\n Pin the fixture to one flow variant (scenario). Omit for a project-wide fixture. A variant-pinned fixture beats the project-wide one.\n\n- `description?: string`\n Why this fixture exists.\n\n- `enabled?: boolean`\n Defaults to true.\n\n- `response?: object`\n The exact JSON to return.\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; customerFlowVariantId: string; description: string; enabled: boolean; toolName: string; updatedAt: string; response?: object; }; }`\n\n - `data: { id: string; createdAt: string; customerFlowVariantId: string; description: string; enabled: boolean; toolName: string; updatedAt: string; response?: object; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationToolFixture = await client.simulationToolFixture.create({\n toolName: 'lookup_availability',\n});\n\nconsole.log(simulationToolFixture);\n```",
|
|
1077
|
+
perLanguage: {
|
|
1078
|
+
typescript: {
|
|
1079
|
+
method: 'client.simulationToolFixture.create',
|
|
1080
|
+
example:
|
|
1081
|
+
"import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationToolFixture = await client.simulationToolFixture.create({\n toolName: 'lookup_availability',\n});\n\nconsole.log(simulationToolFixture.data);",
|
|
1082
|
+
},
|
|
1083
|
+
python: {
|
|
1084
|
+
method: 'simulation_tool_fixture.create',
|
|
1085
|
+
example:
|
|
1086
|
+
'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_tool_fixture = client.simulation_tool_fixture.create(\n tool_name="lookup_availability",\n)\nprint(simulation_tool_fixture.data)',
|
|
1087
|
+
},
|
|
1088
|
+
http: {
|
|
1089
|
+
example:
|
|
1090
|
+
'curl https://api.roark.ai/v1/simulation/tool-fixture \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "toolName": "lookup_availability",\n "description": "Forces the no-availability branch",\n "response": {\n "slots": []\n }\n }\'',
|
|
1091
|
+
},
|
|
1092
|
+
},
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
name: 'update',
|
|
1096
|
+
endpoint: '/v1/simulation/tool-fixture/{fixtureId}',
|
|
1097
|
+
httpMethod: 'put',
|
|
1098
|
+
summary: 'Update a tool fixture',
|
|
1099
|
+
description: 'Change the response, description, or enabled state of an existing fixture.',
|
|
1100
|
+
stainlessPath: '(resource) simulationToolFixture > (method) update',
|
|
1101
|
+
qualified: 'client.simulationToolFixture.update',
|
|
1102
|
+
params: ['fixtureId: string;', 'description?: string;', 'enabled?: boolean;', 'response?: object;'],
|
|
1103
|
+
response:
|
|
1104
|
+
'{ data: { id: string; createdAt: string; customerFlowVariantId: string; description: string; enabled: boolean; toolName: string; updatedAt: string; response?: object; }; }',
|
|
1105
|
+
markdown:
|
|
1106
|
+
"## update\n\n`client.simulationToolFixture.update(fixtureId: string, description?: string, enabled?: boolean, response?: object): { data: object; }`\n\n**put** `/v1/simulation/tool-fixture/{fixtureId}`\n\nChange the response, description, or enabled state of an existing fixture.\n\n### Parameters\n\n- `fixtureId: string`\n\n- `description?: string`\n\n- `enabled?: boolean`\n\n- `response?: object`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; customerFlowVariantId: string; description: string; enabled: boolean; toolName: string; updatedAt: string; response?: object; }; }`\n\n - `data: { id: string; createdAt: string; customerFlowVariantId: string; description: string; enabled: boolean; toolName: string; updatedAt: string; response?: object; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationToolFixture = await client.simulationToolFixture.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(simulationToolFixture);\n```",
|
|
1107
|
+
perLanguage: {
|
|
1108
|
+
typescript: {
|
|
1109
|
+
method: 'client.simulationToolFixture.update',
|
|
1110
|
+
example:
|
|
1111
|
+
"import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationToolFixture = await client.simulationToolFixture.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(simulationToolFixture.data);",
|
|
1112
|
+
},
|
|
1113
|
+
python: {
|
|
1114
|
+
method: 'simulation_tool_fixture.update',
|
|
1115
|
+
example:
|
|
1116
|
+
'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_tool_fixture = client.simulation_tool_fixture.update(\n fixture_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(simulation_tool_fixture.data)',
|
|
1117
|
+
},
|
|
1118
|
+
http: {
|
|
1119
|
+
example:
|
|
1120
|
+
'curl https://api.roark.ai/v1/simulation/tool-fixture/$FIXTURE_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1121
|
+
},
|
|
1122
|
+
},
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
name: 'delete',
|
|
1126
|
+
endpoint: '/v1/simulation/tool-fixture/{fixtureId}',
|
|
1127
|
+
httpMethod: 'delete',
|
|
1128
|
+
summary: 'Delete a tool fixture',
|
|
1129
|
+
description: 'The tool goes back to scenario-aware generated responses in test calls.',
|
|
1130
|
+
stainlessPath: '(resource) simulationToolFixture > (method) delete',
|
|
1131
|
+
qualified: 'client.simulationToolFixture.delete',
|
|
1132
|
+
params: ['fixtureId: string;'],
|
|
1133
|
+
response: '{ data: { deleted: boolean; }; }',
|
|
1134
|
+
markdown:
|
|
1135
|
+
"## delete\n\n`client.simulationToolFixture.delete(fixtureId: string): { data: object; }`\n\n**delete** `/v1/simulation/tool-fixture/{fixtureId}`\n\nThe tool goes back to scenario-aware generated responses in test calls.\n\n### Parameters\n\n- `fixtureId: string`\n\n### Returns\n\n- `{ data: { deleted: boolean; }; }`\n\n - `data: { deleted: boolean; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationToolFixture = await client.simulationToolFixture.delete(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(simulationToolFixture);\n```",
|
|
1136
|
+
perLanguage: {
|
|
1137
|
+
typescript: {
|
|
1138
|
+
method: 'client.simulationToolFixture.delete',
|
|
1139
|
+
example:
|
|
1140
|
+
"import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst simulationToolFixture = await client.simulationToolFixture.delete(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(simulationToolFixture.data);",
|
|
1141
|
+
},
|
|
1142
|
+
python: {
|
|
1143
|
+
method: 'simulation_tool_fixture.delete',
|
|
1144
|
+
example:
|
|
1145
|
+
'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nsimulation_tool_fixture = client.simulation_tool_fixture.delete(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(simulation_tool_fixture.data)',
|
|
1146
|
+
},
|
|
1147
|
+
http: {
|
|
1148
|
+
example:
|
|
1149
|
+
'curl https://api.roark.ai/v1/simulation/tool-fixture/$FIXTURE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1150
|
+
},
|
|
1151
|
+
},
|
|
1152
|
+
},
|
|
995
1153
|
{
|
|
996
1154
|
name: 'list',
|
|
997
1155
|
endpoint: '/v1/simulation/plan',
|
|
@@ -1089,7 +1247,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1089
1247
|
response:
|
|
1090
1248
|
"{ data: { runPlan: { id: string; agentEndpoints: object[]; comparisonBaseline: string; comparisonProperty: string; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; enrichWithLiveConversation: boolean; evaluators: object[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: object[]; includeAutomaticMetrics: boolean; includeFlowMetrics: boolean; isConfigManaged: boolean; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: object[]; name: string; personas: object[]; scenarios: object[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; runPlanJob?: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }; }",
|
|
1091
1249
|
markdown:
|
|
1092
|
-
"## create\n\n`client.simulationRunPlan.create(agentEndpoints: { id: string; }[], direction: 'INBOUND' | 'OUTBOUND', maxSimulationDurationSeconds: number, metrics: { id?: string; conversationSource?: 'SIMULATED' | 'LIVE'; metricId?: string; minPassRate?: number; slug?: string; }[], name: string, autoRun?: boolean, comparisonBaseline?: string, comparisonProperty?: string, comparisonValues?: string[], description?: string, endCallPhrases?: string[], endCallReasons?: string[], enrichWithLiveConversation?: boolean, executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT', flows?: { id?: string; edgeCases?: 'ALL' | { id?: string; personaOverrideId?: string; slug?: string; variables?: object; }[]; happyPath?: boolean; overrides?: { property: string; value: string; }[]; personaOverrideId?: string; slug?: string; variables?: object; }[], includeAutomaticMetrics?: boolean, includeFlowMetrics?: boolean, iterationCount?: number, maxConcurrentJobs?: number, personas?: { id: string; }[], scenarios?: { id: string; variables?: object; }[], silenceTimeoutSeconds?: number): { data: object; }`\n\n**post** `/v1/simulation/plan`\n\nCreates a new simulation run plan.\n\nTo run a simulation, use POST /v1/simulation/run instead: it starts a run from a plan or\nfrom an inline configuration, and takes runtime variables. Create a plan here when you want\na reusable, named one to run later.\n\n### Parameters\n\n- `agentEndpoints: { id: string; }[]`\n Agent endpoints to include in this run plan\n\n- `direction: 'INBOUND' | 'OUTBOUND'`\n Direction of the simulation (INBOUND or OUTBOUND)\n\n- `maxSimulationDurationSeconds: number`\n Maximum duration in seconds for each simulation\n\n- `metrics: { id?: string; conversationSource?: 'SIMULATED' | 'LIVE'; metricId?: string; minPassRate?: number; slug?: string; }[]`\n Metric definitions to include in this run plan. Reference each by `id` (UUID) or `slug`.\n\n- `name: string`\n Name of the run plan\n\n- `autoRun?: boolean`\n Deprecated: use POST /v1/simulation/run, which starts a run and accepts runtime `variables` as well. This flag runs the plan with only the values pinned on it.\n\n- `comparisonBaseline?: string`\n The value of `comparisonProperty` every other value is measured against, for example `NONE`\nfor `BACKGROUND_NOISE` or `NORMAL` for `SPEECH_PACE`. Must be a value that property can take.\n\nStored rather than assumed, so the report can say \"compared against US accent\" instead of\nimplying Roark decided which value is normal. Most properties have an obvious baseline and\nthe dashboard prefills it; `GENDER` has none, so choose the one you are testing against.\n\n- `comparisonProperty?: string`\n The property this run plan investigates: the one thing its arms differ by.\n\nSet it and the run report compares the arms on that property, so a run answers \"what did\nbackground noise cost\" rather than just \"what did each arm score\". Every value is a field\nalready recorded on each call, so the report can label an arm `CRYING_BABY` rather than\nrepeating a flow variant's title.\n\nOmit it and the report still compares when it can: it detects which property varies across\nthe arms. Setting it is what tells the written summary what you were trying to find out,\nwhich detection cannot infer.\n\n- `comparisonValues?: string[]`\n Which values of `comparisonProperty` to run. This is what the plan costs: the flow is\nattached once per value, so ten values is ten times the calls of one.\n\nOmit it to run every value the property has, which for `ACCENT` is more than twenty. Send a\nsubset to narrow the sweep, for example three accents you actually serve. A\n`comparisonBaseline` outside this set is rejected, because it would anchor every difference\nto an arm the run never made.\n\nNot stored as a field: the arms are the values. Reading the plan back returns them as its\nflow attachments.\n\n- `description?: string`\n Description of the run plan\n\n- `endCallPhrases?: string[]`\n Phrases that trigger end of call. Empty array disables the feature.\n\n- `endCallReasons?: string[]`\n Semantic conditions that trigger end of call. The LLM evaluates the conversation against these conditions. Empty array disables the feature.\n\n- `enrichWithLiveConversation?: boolean`\n Merge the customer's own recording of the real call into each simulation, so metrics can be\nscored against the live leg as well as the simulated one. This is the API equivalent of the\ndashboard's live-enrichment toggle.\n\nWith this on, the run provisions a phone number and holds each call open for up to 15 minutes\nwaiting for a matching call to be posted to POST /v1/call. A call matches on the provisioned\nnumber (`roarkPhoneNumber` on the job) with a start time inside the simulation window. If\nnothing arrives, the simulation still completes and any `LIVE`-sourced metric produces no value.\n\nRequired by any metric whose `requiresLiveConversation` is true: without it that metric is\nsilently skipped.\n\n- `executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'`\n Execution mode (PARALLEL or SEQUENTIAL)\n\n- `flows?: { id?: string; edgeCases?: 'ALL' | { id?: string; personaOverrideId?: string; slug?: string; variables?: object; }[]; happyPath?: boolean; overrides?: { property: string; value: string; }[]; personaOverrideId?: string; slug?: string; variables?: object; }[]`\n Customer flows to include in this run plan. The same flow can appear more than once with a different persona override, different variables, or different `overrides`: attaching it once per value of one property is how you compare that property without a template.\n\n- `includeAutomaticMetrics?: boolean`\n Let the run add metrics by itself off the attached flows, on top of the `metrics` named here.\n\nTwo attach this way today: Agent Expectations wherever an attached flow has agent expectations\nwritten on it, and Keypad Entry wherever one has steps where the agent is expected to press keys.\nBoth grade something authored on the flow that nothing else measures, which is why it is on by\ndefault.\n\nSet false when the `metrics` list is meant to be exhaustive: a plan testing only whether the caller\ncan complete the flow may not want the agent graded on its expectations as well. False also pins\nthe plan against any automatic metric Roark adds later.\n\n- `includeFlowMetrics?: boolean`\n Also collect each attached flow's own metrics, on top of the `metrics` named here.\n\nDefault true, which is what you want when you brought your own flows and their graders.\nSet false for a run whose metric list is meant to be exhaustive: a template like Load\nTesting or Voicemail deliberately grades a narrow set, and inheriting every flow metric\non top multiplies analysis cost across the volume without adding signal.\n\nGET /v1/simulation/template returns the value each template expects.\n\n- `iterationCount?: number`\n Number of iterations to run for each test case (1-10000)\n\n- `maxConcurrentJobs?: number`\n Maximum number of concurrent simulation jobs\n\n- `personas?: { id: string; }[]`\n Personas to include in this run plan. Required with `scenarios`; ignored with `flows`, where each variant carries its own persona.\n\n- `scenarios?: { id: string; variables?: object; }[]`\n Deprecated: use `flows` instead. Scenarios to include in this run plan. The same scenario ID can appear multiple times with different variables.\n\n- `silenceTimeoutSeconds?: number`\n Timeout in seconds for silence detection\n\n### Returns\n\n- `{ data: { runPlan: { id: string; agentEndpoints: object[]; comparisonBaseline: string; comparisonProperty: string; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; enrichWithLiveConversation: boolean; evaluators: object[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: object[]; includeAutomaticMetrics: boolean; includeFlowMetrics: boolean; isConfigManaged: boolean; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: object[]; name: string; personas: object[]; scenarios: object[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; runPlanJob?: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }; }`\n\n - `data: { runPlan: { id: string; agentEndpoints: { id: string; }[]; comparisonBaseline: string; comparisonProperty: string; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; enrichWithLiveConversation: boolean; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id?: string; edgeCases?: 'ALL' | object[]; happyPath?: boolean; overrides?: object[]; personaOverrideId?: string; slug?: string; variables?: object; }[]; includeAutomaticMetrics: boolean; includeFlowMetrics: boolean; isConfigManaged: boolean; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; runPlanJob?: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlan = await client.simulationRunPlan.create({\n agentEndpoints: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n direction: 'INBOUND',\n maxSimulationDurationSeconds: 300,\n metrics: [{}],\n name: 'My Run Plan',\n});\n\nconsole.log(simulationRunPlan);\n```",
|
|
1250
|
+
"## create\n\n`client.simulationRunPlan.create(agentEndpoints: { id: string; }[], direction: 'INBOUND' | 'OUTBOUND', maxSimulationDurationSeconds: number, metrics: { id?: string; conversationSource?: 'SIMULATED' | 'LIVE'; metricId?: string; minPassRate?: number; slug?: string; }[], name: string, autoRun?: boolean, comparisonBaseline?: string, comparisonProperty?: string, comparisonValues?: string[], description?: string, endCallPhrases?: string[], endCallReasons?: string[], enrichWithLiveConversation?: boolean, executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT', flows?: { id?: string; edgeCases?: 'ALL' | { id?: string; personaOverrideId?: string; slug?: string; variables?: object; }[]; happyPath?: boolean; overrides?: { property: string; value: string; }[]; personaOverrideId?: string; slug?: string; variables?: object; }[], includeAutomaticMetrics?: boolean, includeFlowMetrics?: boolean, iterationCount?: number, maxConcurrentJobs?: number, personas?: { id: string; }[], scenarios?: { id: string; variables?: object; }[], silenceTimeoutSeconds?: number): { data: object; }`\n\n**post** `/v1/simulation/plan`\n\nCreates a new simulation run plan.\n\nTo run a simulation, use POST /v1/simulation/run instead: it starts a run from a plan or\nfrom an inline configuration, and takes runtime variables. Create a plan here when you want\na reusable, named one to run later.\n\n### Parameters\n\n- `agentEndpoints: { id: string; }[]`\n Agent endpoints to include in this run plan\n\n- `direction: 'INBOUND' | 'OUTBOUND'`\n Direction of the simulation (INBOUND or OUTBOUND)\n\n- `maxSimulationDurationSeconds: number`\n Maximum duration in seconds for each simulation\n\n- `metrics: { id?: string; conversationSource?: 'SIMULATED' | 'LIVE'; metricId?: string; minPassRate?: number; slug?: string; }[]`\n Metric definitions to include in this run plan. Reference each by `id` (UUID) or `slug`.\n\n- `name: string`\n Name of the run plan\n\n- `autoRun?: boolean`\n Deprecated: use POST /v1/simulation/run, which starts a run and accepts runtime `variables` as well. This flag runs the plan with only the values pinned on it.\n\n- `comparisonBaseline?: string`\n The reference value of `comparisonProperty`, for example `NONE` for `BACKGROUND_NOISE` or\n`NORMAL` for `SPEECH_PACE`: shown first in the results. Must be a value that property can take.\nWhether a value did significantly worse does not depend on it: that is decided against every\nother value combined (see `sweepAttribution`).\n\nStored rather than assumed, so the report can say \"compared against US accent\" instead of\nimplying Roark decided which value is normal. Most properties have an obvious baseline and\nthe dashboard prefills it; `GENDER` has none, so choose the one you are testing against.\n\n- `comparisonProperty?: string`\n The property this run plan investigates: the one thing its arms differ by.\n\nSet it and the run report compares the arms on that property, so a run answers \"what did\nbackground noise cost\" rather than just \"what did each arm score\". Every value is a field\nalready recorded on each call, so the report can label an arm `CRYING_BABY` rather than\nrepeating a flow variant's title.\n\nOmit it and the report still compares when it can: it detects which property varies across\nthe arms. Setting it is what tells the written summary what you were trying to find out,\nwhich detection cannot infer.\n\n- `comparisonValues?: string[]`\n Which values of `comparisonProperty` to run. This is what the plan costs: the flow is\nattached once per value, so ten values is ten times the calls of one.\n\nOmit it to run every value the property has, which for `ACCENT` is more than twenty. Send a\nsubset to narrow the sweep, for example three accents you actually serve. A\n`comparisonBaseline` outside this set is rejected, because it would anchor every difference\nto an arm the run never made.\n\nNot stored as a field: the arms are the values. Reading the plan back returns them as its\nflow attachments.\n\n- `description?: string`\n Description of the run plan\n\n- `endCallPhrases?: string[]`\n Phrases that trigger end of call. Empty array disables the feature.\n\n- `endCallReasons?: string[]`\n Semantic conditions that trigger end of call. The LLM evaluates the conversation against these conditions. Empty array disables the feature.\n\n- `enrichWithLiveConversation?: boolean`\n Merge the customer's own recording of the real call into each simulation, so metrics can be\nscored against the live leg as well as the simulated one. This is the API equivalent of the\ndashboard's live-enrichment toggle.\n\nWith this on, the run provisions a phone number and holds each call open for up to 15 minutes\nwaiting for a matching call to be posted to POST /v1/call. A call matches on the provisioned\nnumber (`roarkPhoneNumber` on the job) with a start time inside the simulation window. If\nnothing arrives, the simulation still completes and any `LIVE`-sourced metric produces no value.\n\nRequired by any metric whose `requiresLiveConversation` is true: without it that metric is\nsilently skipped.\n\n- `executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'`\n Execution mode (PARALLEL or SEQUENTIAL)\n\n- `flows?: { id?: string; edgeCases?: 'ALL' | { id?: string; personaOverrideId?: string; slug?: string; variables?: object; }[]; happyPath?: boolean; overrides?: { property: string; value: string; }[]; personaOverrideId?: string; slug?: string; variables?: object; }[]`\n Customer flows to include in this run plan. The same flow can appear more than once with a different persona override, different variables, or different `overrides`: attaching it once per value of one property is how you compare that property without a template.\n\n- `includeAutomaticMetrics?: boolean`\n Let the run add metrics by itself off the attached flows, on top of the `metrics` named here.\n\nTwo attach this way today: Agent Expectations wherever an attached flow has agent expectations\nwritten on it, and Keypad Entry wherever one has steps where the agent is expected to press keys.\nBoth grade something authored on the flow that nothing else measures, which is why it is on by\ndefault.\n\nSet false when the `metrics` list is meant to be exhaustive: a plan testing only whether the caller\ncan complete the flow may not want the agent graded on its expectations as well. False also pins\nthe plan against any automatic metric Roark adds later.\n\n- `includeFlowMetrics?: boolean`\n Also collect each attached flow's own metrics, on top of the `metrics` named here.\n\nDefault true, which is what you want when you brought your own flows and their graders.\nSet false for a run whose metric list is meant to be exhaustive: a template like Load\nTesting or Voicemail deliberately grades a narrow set, and inheriting every flow metric\non top multiplies analysis cost across the volume without adding signal.\n\nGET /v1/simulation/template returns the value each template expects.\n\n- `iterationCount?: number`\n Number of iterations to run for each test case (1-10000)\n\n- `maxConcurrentJobs?: number`\n Maximum number of concurrent simulation jobs\n\n- `personas?: { id: string; }[]`\n Personas to include in this run plan. Required with `scenarios`; ignored with `flows`, where each variant carries its own persona.\n\n- `scenarios?: { id: string; variables?: object; }[]`\n Deprecated: use `flows` instead. Scenarios to include in this run plan. The same scenario ID can appear multiple times with different variables.\n\n- `silenceTimeoutSeconds?: number`\n Timeout in seconds for silence detection\n\n### Returns\n\n- `{ data: { runPlan: { id: string; agentEndpoints: object[]; comparisonBaseline: string; comparisonProperty: string; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; enrichWithLiveConversation: boolean; evaluators: object[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: object[]; includeAutomaticMetrics: boolean; includeFlowMetrics: boolean; isConfigManaged: boolean; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: object[]; name: string; personas: object[]; scenarios: object[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; runPlanJob?: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }; }`\n\n - `data: { runPlan: { id: string; agentEndpoints: { id: string; }[]; comparisonBaseline: string; comparisonProperty: string; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; enrichWithLiveConversation: boolean; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id?: string; edgeCases?: 'ALL' | object[]; happyPath?: boolean; overrides?: object[]; personaOverrideId?: string; slug?: string; variables?: object; }[]; includeAutomaticMetrics: boolean; includeFlowMetrics: boolean; isConfigManaged: boolean; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; runPlanJob?: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlan = await client.simulationRunPlan.create({\n agentEndpoints: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n direction: 'INBOUND',\n maxSimulationDurationSeconds: 300,\n metrics: [{}],\n name: 'My Run Plan',\n});\n\nconsole.log(simulationRunPlan);\n```",
|
|
1093
1251
|
perLanguage: {
|
|
1094
1252
|
typescript: {
|
|
1095
1253
|
method: 'client.simulationRunPlan.create',
|
|
@@ -1143,7 +1301,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1143
1301
|
response:
|
|
1144
1302
|
"{ data: { id: string; agentEndpoints: { id: string; }[]; comparisonBaseline: string; comparisonProperty: string; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; enrichWithLiveConversation: boolean; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id?: string; edgeCases?: 'ALL' | object[]; happyPath?: boolean; overrides?: object[]; personaOverrideId?: string; slug?: string; variables?: object; }[]; includeAutomaticMetrics: boolean; includeFlowMetrics: boolean; isConfigManaged: boolean; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; }",
|
|
1145
1303
|
markdown:
|
|
1146
|
-
"## update\n\n`client.simulationRunPlan.update(planId: string, agentEndpoints?: { id: string; }[], comparisonBaseline?: string, comparisonProperty?: string, comparisonValues?: string[], description?: string, direction?: 'INBOUND' | 'OUTBOUND', endCallPhrases?: string[], endCallReasons?: string[], enrichWithLiveConversation?: boolean, executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT', flows?: { id?: string; edgeCases?: 'ALL' | { id?: string; personaOverrideId?: string; slug?: string; variables?: object; }[]; happyPath?: boolean; overrides?: { property: string; value: string; }[]; personaOverrideId?: string; slug?: string; variables?: object; }[], includeAutomaticMetrics?: boolean, includeFlowMetrics?: boolean, isHidden?: boolean, iterationCount?: number, maxConcurrentJobs?: number, maxSimulationDurationSeconds?: number, metrics?: { id?: string; conversationSource?: 'SIMULATED' | 'LIVE'; metricId?: string; minPassRate?: number; slug?: string; }[], name?: string, personas?: { id: string; }[], scenarios?: { id: string; variables?: object; }[], silenceTimeoutSeconds?: number): { data: object; }`\n\n**put** `/v1/simulation/plan/{planId}`\n\nUpdates an existing simulation run plan by its ID.\n\n### Parameters\n\n- `planId: string`\n\n- `agentEndpoints?: { id: string; }[]`\n Agent endpoints to include in this run plan\n\n- `comparisonBaseline?: string`\n The value
|
|
1304
|
+
"## update\n\n`client.simulationRunPlan.update(planId: string, agentEndpoints?: { id: string; }[], comparisonBaseline?: string, comparisonProperty?: string, comparisonValues?: string[], description?: string, direction?: 'INBOUND' | 'OUTBOUND', endCallPhrases?: string[], endCallReasons?: string[], enrichWithLiveConversation?: boolean, executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT', flows?: { id?: string; edgeCases?: 'ALL' | { id?: string; personaOverrideId?: string; slug?: string; variables?: object; }[]; happyPath?: boolean; overrides?: { property: string; value: string; }[]; personaOverrideId?: string; slug?: string; variables?: object; }[], includeAutomaticMetrics?: boolean, includeFlowMetrics?: boolean, isHidden?: boolean, iterationCount?: number, maxConcurrentJobs?: number, maxSimulationDurationSeconds?: number, metrics?: { id?: string; conversationSource?: 'SIMULATED' | 'LIVE'; metricId?: string; minPassRate?: number; slug?: string; }[], name?: string, personas?: { id: string; }[], scenarios?: { id: string; variables?: object; }[], silenceTimeoutSeconds?: number): { data: object; }`\n\n**put** `/v1/simulation/plan/{planId}`\n\nUpdates an existing simulation run plan by its ID.\n\n### Parameters\n\n- `planId: string`\n\n- `agentEndpoints?: { id: string; }[]`\n Agent endpoints to include in this run plan\n\n- `comparisonBaseline?: string`\n The reference value, shown first in the results. See `POST /v1/simulation/plan`.\n\nA real value cannot be sent on its own: the property it belongs to decides which values are\nlegal, and an omitted property means \"leave unchanged\", which this endpoint cannot check a\nbaseline against. Send `comparisonProperty` with it, or get a `400`.\n\n`null` on its own IS allowed, and clears just the baseline while leaving the property set.\nNothing needs validating when clearing, and a property with no baseline is a real state: the\nreport falls back to that property's own norm, and `GENDER` has no norm to fall back to.\n\n- `comparisonProperty?: string`\n The property this plan investigates. Send `null` to clear the comparison; omit the field to\nleave it unchanged. See `POST /v1/simulation/plan`.\n\nThe pair moves together. Sending `comparisonProperty` also sets `comparisonBaseline` to\nwhatever this request carries, or to `null` if it carries none, because a baseline is a value\nof one specific property and keeping the old one would store a pair that is not valid.\n\n- `comparisonValues?: string[]`\n Which values of `comparisonProperty` to run. See `POST /v1/simulation/plan`.\n\nOmitting it keeps the arms the plan already has, so an edit that only renames the plan\nnever widens a sweep you deliberately narrowed, and never multiplies what it costs.\n\n- `description?: string`\n Description of the run plan\n\n- `direction?: 'INBOUND' | 'OUTBOUND'`\n Direction of the simulation (INBOUND or OUTBOUND)\n\n- `endCallPhrases?: string[]`\n Phrases that trigger end of call. Empty array disables the feature.\n\n- `endCallReasons?: string[]`\n Semantic conditions that trigger end of call. The LLM evaluates the conversation against these conditions. Empty array disables the feature.\n\n- `enrichWithLiveConversation?: boolean`\n Whether to merge the customer's own live recording into each simulation of this plan.\n\n- `executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'`\n Execution mode (PARALLEL or SEQUENTIAL)\n\n- `flows?: { id?: string; edgeCases?: 'ALL' | { id?: string; personaOverrideId?: string; slug?: string; variables?: object; }[]; happyPath?: boolean; overrides?: { property: string; value: string; }[]; personaOverrideId?: string; slug?: string; variables?: object; }[]`\n Replaces the customer flows attached to this run plan. Omit to leave them unchanged; send an empty array to detach them all.\n\n- `includeAutomaticMetrics?: boolean`\n Whether to let the run add metrics by itself off the attached flows. See `POST /v1/simulation/plan`.\n\n- `includeFlowMetrics?: boolean`\n Whether to also collect each attached flow's own metrics, on top of this plan's list.\n\n- `isHidden?: boolean`\n Whether this plan is hidden from GET /v1/simulation/plan.\n\nA run started without `saveAsPlan` creates a hidden plan to carry it. Send\n`{ \"name\": \"...\", \"isHidden\": false }` to keep that configuration as a reusable plan,\nwhich is what the app does when you save a one-off run.\n\n- `iterationCount?: number`\n Number of iterations to run for each test case (1-10000)\n\n- `maxConcurrentJobs?: number`\n Maximum number of concurrent simulation jobs\n\n- `maxSimulationDurationSeconds?: number`\n Maximum duration in seconds for each simulation\n\n- `metrics?: { id?: string; conversationSource?: 'SIMULATED' | 'LIVE'; metricId?: string; minPassRate?: number; slug?: string; }[]`\n Metric definitions to include in this run plan. Reference each by `id` (UUID) or `slug`.\n\n- `name?: string`\n Name of the run plan\n\n- `personas?: { id: string; }[]`\n Personas to include in this run plan\n\n- `scenarios?: { id: string; variables?: object; }[]`\n Deprecated: use `flows` instead. Replaces the scenarios on this run plan. Omit to leave them unchanged; send an empty array to detach them all, which is how a scenario-based plan is moved over to flows.\n\n- `silenceTimeoutSeconds?: number`\n Timeout in seconds for silence detection\n\n### Returns\n\n- `{ data: { id: string; agentEndpoints: { id: string; }[]; comparisonBaseline: string; comparisonProperty: string; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; enrichWithLiveConversation: boolean; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id?: string; edgeCases?: 'ALL' | object[]; happyPath?: boolean; overrides?: object[]; personaOverrideId?: string; slug?: string; variables?: object; }[]; includeAutomaticMetrics: boolean; includeFlowMetrics: boolean; isConfigManaged: boolean; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }; }`\n\n - `data: { id: string; agentEndpoints: { id: string; }[]; comparisonBaseline: string; comparisonProperty: string; createdAt: string; direction: 'INBOUND' | 'OUTBOUND'; endCallPhrases: string[]; endCallReasons: string[]; enrichWithLiveConversation: boolean; evaluators: { id: string; }[]; executionMode: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; flows: { id?: string; edgeCases?: 'ALL' | { id?: string; personaOverrideId?: string; slug?: string; variables?: object; }[]; happyPath?: boolean; overrides?: { property: string; value: string; }[]; personaOverrideId?: string; slug?: string; variables?: object; }[]; includeAutomaticMetrics: boolean; includeFlowMetrics: boolean; isConfigManaged: boolean; iterationCount: number; maxConcurrentJobs: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; testCaseCount: number; updatedAt: string; description?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlan = await client.simulationRunPlan.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(simulationRunPlan);\n```",
|
|
1147
1305
|
perLanguage: {
|
|
1148
1306
|
typescript: {
|
|
1149
1307
|
method: 'client.simulationRunPlan.update',
|
|
@@ -1238,9 +1396,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1238
1396
|
qualified: 'client.simulationRunPlanJob.getByID',
|
|
1239
1397
|
params: ['jobId: string;'],
|
|
1240
1398
|
response:
|
|
1241
|
-
'{ data: { createdAt: string; simulationJobs: { agentEndpoint: object; createdAt: string; invalidation: object; persona: object; processingStatus: string; scenario: object; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }[]; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; endedAt?: string; startedAt?: string; verdict?: { checks: object[]; failures: object[]; passed: boolean; score: number; }; }; }',
|
|
1399
|
+
'{ data: { createdAt: string; simulationJobs: { agentEndpoint: object; createdAt: string; invalidation: object; persona: object; processingStatus: string; scenario: object; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }[]; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; endedAt?: string; startedAt?: string; sweepAttribution?: { caveats: string[]; checks: object[]; falseDiscoveryRate: number; foundUnattributedFailureRate: number; minArmCalls: number; minimumDetectableGap: number; testableValueCount: number; testedComparisonCount: number; values: object[]; }; verdict?: { checks: object[]; failures: object[]; passed: boolean; score: number; }; }; }',
|
|
1242
1400
|
markdown:
|
|
1243
|
-
"## getById\n\n`client.simulationRunPlanJob.getByID(jobId: string): { data: object; }`\n\n**get** `/v1/simulation/plan/job/{jobId}`\n\nRetrieve details of a simulation plan job including all associated simulation jobs (calls)\n\n### Parameters\n\n- `jobId: string`\n\n### Returns\n\n- `{ data: { createdAt: string; simulationJobs: { agentEndpoint: object; createdAt: string; invalidation: object; persona: object; processingStatus: string; scenario: object; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }[]; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; endedAt?: string; startedAt?: string; verdict?: { checks: object[]; failures: object[]; passed: boolean; score: number; }; }; }`\n\n - `data: { createdAt: string; simulationJobs: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }[]; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; endedAt?: string; startedAt?: string; verdict?: { checks: { evaluatedSims: number; inherited: boolean; metricDefinitionId: string; minPassRate: number; passRate: number; passed: boolean; passedSims: number; metricName?: string; }[]; failures: { status: string; type: 'RUN_NOT_COMPLETED'; } | { evaluatedCalls: number; expectedCalls: number; type: 'INCOMPLETE_COVERAGE'; } | { metricDefinitionId: string; type: 'METRIC_NOT_EVALUATED'; metricName?: string; } | { inherited: boolean; metricDefinitionId: string; minPassRate: number; passRate: number; type: 'METRIC_BELOW_MIN_PASS_RATE'; metricName?: string; }[]; passed: boolean; score: number; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationRunPlanJob.getByID('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response);\n```",
|
|
1401
|
+
"## getById\n\n`client.simulationRunPlanJob.getByID(jobId: string): { data: object; }`\n\n**get** `/v1/simulation/plan/job/{jobId}`\n\nRetrieve details of a simulation plan job including all associated simulation jobs (calls)\n\n### Parameters\n\n- `jobId: string`\n\n### Returns\n\n- `{ data: { createdAt: string; simulationJobs: { agentEndpoint: object; createdAt: string; invalidation: object; persona: object; processingStatus: string; scenario: object; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }[]; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; endedAt?: string; startedAt?: string; sweepAttribution?: { caveats: string[]; checks: object[]; falseDiscoveryRate: number; foundUnattributedFailureRate: number; minArmCalls: number; minimumDetectableGap: number; testableValueCount: number; testedComparisonCount: number; values: object[]; }; verdict?: { checks: object[]; failures: object[]; passed: boolean; score: number; }; }; }`\n\n - `data: { createdAt: string; simulationJobs: { agentEndpoint: { id: string; name: string; phoneNumber: string; type: string; }; createdAt: string; invalidation: { invalidatedAt: string; reason: 'SCRIPT_DIVERGED' | 'REQUIRED_STEP_NOT_REACHED' | 'REQUIRED_STAGE_INCOMPLETE' | 'CALLER_NEVER_TOOK_OVER'; detail?: string; }; persona: { id: string; accent: string; age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise: string; baseEmotion: string; confirmationStyle: 'EXPLICIT' | 'VAGUE'; createdAt: string; gender: 'MALE' | 'FEMALE'; hasDisfluencies: boolean; idleMessageMaxSpokenCount: number; idleMessageResetCountOnUserSpeechEnabled: boolean; idleMessages: string[]; idleTimeoutSeconds: number; intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; language: string; memoryReliability: 'HIGH' | 'LOW'; name: string; properties: object; responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages: string[]; updatedAt: string; backstoryPrompt?: string; description?: string; displayName?: string; secondaryLanguage?: 'EN'; }; processingStatus: string; scenario: { id: string; description?: string; }; simulationJobId: string; status: string; callId?: string; completedAt?: string; roarkPhoneNumber?: string; startedAt?: string; }[]; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; endedAt?: string; startedAt?: string; sweepAttribution?: { caveats: string[]; checks: { attribution: 'PROPERTY_ATTRIBUTABLE' | 'FOUND_UNATTRIBUTED' | 'WITHIN_NOISE'; evaluated: number; failed: number; failureRate: number; metricDefinitionId: string; metricName: string; worseValues: object[]; }[]; falseDiscoveryRate: number; foundUnattributedFailureRate: number; minArmCalls: number; minimumDetectableGap: number; testableValueCount: number; testedComparisonCount: number; values: { attempted: number; counted: number; isBaseline: boolean; label: string; score: number; testable: boolean; value: string; }[]; }; verdict?: { checks: { evaluatedSims: number; inherited: boolean; metricDefinitionId: string; minPassRate: number; passRate: number; passed: boolean; passedSims: number; metricName?: string; }[]; failures: { status: string; type: 'RUN_NOT_COMPLETED'; } | { evaluatedCalls: number; expectedCalls: number; type: 'INCOMPLETE_COVERAGE'; } | { metricDefinitionId: string; type: 'METRIC_NOT_EVALUATED'; metricName?: string; } | { inherited: boolean; metricDefinitionId: string; minPassRate: number; passRate: number; type: 'METRIC_BELOW_MIN_PASS_RATE'; metricName?: string; }[]; passed: boolean; score: number; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationRunPlanJob.getByID('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');\n\nconsole.log(response);\n```",
|
|
1244
1402
|
perLanguage: {
|
|
1245
1403
|
typescript: {
|
|
1246
1404
|
method: 'client.simulationRunPlanJob.getByID',
|
|
@@ -3398,13 +3556,13 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3398
3556
|
stainlessPath: '(resource) config > (method) diff',
|
|
3399
3557
|
qualified: 'client.config.diff',
|
|
3400
3558
|
params: [
|
|
3401
|
-
"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[]; 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[]; 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'; 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; } | { 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; silenceTimeoutSeconds?: number; } | { 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; }[];",
|
|
3559
|
+
"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[]; 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[]; 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'; 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; } | { 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; 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: 'qa'; 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; metrics?: string[]; silenceTimeoutSeconds?: number; } | { 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; invocationCriteria?: string; parameters?: object; }[];",
|
|
3402
3560
|
'prune?: boolean;',
|
|
3403
3561
|
],
|
|
3404
3562
|
response:
|
|
3405
3563
|
"{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }; }",
|
|
3406
3564
|
markdown:
|
|
3407
|
-
"## 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[]; 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[]; 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'; 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; } | { 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; silenceTimeoutSeconds?: number; } | { 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; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/diff`\n\nDry run for a config-as-code apply: returns the projected changes (create / update / delete) for the submitted bundle without writing anything. Submit the full desired set of resources; identity is by name — no ids in the bundle. Run this before apply to preview what would change.\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[]; 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[]; 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'; 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; } | { 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; silenceTimeoutSeconds?: number; } | { 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; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.config.diff({ resources: [{ kind: 'agent', name: 'x' }] });\n\nconsole.log(response);\n```",
|
|
3565
|
+
"## 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[]; 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[]; 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'; 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; } | { 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; 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: 'qa'; 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; metrics?: string[]; silenceTimeoutSeconds?: number; } | { 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; invocationCriteria?: string; parameters?: object; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/diff`\n\nDry run for a config-as-code apply: returns the projected changes (create / update / delete) for the submitted bundle without writing anything. Submit the full desired set of resources; identity is by name — no ids in the bundle. Run this before apply to preview what would change.\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[]; 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[]; 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'; 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; } | { 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; 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: 'qa'; 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; metrics?: string[]; silenceTimeoutSeconds?: number; } | { 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; invocationCriteria?: string; parameters?: 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; }[]; 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; }[]; 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```",
|
|
3408
3566
|
perLanguage: {
|
|
3409
3567
|
typescript: {
|
|
3410
3568
|
method: 'client.config.diff',
|
|
@@ -3432,13 +3590,13 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3432
3590
|
stainlessPath: '(resource) config > (method) apply',
|
|
3433
3591
|
qualified: 'client.config.apply',
|
|
3434
3592
|
params: [
|
|
3435
|
-
"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[]; 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[]; 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'; 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; } | { 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; silenceTimeoutSeconds?: number; } | { 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; }[];",
|
|
3593
|
+
"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[]; 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[]; 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'; 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; } | { 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; 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: 'qa'; 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; metrics?: string[]; silenceTimeoutSeconds?: number; } | { 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; invocationCriteria?: string; parameters?: object; }[];",
|
|
3436
3594
|
'prune?: boolean;',
|
|
3437
3595
|
],
|
|
3438
3596
|
response:
|
|
3439
3597
|
"{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }; }",
|
|
3440
3598
|
markdown:
|
|
3441
|
-
"## 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[]; 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[]; 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'; 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; } | { 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; silenceTimeoutSeconds?: number; } | { 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; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/apply`\n\nReconcile a config-as-code bundle into the project. Submit the full desired set of resources; resources already managed by config are updated, new ones created, and (unless prune is false) config-managed resources absent from the bundle are deleted. Identity is by name — no ids in the bundle.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; 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[]; 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[]; 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'; 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; } | { 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; silenceTimeoutSeconds?: number; } | { 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; }[]`\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; 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; 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```",
|
|
3599
|
+
"## 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[]; 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[]; 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'; 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; } | { 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; 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: 'qa'; 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; metrics?: string[]; silenceTimeoutSeconds?: number; } | { 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; invocationCriteria?: string; parameters?: object; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/apply`\n\nReconcile a config-as-code bundle into the project. Submit the full desired set of resources; resources already managed by config are updated, new ones created, and (unless prune is false) config-managed resources absent from the bundle are deleted. Identity is by name — no ids in the bundle.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; 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[]; 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[]; 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'; 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; } | { 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; 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: 'qa'; 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; metrics?: string[]; silenceTimeoutSeconds?: number; } | { 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; invocationCriteria?: string; parameters?: 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; 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; 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```",
|
|
3442
3600
|
perLanguage: {
|
|
3443
3601
|
typescript: {
|
|
3444
3602
|
method: 'client.config.apply',
|