@opencx/mcp 1.11.85 → 1.11.87
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/dist/invoke-action.spec.d.ts +2 -0
- package/dist/invoke-action.spec.d.ts.map +1 -0
- package/dist/invoke-action.spec.js +68 -0
- package/dist/invoke-action.spec.js.map +1 -0
- package/dist/schema.d.ts +324 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +2 -0
- package/dist/server.js.map +1 -1
- package/dist/tools/actions.d.ts.map +1 -1
- package/dist/tools/actions.js +36 -0
- package/dist/tools/actions.js.map +1 -1
- package/dist/tools/conversation-sankey.d.ts +4 -0
- package/dist/tools/conversation-sankey.d.ts.map +1 -0
- package/dist/tools/conversation-sankey.js +37 -0
- package/dist/tools/conversation-sankey.js.map +1 -0
- package/dist/tools/workflows.d.ts.map +1 -1
- package/dist/tools/workflows.js +24 -0
- package/dist/tools/workflows.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoke-action.spec.d.ts","sourceRoot":"","sources":["../src/invoke-action.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
|
2
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
3
|
+
import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
|
|
4
|
+
import { createServer } from './server.js';
|
|
5
|
+
function mockResponse(body, status = 200) {
|
|
6
|
+
return new Response(JSON.stringify(body), { status, statusText: 'OK' });
|
|
7
|
+
}
|
|
8
|
+
function getRequestUrl(call) {
|
|
9
|
+
const arg = call[0];
|
|
10
|
+
return arg instanceof Request ? arg.url : String(arg);
|
|
11
|
+
}
|
|
12
|
+
function getRequestMethod(call) {
|
|
13
|
+
const arg = call[0];
|
|
14
|
+
if (arg instanceof Request)
|
|
15
|
+
return arg.method;
|
|
16
|
+
return call[1].method ?? 'GET';
|
|
17
|
+
}
|
|
18
|
+
async function getRequestBody(call) {
|
|
19
|
+
const arg = call[0];
|
|
20
|
+
if (arg instanceof Request) {
|
|
21
|
+
const text = await arg.clone().text();
|
|
22
|
+
return text ? JSON.parse(text) : undefined;
|
|
23
|
+
}
|
|
24
|
+
const body = call[1].body;
|
|
25
|
+
return body ? JSON.parse(body) : undefined;
|
|
26
|
+
}
|
|
27
|
+
describe('invoke_action tool', () => {
|
|
28
|
+
let client;
|
|
29
|
+
let cleanup;
|
|
30
|
+
let fetchSpy;
|
|
31
|
+
beforeEach(async () => {
|
|
32
|
+
fetchSpy = vi.fn();
|
|
33
|
+
vi.stubGlobal('fetch', fetchSpy);
|
|
34
|
+
const server = createServer('test-api-key', 'https://api.test.com');
|
|
35
|
+
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
36
|
+
await server.connect(serverTransport);
|
|
37
|
+
client = new Client({ name: 'test-client', version: '1.0.0' });
|
|
38
|
+
await client.connect(clientTransport);
|
|
39
|
+
cleanup = async () => {
|
|
40
|
+
await client.close();
|
|
41
|
+
await server.close();
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
afterEach(async () => {
|
|
45
|
+
await cleanup();
|
|
46
|
+
vi.restoreAllMocks();
|
|
47
|
+
});
|
|
48
|
+
it('accepts numeric/boolean query and path params and forwards them (no client-side string-only rejection)', async () => {
|
|
49
|
+
fetchSpy.mockResolvedValueOnce(mockResponse({ status: 200, body: { ok: true } }));
|
|
50
|
+
const result = await client.callTool({
|
|
51
|
+
name: 'invoke_action',
|
|
52
|
+
arguments: {
|
|
53
|
+
operation_id: 'getThing',
|
|
54
|
+
inputs: { pathParams: { id: 7 }, queryParams: { limit: 42, active: true } },
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
expect(result.isError).toBeFalsy();
|
|
58
|
+
const call = fetchSpy.mock.calls[0];
|
|
59
|
+
expect(getRequestUrl(call)).toContain('/actions/getThing/invoke');
|
|
60
|
+
expect(getRequestMethod(call)).toBe('POST');
|
|
61
|
+
// The non-string values pass the tool schema and reach the API as JSON
|
|
62
|
+
// (the backend coerces them on the wire, like the agent).
|
|
63
|
+
expect(await getRequestBody(call)).toEqual({
|
|
64
|
+
inputs: { pathParams: { id: 7 }, queryParams: { limit: 42, active: true } },
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=invoke-action.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoke-action.spec.js","sourceRoot":"","sources":["../src/invoke-action.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,SAAS,YAAY,CAAC,IAAa,EAAE,MAAM,GAAG,GAAG;IAC/C,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,SAAS,aAAa,CAAC,IAAe;IACpC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,OAAO,GAAG,YAAY,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAe;IACvC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,IAAI,GAAG,YAAY,OAAO;QAAE,OAAO,GA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UAAU,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;SAC5E,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -75,6 +75,26 @@ export interface paths {
|
|
|
75
75
|
patch: operations["updateAction"];
|
|
76
76
|
trace?: never;
|
|
77
77
|
};
|
|
78
|
+
"/actions/{operation_id}/invoke": {
|
|
79
|
+
parameters: {
|
|
80
|
+
query?: never;
|
|
81
|
+
header?: never;
|
|
82
|
+
path?: never;
|
|
83
|
+
cookie?: never;
|
|
84
|
+
};
|
|
85
|
+
get?: never;
|
|
86
|
+
put?: never;
|
|
87
|
+
/**
|
|
88
|
+
* Invoke an action
|
|
89
|
+
* @description Run a configured action the same way the AI agent runs it in a conversation — make the action’s configured HTTP request and return the upstream status and body. Addressed by operation_id (the handle the agent uses). The target URL comes only from the action configuration, never the request. With `context.sessionId`, the request is decorated with the same in-session context the agent attaches (org globals, contact identity, default headers, and — off web — per-contact backend auth), so a caller embedded in a conversation invokes the action with the agent’s context; without it, only org globals apply. Actions requiring a form still execute — supplying the inputs is the submission.
|
|
90
|
+
*/
|
|
91
|
+
post: operations["invokeAction"];
|
|
92
|
+
delete?: never;
|
|
93
|
+
options?: never;
|
|
94
|
+
head?: never;
|
|
95
|
+
patch?: never;
|
|
96
|
+
trace?: never;
|
|
97
|
+
};
|
|
78
98
|
"/actions/all": {
|
|
79
99
|
parameters: {
|
|
80
100
|
query?: never;
|
|
@@ -1392,6 +1412,26 @@ export interface paths {
|
|
|
1392
1412
|
patch?: never;
|
|
1393
1413
|
trace?: never;
|
|
1394
1414
|
};
|
|
1415
|
+
"/impact-report/sankey": {
|
|
1416
|
+
parameters: {
|
|
1417
|
+
query?: never;
|
|
1418
|
+
header?: never;
|
|
1419
|
+
path?: never;
|
|
1420
|
+
cookie?: never;
|
|
1421
|
+
};
|
|
1422
|
+
/**
|
|
1423
|
+
* Get conversation-flow Sankey
|
|
1424
|
+
* @description Get a Sankey breakdown of how conversations flow through the chosen dimensions. Pass an ordered, comma-separated list of dimension keys (e.g. "replied_by,outcome" or "integration_source,channel"). Returns nodes and links describing the flow.
|
|
1425
|
+
*/
|
|
1426
|
+
get: operations["getConversationSankey"];
|
|
1427
|
+
put?: never;
|
|
1428
|
+
post?: never;
|
|
1429
|
+
delete?: never;
|
|
1430
|
+
options?: never;
|
|
1431
|
+
head?: never;
|
|
1432
|
+
patch?: never;
|
|
1433
|
+
trace?: never;
|
|
1434
|
+
};
|
|
1395
1435
|
"/office-hours": {
|
|
1396
1436
|
parameters: {
|
|
1397
1437
|
query?: never;
|
|
@@ -1752,6 +1792,26 @@ export interface paths {
|
|
|
1752
1792
|
patch?: never;
|
|
1753
1793
|
trace?: never;
|
|
1754
1794
|
};
|
|
1795
|
+
"/workflows/{workflow_id}/invoke": {
|
|
1796
|
+
parameters: {
|
|
1797
|
+
query?: never;
|
|
1798
|
+
header?: never;
|
|
1799
|
+
path?: never;
|
|
1800
|
+
cookie?: never;
|
|
1801
|
+
};
|
|
1802
|
+
get?: never;
|
|
1803
|
+
put?: never;
|
|
1804
|
+
/**
|
|
1805
|
+
* [Beta] Invoke a workflow
|
|
1806
|
+
* @description Run a workflow the same way the AI agent runs one during a conversation. Handles the on-demand trigger types the agent can invoke — ai-trigger, manual-ticket-trigger, and manual-trigger — and rejects event-only workflows. `input` is the payload: the ai payload for ai-trigger, the form data for manual-ticket-trigger (manual-trigger takes none). With `context.sessionId`, the workflow runs with the same in-session ticket context the agent has (required for manual-ticket-trigger). This exposes, to a caller embedded in a conversation, the same workflows the agent can trigger in that session. Returns the run id, plus the terminal output when the workflow runs synchronously.
|
|
1807
|
+
*/
|
|
1808
|
+
post: operations["invokeWorkflow"];
|
|
1809
|
+
delete?: never;
|
|
1810
|
+
options?: never;
|
|
1811
|
+
head?: never;
|
|
1812
|
+
patch?: never;
|
|
1813
|
+
trace?: never;
|
|
1814
|
+
};
|
|
1755
1815
|
"/workflows/{workflow_id}/runs": {
|
|
1756
1816
|
parameters: {
|
|
1757
1817
|
query?: never;
|
|
@@ -2136,6 +2196,26 @@ export interface paths {
|
|
|
2136
2196
|
patch?: never;
|
|
2137
2197
|
trace?: never;
|
|
2138
2198
|
};
|
|
2199
|
+
"/resource-usage/{resource_type}": {
|
|
2200
|
+
parameters: {
|
|
2201
|
+
query?: never;
|
|
2202
|
+
header?: never;
|
|
2203
|
+
path?: never;
|
|
2204
|
+
cookie?: never;
|
|
2205
|
+
};
|
|
2206
|
+
/**
|
|
2207
|
+
* List usage counts for all resources of a type
|
|
2208
|
+
* @description Bulk usage: one row per action, instruction, or KB item in the org, with available / applied (used) counts, the handoff count, and first/last-used timestamps — most recently used first. The per-item alternative to calling `usage-summary` once per id. Paginated via the opaque `cursor`; optionally bound by a date range.
|
|
2209
|
+
*/
|
|
2210
|
+
get: operations["listResourceUsage"];
|
|
2211
|
+
put?: never;
|
|
2212
|
+
post?: never;
|
|
2213
|
+
delete?: never;
|
|
2214
|
+
options?: never;
|
|
2215
|
+
head?: never;
|
|
2216
|
+
patch?: never;
|
|
2217
|
+
trace?: never;
|
|
2218
|
+
};
|
|
2139
2219
|
"/sequences": {
|
|
2140
2220
|
parameters: {
|
|
2141
2221
|
query?: never;
|
|
@@ -4303,6 +4383,28 @@ export interface components {
|
|
|
4303
4383
|
/** @description Require the user to submit a form before executing */
|
|
4304
4384
|
require_form_submission?: boolean;
|
|
4305
4385
|
};
|
|
4386
|
+
InvokeActionDto: {
|
|
4387
|
+
/**
|
|
4388
|
+
* @description Inputs forwarded to the action’s HTTP request
|
|
4389
|
+
* @default {}
|
|
4390
|
+
*/
|
|
4391
|
+
inputs: {
|
|
4392
|
+
/** @description Query string params */
|
|
4393
|
+
queryParams?: {
|
|
4394
|
+
[key: string]: unknown;
|
|
4395
|
+
};
|
|
4396
|
+
/** @description Path template params */
|
|
4397
|
+
pathParams?: {
|
|
4398
|
+
[key: string]: unknown;
|
|
4399
|
+
};
|
|
4400
|
+
/** @description Request body (sent for non-GET methods) */
|
|
4401
|
+
body?: unknown;
|
|
4402
|
+
};
|
|
4403
|
+
context?: {
|
|
4404
|
+
/** @description Optional conversation session. When given, the request is decorated with the same in-session context the AI agent attaches (org globals, contact identity, default headers, and — off web — per-contact backend auth). */
|
|
4405
|
+
sessionId?: string;
|
|
4406
|
+
};
|
|
4407
|
+
};
|
|
4306
4408
|
UpdateAutopilotInputDto: {
|
|
4307
4409
|
/**
|
|
4308
4410
|
* @description Channel to update: web, email, phone, whatsapp, slack, sms, instagram, messenger, api, web_voice
|
|
@@ -5086,6 +5188,19 @@ export interface components {
|
|
|
5086
5188
|
/** @description New description for the category */
|
|
5087
5189
|
description?: string;
|
|
5088
5190
|
};
|
|
5191
|
+
InvokeWorkflowDto: {
|
|
5192
|
+
/**
|
|
5193
|
+
* @description Inputs for the workflow (ai payload / form data)
|
|
5194
|
+
* @default {}
|
|
5195
|
+
*/
|
|
5196
|
+
input: {
|
|
5197
|
+
[key: string]: unknown;
|
|
5198
|
+
};
|
|
5199
|
+
context?: {
|
|
5200
|
+
/** @description Conversation session for ticket context */
|
|
5201
|
+
sessionId?: string;
|
|
5202
|
+
};
|
|
5203
|
+
};
|
|
5089
5204
|
SearchTrainingKnowledgeInputDto: {
|
|
5090
5205
|
query: string;
|
|
5091
5206
|
/** @default 10 */
|
|
@@ -5395,6 +5510,9 @@ export interface components {
|
|
|
5395
5510
|
name: string;
|
|
5396
5511
|
}[];
|
|
5397
5512
|
} | null;
|
|
5513
|
+
custom_data?: {
|
|
5514
|
+
[key: string]: unknown;
|
|
5515
|
+
} | null;
|
|
5398
5516
|
} | {
|
|
5399
5517
|
actionCalls?: {
|
|
5400
5518
|
action: {
|
|
@@ -5434,6 +5552,9 @@ export interface components {
|
|
|
5434
5552
|
additional_debug_data?: {
|
|
5435
5553
|
[key: string]: unknown;
|
|
5436
5554
|
} | null;
|
|
5555
|
+
custom_data?: {
|
|
5556
|
+
[key: string]: unknown;
|
|
5557
|
+
} | null;
|
|
5437
5558
|
whatsapp_template_request?: unknown | null;
|
|
5438
5559
|
rule_violation_reflections?: {
|
|
5439
5560
|
rule_name: string;
|
|
@@ -5749,6 +5870,21 @@ export interface components {
|
|
|
5749
5870
|
ended_at: string | null;
|
|
5750
5871
|
status: components["schemas"]["SequenceStatus"] | null;
|
|
5751
5872
|
};
|
|
5873
|
+
SankeyReportResDto: {
|
|
5874
|
+
nodes: {
|
|
5875
|
+
id: string;
|
|
5876
|
+
/** @enum {string} */
|
|
5877
|
+
dimensionKey: "all_tickets" | "replied_by" | "outcome" | "handoff" | "channel" | "integration_source" | "assist_mode" | "contact_custom_data" | "session_custom_data" | "sentiment" | "status" | "assigned_team" | "contact_source";
|
|
5878
|
+
dimensionLabel: string;
|
|
5879
|
+
bucket: string;
|
|
5880
|
+
count: number;
|
|
5881
|
+
}[];
|
|
5882
|
+
links: {
|
|
5883
|
+
source: string;
|
|
5884
|
+
target: string;
|
|
5885
|
+
value: number;
|
|
5886
|
+
}[];
|
|
5887
|
+
};
|
|
5752
5888
|
EmailTemplateActivityItemDto: {
|
|
5753
5889
|
id: string;
|
|
5754
5890
|
from_email: string;
|
|
@@ -6241,6 +6377,12 @@ export interface components {
|
|
|
6241
6377
|
*/
|
|
6242
6378
|
updated_at: string;
|
|
6243
6379
|
};
|
|
6380
|
+
InvokeActionResponseDto: {
|
|
6381
|
+
/** @description Upstream HTTP status code */
|
|
6382
|
+
status: number;
|
|
6383
|
+
/** @description Parsed JSON when the response is JSON, else the raw text */
|
|
6384
|
+
body: unknown;
|
|
6385
|
+
};
|
|
6244
6386
|
AutopilotStatusResponseDto: {
|
|
6245
6387
|
channels: {
|
|
6246
6388
|
/** @description Channel name */
|
|
@@ -6550,6 +6692,9 @@ export interface components {
|
|
|
6550
6692
|
additional_debug_data?: {
|
|
6551
6693
|
[key: string]: unknown;
|
|
6552
6694
|
} | null;
|
|
6695
|
+
custom_data?: {
|
|
6696
|
+
[key: string]: unknown;
|
|
6697
|
+
} | null;
|
|
6553
6698
|
whatsapp_template_request?: unknown | null;
|
|
6554
6699
|
rule_violation_reflections?: {
|
|
6555
6700
|
rule_name: string;
|
|
@@ -7244,6 +7389,27 @@ export interface components {
|
|
|
7244
7389
|
/** @description ISO 8601 timestamp of most recent use */
|
|
7245
7390
|
last_used_at: string | null;
|
|
7246
7391
|
};
|
|
7392
|
+
PublicResourceUsageListDto: {
|
|
7393
|
+
items: {
|
|
7394
|
+
resource_id: string;
|
|
7395
|
+
/** @description Distinct conversations that used this resource (usage mirror ∪ handoff citations) */
|
|
7396
|
+
session_count: number;
|
|
7397
|
+
/** @description Distinct conversations where the resource was applied */
|
|
7398
|
+
applied_sessions: number;
|
|
7399
|
+
/** @description Total applications/invocations */
|
|
7400
|
+
applied_replies: number;
|
|
7401
|
+
/** @description Distinct conversations where an instruction was in context (instructions only) */
|
|
7402
|
+
available_sessions: number;
|
|
7403
|
+
available_replies: number;
|
|
7404
|
+
/** @description Distinct conversations that handed off while citing this resource (0 for actions) */
|
|
7405
|
+
handoff_count: number;
|
|
7406
|
+
/** @description ISO 8601 timestamp of first use */
|
|
7407
|
+
first_used_at: string | null;
|
|
7408
|
+
/** @description ISO 8601 timestamp of most recent use */
|
|
7409
|
+
last_used_at: string | null;
|
|
7410
|
+
}[];
|
|
7411
|
+
next: string | null;
|
|
7412
|
+
};
|
|
7247
7413
|
AddContactsToSequenceOutput: {
|
|
7248
7414
|
run_id: string;
|
|
7249
7415
|
};
|
|
@@ -7840,6 +8006,17 @@ export interface components {
|
|
|
7840
8006
|
DeactivateWorkflowOutput: {
|
|
7841
8007
|
success: boolean;
|
|
7842
8008
|
};
|
|
8009
|
+
InvokeWorkflowResponseDto: {
|
|
8010
|
+
/** @description The id of the workflow run */
|
|
8011
|
+
run_id: string;
|
|
8012
|
+
/**
|
|
8013
|
+
* @description completed = ran synchronously; queued = running in the background
|
|
8014
|
+
* @enum {string}
|
|
8015
|
+
*/
|
|
8016
|
+
status: "completed" | "queued";
|
|
8017
|
+
/** @description Terminal output, present when the workflow ran synchronously */
|
|
8018
|
+
output?: unknown;
|
|
8019
|
+
};
|
|
7843
8020
|
ListWorkflowRunsOutput: {
|
|
7844
8021
|
runs: components["schemas"]["WorkflowRunPublicResponseDto"][];
|
|
7845
8022
|
total_items: number;
|
|
@@ -8124,6 +8301,41 @@ export interface operations {
|
|
|
8124
8301
|
};
|
|
8125
8302
|
};
|
|
8126
8303
|
};
|
|
8304
|
+
invokeAction: {
|
|
8305
|
+
parameters: {
|
|
8306
|
+
query?: never;
|
|
8307
|
+
header?: never;
|
|
8308
|
+
path: {
|
|
8309
|
+
operation_id: string;
|
|
8310
|
+
};
|
|
8311
|
+
cookie?: never;
|
|
8312
|
+
};
|
|
8313
|
+
requestBody: {
|
|
8314
|
+
content: {
|
|
8315
|
+
"application/json": components["schemas"]["InvokeActionDto"];
|
|
8316
|
+
};
|
|
8317
|
+
};
|
|
8318
|
+
responses: {
|
|
8319
|
+
/** @description Default Response */
|
|
8320
|
+
201: {
|
|
8321
|
+
headers: {
|
|
8322
|
+
[name: string]: unknown;
|
|
8323
|
+
};
|
|
8324
|
+
content: {
|
|
8325
|
+
"application/json": components["schemas"]["InvokeActionResponseDto"];
|
|
8326
|
+
};
|
|
8327
|
+
};
|
|
8328
|
+
/** @description Internal Server Error */
|
|
8329
|
+
500: {
|
|
8330
|
+
headers: {
|
|
8331
|
+
[name: string]: unknown;
|
|
8332
|
+
};
|
|
8333
|
+
content: {
|
|
8334
|
+
"application/json": components["schemas"]["ErrorDto"];
|
|
8335
|
+
};
|
|
8336
|
+
};
|
|
8337
|
+
};
|
|
8338
|
+
};
|
|
8127
8339
|
deleteAllActions: {
|
|
8128
8340
|
parameters: {
|
|
8129
8341
|
query?: never;
|
|
@@ -10829,6 +11041,44 @@ export interface operations {
|
|
|
10829
11041
|
};
|
|
10830
11042
|
};
|
|
10831
11043
|
};
|
|
11044
|
+
getConversationSankey: {
|
|
11045
|
+
parameters: {
|
|
11046
|
+
query: {
|
|
11047
|
+
/** @description Comma-separated dimension keys, e.g. "replied_by,outcome". 1–6 allowed. */
|
|
11048
|
+
dimensions: string;
|
|
11049
|
+
/** @description The jsonb key to read for a custom-data dimension (contact_custom_data or session_custom_data). */
|
|
11050
|
+
custom_data_key?: string;
|
|
11051
|
+
/** @description Start date in ISO 8601 format (defaults to 30 days ago) */
|
|
11052
|
+
start_date?: string;
|
|
11053
|
+
/** @description End date in ISO 8601 format (defaults to now) */
|
|
11054
|
+
end_date?: string;
|
|
11055
|
+
};
|
|
11056
|
+
header?: never;
|
|
11057
|
+
path?: never;
|
|
11058
|
+
cookie?: never;
|
|
11059
|
+
};
|
|
11060
|
+
requestBody?: never;
|
|
11061
|
+
responses: {
|
|
11062
|
+
/** @description Default Response */
|
|
11063
|
+
200: {
|
|
11064
|
+
headers: {
|
|
11065
|
+
[name: string]: unknown;
|
|
11066
|
+
};
|
|
11067
|
+
content: {
|
|
11068
|
+
"application/json": components["schemas"]["SankeyReportResDto"];
|
|
11069
|
+
};
|
|
11070
|
+
};
|
|
11071
|
+
/** @description Internal Server Error */
|
|
11072
|
+
500: {
|
|
11073
|
+
headers: {
|
|
11074
|
+
[name: string]: unknown;
|
|
11075
|
+
};
|
|
11076
|
+
content: {
|
|
11077
|
+
"application/json": components["schemas"]["ErrorDto"];
|
|
11078
|
+
};
|
|
11079
|
+
};
|
|
11080
|
+
};
|
|
11081
|
+
};
|
|
10832
11082
|
listOfficeHours: {
|
|
10833
11083
|
parameters: {
|
|
10834
11084
|
query?: never;
|
|
@@ -11661,6 +11911,42 @@ export interface operations {
|
|
|
11661
11911
|
};
|
|
11662
11912
|
};
|
|
11663
11913
|
};
|
|
11914
|
+
invokeWorkflow: {
|
|
11915
|
+
parameters: {
|
|
11916
|
+
query?: never;
|
|
11917
|
+
header?: never;
|
|
11918
|
+
path: {
|
|
11919
|
+
/** @description The workflow UUID to invoke */
|
|
11920
|
+
workflow_id: string;
|
|
11921
|
+
};
|
|
11922
|
+
cookie?: never;
|
|
11923
|
+
};
|
|
11924
|
+
requestBody: {
|
|
11925
|
+
content: {
|
|
11926
|
+
"application/json": components["schemas"]["InvokeWorkflowDto"];
|
|
11927
|
+
};
|
|
11928
|
+
};
|
|
11929
|
+
responses: {
|
|
11930
|
+
/** @description Default Response */
|
|
11931
|
+
201: {
|
|
11932
|
+
headers: {
|
|
11933
|
+
[name: string]: unknown;
|
|
11934
|
+
};
|
|
11935
|
+
content: {
|
|
11936
|
+
"application/json": components["schemas"]["InvokeWorkflowResponseDto"];
|
|
11937
|
+
};
|
|
11938
|
+
};
|
|
11939
|
+
/** @description Internal Server Error */
|
|
11940
|
+
500: {
|
|
11941
|
+
headers: {
|
|
11942
|
+
[name: string]: unknown;
|
|
11943
|
+
};
|
|
11944
|
+
content: {
|
|
11945
|
+
"application/json": components["schemas"]["ErrorDto"];
|
|
11946
|
+
};
|
|
11947
|
+
};
|
|
11948
|
+
};
|
|
11949
|
+
};
|
|
11664
11950
|
listWorkflowRuns: {
|
|
11665
11951
|
parameters: {
|
|
11666
11952
|
query?: {
|
|
@@ -12477,6 +12763,44 @@ export interface operations {
|
|
|
12477
12763
|
};
|
|
12478
12764
|
};
|
|
12479
12765
|
};
|
|
12766
|
+
listResourceUsage: {
|
|
12767
|
+
parameters: {
|
|
12768
|
+
query?: {
|
|
12769
|
+
from?: unknown;
|
|
12770
|
+
to?: unknown;
|
|
12771
|
+
/** @description Opaque pagination cursor from a previous `next` */
|
|
12772
|
+
cursor?: string;
|
|
12773
|
+
limit?: number;
|
|
12774
|
+
};
|
|
12775
|
+
header?: never;
|
|
12776
|
+
path: {
|
|
12777
|
+
/** @description The kind of AI resource to look up: `action` (a tool the AI can call), `instruction` (an AI instruction/behavior), or `knowledge` (a knowledge base item). */
|
|
12778
|
+
resource_type: "action" | "instruction" | "knowledge";
|
|
12779
|
+
};
|
|
12780
|
+
cookie?: never;
|
|
12781
|
+
};
|
|
12782
|
+
requestBody?: never;
|
|
12783
|
+
responses: {
|
|
12784
|
+
/** @description Default Response */
|
|
12785
|
+
200: {
|
|
12786
|
+
headers: {
|
|
12787
|
+
[name: string]: unknown;
|
|
12788
|
+
};
|
|
12789
|
+
content: {
|
|
12790
|
+
"application/json": components["schemas"]["PublicResourceUsageListDto"];
|
|
12791
|
+
};
|
|
12792
|
+
};
|
|
12793
|
+
/** @description Internal Server Error */
|
|
12794
|
+
500: {
|
|
12795
|
+
headers: {
|
|
12796
|
+
[name: string]: unknown;
|
|
12797
|
+
};
|
|
12798
|
+
content: {
|
|
12799
|
+
"application/json": components["schemas"]["ErrorDto"];
|
|
12800
|
+
};
|
|
12801
|
+
};
|
|
12802
|
+
};
|
|
12803
|
+
};
|
|
12480
12804
|
createSequence: {
|
|
12481
12805
|
parameters: {
|
|
12482
12806
|
query?: never;
|