@roarkanalytics/sdk-mcp 4.24.0 → 4.25.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 +14 -0
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +1 -0
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +1 -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 +25 -0
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +25 -0
- 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 +6 -0
- package/methods.js.map +1 -1
- package/methods.mjs +6 -0
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +1 -0
- package/src/local-docs-search.ts +31 -0
- package/src/methods.ts +6 -0
- package/src/server.ts +1 -1
package/src/local-docs-search.ts
CHANGED
|
@@ -486,6 +486,37 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
486
486
|
},
|
|
487
487
|
},
|
|
488
488
|
},
|
|
489
|
+
{
|
|
490
|
+
name: 'updateProperties',
|
|
491
|
+
endpoint: '/v1/call/{callId}/properties',
|
|
492
|
+
httpMethod: 'patch',
|
|
493
|
+
summary: 'Update the properties of a call',
|
|
494
|
+
description:
|
|
495
|
+
'Add, overwrite or remove custom properties on an already-existing call. Use this for data that becomes available after the call was created, e.g. an outcome your system validates a few minutes later. Merge semantics: a value adds or overwrites the property, null removes it, and properties left out are untouched. The patch is applied whole or not at all: a property Roark sets itself, or a value whose type differs from the type the project already stores that property as, rejects the request with a 400 and nothing is written. A 409 means another request created one of the properties with a different value type at the same moment; nothing was written. Optionally pass `metrics` to (re)score metrics over the updated properties, which triggers a billed metric collection job and requires the `metric:create` permission.',
|
|
496
|
+
stainlessPath: '(resource) call > (method) updateProperties',
|
|
497
|
+
qualified: 'client.call.updateProperties',
|
|
498
|
+
params: ['callId: string;', 'properties: object;', 'metrics?: { id: string; }[];'],
|
|
499
|
+
response:
|
|
500
|
+
"{ data: { callId: string; metricCollectionError: string; metricCollectionJob: { id: string; completedAt: string; completedItems: number; createdAt: string; errorMessage: string; failedItems: number; policyIds: string[]; startedAt: string; status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'; totalItems: number; triggeredBy: 'USER_MANUAL' | 'USER_API' | 'METRIC_POLICY' | 'SIMULATION'; updatedAt: string; }; properties: object; removed: string[]; updated: string[]; }; }",
|
|
501
|
+
markdown:
|
|
502
|
+
"## updateProperties\n\n`client.call.updateProperties(callId: string, properties: object, metrics?: { id: string; }[]): { data: object; }`\n\n**patch** `/v1/call/{callId}/properties`\n\nAdd, overwrite or remove custom properties on an already-existing call. Use this for data that becomes available after the call was created, e.g. an outcome your system validates a few minutes later. Merge semantics: a value adds or overwrites the property, null removes it, and properties left out are untouched. The patch is applied whole or not at all: a property Roark sets itself, or a value whose type differs from the type the project already stores that property as, rejects the request with a 400 and nothing is written. A 409 means another request created one of the properties with a different value type at the same moment; nothing was written. Optionally pass `metrics` to (re)score metrics over the updated properties, which triggers a billed metric collection job and requires the `metric:create` permission.\n\n### Parameters\n\n- `callId: string`\n\n- `properties: object`\n Properties to change on the call. A string, number or boolean value adds the property or overwrites it; null removes it. Properties left out are untouched. Keys are stored in snake_case, as on POST /v1/call. A property keeps the value type it was first stored with in the project, so a value of another type is rejected. Properties Roark sets itself (direction, duration_seconds, agent_id, ...) can't be changed. Max 100 per request.\n\n- `metrics?: { id: string; }[]`\n Optional. Metric definitions to (re)score on this call once the properties are written, e.g. metrics that read the call's properties. Triggers a metric collection job (billed, credit-gated) and requires the 'metric:create' permission. Omit to update properties without scoring. Max 20.\n\n### Returns\n\n- `{ data: { callId: string; metricCollectionError: string; metricCollectionJob: { id: string; completedAt: string; completedItems: number; createdAt: string; errorMessage: string; failedItems: number; policyIds: string[]; startedAt: string; status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'; totalItems: number; triggeredBy: 'USER_MANUAL' | 'USER_API' | 'METRIC_POLICY' | 'SIMULATION'; updatedAt: string; }; properties: object; removed: string[]; updated: string[]; }; }`\n\n - `data: { callId: string; metricCollectionError: string; metricCollectionJob: { id: string; completedAt: string; completedItems: number; createdAt: string; errorMessage: string; failedItems: number; policyIds: string[]; startedAt: string; status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'CANCELED'; totalItems: number; triggeredBy: 'USER_MANUAL' | 'USER_API' | 'METRIC_POLICY' | 'SIMULATION'; updatedAt: string; }; properties: object; removed: string[]; updated: string[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.call.updateProperties('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n properties: { partner_outcome: 'apr_returned', delivered_apr: '21.99' },\n});\n\nconsole.log(response);\n```",
|
|
503
|
+
perLanguage: {
|
|
504
|
+
typescript: {
|
|
505
|
+
method: 'client.call.updateProperties',
|
|
506
|
+
example:
|
|
507
|
+
"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.call.updateProperties('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n properties: { partner_outcome: 'apr_returned', delivered_apr: '21.99' },\n});\n\nconsole.log(response.data);",
|
|
508
|
+
},
|
|
509
|
+
python: {
|
|
510
|
+
method: 'call.update_properties',
|
|
511
|
+
example:
|
|
512
|
+
'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.call.update_properties(\n call_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n properties={\n "delivered_apr": "21.99",\n "partner_outcome": "apr_returned",\n },\n)\nprint(response.data)',
|
|
513
|
+
},
|
|
514
|
+
http: {
|
|
515
|
+
example:
|
|
516
|
+
'curl https://api.roark.ai/v1/call/$CALL_ID/properties \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "properties": {\n "partner_outcome": "apr_returned",\n "delivered_apr": "21.99"\n }\n }\'',
|
|
517
|
+
},
|
|
518
|
+
},
|
|
519
|
+
},
|
|
489
520
|
{
|
|
490
521
|
name: 'listDefinitions',
|
|
491
522
|
endpoint: '/v1/metric/definitions',
|
package/src/methods.ts
CHANGED
|
@@ -88,6 +88,12 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
88
88
|
httpMethod: 'get',
|
|
89
89
|
httpPath: '/v1/call/{callId}/sentiment-run',
|
|
90
90
|
},
|
|
91
|
+
{
|
|
92
|
+
clientCallName: 'client.call.updateProperties',
|
|
93
|
+
fullyQualifiedName: 'call.updateProperties',
|
|
94
|
+
httpMethod: 'patch',
|
|
95
|
+
httpPath: '/v1/call/{callId}/properties',
|
|
96
|
+
},
|
|
91
97
|
{
|
|
92
98
|
clientCallName: 'client.metric.createDefinition',
|
|
93
99
|
fullyQualifiedName: 'metric.createDefinition',
|
package/src/server.ts
CHANGED
|
@@ -28,7 +28,7 @@ export const newMcpServer = async ({
|
|
|
28
28
|
new McpServer(
|
|
29
29
|
{
|
|
30
30
|
name: 'roarkanalytics_sdk_api',
|
|
31
|
-
version: '4.
|
|
31
|
+
version: '4.25.1', // x-release-please-version
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
|