@opencx/mcp 1.11.86 → 1.11.88

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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=invoke-action.spec.d.ts.map
@@ -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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AAS,CAAC,0BAA0B,CAAC,CAAC;QAClE,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5C,uEAAuE;QACvE,0DAA0D;QAC1D,MAAM,CAAC,MAAM,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;YACzC,MAAM,EAAE,EAAE,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;
@@ -1412,6 +1432,46 @@ export interface paths {
1412
1432
  patch?: never;
1413
1433
  trace?: never;
1414
1434
  };
1435
+ "/impact-report/sankey/tickets": {
1436
+ parameters: {
1437
+ query?: never;
1438
+ header?: never;
1439
+ path?: never;
1440
+ cookie?: never;
1441
+ };
1442
+ /**
1443
+ * List the tickets behind a Sankey node/link
1444
+ * @description Drill down into a conversation-flow Sankey: list the actual chat sessions (tickets) that flow through a clicked node or link. Pass the SAME dimensions/date/custom_data_key as getConversationSankey, plus a JSON-encoded `path` — one {layerIndex, bucket} constraint for a clicked node, two for a clicked link. Paginated via limit/offset. Chain into investigate_session on a returned ticket id to diagnose the "why".
1445
+ */
1446
+ get: operations["getConversationSankeyTickets"];
1447
+ put?: never;
1448
+ post?: never;
1449
+ delete?: never;
1450
+ options?: never;
1451
+ head?: never;
1452
+ patch?: never;
1453
+ trace?: never;
1454
+ };
1455
+ "/impact-report/sankey/dimensions": {
1456
+ parameters: {
1457
+ query?: never;
1458
+ header?: never;
1459
+ path?: never;
1460
+ cookie?: never;
1461
+ };
1462
+ /**
1463
+ * List conversation-flow Sankey dimensions
1464
+ * @description List the dimension keys a conversation-flow Sankey can be sliced by, plus the org's observed custom-data keys (with labels) for contact_custom_data and session_custom_data. Call this before getConversationSankey to choose valid dimensions and the custom_data_key.
1465
+ */
1466
+ get: operations["getConversationSankeyDimensions"];
1467
+ put?: never;
1468
+ post?: never;
1469
+ delete?: never;
1470
+ options?: never;
1471
+ head?: never;
1472
+ patch?: never;
1473
+ trace?: never;
1474
+ };
1415
1475
  "/office-hours": {
1416
1476
  parameters: {
1417
1477
  query?: never;
@@ -1772,6 +1832,26 @@ export interface paths {
1772
1832
  patch?: never;
1773
1833
  trace?: never;
1774
1834
  };
1835
+ "/workflows/{workflow_id}/invoke": {
1836
+ parameters: {
1837
+ query?: never;
1838
+ header?: never;
1839
+ path?: never;
1840
+ cookie?: never;
1841
+ };
1842
+ get?: never;
1843
+ put?: never;
1844
+ /**
1845
+ * [Beta] Invoke a workflow
1846
+ * @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.
1847
+ */
1848
+ post: operations["invokeWorkflow"];
1849
+ delete?: never;
1850
+ options?: never;
1851
+ head?: never;
1852
+ patch?: never;
1853
+ trace?: never;
1854
+ };
1775
1855
  "/workflows/{workflow_id}/runs": {
1776
1856
  parameters: {
1777
1857
  query?: never;
@@ -2156,6 +2236,26 @@ export interface paths {
2156
2236
  patch?: never;
2157
2237
  trace?: never;
2158
2238
  };
2239
+ "/resource-usage/{resource_type}": {
2240
+ parameters: {
2241
+ query?: never;
2242
+ header?: never;
2243
+ path?: never;
2244
+ cookie?: never;
2245
+ };
2246
+ /**
2247
+ * List usage counts for all resources of a type
2248
+ * @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.
2249
+ */
2250
+ get: operations["listResourceUsage"];
2251
+ put?: never;
2252
+ post?: never;
2253
+ delete?: never;
2254
+ options?: never;
2255
+ head?: never;
2256
+ patch?: never;
2257
+ trace?: never;
2258
+ };
2159
2259
  "/sequences": {
2160
2260
  parameters: {
2161
2261
  query?: never;
@@ -4323,6 +4423,28 @@ export interface components {
4323
4423
  /** @description Require the user to submit a form before executing */
4324
4424
  require_form_submission?: boolean;
4325
4425
  };
4426
+ InvokeActionDto: {
4427
+ /**
4428
+ * @description Inputs forwarded to the action’s HTTP request
4429
+ * @default {}
4430
+ */
4431
+ inputs: {
4432
+ /** @description Query string params */
4433
+ queryParams?: {
4434
+ [key: string]: unknown;
4435
+ };
4436
+ /** @description Path template params */
4437
+ pathParams?: {
4438
+ [key: string]: unknown;
4439
+ };
4440
+ /** @description Request body (sent for non-GET methods) */
4441
+ body?: unknown;
4442
+ };
4443
+ context?: {
4444
+ /** @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). */
4445
+ sessionId?: string;
4446
+ };
4447
+ };
4326
4448
  UpdateAutopilotInputDto: {
4327
4449
  /**
4328
4450
  * @description Channel to update: web, email, phone, whatsapp, slack, sms, instagram, messenger, api, web_voice
@@ -5106,6 +5228,19 @@ export interface components {
5106
5228
  /** @description New description for the category */
5107
5229
  description?: string;
5108
5230
  };
5231
+ InvokeWorkflowDto: {
5232
+ /**
5233
+ * @description Inputs for the workflow (ai payload / form data)
5234
+ * @default {}
5235
+ */
5236
+ input: {
5237
+ [key: string]: unknown;
5238
+ };
5239
+ context?: {
5240
+ /** @description Conversation session for ticket context */
5241
+ sessionId?: string;
5242
+ };
5243
+ };
5109
5244
  SearchTrainingKnowledgeInputDto: {
5110
5245
  query: string;
5111
5246
  /** @default 10 */
@@ -5415,6 +5550,9 @@ export interface components {
5415
5550
  name: string;
5416
5551
  }[];
5417
5552
  } | null;
5553
+ custom_data?: {
5554
+ [key: string]: unknown;
5555
+ } | null;
5418
5556
  } | {
5419
5557
  actionCalls?: {
5420
5558
  action: {
@@ -5454,6 +5592,9 @@ export interface components {
5454
5592
  additional_debug_data?: {
5455
5593
  [key: string]: unknown;
5456
5594
  } | null;
5595
+ custom_data?: {
5596
+ [key: string]: unknown;
5597
+ } | null;
5457
5598
  whatsapp_template_request?: unknown | null;
5458
5599
  rule_violation_reflections?: {
5459
5600
  rule_name: string;
@@ -5773,7 +5914,7 @@ export interface components {
5773
5914
  nodes: {
5774
5915
  id: string;
5775
5916
  /** @enum {string} */
5776
- dimensionKey: "replied_by" | "outcome" | "handoff" | "channel" | "integration_source" | "assist_mode" | "contact_custom_data" | "sentiment" | "status" | "assigned_team" | "contact_source";
5917
+ dimensionKey: "all_tickets" | "replied_by" | "outcome" | "handoff" | "channel" | "integration_source" | "assist_mode" | "contact_custom_data" | "session_custom_data" | "sentiment" | "status" | "assigned_team" | "contact_source" | "csat" | "handoff_reason" | "contact_reason";
5777
5918
  dimensionLabel: string;
5778
5919
  bucket: string;
5779
5920
  count: number;
@@ -5784,6 +5925,32 @@ export interface components {
5784
5925
  value: number;
5785
5926
  }[];
5786
5927
  };
5928
+ SankeyTicketsResDto: {
5929
+ tickets: {
5930
+ /** Format: uuid */
5931
+ id: string;
5932
+ ticketNumber: number;
5933
+ channel: string;
5934
+ aiClosureType: string | null;
5935
+ mainStatus: string;
5936
+ sentiment: string | null;
5937
+ createdAt: string;
5938
+ lastMessage: string | null;
5939
+ contactName: string | null;
5940
+ contactEmail: string | null;
5941
+ }[];
5942
+ total: number;
5943
+ hasMore: boolean;
5944
+ };
5945
+ SankeyDimensionCatalogResDto: {
5946
+ dimensions: {
5947
+ /** @enum {string} */
5948
+ key: "all_tickets" | "replied_by" | "outcome" | "handoff" | "channel" | "integration_source" | "assist_mode" | "contact_custom_data" | "session_custom_data" | "sentiment" | "status" | "assigned_team" | "contact_source" | "csat" | "handoff_reason" | "contact_reason";
5949
+ label: string;
5950
+ requiresCustomDataKey: boolean;
5951
+ customDataKeys?: string[];
5952
+ }[];
5953
+ };
5787
5954
  EmailTemplateActivityItemDto: {
5788
5955
  id: string;
5789
5956
  from_email: string;
@@ -6276,6 +6443,12 @@ export interface components {
6276
6443
  */
6277
6444
  updated_at: string;
6278
6445
  };
6446
+ InvokeActionResponseDto: {
6447
+ /** @description Upstream HTTP status code */
6448
+ status: number;
6449
+ /** @description Parsed JSON when the response is JSON, else the raw text */
6450
+ body: unknown;
6451
+ };
6279
6452
  AutopilotStatusResponseDto: {
6280
6453
  channels: {
6281
6454
  /** @description Channel name */
@@ -6585,6 +6758,9 @@ export interface components {
6585
6758
  additional_debug_data?: {
6586
6759
  [key: string]: unknown;
6587
6760
  } | null;
6761
+ custom_data?: {
6762
+ [key: string]: unknown;
6763
+ } | null;
6588
6764
  whatsapp_template_request?: unknown | null;
6589
6765
  rule_violation_reflections?: {
6590
6766
  rule_name: string;
@@ -7279,6 +7455,27 @@ export interface components {
7279
7455
  /** @description ISO 8601 timestamp of most recent use */
7280
7456
  last_used_at: string | null;
7281
7457
  };
7458
+ PublicResourceUsageListDto: {
7459
+ items: {
7460
+ resource_id: string;
7461
+ /** @description Distinct conversations that used this resource (usage mirror ∪ handoff citations) */
7462
+ session_count: number;
7463
+ /** @description Distinct conversations where the resource was applied */
7464
+ applied_sessions: number;
7465
+ /** @description Total applications/invocations */
7466
+ applied_replies: number;
7467
+ /** @description Distinct conversations where an instruction was in context (instructions only) */
7468
+ available_sessions: number;
7469
+ available_replies: number;
7470
+ /** @description Distinct conversations that handed off while citing this resource (0 for actions) */
7471
+ handoff_count: number;
7472
+ /** @description ISO 8601 timestamp of first use */
7473
+ first_used_at: string | null;
7474
+ /** @description ISO 8601 timestamp of most recent use */
7475
+ last_used_at: string | null;
7476
+ }[];
7477
+ next: string | null;
7478
+ };
7282
7479
  AddContactsToSequenceOutput: {
7283
7480
  run_id: string;
7284
7481
  };
@@ -7875,6 +8072,17 @@ export interface components {
7875
8072
  DeactivateWorkflowOutput: {
7876
8073
  success: boolean;
7877
8074
  };
8075
+ InvokeWorkflowResponseDto: {
8076
+ /** @description The id of the workflow run */
8077
+ run_id: string;
8078
+ /**
8079
+ * @description completed = ran synchronously; queued = running in the background
8080
+ * @enum {string}
8081
+ */
8082
+ status: "completed" | "queued";
8083
+ /** @description Terminal output, present when the workflow ran synchronously */
8084
+ output?: unknown;
8085
+ };
7878
8086
  ListWorkflowRunsOutput: {
7879
8087
  runs: components["schemas"]["WorkflowRunPublicResponseDto"][];
7880
8088
  total_items: number;
@@ -8159,6 +8367,41 @@ export interface operations {
8159
8367
  };
8160
8368
  };
8161
8369
  };
8370
+ invokeAction: {
8371
+ parameters: {
8372
+ query?: never;
8373
+ header?: never;
8374
+ path: {
8375
+ operation_id: string;
8376
+ };
8377
+ cookie?: never;
8378
+ };
8379
+ requestBody: {
8380
+ content: {
8381
+ "application/json": components["schemas"]["InvokeActionDto"];
8382
+ };
8383
+ };
8384
+ responses: {
8385
+ /** @description Default Response */
8386
+ 201: {
8387
+ headers: {
8388
+ [name: string]: unknown;
8389
+ };
8390
+ content: {
8391
+ "application/json": components["schemas"]["InvokeActionResponseDto"];
8392
+ };
8393
+ };
8394
+ /** @description Internal Server Error */
8395
+ 500: {
8396
+ headers: {
8397
+ [name: string]: unknown;
8398
+ };
8399
+ content: {
8400
+ "application/json": components["schemas"]["ErrorDto"];
8401
+ };
8402
+ };
8403
+ };
8404
+ };
8162
8405
  deleteAllActions: {
8163
8406
  parameters: {
8164
8407
  query?: never;
@@ -10867,9 +11110,9 @@ export interface operations {
10867
11110
  getConversationSankey: {
10868
11111
  parameters: {
10869
11112
  query: {
10870
- /** @description Comma-separated dimension keys, e.g. "replied_by,outcome". 1–6 allowed. */
11113
+ /** @description Ordered dimensions, 1–6, built left→right. Either a comma-separated key list ("replied_by,outcome") or a JSON array of {dimension, customDataKey} to give each custom-data column its own jsonb key, e.g. [{"dimension":"contact_custom_data","customDataKey":"tier"},{"dimension":"session_custom_data","customDataKey":"plan"}]. */
10871
11114
  dimensions: string;
10872
- /** @description Contact custom_data key to read when the contact_custom_data dimension is used. */
11115
+ /** @description Fallback jsonb key for custom-data dimensions given via the CSV form (or when a JSON dimension omits its own customDataKey). Ignored where a dimension carries its own key. */
10873
11116
  custom_data_key?: string;
10874
11117
  /** @description Start date in ISO 8601 format (defaults to 30 days ago) */
10875
11118
  start_date?: string;
@@ -10902,6 +11145,77 @@ export interface operations {
10902
11145
  };
10903
11146
  };
10904
11147
  };
11148
+ getConversationSankeyTickets: {
11149
+ parameters: {
11150
+ query: {
11151
+ /** @description Ordered dimensions, 1–6, built left→right. Either a comma-separated key list ("replied_by,outcome") or a JSON array of {dimension, customDataKey} to give each custom-data column its own jsonb key, e.g. [{"dimension":"contact_custom_data","customDataKey":"tier"},{"dimension":"session_custom_data","customDataKey":"plan"}]. */
11152
+ dimensions: string;
11153
+ /** @description JSON-encoded array of {layerIndex, bucket} constraints identifying the clicked target: 1 constraint = a clicked node, 2 = a clicked link. bucket may be an "Other (N)" label. */
11154
+ path: string;
11155
+ /** @description Fallback jsonb key for custom-data dimensions given via the CSV form (or when a JSON dimension omits its own customDataKey). Ignored where a dimension carries its own key. */
11156
+ custom_data_key?: string;
11157
+ /** @description Start date in ISO 8601 format (defaults to 30 days ago) */
11158
+ start_date?: string;
11159
+ /** @description End date in ISO 8601 format (defaults to now) */
11160
+ end_date?: string;
11161
+ limit?: number;
11162
+ offset?: number;
11163
+ };
11164
+ header?: never;
11165
+ path?: never;
11166
+ cookie?: never;
11167
+ };
11168
+ requestBody?: never;
11169
+ responses: {
11170
+ /** @description Default Response */
11171
+ 200: {
11172
+ headers: {
11173
+ [name: string]: unknown;
11174
+ };
11175
+ content: {
11176
+ "application/json": components["schemas"]["SankeyTicketsResDto"];
11177
+ };
11178
+ };
11179
+ /** @description Internal Server Error */
11180
+ 500: {
11181
+ headers: {
11182
+ [name: string]: unknown;
11183
+ };
11184
+ content: {
11185
+ "application/json": components["schemas"]["ErrorDto"];
11186
+ };
11187
+ };
11188
+ };
11189
+ };
11190
+ getConversationSankeyDimensions: {
11191
+ parameters: {
11192
+ query?: never;
11193
+ header?: never;
11194
+ path?: never;
11195
+ cookie?: never;
11196
+ };
11197
+ requestBody?: never;
11198
+ responses: {
11199
+ /** @description Default Response */
11200
+ 200: {
11201
+ headers: {
11202
+ [name: string]: unknown;
11203
+ };
11204
+ content: {
11205
+ "application/json": components["schemas"]["SankeyDimensionCatalogResDto"];
11206
+ };
11207
+ };
11208
+ /** @description Internal Server Error */
11209
+ 500: {
11210
+ headers: {
11211
+ [name: string]: unknown;
11212
+ };
11213
+ content: {
11214
+ "application/json": components["schemas"]["ErrorDto"];
11215
+ };
11216
+ };
11217
+ };
11218
+ };
10905
11219
  listOfficeHours: {
10906
11220
  parameters: {
10907
11221
  query?: never;
@@ -11734,6 +12048,42 @@ export interface operations {
11734
12048
  };
11735
12049
  };
11736
12050
  };
12051
+ invokeWorkflow: {
12052
+ parameters: {
12053
+ query?: never;
12054
+ header?: never;
12055
+ path: {
12056
+ /** @description The workflow UUID to invoke */
12057
+ workflow_id: string;
12058
+ };
12059
+ cookie?: never;
12060
+ };
12061
+ requestBody: {
12062
+ content: {
12063
+ "application/json": components["schemas"]["InvokeWorkflowDto"];
12064
+ };
12065
+ };
12066
+ responses: {
12067
+ /** @description Default Response */
12068
+ 201: {
12069
+ headers: {
12070
+ [name: string]: unknown;
12071
+ };
12072
+ content: {
12073
+ "application/json": components["schemas"]["InvokeWorkflowResponseDto"];
12074
+ };
12075
+ };
12076
+ /** @description Internal Server Error */
12077
+ 500: {
12078
+ headers: {
12079
+ [name: string]: unknown;
12080
+ };
12081
+ content: {
12082
+ "application/json": components["schemas"]["ErrorDto"];
12083
+ };
12084
+ };
12085
+ };
12086
+ };
11737
12087
  listWorkflowRuns: {
11738
12088
  parameters: {
11739
12089
  query?: {
@@ -12550,6 +12900,44 @@ export interface operations {
12550
12900
  };
12551
12901
  };
12552
12902
  };
12903
+ listResourceUsage: {
12904
+ parameters: {
12905
+ query?: {
12906
+ from?: unknown;
12907
+ to?: unknown;
12908
+ /** @description Opaque pagination cursor from a previous `next` */
12909
+ cursor?: string;
12910
+ limit?: number;
12911
+ };
12912
+ header?: never;
12913
+ path: {
12914
+ /** @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). */
12915
+ resource_type: "action" | "instruction" | "knowledge";
12916
+ };
12917
+ cookie?: never;
12918
+ };
12919
+ requestBody?: never;
12920
+ responses: {
12921
+ /** @description Default Response */
12922
+ 200: {
12923
+ headers: {
12924
+ [name: string]: unknown;
12925
+ };
12926
+ content: {
12927
+ "application/json": components["schemas"]["PublicResourceUsageListDto"];
12928
+ };
12929
+ };
12930
+ /** @description Internal Server Error */
12931
+ 500: {
12932
+ headers: {
12933
+ [name: string]: unknown;
12934
+ };
12935
+ content: {
12936
+ "application/json": components["schemas"]["ErrorDto"];
12937
+ };
12938
+ };
12939
+ };
12940
+ };
12553
12941
  createSequence: {
12554
12942
  parameters: {
12555
12943
  query?: never;