@roarkanalytics/sdk-mcp 4.34.1 → 4.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/client-headers.d.mts +2 -2
- package/client-headers.d.ts +2 -2
- package/client-headers.js +1 -1
- package/client-headers.mjs +1 -1
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +6 -0
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +6 -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 +175 -18
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +175 -18
- 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 +36 -0
- package/methods.js.map +1 -1
- package/methods.mjs +36 -0
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/client-headers.ts +1 -1
- package/src/code-tool-worker.ts +6 -0
- package/src/local-docs-search.ts +209 -18
- package/src/methods.ts +36 -0
- package/src/server.ts +1 -1
package/local-docs-search.mjs
CHANGED
|
@@ -854,8 +854,8 @@ const EMBEDDED_METHODS = [
|
|
|
854
854
|
stainlessPath: '(resource) metric > (method) listDefinitions',
|
|
855
855
|
qualified: 'client.metric.listDefinitions',
|
|
856
856
|
params: ['after?: string;', 'limit?: number;'],
|
|
857
|
-
response: "{ data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PROVIDER'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: string; countThreshold: number; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: object[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: object; triggerCombinator: 'AND' | 'OR'; triggers: object[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }[]; pagination: { hasMore: boolean; limit: number; nextCursor: string; }; }",
|
|
858
|
-
markdown: "## listDefinitions\n\n`client.metric.listDefinitions(after?: string, limit?: number): { data: object[]; pagination: object; }`\n\n**get** `/v1/metric/definitions`\n\nFetch metric definitions available in the project, including both system-generated and custom metrics. Results are ordered by immutable definition ID; pass `nextCursor` to retrieve the following page.\n\n### Parameters\n\n- `after?: string`\n\n- `limit?: number`\n\n### Returns\n\n- `{ data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PROVIDER'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: string; countThreshold: number; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: object[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: object; triggerCombinator: 'AND' | 'OR'; triggers: object[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }[]; pagination: { hasMore: boolean; limit: number; nextCursor: string; }; }`\n Cursor-paginated metric definitions available in the project\n\n - `data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PROVIDER'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: string; countThreshold: number; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: { sourceMetricDefinitionId: string; sourceVariantId: string; }[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: { operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; windowAfter: number; windowBefore: number; }; triggerCombinator: 'AND' | 'OR'; triggers: { operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }[]`\n - `pagination: { hasMore: boolean; limit: number; nextCursor: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.metric.listDefinitions();\n\nconsole.log(response);\n```",
|
|
857
|
+
response: "{ data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PROVIDER'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: string; countThreshold: number; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: object[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: object; triggerCombinator: 'AND' | 'OR'; triggers: object[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'HTTP_REQUEST'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; httpRequest: { body: string; headers: object; method: 'GET' | 'POST'; url: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }[]; pagination: { hasMore: boolean; limit: number; nextCursor: string; }; }",
|
|
858
|
+
markdown: "## listDefinitions\n\n`client.metric.listDefinitions(after?: string, limit?: number): { data: object[]; pagination: object; }`\n\n**get** `/v1/metric/definitions`\n\nFetch metric definitions available in the project, including both system-generated and custom metrics. Results are ordered by immutable definition ID; pass `nextCursor` to retrieve the following page.\n\n### Parameters\n\n- `after?: string`\n\n- `limit?: number`\n\n### Returns\n\n- `{ data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PROVIDER'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: string; countThreshold: number; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: object[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: object; triggerCombinator: 'AND' | 'OR'; triggers: object[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'HTTP_REQUEST'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; httpRequest: { body: string; headers: object; method: 'GET' | 'POST'; url: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }[]; pagination: { hasMore: boolean; limit: number; nextCursor: string; }; }`\n Cursor-paginated metric definitions available in the project\n\n - `data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PROVIDER'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: string; countThreshold: number; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: { sourceMetricDefinitionId: string; sourceVariantId: string; }[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: { operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; windowAfter: number; windowBefore: number; }; triggerCombinator: 'AND' | 'OR'; triggers: { operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'HTTP_REQUEST'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; httpRequest: { body: string; headers: object; method: 'GET' | 'POST'; url: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }[]`\n - `pagination: { hasMore: boolean; limit: number; nextCursor: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.metric.listDefinitions();\n\nconsole.log(response);\n```",
|
|
859
859
|
perLanguage: {
|
|
860
860
|
typescript: {
|
|
861
861
|
method: 'client.metric.listDefinitions',
|
|
@@ -878,8 +878,8 @@ const EMBEDDED_METHODS = [
|
|
|
878
878
|
description: 'Create a new metric definition. The `calculationType` field selects the variant: LLM_JUDGE (LLM-evaluated), FORMULA (computed from a math expression over other metrics), or PATTERN (detects a trigger→outcome pattern within a window). To create a threshold on top of an existing metric, use `POST /metric/definitions/{idOrSlug}/thresholds` instead.',
|
|
879
879
|
stainlessPath: '(resource) metric > (method) createDefinition',
|
|
880
880
|
qualified: 'client.metric.createDefinition',
|
|
881
|
-
response: "{ data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: object[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: object; triggerCombinator: 'AND' | 'OR'; triggers: object[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }; }",
|
|
882
|
-
markdown: "## createDefinition\n\n`client.metric.createDefinition(): { data: object; }`\n\n**post** `/v1/metric/definitions`\n\nCreate a new metric definition. The `calculationType` field selects the variant: LLM_JUDGE (LLM-evaluated), FORMULA (computed from a math expression over other metrics), or PATTERN (detects a trigger→outcome pattern within a window). To create a threshold on top of an existing metric, use `POST /metric/definitions/{idOrSlug}/thresholds` instead.\n\n### Returns\n\n- `{ data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: object[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: object; triggerCombinator: 'AND' | 'OR'; triggers: object[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }; }`\n\n - `data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: { sourceMetricDefinitionId: string; sourceVariantId: string; }[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: { operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; windowAfter: number; windowBefore: number; }; triggerCombinator: 'AND' | 'OR'; triggers: { operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.metric.createDefinition({\n calculationType: 'LLM_JUDGE',\n name: 'Customer Satisfaction',\n outputType: 'BOOLEAN',\n});\n\nconsole.log(response);\n```",
|
|
881
|
+
response: "{ data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: object[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: object; triggerCombinator: 'AND' | 'OR'; triggers: object[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'HTTP_REQUEST'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; httpRequest: { body: string; headers: object; method: 'GET' | 'POST'; url: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }; }",
|
|
882
|
+
markdown: "## createDefinition\n\n`client.metric.createDefinition(): { data: object; }`\n\n**post** `/v1/metric/definitions`\n\nCreate a new metric definition. The `calculationType` field selects the variant: LLM_JUDGE (LLM-evaluated), FORMULA (computed from a math expression over other metrics), or PATTERN (detects a trigger→outcome pattern within a window). To create a threshold on top of an existing metric, use `POST /metric/definitions/{idOrSlug}/thresholds` instead.\n\n### Returns\n\n- `{ data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: object[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: object; triggerCombinator: 'AND' | 'OR'; triggers: object[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'HTTP_REQUEST'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; httpRequest: { body: string; headers: object; method: 'GET' | 'POST'; url: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }; }`\n\n - `data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: { sourceMetricDefinitionId: string; sourceVariantId: string; }[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: { operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; windowAfter: number; windowBefore: number; }; triggerCombinator: 'AND' | 'OR'; triggers: { operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'HTTP_REQUEST'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; httpRequest: { body: string; headers: object; method: 'GET' | 'POST'; url: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.metric.createDefinition({\n calculationType: 'LLM_JUDGE',\n name: 'Customer Satisfaction',\n outputType: 'BOOLEAN',\n});\n\nconsole.log(response);\n```",
|
|
883
883
|
perLanguage: {
|
|
884
884
|
typescript: {
|
|
885
885
|
method: 'client.metric.createDefinition',
|
|
@@ -911,6 +911,7 @@ const EMBEDDED_METHODS = [
|
|
|
911
911
|
'changeReason?: string;',
|
|
912
912
|
'classificationOptions?: { description: string; displayOrder: number; label: string; }[];',
|
|
913
913
|
'formula?: string;',
|
|
914
|
+
"httpRequest?: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; };",
|
|
914
915
|
'llmPrompt?: string;',
|
|
915
916
|
'maxClassifications?: number;',
|
|
916
917
|
'metricId?: object;',
|
|
@@ -930,8 +931,8 @@ const EMBEDDED_METHODS = [
|
|
|
930
931
|
'supportsMultipleVariants?: object;',
|
|
931
932
|
'toolDefinitionIds?: string[];',
|
|
932
933
|
],
|
|
933
|
-
response: "{ data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: object[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: object; triggerCombinator: 'AND' | 'OR'; triggers: object[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: string; countThreshold: number; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; }; }",
|
|
934
|
-
markdown: "## updateDefinition\n\n`client.metric.updateDefinition(idOrSlug: string, analysisPackageId?: object, booleanFalseLabel?: string, booleanTrueLabel?: string, calcType?: object, changeReason?: string, classificationOptions?: { description: string; displayOrder: number; label: string; }[], formula?: string, llmPrompt?: string, maxClassifications?: number, metricId?: object, name?: string, organizationId?: object, outputType?: object, participantRole?: object, projectId?: object, scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[], scaleMax?: number, scaleMin?: number, scope?: object, slug?: object, source?: object, sources?: { sourceMetricDefinitionId: string; sourceVariantId?: string; }[], supportedContexts?: 'CALL' | 'SEGMENT' | 'TURN'[], supportsMultipleVariants?: object, toolDefinitionIds?: string[]): { data: object; }`\n\n**put** `/v1/metric/definitions/{idOrSlug}`\n\nUpdate the editable subset of a custom metric definition, addressed by its UUID or its stable `slug`. Only the supplied fields are changed; omitted fields are left unchanged. Every update creates a new immutable version; the response carries the advanced `versionId`. Immutable fields (scope, outputType, calcType, …) are rejected, and which fields are editable depends on the metric (e.g. derived metrics only allow `name`). Roark's own metrics are rejected here: this endpoint edits the shared definition, which every workspace sees. To change one for your workspace alone, edit its variant with PUT /v1/metric/definitions/{idOrSlug}/variants/{variantId}, which forks it for you and leaves every other workspace on the original.\n\n### Parameters\n\n- `idOrSlug: string`\n\n- `analysisPackageId?: object`\n\n- `booleanFalseLabel?: string`\n New label for the false case (BOOLEAN output only)\n\n- `booleanTrueLabel?: string`\n New label for the true case (BOOLEAN output only)\n\n- `calcType?: object`\n\n- `changeReason?: string`\n Optional free-text audit note recorded on the new version.\n\n- `classificationOptions?: { description: string; displayOrder: number; label: string; }[]`\n Replacement set of classification options (CLASSIFICATION output only)\n\n- `formula?: string`\n New formula expression (FORMULA only). Pass `sources` alongside if the referenced metrics change.\n\n- `llmPrompt?: string`\n New LLM prompt (only for LLM_JUDGE metrics whose prompt is editable)\n\n- `maxClassifications?: number`\n New maximum number of classifications (CLASSIFICATION output only)\n\n- `metricId?: object`\n\n- `name?: string`\n New name (only for metrics whose name is editable)\n\n- `organizationId?: object`\n\n- `outputType?: object`\n\n- `participantRole?: object`\n\n- `projectId?: object`\n\n- `scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]`\n Replacement set of scale-range labels (SCALE output only)\n\n- `scaleMax?: number`\n New scale maximum (SCALE output only)\n\n- `scaleMin?: number`\n New scale minimum (SCALE output only)\n\n- `scope?: object`\n\n- `slug?: object`\n\n- `source?: object`\n\n- `sources?: { sourceMetricDefinitionId: string; sourceVariantId?: string; }[]`\n Replacement formula sources, required when `formula` changes the referenced metrics (FORMULA only).\n\n- `supportedContexts?: 'CALL' | 'SEGMENT' | 'TURN'[]`\n Replacement set of supported contexts. Omit to leave unchanged. Scope and participantRole cannot change after create, so moving to SEGMENT or TURN grading only works on a PER_PARTICIPANT metric (see create).\n\n- `supportsMultipleVariants?: object`\n\n- `toolDefinitionIds?: string[]`\n Replacement set of scoped tool-definition ids (only for metrics whose tool scoping is editable)\n\n### Returns\n\n- `{ data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: object[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: object; triggerCombinator: 'AND' | 'OR'; triggers: object[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: string; countThreshold: number; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; }; }`\n\n - `data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: { sourceMetricDefinitionId: string; sourceVariantId: string; }[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: { operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; windowAfter: number; windowBefore: number; }; triggerCombinator: 'AND' | 'OR'; triggers: { operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: string; countThreshold: number; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.metric.updateDefinition('idOrSlug');\n\nconsole.log(response);\n```",
|
|
934
|
+
response: "{ data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: object[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: object; triggerCombinator: 'AND' | 'OR'; triggers: object[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: string; countThreshold: number; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; } | { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'HTTP_REQUEST'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; httpRequest: { body: string; headers: object; method: 'GET' | 'POST'; url: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }; }",
|
|
935
|
+
markdown: "## updateDefinition\n\n`client.metric.updateDefinition(idOrSlug: string, analysisPackageId?: object, booleanFalseLabel?: string, booleanTrueLabel?: string, calcType?: object, changeReason?: string, classificationOptions?: { description: string; displayOrder: number; label: string; }[], formula?: string, httpRequest?: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }, llmPrompt?: string, maxClassifications?: number, metricId?: object, name?: string, organizationId?: object, outputType?: object, participantRole?: object, projectId?: object, scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[], scaleMax?: number, scaleMin?: number, scope?: object, slug?: object, source?: object, sources?: { sourceMetricDefinitionId: string; sourceVariantId?: string; }[], supportedContexts?: 'CALL' | 'SEGMENT' | 'TURN'[], supportsMultipleVariants?: object, toolDefinitionIds?: string[]): { data: object; }`\n\n**put** `/v1/metric/definitions/{idOrSlug}`\n\nUpdate the editable subset of a custom metric definition, addressed by its UUID or its stable `slug`. Only the supplied fields are changed; omitted fields are left unchanged. Every update creates a new immutable version; the response carries the advanced `versionId`. Immutable fields (scope, outputType, calcType, …) are rejected, and which fields are editable depends on the metric (e.g. derived metrics only allow `name`). Roark's own metrics are rejected here: this endpoint edits the shared definition, which every workspace sees. To change one for your workspace alone, edit its variant with PUT /v1/metric/definitions/{idOrSlug}/variants/{variantId}, which forks it for you and leaves every other workspace on the original.\n\n### Parameters\n\n- `idOrSlug: string`\n\n- `analysisPackageId?: object`\n\n- `booleanFalseLabel?: string`\n New label for the false case (BOOLEAN output only)\n\n- `booleanTrueLabel?: string`\n New label for the true case (BOOLEAN output only)\n\n- `calcType?: object`\n\n- `changeReason?: string`\n Optional free-text audit note recorded on the new version.\n\n- `classificationOptions?: { description: string; displayOrder: number; label: string; }[]`\n Replacement set of classification options (CLASSIFICATION output only)\n\n- `formula?: string`\n New formula expression (FORMULA only). Pass `sources` alongside if the referenced metrics change.\n\n- `httpRequest?: { url: string; body?: string; headers?: object; method?: 'GET' | 'POST'; }`\n Replacement request (HTTP_REQUEST only). Send the whole request; omitted headers are removed.\n\n- `llmPrompt?: string`\n New LLM prompt (only for LLM_JUDGE metrics whose prompt is editable)\n\n- `maxClassifications?: number`\n New maximum number of classifications (CLASSIFICATION output only)\n\n- `metricId?: object`\n\n- `name?: string`\n New name (only for metrics whose name is editable)\n\n- `organizationId?: object`\n\n- `outputType?: object`\n\n- `participantRole?: object`\n\n- `projectId?: object`\n\n- `scaleLabels?: { displayOrder: number; label: string; rangeMax: number; rangeMin: number; colorHex?: string; description?: string; }[]`\n Replacement set of scale-range labels (SCALE output only)\n\n- `scaleMax?: number`\n New scale maximum (SCALE output only)\n\n- `scaleMin?: number`\n New scale minimum (SCALE output only)\n\n- `scope?: object`\n\n- `slug?: object`\n\n- `source?: object`\n\n- `sources?: { sourceMetricDefinitionId: string; sourceVariantId?: string; }[]`\n Replacement formula sources, required when `formula` changes the referenced metrics (FORMULA only).\n\n- `supportedContexts?: 'CALL' | 'SEGMENT' | 'TURN'[]`\n Replacement set of supported contexts. Omit to leave unchanged. Scope and participantRole cannot change after create, so moving to SEGMENT or TURN grading only works on a PER_PARTICIPANT metric (see create).\n\n- `supportsMultipleVariants?: object`\n\n- `toolDefinitionIds?: string[]`\n Replacement set of scoped tool-definition ids (only for metrics whose tool scoping is editable)\n\n### Returns\n\n- `{ data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: object[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: object; triggerCombinator: 'AND' | 'OR'; triggers: object[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: string; countThreshold: number; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; } | { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'HTTP_REQUEST'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; httpRequest: { body: string; headers: object; method: 'GET' | 'POST'; url: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }; }`\n\n - `data: { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'LLM_JUDGE'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; llmPrompt: string; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'FORMULA'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; formula: { expression: string; sources: { sourceMetricDefinitionId: string; sourceVariantId: string; }[]; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'PATTERN'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; pattern: { operation: 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE'; outcome: { operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; windowAfter: number; windowBefore: number; }; triggerCombinator: 'AND' | 'OR'; triggers: { operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }[]; windowMode: string; }; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; } | { id: string; calculationType: 'THRESHOLD'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; threshold?: { aggregationMode: string; countThreshold: number; operator: 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS'; sourceMetricDefinitionId: string; sourceParticipantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER'; sourceVariantId: string; thresholdValue: string; }; unit?: { name: string; symbol: string; }; } | { id: string; booleanFalseLabel: string; booleanTrueLabel: string; calculationType: 'HTTP_REQUEST'; description: string; evidenceSource: { countsWhen: boolean; metricId: string; }; httpRequest: { body: string; headers: object; method: 'GET' | 'POST'; url: string; }; metricId: string; name: string; requiresLiveConversation: boolean; scope: 'GLOBAL' | 'PER_PARTICIPANT'; slug: string; supportedContexts: 'CALL' | 'SEGMENT' | 'TURN'[]; supportedConversationSources: 'SIMULATED' | 'LIVE'[]; supportsVariants: boolean; type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET'; variantId: string; versionId: string; unit?: { name: string; symbol: string; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.metric.updateDefinition('idOrSlug');\n\nconsole.log(response);\n```",
|
|
935
936
|
perLanguage: {
|
|
936
937
|
typescript: {
|
|
937
938
|
method: 'client.metric.updateDefinition',
|
|
@@ -1859,8 +1860,8 @@ const EMBEDDED_METHODS = [
|
|
|
1859
1860
|
stainlessPath: '(resource) simulationRunPlan > (method) list',
|
|
1860
1861
|
qualified: 'client.simulationRunPlan.list',
|
|
1861
1862
|
params: ['after?: string;', 'agentId?: string;', 'limit?: number;', 'searchText?: string;'],
|
|
1862
|
-
response: "{ 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
|
|
1863
|
-
markdown: "## list\n\n`client.simulationRunPlan.list(after?: string, agentId?: string, limit?: number, searchText?: string): { data: object[]; pagination: object; }`\n\n**get** `/v1/simulation/plan`\n\nReturns a paginated list of simulation run plans. Optionally filter by search text or agent ID.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - use the nextCursor value from a previous response\n\n- `agentId?: string`\n Filter run plans by agent ID\n\n- `limit?: number`\n Maximum number of run plans to return (default: 20, max: 50)\n\n- `searchText?: string`\n Search text to filter run plans by name\n\n### Returns\n\n- `{ data: { id: string; agentEndpoints: { id: string; }[]; 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n Paginated list of simulation run plans\n\n - `data: { id: string; agentEndpoints: { id: string; }[]; 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlans = await client.simulationRunPlan.list();\n\nconsole.log(simulationRunPlans);\n```",
|
|
1863
|
+
response: "{ 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; notifications: { email: object; slack: object[]; }; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }",
|
|
1864
|
+
markdown: "## list\n\n`client.simulationRunPlan.list(after?: string, agentId?: string, limit?: number, searchText?: string): { data: object[]; pagination: object; }`\n\n**get** `/v1/simulation/plan`\n\nReturns a paginated list of simulation run plans. Optionally filter by search text or agent ID.\n\n### Parameters\n\n- `after?: string`\n Cursor for pagination - use the nextCursor value from a previous response\n\n- `agentId?: string`\n Filter run plans by agent ID\n\n- `limit?: number`\n Maximum number of run plans to return (default: 20, max: 50)\n\n- `searchText?: string`\n Search text to filter run plans by name\n\n### Returns\n\n- `{ data: { id: string; agentEndpoints: { id: string; }[]; 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; notifications: { email: object; slack: object[]; }; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }[]; pagination: { hasMore: boolean; nextCursor: string; total: number; }; }`\n Paginated list of simulation run plans\n\n - `data: { id: string; agentEndpoints: { id: string; }[]; 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; notifications: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; }; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }[]`\n - `pagination: { hasMore: boolean; nextCursor: string; total: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst simulationRunPlans = await client.simulationRunPlan.list();\n\nconsole.log(simulationRunPlans);\n```",
|
|
1864
1865
|
perLanguage: {
|
|
1865
1866
|
typescript: {
|
|
1866
1867
|
method: 'client.simulationRunPlan.list',
|
|
@@ -1884,8 +1885,8 @@ const EMBEDDED_METHODS = [
|
|
|
1884
1885
|
stainlessPath: '(resource) simulationRunPlan > (method) getById',
|
|
1885
1886
|
qualified: 'client.simulationRunPlan.getByID',
|
|
1886
1887
|
params: ['planId: string;'],
|
|
1887
|
-
response: "{ 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }; }",
|
|
1888
|
-
markdown: "## getById\n\n`client.simulationRunPlan.getByID(planId: string): { data: object; }`\n\n**get** `/v1/simulation/plan/{planId}`\n\nReturns a specific simulation run plan by its ID.\n\n### Parameters\n\n- `planId: string`\n\n### Returns\n\n- `{ data: { id: string; agentEndpoints: { id: string; }[]; 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationRunPlan.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
|
|
1888
|
+
response: "{ 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; notifications: { email: object; slack: object[]; }; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }; }",
|
|
1889
|
+
markdown: "## getById\n\n`client.simulationRunPlan.getByID(planId: string): { data: object; }`\n\n**get** `/v1/simulation/plan/{planId}`\n\nReturns a specific simulation run plan by its ID.\n\n### Parameters\n\n- `planId: string`\n\n### Returns\n\n- `{ data: { id: string; agentEndpoints: { id: string; }[]; 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; notifications: { email: object; slack: object[]; }; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; notifications: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; }; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.simulationRunPlan.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
|
|
1889
1890
|
perLanguage: {
|
|
1890
1891
|
typescript: {
|
|
1891
1892
|
method: 'client.simulationRunPlan.getByID',
|
|
@@ -1908,8 +1909,8 @@ const EMBEDDED_METHODS = [
|
|
|
1908
1909
|
description: 'Creates a new simulation run plan.\n\nTo run a simulation, use POST /v1/simulation/run instead: it starts a run from a plan or\nfrom an inline configuration, and takes runtime variables. Create a plan here when you want\na reusable, named one to run later.\n\nSend `template` instead of a full configuration to save one of the built-in templates as a\nplan. It takes the same fields as the template variant of POST /v1/simulation/run, builds the\nsame plan, and never starts it.\n\nTo compare one property, attach the flow once and send `comparisonProperty` with the\n`comparisonValues` to run: the plan attaches the flow once per value.',
|
|
1909
1910
|
stainlessPath: '(resource) simulationRunPlan > (method) create',
|
|
1910
1911
|
qualified: 'client.simulationRunPlan.create',
|
|
1911
|
-
response: "{ 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: object[]; name: string; noResponseRetryBackoffSeconds: number; personas: object[]; scenarios: object[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }; runPlanJob?: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }; }",
|
|
1912
|
-
markdown: "## create\n\n`client.simulationRunPlan.create(): { 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\nSend `template` instead of a full configuration to save one of the built-in templates as a\nplan. It takes the same fields as the template variant of POST /v1/simulation/run, builds the\nsame plan, and never starts it.\n\nTo compare one property, attach the flow once and send `comparisonProperty` with the\n`comparisonValues` to run: the plan attaches the flow once per value.\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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: object[]; name: string; noResponseRetryBackoffSeconds: number; personas: object[]; scenarios: object[]; silenceTimeoutSeconds: number; template: string; 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; 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 name: 'My Run Plan',\n});\n\nconsole.log(simulationRunPlan);\n```",
|
|
1912
|
+
response: "{ 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: object[]; name: string; noResponseRetryBackoffSeconds: number; notifications: object; personas: object[]; scenarios: object[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }; runPlanJob?: { createdAt: string; simulationRunPlanId: string; simulationRunPlanJobId: string; status: string; }; }; }",
|
|
1913
|
+
markdown: "## create\n\n`client.simulationRunPlan.create(): { 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\nSend `template` instead of a full configuration to save one of the built-in templates as a\nplan. It takes the same fields as the template variant of POST /v1/simulation/run, builds the\nsame plan, and never starts it.\n\nTo compare one property, attach the flow once and send `comparisonProperty` with the\n`comparisonValues` to run: the plan attaches the flow once per value.\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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: object[]; name: string; noResponseRetryBackoffSeconds: number; notifications: object; personas: object[]; scenarios: object[]; silenceTimeoutSeconds: number; template: string; 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; notifications: { email: object; slack: object[]; }; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; 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 name: 'My Run Plan',\n});\n\nconsole.log(simulationRunPlan);\n```",
|
|
1913
1914
|
perLanguage: {
|
|
1914
1915
|
typescript: {
|
|
1915
1916
|
method: 'client.simulationRunPlan.create',
|
|
@@ -1955,12 +1956,13 @@ const EMBEDDED_METHODS = [
|
|
|
1955
1956
|
"metrics?: { id?: string; conversationSource?: 'SIMULATED' | 'LIVE'; metricId?: string; minPassRate?: number; slug?: string; }[];",
|
|
1956
1957
|
'name?: string;',
|
|
1957
1958
|
'noResponseRetryBackoffSeconds?: number;',
|
|
1959
|
+
'notifications?: { email?: { enabled: boolean; recipients?: string[]; }; slack?: { channelId: string; channelName: string; }[]; };',
|
|
1958
1960
|
'personas?: { id: string; }[];',
|
|
1959
1961
|
'scenarios?: { id: string; variables?: object; }[];',
|
|
1960
1962
|
'silenceTimeoutSeconds?: number;',
|
|
1961
1963
|
],
|
|
1962
|
-
response: "{ 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }; }",
|
|
1963
|
-
markdown: "## update\n\n`client.simulationRunPlan.update(planId: string, agentEndpoints?: { id: string; }[], comparisonBaseline?: string, comparisonProperty?: string, comparisonValues?: string | { value: string; backgroundNoiseVolume?: number; }[], 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, maxNoResponseRetries?: number, maxSimulationDurationSeconds?: number, metrics?: { id?: string; conversationSource?: 'SIMULATED' | 'LIVE'; metricId?: string; minPassRate?: number; slug?: string; }[], name?: string, noResponseRetryBackoffSeconds?: number, 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` without `comparisonBaseline` keeps the\nstored baseline when the property is unchanged and the baseline is still one of the values\nbeing run. Otherwise it becomes the new property's norm, or `null` when that norm is not\nbeing run either, because a baseline is a value of one specific property.\n\n- `comparisonValues?: string | { value: string; backgroundNoiseVolume?: number; }[]`\n The arms to run. See `POST /v1/simulation/plan`.\n\nOmitting it keeps the arms the plan already has, pins included, so an edit that only renames\nthe plan never widens a sweep you deliberately narrowed, and never multiplies what it costs.\nSend it with `comparisonProperty` and `flows`, which the arms are rebuilt from.\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- `maxNoResponseRetries?: number`\n How many more times to run a test case when the agent under test never responds: it never speaks on a call or never replies in a chat (0-10). 0 turns retries off. Failed checks and failures on Roark’s side are never retried.\n\nEach retry is a separate attempt, billed like any other, so a plan retrying N times can place up to N + 1 calls per test case.\nEvery silent attempt stays on the run with its own call; the run settles once each test case has a final attempt, and the\nagent never spoke verdict is judged on each test case’s last attempt.\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- `noResponseRetryBackoffSeconds?: number`\n Seconds a retry waits before it dials (30-600). Only used when `maxNoResponseRetries` is above 0.\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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; 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```",
|
|
1964
|
+
response: "{ 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; notifications: { email: object; slack: object[]; }; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; testCaseCount: number; updatedAt: string; description?: string; }; }",
|
|
1965
|
+
markdown: "## update\n\n`client.simulationRunPlan.update(planId: string, agentEndpoints?: { id: string; }[], comparisonBaseline?: string, comparisonProperty?: string, comparisonValues?: string | { value: string; backgroundNoiseVolume?: number; }[], 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, maxNoResponseRetries?: number, maxSimulationDurationSeconds?: number, metrics?: { id?: string; conversationSource?: 'SIMULATED' | 'LIVE'; metricId?: string; minPassRate?: number; slug?: string; }[], name?: string, noResponseRetryBackoffSeconds?: number, notifications?: { email?: { enabled: boolean; recipients?: string[]; }; slack?: { channelId: string; channelName: 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` without `comparisonBaseline` keeps the\nstored baseline when the property is unchanged and the baseline is still one of the values\nbeing run. Otherwise it becomes the new property's norm, or `null` when that norm is not\nbeing run either, because a baseline is a value of one specific property.\n\n- `comparisonValues?: string | { value: string; backgroundNoiseVolume?: number; }[]`\n The arms to run. See `POST /v1/simulation/plan`.\n\nOmitting it keeps the arms the plan already has, pins included, so an edit that only renames\nthe plan never widens a sweep you deliberately narrowed, and never multiplies what it costs.\nSend it with `comparisonProperty` and `flows`, which the arms are rebuilt from.\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- `maxNoResponseRetries?: number`\n How many more times to run a test case when the agent under test never responds: it never speaks on a call or never replies in a chat (0-10). 0 turns retries off. Failed checks and failures on Roark’s side are never retried.\n\nEach retry is a separate attempt, billed like any other, so a plan retrying N times can place up to N + 1 calls per test case.\nEvery silent attempt stays on the run with its own call; the run settles once each test case has a final attempt, and the\nagent never spoke verdict is judged on each test case’s last attempt.\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- `noResponseRetryBackoffSeconds?: number`\n Seconds a retry waits before it dials (30-600). Only used when `maxNoResponseRetries` is above 0.\n\n- `notifications?: { email?: { enabled: boolean; recipients?: string[]; }; slack?: { channelId: string; channelName: string; }[]; }`\n Replaces where each run's report is sent, as a whole. `null` turns notifications off. Omitted keeps them. A run whose report already went out is not sent again.\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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; notifications: { email: object; slack: object[]; }; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; 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; maxNoResponseRetries: number; maxSimulationDurationSeconds: number; metrics: { id: string; conversationSource: 'SIMULATED' | 'LIVE'; minPassRate: number; }[]; name: string; noResponseRetryBackoffSeconds: number; notifications: { email: { enabled: boolean; recipients: string[]; }; slack: { channelId: string; channelName: string; }[]; }; personas: { id: string; }[]; scenarios: { id: string; variables?: object; }[]; silenceTimeoutSeconds: number; template: string; 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```",
|
|
1964
1966
|
perLanguage: {
|
|
1965
1967
|
typescript: {
|
|
1966
1968
|
method: 'client.simulationRunPlan.update',
|
|
@@ -3452,6 +3454,161 @@ const EMBEDDED_METHODS = [
|
|
|
3452
3454
|
},
|
|
3453
3455
|
},
|
|
3454
3456
|
},
|
|
3457
|
+
{
|
|
3458
|
+
name: 'list',
|
|
3459
|
+
endpoint: '/v1/phone-number',
|
|
3460
|
+
httpMethod: 'get',
|
|
3461
|
+
summary: 'List phone numbers',
|
|
3462
|
+
description: 'Returns the phone numbers the project owns, oldest first, with the agent each is assigned to.',
|
|
3463
|
+
stainlessPath: '(resource) phoneNumber > (method) list',
|
|
3464
|
+
qualified: 'client.phoneNumber.list',
|
|
3465
|
+
params: ['agentId?: string;'],
|
|
3466
|
+
response: '{ data: { id: string; agentId: string; e164: string; isFree: boolean; localityCode: string; monthlyRentMicros: number; name: string; purchasedAt: string; rentNextChargeAt: string; }[]; }',
|
|
3467
|
+
markdown: "## list\n\n`client.phoneNumber.list(agentId?: string): { data: object[]; }`\n\n**get** `/v1/phone-number`\n\nReturns the phone numbers the project owns, oldest first, with the agent each is assigned to.\n\n### Parameters\n\n- `agentId?: string`\n Only the numbers assigned to this agent\n\n### Returns\n\n- `{ data: { id: string; agentId: string; e164: string; isFree: boolean; localityCode: string; monthlyRentMicros: number; name: string; purchasedAt: string; rentNextChargeAt: string; }[]; }`\n\n - `data: { id: string; agentId: string; e164: string; isFree: boolean; localityCode: string; monthlyRentMicros: number; name: string; purchasedAt: string; rentNextChargeAt: string; }[]`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst phoneNumbers = await client.phoneNumber.list();\n\nconsole.log(phoneNumbers);\n```",
|
|
3468
|
+
perLanguage: {
|
|
3469
|
+
typescript: {
|
|
3470
|
+
method: 'client.phoneNumber.list',
|
|
3471
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst phoneNumbers = await client.phoneNumber.list();\n\nconsole.log(phoneNumbers.data);",
|
|
3472
|
+
},
|
|
3473
|
+
python: {
|
|
3474
|
+
method: 'phone_number.list',
|
|
3475
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nphone_numbers = client.phone_number.list()\nprint(phone_numbers.data)',
|
|
3476
|
+
},
|
|
3477
|
+
http: {
|
|
3478
|
+
example: 'curl https://api.roark.ai/v1/phone-number \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
3479
|
+
},
|
|
3480
|
+
},
|
|
3481
|
+
},
|
|
3482
|
+
{
|
|
3483
|
+
name: 'listAvailable',
|
|
3484
|
+
endpoint: '/v1/phone-number/available',
|
|
3485
|
+
httpMethod: 'get',
|
|
3486
|
+
summary: 'Search available phone numbers',
|
|
3487
|
+
description: 'Returns US numbers the carrier has for sale, narrowed by area code or by digits the number must contain. Buy one with POST /v1/phone-number.',
|
|
3488
|
+
stainlessPath: '(resource) phoneNumber > (method) listAvailable',
|
|
3489
|
+
qualified: 'client.phoneNumber.listAvailable',
|
|
3490
|
+
params: ['areaCode?: string;', 'contains?: string;', 'limit?: number;'],
|
|
3491
|
+
response: '{ data: { e164: string; locality: string; region: string; }[]; }',
|
|
3492
|
+
markdown: "## listAvailable\n\n`client.phoneNumber.listAvailable(areaCode?: string, contains?: string, limit?: number): { data: object[]; }`\n\n**get** `/v1/phone-number/available`\n\nReturns US numbers the carrier has for sale, narrowed by area code or by digits the number must contain. Buy one with POST /v1/phone-number.\n\n### Parameters\n\n- `areaCode?: string`\n Three-digit US area code\n\n- `contains?: string`\n Digits or letters the number must contain (1 to 7, * matches any digit)\n\n- `limit?: number`\n Maximum number of results (default: 20, max: 50)\n\n### Returns\n\n- `{ data: { e164: string; locality: string; region: string; }[]; }`\n\n - `data: { e164: string; locality: string; region: string; }[]`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.phoneNumber.listAvailable();\n\nconsole.log(response);\n```",
|
|
3493
|
+
perLanguage: {
|
|
3494
|
+
typescript: {
|
|
3495
|
+
method: 'client.phoneNumber.listAvailable',
|
|
3496
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.phoneNumber.listAvailable();\n\nconsole.log(response.data);",
|
|
3497
|
+
},
|
|
3498
|
+
python: {
|
|
3499
|
+
method: 'phone_number.list_available',
|
|
3500
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.phone_number.list_available()\nprint(response.data)',
|
|
3501
|
+
},
|
|
3502
|
+
http: {
|
|
3503
|
+
example: 'curl https://api.roark.ai/v1/phone-number/available \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
3504
|
+
},
|
|
3505
|
+
},
|
|
3506
|
+
},
|
|
3507
|
+
{
|
|
3508
|
+
name: 'getAllowance',
|
|
3509
|
+
endpoint: '/v1/phone-number/allowance',
|
|
3510
|
+
httpMethod: 'get',
|
|
3511
|
+
summary: 'Get the phone number allowance',
|
|
3512
|
+
description: 'Returns how many numbers the organization gets for free, how many it holds, what a paid number costs a month, and whether a purchase would be admitted right now.',
|
|
3513
|
+
stainlessPath: '(resource) phoneNumber > (method) getAllowance',
|
|
3514
|
+
qualified: 'client.phoneNumber.getAllowance',
|
|
3515
|
+
response: "{ data: { blockedReason: 'PAYMENT_METHOD_REQUIRED' | 'INSUFFICIENT_CREDITS' | 'SPEND_CAP_REACHED' | 'PLAN_LIMIT_REACHED'; canPurchase: boolean; freeLimit: number; isOverridden: boolean; monthlyRentMicros: number; nextIsFree: boolean; paidCount: number; plan: 'PAYG' | 'TEAM' | 'ENTERPRISE'; used: number; }; }",
|
|
3516
|
+
markdown: "## getAllowance\n\n`client.phoneNumber.getAllowance(): { data: object; }`\n\n**get** `/v1/phone-number/allowance`\n\nReturns how many numbers the organization gets for free, how many it holds, what a paid number costs a month, and whether a purchase would be admitted right now.\n\n### Returns\n\n- `{ data: { blockedReason: 'PAYMENT_METHOD_REQUIRED' | 'INSUFFICIENT_CREDITS' | 'SPEND_CAP_REACHED' | 'PLAN_LIMIT_REACHED'; canPurchase: boolean; freeLimit: number; isOverridden: boolean; monthlyRentMicros: number; nextIsFree: boolean; paidCount: number; plan: 'PAYG' | 'TEAM' | 'ENTERPRISE'; used: number; }; }`\n\n - `data: { blockedReason: 'PAYMENT_METHOD_REQUIRED' | 'INSUFFICIENT_CREDITS' | 'SPEND_CAP_REACHED' | 'PLAN_LIMIT_REACHED'; canPurchase: boolean; freeLimit: number; isOverridden: boolean; monthlyRentMicros: number; nextIsFree: boolean; paidCount: number; plan: 'PAYG' | 'TEAM' | 'ENTERPRISE'; used: number; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.phoneNumber.getAllowance();\n\nconsole.log(response);\n```",
|
|
3517
|
+
perLanguage: {
|
|
3518
|
+
typescript: {
|
|
3519
|
+
method: 'client.phoneNumber.getAllowance',
|
|
3520
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.phoneNumber.getAllowance();\n\nconsole.log(response.data);",
|
|
3521
|
+
},
|
|
3522
|
+
python: {
|
|
3523
|
+
method: 'phone_number.get_allowance',
|
|
3524
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.phone_number.get_allowance()\nprint(response.data)',
|
|
3525
|
+
},
|
|
3526
|
+
http: {
|
|
3527
|
+
example: 'curl https://api.roark.ai/v1/phone-number/allowance \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
3528
|
+
},
|
|
3529
|
+
},
|
|
3530
|
+
},
|
|
3531
|
+
{
|
|
3532
|
+
name: 'create',
|
|
3533
|
+
endpoint: '/v1/phone-number',
|
|
3534
|
+
httpMethod: 'post',
|
|
3535
|
+
summary: 'Buy a phone number',
|
|
3536
|
+
description: 'Buys a number from the carrier for this project. Free inside the plan allowance; past it, the first month of rent is charged now and monthly after that.',
|
|
3537
|
+
stainlessPath: '(resource) phoneNumber > (method) create',
|
|
3538
|
+
qualified: 'client.phoneNumber.create',
|
|
3539
|
+
params: [
|
|
3540
|
+
'e164: string;',
|
|
3541
|
+
'agentId?: string;',
|
|
3542
|
+
'expectFree?: boolean;',
|
|
3543
|
+
'expectMonthlyRentMicros?: number;',
|
|
3544
|
+
'name?: string;',
|
|
3545
|
+
],
|
|
3546
|
+
response: '{ data: { id: string; agentId: string; e164: string; isFree: boolean; localityCode: string; monthlyRentMicros: number; name: string; purchasedAt: string; rentNextChargeAt: string; }; }',
|
|
3547
|
+
markdown: "## create\n\n`client.phoneNumber.create(e164: string, agentId?: string, expectFree?: boolean, expectMonthlyRentMicros?: number, name?: string): { data: object; }`\n\n**post** `/v1/phone-number`\n\nBuys a number from the carrier for this project. Free inside the plan allowance; past it, the first month of rent is charged now and monthly after that.\n\n### Parameters\n\n- `e164: string`\n The number to buy, in E.164 format, from a search result\n\n- `agentId?: string`\n The agent to assign the number to\n\n- `expectFree?: boolean`\n Whether you expect this number to be free (from the allowance). The purchase is refused with 409 if that has changed since you checked.\n\n- `expectMonthlyRentMicros?: number`\n The monthly rent you expect for a paid number, in micros (from the allowance). The purchase is refused with 409 if that has changed since you checked.\n\n- `name?: string`\n A label for the number\n\n### Returns\n\n- `{ data: { id: string; agentId: string; e164: string; isFree: boolean; localityCode: string; monthlyRentMicros: number; name: string; purchasedAt: string; rentNextChargeAt: string; }; }`\n\n - `data: { id: string; agentId: string; e164: string; isFree: boolean; localityCode: string; monthlyRentMicros: number; name: string; purchasedAt: string; rentNextChargeAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst phoneNumber = await client.phoneNumber.create({ e164: '+14155550123' });\n\nconsole.log(phoneNumber);\n```",
|
|
3548
|
+
perLanguage: {
|
|
3549
|
+
typescript: {
|
|
3550
|
+
method: 'client.phoneNumber.create',
|
|
3551
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst phoneNumber = await client.phoneNumber.create({ e164: '+14155550123' });\n\nconsole.log(phoneNumber.data);",
|
|
3552
|
+
},
|
|
3553
|
+
python: {
|
|
3554
|
+
method: 'phone_number.create',
|
|
3555
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nphone_number = client.phone_number.create(\n e164="+14155550123",\n)\nprint(phone_number.data)',
|
|
3556
|
+
},
|
|
3557
|
+
http: {
|
|
3558
|
+
example: 'curl https://api.roark.ai/v1/phone-number \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "e164": "+14155550123",\n "expectMonthlyRentMicros": 2000000\n }\'',
|
|
3559
|
+
},
|
|
3560
|
+
},
|
|
3561
|
+
},
|
|
3562
|
+
{
|
|
3563
|
+
name: 'update',
|
|
3564
|
+
endpoint: '/v1/phone-number/{phoneNumberId}',
|
|
3565
|
+
httpMethod: 'put',
|
|
3566
|
+
summary: 'Update a phone number',
|
|
3567
|
+
description: 'Relabels a number or changes which agent it is assigned to. A field left out is untouched; null clears it.',
|
|
3568
|
+
stainlessPath: '(resource) phoneNumber > (method) update',
|
|
3569
|
+
qualified: 'client.phoneNumber.update',
|
|
3570
|
+
params: ['phoneNumberId: string;', 'agentId?: string;', 'name?: string;'],
|
|
3571
|
+
response: '{ data: { id: string; agentId: string; e164: string; isFree: boolean; localityCode: string; monthlyRentMicros: number; name: string; purchasedAt: string; rentNextChargeAt: string; }; }',
|
|
3572
|
+
markdown: "## update\n\n`client.phoneNumber.update(phoneNumberId: string, agentId?: string, name?: string): { data: object; }`\n\n**put** `/v1/phone-number/{phoneNumberId}`\n\nRelabels a number or changes which agent it is assigned to. A field left out is untouched; null clears it.\n\n### Parameters\n\n- `phoneNumberId: string`\n\n- `agentId?: string`\n Agent to assign the number to; null unassigns, omit to leave it alone\n\n- `name?: string`\n New label; null clears it, omit to leave it alone\n\n### Returns\n\n- `{ data: { id: string; agentId: string; e164: string; isFree: boolean; localityCode: string; monthlyRentMicros: number; name: string; purchasedAt: string; rentNextChargeAt: string; }; }`\n\n - `data: { id: string; agentId: string; e164: string; isFree: boolean; localityCode: string; monthlyRentMicros: number; name: string; purchasedAt: string; rentNextChargeAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst phoneNumber = await client.phoneNumber.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(phoneNumber);\n```",
|
|
3573
|
+
perLanguage: {
|
|
3574
|
+
typescript: {
|
|
3575
|
+
method: 'client.phoneNumber.update',
|
|
3576
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst phoneNumber = await client.phoneNumber.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(phoneNumber.data);",
|
|
3577
|
+
},
|
|
3578
|
+
python: {
|
|
3579
|
+
method: 'phone_number.update',
|
|
3580
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nphone_number = client.phone_number.update(\n phone_number_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(phone_number.data)',
|
|
3581
|
+
},
|
|
3582
|
+
http: {
|
|
3583
|
+
example: 'curl https://api.roark.ai/v1/phone-number/$PHONE_NUMBER_ID \\\n -X PUT \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
3584
|
+
},
|
|
3585
|
+
},
|
|
3586
|
+
},
|
|
3587
|
+
{
|
|
3588
|
+
name: 'delete',
|
|
3589
|
+
endpoint: '/v1/phone-number/{phoneNumberId}',
|
|
3590
|
+
httpMethod: 'delete',
|
|
3591
|
+
summary: 'Release a phone number',
|
|
3592
|
+
description: 'Gives the number back to the carrier. This cannot be undone: rent stops today and nothing is refunded.',
|
|
3593
|
+
stainlessPath: '(resource) phoneNumber > (method) delete',
|
|
3594
|
+
qualified: 'client.phoneNumber.delete',
|
|
3595
|
+
params: ['phoneNumberId: string;'],
|
|
3596
|
+
response: '{ data: { id: string; released: true; }; }',
|
|
3597
|
+
markdown: "## delete\n\n`client.phoneNumber.delete(phoneNumberId: string): { data: object; }`\n\n**delete** `/v1/phone-number/{phoneNumberId}`\n\nGives the number back to the carrier. This cannot be undone: rent stops today and nothing is refunded.\n\n### Parameters\n\n- `phoneNumberId: string`\n\n### Returns\n\n- `{ data: { id: string; released: true; }; }`\n\n - `data: { id: string; released: true; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst phoneNumber = await client.phoneNumber.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(phoneNumber);\n```",
|
|
3598
|
+
perLanguage: {
|
|
3599
|
+
typescript: {
|
|
3600
|
+
method: 'client.phoneNumber.delete',
|
|
3601
|
+
example: "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst phoneNumber = await client.phoneNumber.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(phoneNumber.data);",
|
|
3602
|
+
},
|
|
3603
|
+
python: {
|
|
3604
|
+
method: 'phone_number.delete',
|
|
3605
|
+
example: 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nphone_number = client.phone_number.delete(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(phone_number.data)',
|
|
3606
|
+
},
|
|
3607
|
+
http: {
|
|
3608
|
+
example: 'curl https://api.roark.ai/v1/phone-number/$PHONE_NUMBER_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
3609
|
+
},
|
|
3610
|
+
},
|
|
3611
|
+
},
|
|
3455
3612
|
{
|
|
3456
3613
|
name: 'list',
|
|
3457
3614
|
endpoint: '/v1/agent/{agentId}/prompts',
|
|
@@ -3922,11 +4079,11 @@ const EMBEDDED_METHODS = [
|
|
|
3922
4079
|
stainlessPath: '(resource) config > (method) diff',
|
|
3923
4080
|
qualified: 'client.config.diff',
|
|
3924
4081
|
params: [
|
|
3925
|
-
"resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; 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; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[];",
|
|
4082
|
+
"resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; 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; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[];",
|
|
3926
4083
|
'prune?: boolean;',
|
|
3927
4084
|
],
|
|
3928
4085
|
response: "{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }; }",
|
|
3929
|
-
markdown: "## diff\n\n`client.config.diff(resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; 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; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/diff`\n\nDry run for an apply: returns the projected changes (create / update / delete) for the submitted bundle without writing anything. Works for both project and organization keys.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; 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; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.config.diff({ resources: [{ kind: 'agent', name: 'x' }] });\n\nconsole.log(response);\n```",
|
|
4086
|
+
markdown: "## diff\n\n`client.config.diff(resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; 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; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/diff`\n\nDry run for an apply: returns the projected changes (create / update / delete) for the submitted bundle without writing anything. Works for both project and organization keys.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; 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; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; detail?: string; project?: string; }[]; summary: { create: number; delete: number; noop: number; update: number; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.config.diff({ resources: [{ kind: 'agent', name: 'x' }] });\n\nconsole.log(response);\n```",
|
|
3930
4087
|
perLanguage: {
|
|
3931
4088
|
typescript: {
|
|
3932
4089
|
method: 'client.config.diff',
|
|
@@ -3950,11 +4107,11 @@ const EMBEDDED_METHODS = [
|
|
|
3950
4107
|
stainlessPath: '(resource) config > (method) apply',
|
|
3951
4108
|
qualified: 'client.config.apply',
|
|
3952
4109
|
params: [
|
|
3953
|
-
"resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; 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; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[];",
|
|
4110
|
+
"resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; 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; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[];",
|
|
3954
4111
|
'prune?: boolean;',
|
|
3955
4112
|
],
|
|
3956
4113
|
response: "{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }; }",
|
|
3957
|
-
markdown: "## apply\n\n`client.config.apply(resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; 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; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/apply`\n\nReconcile a config-as-code bundle. With a PROJECT API key, submit project-scoped resources (agents, personas, flows, collectors, metrics, ...). With an ORGANIZATION API key, submit `kind: project` resources, each optionally carrying its members and its own nested `resources`. Submit the full desired set; managed resources are updated, new ones created, and (unless prune is false) managed resources absent from the bundle are deleted. Identity is by name.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; 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; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.config.apply({ resources: [{ kind: 'agent', name: 'x' }] });\n\nconsole.log(response);\n```",
|
|
4114
|
+
markdown: "## apply\n\n`client.config.apply(resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; 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; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[], prune?: boolean): { data: object; }`\n\n**post** `/v1/config/apply`\n\nReconcile a config-as-code bundle. With a PROJECT API key, submit project-scoped resources (agents, personas, flows, collectors, metrics, ...). With an ORGANIZATION API key, submit `kind: project` resources, each optionally carrying its members and its own nested `resources`. Submit the full desired set; managed resources are updated, new ones created, and (unless prune is false) managed resources absent from the bundle are deleted. Identity is by name.\n\n### Parameters\n\n- `resources: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: { value: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; environment?: string; outboundDialHttpRequestDefinition?: string; outboundDialType?: 'NONE' | 'HTTP_REQUEST'; type?: 'PHONE' | 'WEBSOCKET'; }[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: { environment: string; persona: string; expectations?: string[]; prompt?: string; title?: string; }; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: { name: string; environment?: string; expectations?: string[]; includeFlowExpectations?: boolean; persona?: string; prompt?: string; title?: string; }[]; expectations?: string[]; title?: string; } | { graph: { type: string; content?: string; dtmfDigits?: string; flow?: string; handoffPersona?: string; mergeInto?: string[]; offScript?: object; ref?: string; requiredForValidRun?: boolean; silenceDurationSeconds?: number; stage?: string | object; steps?: object[]; }[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: { maxAttempts?: number; reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY'; sayLine?: string; then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE'; waitSeconds?: number; }; title?: string; } | { kind: 'collector'; metrics: string | { metric: string; excludedPhrases?: string[]; screeningBrief?: string; verifiedProperties?: string[]; voicemailScript?: string; }[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: { conditions: object[]; }[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; 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; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: { agent: string; direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING'; value?: string; }[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: { ask: string; expect?: string; name?: string; }[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: { email?: boolean | string[]; slack?: object[]; }; schedule?: { type: 'hourly'; enabled?: boolean; endDate?: string; maxRuns?: number; minute?: number; timezone?: string; } | { everyMinutes: number; type: 'interval'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { time: string; type: 'daily'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { days: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'[]; time: string; type: 'weekly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { dayOfMonth: number; time: string; type: 'monthly'; enabled?: boolean; endDate?: string; maxRuns?: number; timezone?: string; } | { at: string; type: 'once'; enabled?: boolean; timezone?: string; }; } | { kind: 'alert'; name: string; trigger: { aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN'; metric: string; operator: 'GT' | 'GTE' | 'LT' | 'LTE'; thresholdValue: number; type: 'threshold'; windowMinutes: number; consecutiveOpen?: number; consecutiveResolve?: number; grouping?: 'NONE' | 'BY_AGENT'; metricVariant?: string; minSampleSize?: number; } | { events: string[]; type: 'event'; } | { conditions: 'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'[]; type: 'simulation'; deliveryFormat?: 'MESSAGE' | 'PDF'; plan?: string; }; actions?: { slack?: object[]; webhooks?: string[]; }; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: { type: 'http'; url: string; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; }; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: { type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET'; operator?: string; property?: string; value?: string | number | boolean; }[]; isDefault?: boolean; timeRange?: { type: 'LAST'; unit: 'DAYS' | 'WEEKS' | 'MONTHS'; value: number; } | { period: string; type: 'CALENDAR_ALIGNED'; } | { from: string; to: string; type: 'FIXED'; } | { from: string; type: 'SINCE'; }; widgets?: { measures: object[]; name: string; comparisonGroups?: object[]; comparisonMode?: 'NONE' | 'PREVIOUS_PERIOD'; description?: string; display?: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE'; filters?: object[]; interval?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH'; size?: 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE'; }[]; } | { kind: 'project'; name: string; category?: string; dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1'; description?: string; displayName?: string; members?: { email: string; role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER'; }[]; resources?: { kind: 'agent'; name: string; customId?: string; description?: string; displayName?: string; endpoints?: object[]; prompt?: string; } | { kind: 'httpRequestDefinition'; name: string; url: string; body?: string; description?: string; headers?: object; method?: 'POST' | 'PUT' | 'PATCH' | 'GET'; } | { accent: string; gender: 'MALE' | 'FEMALE'; kind: 'persona'; language: string; name: string; age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY'; backgroundNoise?: string; backstoryPrompt?: string; baseEmotion?: string; confirmationStyle?: 'EXPLICIT' | 'VAGUE'; description?: string; displayName?: string; hasDisfluencies?: boolean; idleMessageMaxSpokenCount?: number; idleMessageResetCountOnUserSpeechEnabled?: boolean; idleMessages?: string[]; idleTimeoutSeconds?: number; intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE'; interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY'; memoryReliability?: 'HIGH' | 'LOW'; properties?: object; responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN'; secondaryLanguage?: 'EN'; speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING'; speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST'; understoodLanguages?: string[]; } | { agents: string[]; happyPath: object; kind: 'flow'; name: string; type: 'improv'; description?: string; edgeCases?: object[]; expectations?: string[]; title?: string; } | { graph: object[]; kind: 'flow'; name: string; type: 'scripted'; adherence?: 'LOOSE' | 'STRICT'; agents?: string[]; branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE'; description?: string; expectations?: string[]; offScript?: object; title?: string; } | { kind: 'collector'; metrics: string | object[]; modality: 'call' | 'chat'; name: string; displayName?: string; filters?: object[]; status?: 'ACTIVE' | 'INACTIVE'; } | { kind: 'metric'; name: string; prompt: string; type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION'; contexts?: 'CALL' | 'SEGMENT' | 'TURN'[]; displayName?: string; falseLabel?: string; maxSelections?: number; options?: object[]; participantRole?: 'AGENT' | 'CUSTOMER'; scaleLabels?: object[]; scaleMax?: number; scaleMin?: number; scope?: 'GLOBAL' | 'PER_PARTICIPANT'; trueLabel?: string; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; flows: object[]; kind: 'simulationPlan'; maxDurationSeconds: number; metrics: string[]; name: string; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; template?: 'manual'; } | { agentEndpoints: object[]; direction: 'INBOUND' | 'OUTBOUND'; environment: string; kind: 'simulationPlan'; maxDurationSeconds: number; name: string; persona: string; questions: object[]; template: 'question-answer-check'; description?: string; endCallPhrases?: string[]; endCallReasons?: string[]; enrichWithLiveConversation?: boolean; executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'; gradeWithKnowledgeBase?: boolean; includeAutomaticMetrics?: boolean; includeFlowMetrics?: boolean; iterations?: number; maxConcurrentJobs?: number; maxNoResponseRetries?: number; metrics?: string[]; noResponseRetryBackoffSeconds?: number; notify?: object; schedule?: object; silenceTimeoutSeconds?: number; } | { kind: 'simulationGroup'; name: string; plans: string[]; description?: string; notify?: object; schedule?: object; } | { kind: 'alert'; name: string; trigger: object; actions?: object; displayName?: string; enabled?: boolean; } | { kind: 'tool'; name: string; agent?: string; description?: string; expectedResult?: string; handler?: object; invocationCriteria?: string; parameters?: object; } | { kind: 'dashboard'; name: string; description?: string; displayName?: string; filters?: object[]; isDefault?: boolean; timeRange?: object; widgets?: object[]; }[]; }[]`\n\n- `prune?: boolean`\n\n### Returns\n\n- `{ data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }; }`\n\n - `data: { changes: { configKey: string; kind: string; name: string; op: 'create' | 'update' | 'delete' | 'noop'; status: 'applied' | 'skipped' | 'failed'; id?: string; detail?: string; error?: string; project?: string; signingSecret?: string; }[]; summary: { create: number; delete: number; failed: number; noop: number; update: number; }; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.config.apply({ resources: [{ kind: 'agent', name: 'x' }] });\n\nconsole.log(response);\n```",
|
|
3958
4115
|
perLanguage: {
|
|
3959
4116
|
typescript: {
|
|
3960
4117
|
method: 'client.config.apply',
|