@chatbotkit/sdk 1.29.1 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client.cjs +54 -44
- package/dist/cjs/types/ability.d.ts +22 -0
- package/dist/cjs/types/api/v1.d.ts +92 -0
- package/dist/esm/client.js +11 -1
- package/dist/esm/types/ability.d.ts +22 -0
- package/dist/esm/types/api/v1.d.ts +92 -0
- package/package.json +2 -3
package/dist/cjs/client.cjs
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
2
13
|
var _ChatBotKitClient_secret, _ChatBotKitClient_baseUrl, _ChatBotKitClient_endpoints, _ChatBotKitClient_runAsUserId, _ChatBotKitClient_runAsChildUserEmail, _ChatBotKitClient_timezone, _ChatBotKitClient_headers, _ChatBotKitClient_timeout, _ChatBotKitClient_retries, _ChatBotKitClient_retryDelay, _ChatBotKitClient_retryTimeout, _ChatBotKitClient_fetchFn, _ChatBotKitClient_cacheMap;
|
|
3
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
15
|
exports.ChatBotKitClient = exports.ResponsePromise = void 0;
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
16
|
const fetch_1 = require("@chatbotkit/fetch");
|
|
7
17
|
const fetchPlusPlus = (0, fetch_1.withRetry)((0, fetch_1.withTimeout)(fetch_1.fetch, { timeout: Infinity }), {
|
|
8
18
|
retries: 3,
|
|
@@ -169,40 +179,40 @@ class ChatBotKitClient {
|
|
|
169
179
|
_ChatBotKitClient_retryTimeout.set(this, void 0);
|
|
170
180
|
_ChatBotKitClient_fetchFn.set(this, void 0);
|
|
171
181
|
_ChatBotKitClient_cacheMap.set(this, void 0);
|
|
172
|
-
|
|
173
|
-
|
|
182
|
+
__classPrivateFieldSet(this, _ChatBotKitClient_secret, options.secret, "f");
|
|
183
|
+
__classPrivateFieldSet(this, _ChatBotKitClient_baseUrl, new URL(options.baseUrl || `https://api.chatbotkit.com`), "f");
|
|
174
184
|
if (options.host) {
|
|
175
|
-
|
|
185
|
+
__classPrivateFieldGet(this, _ChatBotKitClient_baseUrl, "f").host = options.host;
|
|
176
186
|
}
|
|
177
187
|
if (options.protocol) {
|
|
178
|
-
|
|
188
|
+
__classPrivateFieldGet(this, _ChatBotKitClient_baseUrl, "f").protocol = options.protocol;
|
|
179
189
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
190
|
+
__classPrivateFieldSet(this, _ChatBotKitClient_endpoints, options.endpoints || {}, "f");
|
|
191
|
+
__classPrivateFieldSet(this, _ChatBotKitClient_runAsUserId, options.runAsUserId, "f");
|
|
192
|
+
__classPrivateFieldSet(this, _ChatBotKitClient_runAsChildUserEmail, options.runAsChildUserEmail, "f");
|
|
193
|
+
__classPrivateFieldSet(this, _ChatBotKitClient_timezone, options.timezone, "f");
|
|
194
|
+
__classPrivateFieldSet(this, _ChatBotKitClient_headers, options.headers || {}, "f");
|
|
195
|
+
__classPrivateFieldSet(this, _ChatBotKitClient_timeout, options.timeout, "f");
|
|
196
|
+
__classPrivateFieldSet(this, _ChatBotKitClient_retries, options.retries, "f");
|
|
197
|
+
__classPrivateFieldSet(this, _ChatBotKitClient_retryDelay, options.retryDelay, "f");
|
|
198
|
+
__classPrivateFieldSet(this, _ChatBotKitClient_retryTimeout, options.retryTimeout, "f");
|
|
199
|
+
__classPrivateFieldSet(this, _ChatBotKitClient_fetchFn, options.fetchFn || fetchPlusPlus, "f");
|
|
200
|
+
__classPrivateFieldSet(this, _ChatBotKitClient_cacheMap, new Map(), "f");
|
|
191
201
|
}
|
|
192
202
|
extend(extensionOptions) {
|
|
193
203
|
const currentOptions = {
|
|
194
|
-
secret:
|
|
195
|
-
baseUrl:
|
|
196
|
-
endpoints: { ...
|
|
197
|
-
runAsUserId:
|
|
198
|
-
runAsChildUserEmail:
|
|
199
|
-
timezone:
|
|
200
|
-
headers: { ...
|
|
201
|
-
timeout:
|
|
202
|
-
retries:
|
|
203
|
-
retryDelay:
|
|
204
|
-
retryTimeout:
|
|
205
|
-
fetchFn:
|
|
204
|
+
secret: __classPrivateFieldGet(this, _ChatBotKitClient_secret, "f") || '',
|
|
205
|
+
baseUrl: __classPrivateFieldGet(this, _ChatBotKitClient_baseUrl, "f").toString(),
|
|
206
|
+
endpoints: { ...__classPrivateFieldGet(this, _ChatBotKitClient_endpoints, "f") },
|
|
207
|
+
runAsUserId: __classPrivateFieldGet(this, _ChatBotKitClient_runAsUserId, "f"),
|
|
208
|
+
runAsChildUserEmail: __classPrivateFieldGet(this, _ChatBotKitClient_runAsChildUserEmail, "f"),
|
|
209
|
+
timezone: __classPrivateFieldGet(this, _ChatBotKitClient_timezone, "f"),
|
|
210
|
+
headers: { ...__classPrivateFieldGet(this, _ChatBotKitClient_headers, "f") },
|
|
211
|
+
timeout: __classPrivateFieldGet(this, _ChatBotKitClient_timeout, "f"),
|
|
212
|
+
retries: __classPrivateFieldGet(this, _ChatBotKitClient_retries, "f"),
|
|
213
|
+
retryDelay: __classPrivateFieldGet(this, _ChatBotKitClient_retryDelay, "f"),
|
|
214
|
+
retryTimeout: __classPrivateFieldGet(this, _ChatBotKitClient_retryTimeout, "f"),
|
|
215
|
+
fetchFn: __classPrivateFieldGet(this, _ChatBotKitClient_fetchFn, "f"),
|
|
206
216
|
};
|
|
207
217
|
const mergedOptions = {
|
|
208
218
|
...currentOptions,
|
|
@@ -220,7 +230,7 @@ class ChatBotKitClient {
|
|
|
220
230
|
}
|
|
221
231
|
clientFetch(path, options) {
|
|
222
232
|
let method = options?.method;
|
|
223
|
-
const url = new URL(
|
|
233
|
+
const url = new URL(__classPrivateFieldGet(this, _ChatBotKitClient_endpoints, "f")[options?.endpoint || path] || path, __classPrivateFieldGet(this, _ChatBotKitClient_baseUrl, "f"));
|
|
224
234
|
if (url.hostname === 'api.chatbotkit.com' &&
|
|
225
235
|
url.pathname.startsWith('/api/')) {
|
|
226
236
|
url.pathname = url.pathname.substring(4);
|
|
@@ -244,21 +254,21 @@ class ChatBotKitClient {
|
|
|
244
254
|
}
|
|
245
255
|
}
|
|
246
256
|
const headers = {
|
|
247
|
-
...
|
|
257
|
+
...__classPrivateFieldGet(this, _ChatBotKitClient_headers, "f"),
|
|
248
258
|
};
|
|
249
259
|
if (!options?.external) {
|
|
250
|
-
if (
|
|
251
|
-
headers['authorization'] = `Bearer ${
|
|
260
|
+
if (__classPrivateFieldGet(this, _ChatBotKitClient_secret, "f")) {
|
|
261
|
+
headers['authorization'] = `Bearer ${__classPrivateFieldGet(this, _ChatBotKitClient_secret, "f")}`;
|
|
252
262
|
}
|
|
253
|
-
if (
|
|
254
|
-
headers['x-runas-user-id'] =
|
|
263
|
+
if (__classPrivateFieldGet(this, _ChatBotKitClient_runAsUserId, "f")) {
|
|
264
|
+
headers['x-runas-user-id'] = __classPrivateFieldGet(this, _ChatBotKitClient_runAsUserId, "f");
|
|
255
265
|
}
|
|
256
|
-
if (
|
|
257
|
-
headers['x-runas-child-user-email'] =
|
|
266
|
+
if (__classPrivateFieldGet(this, _ChatBotKitClient_runAsChildUserEmail, "f")) {
|
|
267
|
+
headers['x-runas-child-user-email'] = __classPrivateFieldGet(this, _ChatBotKitClient_runAsChildUserEmail, "f");
|
|
258
268
|
}
|
|
259
269
|
}
|
|
260
|
-
if (
|
|
261
|
-
headers['x-timezone'] =
|
|
270
|
+
if (__classPrivateFieldGet(this, _ChatBotKitClient_timezone, "f")) {
|
|
271
|
+
headers['x-timezone'] = __classPrivateFieldGet(this, _ChatBotKitClient_timezone, "f");
|
|
262
272
|
}
|
|
263
273
|
let data;
|
|
264
274
|
if (options?.record) {
|
|
@@ -286,13 +296,13 @@ class ChatBotKitClient {
|
|
|
286
296
|
method,
|
|
287
297
|
headers,
|
|
288
298
|
data,
|
|
289
|
-
timeout: options?.timeout ??
|
|
290
|
-
retries: options?.retries ??
|
|
291
|
-
retryDelay: options?.retryDelay ??
|
|
292
|
-
retryTimeout: options?.retryTimeout ??
|
|
293
|
-
fetchFn: options?.fetchFn ||
|
|
299
|
+
timeout: options?.timeout ?? __classPrivateFieldGet(this, _ChatBotKitClient_timeout, "f"),
|
|
300
|
+
retries: options?.retries ?? __classPrivateFieldGet(this, _ChatBotKitClient_retries, "f"),
|
|
301
|
+
retryDelay: options?.retryDelay ?? __classPrivateFieldGet(this, _ChatBotKitClient_retryDelay, "f"),
|
|
302
|
+
retryTimeout: options?.retryTimeout ?? __classPrivateFieldGet(this, _ChatBotKitClient_retryTimeout, "f"),
|
|
303
|
+
fetchFn: options?.fetchFn || __classPrivateFieldGet(this, _ChatBotKitClient_fetchFn, "f"),
|
|
294
304
|
};
|
|
295
|
-
return new ResponsePromise(url, request,
|
|
305
|
+
return new ResponsePromise(url, request, __classPrivateFieldGet(this, _ChatBotKitClient_cacheMap, "f"));
|
|
296
306
|
}
|
|
297
307
|
}
|
|
298
308
|
exports.ChatBotKitClient = ChatBotKitClient;
|
|
@@ -33,10 +33,12 @@ export type CbkAbilityName = 'abort'
|
|
|
33
33
|
| 'conversation/list[bot]'
|
|
34
34
|
| 'conversation/list[contact]'
|
|
35
35
|
| 'conversation/mcp/install[url]'
|
|
36
|
+
| 'conversation/mcp/uninstall[url]'
|
|
36
37
|
| 'conversation/search'
|
|
37
38
|
| 'conversation/search[bot]'
|
|
38
39
|
| 'conversation/search[contact]'
|
|
39
40
|
| 'conversation/skillset/install[by-id]'
|
|
41
|
+
| 'conversation/skillset/uninstall[by-id]'
|
|
40
42
|
| 'dataset/create'
|
|
41
43
|
| 'dataset/file/create[url]'
|
|
42
44
|
| 'dataset/list'
|
|
@@ -348,6 +350,11 @@ export type ConversationMcpInstallUrlParameters = {
|
|
|
348
350
|
url: string
|
|
349
351
|
}
|
|
350
352
|
|
|
353
|
+
export type ConversationMcpUninstallUrlParameters = {
|
|
354
|
+
/** the remote MCP URL to uninstall */
|
|
355
|
+
url: string
|
|
356
|
+
}
|
|
357
|
+
|
|
351
358
|
export type ConversationSearchParameters = {
|
|
352
359
|
/** the search query to find conversations */
|
|
353
360
|
query: string
|
|
@@ -368,6 +375,11 @@ export type ConversationSkillsetInstallByIdParameters = {
|
|
|
368
375
|
skillsetId: string
|
|
369
376
|
}
|
|
370
377
|
|
|
378
|
+
export type ConversationSkillsetUninstallByIdParameters = {
|
|
379
|
+
/** the skillset ID to uninstall */
|
|
380
|
+
skillsetId: string
|
|
381
|
+
}
|
|
382
|
+
|
|
371
383
|
export type DatasetCreateParameters = {
|
|
372
384
|
/** the name of the dataset */
|
|
373
385
|
name: string
|
|
@@ -1530,6 +1542,11 @@ export interface CbkAbilityRegistry {
|
|
|
1530
1542
|
description: 'Bring MCP (model context protocol) functions into context'
|
|
1531
1543
|
parameters: ConversationMcpInstallUrlParameters
|
|
1532
1544
|
}
|
|
1545
|
+
'conversation/mcp/uninstall[url]': {
|
|
1546
|
+
name: 'Uninstall MCP'
|
|
1547
|
+
description: 'Remove MCP (model context protocol) functions from context'
|
|
1548
|
+
parameters: ConversationMcpUninstallUrlParameters
|
|
1549
|
+
}
|
|
1533
1550
|
'conversation/search': {
|
|
1534
1551
|
name: 'Search Conversations'
|
|
1535
1552
|
description: 'Search conversations by query'
|
|
@@ -1550,6 +1567,11 @@ export interface CbkAbilityRegistry {
|
|
|
1550
1567
|
description: 'Bring a skillset into context by its ID'
|
|
1551
1568
|
parameters: ConversationSkillsetInstallByIdParameters
|
|
1552
1569
|
}
|
|
1570
|
+
'conversation/skillset/uninstall[by-id]': {
|
|
1571
|
+
name: 'Uninstall Skillset'
|
|
1572
|
+
description: 'Remove a skillset from context by its ID'
|
|
1573
|
+
parameters: ConversationSkillsetUninstallByIdParameters
|
|
1574
|
+
}
|
|
1553
1575
|
'dataset/create': {
|
|
1554
1576
|
name: 'Create Dataset'
|
|
1555
1577
|
description: 'Create a new dataset'
|
|
@@ -5004,6 +5004,23 @@ export interface paths {
|
|
|
5004
5004
|
patch?: never;
|
|
5005
5005
|
trace?: never;
|
|
5006
5006
|
};
|
|
5007
|
+
"/usage/list": {
|
|
5008
|
+
parameters: {
|
|
5009
|
+
query?: never;
|
|
5010
|
+
header?: never;
|
|
5011
|
+
path?: never;
|
|
5012
|
+
cookie?: never;
|
|
5013
|
+
};
|
|
5014
|
+
/** List usage records */
|
|
5015
|
+
get: operations["listUsageRecords"];
|
|
5016
|
+
put?: never;
|
|
5017
|
+
post?: never;
|
|
5018
|
+
delete?: never;
|
|
5019
|
+
options?: never;
|
|
5020
|
+
head?: never;
|
|
5021
|
+
patch?: never;
|
|
5022
|
+
trace?: never;
|
|
5023
|
+
};
|
|
5007
5024
|
"/usage/series/fetch": {
|
|
5008
5025
|
parameters: {
|
|
5009
5026
|
query?: never;
|
|
@@ -24651,6 +24668,81 @@ export interface operations {
|
|
|
24651
24668
|
};
|
|
24652
24669
|
};
|
|
24653
24670
|
};
|
|
24671
|
+
listUsageRecords: {
|
|
24672
|
+
parameters: {
|
|
24673
|
+
query?: {
|
|
24674
|
+
cursor?: string;
|
|
24675
|
+
order?: "asc" | "desc";
|
|
24676
|
+
take?: number;
|
|
24677
|
+
meta?: {
|
|
24678
|
+
[key: string]: string;
|
|
24679
|
+
};
|
|
24680
|
+
};
|
|
24681
|
+
header?: never;
|
|
24682
|
+
path?: never;
|
|
24683
|
+
cookie?: never;
|
|
24684
|
+
};
|
|
24685
|
+
requestBody?: never;
|
|
24686
|
+
responses: {
|
|
24687
|
+
/** @description The list of usage records was retrieved successfully */
|
|
24688
|
+
200: {
|
|
24689
|
+
headers: {
|
|
24690
|
+
[name: string]: unknown;
|
|
24691
|
+
};
|
|
24692
|
+
content: {
|
|
24693
|
+
"application/json": {
|
|
24694
|
+
items: {
|
|
24695
|
+
/** @description The associated name */
|
|
24696
|
+
name?: string;
|
|
24697
|
+
/** @description The associated description */
|
|
24698
|
+
description?: string;
|
|
24699
|
+
/** @description Meta data information */
|
|
24700
|
+
meta?: {
|
|
24701
|
+
[key: string]: unknown;
|
|
24702
|
+
};
|
|
24703
|
+
/** @description The instance ID */
|
|
24704
|
+
id: string;
|
|
24705
|
+
/** @description The timestamp (ms) when the instance was created */
|
|
24706
|
+
createdAt: number;
|
|
24707
|
+
/** @description The timestamp (ms) when the instance was updated */
|
|
24708
|
+
updatedAt: number;
|
|
24709
|
+
/** @description The usage type */
|
|
24710
|
+
type: string;
|
|
24711
|
+
/** @description The usage count */
|
|
24712
|
+
count: number;
|
|
24713
|
+
/** @description Related conversation ID if applicable */
|
|
24714
|
+
conversationId?: string;
|
|
24715
|
+
/** @description Related message ID if applicable */
|
|
24716
|
+
messageId?: string;
|
|
24717
|
+
/** @description Related task ID if applicable */
|
|
24718
|
+
taskId?: string;
|
|
24719
|
+
/** @description Related contact ID if applicable */
|
|
24720
|
+
contactId?: string;
|
|
24721
|
+
/** @description Related blueprint ID if applicable */
|
|
24722
|
+
blueprintId?: string;
|
|
24723
|
+
/** @description Related bot ID if applicable */
|
|
24724
|
+
botId?: string;
|
|
24725
|
+
/** @description Related dataset ID if applicable */
|
|
24726
|
+
datasetId?: string;
|
|
24727
|
+
/** @description Related skillset ID if applicable */
|
|
24728
|
+
skillsetId?: string;
|
|
24729
|
+
/** @description Related ability ID if applicable */
|
|
24730
|
+
abilityId?: string;
|
|
24731
|
+
}[];
|
|
24732
|
+
/** @description Cursor for fetching the next page */
|
|
24733
|
+
cursor: string;
|
|
24734
|
+
};
|
|
24735
|
+
};
|
|
24736
|
+
};
|
|
24737
|
+
/** @description An error response */
|
|
24738
|
+
default: {
|
|
24739
|
+
headers: {
|
|
24740
|
+
[name: string]: unknown;
|
|
24741
|
+
};
|
|
24742
|
+
content?: never;
|
|
24743
|
+
};
|
|
24744
|
+
};
|
|
24745
|
+
};
|
|
24654
24746
|
fetchUsageSeries: {
|
|
24655
24747
|
parameters: {
|
|
24656
24748
|
query?: never;
|
package/dist/esm/client.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
1
12
|
var _ChatBotKitClient_secret, _ChatBotKitClient_baseUrl, _ChatBotKitClient_endpoints, _ChatBotKitClient_runAsUserId, _ChatBotKitClient_runAsChildUserEmail, _ChatBotKitClient_timezone, _ChatBotKitClient_headers, _ChatBotKitClient_timeout, _ChatBotKitClient_retries, _ChatBotKitClient_retryDelay, _ChatBotKitClient_retryTimeout, _ChatBotKitClient_fetchFn, _ChatBotKitClient_cacheMap;
|
|
2
|
-
import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
3
13
|
import { Blob, FetchError, FormData, fetch, jsonl, withRetry, withTimeout, } from '@chatbotkit/fetch';
|
|
4
14
|
const fetchPlusPlus = withRetry(withTimeout(fetch, { timeout: Infinity }), {
|
|
5
15
|
retries: 3,
|
|
@@ -33,10 +33,12 @@ export type CbkAbilityName = 'abort'
|
|
|
33
33
|
| 'conversation/list[bot]'
|
|
34
34
|
| 'conversation/list[contact]'
|
|
35
35
|
| 'conversation/mcp/install[url]'
|
|
36
|
+
| 'conversation/mcp/uninstall[url]'
|
|
36
37
|
| 'conversation/search'
|
|
37
38
|
| 'conversation/search[bot]'
|
|
38
39
|
| 'conversation/search[contact]'
|
|
39
40
|
| 'conversation/skillset/install[by-id]'
|
|
41
|
+
| 'conversation/skillset/uninstall[by-id]'
|
|
40
42
|
| 'dataset/create'
|
|
41
43
|
| 'dataset/file/create[url]'
|
|
42
44
|
| 'dataset/list'
|
|
@@ -348,6 +350,11 @@ export type ConversationMcpInstallUrlParameters = {
|
|
|
348
350
|
url: string
|
|
349
351
|
}
|
|
350
352
|
|
|
353
|
+
export type ConversationMcpUninstallUrlParameters = {
|
|
354
|
+
/** the remote MCP URL to uninstall */
|
|
355
|
+
url: string
|
|
356
|
+
}
|
|
357
|
+
|
|
351
358
|
export type ConversationSearchParameters = {
|
|
352
359
|
/** the search query to find conversations */
|
|
353
360
|
query: string
|
|
@@ -368,6 +375,11 @@ export type ConversationSkillsetInstallByIdParameters = {
|
|
|
368
375
|
skillsetId: string
|
|
369
376
|
}
|
|
370
377
|
|
|
378
|
+
export type ConversationSkillsetUninstallByIdParameters = {
|
|
379
|
+
/** the skillset ID to uninstall */
|
|
380
|
+
skillsetId: string
|
|
381
|
+
}
|
|
382
|
+
|
|
371
383
|
export type DatasetCreateParameters = {
|
|
372
384
|
/** the name of the dataset */
|
|
373
385
|
name: string
|
|
@@ -1530,6 +1542,11 @@ export interface CbkAbilityRegistry {
|
|
|
1530
1542
|
description: 'Bring MCP (model context protocol) functions into context'
|
|
1531
1543
|
parameters: ConversationMcpInstallUrlParameters
|
|
1532
1544
|
}
|
|
1545
|
+
'conversation/mcp/uninstall[url]': {
|
|
1546
|
+
name: 'Uninstall MCP'
|
|
1547
|
+
description: 'Remove MCP (model context protocol) functions from context'
|
|
1548
|
+
parameters: ConversationMcpUninstallUrlParameters
|
|
1549
|
+
}
|
|
1533
1550
|
'conversation/search': {
|
|
1534
1551
|
name: 'Search Conversations'
|
|
1535
1552
|
description: 'Search conversations by query'
|
|
@@ -1550,6 +1567,11 @@ export interface CbkAbilityRegistry {
|
|
|
1550
1567
|
description: 'Bring a skillset into context by its ID'
|
|
1551
1568
|
parameters: ConversationSkillsetInstallByIdParameters
|
|
1552
1569
|
}
|
|
1570
|
+
'conversation/skillset/uninstall[by-id]': {
|
|
1571
|
+
name: 'Uninstall Skillset'
|
|
1572
|
+
description: 'Remove a skillset from context by its ID'
|
|
1573
|
+
parameters: ConversationSkillsetUninstallByIdParameters
|
|
1574
|
+
}
|
|
1553
1575
|
'dataset/create': {
|
|
1554
1576
|
name: 'Create Dataset'
|
|
1555
1577
|
description: 'Create a new dataset'
|
|
@@ -5004,6 +5004,23 @@ export interface paths {
|
|
|
5004
5004
|
patch?: never;
|
|
5005
5005
|
trace?: never;
|
|
5006
5006
|
};
|
|
5007
|
+
"/usage/list": {
|
|
5008
|
+
parameters: {
|
|
5009
|
+
query?: never;
|
|
5010
|
+
header?: never;
|
|
5011
|
+
path?: never;
|
|
5012
|
+
cookie?: never;
|
|
5013
|
+
};
|
|
5014
|
+
/** List usage records */
|
|
5015
|
+
get: operations["listUsageRecords"];
|
|
5016
|
+
put?: never;
|
|
5017
|
+
post?: never;
|
|
5018
|
+
delete?: never;
|
|
5019
|
+
options?: never;
|
|
5020
|
+
head?: never;
|
|
5021
|
+
patch?: never;
|
|
5022
|
+
trace?: never;
|
|
5023
|
+
};
|
|
5007
5024
|
"/usage/series/fetch": {
|
|
5008
5025
|
parameters: {
|
|
5009
5026
|
query?: never;
|
|
@@ -24651,6 +24668,81 @@ export interface operations {
|
|
|
24651
24668
|
};
|
|
24652
24669
|
};
|
|
24653
24670
|
};
|
|
24671
|
+
listUsageRecords: {
|
|
24672
|
+
parameters: {
|
|
24673
|
+
query?: {
|
|
24674
|
+
cursor?: string;
|
|
24675
|
+
order?: "asc" | "desc";
|
|
24676
|
+
take?: number;
|
|
24677
|
+
meta?: {
|
|
24678
|
+
[key: string]: string;
|
|
24679
|
+
};
|
|
24680
|
+
};
|
|
24681
|
+
header?: never;
|
|
24682
|
+
path?: never;
|
|
24683
|
+
cookie?: never;
|
|
24684
|
+
};
|
|
24685
|
+
requestBody?: never;
|
|
24686
|
+
responses: {
|
|
24687
|
+
/** @description The list of usage records was retrieved successfully */
|
|
24688
|
+
200: {
|
|
24689
|
+
headers: {
|
|
24690
|
+
[name: string]: unknown;
|
|
24691
|
+
};
|
|
24692
|
+
content: {
|
|
24693
|
+
"application/json": {
|
|
24694
|
+
items: {
|
|
24695
|
+
/** @description The associated name */
|
|
24696
|
+
name?: string;
|
|
24697
|
+
/** @description The associated description */
|
|
24698
|
+
description?: string;
|
|
24699
|
+
/** @description Meta data information */
|
|
24700
|
+
meta?: {
|
|
24701
|
+
[key: string]: unknown;
|
|
24702
|
+
};
|
|
24703
|
+
/** @description The instance ID */
|
|
24704
|
+
id: string;
|
|
24705
|
+
/** @description The timestamp (ms) when the instance was created */
|
|
24706
|
+
createdAt: number;
|
|
24707
|
+
/** @description The timestamp (ms) when the instance was updated */
|
|
24708
|
+
updatedAt: number;
|
|
24709
|
+
/** @description The usage type */
|
|
24710
|
+
type: string;
|
|
24711
|
+
/** @description The usage count */
|
|
24712
|
+
count: number;
|
|
24713
|
+
/** @description Related conversation ID if applicable */
|
|
24714
|
+
conversationId?: string;
|
|
24715
|
+
/** @description Related message ID if applicable */
|
|
24716
|
+
messageId?: string;
|
|
24717
|
+
/** @description Related task ID if applicable */
|
|
24718
|
+
taskId?: string;
|
|
24719
|
+
/** @description Related contact ID if applicable */
|
|
24720
|
+
contactId?: string;
|
|
24721
|
+
/** @description Related blueprint ID if applicable */
|
|
24722
|
+
blueprintId?: string;
|
|
24723
|
+
/** @description Related bot ID if applicable */
|
|
24724
|
+
botId?: string;
|
|
24725
|
+
/** @description Related dataset ID if applicable */
|
|
24726
|
+
datasetId?: string;
|
|
24727
|
+
/** @description Related skillset ID if applicable */
|
|
24728
|
+
skillsetId?: string;
|
|
24729
|
+
/** @description Related ability ID if applicable */
|
|
24730
|
+
abilityId?: string;
|
|
24731
|
+
}[];
|
|
24732
|
+
/** @description Cursor for fetching the next page */
|
|
24733
|
+
cursor: string;
|
|
24734
|
+
};
|
|
24735
|
+
};
|
|
24736
|
+
};
|
|
24737
|
+
/** @description An error response */
|
|
24738
|
+
default: {
|
|
24739
|
+
headers: {
|
|
24740
|
+
[name: string]: unknown;
|
|
24741
|
+
};
|
|
24742
|
+
content?: never;
|
|
24743
|
+
};
|
|
24744
|
+
};
|
|
24745
|
+
};
|
|
24654
24746
|
fetchUsageSeries: {
|
|
24655
24747
|
parameters: {
|
|
24656
24748
|
query?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatbotkit/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0",
|
|
4
4
|
"description": "The fastest way to build advanced AI chat bots",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"engines": {
|
|
@@ -3312,8 +3312,7 @@
|
|
|
3312
3312
|
},
|
|
3313
3313
|
"types": "./dist/cjs/index.d.ts",
|
|
3314
3314
|
"dependencies": {
|
|
3315
|
-
"
|
|
3316
|
-
"@chatbotkit/fetch": "1.29.0"
|
|
3315
|
+
"@chatbotkit/fetch": "1.30.0"
|
|
3317
3316
|
},
|
|
3318
3317
|
"devDependencies": {
|
|
3319
3318
|
"npm-run-all": "^4.1.5",
|